/* Shared presentation, independent of mission rules. */
#viewport .hud{display:flex;flex-wrap:wrap;gap:8px;width:min(370px,calc(100% - 100px));padding:12px;border-radius:var(--cornerRadius,22px);overflow:visible}
#viewport .hud .quest{position:static;inset:auto;flex:0 0 100%;width:100%;max-width:none;margin:0;padding:6px 0 0;border:0;border-top:1px solid #b9d8c9;border-radius:0;background:transparent;box-shadow:none}
#viewport .hud .quest.is-collapsed #objective{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#viewport .hud #quest-fold{display:flex;align-items:center;gap:6px;width:100%;padding:3px 0;background:transparent;min-height:32px;font-size:12px}
#quest-details{padding:8px 0 0}#quest-details p{font-size:13px;line-height:1.6;margin:4px 0 10px}#quest-details button{border-radius:14px;min-height:40px}
#dialog{width:min(var(--dialogWidth,780px),calc(100vw - 24px));border-radius:var(--cornerRadius,22px);border:2px solid #a9d4c1;box-shadow:0 12px 40px #234c3930}
#dialog #content{font-size:var(--textSize,15px);line-height:1.65;padding:18px;overflow-wrap:break-word;word-break:normal}
#content p{max-width:68ch;line-height:1.65}#content h2{font-size:1.2em;color:#367f83;margin:8px 0 14px}#content h3{font-size:1.05em}
#content .dialog-intro{display:flex;align-items:center;gap:14px;padding:12px;background:#edf7ee;border:1px solid #cce6d6;border-radius:var(--cornerRadius,22px);margin-bottom:14px}
#content .dialog-actions{display:flex;flex-wrap:wrap;gap:8px;padding-top:12px;border-top:1px solid #d8e8dc;margin-top:14px}
#content .dialog-actions button{flex:1 1 140px;margin:0;min-height:44px}#content button.choice,#content [data-report-answer]{text-align:left;white-space:normal;line-height:1.6;border-radius:16px;padding:12px 14px;margin:6px 0}
#content [data-api-error]{border:1px solid #edc48a;border-left:5px solid #e5ad60;background:#fff5df;border-radius:16px;padding:12px;color:#805c32}
#content input,#content select{max-width:100%;min-height:44px;border-radius:12px}#content table{font-size:.93em}#content .note{border-radius:16px;line-height:1.65}
.helper-toast-card{border-radius:var(--cornerRadius,22px)!important;height:auto!important;min-height:66px!important}#toast-layer #toast{display:block!important;max-height:110px!important;overflow:auto!important;-webkit-line-clamp:unset!important;line-height:1.6!important}
#content .tablet-apps{grid-template-columns:repeat(var(--menuColumns,3),minmax(0,1fr))!important}
#content .tablet-app-icon{max-width:100%}#content .tablet-app-icon canvas{max-width:100%;object-fit:contain}#viewport .bottom{width:min(600px,calc(100% - 24px))}#viewport .hotbar button{flex-shrink:1;min-width:44px}#viewport .hotbar .control-art{max-width:100%;object-fit:contain}
html[data-helper-visible="0"] #helper-strip{visibility:hidden;height:0;min-height:0;padding:0;border:0}
html[data-motion="0"] *,html[data-motion="0"] *::before,html[data-motion="0"] *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
@media(max-width:600px){#content .tablet-apps{grid-template-columns:repeat(2,minmax(0,1fr))!important}#content .menu-tablet .tablet-app-icon{width:calc(var(--mobileIcon,62px) + 6px);height:calc(var(--mobileIcon,62px) + 6px);flex-basis:calc(var(--mobileIcon,62px) + 6px)}#content .menu-tablet .tablet-app-icon canvas.gear-icon{width:var(--mobileIcon,62px)!important;height:var(--mobileIcon,62px)!important}#dialog #content{padding:12px;font-size:max(14px,var(--textSize,15px))}#viewport .hud{padding:8px;gap:5px}#content .dialog-intro{padding:10px;gap:10px}#content .portrait{max-width:76px;max-height:96px}#content .dialog-actions button{flex-basis:110px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
.bottom .dock-toggle{align-self:center;display:flex;align-items:center;justify-content:center;gap:5px;min-height:44px;padding:6px 14px;border:1px solid #9ecab5;border-radius:22px;background:#fffdf3ee;color:#477b69;font-size:12px;box-shadow:0 2px 5px #254e391a}
.dock-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#viewport .bottom.is-folded .hotbar,#viewport .bottom.is-folded .controls{display:none!important}.bottom.is-folded .dock-toggle svg{transform:rotate(180deg)}
/* A vector handle stays crisp at every screen density. */
#viewport .bottom{padding-top:28px;gap:8px}
#viewport .bottom .dock-toggle{position:absolute;top:0;left:50%;transform:translateX(-50%);width:54px;height:44px;min-height:44px;padding:4px;border:2px solid #8ebca3;border-radius:22px 22px 17px 17px;background:linear-gradient(145deg,#fffdf0,#dff3e4);box-shadow:inset 0 2px 0 #fff,0 3px 0 #79a88b,0 5px 10px #284d3520;z-index:3;transition:background .15s,box-shadow .15s}
#viewport .bottom .dock-toggle svg{width:32px;height:32px;stroke:none;overflow:visible;transition:transform .18s}
.dock-toggle .dock-arrow-shadow{fill:none;stroke:#bad8b4;stroke-width:6;stroke-linecap:round;stroke-linejoin:round}.dock-toggle .dock-arrow{fill:none;stroke:#4f9879;stroke-width:5;stroke-linecap:round;stroke-linejoin:round}.dock-toggle .dock-dot{fill:#d4ae5c}
#viewport .bottom .dock-toggle:hover{background:linear-gradient(145deg,#fff8d9,#d1eddb)}#viewport .bottom .dock-toggle:active{box-shadow:inset 0 2px 0 #fff,0 1px 0 #79a88b}#viewport .bottom .dock-toggle:focus-visible{outline:3px solid #e6b85f;outline-offset:3px}
#viewport .bottom .hotbar{padding:13px 8px 8px;border:1px solid #b9d9c5;border-radius:25px;background:linear-gradient(150deg,#fffdf1dd,#e6f6e9dd);box-shadow:0 3px 9px #284d3514;gap:6px}
#viewport .bottom.is-folded{padding-top:26px}#viewport .bottom.is-folded .helper-strip{padding-top:14px}
@media(max-width:700px){#viewport .bottom .hotbar{padding:12px 6px 6px;gap:5px;border-radius:22px}#viewport .bottom .dock-toggle{width:50px}#viewport .bottom{gap:6px}}
/* The goal panel uses the same vector handle as the lower dock. */
#viewport .hud #quest-fold{gap:8px;padding:3px 0;min-height:50px}
#viewport .hud .quest-chevron{margin-left:auto;display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border:2px solid #8ebca3;border-radius:17px;background:linear-gradient(145deg,#fffdf0,#dff3e4);box-shadow:inset 0 2px 0 #fff,0 2px 0 #79a88b;transform:none!important}
.quest-chevron svg{width:30px;height:30px;fill:none;transition:transform .18s}.quest-chevron .quest-arrow-shadow{stroke:#bad8b4;stroke-width:6;stroke-linecap:round;stroke-linejoin:round}.quest-chevron .quest-arrow{stroke:#4f9879;stroke-width:5;stroke-linecap:round;stroke-linejoin:round}.quest-chevron circle{fill:#d4ae5c}
#quest-fold[aria-expanded=true] .quest-chevron svg{transform:rotate(180deg)}#quest-fold:hover .quest-chevron{background:linear-gradient(145deg,#fff8d9,#d1eddb)}#quest-fold:focus-visible{outline:3px solid #e6b85f;outline-offset:2px;border-radius:16px}
@media(max-width:700px){#viewport .hud #quest-fold{min-height:44px;gap:5px;padding:0}#viewport .hud .quest-chevron{flex-basis:44px;margin-left:4px;border-radius:15px}}
#viewport .hud .money{display:grid;grid-template-columns:40px auto;align-items:center;gap:1px 7px;margin-left:auto}
#viewport .hud #hud-coin-art{width:40px;height:40px;grid-row:1/3;display:grid;place-items:center;background:linear-gradient(145deg,#fff9dd,#f6e7b5);border:1px solid #e0cb8e;border-radius:50%;box-shadow:inset 0 1px 0 #fffdf1}
#viewport .hud #hud-coin-art canvas{width:36px!important;height:36px!important;image-rendering:auto}
#viewport .hud #coins{font-size:22px;font-weight:700;line-height:1.2;color:#a5762b;font-variant-numeric:tabular-nums}#viewport .hud #save{grid-column:2;font-size:9px}
@media(max-width:700px){#viewport .hud .money{display:flex;gap:5px;margin:0}#viewport .hud #hud-coin-art{width:36px;height:36px;flex-shrink:0}#viewport .hud #hud-coin-art canvas{width:32px!important;height:32px!important}#viewport .hud #coins{font-size:18px}}
#mobile-level{display:none}#hud-coin-art{display:inline-flex;vertical-align:middle}#hud-coin-art canvas{width:22px;height:22px}#hud-quest-art{display:none}
#viewport .hud #quest-fold{justify-content:flex-start;min-height:44px}#quest-label{display:none!important}#hud-quest-art{display:flex;position:relative;background:#e4f3e8;border-radius:12px;padding:5px}#hud-quest-art canvas{width:30px;height:30px}#hud-quest-art::after{content:'';position:absolute;right:1px;top:1px;width:9px;height:9px;background:#e5b452;border:2px solid #fffdf4;border-radius:50%}#quest-fold[data-phase=field] #hud-quest-art::after{background:#55a6d0}#quest-fold[data-phase=analysis] #hud-quest-art::after{background:#a287d7}#quest-fold[data-phase=report] #hud-quest-art::after{background:#69b485}#quest-progress:empty{display:none}
@media(max-width:700px){
 #viewport .hud{width:calc(100% - 84px);min-width:0;left:8px;right:auto;top:8px;padding:7px 9px;display:grid;grid-template-columns:auto auto 1fr;gap:5px 8px;align-items:center;border-radius:18px}
 #viewport .hud .crest,#viewport .hud .identity>strong,#viewport .hud #rank,#viewport .hud .exp,#viewport .hud #save{display:none}
 #viewport .hud #mobile-level{display:block;font-size:12px;font-weight:700;color:#447c6b;white-space:nowrap}
 #viewport .hud .money{display:flex;align-items:center;gap:4px;font-size:14px;margin:0;white-space:nowrap}#hud-coin-art canvas{width:24px;height:24px}
 #viewport .hud .quest{display:contents}#viewport .hud #quest-fold{justify-content:flex-end;gap:4px;min-height:44px;margin:0;padding:2px;border:0;font-size:12px;text-decoration:none}
 #quest-label{display:none}#hud-quest-art{display:flex}#hud-quest-art canvas{width:25px;height:25px}#quest-progress{font-weight:700;white-space:nowrap}.quest-chevron{font-size:16px}
 #viewport .hud #objective{grid-column:1/-1;font-size:13px;line-height:1.5;margin:2px 0;padding-top:8px;border-top:1px solid #c7e0d2}
 #viewport .hud .quest.is-collapsed #objective,#viewport .hud .quest.is-collapsed #quest-details{display:none}
 #viewport .hud #quest-details{grid-column:1/-1;padding:0;max-height:35dvh;overflow:auto}#viewport .hud #quest-details p{font-size:12px;margin:4px 0 8px}#viewport .hud #quest-button{display:none}
 #viewport .hud #quest-next{width:100%;min-height:44px;font-size:13px;margin:0}#viewport .hud .quest-chevron{transition:transform .15s}#viewport .hud #quest-fold[aria-expanded=true] .quest-chevron{transform:rotate(180deg)}
}
