/* Two camp destinations; battlefield controls live inside the arena. */
body{padding-bottom:0}
body>header{max-width:1160px;padding:16px 24px;gap:20px}
body>header .top{max-width:none;width:auto;flex-wrap:nowrap}
body>header .brand small{letter-spacing:2px}
main{display:block;max-width:1160px;margin:16px auto 0;padding:0 24px}
main>.arena{height:max(640px,calc(100dvh - 148px));min-height:0}
body>footer{max-width:1160px;padding:0 24px;margin:12px auto}
#overlay{align-items:stretch;padding:12px;background:#071418d9}
#overlay>.modal{width:100%;max-width:none;max-height:100%;padding:32px 30px 16px;text-align:left;border-color:#687965;border-radius:9px;background:radial-gradient(ellipse at 100% 0,#35534655,transparent 50%),linear-gradient(150deg,#193033,#101e22)}
#overlay>.modal>h2{font-size:30px;letter-spacing:3px;margin:10px 0;max-width:calc(100% - 75px)}
#overlay>.modal>#summary{max-width:850px;margin:8px 0 16px;font-size:14px;line-height:1.8}
#overlay>.modal>#eyebrow{letter-spacing:2px;font-size:12px;color:#ceb982}
#overlay .modal #camp{border:0;background:none;padding:0;margin:0}
#overlay .modal #camp>.section-title{margin:0;padding:12px 0;border-top:1px solid #69857630}
#overlay .modal #camp>.section-title h2{font:600 15px system-ui;letter-spacing:1px;color:#aec0b2}
#overlay .modal #camp .note{font-size:14px;line-height:1.8}
#gear-message:empty{display:none}
#camp-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:4px 0 16px}
#camp-tabs>button{padding:13px 10px;border-radius:6px;letter-spacing:2px;font-size:17px}
#camp-tabs>[aria-selected=true]{background:#d2bd87;color:#102a2b;border-color:#eedaa6}
#departure-steps{display:flex;gap:24px;list-style:none;margin:0 0 18px;padding:0;color:#7d9a92;font-size:13px;letter-spacing:1px}
#departure-steps>[aria-current=step]{color:#f1d798;font-weight:600}
.camp-page{min-width:0}
.camp-fold{border:1px solid #627d6b63;border-radius:7px;background:#071c204a;margin-top:12px;overflow:hidden}
.camp-fold>summary{cursor:pointer;padding:15px 18px;font-size:16px;line-height:1.55;color:#d8e2d2;min-height:50px;touch-action:manipulation}
.camp-fold[open]>summary{background:#233c38;color:#f0d39a;border-bottom:1px solid #6b887342}
.camp-fold>section,.camp-fold>div{padding:16px}
#kit-details{margin:12px 0 16px}
#kit-details>summary{font-size:14px;min-height:44px;padding:10px 15px;color:#9eb8ab}
#kit-slots{gap:12px}
.kit-slot{border-radius:6px;background:#172e30}
#camp-departure{position:sticky;bottom:-16px;z-index:5;display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px;padding:15px 0 16px;margin-top:20px;background:linear-gradient(#142629ee,#122225 40%);border-top:1px solid #617c694d}
#camp-departure #start{position:static;letter-spacing:1px;font-size:17px;min-height:52px;border-radius:5px;grid-column:1;grid-row:1}
#camp-departure #practice-entry{grid-column:2;grid-row:1;background:transparent;border:0;color:#b5c5b7;letter-spacing:0;font-size:14px;min-height:48px;padding:10px}
#camp-departure:has(#back-to-gear:not([hidden])){grid-template-columns:auto 1fr}
#camp-departure #back-to-gear{grid-column:1;grid-row:1;min-height:52px;font-size:14px}
#camp-departure:has(#back-to-gear:not([hidden])) #start{grid-column:2}
.journal-intro{font-size:20px!important;color:#e4cf9f!important;margin:0 0 12px!important}
.journal-tools{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}
.journal-tools>button{min-height:44px;font-size:14px;background:#182e30}
#camp-journal .camp-fold>summary{font-size:18px;font-weight:600}
#camp-journal .camp-fold h3{letter-spacing:1px;font-size:20px}
#camp-journal .camp-fold h4{font-size:18px}
#map-cards{gap:12px;margin-top:18px}
#map-cards .map-card{border-radius:6px}
#camp-maps>.camp-heading{font-size:23px;letter-spacing:1px;margin:0}
#camp-maps #map-info{padding:15px;border-left:3px solid #cfb776;background:#091d214d;margin-bottom:0}
#battle-controls{position:absolute;z-index:20;right:24px;top:22px;display:flex;align-items:center;gap:8px}
#battle-controls button{font-size:14px;min-height:42px;padding:9px 13px;background:#11272dea;border-color:#9ab48b73;backdrop-filter:blur(6px);box-shadow:0 3px 12px #0004}
#battle-tactics{position:absolute;z-index:5;top:22px;left:24px;width:178px;border:1px solid #9bb59465;border-radius:6px;background:#071b20de;overflow:hidden;box-shadow:0 6px 18px #0005}
.minimap-caption{display:flex;align-items:center;justify-content:space-between;gap:4px;padding:3px 7px}
.minimap-caption #place-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:#e3d6ac;letter-spacing:0}
#battle-tactics #objective-open{flex:none;min-height:34px;border:0;padding:6px;font-size:12px;background:transparent;color:#aee4c7}
#battle-tactics #map{display:block;width:100%;height:auto;border:0;border-top:1px solid #9bb59430}
#battle-clock{position:absolute;z-index:4;top:22px;left:50%;right:auto;transform:translateX(-50%);text-align:center;padding:7px 18px;background:#071b20b8;border:1px solid #9bb59430;border-radius:5px;pointer-events:none;margin:0}
#battle-clock strong{font-size:23px}
#battle-clock small{font-size:11px}
body.game-live #player-vitals{position:absolute;z-index:7;left:50%;right:auto;top:auto;bottom:20px;transform:translateX(-50%);width:270px;padding:8px 14px;border:1px solid #aabe9866;border-radius:7px;background:#0b2026e8;box-shadow:0 6px 18px #0007;pointer-events:none;display:grid;grid-template-columns:auto 1fr;gap:2px 10px;text-shadow:0 1px 3px #000}
#player-vitals>span{font-size:12px;grid-column:1;grid-row:1;color:#eed6cb}
#player-vitals>#hptext{grid-column:2;grid-row:1;text-align:right;font-size:13px;font-variant-numeric:tabular-nums}
body.game-live #player-vitals>.bar{grid-column:1/-1;grid-row:2;width:100%;height:8px;margin:5px 0 3px;background:#3c2927;border-radius:4px;overflow:hidden;box-shadow:inset 0 1px 2px #0007}
#player-vitals .bar i{background:linear-gradient(90deg,#b65340,#e19472)}
body.game-live #sword-art-status{grid-column:1/-1;grid-row:3;display:block;font-size:11px;line-height:1.4;color:#bcd0bc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;text-align:center}
body.game-live>header,body.game-live>footer{display:none}
body.game-live{overflow:hidden;padding:0;overscroll-behavior:none}
body.game-live main{height:100dvh;max-width:none;margin:0;padding:0;width:100%}
body.game-live main>.arena{width:100%;height:100dvh;min-height:0;border:0;border-radius:0}
body:not(.game-live) #battle-tactics,body:not(.game-live) #player-vitals,body:not(.game-live) #battle-clock{display:none}
body.game-paused #touch,body.menu-open #touch,body.game-paused #touch *,body.menu-open #touch *{pointer-events:none!important;visibility:hidden!important}
body.game-paused #rookie-coach,body.game-paused #tutorial-guide,body.game-paused #hint{visibility:hidden}
#game-menu{position:absolute;z-index:100;inset:0;padding:24px;background:#06141ade;backdrop-filter:blur(8px);display:grid;place-items:center;touch-action:pan-y pinch-zoom}
.game-menu-card{width:min(540px,100%);max-height:100%;min-height:0;overflow:auto;padding:24px;border:1px solid #819873;border-radius:12px;background:linear-gradient(145deg,#1d393b,#101f26);box-shadow:0 30px 90px #0007;overscroll-behavior:contain;touch-action:pan-y pinch-zoom}
.game-menu-head{display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #7c92703d;padding-bottom:16px;margin-bottom:18px}
.game-menu-head h2{font:600 27px serif;letter-spacing:3px;margin:0;color:#efdfb2}
.game-menu-head button{font-size:14px;min-height:42px;flex:none}
#game-menu .note{font-size:14px;line-height:1.8}
#menu-home{display:grid;gap:10px}
#menu-home>button{width:100%;min-height:48px}
#menu-home>#back-camp{margin-top:10px;background:transparent;color:#dfaf9b;border-color:#915c4f}
#menu-home>#pause-description{margin:0 0 10px}
.settings-group{padding:0 0 22px;margin-bottom:18px;border-bottom:1px solid #73937e35}
.settings-group h3{font-size:18px;margin:0 0 13px}
.settings-toggles{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:16px}
.settings-toggles button{min-height:46px}
#game-menu .music-level{display:flex;gap:16px;font-size:15px;line-height:1.8;color:#c2d2c5}
#game-menu .music-level input{width:auto;flex:1;min-width:0;height:36px;padding:0}
#game-menu #feedback-settings{margin:0 0 24px}
#game-menu .feedback-preferences{margin:0;padding:0;border:0;background:none}
#game-menu .feedback-preferences>summary{font-size:18px;font-weight:600;padding:0;margin-bottom:15px;color:#e9dfc3;min-height:36px}
#game-menu .feedback-preferences>summary::-webkit-details-marker{display:none}
#game-menu .feedback-preferences label{font-size:15px;display:flex;justify-content:space-between;align-items:center;gap:12px;margin:14px 0}
#game-menu .feedback-preferences input[type=checkbox]{width:22px;height:22px;flex:none;accent-color:#d2bd87}
#game-menu select{font-size:16px;padding:10px;background:#0c2125;color:#e3e9de;border:1px solid #657e70;border-radius:4px}
#game-menu #gift-setting{padding:0;margin:0;border:0}
#game-menu #gift-entry{min-height:46px;width:100%}
body.game-live #game-menu #music-toggle,body.game-live #game-menu #sound,body.game-live #game-menu .music-level,body.game-live #game-menu #gift-entry,body.game-live #game-menu #mobile-help,body.game-live #game-menu #back-camp:not([hidden]){display:flex;align-items:center;justify-content:center}
#game-menu .panel{border:0;padding:0;background:none}
#game-menu #run-kit{position:static;max-width:none;margin:0 0 16px;font-size:14px;color:#e0c783}
#game-menu .panel h2{font-size:18px;letter-spacing:1px}
#menu-inventory .slot{height:66px;font-size:27px;border-radius:5px}
#menu-inventory .slot small{font-size:12px;bottom:4px;right:5px}
#menu-inventory .slot[role=button]{cursor:pointer}
#menu-inventory .slot[role=button]:focus-visible,#menu-inventory .slot.bag-selected{outline:2px solid #edcc8c;outline-offset:1px;background:#32433b}
#menu-inventory #heal{min-height:48px;font-size:16px}
#menu-inventory #heal:disabled{opacity:.45;cursor:default}
#menu-objective .objective{font-size:18px;line-height:1.8}
#menu-objective .legend{flex-wrap:wrap;font-size:13px;margin:20px 0;gap:12px}
#menu-objective .controls{padding-top:20px;border-top:1px solid #6f8a7238}
#menu-objective .controls p{font-size:14px}
body.game-live #journey-notice{top:205px;bottom:auto;left:24px;right:auto;width:178px;max-width:178px;font-size:12px;padding:8px 10px}
body.game-live #raid-hud,body.game-live #rift-hud{top:90px;left:50%;right:auto;transform:translateX(-50%);width:min(550px,calc(100% - 440px))}
body.game-live #rookie-coach{top:110px;width:min(520px,calc(100vw - 450px))}
body.game-live #tutorial-guide{top:88px;width:min(640px,calc(100vw - 450px));max-width:none}
body.game-live #hint{bottom:110px;max-width:calc(100% - 48px);white-space:normal;text-align:center}
@media(max-width:900px),(pointer:coarse){
 body>header{padding:12px 18px;flex-wrap:nowrap}
 body:not(.game-live)>header{flex-wrap:nowrap;padding:12px 18px}
 body:not(.game-live)>header .top{width:auto;max-width:none}
 body>header .brand h1{font-size:22px}
 body>header .top #bank{display:none}
 main{padding:0 8px;margin-top:0}
 main>.arena{height:calc(100dvh - 94px);min-height:510px}
 body>footer{padding:0 16px;font-size:10px;margin:6px 0}
 #overlay{padding:6px}
 #overlay>.modal{padding:42px 14px 12px}
 #overlay>.modal>h2{font-size:25px;letter-spacing:2px;max-width:none}
 #overlay .modal #camp>.section-title{padding:10px 0}
 #camp-bank{font-size:19px}
 #camp-tabs>button{font-size:16px;min-height:48px;padding:11px}
 #departure-steps{gap:20px;font-size:12px}
 .camp-fold>summary{font-size:15px;padding:14px}
 .camp-fold>section,.camp-fold>div{padding:12px}
 #camp-departure{gap:6px;bottom:-12px;padding:10px 0 12px}
 #camp-departure #start{font-size:15px;padding:14px 8px}
 #camp-departure #practice-entry{font-size:12px;padding:8px 4px}
 #camp-departure #back-to-gear{font-size:12px;padding:10px}
 #battle-controls{top:calc(env(safe-area-inset-top) + 16px);right:calc(env(safe-area-inset-right) + 18px);gap:6px}
 #battle-controls button{font-size:13px;padding:9px 10px;min-height:42px}
 #battle-tactics{top:calc(env(safe-area-inset-top) + 16px);left:calc(env(safe-area-inset-left) + 18px);width:128px}
 .minimap-caption{padding:1px 4px}
 .minimap-caption #place-name{font-size:11px}
 #battle-tactics #objective-open{font-size:11px;padding:6px 3px;min-height:32px}
 #battle-clock{left:auto;right:calc(env(safe-area-inset-right) + 18px);top:calc(env(safe-area-inset-top) + 68px);transform:none;padding:5px 12px}
 #battle-clock strong{font-size:20px}
 body.game-live #player-vitals{position:fixed;bottom:calc(env(safe-area-inset-bottom) + 12px);width:220px;padding:7px 12px}
 #touch{--pad-bottom:calc(env(safe-area-inset-bottom) + 82px);height:306px}
 body.game-live #rookie-coach{top:calc(env(safe-area-inset-top) + 146px);width:calc(100vw - 36px);padding:12px 14px}
 body.game-live .rookie-coach>strong{font-size:22px;line-height:1.3}
 body.game-live .rookie-coach>span{font-size:16px;line-height:1.5}
 body.game-live .rookie-actions{position:static;top:auto;left:auto;bottom:auto;transform:none;width:auto}
 body.game-live #tutorial-guide{position:absolute;top:calc(env(safe-area-inset-top) + 150px);width:calc(100% - 36px);max-width:none;font-size:15px;padding:8px 12px}
 body.game-live #journey-notice{top:calc(env(safe-area-inset-top) + 141px);left:calc(env(safe-area-inset-left) + 18px);width:128px;max-width:128px;font-size:11px;padding:6px 8px}
 body.game-live:has(#tutorial-guide:not([hidden])) #journey-notice{display:none}
 body.game-live #raid-hud,body.game-live #rift-hud{position:absolute;top:calc(env(safe-area-inset-top) + 150px);left:50%;right:auto;transform:translateX(-50%);width:calc(100% - 36px);padding:8px 10px}
 body.game-live:has(#raid-hud:not([hidden])) #journey-notice,body.game-live:has(#rift-hud:not([hidden])) #journey-notice{display:none}
 body.game-live #hint{bottom:calc(env(safe-area-inset-bottom) + 322px);font-size:14px;max-width:calc(100vw - 36px);min-width:0}
 body.game-live #toast,body.game-live:has(#raid-hud:not([hidden])) #toast,body.game-live:has(#rift-hud:not([hidden])) #toast{top:auto;bottom:calc(env(safe-area-inset-bottom) + 314px);font-size:13px;white-space:normal;max-width:calc(100% - 36px);text-align:center}
 #game-menu{padding:calc(env(safe-area-inset-top) + 14px) 14px calc(env(safe-area-inset-bottom) + 14px)}
 .game-menu-card{padding:18px;max-width:540px}
 .game-menu-head h2{font-size:24px;letter-spacing:2px}
 #menu-inventory .slot{height:58px}
}
@media(max-width:540px) and (max-height:680px){
 body.game-live #battle-tactics{width:108px;top:12px}
 body.game-live #rookie-coach{top:122px;padding:10px 12px}
 body.game-live .rookie-coach>strong{font-size:20px;line-height:1.25;margin:5px 0}
 body.game-live .rookie-coach>small{font-size:12px;line-height:1.3}
 body.game-live .rookie-coach>span{font-size:16px;line-height:1.4}
 body.game-live .rookie-actions{gap:6px;margin-top:6px}
 body.game-live .rookie-actions button{min-height:40px;padding:6px 8px;font-size:14px}
 #touch .loot-action{bottom:124px}
 #touch .heal-action{bottom:62px}
 body.game-live #hint,body.game-live #toast{bottom:calc(env(safe-area-inset-bottom) + 286px)}
}
@media(max-height:520px) and (min-width:560px){
 body>header{padding:8px 18px}
 main>.arena{min-height:420px}
 #touch{--pad-bottom:calc(env(safe-area-inset-bottom) + 24px);height:190px}
 #touch .loot-action{bottom:104px}
 #touch .heal-action{bottom:90px}
 #battle-tactics{width:110px;top:calc(env(safe-area-inset-top) + 12px)}
 #battle-controls{top:calc(env(safe-area-inset-top) + 12px)}
 #battle-clock{top:calc(env(safe-area-inset-top) + 14px);left:50%;right:auto;transform:translateX(-50%);padding:3px 12px}
 #battle-clock small{display:none}
 body.game-live #player-vitals{width:200px;bottom:calc(env(safe-area-inset-bottom) + 10px);padding:5px 10px}
 body.game-live #sword-art-status{font-size:10px}
 body.game-live #journey-notice{display:none}
 body.game-live #rookie-coach{top:calc(env(safe-area-inset-top) + 56px);width:calc(100vw - 330px);padding:9px 12px}
 body.game-live .rookie-coach>strong{font-size:20px;line-height:1.25;margin:4px 0}
 body.game-live .rookie-coach>small{font-size:12px}
 body.game-live .rookie-coach>span{font-size:16px;line-height:1.4}
 body.game-live #rookie-coach .rookie-actions{position:fixed;top:auto;bottom:auto;left:50%;transform:translateX(-50%);width:max-content;margin-top:12px}
 body.game-live .rookie-actions button{min-height:42px;padding:8px 10px;font-size:14px}
 body.game-live #tutorial-guide{top:calc(env(safe-area-inset-top) + 58px);width:calc(100vw - 330px);font-size:14px;padding:6px 9px}
 body.game-live #raid-hud,body.game-live #rift-hud{top:calc(env(safe-area-inset-top) + 58px);width:calc(100vw - 330px);padding:6px 8px;gap:4px 10px}
 body.game-live #rift-hud strong{font-size:15px}
 body.game-live #rift-hud span,body.game-live #rift-hud small,body.game-live .raid-boss span,body.game-live .raid-hint{font-size:11px}
 body.game-live #hint,body.game-live #toast,body.game-live:has(#raid-hud:not([hidden])) #toast,body.game-live:has(#rift-hud:not([hidden])) #toast{top:auto;bottom:calc(env(safe-area-inset-bottom) + 84px);max-width:calc(100vw - 390px);min-width:150px;font-size:12px}
 #game-menu{padding:12px 18px}
 .game-menu-card{width:min(650px,100%);padding:16px 22px}
 #menu-home{grid-template-columns:1fr 1fr}
 #menu-home>#pause-description,#menu-home>#menu-resume{grid-column:1/-1}
 #menu-home>#back-camp{margin-top:0}
}
@media(prefers-reduced-motion:reduce){#game-menu *,#camp *{scroll-behavior:auto;transition:none}}
