/* Divination lesson. All rules scoped under .dvn-* */

/* ---------- the bone ---------- */
.dvn-bone { position: relative; width: 100%; max-width: 360px; margin: auto; padding: 18px 10px; border-radius: 22px; background: radial-gradient(ellipse at 60% 45%, #3A2410 0%, #150D07 65%, #0A0E1A 100%); }
.dvn-bone > img { display: block; width: 100%; height: auto; }
.dvn-over { position: absolute; left: 10px; top: 18px; width: calc(100% - 20px); height: auto; overflow: visible; }
.dvn-bone .dvn-over { aspect-ratio: 640 / 436; }
.dvn-pit { cursor: pointer; }
.dvn-pit ellipse { fill: #6B4A2A; stroke: #3D2814; stroke-width: 3; }
.dvn-hit { fill: transparent; }
.dvn-hot ellipse { fill: #FF8A3D; stroke: #FFD08A; filter: drop-shadow(0 0 8px #FF8A3D); transition: fill .3s; }
.dvn-done { cursor: default; }
.dvn-done ellipse { fill: #3A2410; }
.dvn-crack { fill: none; stroke: #2A1708; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.dvn-glow { stroke: #FFB45C; stroke-width: 3; filter: drop-shadow(0 0 5px #FF8A3D); transition: opacity 1.2s; }
.dvn-glow.dvn-cool { opacity: 0; }
.dvn-rod { position: absolute; left: 10px; top: 18px; width: 9px; height: 150px; margin: -150px 0 0 -4px; transform-origin: 50% 100%; opacity: 0; pointer-events: none; border-radius: 5px; background: linear-gradient(#5A5A66, #8A7A70 70%, #FF7A2A 92%, #FFE0A0); box-shadow: 0 0 12px rgba(255, 122, 42, .8); }

/* ---------- the sign ---------- */
.dvn-pics .choice { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dvn-gly { display: block; width: 64px; height: 64px; border-radius: 12px; background: #E8DCC2; }
.dvn-gly path { fill: none; stroke: #5A3A1C; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.dvn-pics .choice span { font-size: 13px; min-height: 1.3em; }

.dvn-bone.dvn-small { max-width: 280px; padding: 10px 8px; }
.dvn-bone.dvn-small .dvn-over, .dvn-bone.dvn-small .dvn-rod { left: 8px; top: 10px; }
.dvn-bone.dvn-small .dvn-over { width: calc(100% - 16px); }
.dvn-tiles { display: flex; justify-content: center; gap: 14px; margin-top: 12px; }
.dvn-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border: 2px solid var(--line-strong); border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; min-width: 84px; }
.dvn-tile[disabled] { cursor: default; }
.dvn-tile.dvn-right { border-color: var(--mint); background: rgba(63, 214, 154, .14); }
.dvn-tile.dvn-wrong { border-color: var(--red); background: rgba(216, 85, 85, .14); }
.dvn-tile span { min-height: 1.3em; }

/* ---------- the liver ---------- */
.dvn-liver { position: relative; width: 100%; max-width: 300px; margin: 0 auto; }
.dvn-liver > img { display: block; width: 100%; height: auto; }
.dvn-liver .dvn-over { left: 0; top: 0; width: 100%; aspect-ratio: 640 / 442; }
.dvn-mark { cursor: pointer; }
.dvn-notch { fill: none; stroke: #2A0E0A; stroke-width: 9; stroke-linecap: round; }
.dvn-seen .dvn-notch { stroke: #FCC050; }
.dvn-book { width: 100%; max-width: 300px; margin: 8px auto 0; padding: 8px 14px; border-radius: 12px; background: #E8DCC2; color: #3D2814; font-family: var(--serif); opacity: .35; transition: opacity .4s; }
.dvn-book.dvn-on { opacity: 1; }
.dvn-bk { display: block; font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8A6A40; }
.dvn-entry { margin: 2px 0 0; font-size: 16px; line-height: 1.3; }

/* ---------- the pair ---------- */
.dvn-pair { display: flex; justify-content: center; align-items: center; gap: 16px; }
.dvn-pair img { width: 44%; max-width: 160px; height: auto; border-radius: 12px; }

/* ---------- the coins ---------- */
.dvn-cast { width: 100%; max-width: 340px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: center; }
.dvn-coins { display: flex; flex-direction: column; align-items: center; gap: 6px; perspective: 400px; }
.dvn-coin { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--dim); }
.dvn-coin svg, .dvn-big svg { width: 50px; height: 50px; display: block; }
.dvn-coin span { width: 44px; }
.dvn-cr { fill: #C99A3E; stroke: #8A6420; stroke-width: 3; }
.dvn-ch { fill: var(--bg); stroke: #8A6420; stroke-width: 2; }
.dvn-face rect { fill: #7A561A; }
.dvn-tails .dvn-face { opacity: 0; }
.dvn-tails .dvn-cr { fill: #A9803A; }
.dvn-hexbox { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dvn-lines { display: flex; flex-direction: column; gap: 9px; width: 120px; }
.dvn-line { display: flex; justify-content: space-between; height: 13px; }
.dvn-line b { display: block; width: 41%; border-radius: 3px; background: var(--raised); transition: background .25s; }
.dvn-drawn b { background: var(--gold); }
.dvn-yang b { width: 50%; }
.dvn-yang b:first-child { border-radius: 3px 0 0 3px; }
.dvn-yang b:last-child { border-radius: 0 3px 3px 0; }
.dvn-name { min-height: 54px; display: flex; flex-direction: column; align-items: center; text-align: center; opacity: 0; transition: opacity .4s; }
.dvn-named .dvn-name { opacity: 1; }
.dvn-name b { font-size: 26px; line-height: 1.1; color: var(--text); font-weight: 400; }
.dvn-name span { font-size: 13px; font-weight: 700; color: var(--violet-bright); }

.dvn-got { margin: 4px 0 0; min-height: 1.3em; font-size: 14px; font-weight: 700; color: var(--gold); text-align: center; }
.dvn-rule { display: flex; justify-content: center; gap: 18px; margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--dim); }
.dvn-rule span { display: inline-flex; align-items: center; gap: 8px; }
.dvn-mini { display: inline-flex; justify-content: space-between; width: 34px; height: 8px; }
.dvn-mini b { display: block; width: 41%; border-radius: 2px; background: var(--gold); }
.dvn-mini.dvn-yang b { width: 50%; }

/* ---------- the flip ---------- */
.dvn-flip { display: flex; flex-direction: column; align-items: center; gap: 10px; perspective: 500px; }
.dvn-big svg { width: 110px; height: 110px; }
.dvn-res { margin: 0; font-size: 18px; color: var(--dim); font-weight: 700; }
.dvn-res b { color: var(--gold); }

@media (max-height: 700px) {
  .dvn-bone { max-width: 320px; padding: 10px 8px; }
  .dvn-over { left: 8px; top: 10px; width: calc(100% - 16px); }
  .dvn-rod { left: 8px; top: 10px; }
  .dvn-liver { max-width: 240px; }
  .dvn-coin svg { width: 40px; height: 40px; }
  .dvn-lines { gap: 7px; }
  .dvn-line { height: 11px; }
  .dvn-big svg { width: 90px; height: 90px; }
  .dvn-gly { width: 54px; height: 54px; }
}
