:root { --night: #153261; --ice: #dff6ff; --violet: #7650b8; --gold: #f7cf69; --ink: #31275d; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; overflow: hidden; color: var(--ink); font-family: "Trebuchet MS", Arial, sans-serif; background: radial-gradient(circle at 20% 12%, #fff 0 1px, transparent 2px) 0 0/34px 34px, linear-gradient(160deg, #2c5d99 0%, #9bd9ef 42%, #edfaff 100%); }
.clue-page { display: grid; place-items: center; height: 100vh; height: 100dvh; padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); overflow: hidden; position: relative; }
.clue-page::before, .clue-page::after { content: '❄'; color: #fff; opacity: .72; position: fixed; font-size: clamp(5rem, 15vw, 12rem); pointer-events: none; }
.clue-page::before { top: -30px; left: -12px; }.clue-page::after { right: -12px; bottom: -42px; }
.story-card { position: relative; width: min(100%, 680px); padding: clamp(22px, 6vw, 48px); text-align: center; background: linear-gradient(150deg, rgba(255,255,255,.96), rgba(220,245,255,.94)); border: 8px solid rgba(255,255,255,.76); border-radius: 38px 38px 52px 52px; box-shadow: 0 20px 45px rgba(13,37,91,.3), inset 0 0 0 3px #9edcf5; }
.eyebrow { margin: 0 0 12px; color: var(--night); font-size: clamp(1rem, 3vw, 1.25rem); font-weight: 800; letter-spacing: .08em; text-shadow: 0 1px 1px rgba(255,255,255,.85); text-transform: uppercase; }
h1 { margin: 0 auto 14px; color: var(--night); font-family: Georgia, serif; font-size: clamp(2rem, 8vw, 4.3rem); line-height: .95; text-shadow: 0 2px 0 rgba(255,255,255,.9), 0 5px 10px rgba(53,91,145,.35); }
.ribbon { display: inline-block; padding: 10px 25px; background: linear-gradient(135deg, #a68ae1, #6c4aa6); border: 2px solid var(--gold); border-radius: 999px; color: #fff; font-family: Georgia, serif; font-size: clamp(1.35rem, 5vw, 2rem); font-weight: 700; box-shadow: 0 5px 0 #51357d; }
.character { display: block; width: min(82%, 360px); max-height: 220px; margin: 21px auto 12px; object-fit: contain; filter: drop-shadow(0 10px 8px rgba(26,47,90,.25)); }
.clue { margin: 12px auto; max-width: 520px; font-family: Georgia, serif; font-size: clamp(1.45rem, 5.5vw, 2.4rem); font-weight: 700; line-height: 1.22; }
.hint { margin: 12px auto 0; color: #5b4389; font-size: clamp(.9rem, 3.4vw, 1.15rem); font-weight: 700; }
.location { display: inline-block; margin-top: 8px; color: #1b4f8a; font-size: 1.05em; }
.progress { margin: 22px 0 0; color: #53628c; font-weight: 800; }
.scan-qr { display: block; margin: 20px auto 0; padding: 12px 28px; border: 2px solid var(--gold); border-radius: 999px; background: linear-gradient(135deg, #7650b8, #4f3783); color: #fff; font: 700 1.1rem "Trebuchet MS", Arial, sans-serif; box-shadow: 0 4px 0 #3b2769; cursor: pointer; }
.scan-qr:disabled { cursor: default; opacity: .78; }
.camera-overlay { position: fixed; inset: 0; z-index: 10; display: grid; align-content: center; justify-items: center; padding: 24px; background: #000; }
.camera-overlay[hidden] { display: none; }
.camera-preview { display: block; width: min(100%, 640px); max-height: 80dvh; border: 4px solid var(--gold); border-radius: 20px; background: #000; }
.camera-close { position: absolute; top: 18px; right: 20px; width: 48px; height: 48px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer; }
.camera-status { min-height: 1.4em; margin: 14px auto 0; color: #fff; font-weight: 700; text-align: center; }
.clue-page[data-final="true"] .story-card { background: linear-gradient(150deg, #fffde9, #e4faff); }.clue-page[data-final="true"] .ribbon { background: linear-gradient(135deg, #e8b742, #bc7e22); }
@media (max-height: 740px) { .story-card { padding: 16px 24px; }.eyebrow { margin-bottom: 6px; font-size: .875rem; }h1 { margin-bottom: 8px; font-size: clamp(1.8rem, 6.8vh, 3rem); }.ribbon { padding: 7px 18px; font-size: clamp(1.1rem, 3.5vh, 1.5rem); }.character { max-height: min(19vh, 145px); margin: 10px auto 6px; }.clue { margin: 8px auto; font-size: clamp(1.2rem, 3.4vh, 1.8rem); }.progress { margin-top: 12px; }.scan-qr { margin-top: 12px; padding: 9px 22px; } }
