/* Odin lesson. All rules scoped under .odn-* */
.odn-sc { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.odn-pic { margin: 0; display: flex; flex-direction: column; align-items: center; animation: odnIn .45s ease-out both; }
.odn-pic img { display: block; max-width: 100%; max-height: 290px; border-radius: 10px; box-shadow: 0 12px 26px rgba(0,0,0,.45); }
.odn-pic figcaption, .odn-cap { margin-top: 6px; font: 600 12.5px var(--sans); color: var(--dim); text-align: center; }
@keyframes odnIn { from { opacity: 0; translate: 0 8px; } }

/* 0. the portrait and the ravens */
.odn-open { position: relative; flex: 1; width: 100%; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(70% 55% at 50% 45%, rgba(123,92,253,.28), transparent 70%); }
.odn-face { width: 78%; max-width: 330px; height: auto; opacity: 0; transform: scale(.94); transition: opacity .9s, transform 1.2s cubic-bezier(.2,.8,.2,1); filter: drop-shadow(0 16px 30px rgba(0,0,0,.5)); }
.odn-in .odn-face { opacity: 1; transform: none; }
.odn-fly { position: absolute; width: 90px; height: auto; top: 6%; opacity: 0; }
.odn-f1 { left: -30%; }
.odn-f2 { right: -30%; transform: scaleX(-1); }
.odn-in .odn-f1 { animation: odnFly1 1.7s cubic-bezier(.3,.6,.3,1) .2s both; }
.odn-in .odn-f2 { animation: odnFly2 1.7s cubic-bezier(.3,.6,.3,1) .45s both; }
@keyframes odnFly1 { 0% { left: -30%; top: 2%; opacity: 1; } 80% { opacity: 1; } 100% { left: 52%; top: 30%; opacity: 0; } }
@keyframes odnFly2 { 0% { right: -30%; top: 4%; opacity: 1; } 80% { opacity: 1; } 100% { right: 52%; top: 30%; opacity: 0; } }

/* 1. the well */
.odn-wellbox { position: relative; width: 100%; max-width: 360px; touch-action: none; }
.odn-wellimg { display: block; width: 100%; height: auto; }
.odn-ring { position: absolute; left: 37%; top: 50%; width: 26%; height: 16%; border-radius: 50%; }
.odn-glow { position: absolute; left: 30%; top: 40%; width: 40%; height: 34%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,214,102,.9), rgba(255,214,102,0)); opacity: 0; transition: opacity 1s; pointer-events: none; }
.odn-lit .odn-glow { opacity: 1; animation: odnPulse 1.6s ease-in-out infinite alternate; }
@keyframes odnPulse { to { transform: scale(1.12); } }
.odn-eye { position: absolute; left: calc(50% - 26px); top: 0; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: grab; touch-action: none; z-index: 2; }
.odn-eye i { position: absolute; inset: 4px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #1a1430 0 22%, #6fa8e8 23% 46%, #f4f1ea 47%); box-shadow: 0 0 0 2px rgba(252,192,80,.8), 0 0 18px 4px rgba(252,192,80,.55); }
.odn-eye.held { cursor: grabbing; }
.odn-eye.odn-sink { transition: translate .5s cubic-bezier(.5,0,.8,.6), opacity .5s .4s, scale .5s .4s; opacity: 0; scale: .3; pointer-events: none; }

/* 2. nine nights */
.odn-night { position: relative; width: 100%; max-width: 270px; border-radius: 12px; overflow: hidden; box-shadow: 0 12px 26px rgba(0,0,0,.45); }
.odn-night img { display: block; width: 100%; height: auto; }
.odn-dark { position: absolute; inset: 0; background: #0b0a24; opacity: .15; }
.odn-moon { position: absolute; width: 22px; height: 22px; margin: -11px; border-radius: 50%; background: #f6efd6; box-shadow: 0 0 14px 4px rgba(246,239,214,.6); opacity: 0; }
.odn-count { position: absolute; left: 8px; top: 8px; padding: 3px 9px; border-radius: 999px; background: rgba(11,10,36,.75); font: 700 13px var(--sans); color: var(--text); opacity: 0; transition: opacity .3s; }
.odn-count b { color: var(--gold); font-variant-numeric: tabular-nums; }
.odn-go .odn-count { opacity: 1; }
.odn-runes { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 6px; opacity: 0; transform: translateY(8px); transition: opacity .8s, transform .8s; }
.odn-found .odn-runes { opacity: 1; transform: none; }
.odn-rune { width: 20px; height: 30px; overflow: visible; }
.odn-rune path { fill: none; stroke: var(--gold); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.odn-runes .odn-rune path { filter: drop-shadow(0 0 4px rgba(252,192,80,.9)); }

/* 3. the deals */
.odn-deals { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 340px; }
.odn-deal { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line-strong); }
.odn-deal img { width: 74px; height: 74px; object-fit: cover; border-radius: 10px; flex: none; }
.odn-deal span { display: flex; flex-direction: column; font: 700 15px/1.25 var(--sans); color: var(--text); }
.odn-deal i { font: italic 600 13px var(--serif); color: var(--dim); }
.odn-deal b:last-child { color: var(--gold); }

/* 4. the runes */
.odn-slab { margin: 10px 0 4px; display: flex; gap: 10px; padding: 14px 18px; border-radius: 18px; background: linear-gradient(180deg, #5d6070, #43454f); box-shadow: inset 0 2px 0 rgba(255,255,255,.12), 0 10px 22px rgba(0,0,0,.4); }
.odn-cell { width: 30px; height: 44px; border-bottom: 2px dashed rgba(255,255,255,.35); display: flex; align-items: center; justify-content: center; }
.odn-cell .odn-rune { width: 26px; height: 39px; }
.odn-slab .odn-rune path { stroke: #f4e7c6; stroke-width: 2.8; }
.odn-done { box-shadow: inset 0 2px 0 rgba(255,255,255,.12), 0 0 0 2px var(--gold), 0 0 24px rgba(252,192,80,.45); }
.odn-keys { display: grid; grid-template-columns: repeat(5, minmax(0, 62px)); gap: 8px; justify-content: center; }
.odn-key { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 64px; padding: 7px 0 5px; border-radius: 14px; background: var(--raised); border: 1.5px solid var(--line-strong); color: var(--text); font: 800 13px var(--sans); cursor: pointer; }
.odn-key .odn-rune { width: 18px; height: 27px; }
.odn-key.locked { pointer-events: none; opacity: .7; }
.odn-key.odn-no { border-color: var(--red); animation: odnShake .4s; }
@keyframes odnShake { 25% { translate: -5px 0; } 75% { translate: 5px 0; } }

/* 5. the ravens */
.odn-ravens { display: flex; gap: 16px; justify-content: center; }
.odn-ravens figure { margin: 0; display: flex; flex-direction: column; align-items: center; }
.odn-ravens img { width: 130px; height: auto; }
.odn-ravens .odn-flip { transform: scaleX(-1); }
.odn-ravens figcaption { display: flex; flex-direction: column; align-items: center; font: 800 16px var(--serif); color: var(--gold); }
.odn-ravens figcaption i { font: 700 13px var(--sans); font-style: normal; color: var(--text); }

/* 6. Wednesday */
.odn-wed { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.odn-wed b { font: 800 44px/1 var(--serif); color: var(--text); }
.odn-wed i { font: italic 600 15px var(--serif); color: var(--dim); }
.odn-hi { transition: color .6s, text-shadow .6s; }
.odn-wed.odn-lit .odn-hi { color: var(--gold); text-shadow: 0 0 18px rgba(252,192,80,.5); }
.odn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 340px; }
.odn-pair > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 6px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line-strong); animation: odnIn .45s ease-out both; }
.odn-pair > div.odn-us { animation-delay: .3s; border-color: rgba(252,192,80,.55); }
.odn-pair b { font: 800 22px var(--serif); color: var(--text); }
.odn-pair i { font: 600 12.5px var(--sans); color: var(--dim); font-style: normal; }
.odn-pair span { margin-top: 4px; font: 700 14px var(--sans); color: var(--gold); }

/* 7. the week */
.odn-week { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 340px; }
.odn-day { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 64px; padding: 10px 4px; border-radius: 14px; background: var(--raised); border: 1.5px dashed var(--line-strong); color: var(--text); font: inherit; cursor: pointer; }
.odn-day b { font: 800 16px var(--sans); }
.odn-god { font: 800 18px var(--serif); color: var(--dim); }
.odn-day.done { border-style: solid; border-color: var(--gold); pointer-events: none; }
.odn-day.done .odn-god { color: var(--gold); }

@media (max-height: 700px) {
  .odn-pic img { max-height: 240px; }
  .odn-night { max-width: 215px; }
  .odn-wellbox { max-width: 300px; }
  .odn-ravens img { width: 110px; }
  .odn-deal img { width: 60px; height: 60px; }
  .odn-wed b { font-size: 38px; }
}

/* The paintings, shown as large as the screen allows. */
.odn-tall img { height: 320px; width: auto; max-height: none; }
@media (max-height: 700px) { .odn-tall img { height: 250px; } }
