/* a17-kit.css: fits the team UI kit (game-hud / field-notes / equipment-card) into the game.
   The old HUD nodes stay in the DOM for the JS that reads or clicks them; only their looks go. */

/* ---- main HUD ---- */
#obj, #vitals, #comm, #need, #topbtns, #minimap, #marker, #legend { display: none !important; }
#hud > #game-hud { pointer-events: none; }                 /* #hud > * would make the overlay eat drags */
#game-hud.lh-ui { position: absolute; z-index: 0; }        /* inside #hud: follows its safe-area insets */
.lh-ui .lh-radio { padding: 4px 0; }
.lh-ui .lh-radio[data-state="soon"], .lh-ui .lh-radio[data-state="wait"] { color: var(--lh-amber); }
.lh-ui .lh-radio[data-state="wait"] .lh-label { color: var(--lh-amber); }
.lh-ui .lh-warning { text-align: left; align-items: flex-start; cursor: pointer; }
.lh-ui .lh-vital[data-low="true"] .lh-value, .lh-ui .lh-vital[data-low="true"] .lh-label,
.lh-ui .lh-power[data-low="true"] { color: var(--lh-amber); }
body.wrist .lh-minimap, body.aiming .lh-minimap { display: none; }
.lh-map-slot #mini { position: absolute; inset: 0; width: 100%; height: 100%; }
.lh-map-slot #mini .pin text { font-size: 2.3px; }
/* off-screen destination: a thin chevron on the screen edge, no label */
#edge .lab { display: none; }
#edge .arr { background: none; box-shadow: none; width: 28px; height: 28px; margin: -14px; }
#edge .arr svg { stroke: #e6e0cc; stroke-width: 1.6; filter: drop-shadow(0 1px 3px #000a); }
/* the survival spot marker in the same language: dot + text, no box */
#marker2 .dot { width: 7px; height: 7px; margin: -3.5px; border: 0; background: #edb44e; box-shadow: 0 0 0 2px #0004; }
#marker2 .lab, #edge2 .lab { background: none; border: 0; color: #edb44e; font-size: 12px; letter-spacing: 0.06em; text-shadow: 0 1px 5px #000c; padding: 0; }
#edge2 .arr { background: none; box-shadow: none; }
#edge2 .arr svg { stroke: #edb44e; stroke-width: 1.8; filter: drop-shadow(0 1px 3px #000a); }
/* bottom-centre stack (hints, parts, aim panel) sits above the kit's control line */
body:not(.touch) #hud #stack { bottom: calc(4.5% + 34px); }
body.touch .lh-controls { display: none; }
/* arrival: the life-support block comes up meter by meter with the boot lines (flow.js adds .on) */
#hud.boot > #game-hud { visibility: visible; }
#hud.boot .lh-ui > :not(.lh-life), #hud.boot .lh-life > .lh-warning, #hud.boot .lh-life > .lh-date { visibility: hidden; }
#hud.boot .lh-oxygen, #hud.boot .lh-meter, #hud.boot .lh-vital, #hud.boot .lh-power { transition: opacity 0.3s; }
#hud.boot:not(:has(#mO2.on)) :is(.lh-oxygen, .lh-meter), #hud.boot:not(:has(#mCo2.on)) [data-w="co2"],
#hud.boot:not(:has(#mWater.on)) [data-w="water"], #hud.boot:not(:has(#mTemp.on)) [data-w="body"],
#hud.boot:not(:has(#mPow.on)) [data-w="power"] { opacity: 0; }
/* touch: the joystick owns the bottom-left corner, the [E] button the right side */
body.touch .lh-life { bottom: calc(28px + 160px); }
body.touch #bAct { bottom: calc(4% + 19.3vw / 1.5 + 64px); }
@media (max-width: 600px) {
  body.touch .lh-life { top: 182px; bottom: auto; }
  body.touch #bAct { bottom: 180px; }
}
@media (max-height: 550px) and (min-width: 601px) {
  body.touch .lh-life { bottom: 150px; }
  body.touch .lh-life .lh-power { display: none; }
  body.touch #bAct { bottom: 170px; }
}
@media (max-width: 360px) { .lh-ui .lh-life { width: 190px; } .lh-ui .lh-value { font-size: 15px; } }

