:root{font-family:"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;color:#f3ecd7;font-size:16px;background:#112b2b;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button{font:inherit;cursor:pointer;color:inherit;touch-action:manipulation}button:focus-visible{outline:3px solid #ffe38b;outline-offset:4px}button:disabled{opacity:.35;cursor:default}#game{height:100svh;min-height:660px;position:relative;overflow:hidden;background:radial-gradient(ellipse at 52% 32%,#819381 0,#426459 42%,#142f31 100%)}#scene{width:100%;height:100%;display:block;touch-action:none}.vignette{position:absolute;inset:0;box-shadow:inset 0 0 130px #09252b80;pointer-events:none}header{position:absolute;top:27px;left:34px;right:34px;display:flex;align-items:center;gap:22px}.brand{display:flex;gap:13px;align-items:center}.emblem{color:#e5c275;font-size:41px}h1{font-family:serif;font-size:29px;letter-spacing:.16em;margin:0;font-weight:500}.brand small{font-size:12px;letter-spacing:.16em;color:#b7c6b9}.chapter{margin-left:auto;text-align:right;border-right:1px solid #b8cbb64d;padding-right:22px}.chapter small{display:block;font-size:12px;color:#cad1bf;margin-bottom:4px}.chapter strong{font-size:16px;letter-spacing:.1em}.round{border:1px solid #b9c7b269;background:#18332fc9;width:38px;height:38px;border-radius:50%;font-family:serif;font-size:22px}.objective{position:absolute;left:36px;top:125px;border-left:2px solid #e7c47b;padding:5px 0 4px 16px;text-shadow:0 2px 8px #082923}.eyebrow{font-size:12px;letter-spacing:.18em;color:#efcb81}h2{font-size:20px;letter-spacing:.08em;font-weight:500;margin:6px 0 8px}.objective p{font-size:14px;color:#d7e0d0;margin:0}.objective b{color:#f8d48b;margin-left:18px}.phase{position:absolute;right:36px;top:127px;letter-spacing:.17em;color:#f2d69a;font-size:12px;text-align:right}.phase span{display:block;letter-spacing:.1em;font-size:18px;color:#fff5d8;margin-top:5px}.camera{position:absolute;right:30px;bottom:192px;display:flex;gap:5px}.camera button{background:#183430cc;border:1px solid #829e8455;width:37px;height:37px;border-radius:5px;font-size:20px}.bottom{position:absolute;bottom:42px;left:30px;right:30px;display:flex;gap:12px}.hero-card,.command-card{background:linear-gradient(120deg,#132d2cf2,#102727f5);border:1px solid #bea86c7a;box-shadow:0 10px 30px #071c2855;border-radius:8px}.hero-card{display:flex;width:285px;padding:16px;gap:10px;align-items:center;flex-shrink:0}.portrait{width:76px;height:84px;background:radial-gradient(#739b6540,#0b242900);overflow:hidden;flex-shrink:0}.portrait img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}.stats{flex:1}.name{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.name strong{font-size:20px;letter-spacing:.08em}.name span{color:#e6c480;font-size:14px}.hp-label{display:flex;justify-content:space-between;font-size:12px;margin-bottom:5px;color:#d2e0cc}.bar{height:6px;background:#071d22;border-radius:5px;overflow:hidden}.bar i{display:block;height:100%;width:100%;background:linear-gradient(90deg,#5cb299,#acdf9f);transition:width .3s}.exp-row{display:flex;justify-content:space-between;font-size:12px;margin-top:10px;color:#9cbcaf}.exp-row span:last-child{color:#e9c77c}.command-card{padding:13px 18px;flex:1}.command-card p{font-size:14px;color:#cedaca;margin:0 0 11px}.commands{display:grid;grid-template-columns:repeat(5,1fr);gap:7px}.commands button{border:1px solid #69837877;background:#27403b;color:#e5eedc;border-radius:5px;padding:8px 5px;font-size:14px;white-space:nowrap}.commands button span{margin-right:7px;color:#e5c57b}.commands small{font-size:12px;display:block;margin-top:5px;color:#99b2a8}.commands button.active{background:#426155;border-color:#f0d18d;box-shadow:inset 0 0 13px #ccbe6b19}.commands button:hover:not(:disabled){background:#486255}footer{position:absolute;bottom:13px;left:32px;right:32px;display:flex;justify-content:space-between;color:#aac0ad88;font-size:10px;letter-spacing:.14em;pointer-events:none}#toast{position:absolute;top:92px;left:50%;transform:translateX(-50%);background:#122e2eef;border:1px solid #bca77377;border-radius:5px;padding:10px 20px;font-size:14px;max-width:85%;text-align:center;opacity:0;transition:opacity .2s;pointer-events:none;z-index:8}#toast.show{opacity:1}.modal{position:absolute;inset:0;background:#09272c80;backdrop-filter:blur(5px);display:flex;align-items:center;justify-content:center;z-index:10;padding:18px}.modal.hidden{display:none}.dialog{max-width:560px;width:100%;max-height:88%;overflow:auto;border:1px solid #d5bb7b96;background:linear-gradient(140deg,#203c38,#0f2729);padding:34px;border-radius:11px;box-shadow:0 25px 100px #001e27b0}.dialog .eyebrow{display:block}.dialog h2{font-family:serif;font-size:32px;margin:12px 0 20px}.dialog p{line-height:1.9;color:#d3ddce;font-size:16px}.dialog .quote{border-left:2px solid #cfb77b;padding-left:17px;color:#ffe4a6}.primary,.secondary{width:100%;padding:13px;border-radius:5px;margin-top:12px}.primary{border:1px solid #e4c381;background:#d9bc78;color:#142c29;font-weight:bold}.secondary{border:1px solid #728d7d;background:#26453b;color:#e2ebd9}.shop-line{display:flex;align-items:center;gap:12px;border-top:1px solid #63807055;padding:15px 0}.shop-line>div{flex:1}.shop-line small{display:block;color:#9eb6a5;margin-top:4px;font-size:13px}.shop-line button{padding:8px 15px;border:1px solid #bda875;background:#385243;border-radius:4px}.balance{color:#edd096!important}.tip{font-size:13px!important;color:#9fbdac!important}.rewards{display:flex;gap:10px;margin:23px 0}.rewards div{flex:1;border:1px solid #b5ad6b55;padding:14px;text-align:center;border-radius:5px;color:#eccc82}.rewards small{display:block;color:#a7bca8;font-size:12px;margin-bottom:7px}.keys{display:grid;grid-template-columns:70px 1fr;gap:10px;font-size:14px;line-height:1.6;color:#d2dfce}.keys b{color:#e7c887}.floater{position:absolute;pointer-events:none;font-weight:bold;font-size:25px;text-shadow:0 2px 2px #1b2821;color:#ffedb0;animation:float 1s ease-out forwards;z-index:3}@keyframes float{to{transform:translateY(-70px);opacity:0}}
@media(min-width:1350px){.bottom{max-width:1120px;left:50%;right:auto;transform:translateX(-50%);width:calc(100% - 60px)}}@media(max-width:760px){#game{min-height:720px}header{top:19px;left:18px;right:18px;gap:10px}h1{font-size:23px}.brand small{font-size:10px}.emblem{font-size:31px}.chapter{padding-right:12px}.chapter small{display:none}.chapter strong{font-size:13px}.objective{left:19px;top:100px;padding-left:11px}.objective h2{font-size:17px}.objective p{font-size:12px}.phase{right:20px;top:105px;font-size:10px}.phase span{font-size:14px}.bottom{left:12px;right:12px;bottom:27px;flex-direction:column;gap:6px}.hero-card{width:100%;padding:8px 13px;gap:12px}.portrait{width:47px;height:54px}.stats{display:grid;grid-template-columns:1fr 1fr;column-gap:20px}.name{margin-bottom:3px}.name strong{font-size:17px}.hp-label{grid-column:2;grid-row:1;align-self:center}.bar{grid-column:2;grid-row:2;align-self:center}.exp-row{grid-column:1;grid-row:2;margin-top:0;font-size:11px;gap:15px}.command-card{padding:10px}.command-card p{font-size:12px;min-height:18px;margin-bottom:8px}.commands{gap:4px}.commands button{font-size:12px;padding:8px 0}.commands button span{display:block;margin:0 0 4px;font-size:17px}.commands small{font-size:10px;margin-top:5px}.camera{bottom:244px;right:13px}.camera button{width:32px;height:32px}footer{font-size:8px;left:15px;right:15px;bottom:8px}footer span{display:none}.dialog{padding:24px}.dialog h2{font-size:27px}.dialog p{font-size:14px}#toast{top:163px;font-size:12px;width:max-content}}@media(max-height:650px) and (min-width:761px){#game{min-height:560px}.objective{top:90px}.phase{top:95px}.bottom{bottom:26px}.camera{bottom:170px}}
.menu-button{background:#18332fe6;border:1px solid #bca77399;border-radius:5px;font-size:14px;padding:10px 14px}.bag-status{display:flex;gap:16px;align-items:center;background:#0b232780;padding:14px;border:1px solid #78978955}.bag-status img{width:72px;height:80px;object-fit:contain;image-rendering:pixelated}.bag-status strong{display:block;font-size:18px;color:#edd399}.bag-status span{display:block;margin-top:8px;color:#d4dfce;font-size:14px}.bag-tabs{display:flex;gap:8px;margin-top:18px}.bag-tabs button{flex:1;padding:10px;border:1px solid #a9915c;background:#1c3532;border-radius:3px;font-size:16px}.bag-tabs button[aria-selected=true]{background:#d6ba79;color:#183029}.bag-message{min-height:24px;color:#ebd18f!important;font-size:14px!important;margin:10px 0!important}@media(max-width:760px){.menu-button{font-size:12px;padding:8px}.chapter{display:none}.brand{margin-right:auto}.bag-status{padding:10px;gap:8px}.bag-status span{font-size:12px}.bag-status strong{font-size:16px}.bag-status img{width:54px;height:65px}}
#game{background-image:linear-gradient(180deg,#173b3440,#122f3440 55%,#102d30c9),url('woodland.png');background-size:cover;background-position:center}.vignette{box-shadow:inset 0 0 100px #09252b55}
.dialog{max-width:760px}.world-summary{margin:0 0 15px!important}.world-actions{display:flex;gap:10px}.world-actions button,.member-tabs button{border:1px solid #9b966b;background:#304e41;padding:10px;border-radius:4px;font-size:14px}.world-actions button{flex:1}.stage-list{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:20px 0}.stage-node{display:flex;align-items:center;gap:12px;border:1px solid #75897488;background:#173b35;padding:12px;text-align:left;border-radius:5px}.stage-node>b{font-family:serif;font-size:22px;color:#d3b873}.stage-node>span{flex:1;font-size:14px}.stage-node small{display:block;color:#aebdaf;font-size:12px;margin-top:6px}.stage-node em{font-size:12px;font-style:normal;color:#dec388}.stage-node.next{border-color:#ecd494;background:#365943}.stage-node.cleared{border-color:#82b69d88}.roster-preview{display:flex;justify-content:space-evenly;gap:6px;margin:15px 0}.roster-preview>div{text-align:center}.roster-preview img{display:block;width:95px;height:100px;object-fit:contain;image-rendering:pixelated}.roster-preview b{display:block;font-size:15px}.roster-preview small{display:block;font-size:12px;color:#b5c6b5;margin-top:6px}.member-tabs{display:flex;gap:6px;margin-bottom:15px}.member-tabs .selected{background:#c7b078;color:#112b2b}.party-strip{position:absolute;bottom:194px;left:30px;display:flex;gap:6px;max-width:calc(100% - 290px)}.party-strip button{display:flex;align-items:center;padding:5px 10px 5px 3px;background:#102c2de8;border:1px solid #698877;border-radius:5px;text-align:left;font-size:14px}.party-strip button.selected{border-color:#f0d084;background:#375443}.party-strip img{width:45px;height:47px;object-fit:contain;image-rendering:pixelated}.party-strip small{display:block;font-size:11px;color:#b7cbb6;margin-top:5px}.turn-controls{position:absolute;right:30px;bottom:194px;display:flex;gap:8px}.turn-controls button{padding:12px 14px;border-radius:5px;border:1px solid #b8a971;background:#d6bc7c;color:#193732;font-weight:bold;font-size:14px}.turn-controls button:first-child{background:#203b37;color:#d8dec7}.camera{bottom:261px}.unit-stats{font-size:12px;color:#e0d8b5;margin-top:8px;white-space:nowrap}.hero-card{width:315px}.target-info{position:absolute;right:32px;top:194px;white-space:pre-line;background:#123331ee;border:1px solid #b0a572;padding:12px;line-height:1.7;font-size:13px;border-radius:5px;max-width:290px}.hidden{display:none}.commands button{white-space:normal}
@media(max-width:760px){.dialog{padding:20px}.stage-list{grid-template-columns:1fr;gap:7px;margin:12px 0}.stage-node{padding:10px}.party-strip{left:12px;right:12px;max-width:none;bottom:258px;overflow-x:auto}.party-strip button{flex:1;min-width:92px;padding:4px;font-size:12px}.party-strip img{width:30px;height:36px}.party-strip small{font-size:10px}.hero-card{width:100%}.unit-stats{grid-column:1/3;grid-row:3;text-align:center;font-size:12px;margin-top:5px}.turn-controls{right:12px;bottom:311px}.turn-controls button{padding:8px 12px;font-size:12px}.camera{left:12px;right:auto;bottom:311px}.target-info{right:12px;top:175px;max-width:225px;font-size:12px;padding:8px}.roster-preview img{width:65px;height:76px}.roster-preview b{font-size:13px}.roster-preview small{font-size:10px}.member-tabs button{padding:8px;font-size:12px}.world-actions button{font-size:13px}#game{min-height:780px}.bottom{bottom:27px}.command-card p{max-height:35px;overflow:auto}.objective{max-width:65%}}
.selection-arrow{position:absolute;z-index:4;pointer-events:none;color:#ffe390;font-size:24px;text-shadow:0 2px 2px #2e301a;transform:translate(-50%,-100%);animation:arrow-bob .7s ease-in-out infinite alternate}@keyframes arrow-bob{to{margin-top:-7px}}
.world-mode .bottom,.world-mode .party-strip,.world-mode .turn-controls,.world-mode .camera,.world-mode .objective,.world-mode .phase,.world-mode .target-info,.world-mode footer{display:none}.world-mode header{z-index:5}.world-mode .chapter{display:none}.world-mode .brand{margin-right:auto}
#overworld{position:absolute;inset:90px 18px 14px;z-index:4;display:flex;flex-direction:column;border:1px solid #c6ac75;background:#d7c294;box-shadow:0 16px 55px #091c2770;border-radius:5px;overflow:hidden;color:#342b20}#overworld.hidden{display:none}.map-toolbar{display:flex;align-items:center;gap:20px;padding:10px 19px;background:#203930;color:#f2dfae;border-bottom:2px solid #c3aa73}.map-toolbar>div{flex:1}.map-toolbar strong{display:inline-block;font-family:serif;letter-spacing:.12em;font-size:20px;margin-left:14px}.map-toolbar .eyebrow{font-size:11px}.map-toolbar button{padding:8px 12px;background:#3e5040;border:1px solid #b8a16d;border-radius:4px;font-size:14px}.map-scroll{flex:1;overflow:auto;overscroll-behavior:contain;min-height:0;background:#d1bb8c;scrollbar-color:#76643c #d8c69a}.world-board{position:relative;aspect-ratio:1.5;width:100%;min-width:830px;background:url('world-map.png') center/100% 100% no-repeat}.route-map{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.route-map line{stroke-width:3.2;stroke-linecap:round}.route-open{stroke:#755522;filter:drop-shadow(0 1px 1px #fff1c3)}.route-locked{stroke:#6f634b;stroke-dasharray:4 7;opacity:.55}.map-place{position:absolute;transform:translate(-50%,-50%);width:31px;height:31px;border-radius:50%;padding:0;border:2px solid #493d22;background:#c9a451;color:#2b2317;box-shadow:0 2px 5px #33271188;z-index:2}.map-place>b{font-family:serif;font-size:15px}.map-place.cleared{background:#547548;color:#fff4d3;border-color:#263c28}.map-place:disabled{opacity:.6;background:#aca087;color:#473e2d}.map-place>span{position:absolute;top:33px;left:50%;transform:translateX(-50%);white-space:nowrap;font-size:13px;background:#ead7abeb;padding:3px 7px;border:1px solid #9d8359;color:#382b1d;border-radius:3px}.map-place:focus-visible{outline:3px solid #2d8069}.map-traveler{position:absolute;transform:translate(-50%,-100%);width:48px;height:54px;z-index:3;pointer-events:none;transition:left .25s linear,top .25s linear;filter:drop-shadow(0 3px 2px #30261088)}.map-traveler img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}.location-card{display:flex;align-items:center;gap:18px;padding:10px 22px;background:linear-gradient(#efe1bd,#dcccaa);border-top:2px solid #8d7853;min-height:110px}.location-card>div:first-child{flex:1}.location-card .eyebrow{color:#766039;font-size:12px}.location-card h2{font-family:serif;font-size:24px;font-weight:bold;margin:5px 0;color:#392e21}.location-card p{font-size:13px;margin:0;color:#6d5940}.location-actions{display:flex;gap:8px}.location-actions button{margin:0;padding:10px 20px;white-space:nowrap;font-size:14px;min-width:145px}.location-actions .primary{background:#394f3a;border-color:#2d422f;color:#faedc8}.location-actions .secondary{background:#cbb47d;border-color:#887340;color:#30291d}.map-note{margin:0;padding:6px 18px;background:#c4b28c;font-size:11px;line-height:1.6;color:#493c29}.story-scene{display:flex;gap:24px;align-items:center;min-height:200px;padding:20px 0}.story-scene>img{width:150px;height:180px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 12px 9px #07191990)}.story-scene h2{font-size:23px;color:#f3d99a;margin-bottom:13px}.story-scene p{font-size:18px;line-height:2.1;margin:0}.story-controls{display:flex;gap:10px;align-items:center}.story-controls button{margin:0}.story-controls>small{white-space:nowrap;color:#b7c8b3}.stage-subtitle{font-size:14px!important;margin-top:-12px;color:#c2cbb2!important}
@media(max-width:760px){#overworld{inset:79px 6px 8px}.map-toolbar{padding:9px;gap:9px}.map-toolbar .eyebrow{display:none}.map-toolbar strong{font-size:17px;margin-left:0}.map-toolbar button{font-size:12px;padding:7px}.map-toolbar>span{font-size:13px}.world-board{min-width:850px}.location-card{padding:12px;display:block;min-height:153px}.location-card h2{font-size:21px}.location-actions{margin-top:10px}.location-actions button{flex:1;min-width:0;padding:9px 12px;font-size:13px}.map-note{font-size:10px;padding:5px 10px}.story-scene{gap:12px;align-items:flex-start}.story-scene>img{width:78px;height:106px}.story-scene p{font-size:16px;line-height:1.9}.story-scene h2{font-size:20px}.story-controls{flex-wrap:wrap}.story-controls button{flex:1;font-size:13px;white-space:nowrap}.world-mode #game{min-height:680px}.world-mode .brand small{display:none}.world-mode .emblem{display:none}#soundToggle{padding:8px 7px;font-size:12px}}
.initiative-card{display:flex;align-items:center;gap:6px;padding:8px 12px;background:#163d35e8;border:1px solid #72816a;min-width:140px;color:#f4ecd6}.initiative-card img{width:40px;height:48px;object-fit:contain;image-rendering:pixelated}.initiative-card small{display:block;font-size:12px;color:#c0ccb9}.initiative-card.selected{border:2px solid #ffe09a;box-shadow:0 0 16px #ffcf5540}.initiative-card.ended{filter:grayscale(.95);opacity:.58}.initiative-card>b{color:#e9c778;font-size:14px}.story-scene .speech-bubble{position:relative;flex:1;padding:22px 26px;color:#2f302a;background:linear-gradient(#e9e5cf,#c6c4ae);border:4px double #393e33;border-radius:3px;box-shadow:4px 5px 0 #0005,inset 0 0 0 2px #fff6}.speech-bubble:before{content:'';position:absolute;left:-14px;top:40px;width:20px;height:20px;transform:rotate(45deg);background:#dfddc7;border-left:2px solid #393e33;border-bottom:2px solid #393e33}.story-scene .speech-bubble h2{font-size:18px;margin:0 0 12px;border-bottom:1px solid #777967;padding-bottom:8px;color:#32372c}.story-scene .speech-bubble p{font-size:18px;line-height:1.9;color:#30372d;margin:0}.story-scene>img{filter:drop-shadow(3px 4px 0 #0007)}.join-scene{position:relative;isolation:isolate;overflow:hidden;text-align:center;padding:20px 12px;background:radial-gradient(ellipse at 50% 35%,#bda24d77,transparent 60%)}.join-rays{position:absolute;z-index:-1;inset:-200%;background:repeating-conic-gradient(from 0deg,#ffe59928 0deg 7deg,transparent 7deg 22deg);animation:join-spin 24s linear infinite}.join-rarity{display:block;font:bold 48px Georgia,serif;letter-spacing:.18em;color:#ffe495;text-shadow:0 2px #895620,0 0 24px #ffd55a;animation:join-reveal .9s both}.join-stars{color:#ffe79b;letter-spacing:.6em;text-shadow:0 0 18px #ffd258;animation:join-reveal 1s .25s both}.join-portrait{height:210px;width:210px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 0 24px #ffed9c);animation:join-reveal 1.2s both}.join-scene h2{color:#ffe6a3;font-size:26px;animation:join-reveal 1s .4s both}.join-scene p{position:relative}.music-credit{font-size:12px}.music-credit a{color:#dfc788}@keyframes join-reveal{from{opacity:0;transform:translateY(18px) scale(.85);filter:brightness(3)}to{opacity:1;transform:none}}@keyframes join-spin{to{transform:rotate(360deg)}}@media(max-width:600px){.initiative-card{min-width:112px;padding:5px;gap:3px}.initiative-card img{width:30px}.story-scene .speech-bubble{padding:14px}.story-scene .speech-bubble p{font-size:16px}.join-portrait{height:160px}.join-scene h2{font-size:22px}}@media(prefers-reduced-motion:reduce){.join-rays,.join-portrait,.join-rarity,.join-stars,.join-scene h2{animation:none}}
.party-strip{overflow-x:auto}.party-strip .initiative-card{flex-shrink:0;font-size:14px}.party-strip .initiative-card small{font-size:12px;line-height:1.3;margin-top:3px}.unit-stats{white-space:normal;line-height:1.5}@media(max-width:760px){.turn-controls,.camera{bottom:340px}}
.front-screen{position:absolute;inset:0;z-index:35;background:#102b2b;color:#fff0c9;overflow:auto}.front-screen.hidden{display:none}.title-mode header,.title-mode .bottom,.title-mode .objective,.title-mode .phase,.title-mode .camera,.title-mode .party-strip,.title-mode .turn-controls,.title-mode footer,.title-mode #overworld,.title-mode #modal,.title-mode #selectionArrow,.title-mode #targetInfo{display:none!important}.title-backdrop{position:absolute;inset:0;background:linear-gradient(90deg,#091d23b8,#102b2b16),linear-gradient(0deg,#061b22ed,transparent 75%),url('story/kingdom.png') center/cover}.title-content{position:relative;max-width:620px;min-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;margin:auto;padding:80px 28px 30px}.title-kicker{font-size:13px;letter-spacing:.24em;text-shadow:0 2px 5px #001c22}.title-content h1{font:700 clamp(58px,8vw,106px)/1.15 'Yu Mincho','Hiragino Mincho ProN',serif;letter-spacing:.12em;color:#ffe9a9;margin:12px 0 8px;text-shadow:0 3px 0 #65452d,0 6px 18px #00131f,0 0 38px #dbb45c66}.title-subtitle{font-family:serif;font-size:clamp(17px,2.4vw,26px);letter-spacing:.16em;text-shadow:0 2px 6px #000}.title-actions{display:flex;flex-direction:column;gap:12px;width:min(100%,330px);margin:30px auto 20px}.title-actions button{min-height:52px;font-size:18px;letter-spacing:.08em;margin:0}.title-actions button small{display:block;font-size:12px;letter-spacing:0;margin-top:6px}.title-actions .primary{background:linear-gradient(#f4dc9b,#baa065);color:#183a35;border:1px solid #fff1be;box-shadow:0 4px 20px #0004}.title-actions .secondary{background:#112f32d9;border:1px solid #c9b980;color:#fff0c5}.title-actions button:disabled{opacity:.5}.title-replay{border:0;background:transparent;font-size:14px!important;color:#e2d4ac;text-decoration:underline}.title-footnote{font-size:13px;line-height:1.8;color:#e0d7bf}.front-audio{position:absolute;right:24px;top:22px;display:flex;gap:8px;z-index:3}.front-audio button{border:1px solid #c5b987;background:#112b2be6;padding:9px 12px;font-size:13px;border-radius:3px}.title-loading{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;font:40px serif}.title-loading small{font:14px sans-serif;margin-top:18px}.prologue-screen{position:relative;min-height:100%;display:flex;align-items:flex-end;padding:100px 5vw 30px;isolation:isolate}.prologue-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-3;animation:prologue-drift 24s ease-out both}.prologue-shade{position:absolute;inset:0;z-index:-2;background:linear-gradient(0deg,#05171cf2,transparent 85%)}.prologue-caption{width:min(100%,1020px);margin:0 auto;padding:22px 32px;background:#0c252ad9;border:1px solid #c5b789;box-shadow:inset 0 0 0 4px #ffffff08}.prologue-heading{display:flex;justify-content:space-between;font:16px serif;color:#d7bf87;border-bottom:1px solid #d7bf8744;padding-bottom:12px}.narration-text{font:clamp(18px,2vw,24px)/2 'Yu Mincho','Hiragino Mincho ProN',serif;letter-spacing:.06em;min-height:3.8em;color:#fff0d4}.voice-status{font-size:13px;min-height:20px;color:#c3cbb8}.prologue-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.prologue-controls button{font-size:14px;padding:10px 16px;background:#244344;border:1px solid #aaa681;margin:0}.prologue-controls .primary{margin-left:auto;background:#d6bf88;color:#15332e}.title-content>h2{font:28px serif}.title-content>p{line-height:1.8}@keyframes prologue-drift{from{transform:scale(1)}to{transform:scale(1.06)}}@media(max-width:760px){.title-mode{min-height:100svh!important}.title-content{padding:90px 18px 28px}.title-content h1{font-size:64px}.front-audio{right:14px;top:14px}.prologue-screen{padding:80px 12px 20px}.prologue-caption{padding:16px}.narration-text{font-size:18px;line-height:1.9}.prologue-controls{gap:8px}.prologue-controls button{padding:9px 11px;font-size:13px}.prologue-art{object-position:center 35%}.map-toolbar{flex-wrap:wrap;gap:8px}.map-toolbar>div{flex-basis:100%}}@media(prefers-reduced-motion:reduce){.prologue-art{animation:none}}
.prologue-screen{overflow:hidden}.front-screen button:focus-visible{outline:3px solid #ffe38b;outline-offset:3px}
.equipment-layout{display:grid;grid-template-columns:minmax(190px,.8fr) minmax(260px,1.4fr);gap:20px;text-align:left}.equipment-summary{background:#203d37;color:#fff0ce;padding:16px;border:2px solid #bba16a}.equipment-summary .bag-status{flex-direction:column;align-items:flex-start}.equipment-summary .bag-status img{width:96px;height:96px;image-rendering:pixelated}.equipment-slots{display:grid;gap:10px}.equipment-slots button{display:grid;text-align:left;gap:6px;width:100%;padding:14px}.equipment-slots small{font-size:14px}.equipment-slots .selected,.member-tabs .selected{outline:2px solid #d5ac53;background:#e3c780;color:#24382e}.equipment-list{max-height:48vh;overflow:auto;padding:4px}.equipment-list h3{margin:4px 0 12px}.equipment-list .shop-line{gap:12px}.equipment-list .shop-line strong{font-size:16px}.equipment-list button{flex-shrink:0}.equip-eligible{color:#355d43;font-weight:700}.incompatible{opacity:.6}.equipment-summary .tip{color:#f1dfb4}.bag-message{min-height:1.5em}@media(max-width:640px){.equipment-layout{grid-template-columns:1fr;gap:10px}.equipment-summary .bag-status{flex-direction:row}.equipment-summary .bag-status img{width:64px;height:64px}.equipment-slots{grid-template-columns:1fr 1fr}.equipment-list{max-height:35vh}.equipment-list .shop-line{flex-wrap:wrap}.equipment-list button{margin-left:auto}}
/* Battle viewport and non-blocking inspection */
html,body{height:100%;overflow:hidden}#game{height:100dvh;min-height:0}.target-info{pointer-events:none;max-height:130px;overflow:hidden;font-size:14px;line-height:1.45;padding:9px 12px;white-space:pre-line;z-index:5}.target-info:after{content:'外側をタップで閉じる';display:block;color:#dac48a;font-size:12px;margin-top:5px}.dialog{max-height:94%;overscroll-behavior:contain}.member-tabs{flex-wrap:wrap}.equip-eligible{color:#e1d69c}.equipment-list .shop-line small{line-height:1.5}
@media(max-width:760px){#game{height:100dvh;min-height:0}header{top:8px;left:10px;right:10px;gap:6px}header h1{font-size:19px}.brand small,.emblem{display:none}.menu-button{padding:7px;font-size:13px}.objective{top:61px;left:10px;max-width:66%;padding:3px 0 3px 8px}.objective h2{font-size:15px;margin:3px 0}.objective p{font-size:12px}.objective b{margin-left:4px}.phase{top:62px;right:10px}.phase span{font-size:13px;letter-spacing:0}.bottom{left:8px;right:8px;bottom:max(6px,env(safe-area-inset-bottom));gap:4px}.hero-card{padding:5px 8px;gap:8px}.portrait{width:34px;height:40px}.name{margin:0}.name strong{font-size:15px}.name span,.hp-label{font-size:12px}.stats{column-gap:10px}.exp-row{font-size:12px;gap:6px}.unit-stats{font-size:12px;margin-top:3px}.command-card{padding:5px 6px}.command-card p{font-size:12px;margin:0 0 4px;min-height:0;max-height:18px;line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.commands{gap:4px}.commands button{font-size:12px;padding:7px 1px;min-height:48px;line-height:1.2}.commands button span{display:inline;font-size:13px;margin:0 2px 0 0}.commands small{font-size:11px;margin-top:4px}.commands #end small{display:none}.party-strip{bottom:166px;left:8px;right:8px;max-width:none;gap:3px;pointer-events:none}.initiative-card{min-width:0;flex:1;padding:3px;gap:2px;font-size:12px}.initiative-card img{width:24px;height:27px}.initiative-card small{font-size:11px;line-height:1.2;margin:0}.initiative-card small br{display:none}.initiative-card>b{font-size:12px}.camera{bottom:211px;left:8px;right:auto}.camera button{width:30px;height:30px}.turn-controls{bottom:211px;right:8px}.turn-controls button{padding:6px 8px;font-size:12px}.turn-controls #turnEnd{display:none}.target-info{top:111px;right:8px;left:auto;max-width:calc(100% - 16px);width:270px;max-height:108px;font-size:12px;line-height:1.3;padding:7px}footer{display:none}#toast{top:103px;max-width:90%;padding:6px 10px}.selection-arrow{font-size:19px}#overworld{inset:52px 6px 6px}.map-toolbar{flex-wrap:wrap;padding:6px;gap:5px}.map-toolbar strong{font-size:15px}.location-card{min-height:118px;padding:8px}.location-card h2{font-size:18px}.map-note{max-height:38px;overflow:hidden}.story-scene{min-height:0;padding:8px 0}.story-scene .speech-bubble p{line-height:1.6}.join-portrait{height:140px;width:140px}.join-rarity{font-size:36px}}
@media(max-height:500px){#game{min-height:0}.bottom{bottom:5px;left:8px;right:8px}.hero-card{display:none}.command-card{padding:5px 10px}.command-card p{display:none}.commands button{min-height:38px;padding:5px;font-size:12px}.commands small{display:none}.party-strip{bottom:61px;left:8px;max-width:55%}.initiative-card{min-width:70px;font-size:12px;padding:3px}.initiative-card img{height:24px;width:24px}.initiative-card small{display:none}.camera{bottom:63px;right:120px;left:auto}.turn-controls{bottom:63px;right:8px}.turn-controls #turnEnd{display:none}.objective{top:56px}.phase{top:56px}.target-info{top:100px;max-height:92px}.dialog{padding:14px}.story-scene>img{height:80px;width:70px}.story-scene{min-height:0;padding:0}.dialog h2{font-size:21px;margin:6px 0}.dialog p{line-height:1.5}.join-portrait{width:80px;height:80px}.join-rarity{font-size:28px}.world-mode header{top:6px}#overworld{inset:50px 6px 4px}.location-card{min-height:0;display:flex;padding:6px}.map-note{display:none}}
.tower-landmark{position:absolute;left:35%;top:1%;width:130px;height:100px;object-fit:contain;pointer-events:none;mix-blend-mode:multiply}.tower-floor-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.tower-floor-grid button{padding:12px 5px;border:1px solid #8aafae;background:#244a48;border-radius:4px;text-align:center}.tower-floor-grid strong,.tower-floor-grid small{display:block}.tower-floor-grid small{font-size:12px;margin-top:5px}.tower-floor-grid .boss-floor{border-color:#edc66e;background:#574923}.loot-reveal{min-height:220px;padding:25px 10px}.loot-reveal h2{font-family:serif;font-size:30px}.loot-reveal .join-rarity{font-size:60px}@media(max-width:600px){.tower-floor-grid{grid-template-columns:repeat(3,1fr)}.tower-floor-grid button{padding:8px 3px}.loot-reveal h2{font-size:24px}}

/* One-time shop guidance floats over the map without blocking other controls. */
.map-toolbar{position:relative}
#shopHint{position:absolute;z-index:12;top:calc(100% + 8px);left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;width:360px;max-width:calc(100% - 16px);margin:0;padding:11px 13px;border:1px solid #d6b76d;border-radius:5px;background:#183e38f2;color:#fff3d3;box-shadow:0 4px 16px #15251c35;text-align:left;font:14px/1.55 sans-serif;cursor:pointer}
#shopHint small{display:block;margin-top:4px;font-size:12px;color:#e4d7b5}
#shopHint .shop-hint-mark{font-size:28px;color:#f2d17f;flex-shrink:0}
#shopHint>span:last-child{align-self:flex-start;font-size:18px;line-height:1}
#shopHint:focus-visible{outline:3px solid #fff3bc;outline-offset:2px}

/* Only merchandise scrolls; navigation remains outside the scroll region. */
.dialog.shop-dialog{display:flex;flex-direction:column;height:88dvh;max-height:100%;overflow:hidden;padding:14px;gap:8px;min-height:0}
.shop-dialog .shop-heading{position:static;display:flex;flex-shrink:0;align-items:center;justify-content:space-between;gap:12px;margin:0;padding:0}
.shop-dialog .shop-heading h2{font-size:22px;margin:0 0 3px}
.shop-heading small{font-size:13px;color:#e4d4ae}
.shop-dialog #shopBack{margin:0;min-height:44px;padding:8px 14px;white-space:nowrap;font-size:14px}
.shop-filters{display:flex;flex-shrink:0;gap:10px;align-items:stretch}
.shop-dialog .member-tabs{display:flex;flex:1;flex-wrap:nowrap;gap:4px;margin:0;min-width:0}
.shop-dialog .member-tabs button{flex:1;min-width:0;padding:5px 2px;display:flex;align-items:center;justify-content:center;gap:4px;font-size:14px}
.shop-dialog .member-tabs img{width:26px;height:28px;object-fit:contain;image-rendering:pixelated}
.shop-dialog .bag-tabs{margin:0;gap:4px}
.shop-dialog .bag-tabs button{display:flex;align-items:center;gap:4px;padding:6px 10px;min-height:44px}
.shop-dialog .bag-tabs span{font-size:23px;line-height:1}
.shop-dialog .bag-tabs small{font-size:13px}
.shop-dialog .shop-current{flex-shrink:0;font-size:13px;line-height:1.4;margin:0;color:#e0cfaa}
.shop-dialog .shop-products{flex:1;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding:0 4px;scroll-behavior:auto;overflow-anchor:none}
.shop-dialog .shop-line{flex-wrap:nowrap;padding:9px 0;gap:10px}
.shop-dialog .shop-line>div{min-width:0}
.shop-dialog .shop-line strong{font-size:15px}
.shop-dialog .shop-line small{margin-top:3px;font-size:13px;line-height:1.4}
.shop-dialog .shop-line button{min-height:44px;padding:7px 10px;margin:0;white-space:nowrap;font-size:14px}
.shop-dialog .shop-line.incompatible{opacity:.65}
.shop-footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-shrink:0;border-top:1px solid #63807055;padding-top:8px}
.shop-dialog .shop-footer p{font-size:13px;line-height:1.4;margin:0;flex:1}
.shop-dialog #shopEquip{min-height:44px;padding:8px 14px;margin:0;font-size:14px;white-space:nowrap}
@media(max-width:640px){.dialog.shop-dialog{height:92dvh;padding:10px;gap:6px}.shop-filters{flex-direction:column;gap:5px}.shop-dialog .member-tabs button{min-height:36px}.shop-dialog .bag-tabs button{justify-content:center;min-height:36px;padding:4px}.shop-dialog .bag-tabs span{font-size:21px}.shop-dialog .shop-heading h2{font-size:20px}}
@media(max-height:500px){.dialog.shop-dialog{height:100%;padding:8px;gap:4px}.shop-filters{flex-direction:row}.shop-dialog .member-tabs img{display:none}.shop-dialog .bag-tabs small{display:none}.shop-dialog .bag-tabs button{min-height:36px;padding:4px 10px}.shop-dialog .shop-heading h2{font-size:18px}.shop-dialog .shop-heading>div{display:flex;align-items:center;gap:8px}.shop-footer{padding-top:4px}}

@media(max-width:480px){.shop-dialog .member-tabs img{display:none}.shop-dialog .member-tabs button{min-height:40px}}

.world-mode #saveGame{display:none}
.save-actions{display:flex;gap:8px;flex-wrap:wrap}
.save-actions button{min-height:44px}
@media(max-width:480px){#game>header .brand h1{font-size:16px}#game>header .chapter{display:none}#game>header .menu-button{padding:7px 5px;font-size:12px}}

/* The document stays still; map panning and shop inventory own their scroll. */
html,body{width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
#game,#game.title-mode{position:fixed;inset:0 0 auto;height:var(--game-height,100dvh);min-height:0!important;max-height:100%;overflow:hidden}
#overworld{min-height:0;overflow:hidden}
.map-toolbar,.location-card{flex-shrink:0}
.map-note{display:none}
.map-scroll{flex:1 1 0;min-height:0;min-width:0;overscroll-behavior:contain}
.modal{padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));overflow:hidden}
.dialog.shop-dialog{height:100%;max-height:100%;max-width:720px;padding:12px;gap:8px}
.shop-dialog .shop-heading{flex-shrink:0;min-width:0}
.shop-dialog .shop-heading>div{display:block;width:100%;min-width:0}
.shop-dialog .shop-heading h2{font-size:20px;line-height:1.4;margin:0 0 3px;letter-spacing:.03em;overflow-wrap:anywhere}
.shop-dialog .shop-products{flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain}
.shop-dialog .shop-message{flex-shrink:0;min-width:0;margin:0;font-size:14px;line-height:1.4;color:#ffe4a6;overflow-wrap:anywhere}
.shop-dialog .shop-message:empty{display:none}
.shop-dialog .shop-footer{display:grid;grid-template-columns:1fr 1fr;gap:8px;flex-shrink:0;padding-top:10px;margin:0}
.shop-dialog .shop-footer button,.shop-dialog #shopEquip,.shop-dialog #shopBack{width:100%;min-width:0;min-height:46px;margin:0;padding:10px 6px;font-size:14px;line-height:1.4;white-space:normal}
.shop-dialog .shop-back{border:2px solid #ebd399;background:#34574b;color:#fff2cc;font-weight:bold}
.shop-guide{padding:12px 0;font-size:14px;color:#d7dfcd}
.shop-guide summary{cursor:pointer}
.shop-dialog .shop-guide p{font-size:14px;line-height:1.6}
@media(max-width:760px){
 #game.world-mode>header{top:max(6px,env(safe-area-inset-top));left:10px;right:10px;gap:6px;height:38px}
 #game.world-mode>header .brand h1{font-size:17px}
 #game.world-mode>header .brand{min-width:0}
 #game.world-mode>header .menu-button{padding:6px;font-size:13px}
 #game.world-mode>header .round{width:32px;height:32px}
 #overworld{inset:calc(max(6px,env(safe-area-inset-top)) + 44px) 6px max(6px,env(safe-area-inset-bottom))}
 .map-toolbar{flex-wrap:nowrap;gap:5px;padding:6px}
 .map-toolbar>div{display:none}
 .map-toolbar>span{margin-right:auto;white-space:nowrap;font-size:14px}
 .map-toolbar button{padding:7px 6px;font-size:13px;min-height:38px;white-space:nowrap;flex-shrink:0}
 .map-toolbar #endingAgain{font-size:12px;padding:7px 5px}
 .location-card{display:flex;flex-direction:column;align-items:stretch;min-height:0;gap:5px;padding:8px 10px}
 .location-card>div:first-child{display:grid;grid-template-columns:1fr auto;align-items:center;gap:2px 8px;min-width:0}
 .location-card .eyebrow{grid-column:2;grid-row:1;font-size:11px;letter-spacing:.02em}
 .location-card h2{grid-column:1;grid-row:1;font-size:17px;margin:0;line-height:1.4}
 .location-card p{grid-column:1/-1;font-size:12px;margin:0;line-height:1.4}
 .location-actions{margin:0;gap:6px}
 .location-actions button{width:auto;flex:1;min-width:0;min-height:40px;padding:6px;font-size:14px}
 .dialog.shop-dialog{padding:10px;gap:6px}
 .shop-dialog .shop-heading h2{font-size:19px}
}
@media(max-height:500px){
 .location-card{flex-direction:row;align-items:center;gap:8px;padding:5px 8px}
 .location-card>div:first-child{flex:1}
 .location-card p{display:none}
 .location-card .eyebrow{display:none}
 .location-actions{flex-shrink:0}
 .dialog.shop-dialog{padding:8px;gap:4px}
 .shop-dialog .shop-heading>div{display:flex;align-items:center;justify-content:space-between;gap:8px}
 .shop-dialog .shop-heading h2{font-size:18px}
 .shop-dialog .shop-footer{padding-top:5px}
}

#shopHint{white-space:normal}
@media(max-width:380px){.map-toolbar button{font-size:12px;padding:7px 5px}.map-toolbar>span{font-size:13px}}

.flag-label{position:absolute;z-index:6;transform:translate(-50%,-100%);padding:3px 6px;border:1px solid #ffe49b;border-radius:4px;background:#3a2818ed;color:#ffe6a0;font-size:13px;font-weight:bold;white-space:nowrap;pointer-events:none;box-shadow:0 2px 8px #0005}.flag-label[hidden]{display:none}

.structure-targets{position:absolute;top:190px;left:30px;z-index:7;display:flex;flex-wrap:wrap;gap:5px;max-width:calc(100% - 60px);align-items:center}.structure-targets[hidden]{display:none}.structure-targets>span{font-size:12px;color:#ffe1a2;width:100%;text-shadow:0 1px 4px #000}.structure-targets button{padding:5px 8px;min-height:42px;border:1px solid #edc66d;background:#233c34ed;color:#ffe5a9;border-radius:4px;font-size:13px}.structure-targets small{display:block;font-size:11px}.target-label{position:absolute;z-index:7;transform:translate(-50%,-100%);pointer-events:none;background:#6e2b1def;color:#fff2d9;border:1px solid #ffa779;padding:4px 6px;border-radius:4px;font-size:13px;white-space:nowrap}.target-label[hidden]{display:none}@media(max-width:760px){.structure-targets{top:112px;left:10px;max-width:calc(100% - 20px);gap:4px}.structure-targets>span{display:none}.structure-targets button{font-size:12px;padding:4px 6px}.target-label{font-size:12px}.target-info{top:160px}}@media(max-height:500px){.structure-targets{top:98px;left:10px}.structure-targets small{display:none}.structure-targets button{min-height:34px}}

.hero-card{position:relative}.hero-card.detail-open>:not(#targetInfo){visibility:hidden}.hero-card #targetInfo{position:absolute;inset:0;max-width:none;max-height:none;width:auto;height:auto;z-index:8;margin:0;padding:8px 10px;border-radius:8px;font-size:13px;line-height:1.4;overflow:auto;overscroll-behavior:contain;background:#203b35f5}.structure-targets #structureToggle{min-height:36px;padding:5px 8px;font-size:13px}.target-label{max-width:220px;overflow:hidden;text-overflow:ellipsis}@media(max-width:760px){.hero-card #targetInfo{font-size:12px;padding:6px 8px;line-height:1.3}}@media(max-height:500px){.bottom.details-open .hero-card{display:flex;height:90px;width:100%;min-width:260px}.bottom.details-open .command-card{display:none}}

.tower-stairs{display:flex;flex-direction:column;gap:8px;max-height:40dvh;min-height:66px;overflow-y:auto;overscroll-behavior:contain;padding:6px 5px 10px 16px;border-left:2px solid #bca76c;scrollbar-color:#bca76c #193630}.tower-step{position:relative;display:block;flex-shrink:0;min-height:64px;width:100%;padding:10px 14px;text-align:left;border:1px solid #889c7d;border-bottom:5px solid #486052;border-radius:4px;background:#24483e;color:#f0e5c7}.tower-step strong{font-size:19px}.tower-step strong span{font-size:13px;margin-left:9px}.tower-step small{display:block;font-size:13px;margin-top:5px;color:#c6d4bd}.tower-step.challenge-step{background:#e3c780;color:#20372e;border-color:#ffe5a4;border-bottom-color:#9c7a3d}.tower-step.challenge-step small{color:#384c37}.tower-step.boss-floor:not(.challenge-step){border-color:#c99b57}.tower-step:focus-visible{outline-offset:-3px}@media(max-width:640px){.tower-stairs{max-height:36dvh;padding-left:10px}.tower-step{padding:8px 10px;min-height:62px}.tower-step strong{font-size:18px}.tower-step strong span{font-size:12px}}
/* A compact target readout lives in the HUD, never on a character's sprite. */
#floaters .target-label{position:absolute;left:36px;top:211px;transform:none;max-width:calc(100% - 72px);width:max-content;padding:7px 11px 10px;white-space:normal;font-size:13px;line-height:1.35;color:#fff4dc;background:#142e2ef2;border:1px solid #d2ab6b;border-radius:5px;pointer-events:none;text-shadow:none;box-shadow:0 3px 12px #001a2444;background-image:linear-gradient(90deg,#f1b46d var(--target-hp),#344744 var(--target-hp));background-size:calc(100% - 20px) 3px;background-position:center bottom 3px;background-repeat:no-repeat}
#floaters .target-label[hidden]{display:none}
.dialog.ending-dialog{width:min(850px,100%);max-width:850px;height:min(780px,100%);max-height:100%;padding:16px;display:flex;flex-direction:column;overflow:hidden;gap:10px}
.ending-dialog>.eyebrow{flex-shrink:0}.ending-art{width:100%;min-height:100px;height:48%;object-fit:contain;background:#10292a;border:1px solid #baab7080;border-radius:5px;image-rendering:auto;animation:ending-arrive 1.2s ease-out}
.ending-copy{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 6px}.ending-copy h2{font-size:25px;margin:5px 0 10px}.ending-copy p{font-size:15px;line-height:1.8;margin:5px 0}.ending-thanks{text-align:center;color:#efd28a!important;letter-spacing:.1em}
.ending-controls{display:flex;gap:8px;align-items:center;flex-shrink:0}.ending-controls button{width:auto;flex:1;margin:0;padding:11px 8px}.ending-controls small{font-size:12px}.ending-controls [hidden]{display:none}.voice-finished{box-shadow:0 0 14px #ffdd8760}
.tower-reveal-art{display:block;width:100%;height:130px;object-fit:contain;animation:ending-arrive 1.5s ease-out}
@keyframes ending-arrive{from{opacity:0;filter:brightness(1.7)}to{opacity:1;filter:brightness(1)}}
.global-share{position:fixed;right:max(6px,env(safe-area-inset-right));top:45%;z-index:100;display:flex;align-items:flex-end;gap:6px}.global-share>button{width:36px;height:36px;border-radius:50%;background:#142b2fe8;border:1px solid #bea66e;color:#eee5cc;font-size:18px}.share-links{position:absolute;right:43px;top:0;width:190px;padding:8px;border:1px solid #d5bd7d;background:#132c2ff5;border-radius:6px;box-shadow:0 5px 20px #0006}.share-links[hidden]{display:none}.share-links a{display:block;color:#f5dfaa;padding:11px 8px;font-size:14px;text-decoration:none}.share-links a:hover{background:#36504c}.share-links small{display:block;font-size:11px;color:#bbccc5;padding:6px}
@media(max-width:760px){#floaters .target-label{top:116px;left:10px;max-width:calc(100% - 20px);font-size:12px;padding:5px 8px 9px}.ending-dialog .ending-art{height:40%}.ending-copy h2{font-size:21px}.ending-copy p{font-size:14px}.ending-dialog{gap:7px!important}.ending-controls button{font-size:13px}.tower-reveal-art{height:95px}}
@media(max-height:500px){.dialog.ending-dialog{display:grid;grid-template-columns:45% 1fr;grid-template-rows:auto 1fr auto;gap:8px}.ending-dialog>.eyebrow{grid-column:1/-1}.ending-art{grid-row:2/4;height:100%!important}.ending-copy{grid-column:2}.ending-controls{grid-column:2}.ending-copy h2{font-size:18px}.ending-copy p{font-size:13px;line-height:1.6}#floaters .target-label{top:105px}.tower-reveal-art{height:65px}}
@media(prefers-reduced-motion:reduce){.ending-art,.tower-reveal-art{animation:none}}
/* Keep the target list toggle beside the HP readout rather than covering it. */
.structure-targets{left:auto;right:30px;top:211px;max-width:290px;justify-content:flex-end}
#floaters .target-label{max-width:calc(100% - 145px)}
@media(max-width:760px){.structure-targets{left:auto;right:10px;top:116px;max-width:260px}#floaters .target-label{max-width:calc(100% - 96px)}}
@media(max-height:500px){.structure-targets{top:105px}}
/* A one-time, non-blocking field discovery after the main ending. */
.tower-landmark.tower-arriving{mix-blend-mode:normal;animation:tower-materialize 2.4s ease-out both;filter:drop-shadow(0 0 12px #d3ffff)}
.map-place.tower-arriving-place{z-index:4;animation:tower-beacon 1.2s ease-in-out 5;border-color:#e8ffff;background:#338e8c;color:white;box-shadow:0 0 0 6px #9defff70,0 0 30px #d6ffff}
.route-map .tower-arriving-route{stroke:#b4ffef;stroke-width:5;filter:drop-shadow(0 0 4px #208f97);stroke-dasharray:8 5;animation:tower-path 2s linear 3}
.tower-arrival-notice{position:absolute;left:50%;bottom:140px;transform:translateX(-50%);z-index:8;width:min(430px,calc(100% - 28px));padding:14px 18px;border:1px solid #b9edce;border-radius:8px;background:linear-gradient(125deg,#173b3bf5,#204a48f5);color:#fff1c5;text-align:center;box-shadow:0 4px 25px #102b3480;animation:ending-arrive .6s ease-out}
.tower-arrival-notice small,.tower-arrival-notice strong,.tower-arrival-notice span,.tower-arrival-notice em{display:block}.tower-arrival-notice small{font-size:10px;letter-spacing:.16em;color:#b6e9d3}.tower-arrival-notice strong{font-size:21px;margin:5px 0}.tower-arrival-notice span{font-size:13px}.tower-arrival-notice em{font-style:normal;font-size:11px;color:#becfc6;margin-top:7px}
@keyframes tower-materialize{0%{opacity:0;transform:translateY(14px) scale(.8);filter:brightness(3) drop-shadow(0 0 26px #d3ffff)}60%{opacity:1;filter:brightness(1.7) drop-shadow(0 0 18px #d3ffff)}100%{opacity:1;transform:none;filter:brightness(1) drop-shadow(0 0 12px #d3ffff)}}
@keyframes tower-beacon{50%{box-shadow:0 0 0 16px #9defff12,0 0 34px #d6ffff;filter:brightness(1.5)}}
@keyframes tower-path{to{stroke-dashoffset:-26}}
@media(max-width:760px){.tower-arrival-notice{bottom:116px;padding:11px}.tower-arrival-notice strong{font-size:18px}.tower-arrival-notice span{font-size:12px}}
@media(max-height:500px){.tower-arrival-notice{left:auto;right:10px;bottom:68px;transform:none;width:260px;padding:8px}.tower-arrival-notice strong{font-size:16px}.tower-arrival-notice span{display:none}}
@media(prefers-reduced-motion:reduce){.tower-landmark.tower-arriving,.map-place.tower-arriving-place,.route-map .tower-arriving-route,.tower-arrival-notice{animation:none}}
.modal.settings-open{z-index:75}.difficulty-options{display:grid;gap:12px}.difficulty-options button{display:block;width:100%;text-align:left;padding:16px;border:1px solid #789689;border-radius:7px;background:#203f3c;color:#f4ead6}.difficulty-options button[aria-pressed="true"]{border:2px solid #f6d37d;background:#425b47}.difficulty-options strong,.difficulty-options span{display:block}.difficulty-options strong{font-size:21px;margin-bottom:7px}.difficulty-options span{font-size:14px;line-height:1.6}.difficulty-shortcut{border:1px solid #b49a66;border-radius:4px;background:#2d4c41;padding:8px 12px;color:#f2dca6}.ending-share{display:block;flex-shrink:0;text-align:center;padding:12px;background:#f0ce82;color:#102b2b;border:1px solid #fff0bb;border-radius:6px;text-decoration:none;font-weight:bold;font-size:16px;box-shadow:0 0 18px #efce8233}.ending-share:hover{background:#ffe6a8}.ending-dialog .ending-art{height:42%}.title-actions #titleDifficulty{padding:9px;margin-top:7px}.title-footnote{margin-top:12px}.title-actions .title-replay{margin-top:7px}
@media(max-height:500px){.dialog.ending-dialog{grid-template-rows:auto 1fr auto auto}.ending-dialog .ending-art{grid-row:2/5}.ending-share{grid-column:2;padding:8px;font-size:13px}.title-content{padding-top:44px}.title-content h1{font-size:46px}.title-actions{gap:4px}.title-actions button{padding:7px}.title-footnote{display:none}}
.title-mode #modal.settings-open:not(.hidden){display:flex!important}
