.adventure-page { --accent: #f6bb80; }
.shadow-page { --accent: #b9afff; }
.gravity-page { --accent: #8fe3ba; }
.adventure-intro { display: grid; grid-template-columns: 1.05fr 1fr; gap: 65px; align-items: center; padding-top: 48px; padding-bottom: 44px; }
.adventure-intro h1 { font-size: clamp(48px, 5.9vw, 80px); }
.adventure-intro h1 > span { color: var(--accent); }
.adventure-legend { max-width: 470px; justify-self: end; }
.adventure-legend p { color: #d7cfe3; margin: 20px 0 0; }
.adventure-layout { display: grid; grid-template-columns: minmax(0, 1fr) 345px; align-items: start; gap: 25px; padding-bottom: 50px; }
.adventure-main { min-width: 0; }
.illustration-panel { overflow: hidden; background: #201932; border: 1px solid #58426f; border-radius: 16px; }
.illustration-panel .scene-top { padding: 14px 16px; flex-wrap: wrap; font-size: 13px; }
.adventure-art { display: block; width: 100%; height: auto; }
.adventure-panel { border: 1px solid #776070; border-radius: 16px; padding: 25px; background: #292035; }
.adventure-page .section-label { color: var(--accent); }
.adventure-panel h2 { font-size: 28px; }
.adventure-panel > p { color: var(--muted); }
.adventure-page .primary { background: var(--accent); }
.adventure-panel .primary { width: 100%; font-size: 14px; }
.adventure-panel form > label { display: block; margin-bottom: 8px; }
.adventure-panel .word-input { width: 100%; padding: 12px 14px; background: #171128; color: var(--ink); border: 1px solid #8a728c; border-radius: 8px; font-size: 19px; margin-bottom: 15px; }
.adventure-panel .word-input[aria-invalid=true] { border-color: #ffbc98; }
.adventure-panel .game-feedback { font-size: 14px; color: #ffbc98; margin: 14px 0; }
.game-feedback:empty { display: none; }
.adventure-panel .hint-copy { font-size: 14px; color: #d7e4b0; padding: 15px; background: #17112877; border-radius: 8px; }
.adventure-panel .progress-save { font-size: 12px; color: var(--muted); margin-top: 20px; }
.adventure-victory { border-top: 1px solid #74566c; padding-top: 20px; }
.adventure-victory h3 { color: var(--accent); font-size: 28px; line-height: 1.25; margin: 15px 0; }
.adventure-victory p { color: #d7cfe3; }
.award { background: #17112888; border: 1px dashed var(--accent); border-radius: 9px; padding: 20px 15px; font-size: 14px; margin: 23px 0; }
.award strong { display: block; color: var(--accent); font-size: 23px; line-height: 1.3; margin-top: 9px; }
.case-evidence,
.witnesses { margin-top: 32px; }
.evidence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.evidence-note { padding: 20px; border: 1px solid #72545a; border-radius: 11px; background: #342735; }
.evidence-note h3 { color: var(--accent); margin: 0 0 12px; font-size: 18px; }
.evidence-note p { margin: 0; color: #e1d6eb; }
.witness-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.witness-card { padding: 18px 14px; border: 1px solid #5e466d; border-radius: 10px; background: #241b34; text-align: center; }
.witness-icon { font-size: 36px; }
.witness-card h3 { margin: 5px 0; font-size: 20px; }
.witness-card .secondary { font-size: 14px; padding: 8px 5px; min-height: 44px; }
.statement { margin: 16px 0 0; color: #f8d7af; text-align: left; }
.adventure-panel fieldset { border: 0; padding: 0; margin: 22px 0; }
.adventure-panel legend { font-size: 16px; margin-bottom: 10px; }
.radio-choice { display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin-bottom: 8px; border: 1px solid #6c526f; border-radius: 8px; cursor: pointer; min-height: 44px; }
.radio-choice:has(input:checked) { background: #f6bb8015; border-color: var(--accent); }
.radio-choice input { width: 19px; height: 19px; accent-color: var(--accent); }
.shadow-stage { position: relative; aspect-ratio: 3 / 2; }
.shadow-stage img { height: 100%; object-fit: cover; }
#shadow-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.stage-instruction { margin: 0; color: var(--muted); padding: 17px; font-size: 16px; }
.lamp-controls { margin-top: 28px; padding: 25px; border: 1px solid #5e466d; border-radius: 12px; background: #241b34; }
.lamp-controls label { display: block; margin: 15px 0 4px; font-size: 14px; }
.lamp-controls p { color: var(--muted); margin: 16px 0 0; }
.adventure-page input[type=range] { width: 100%; min-height: 36px; accent-color: var(--accent); cursor: pointer; }
.figure-control { border-bottom: 1px solid #58426f; padding: 15px 0; margin-bottom: 15px; }
.figure-control label { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.figure-control output { color: var(--accent); font-variant-numeric: tabular-nums; }
.shadow-page .adventure-panel .lamp-controls { padding: 16px; margin: 22px 0; }
.shadow-page .adventure-panel .lamp-controls h2 { font-size: 23px; }
@media (min-width: 801px) {
  .shadow-page .adventure-main { position: sticky; top: 12px; }
}
.room-frame { overflow: hidden; aspect-ratio: 1; background: #171128; }
.coded-room { overflow: auto; overscroll-behavior: contain; scrollbar-color: #8162a0 #201932; }
.room-area { width: 100%; aspect-ratio: 1; }
#room-inscriptions { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: multiply; }
.coded-room:focus-visible { outline: 3px solid var(--lime); outline-offset: -3px; }
.room-spin { position: relative; width: 100%; height: 100%; transition: transform .5s ease; }
.room-spin > img { width: 100%; height: 100%; object-fit: cover; }
.loose-marble { position: absolute; display: block; width: 5%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #dcffef, #55c9af 40%, #195d66 75%); border: 2px solid #163c42; box-shadow: 4px 5px 4px #17112888; transform: translate(-50%, -50%); transition: left .65s, top .65s; }
.gravity-controls { display: flex; gap: 14px; padding: 0 17px; }
.gravity-controls .secondary { font-size: 14px; background: #30283c; }
.gravity-controls button:disabled { opacity: .4; cursor: default; }
.gravity-direction { color: var(--accent); padding: 15px 17px 0; margin: 0; font-size: 14px; }
.discovery-copy { color: #d8efcc; border-left: 3px solid var(--accent); padding: 14px 17px; background: #8fe3ba0c; margin-top: 24px; }
.gravity-notebook { margin: 24px 0; padding: 0; list-style: none; }
.gravity-notebook li { display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; border: 1px dashed #75637a; border-radius: 8px; margin-bottom: 10px; gap: 15px; }
.gravity-notebook span { font-size: 14px; color: var(--muted); }
.gravity-notebook strong { font-size: 20px; color: #ac8dbd; }
.gravity-notebook strong.found { color: var(--accent); }
.cookie-card .primary { background: #f6bb80; }
.shadow-card .primary { background: #b9afff; }
.gravity-card .primary { background: #8fe3ba; }

@media (max-width: 1050px) {
  .adventure-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 19px; }
  .adventure-panel { padding: 21px; }
  .adventure-intro { gap: 35px; }
  .witness-grid { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .adventure-intro { grid-template-columns: 1fr; gap: 25px; padding: 35px 0; }
  .adventure-intro h1 { font-size: clamp(45px, 9vw, 68px); }
  .adventure-legend { justify-self: start; max-width: 100%; }
  .adventure-layout { grid-template-columns: 1fr; }
  .witness-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gravity-page .adventure-main .illustration-panel { max-width: 650px; margin: auto; }
}
@media (max-width: 600px) {
  .adventure-page .header nav a:first-child { display: block; }
  .adventure-page .header nav a:last-child { display: none; }
  .illustration-panel .scene-top { font-size: 12px; padding: 12px; gap: 6px; }
  .adventure-panel { padding: 23px; }
  .evidence-grid { grid-template-columns: 1fr; }
  .witness-grid { grid-template-columns: 1fr; }
  .witness-card { text-align: left; }
  .witness-icon { float: right; }
  .witness-card .secondary { max-width: 230px; }
  .case-evidence h2,
  .witnesses h2 { font-size: 26px; }
  .lamp-controls { padding: 20px; }
}
@media (max-width: 600px) and (min-height: 650px) {
  .shadow-page .adventure-layout { display: flex; flex-direction: column; align-items: stretch; }
  .shadow-page .adventure-main { display: contents; }
  .shadow-page .illustration-panel { position: sticky; top: 0; z-index: 3; order: 1; }
  .shadow-page .adventure-panel { order: 2; }
  .shadow-page .stage-instruction { font-size: 14px; line-height: 1.4; padding: 12px; }
}
