/* v40: stable stage identity, not a transient toast. All text stays selectable-sized. */
.location{display:none}
.stage-hud{position:absolute;z-index:6;top:10px;left:50%;transform:translateX(-50%);width:min(410px,38vw);display:flex;gap:6px;align-items:stretch;pointer-events:none;color:#f3f4ef}
.stage-hud-main{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px;padding:9px 13px;border:1px solid #839eab73;border-radius:10px;background:linear-gradient(145deg,#102337f2,#101c2bf2);text-align:left;box-shadow:0 3px 13px #0005;pointer-events:auto;cursor:pointer;color:inherit}
#stage-hud-region{font-size:13px;line-height:18px;color:#c5d9e6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stage-hud-heading{display:flex;align-items:baseline;gap:9px;min-width:0}
#stage-hud-difficulty{font-size:13px;font-weight:700;color:#84e2ce;flex-shrink:0;max-width:40%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#stage-hud-stage{font-size:23px;line-height:28px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap;letter-spacing:.02em}
.stage-hud-detail{display:flex;justify-content:space-between;gap:8px;min-width:0;font-size:12px;line-height:17px;color:#abc5d5}
#stage-hud-progress{font-weight:700;font-variant-numeric:tabular-nums;color:#deecef;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stage-hud-track{display:block;height:3px;border-radius:2px;overflow:hidden;background:#49606d66;margin-top:2px}
.stage-hud-track>i{display:block;height:100%;width:0;background:#84dbc1;transition:width .16s linear}
.return-town-button{pointer-events:auto;display:flex;flex-direction:column;justify-content:center;gap:5px;width:82px;flex-shrink:0;padding:6px;border-radius:10px;border:1px solid #7896968c;background:#18312feb;color:#def5e9;box-shadow:0 3px 13px #0004}
.return-town-button strong{font-size:14px;line-height:20px}.return-town-button small{font-size:11px;line-height:16px;color:#a9cabe}
.return-town-button:hover{background:#244a42;border-color:#a0e2c7}
.stage-hud[data-region="dungeon"] .stage-hud-main{border-color:#d79a708c;background:linear-gradient(145deg,#342229ed,#201c29f2)}
.stage-hud[data-region="dungeon"] #stage-hud-stage{color:#ffd6a4;font-size:21px}
.stage-hud[data-region="dungeon"] #stage-hud-difficulty{color:#f1b18a}
.stage-hud[data-region="dungeon"] .stage-hud-track{display:none}
.stage-hud[data-region="town"] .stage-hud-track{display:none}
#target-panel.target-panel{left:50%;right:auto;transform:translateX(-50%);top:118px;width:min(325px,34vw);max-width:none}
#dungeon-banner{top:29%}
.refining-kina-cost{display:block;font-size:15px;color:#f2d89c;margin-top:5px}
.tune-line-button small{display:block;font-size:14px;line-height:22px;color:#edd29a;white-space:normal}
.tuning-kina-wallet{font-size:15px!important;line-height:22px;color:#f2d89c!important;font-variant-numeric:tabular-nums}
.tuning-help{font-size:14px!important;line-height:1.65!important}
:root[data-touch="true"] .stage-hud{top:6px;width:34%;gap:4px}
:root[data-touch="true"] .stage-hud-main{padding:5px 7px;gap:1px}
:root[data-touch="true"] #stage-hud-region{font-size:12px;line-height:16px}
:root[data-touch="true"] #stage-hud-stage{font-size:19px;line-height:25px}
:root[data-touch="true"] #stage-hud-difficulty{font-size:12px}
:root[data-touch="true"] .stage-hud-detail{font-size:11px;line-height:16px;gap:4px}
:root[data-touch="true"] .return-town-button{width:64px;padding:4px;gap:1px;min-height:44px}
:root[data-touch="true"] .return-town-button strong{font-size:12px;line-height:18px}
:root[data-touch="true"] .return-town-button small{font-size:10px;line-height:14px}
:root[data-touch="true"] #target-panel.target-panel{top:6px;left:auto;right:max(6px,var(--safe-right));transform:none;width:28%;max-width:28%}
:root[data-touch="true"] .right-hud{top:112px;width:24%;max-width:24%}
@media(max-width:699px){
 .stage-hud{top:93px;width:calc(100% - 16px);max-width:410px}
 :root[data-touch="true"] .stage-hud{top:88px;width:calc(100% - 16px);max-width:none;gap:6px}
 :root[data-touch="true"] .stage-hud[data-region="dungeon"]{top:110px}
 :root[data-touch="true"] .stage-hud-main{padding:6px 9px}
 :root[data-touch="true"] #stage-hud-stage{font-size:22px;line-height:27px}
 :root[data-touch="true"] #stage-hud-region{font-size:13px;line-height:18px}
 :root[data-touch="true"] .stage-hud-detail{font-size:12px;line-height:18px}
 :root[data-touch="true"] .return-town-button{width:79px}
 :root[data-touch="true"] .return-town-button strong{font-size:14px}
 :root[data-touch="true"] .return-town-button small{font-size:11px}
 :root[data-touch="true"] #target-panel.target-panel{top:6px;left:auto;right:max(6px,var(--safe-right));transform:none;width:52%;max-width:52%}
 /* Stage goal is now in the fixed panel. Keep detailed quest available on larger displays. */
 :root[data-touch="true"] .right-hud{display:none}
 :root[data-touch="true"] .auto-run-banner{top:191px;max-width:calc(100% - 16px);font-size:12px;background:#102435e8}
 :root[data-touch="true"] #toast-stack{top:34%}
 .refining-kina-cost{font-size:15px}.tune-line-button small{font-size:14px}
}
:root[data-touch="true"][data-control-layout="compact"] .stage-hud{top:6px;width:35%;max-width:none}
:root[data-touch="true"][data-control-layout="compact"] #stage-hud-stage{font-size:18px;line-height:23px}
:root[data-touch="true"][data-control-layout="compact"] #stage-hud-region{font-size:12px;line-height:16px}
:root[data-touch="true"][data-control-layout="compact"] .stage-hud-detail{font-size:10px;line-height:15px}
:root[data-touch="true"][data-control-layout="compact"] .return-town-button{width:62px}
:root[data-touch="true"][data-control-layout="compact"] .return-town-button strong{font-size:12px}
:root[data-touch="true"][data-control-layout="compact"] .return-town-button small{display:none}
:root[data-touch="true"][data-control-layout="compact"] #target-panel.target-panel{top:6px;left:auto;right:max(6px,var(--safe-right));transform:none;width:28%;max-width:28%}
:root[data-touch="true"][data-control-layout="compact"] .right-hud{display:none}
:root[data-touch="true"][data-control-layout="compact"] .auto-run-banner{top:95px;max-width:44%}
@media(prefers-reduced-motion:reduce){.stage-hud-track>i{transition:none}}
/* Notifications must not slide upward over the persistent stage panel. */
#toast-stack{transform:translateX(-50%)}
:root[data-touch="true"] #toast-stack{transform:translateX(-50%);top:120px}
:root[data-touch="true"] #toast-stack .toast:not(:last-child){display:none}
@media(max-width:699px){:root[data-touch="true"] #toast-stack{top:220px}}
:root[data-touch="true"][data-control-layout="compact"] #toast-stack{top:92px;left:6px;transform:none;width:min(240px,28vw);max-width:240px;align-items:stretch}
