/* Battle-first home: a compact status strip, scenery and reachable controls. */
#gameScreen{max-width:1180px;padding-top:10px}
#gameScreen>header{min-height:48px;height:auto;margin-bottom:10px;gap:10px}
#gameScreen>header .brand-game-icon{width:38px;height:38px}
#gameScreen>header .brand small,#gameScreen>header .edition{display:none}
#gameScreen>header .brand h1{font-size:20px;letter-spacing:2px}
#homeMenu{margin-left:auto;min-height:40px;padding:7px 14px;font-size:14px}
#gameScreen[data-home=true] #routeShell{display:none}
#gameScreen #homePage{display:flex;flex-direction:column;align-items:stretch;gap:12px;max-width:960px;margin:0 auto}
#homePage[hidden]{display:none!important}
#homePage>.home-hud{order:-2}
#homePage>.adventure{order:-1;min-width:0}
.home-hud{padding:12px 16px;background:linear-gradient(120deg,#242b29,#101819);border:1px solid #6f6246;border-radius:8px;box-shadow:inset 0 1px #d7b87522}
.home-hud-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}
#homeCharacter{display:flex;align-items:baseline;gap:10px;min-width:0;min-height:32px}
#homeName{font-size:18px;overflow-wrap:anywhere;color:#f2deba}
#homeLevel{font-size:14px;white-space:nowrap;color:#d5bd8a}
.home-wallet{font-size:14px;color:#aab4ad;text-align:right;white-space:nowrap}.home-wallet b{display:block;color:#e9cf89;font-size:16px;font-variant-numeric:tabular-nums}
.home-vitals{display:grid;grid-template-columns:1fr 1fr;gap:12px}.home-vitals .hero-health{width:100%;max-width:none;margin:0;font-size:14px}.home-vitals .bar{height:7px;margin:5px 0 0}.home-vitals b{font-weight:500;font-variant-numeric:tabular-nums}
.home-hud-footer{display:flex;justify-content:space-between;gap:10px;margin-top:8px;color:#aebcb4;font-size:13px}
#homePage #scene{padding:16px 22px 12px;border-color:#8b7448;border-radius:8px 8px 0 0;box-shadow:none;min-height:380px;display:flex;flex-direction:column;position:relative}
#scene>.battle-background{z-index:0;background-color:#162620}
#scene:before{z-index:1;background:linear-gradient(#071012b8,transparent 32%,#0710121a 66%,#071012d9)}
#scene>*:not(.battle-background){z-index:2}
#scene .place{margin:8px 0 10px;text-align:left}
#scene .place>span{font-size:13px;color:#ddd1b7;letter-spacing:1px}
#scene .place h2{font-size:26px;line-height:1.25;margin:4px 0;letter-spacing:1px;color:#ffedc9}
#scene .place p{font-size:14px;margin:4px 0;color:#d4dbcf}
#scene .scene-top{font-size:12px;letter-spacing:1px;color:#e4d6b7}
#scene .status{background:#132d26c9;border:1px solid #72988180;padding:3px 8px;border-radius:4px}
#scene[data-paused=true] .status{background:#383127d9;border-color:#a18b65}
.home-map-toolbar{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:4px}
.home-map-toolbar button{min-height:38px;padding:7px 12px;font-size:14px;background:#0c1a18d9;border-color:#b29a6366;color:#f1e3c4}
#scene .enemy{width:min(100%,340px);margin:10px auto 0;background:#081719bd;padding:8px 12px}
#scene .enemy-top{font-size:13px;gap:8px;align-items:center}#scene .enemy-info{font-size:14px}#scene #enemyHp{font-size:12px;white-space:nowrap}
#scene .combat{flex:1;min-height:165px;margin:12px 0 0;justify-content:center}
#scene .battle-lineup{gap:clamp(12px,7vw,70px);align-items:center}
#scene .battle-art{width:120px;height:144px;border:1px solid #bca66c;border-radius:7px;background:#141d1c;box-shadow:0 8px 22px #0009,inset 0 0 0 1px #dcb77944}
#scene .battle-art .source-art{background:#141d1c}
#scene .battle-art{position:relative}
.battle-hit-flash{position:absolute;inset:0;pointer-events:none;background:linear-gradient(125deg,transparent 43%,#fff2bb99 47%,#fff9e5 50%,transparent 54%)}
.battle-hit-flash.magic{background:radial-gradient(ellipse,#f5edffff 0%,#ad82f0aa 20%,#7059d866 42%,transparent 70%)}
#scene .battle-art .portrait-art{background:linear-gradient(#15221f,#080b0d)}
#scene .battle-actor>span{font-size:13px;max-width:150px;background:#091716b3;padding:4px 8px}
#scene .combat-sigil{font-size:22px;opacity:.8}
#scene .battle-caption{font-size:13px;margin-top:12px;color:#e2d3b2}
#scene .scene-bottom{font-size:12px;margin-top:8px;flex-wrap:wrap;gap:4px 12px}#scene .scene-bottom span{font-size:12px}
.home-quick-actions{display:grid;grid-template-columns:1.35fr 1fr 1fr 1fr;gap:6px;background:#111d1c;border:1px solid #8b7448;border-top:0;border-radius:0 0 8px 8px;padding:10px}
.home-quick-actions button{font-size:15px;min-height:48px;padding:8px 4px;border-color:#686247;white-space:normal}
.home-quick-actions #auto{background:linear-gradient(#a28b51,#65552e);color:#fff1ce;border-color:#c8a76a}
.home-quick-actions #drinkNow{background:#482828;color:#ffddd0;border-color:#a56350}
.home-quick-actions #drinkNow:disabled{background:#282725;color:#9e9f94;border-color:#50514a}
#homePage .skill-bar{margin:10px 0;gap:6px}#homePage .skill-bar button{min-height:52px}
.home-auto-summary{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px;font-size:14px;color:#a8bbb0;margin:8px 0}
#homeHealSetting{font-size:14px;background:none;border:0;color:#cee0b5;padding:4px 0;min-height:32px;text-align:left}
#homePage .hunt-income{padding:8px 0;margin:0 0 8px;border:0;background:none;display:flex;justify-content:space-between;gap:8px;font-size:13px;color:#a9b9ae}#homePage .hunt-income>strong{display:none}
.home-character-details,.home-journal-details,.home-battle-settings{border:1px solid #4d574c;background:#111d1de8;border-radius:8px;overflow:hidden}
.home-character-details>summary,.home-journal-details>summary,.home-battle-settings>summary{padding:14px 16px;font-size:15px;color:#dcc899;cursor:pointer;min-height:48px}
.home-character-details>.profile{margin:0;border:0!important;width:100%}.home-journal-details>.journal{display:block;margin:0;width:100%;padding:16px;border:0}
.home-battle-settings>div,.home-battle-settings>p{margin:10px 14px}.home-battle-settings .healing-panel{padding:12px}.home-battle-settings .poly-status{font-size:14px}.home-battle-settings .battle-scene-tools{font-size:14px}.home-battle-settings .healing-panel button{font-size:14px}
#homePage .journal-title{display:none}#homePage #logs{max-height:200px}#homePage .save-note{display:none}
#homeSystemDialog{width:min(94vw,520px)}.home-system-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.home-system-actions button{width:100%;margin:0;min-height:48px;font-size:15px}.home-system-actions #openNotices{grid-column:1/-1}.home-system-actions .exit-game{margin:0}
#homeSystemDialog .game-sync-toolbar{display:flex;flex-direction:column;margin:18px 0 0}.home-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.home-dialog-heading h2{margin:0;font-size:22px;line-height:1.4}.home-dialog-heading small{font-size:13px;color:#c7ac73}.home-dialog-heading button{font-size:14px;min-height:44px;white-space:nowrap}
#homeSystemDialog #help{width:100%;height:auto;border-radius:5px;padding:11px 15px}
#homeMapDialog{width:min(94vw,690px);max-height:88svh;padding:20px}#homeMapDialog>label{display:block;margin:14px 0 6px;font-size:14px;color:#d7c49b}#homeMapDialog>input,#homeMapDialog>select{width:100%;min-height:44px;font-size:16px;box-sizing:border-box}#homeMapDialog>select{background:#101b1e;color:#e2dcc9;border:1px solid #4e5d50;padding:8px;border-radius:5px}
#homeCurrentMap{font-size:14px;color:#afc6b7;margin:0}#homeMapDialog h3{font-size:16px;margin:20px 0 10px}
.home-map-card{display:flex;align-items:center;gap:12px;width:100%;padding:10px;margin:6px 0;text-align:left;white-space:normal;background:#162322;border:1px solid #414e46;border-radius:7px}.home-map-card.current{border-color:#ba9a5a;background:#2b3024}.home-map-card>span:nth-child(2){flex:1;min-width:0}.home-map-card strong{display:block;font-size:16px;color:#eaddbf;overflow-wrap:anywhere}.home-map-card small{display:block;font-size:13px;color:#afbeb5;line-height:1.6;margin-top:3px}.home-map-card .hunt-badge{font-size:12px;margin-top:4px}.home-map-select{font-size:13px;color:#d7bb7b;flex:none}
.home-map-thumb{display:block;flex:none;width:68px;height:68px;border-radius:5px;border:1px solid #776644;background:url('art/battle/terrain-atlas.webp?battle=74') var(--land-x) var(--land-y)/300% 300% no-repeat}.home-map-thumb.ship{background:url('art/battle/ship-deck.webp?battle=74') center/cover}
.home-all-maps{display:block;padding:14px;margin-top:14px;text-align:center;color:#ddc490;border:1px solid #766749;border-radius:5px;font-size:15px}
.home-loot-list section{margin:16px 0}.home-loot-list section>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.home-loot-list button{display:flex;gap:8px;align-items:center;padding:8px;font-size:14px;text-align:left;white-space:normal}.home-loot-list .source-art{width:36px;height:36px;flex:none}.home-loot-list button>span:last-child{min-width:0;overflow-wrap:anywhere}
#bottomNavigation{max-width:760px;padding-top:5px}#bottomNavigation a{padding:5px 2px;font-size:13px}#bottomNavigation a span{font-size:21px}
@media(min-width:800px){#homePage #scene{min-height:460px;padding:20px 30px 14px}#scene .battle-art{width:150px;height:168px}#scene .combat{min-height:220px}.home-hud{padding:14px 24px}.home-vitals{gap:30px}.home-map-toolbar{position:absolute!important;right:25px;top:65px;max-width:46%;justify-content:flex-end}#scene .place{padding-right:46%}.home-character-details .profile{max-width:none}}
@media(max-width:480px){#gameScreen{padding:8px 10px 100px}#gameScreen>header .brand-game-icon{width:32px;height:32px}#gameScreen>header .brand h1{font-size:18px}#homePage #scene{padding:12px;min-height:380px}#scene .place h2{font-size:22px}#scene .battle-art{width:102px;height:120px}#scene .battle-lineup{gap:16px}.home-hud{padding:10px 12px}.home-hud-heading{gap:6px;margin-bottom:7px}#homeName{font-size:16px}#homeCharacter{gap:6px;flex-wrap:wrap}#homeLevel{font-size:13px}.home-wallet b{font-size:15px}.home-vitals{gap:10px}.home-vitals .hero-health{font-size:12px}.home-hud-footer{font-size:12px}.home-quick-actions{gap:5px;padding:8px}.home-quick-actions button{font-size:14px}.home-map-toolbar button{flex:1;padding:7px 6px}#homeMapDialog{padding:16px}.home-map-thumb{width:54px;height:62px}.home-map-card{gap:9px}.home-map-card strong{font-size:15px}.home-map-select{display:none}.home-loot-list section>div{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){#scene *{animation:none!important;transition:none!important}}