/* ---- zoomed notebook = field notes; the old HTML zoom pages are gone ---- */
aside#wrist.note { display: none !important; }
.fn-map #map { display: block; width: 100%; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; }
.fn-ui .fn-list { list-style: none; margin: 0 0 24px; padding: 0; font-size: 16px; }
.fn-ui .fn-list li { display: flex; gap: 12px; align-items: center; min-height: 36px; padding: 4px 0; color: var(--ink); background: none; border: 0; }
.fn-ui .fn-list li.ok { color: var(--done); }
.fn-ui .fn-list li.none { color: var(--muted); }
.fn-ui .fn-list li:has(.lk) { padding: 0; }
.fn-ui .fn-list .lk { display: flex; gap: 12px; align-items: center; width: 100%; min-height: 40px; text-align: left; }
.fn-ui .fn-list .lk:hover { color: var(--active); }
.fn-ui .fn-list .box { width: 17px; height: 17px; border: 1.5px solid #847a68; border-radius: 0; flex: none; position: relative; box-shadow: none; }
.fn-ui .fn-list li.ok .box { border-color: var(--done); }
.fn-ui .fn-list li.ok .box::after { content: ''; position: absolute; left: 4px; top: 0; width: 4px; height: 9px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.fn-ui .fn-list small { color: var(--muted); }
.fn-ui .fn-list.inv li { min-height: 30px; }
.fn-ui .fn-cards { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 4px; }
.fn-ui .fn-cards li.none { color: var(--muted); font-size: 15px; }
.fn-ui .fn-cards .lcard { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; width: 100%; padding: 8px 0; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; color: var(--ink); }
.fn-ui .fn-cards .lcard:hover b { color: var(--active); }
.fn-ui .fn-cards .thumb svg { width: 112px; height: auto; display: block; background: #23272a; }
.fn-ui .fn-cards .thumb * { animation: none !important; }
.fn-ui .fn-cards .lt { display: grid; gap: 2px; min-width: 0; }
.fn-ui .fn-cards b { font-size: 16px; font-weight: 600; }
.fn-ui .fn-cards small { font-size: 13px; color: var(--muted); line-height: 1.45; }
.fn-ui[lang=ko] :is(.fn-list, .fn-cards, .fn-objective) { word-break: keep-all; }
@media (max-width: 740px) { .fn-ui .fn-cards .lcard { grid-template-columns: 88px 1fr; } .fn-ui .fn-cards .thumb svg { width: 88px; } }

/* ---- info cards = equipment card ---- */
/* layout: css/kit/equipment-card.css (side panel / bottom sheet, one hero picture) */
@media (prefers-reduced-motion: reduce) { .ec-ui .ec-pic * { animation: none !important; } }
/* the help card (tagged lines) keeps its modal, in the same charcoal */
#card .panel { background: #11191cf5; border: 0; border-top: 1px solid #9bafaa; border-radius: 0; }
#card .panel h2::before { display: none; }
#card .panel h2 { padding-left: 0; font-weight: 500; }

/* ---- other screens on the team style guide (css/kit/design-tokens.css): radius 0, 1px lines and spacing,
   colours by role, text "계속 →" buttons, no glow / gradients. Intro book and ending book keep their own look. ---- */
#hud .kc, .modal .kc, #noteBar .kc, #soundGate .kc { background: none; border: 1px solid var(--a17-rule-dark); border-radius: 0; color: var(--a17-hud-muted); box-shadow: none;
  font: 11px var(--a17-mono); letter-spacing: .06em; min-width: 22px; height: 22px; padding: 0 5px; }
/* dialogs: choice (insulation / cover), result, fail, help, recall quiz */
.modal { background: rgb(1 5 5 / .8); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.modal .panel { font-family: var(--a17-font); color: var(--a17-text-dark); background: var(--a17-surface-dark); border: 0; border-top: 1px solid #9bafaa; border-radius: var(--a17-radius-control);
  box-shadow: 0 24px 90px #0006; padding: var(--a17-space-6); width: min(640px, 100%); animation: none; }
.modal .panel h2 { padding: 0 0 var(--a17-space-3); margin: 0 0 var(--a17-space-4); font-size: clamp(22px, 2.4vw, 30px); font-weight: 500; letter-spacing: -.03em; line-height: 1.25; border-bottom: 1px solid var(--a17-rule-dark); }
.modal .panel h2::before { display: none; }
.modal .panel li { font-size: var(--a17-body); line-height: 1.7; }
.modal .primary { width: 100%; justify-content: flex-end; background: none; color: var(--a17-text-dark); border: 0; border-top: 1px solid var(--a17-rule-dark); border-radius: 0;
  font-weight: 400; font-size: var(--a17-small); letter-spacing: .05em; min-height: 48px; padding: var(--a17-space-4) 0 0; margin-top: var(--a17-space-4); box-shadow: none; }
.modal .primary::after { content: '→'; margin-left: var(--a17-space-3); }
.modal .primary:hover:not(:disabled) .lab, .modal .ghost:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 5px; }
.modal .primary .kc { order: -1; margin-right: auto; background: none; border-color: var(--a17-rule-dark); color: var(--a17-muted-dark); }
.modal .ghost { background: none; border: 0; border-radius: 0; color: var(--a17-muted-dark); font-size: var(--a17-small); }
.modal .cancel { border-top: 1px solid var(--a17-rule-dark); justify-content: flex-start; padding-top: var(--a17-space-4); margin-top: var(--a17-space-4); }
.opts { gap: 0; border-top: 1px solid var(--a17-rule-dark); }
.opts button { background: none; border: 0; border-bottom: 1px solid var(--a17-rule-dark); border-radius: 0; padding: var(--a17-space-3) 0; min-height: 52px; color: var(--a17-text-dark); font-size: var(--a17-body); }
.opts button:hover, .opts button:focus { background: none; border-color: var(--a17-rule-dark); color: var(--a17-active-dark); }
.opts button:focus-visible { outline: 1px solid var(--a17-focus-dark); outline-offset: 3px; }
.opts button small { color: var(--a17-muted-dark); font-size: var(--a17-small); }
#quiz .q { font-size: var(--a17-section-title); font-weight: 500; }
#quiz .opts button.right { background: none; border-left: 0; border-color: var(--a17-rule-dark); color: var(--a17-success-dark); }
#quiz .opts button.right span::after { content: ' ✓'; }
#quiz .opts button.wrong { background: none; border-left: 0; border-color: var(--a17-rule-dark); color: var(--a17-warning); }
#quiz .why { background: none; border-left: 1px solid var(--a17-success-dark); padding: var(--a17-space-1) var(--a17-space-4); font-size: 15px; color: var(--a17-text-dark); }
#quiz .why.no { border-left-color: var(--a17-warning); }
#quiz .row .primary { margin-top: 0; padding-top: 0; border-top: 0; }
#fail .panel { text-align: left; border-top-color: var(--a17-warning); }
#fail h2 { color: var(--a17-text-dark); }
#fail p.why { color: var(--a17-muted-dark); margin: 0 0 var(--a17-space-4); }
.modal .checks li.ok { color: var(--a17-success-dark); }
.modal .checks .box { border-width: 1px; border-radius: 0; }
.modal .tag { background: none !important; border: 0 !important; padding: 0 !important; border-radius: 0 !important; font-size: var(--a17-meta); letter-spacing: .06em; }
.modal .tag.rec { color: var(--a17-source-record); } .modal .tag.sim { color: var(--a17-source-principle); } .modal .tag.game { color: var(--a17-source-game); }
.modal .lcard { background: none; border: 0; border-bottom: 1px solid var(--a17-rule-dark); border-radius: 0; }
.modal .lcard .thumb svg { border-radius: 0; }
/* result screen (ui.js showResult): the equipment card's side panel (bottom sheet on phones). Headline, 3 facts,
   run details folded, one Continue pinned at the bottom. Label / value rows; labels never wrap on wide screens. */
#result.modal { display: block; padding: 0; background: rgb(1 5 5 / .5); }
#result .panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100%); max-height: none; padding: 0;
  display: flex; flex-direction: column; overflow: hidden; clip-path: none; border-top: 0; border-left: 1px solid var(--a17-rule-dark); box-shadow: none; }
#result .panel h2 { flex: none; margin: 0; padding: var(--a17-space-6) var(--a17-space-5) var(--a17-space-4); font-size: 26px; overflow-wrap: anywhere; }
#result .rbody { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--a17-space-5) var(--a17-space-4);
  scrollbar-width: thin; scrollbar-color: #a9bcbb55 transparent; }
#result h3 { margin: var(--a17-space-4) 0 var(--a17-space-1); font-size: var(--a17-section-title); font-weight: 500; color: var(--a17-text-dark); letter-spacing: 0; }
#result h4 { margin: var(--a17-space-4) 0 0; font-size: 15px; font-weight: 500; color: var(--a17-muted-dark); }
#result .rrow { display: grid; grid-template-columns: minmax(max-content, 1fr) auto; gap: var(--a17-space-4); align-items: baseline; margin: 0;
  padding: var(--a17-space-2) 0; border-bottom: 1px solid var(--a17-rule-dark); font-size: var(--a17-body); line-height: 1.5; }
#result .rrow dt { color: var(--a17-muted-dark); white-space: nowrap; }
#result .rrow dd { margin: 0; color: var(--a17-text-dark); text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#result .rrow dd small { color: var(--a17-muted-dark); font-size: 14px; }
#result .note, #result .scope { margin: var(--a17-space-2) 0 var(--a17-space-1); font-size: 14px; line-height: 1.5; color: var(--a17-muted-dark); }
#result .marks, #result .rlist { display: grid; gap: 0; margin: 0; padding: var(--a17-space-1) 0 var(--a17-space-2); }
#result .rrow:has(+ .note, + .marks) { border-bottom: 0; padding-bottom: 0; }   /* footnote / marks belong to the row above */
#result .rrows > .note, #result .rrows > .marks { margin: 0; padding: var(--a17-space-1) 0 var(--a17-space-2); border-bottom: 1px solid var(--a17-rule-dark); }
#result .marks li, #result .rlist li { display: flex; gap: var(--a17-space-2); align-items: baseline; font-size: 15px; line-height: 1.5; padding: 3px 0; color: var(--a17-text-dark); }
#result .marks .mk { flex: none; width: 1.2em; text-align: center; font-weight: 600; }
#result .marks .ok .mk { color: var(--a17-success-dark); } #result .marks .no .mk { color: var(--a17-warning); } #result .marks .na .mk { color: var(--a17-muted-dark); }
#result .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#result .rmore { margin-top: var(--a17-space-4); border-top: 1px solid var(--a17-rule-dark); }
#result .rmore summary { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; list-style: none; width: fit-content; font-size: var(--a17-body); color: var(--a17-text-dark); }
#result .rmore summary::-webkit-details-marker { display: none; }
#result .rmore summary::before { content: '+'; width: 12px; font: 15px var(--a17-mono); color: var(--a17-muted-dark); }
#result .rmore[open] summary::before { content: '−'; }
#result .rmore summary:focus-visible { outline: 1px solid var(--a17-focus-dark); outline-offset: 3px; }
#result .learned.small { grid-template-columns: 1fr; gap: 0; margin: 0; }
#result .learned.small .lcard { grid-template-columns: 1fr; min-height: 44px; } #result .learned.small .lcard .thumb { display: none; }   /* thumbnails carry 8 px diagram labels */
#result .lcard b { font-size: 15px; font-weight: 500; } #result .lcard small { font-size: 14px; color: var(--a17-muted-dark); }
#result .panel > .primary { flex: none; width: auto; margin: 0 var(--a17-space-5); padding: var(--a17-space-3) 0 calc(var(--a17-space-4) + env(safe-area-inset-bottom)); font-size: var(--a17-body); min-height: 56px; }
#result .panel > .primary:focus-visible { outline: 1px solid var(--a17-focus-dark); outline-offset: 2px; }
@media (max-width: 720px) {
  #result .panel { top: auto; left: 0; width: 100%; max-height: 85vh; max-height: 85dvh; border-left: 0; border-top: 1px solid #9bafaa; }
  #result .panel h2 { padding: var(--a17-space-5) var(--a17-space-4) var(--a17-space-3); font-size: 22px; }
  #result .rbody { padding: 0 var(--a17-space-4) var(--a17-space-3); }
  #result .panel > .primary { margin: 0 var(--a17-space-4); }
}
@media (max-width: 480px) {
  #result .rrow { grid-template-columns: 1fr; gap: 0; font-size: 15px; }
  #result .rrow dt { white-space: normal; font-size: 14px; }
  #result .rrow dd { text-align: left; }
}
/* toast, coach hint, drink, parts tray, aim panel: text on the scene, thin lines, no glow */
#toast { background: none; border: 0; border-left: 1px solid var(--a17-hud-muted); border-radius: 0; box-shadow: none; color: var(--a17-hud-text); text-shadow: 0 1px 5px #000c;
  font-family: var(--a17-font); font-size: 14px; padding: var(--a17-space-1) var(--a17-space-3); }
