@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Noto+Sans+JP:wght@400;500;600;700&family=Noto+Serif+JP:wght@400;500;600;700&display=swap');
@import url('/dialog.css?v=101d29bd6b20');
:root{color-scheme:dark;--gold:#dba555;--gold-bright:#ffe2a3;--text:#f5ead5;--muted:#b6aea0;--serif:'Noto Serif JP',serif;--sans:'Noto Sans JP',sans-serif;--bg:#171519;--viewport-w:100vw;--viewport-h:100dvh;--hud-scale:1}*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden;background:#0b0c11;overscroll-behavior:none}body{font:14px var(--sans);color:var(--text)}button,input,select{font:inherit}button{color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}button:disabled{opacity:.5}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,#scene:focus-visible{outline:2px solid #ffe995;outline-offset:4px}.icon{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle;flex-shrink:0}button{touch-action:manipulation}#game-shell{position:fixed;inset:0;width:100%;height:100%;isolation:isolate;overflow:hidden;background:#151319}.game-panel{position:absolute;inset:0;overflow:hidden}#scene{position:absolute;inset:0;outline-offset:-5px}#game-canvas{width:100%;height:100%;display:block;touch-action:none}.scene-loading{position:absolute;inset:0;background:#171519;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:18px;z-index:25;color:#c6aa7e}.scene-loading strong{font:35px Cinzel,serif;letter-spacing:8px;color:#f0d096}.scene-loading>span:last-child{font-size:13px}.loader{width:25px;height:25px;border:1px solid #685137;border-top-color:#ffd492;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.vignette{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 50% 51%,transparent 48%,#08081085 100%),linear-gradient(#090911a0 0,transparent 21%,transparent 75%,#08080e9c 100%)}.game-hud{position:absolute;top:0;left:0;right:0;height:120px;padding:max(23px,env(safe-area-inset-top)) max(30px,env(safe-area-inset-right)) 0 max(30px,env(safe-area-inset-left));display:flex;justify-content:space-between;align-items:flex-start;pointer-events:none;z-index:5}.game-hud button{pointer-events:auto}.adventurer-hud{display:flex;align-items:center;gap:13px;border:0;background:transparent;padding:0;text-align:left;text-shadow:0 2px 5px #000}.portrait{display:block;width:65px;height:71px;background:radial-gradient(ellipse,#6f6246,#29252a 73%);border:2px solid #a8814c;border-radius:8px 8px 22px 22px;box-shadow:inset 0 0 0 2px #32281c,0 3px 10px #000a;overflow:hidden}.portrait img{width:100%;height:135%;object-fit:contain;image-rendering:pixelated;object-position:top center}.adventurer-stats{display:flex;flex-direction:column;gap:7px;min-width:140px}.name-line{display:flex;gap:17px;align-items:center}.name-line strong{font:600 17px var(--serif);letter-spacing:1px}.name-line small{font:12px Cinzel,serif;color:#d8c4a1}.hp-line{display:flex;gap:7px;align-items:center}.hp-line>.icon{width:13px;height:13px;fill:#a83c39;stroke:#e79b73}.health-track{display:block;width:111px;height:8px;border:1px solid #a59157;background:#231a17;padding:1px;border-radius:3px;box-shadow:0 2px 6px #0009}.health-track span{display:block;height:100%;width:100%;background:linear-gradient(#a3be68,#517f38);border-radius:1px;transition:width .2s}#hp-value{font:12px Cinzel,serif;white-space:nowrap}#hp-value em{display:none}#character-class{font:10px Cinzel,serif;letter-spacing:2px;color:#c1b090}.location-hud{position:absolute;top:20px;left:50%;transform:translateX(-50%);text-align:center;min-width:220px;text-shadow:0 2px 8px #000}.brand{font:15px Cinzel,serif;letter-spacing:5px;color:#d8bd8e}.room-line{display:flex;justify-content:center;align-items:center;gap:12px;margin-top:8px}.room-line>span{font:12px Cinzel,serif;border:1px solid #b69460;border-radius:2px;padding:3px 6px;background:#241e18a6;color:#f5dba9}h1{font:500 23px var(--serif);letter-spacing:3px;margin:0}#room-subtitle{display:block;font:9px Cinzel,serif;letter-spacing:2.5px;color:#c5b69c;margin-top:8px}.system-hud{display:flex;gap:13px;align-items:center}.round-button{display:grid;place-items:center;position:absolute;border:3px solid #f1b866;border-radius:50%;background:radial-gradient(circle at 38% 24%,#74715970,#242627d9 68%);box-shadow:0 0 0 1px #8e531d,inset 0 0 0 2px #7f5b31,inset 0 2px 5px #fff4,0 4px 8px #0007;color:#ffffe3;width:55px;height:55px;padding:0;backdrop-filter:blur(3px);user-select:none;-webkit-user-select:none}.round-button::after{content:'';position:absolute;inset:4px;border:1px solid #ffe0a155;border-radius:50%;pointer-events:none}.round-button:hover,.round-button:active{background-color:#ac763d88;border-color:#ffe4a8}.round-button:active{box-shadow:0 0 0 1px #8e531d,inset 0 3px 10px #0008}.round-button.small{position:relative;width:42px;height:42px;border-width:2px}.round-button.small .icon{width:18px;height:18px}.system-hud #pause{background:linear-gradient(145deg,#de914a,#8e4928);color:#fff8df}.objective-hud{position:absolute;z-index:4;top:117px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:13px;border:0;border-top:1px solid #d3b27044;border-bottom:1px solid #cbb47c44;background:linear-gradient(90deg,transparent,#18191bbb 17%,#18191bbb 83%,transparent);color:#dfd6c2;padding:8px 27px;font-size:13px;white-space:nowrap;text-shadow:0 1px 4px #000}.quest-gem{color:#e8bd70;font-size:20px}#quest-fraction{color:#e6c28a;font:12px Cinzel,serif;letter-spacing:1px}.joystick-zone{position:absolute;bottom:max(31px,env(safe-area-inset-bottom));left:max(38px,env(safe-area-inset-left));z-index:6;text-align:center;user-select:none;-webkit-user-select:none;touch-action:none}.joystick{position:relative;width:142px;height:142px;border:6px solid #eaaa56;border-radius:50%;box-shadow:0 0 0 1px #955921,inset 0 0 0 2px #745837,inset 0 0 30px #0005,0 4px 12px #0008;background:radial-gradient(circle at 48% 35%,#74705744,#1c211f99);touch-action:none;backdrop-filter:blur(2px)}.joystick::before{content:'';position:absolute;inset:-3px;border:1px solid #ffe8b1;border-radius:50%;pointer-events:none}.stick-knob{width:46px;height:46px;position:absolute;left:50%;top:50%;margin-left:-23px;margin-top:-23px;border:4px solid #fff665;border-radius:50%;background:radial-gradient(circle at 37% 29%,#fff,#f7f6d2);box-shadow:0 0 0 2px #fffdf0,0 2px 6px #0008;pointer-events:none;will-change:transform}.stick-axis{position:absolute;left:50%;top:50%;background:#e6d6a325;transform:translate(-50%,-50%)}.stick-axis.horizontal{height:1px;width:95px}.stick-axis.vertical{width:1px;height:95px}.stick-direction{position:absolute;background:none;border:0;color:#f2e7c27a;font-size:11px;width:32px;height:32px;padding:0;z-index:2;touch-action:none}.stick-direction.north{left:calc(50% - 16px);top:0}.stick-direction.east{right:0;top:calc(50% - 16px)}.stick-direction.south{left:calc(50% - 16px);bottom:0}.stick-direction.west{left:0;top:calc(50% - 16px)}.stick-stud{width:5px;height:5px;position:absolute;border-radius:100%;background:linear-gradient(145deg,#ffe7a6,#965b26);box-shadow:0 1px 2px #0009}.stud-1{top:1px;left:calc(50% - 2px)}.stud-2{bottom:1px;left:calc(50% - 2px)}.stud-3{top:calc(50% - 2px);left:1px}.stud-4{top:calc(50% - 2px);right:1px}.controller-label{display:block;font-size:12px;letter-spacing:3px;color:#e9d9b5;text-shadow:0 2px 6px #000;margin-top:13px}.controller-label kbd{font:9px var(--sans);margin-left:6px;letter-spacing:2px;color:#bdbaa8}.action-zone{position:absolute;width:193px;height:175px;bottom:max(38px,env(safe-area-inset-bottom));right:max(39px,env(safe-area-inset-right));z-index:6}.action-main{width:91px;height:91px;border-width:5px;bottom:8px;right:0;background:radial-gradient(circle,#77755345,#212323b8 65%)}.action-main .action-inner{display:grid;place-items:center;border:4px solid #fff476;border-radius:50%;width:59px;height:59px;background:#252a23d9;box-shadow:0 0 0 1px #fff9b3,0 0 8px #ffdf7544}.action-inner .icon{width:28px;height:28px;stroke-width:1.9;color:#fff9d8}.action-caption{position:absolute;bottom:-30px;left:50%;transform:translateX(-50%);font-size:12px;white-space:nowrap;letter-spacing:2px;color:#e7d5af;text-shadow:0 2px 5px #000}.action-caption kbd{font:9px var(--sans);color:#b6b5a1}.action-map{top:0;right:10px;width:55px;height:55px}.action-journal{top:47px;left:19px;width:55px;height:55px}.action-bag{bottom:0;left:0;width:56px;height:56px}.action-zone .icon{width:26px;height:26px}.count{position:absolute;bottom:-2px;right:0;min-width:16px;padding:1px 3px;background:#795329;border:1px solid #dfb26d;border-radius:50%;font:9px var(--sans);color:#fff6d8}.scene-caption{position:absolute;bottom:32px;left:230px;right:258px;z-index:4;display:flex;gap:8px;justify-content:center;align-items:center;color:#dfd7c4;font-size:13px;line-height:1.8;text-align:center;text-shadow:0 2px 8px #000;pointer-events:none}.caption-diamond{color:#d3ac68;font-size:20px}.save-status{position:absolute;bottom:10px;left:50%;transform:translateX(-50%);color:#bfb29680;font-size:10px;z-index:3;white-space:nowrap}.save-status .icon{width:12px;height:12px;margin-right:5px}.camera-controls{position:absolute;right:32px;top:95px;display:flex;gap:4px;z-index:6}.glass-icon{display:grid;place-items:center;width:31px;height:30px;border:1px solid #ac936743;border-radius:3px;background:#2222246b;color:#daceb4}.glass-icon .icon{width:15px;height:15px}.minimap-shell{position:absolute;top:138px;right:30px;width:188px;padding:13px;border:1px solid #b69966;background:#1a1b22eb;border-radius:5px;z-index:9;box-shadow:0 8px 30px #0008;backdrop-filter:blur(8px)}.minimap-title{display:flex;align-items:center;gap:7px;font-size:12px;color:#ddcda8}.minimap-title>span:last-child{margin-left:auto;font-size:10px}#minimap{width:100%;height:auto}.minimap-footer{display:flex;justify-content:space-between;font-size:10px;align-items:center;color:#bdbea7}.minimap-footer button{background:none;border:0;color:#dfc892;font-size:11px}.object-label{position:absolute;transform:translate(-50%,-120%);background:#24202adb;border:1px solid #c6a26b80;color:#eddbb4;border-radius:3px;padding:6px 10px;font-size:12px;white-space:nowrap;z-index:3;box-shadow:0 3px 10px #0006;text-shadow:0 1px 3px #000}.object-label:after{content:'';position:absolute;bottom:-4px;left:calc(50% - 3px);width:5px;height:5px;transform:rotate(45deg);background:#24202a;border-right:1px solid #c6a26b80;border-bottom:1px solid #c6a26b80}.object-label.done{color:#b6c795;border-color:#6f895b}.object-label.locked{color:#aca397;border-color:#756959}.location-toast{position:absolute;left:50%;top:29%;transform:translateX(-50%);font:26px var(--serif);color:#fff0cc;letter-spacing:5px;text-shadow:0 4px 15px #000;opacity:0;transition:opacity .5s;pointer-events:none}.location-toast.visible{opacity:1}.icon-btn{display:grid;place-items:center;width:34px;height:34px;background:transparent;border:0;color:#c9b894}.dialog-close{z-index:2}dialog{background:linear-gradient(135deg,#272429,#1b1b22);border-color:#8e744a;max-height:calc(var(--viewport-h) - 36px);width:min(620px,calc(var(--viewport-w) - 40px));max-width:none;position:fixed;inset:auto;left:50%;top:50%;margin:0;transform:translate(-50%,-50%)}dialog::backdrop{background:#080910ae;backdrop-filter:blur(6px)}.dialog-inner{padding:30px}.dialog-title{font-size:24px}.dialog-description{color:#c2bbae;font-size:14px;line-height:1.9}.dialog-eyebrow{color:#d6b981}.note-entry{background:#302b2c;border-color:#68563e}.note-entry p{color:#c1b7a7;font-size:14px}.clue-paper{background:linear-gradient(135deg,#453a2b,#302a26);border-color:#826943;color:#ead6ad;font-size:15px}.primary-button{background:linear-gradient(#e0bb79,#bc8b48);border-color:#f4d395;color:#2b2118}.secondary-button{background:#3c3530;border-color:#7b6445;color:#e1cb9f}.symbol-button{background:#3a3330;border-color:#997a50;color:#eed195}.symbol-button.active{background:#817049;border-color:#f0d38e}.symbol-button small{color:#cfc0a1}.generation-note{color:#a99f8d;font-size:12px;line-height:1.75}.form-field input{background:#19191e;border-color:#726247;color:#ede3d3}.character-option{background:radial-gradient(circle,#585041,#29272a);border-color:#6f624c}.character-option.selected{background:radial-gradient(circle,#7b6748,#3b3330);border-color:#dfb678}.button-row{margin-top:20px}.menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.menu-item{display:flex;align-items:center;gap:10px;background:#36302e;border:1px solid #66543d;padding:15px;text-align:left;border-radius:4px;font-size:14px;color:#e4d4b7}.menu-item .icon{color:#d9b67d}.quest-list{list-style:none;padding:0;display:flex;flex-direction:column;gap:14px;font-size:15px;line-height:1.8}.quest-list li{display:flex;gap:12px;align-items:center;color:#b5aea1}.quest-list li.done{color:#bfd08e}.quest-list li.current{color:#f4d595}.quest-list .check{display:grid;place-items:center;width:22px;height:22px;border:1px solid #9d845b;border-radius:50%;font-size:12px;flex-shrink:0}#toast{position:absolute;bottom:90px;max-width:calc(100% - 380px);background:#342c24f2;border-color:#c19a5e;color:#f2deb7;z-index:60;font-size:13px;line-height:1.65;padding:11px 20px;min-width:220px}.puzzle-feedback{color:#ecc481}.reward-stats{border-color:#7b6745}.reward-stats>div+div{border-color:#7b6745}.reward-stats span{color:#b4aa97}.form-field{color:#c6bba7}.color-option{border-color:#252229}button:hover{filter:brightness(1.12)}
/* Compact controls for short screens and phones. */
#game-shell.compact .game-hud{padding:14px 22px 0;height:78px}#game-shell.compact .portrait{width:44px;height:49px;border-radius:6px 6px 15px 15px}#game-shell.compact .adventurer-hud{gap:9px}#game-shell.compact .adventurer-stats{gap:4px;min-width:110px}#game-shell.compact .name-line strong{font-size:14px}#game-shell.compact .name-line small{font-size:10px}#game-shell.compact .name-line{gap:11px}#game-shell.compact .health-track{width:86px;height:7px}#game-shell.compact #hp-value{font-size:10px}#game-shell.compact #character-class{font-size:8px;letter-spacing:1px}#game-shell.compact .location-hud{top:12px}#game-shell.compact .brand{font-size:11px;letter-spacing:4px}#game-shell.compact .room-line{margin-top:5px;gap:8px}#game-shell.compact h1{font-size:18px;letter-spacing:2px}#game-shell.compact #room-subtitle{font-size:7px;letter-spacing:1.8px;margin-top:5px}#game-shell.compact .room-line>span{font-size:10px;padding:2px 4px}#game-shell.compact .round-button.small{width:34px;height:34px}#game-shell.compact .system-hud{gap:9px}#game-shell.compact .objective-hud{top:81px;font-size:11px;padding:4px 20px;gap:9px}#game-shell.compact .quest-gem{font-size:15px}#game-shell.compact #quest-fraction{font-size:10px}#game-shell.compact .camera-controls{top:65px;right:23px;gap:3px}#game-shell.compact .glass-icon{width:24px;height:24px}#game-shell.compact .glass-icon .icon{width:12px;height:12px}#game-shell.compact .joystick-zone{bottom:23px;left:max(30px,env(safe-area-inset-left))}#game-shell.compact .joystick{width:112px;height:112px;border-width:5px}#game-shell.compact .stick-knob{width:36px;height:36px;margin-left:-18px;margin-top:-18px;border-width:3px}#game-shell.compact .stick-axis.horizontal{width:76px}#game-shell.compact .stick-axis.vertical{height:76px}#game-shell.compact .controller-label{font-size:10px;margin-top:9px;letter-spacing:2px}#game-shell.compact .controller-label kbd{display:none}#game-shell.compact .action-zone{width:158px;height:133px;right:max(26px,env(safe-area-inset-right));bottom:28px}#game-shell.compact .action-main{width:74px;height:74px;border-width:4px;bottom:6px}#game-shell.compact .action-inner{width:47px;height:47px;border-width:3px}#game-shell.compact .action-caption{bottom:-25px;font-size:10px}#game-shell.compact .action-caption kbd{display:none}#game-shell.compact .action-map{width:43px;height:43px;right:8px}#game-shell.compact .action-journal{width:43px;height:43px;top:38px;left:12px}#game-shell.compact .action-bag{width:45px;height:45px}#game-shell.compact .action-zone .icon{width:22px;height:22px}#game-shell.compact .scene-caption{bottom:15px;left:161px;right:195px;font-size:11px;gap:6px}#game-shell.compact .save-status{display:none}#game-shell.compact .object-label{font-size:11px;padding:5px 8px}#game-shell.compact .minimap-shell{top:105px;right:22px;width:157px;padding:10px}#game-shell.compact .location-toast{font-size:21px}#game-shell.compact .dialog-inner{padding:22px 27px}#game-shell.compact .dialog-title{font-size:21px;margin-bottom:12px}#game-shell.compact .dialog-description{font-size:13px;line-height:1.8;margin-bottom:14px}#game-shell.compact .dialog-eyebrow{font-size:10px;margin-bottom:9px}#game-shell.compact .character-option img{height:80px}#game-shell.compact .character-options{margin:10px 0 16px}#game-shell.compact .character-option{font-size:11px}#game-shell.compact .form-field{margin-bottom:13px}#game-shell.compact .puzzle-controls{margin:17px 0}#game-shell.compact .symbol-button{height:68px;width:61px}#game-shell.compact .button-row{margin-top:15px}#game-shell.compact .primary-button,#game-shell.compact .secondary-button{padding:10px 15px;font-size:13px}#game-shell.compact #toast{bottom:65px;max-width:calc(100% - 280px);font-size:12px;min-width:180px;padding:9px 14px}#game-shell.tiny .objective-hud{top:70px}#game-shell.tiny #room-subtitle{display:none}#game-shell.tiny .joystick-zone{transform:scale(.85);transform-origin:bottom left;bottom:15px}#game-shell.tiny .action-zone{transform:scale(.85);transform-origin:bottom right;bottom:22px}#game-shell.tiny .scene-caption{font-size:10px;left:150px;right:165px}#game-shell.tiny .camera-controls{top:57px}#game-shell.tiny .minimap-shell{top:90px;width:137px}@media(prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;transition:none!important}}

/* Portrait keeps the world upright and gives each thumb its own lower corner. */
#game-shell.portrait-mode .game-hud{height:140px;padding:max(16px,env(safe-area-inset-top)) 17px 0;align-items:flex-start}
#game-shell.portrait-mode .adventurer-hud{gap:9px;max-width:calc(100% - 98px)}
#game-shell.portrait-mode .portrait{width:46px;height:53px}
#game-shell.portrait-mode .adventurer-stats{min-width:0;max-width:160px;gap:6px}
#game-shell.portrait-mode .name-line{gap:10px;min-width:0}
#game-shell.portrait-mode .name-line strong{font-size:15px;max-width:104px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#game-shell.portrait-mode .health-track{width:94px}
#game-shell.portrait-mode .location-hud{top:max(87px,calc(env(safe-area-inset-top) + 73px));width:calc(100% - 110px);min-width:0}
#game-shell.portrait-mode .brand{font-size:10px;letter-spacing:4px}
#game-shell.portrait-mode .room-line{margin-top:6px}
#game-shell.portrait-mode h1{font-size:20px;letter-spacing:2px;white-space:nowrap}
#game-shell.portrait-mode #room-subtitle{display:none}
#game-shell.portrait-mode .system-hud{gap:9px}
#game-shell.portrait-mode .round-button.small{width:38px;height:38px}
#game-shell.portrait-mode .objective-hud{top:max(146px,calc(env(safe-area-inset-top) + 132px));width:calc(100% - 30px);max-width:470px;justify-content:center;white-space:normal;padding:8px 12px;font-size:12px;gap:9px}
#game-shell.portrait-mode #quest-title{overflow-wrap:anywhere}
#game-shell.portrait-mode #quest-fraction{white-space:nowrap;font-size:11px}
#game-shell.portrait-mode .camera-controls{top:max(84px,calc(env(safe-area-inset-top) + 70px));right:15px;flex-direction:column;gap:3px}
#game-shell.portrait-mode .glass-icon{width:27px;height:27px}
#game-shell.portrait-mode .joystick-zone{left:22px;bottom:max(35px,calc(env(safe-area-inset-bottom) + 20px));transform:none}
#game-shell.portrait-mode .joystick{width:116px;height:116px;border-width:5px}
#game-shell.portrait-mode .stick-knob{width:38px;height:38px;margin-left:-19px;margin-top:-19px}
#game-shell.portrait-mode .controller-label{font-size:11px;margin-top:11px}
#game-shell.portrait-mode .controller-label kbd{display:none}
#game-shell.portrait-mode .action-zone{width:157px;height:147px;right:21px;bottom:max(41px,calc(env(safe-area-inset-bottom) + 26px));transform:none}
#game-shell.portrait-mode .action-main{width:78px;height:78px;bottom:3px}
#game-shell.portrait-mode .action-inner{width:49px;height:49px}
#game-shell.portrait-mode .action-caption{font-size:11px;bottom:-28px}
#game-shell.portrait-mode .action-map{width:47px;height:47px;right:11px;top:0}
#game-shell.portrait-mode .action-journal{width:46px;height:46px;top:44px;left:13px}
#game-shell.portrait-mode .action-bag{width:47px;height:47px;left:0;bottom:1px}
#game-shell.portrait-mode .scene-caption{left:25px;right:25px;bottom:max(205px,calc(env(safe-area-inset-bottom) + 190px));font-size:12px;line-height:1.8;padding:7px 10px;background:linear-gradient(90deg,transparent,#15151abc 16%,#15151abc 84%,transparent);border-radius:4px}
#game-shell.portrait-mode .save-status{display:none}
#game-shell.portrait-mode .minimap-shell{top:max(196px,calc(env(safe-area-inset-top) + 182px));right:17px;width:180px}
#game-shell.portrait-mode .location-toast{top:34%;font-size:22px;letter-spacing:3px}
#game-shell.portrait-mode #toast{bottom:max(255px,calc(env(safe-area-inset-bottom) + 240px));max-width:calc(100% - 38px);width:max-content;min-width:0;font-size:13px}
#game-shell.portrait-mode dialog{width:calc(100vw - 28px);max-width:620px;max-height:calc(var(--viewport-h) - 28px)}
#game-shell.portrait-mode .dialog-inner{padding:32px 22px 24px}
#game-shell.portrait-mode .dialog-title{font-size:22px;line-height:1.6}
#game-shell.portrait-mode .dialog-description{font-size:14px;line-height:1.9}
#game-shell.portrait-mode .menu-grid{gap:9px}
#game-shell.portrait-mode .menu-item{padding:13px 10px;gap:7px;font-size:13px}
#game-shell.portrait-mode .character-options{grid-template-columns:repeat(2,1fr);gap:10px}
#game-shell.portrait-mode .character-option img{height:110px}
#game-shell.portrait-mode .character-option{font-size:12px}
#game-shell.portrait-mode .button-row{flex-wrap:wrap;gap:9px}
#game-shell.portrait-mode .symbol-button{width:68px;height:82px}
@media(max-width:360px) and (orientation:portrait){#game-shell.portrait-mode .joystick-zone{left:16px}#game-shell.portrait-mode .joystick{width:102px;height:102px}#game-shell.portrait-mode .action-zone{right:16px;width:141px}#game-shell.portrait-mode .scene-caption{left:13px;right:13px;font-size:11px}#game-shell.portrait-mode .adventurer-stats{max-width:130px}#game-shell.portrait-mode .name-line strong{max-width:80px}}

/* Orbit controls remain separate from walking and fit both screen orientations. */
.camera-controls{flex-direction:column;gap:7px;align-items:center}
.camera-toolbar{display:flex;align-items:center;gap:5px}
.camera-controls .glass-icon{min-height:34px;min-width:34px;height:34px;width:34px}
.camera-controls .reset-view{display:flex;align-items:center;justify-content:center;gap:7px;width:auto;min-width:126px;padding:0 12px;color:#f0dcaf;background:#242127c9;border-color:#bc985c80;font-size:13px;white-space:nowrap}
.orbit-help{font-size:10px;letter-spacing:.3px;color:#d1bf9be0;text-shadow:0 1px 5px #000;pointer-events:none;white-space:nowrap}
#game-canvas.orbiting{cursor:grabbing!important}
#game-shell.compact .camera-controls{gap:5px}
#game-shell.compact .camera-controls .glass-icon{min-width:29px;min-height:29px;width:29px;height:29px}
#game-shell.compact .camera-controls .reset-view{width:auto;min-width:105px;padding:0 8px;font-size:11px;gap:5px}
#game-shell.compact .orbit-help{font-size:9px}
#game-shell.portrait-mode .camera-controls{top:max(199px,calc(env(safe-area-inset-top) + 185px));left:50%;right:auto;transform:translateX(-50%);flex-direction:column;gap:7px}
#game-shell.portrait-mode .camera-controls .glass-icon{height:35px;min-height:35px;width:35px;min-width:35px}
#game-shell.portrait-mode .camera-controls .reset-view{width:132px;font-size:13px;gap:7px}
#game-shell.portrait-mode .orbit-help{font-size:10px}
#game-shell.portrait-mode .minimap-shell{top:max(262px,calc(env(safe-area-inset-top) + 248px))}
#game-shell.portrait-mode .location-toast{top:36%}
@media(min-width:681px) and (max-height:460px){#game-shell.compact .camera-controls{top:58px}}

/* Chest opening: transparent stage first, then an explicit reward handoff. */
.chest-celebration{position:fixed;inset:0;transform:none;margin:0;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;border:0;padding:24px;background:transparent;color:#fff1bc;display:none;align-items:flex-end;justify-content:center;overflow:auto}
.chest-celebration[open]{display:flex}
.chest-celebration::backdrop{background:rgba(3,12,8,.12)}
.chest-reward{opacity:0;transform:translateY(22px);pointer-events:none;width:min(100%,540px);text-align:center;padding:24px;border:1px solid #ddc67d;border-radius:16px;background:linear-gradient(155deg,rgba(25,47,32,.97),rgba(7,18,13,.98));box-shadow:0 0 65px #d7b66044;transition:opacity .6s,transform .6s}
.chest-celebration.revealed .chest-reward{opacity:1;transform:none;pointer-events:auto}
.chest-reward h2{font-size:clamp(22px,5vw,32px);margin:14px 0}.chest-reward p{font-size:16px;margin:12px 0}.chest-reward .primary-button{width:100%;margin-top:12px;min-height:48px}.chest-light-count strong{font-size:28px;margin-left:12px;color:#ffe59b}
@media(max-height:500px){.chest-celebration{align-items:center;padding:12px}.chest-reward{padding:16px}.chest-reward h2{margin:8px 0}.chest-reward p{margin:6px 0}}
@media(prefers-reduced-motion:reduce){.chest-reward{transition:none;transform:none}}
