/* MAX / REF VISUAL 02 — cinematic steel, amber gold, tactile paper. */
:root{--gold:#edc57e;--muted:#c0b8a5;--line:#8c714648;--scene-x:0%;--scene-y:0%;background:#050a0e;color:#f4ead6}
body{background:radial-gradient(ellipse at 50% 0,#463a2244,transparent 70%),#050a0e}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important}
.title-screen{position:relative;max-width:590px;margin:0 auto;line-height:0;animation:none;background:#030b10}
.title-reference{display:block;width:100%;height:auto;margin:0;border:0}
button.title-hotspot{position:absolute;min-width:44px;min-height:44px;padding:0;margin:0;border:0;border-radius:0;background:transparent;box-shadow:none;color:transparent;font-size:0;letter-spacing:0;z-index:2;clip-path:none}
button.title-hotspot:active{background:#ffcc6811}button.title-hotspot:focus-visible{outline:2px solid #fff1bf;outline-offset:-4px;background:#fff1bf11}
.title-start{left:6.4%;top:51.4%;width:87%;height:7.8%}.title-profile{left:6%;top:81.4%;width:26%;height:4.3%}.title-achievements{left:34%;top:81.4%;width:31%;height:4.3%}.title-settings{left:67%;top:81.4%;width:28%;height:4.3%}.title-menu{left:3%;top:86.7%;width:22%;height:5.1%}.title-map{left:74.5%;top:89.9%;width:23%;height:6.4%}.title-cards{left:3%;top:63.4%;width:94%;height:15.2%}
.screen{position:relative;isolation:isolate;max-width:520px;padding:calc(20px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom));border-left:1px solid #9f824229;border-right:1px solid #9f824229;background:linear-gradient(#08101433,#070c10ed 700px);box-shadow:0 0 75px #0009}
.screen:before{content:'';pointer-events:none;position:absolute;inset:0 0 auto;height:100svh;max-height:1100px;z-index:-2;background-image:linear-gradient(#04080b40,#04080b55 40%,#050a0e 95%),url('../assets/adventure-atlas.webp');background-size:100% 100%,300% 300%;background-position:center,var(--back-x,0%) var(--back-y,0%);opacity:.7}
.screen:after{content:'';position:absolute;inset:10px 8px;pointer-events:none;z-index:-1;border:1px solid #b99a5b26;border-radius:17px}
body[data-world='0'] .screen{--back-x:50%;--back-y:0%}body[data-world='1'] .screen{--back-x:0%;--back-y:50%}body[data-world='3'] .screen{--back-x:0%;--back-y:100%}body[data-world='4'] .screen{--back-x:100%;--back-y:100%}body[data-world='5'] .screen{--back-x:50%;--back-y:100%}
.eyebrow{color:#d3bb87;letter-spacing:.15em;text-shadow:0 1px 4px #000;font-size:11px}.screen>h1{color:#f3dfb2;font-size:clamp(28px,7.5vw,40px);font-weight:750;text-shadow:0 2px 3px #000,0 0 20px #e5b35540;letter-spacing:.005em;line-height:1.13}.screen>h1:after{content:'';display:block;width:100%;height:1px;margin-top:20px;background:linear-gradient(90deg,transparent,#d7a552,transparent);box-shadow:0 0 9px #c88d3c}
nav{margin-bottom:20px}nav button{border-color:#baa16b66;background:linear-gradient(#191e20d9,#080d11ed);color:#d7c6a2;border-radius:50px;min-height:44px}
button{border:1px solid #b28b4c;border-radius:9px;color:#f0dbac;background:linear-gradient(180deg,#292820e8,#141716f5 48%,#30261aeb);text-shadow:0 1px 2px #000;box-shadow:inset 0 1px 0 #fff0c63d,inset 0 -1px 0 #000b,0 3px 12px #0008;letter-spacing:.04em;font-weight:600;line-height:1.3}
button.primary{color:#fff0c8;background:linear-gradient(#6e5129,#2b2319 45%,#362719 70%,#7c542a);border:1px solid #ffdaa0;border-radius:10px;box-shadow:inset 0 0 0 3px #342919,inset 0 0 13px #f3b65068,0 0 13px #f6ae4b6b,0 0 35px #edaa4326,0 3px 10px #000;font-size:16px;min-height:56px;padding:16px 20px;text-shadow:0 1px 3px #160d02,0 0 8px #f7c47455}
button.primary:active{background:linear-gradient(#a37b3e,#40331c);box-shadow:inset 0 0 18px #ffcf7c77,0 0 20px #f4b34d88}button:disabled{border-color:#696255;color:#afa48e;background:linear-gradient(#181d1d,#0c1113);box-shadow:inset 0 1px 0 #fff1;opacity:.75}
.prose{font-size:17px;line-height:1.85;color:#f0e6cf;text-shadow:0 1px 3px #000;max-width:100%}.screen-prologue .prose{padding:22px 18px;background:linear-gradient(#0a1013d9,#0a1013ba);border:1px solid #b6975b66;border-radius:10px;box-shadow:0 14px 35px #0008}.screen-prologue{display:flex;flex-direction:column;justify-content:flex-end}.screen-prologue>h1{margin-top:120px}
.worlds{gap:14px}.world-card{min-height:214px;border-radius:13px;border-color:#c6a26a88;padding:17px 18px;box-shadow:inset 0 0 25px #0006,0 8px 22px #0008}.world-card:before{content:'';position:absolute;inset:5px;pointer-events:none;border:1px solid #cda76c29;border-radius:8px}.world-card h2{font-weight:800;font-style:italic;letter-spacing:-.01em;text-shadow:0 3px 8px #000;font-size:28px;max-width:75%}.world-number{font-size:11px;color:#ebd4a5}.world-card.current{border-color:#ffe3a5;box-shadow:0 0 15px #e5aa5140,inset 0 0 25px #987c3522}.world-card.locked{filter:saturate(.55)}.world-card button{min-height:44px;padding:10px 16px}.world-card .quiet{border-color:#cbb38155;color:#e1d5b7;background:#091013b8}.classified{background:repeating-linear-gradient(98deg,#10161d,#10161d 3px,#141b23 4px,#10161d 6px)}.classified h2{letter-spacing:.08em;font-style:normal;font-size:22px}.classified.current{border-color:#a69470}.question{color:#9da2aa33;text-shadow:0 0 10px #6582a622}
.zone{--art-x:50%;--art-y:0%}.rush{--art-x:0%;--art-y:50%}.fight{--art-x:0%;--art-y:100%}.passion{--art-x:100%;--art-y:100%}.engineer{--art-x:50%;--art-y:100%}
.zone,.rush,.fight,.passion,.engineer{background-image:linear-gradient(0deg,#070c10f5,#070c1022 85%),url('../assets/adventure-atlas.webp');background-size:100% 100%,300% 300%;background-position:center,var(--art-x) var(--art-y)}
.scene-banner{height:200px;border:1px solid #c7a16688;border-radius:12px;box-shadow:0 10px 25px #0007}.scene-banner.zone,.scene-banner.rush,.scene-banner.fight,.scene-banner.passion,.scene-banner.engineer{background-image:url('../assets/adventure-atlas.webp');background-size:300% 300%;background-position:var(--art-x) var(--art-y)}.intro-scene{height:340px}.screen-intro .prose{padding:20px 18px;background:#091013dc;border:1px solid #b8995b55;border-radius:9px;margin-top:-32px;position:relative;box-shadow:0 6px 35px #0008}.screen-intro>h1{font-style:italic}
.emblem{display:block;width:156px;height:156px;margin:24px auto 18px;filter:drop-shadow(0 0 20px #eca94366)}.emblem-fragment{width:180px;height:180px;animation:relic-glow 4s ease-in-out infinite alternate}.screen-fragment{text-align:center;display:flex;flex-direction:column;justify-content:center}.screen-fragment nav{text-align:left}.screen-fragment .eyebrow{font-size:14px}.screen-fragment h2{font-size:28px;color:#f7dca2}.screen-fragment .emblem{margin:65px auto 35px}.mission-title{text-align:center;color:#f8dfa6!important;font-size:30px;text-shadow:0 0 12px #d8a34744}.screen-stats>.emblem{margin-top:30px}.stats{background:#090e11cc;border:1px solid #a7884e69;border-radius:8px;padding:14px;gap:8px 12px;box-shadow:inset 0 0 15px #0005}.stats dd{font-weight:700;color:#ffe7b1}.stats dt{color:#d5cbb5}.screen-stats h3{margin-top:24px}
.letter-paper,.gift-paper{position:relative;background:radial-gradient(ellipse at 8% 5%,#ba8b4d66,transparent 50%),radial-gradient(ellipse at 90% 90%,#b18a5866,transparent 60%),repeating-linear-gradient(88deg,#fff2d608 0 2px,#75563305 3px 4px),#e5cc9e;color:#3d2d1a;border:1px solid #be9b64;border-radius:2px 5px 4px 3px;padding:20px 22px 28px;margin:22px -3px 28px;box-shadow:0 0 0 3px #251f1444,inset 0 0 30px #a07b3f66,0 12px 35px #000b;isolation:isolate}
.letter-paper:before,.gift-paper:before{content:'';position:absolute;inset:0;pointer-events:none;border:5px solid #f8e8c330;clip-path:polygon(0 0,100% 0,99% 100%,0 99%);z-index:-1}.letter-photo{height:158px;border:8px solid #e8e1ca;transform:rotate(-4deg);margin:10px 1px 35px;background:url('../assets/worlds-cinematic.webp') 50% 0/300% 200%;box-shadow:2px 5px 10px #3b2a1e77}.letter-salutation{font:italic 21px/1.5 Georgia,'Times New Roman',serif;color:#47331d;border-bottom:1px solid #886a3d33;padding-bottom:12px}.letter-paper .prose,.gift-paper .prose{font-family:Georgia,'Times New Roman',serif;color:#35291a;text-shadow:none;font-size:17px;line-height:1.9;margin:20px 0}.letter-signature{display:block;font-size:11px;letter-spacing:.12em;color:#75542e;text-align:right;margin-top:30px}.gift-paper{text-align:center;min-height:290px}.gift-paper .emblem{filter:drop-shadow(0 5px 6px #5a391c66);width:116px;height:116px}.screen-gift>h2{text-align:center;color:#efd39d}.screen-gift>.emblem{width:120px;height:120px}
.portal-scene{height:390px;position:relative;border:1px solid #b3955955;border-radius:160px 160px 14px 14px;background-image:linear-gradient(#0000,#08101499),url('../assets/adventure-atlas.webp');background-size:100% 100%,300% 300%;background-position:center,100% 0;overflow:hidden;box-shadow:0 0 30px #ce9a3e33,inset 0 0 60px #070c10}.portal-ring{position:absolute;inset:15% 19% 13%;border:2px solid #ffe5a4;border-radius:50%;box-shadow:0 0 15px #ffd274,inset 0 0 15px #ffc056,0 0 40px #ef951b88;animation:portal-pulse 2.5s infinite alternate}.secret-portal{background-image:radial-gradient(ellipse,#0d1522,#05080d 65%);background-size:100% 100%}.secret-portal .portal-ring{border-color:#c8ba99;box-shadow:0 0 30px #a1957566,inset 0 0 35px #667c9355}.screen-portal h2{text-align:center;font-size:30px;color:#fce2ab}.screen-portal .prose{background:#0a1115c9;padding:18px;border:1px solid #9a7c4d55;border-radius:8px}.screen-portal .caption{text-align:center}.screen-love,.screen-door{background:radial-gradient(ellipse at center,#ac783429,#05090ef0 65%)}.confession{color:#f3d9a7;text-shadow:0 0 30px #c78a3b33}.door{border-color:#d5ad69;box-shadow:0 0 65px #e4ac4d44,inset 0 0 30px #8e672911;background:linear-gradient(90deg,#dba75b44,#0a1015 8%,#121919 94%,#edc78366)}
.game{background:#080e13b8;border:1px solid #ac8a4c44;border-radius:12px;padding:12px;margin-left:-10px;margin-right:-10px;box-shadow:0 6px 30px #0008}.game h2{font-size:24px;font-style:italic;color:#f1d5a1;margin-top:6px}.game canvas{border-radius:9px;border:1px solid #c5a76b88;box-shadow:0 0 15px #0009}.hud{border:1px solid #b2935055;border-radius:7px;background:linear-gradient(90deg,#0a1724e0,#0b1119e0);padding:10px 12px;font-size:13px;color:#ffe9b8;font-weight:600;box-shadow:inset 0 0 15px #0006;font-variant-numeric:tabular-nums}.fightPrompt{border-color:#b4915066;border-radius:8px;color:#ffe1a5;background:linear-gradient(#1c1b17e0,#080e12e8);box-shadow:inset 0 0 20px #bc8b2611}.notice{border-radius:12px;border-color:#c29753;background:linear-gradient(#2a2119f5,#0c1115f5);box-shadow:0 0 25px #9b603322}.notice h2{color:#ffc2a4}.fightActions button{font-size:12px}.joystick{border:2px solid #c6b08688;box-shadow:inset 0 0 0 6px #1e2429,inset 0 0 28px #8293a322,0 3px 16px #000b;background:radial-gradient(#8799a044,#0c1725)}.joystick span{color:#e8e0ca}.choices button{text-align:left;padding:16px 18px;min-height:56px}.riddle{font-size:19px;color:#f0e3cb}.diagnostic{border-color:#b5985c88;border-radius:9px;background:radial-gradient(ellipse,#193e4166,#080f15),url('../assets/adventure-atlas.webp') 50% 100%/300% 300%;color:#a6e4d8}.diagram{font-size:60px;color:#edd28f;text-shadow:0 0 12px #e6aa4e55}.chessboard{border:4px solid #ae8851;box-shadow:0 0 0 2px #45321b,0 0 0 5px #e8c88744,0 13px 30px #000b}.square.light{background:linear-gradient(100deg,#c9ad7c,#e0c99f 50%,#c5a875)}.square.dark{background:linear-gradient(100deg,#3f3024,#5c4835 50%,#493623)}.square{color:#171813;text-shadow:0 1px 0 #f7eac5,1px 2px 2px #0008}.square.selected{box-shadow:inset 0 0 0 3px #ffdc85,0 0 12px #eebc54}.square small{color:#5b492e}
.achievement-list{display:grid;gap:10px;margin:28px 0}.achievement-row{padding:14px;border:1px solid #b3996355;border-radius:8px;background:#0a1219db;color:#dfcc9e;font-size:14px}.progress-caption{color:#f6d89e;letter-spacing:.04em}.screen-settings>button{display:block;width:100%;margin:16px 0;min-height:56px}
@keyframes relic-glow{to{filter:drop-shadow(0 0 35px #ffbc5888);transform:translateY(-3px)}}@keyframes portal-pulse{to{opacity:.65;box-shadow:0 0 25px #ffd274,inset 0 0 25px #ffc056,0 0 60px #ef951b88}}
@media(min-width:760px){.screen{max-width:560px;padding-left:30px;padding-right:30px}.worlds{grid-template-columns:1fr}.world-card{min-height:220px}.world-card h2{font-size:28px}.game{max-width:410px;margin:0 auto}.screen>h1{font-size:36px}}
@media(max-width:359px){.screen{padding-left:16px;padding-right:16px}.title-hotspot{min-height:40px!important}.letter-paper{padding:16px}.game{margin-left:0;margin-right:0}.chessboard{width:calc(100% + 12px);margin-left:-6px}}
.square{font-size:0}.chess-piece{position:absolute;left:16%;top:3%;width:68%;height:94%;display:block;background-image:url('../assets/chess-pieces.webp');background-size:633.5714% 200%;background-repeat:no-repeat;pointer-events:none;filter:drop-shadow(1px 2px 1px #0008)}
.piece-k{--piece-x:1.6734%}.piece-q{--piece-x:23.427%}.piece-r{--piece-x:41.834%}.piece-b{--piece-x:61.245%}.piece-n{--piece-x:79.986%}.piece-p{--piece-x:100%}.piece-white{background-position:var(--piece-x) 0%}.piece-black{background-position:var(--piece-x) 100%}
.diagnostic{border-color:#b79451aa;background:radial-gradient(ellipse,#43433799,#0c1519ed);border-radius:10px;padding:16px;box-shadow:inset 0 0 25px #0008}.diagnostic>span{font-size:11px;color:#e1bb72}.diagnostic-image{display:block;width:100%;height:auto;margin:14px 0 0}.diagnostic-mode-2{border-color:#9fcdb0aa;box-shadow:inset 0 0 22px #789b7533}.diagnostic-mode-2>span{color:#b5e6ba}
/* Keep the field isotropic when fitting controls into a portrait viewport. */
.screen-play{padding-top:calc(10px + env(safe-area-inset-top));padding-bottom:calc(16px + env(safe-area-inset-bottom))}.screen-play>.eyebrow{display:none}.screen-play>h1{font-size:18px;line-height:1.15;margin:4px 0 12px}.screen-play>h1:after{display:none}.screen-play nav{margin-bottom:8px}.screen-play>.scene-banner{display:none}.screen-play .game>h2{font-size:19px;margin:2px 0 8px}.screen-play .hint{font-size:14px;line-height:1.35;margin:8px 0}.screen-play .hud{font-size:12px;line-height:1.5;min-height:36px;margin:4px 0 8px}.screen-play .game canvas{width:min(100%,calc((100svh - 510px)*.782609));height:auto;margin-inline:auto}.screen-play .zone-sector canvas{width:100%}.screen-play .zone-range canvas{width:min(100%,calc((100svh - 440px)*.782609))}.zone-sector{position:relative}.zone-sector .joystick{position:absolute;left:22px;bottom:110px;width:84px;height:84px;margin:0;background:radial-gradient(#c8ba9b66,#0d171ad9);box-shadow:inset 0 0 0 8px #121b1e88,0 0 15px #0008;border-color:#e2c07baa;z-index:2}.zone-sector .joystick span{font-size:32px}.screen-play .toolbar{margin:12px 0 2px}.screen-play .actions{margin:10px 0}.screen-play .game{padding:10px}
.pause-overlay{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom));background:#02070ce8;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.pause-panel{width:min(100%,350px);border:1px solid #b59c6b;border-radius:18px;padding:28px 22px 30px;background:radial-gradient(ellipse at 50% 0,#9a713d33,#0b1119 65%);box-shadow:inset 0 0 0 5px #080f15,0 0 40px #d29b3c18;text-align:center}.pause-panel h2{font-size:30px;color:#f3dba8;letter-spacing:.1em;margin-top:12px}.pause-panel button{display:block;width:100%;margin-top:18px}.pause-emblem{display:block;margin:auto;filter:drop-shadow(0 0 15px #d4a95a)}
@media(max-height:700px){.screen-play .game canvas{width:min(100%,210px)}.screen-play .zone-sector canvas{width:min(100%,260px)}.zone-sector .joystick{bottom:100px;width:70px;height:70px}}
.letter-photo{width:86%;height:150px;margin:5px auto 25px;border:7px solid #f7edda;background-image:url('../assets/adventure-atlas.webp');background-size:300% 300%;background-position:0% 50%;box-shadow:1px 4px 9px #3d291f66;transform:rotate(-3deg)}