#toast.warn { background: none; border-left-color: var(--a17-warning); color: var(--a17-warning); }
#toast.ok { background: none; border-left-color: var(--a17-success-dark); color: var(--a17-success-dark); }
#toast.on { animation: none; }
#coach { background: none; border: 0; border-radius: 0; box-shadow: none; color: var(--a17-hud-text); text-shadow: 0 1px 5px #000c; font-family: var(--a17-font); }
#coach .dots i { border-radius: 50%; transform: none; width: 5px; height: 5px; background: #ffffff40; }
#coach .dots i.cur { background: var(--a17-hud-text); } #coach .dots i.done { background: var(--a17-success-dark); }
#coach .keys .kc { animation: none; }
#coach .skip { color: var(--a17-hud-muted); text-underline-offset: 5px; }
#bUse { background: none; border: 0; border-radius: 0; box-shadow: none; color: var(--a17-hud-text); text-shadow: 0 1px 5px #000c; }
#bUse svg { fill: var(--a17-hud-muted); }
#tray, #aim { background: var(--a17-surface-dark); border: 0; border-top: 1px solid var(--a17-rule-dark); border-radius: 0; box-shadow: none; }
#aim .pad .kc.go, #hud .pad .kc.go { background: none; color: var(--a17-active-dark); border-color: var(--a17-active-dark); }
/* the [E] action: a text prompt under the crosshair; on touch a large square-cornered button with a thin line */
#bAct { background: none; border: 0; border-radius: 0; box-shadow: none; color: var(--a17-hud-text); text-shadow: 0 1px 5px #000c; font-family: var(--a17-font); font-weight: 400; animation: none; }
#bAct .kc { background: none; color: var(--a17-warning); border-color: var(--a17-warning); }
body.touch #bAct { background: var(--a17-surface-dark); border: 1px solid var(--a17-rule-dark); border-top-color: #9bafaa; min-height: 60px; }
#hud #joy { border-color: var(--a17-rule-dark); background: #0a0f0f40; }
#hud #joy .knob { background: #eeefea30; border: 1px solid var(--a17-hud-muted); }
/* minimap frame (the kit slot) */
.lh-ui .lh-map-slot { border: 1px solid var(--a17-rule-dark); }
#mini .ring, #map .ring { animation: none; }
/* notebook zoom controls by the raised paper */
#noteBar .ghost, #noteBar .zoom { background: none; border: 0; border-radius: 0; box-shadow: none; color: var(--a17-hud-text); text-shadow: 0 1px 5px #000c; font-family: var(--a17-font); font-weight: 400; }
#noteBar .zoom { border-bottom: 1px solid var(--a17-hud-muted); letter-spacing: .04em; }
#noteBar .zoom::after { content: '→'; margin-left: var(--a17-space-2); }
#noteBar .ghost:disabled { opacity: .3; }
body.touch #noteBar .zoom { background: var(--a17-surface-dark); border: 1px solid var(--a17-rule-dark); }
/* sound button while the browser blocks sound */
#soundGate { border-radius: 0; border: 0; border-top: 1px solid var(--a17-hud-muted); background: #0a0f0fcc; color: var(--a17-hud-text); box-shadow: none; font: 400 16px/1 var(--a17-font); }
#soundGate svg { stroke-width: var(--a17-icon-stroke); }
@media (prefers-reduced-motion: reduce) { .modal .panel, #toast.on { animation: none; } }
/* short desktop screens: the spread fits under the top bar so its page buttons stay in view */
@media (min-width: 741px) and (max-height: 960px) { .fn-ui .fn-page { min-height: max(520px, calc(100vh - 170px)); } .fn-ui .fn-dialog { padding-top: 20px; } .fn-ui .fn-top { margin-bottom: 14px; } .fn-ui .fn-nav { margin-top: 14px; } }
@media (min-width: 741px) and (max-height: 960px) { .fn-ui .fn-task { min-height: 30px; padding: 2px 0; } .fn-ui .fn-page-header { margin-bottom: 14px; } .fn-ui .fn-objective { margin-bottom: 16px; } .fn-ui .fn-page { padding-top: 22px; padding-bottom: 16px; } .fn-ui .fn-list li { min-height: 30px; } }
/* phones: the life block floats over the scene, so its soft backdrop is a little stronger */
@media (max-width: 600px) { body.touch .lh-ui .lh-life:before { background: radial-gradient(ellipse at 40% 50%, #0b1013b0, transparent 76%); } }

