/* Long Haul – menus and in-game screens (js/ui/menus.js), in the same quiet language as the HUD: one typeface, white
   type over a darkened, softly blurred world, hairline dividers instead of frames, and a single amber accent for
   what's selected. Menus are a column of words on the left; screens are one clean sheet; conversations sit low. */
.lh-menus {
  --mb: clamp(12px, 0.5vh + 0.32vw + 7px, 20px);
  --fg: #fbf8f2; --fg2: rgba(251, 248, 242, 0.72); --fg3: rgba(251, 248, 242, 0.45);
  --accent: #f6b445; --danger: #ff6a4d; --warn: #ffc94d; --good: #8fdc9c;
  --hair: rgba(251, 248, 242, 0.12); --hair2: rgba(251, 248, 242, 0.22);
  --sheet: rgba(14, 13, 12, 0.78); --hover: rgba(251, 248, 242, 0.07); --sel: rgba(251, 248, 242, 0.11);
  --gutter: clamp(1.4em, 5vw, 6em);
  position: fixed; inset: 0; z-index: 40; font-family: var(--lh-ui); font-size: var(--mb); line-height: 1.45; color: var(--fg);
  font-variant-numeric: tabular-nums; user-select: none; -webkit-user-select: none;
}
.lh-menus * { box-sizing: border-box; }
.lh-menus kbd { min-width: 1.6em; height: 1.6em; padding: 0 0.4em; border: 0; border-radius: 0.3em; background: rgba(251, 248, 242, 0.9); color: #14110d;
  font: 700 0.72em/1 var(--lh-ui); box-shadow: none; }
.lh-menus .ic { width: 1.1em; height: 1.1em; }

/* ── backdrop ──────────────────────────────────────────────────────────── */
.lh-scrim { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 7, 6, 0.9) 0, rgba(8, 7, 6, 0.72) min(30em, 48%), rgba(8, 7, 6, 0.25) min(56em, 85%), rgba(8, 7, 6, 0.1) 100%); }
.lh-menus:is([data-root="pause"], [data-screen="settings"], [data-screen="controls"], [data-screen="credits"], [data-screen="newjourney"], [data-screen="leaderboard"],
  [data-screen="convoy"], [data-screen="account"], [data-screen="whatsnew"], [data-screen="campaign"], [data-screen="prologue"]) .lh-scrim {
  background: rgba(8, 7, 6, 0.55); backdrop-filter: blur(10px) saturate(0.85); -webkit-backdrop-filter: blur(10px) saturate(0.85); }
.lh-menus:is([data-root="shop"], [data-root="journal"], [data-root="map"]) .lh-scrim { background: rgba(8, 7, 6, 0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lh-menus[data-root="inventory"] .lh-scrim { background: linear-gradient(270deg, rgba(8, 7, 6, 0.55), rgba(8, 7, 6, 0) 55%); }
.lh-menus[data-root="gameover"] .lh-scrim { background: rgba(6, 5, 4, 0.82); backdrop-filter: blur(8px) grayscale(0.6); -webkit-backdrop-filter: blur(8px) grayscale(0.6); }
.lh-menus[data-root="sleep"] .lh-scrim, .lh-menus[data-root="loading"] .lh-scrim { background: #070605; }
.lh-menus[data-screen="gate"] .lh-scrim { background: #070605; }
.lh-menus[data-root="dialogue"] .lh-scrim { background: linear-gradient(0deg, rgba(8, 7, 6, 0.92) 0%, rgba(8, 7, 6, 0.78) 45%, rgba(8, 7, 6, 0.35) 75%, rgba(8, 7, 6, 0) 100%); }

.lh-stage { position: absolute; inset: 0; display: flex; align-items: center; padding: 1.4em var(--gutter);
  padding-top: max(1.4em, env(safe-area-inset-top)); padding-bottom: max(1.4em, env(safe-area-inset-bottom)); }
.lh-menus:is([data-root="shop"], [data-root="gameover"], [data-root="sleep"], [data-root="journal"], [data-root="map"], [data-screen="gate"], [data-screen="loading"]) .lh-stage { justify-content: center; }

/* ── menu column (main, play, pause) ───────────────────────────────────── */
.lh-col { width: min(26em, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 1.6em; overflow-y: auto; scrollbar-width: none; padding: 0.3em 0; }
.lh-col::-webkit-scrollbar { display: none; }
.lh-brand { flex: none; display: grid; gap: 0.6em; }
.lh-kicker { font-size: 0.7em; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.lh-logo { display: block; width: 100%; max-width: 21em; height: auto; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45)); }
.lh-lines { display: none; }
.lh-tag { margin: 0; color: var(--fg2); font-size: 0.92em; }
.lh-h1 { margin: 0; font: 650 2.6em/1.05 var(--lh-ui); letter-spacing: -0.02em; }
.lh-nav { display: grid; gap: 0.05em; flex: none; }
.lh-item { position: relative; display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 0.45em; cursor: pointer;
  padding: 0.5em 0.9em 0.5em 1.1em; color: var(--fg2); animation: lh-rise 0.4s ease-out both; transition: color 0.12s, background 0.12s; }
.lh-item > span { font-size: 1.32em; font-weight: 600; letter-spacing: -0.005em; }
.lh-item small { display: block; margin-top: 0.1em; font-size: 0.82em; color: var(--fg3); }
.lh-item small i { font-style: normal; margin: 0 0.15em; }
.lh-item::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 1.2em; margin-top: -0.6em; border-radius: 2px; background: var(--accent);
  transform: scaleY(0); transition: transform 0.14s ease-out; }
.lh-item:hover { color: var(--fg); background: var(--hover); }
.lh-item:focus, .lh-item:focus-visible { outline: none; color: var(--fg); background: var(--sel); }
.lh-item:is(:focus, :focus-visible)::before { transform: scaleY(1); }
.lh-item:is(:focus, :hover) small { color: var(--fg2); }
.lh-nav .lh-item:nth-child(2) { animation-delay: 0.03s; } .lh-nav .lh-item:nth-child(3) { animation-delay: 0.06s; }
.lh-nav .lh-item:nth-child(4) { animation-delay: 0.09s; } .lh-nav .lh-item:nth-child(5) { animation-delay: 0.12s; }
.lh-nav .lh-item:nth-child(n+6) { animation-delay: 0.15s; }
.lh-continue { margin-bottom: 0.4em; }
.lh-continue > span { color: var(--fg); }
.lh-quiet > span { font-size: 1em; font-weight: 500; }
.lh-note { margin: 0; padding-left: 1.3em; font-size: 0.84em; color: var(--fg3); max-width: 30em; }
.lh-note .ic { color: var(--warn); }
.lh-alert { display: flex; gap: 0.6em; padding: 0.7em 0.9em; border-radius: 0.6em; background: rgba(255, 201, 77, 0.12); font-size: 0.88em; flex: none; }
.lh-alert p { margin: 0; }
.lh-alert .ic { color: var(--warn); margin-top: 0.15em; }
.lh-links { display: flex; gap: 0.3em; flex-wrap: wrap; padding-left: 0.6em; }
.lh-link { display: inline-flex; align-items: center; gap: 0.45em; background: none; border: 0; border-radius: 0.4em; padding: 0.35em 0.55em; color: var(--fg3); font-size: 0.86em; cursor: pointer; }
.lh-link:hover, .lh-link:focus { outline: none; color: var(--fg); background: var(--hover); }
.lh-main { padding-bottom: 2.4em; }

/* key hints: one quiet line along the bottom */
.lh-keys { position: absolute; left: var(--gutter); bottom: max(1.1em, env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; gap: 0.4em 1.4em;
  font-size: 0.74em; color: var(--fg3); pointer-events: none; }
.lh-keys span { display: inline-flex; align-items: center; gap: 0.35em; white-space: nowrap; }
.lh-panel .lh-keys { position: static; padding: 0.8em 1.6em; border-top: 1px solid var(--hair); flex: none; }

/* now playing: bottom right on the main and pause menus */
.lh-np { position: absolute; right: var(--gutter); bottom: max(1.1em, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 0.8em; font-size: 0.8em; color: var(--fg2); max-width: 40%; }
.lh-np > .ic { color: var(--accent); }
.lh-np .lh-cover { width: clamp(36px, 4vw, 56px); aspect-ratio: 1; object-fit: cover; border-radius: 0.4em; flex: none; }
.lh-np-copy { display: grid; min-width: 0; gap: 0.05em; }
.lh-track-title { font-size: 1.12em; font-weight: 650; color: var(--fg); overflow-wrap: anywhere; }
.lh-np span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh-np-inline { position: static; width: fit-content; max-width: 100%; margin-top: 1em; }

/* ── gate + loading ────────────────────────────────────────────────────── */
.lh-gate, .lh-loading { width: min(32em, 100%); gap: 2.2em; align-items: center; text-align: center; }
.lh-gatebtn { background: none; border: 0; padding: 0.5em 0; cursor: pointer; }
.lh-gatebtn span { font-size: 0.95em; font-weight: 600; letter-spacing: 0.06em; color: var(--fg2); animation: lh-pulse 2.4s ease-in-out infinite; display: inline-block; }
.lh-studio-splash { width: min(640px, 100%); transition: opacity 450ms ease; }
.lh-studio-splash img { display: block; width: 100%; height: auto; margin-bottom: 2rem; }
.lh-studio-splash .lh-gatebtn { width: 100%; }
.lh-splash-exit .lh-studio-splash { opacity: 0; pointer-events: none; }
.lh-studio-intro .lh-studio-splash { animation: lh-fade 400ms ease both; }
.lh-studio-intro.lh-splash-exit .lh-studio-splash { animation: none; }
.lh-menus[data-screen="main"] .lh-brand { animation: lh-fade 450ms ease both; }
.lh-load { width: 100%; margin-top: 0.6em; }
.lh-loadbar { height: 2px; border-radius: 1px; background: var(--hair2); overflow: hidden; }
.lh-loadbar i { display: block; height: 100%; background: var(--fg); transform-origin: 0 50%; transform: scaleX(var(--v, 0)); transition: transform 0.2s ease-out; }
.lh-loadrow { display: flex; justify-content: space-between; gap: 1em; margin-top: 0.7em; font-size: 0.84em; color: var(--fg2); }
.lh-loadpct { color: var(--fg); font-weight: 650; }
.lh-loading-tip { margin-top: 1.2em; }
.lh-loaderr .lh-loadbar i { background: var(--danger); }
.lh-loaderr .lh-loadlabel { color: var(--danger); }

/* ── sheets (settings, new journey, shop, journal, map …) ──────────────── */
.lh-panel { width: min(48em, 100%); max-height: 100%; display: flex; flex-direction: column; min-height: 0;
  background: var(--sheet); border-radius: 1em; box-shadow: 0 1.5em 4em rgba(0, 0, 0, 0.45), inset 0 0 0 1px var(--hair);
  backdrop-filter: blur(18px) saturate(1.1); -webkit-backdrop-filter: blur(18px) saturate(1.1); animation: lh-rise 0.25s ease-out both; }
.lh-panel.lh-narrow { width: min(36em, 100%); }
.lh-panel.lh-over { width: min(50em, 100%); }
.lh-panel.lh-over.lh-narrow { width: min(36em, 100%); }
.lh-panel.lh-wide { width: min(66em, 100%); }
.lh-head { display: flex; align-items: center; gap: 0.9em; padding: 1.1em 1.6em 0.8em; flex: none; }
.lh-head h2 { margin: 0; flex: 1; min-width: 0; font-size: 1.45em; font-weight: 650; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh-back { order: 2; display: inline-flex; align-items: center; gap: 0.25em; background: none; border: 0; border-radius: 0.4em; padding: 0.3em 0.55em 0.3em 0.35em; cursor: pointer;
  color: var(--fg2); font-size: 0.84em; font-weight: 600; }
.lh-back:hover, .lh-back:focus { color: var(--fg); background: var(--hover); outline: none; }
.lh-head > .ic { width: 1.3em; height: 1.3em; color: var(--accent); }
.lh-money { order: 1; font-size: 1.15em; font-weight: 700; color: var(--fg); }
.lh-scroll { overflow-y: auto; padding: 0.3em 1.6em 1.4em; min-height: 0; flex: 1 1 auto; scrollbar-color: var(--hair2) transparent; scrollbar-width: thin; }
.lh-panel h3 { margin: 1.5em 0 0.5em; font-size: 0.72em; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg3); }
.lh-panel h3:first-child { margin-top: 0.4em; }
.lh-panel p { margin: 0.5em 0; }
.lh-lead { font-size: 1.02em; color: var(--fg); }
.lh-help { font-size: 0.84em; color: var(--fg2); }
.lh-empty { color: var(--fg3); font-size: 0.92em; }
.lh-msg { min-height: 1.4em; color: var(--accent); font-weight: 600; font-size: 0.9em; }
.lh-msg:empty { min-height: 0; margin: 0; }
.lh-warnline { display: flex; gap: 0.5em; }
.lh-warnline .ic { color: var(--warn); margin-top: 0.15em; }

.lh-tabs { display: flex; gap: 1.4em; margin: 0 1.6em; border-bottom: 1px solid var(--hair); overflow-x: auto; scrollbar-width: none; flex: none; }
.lh-tabs::-webkit-scrollbar { display: none; }
.lh-tab { position: relative; background: none; border: 0; padding: 0.55em 0 0.7em; cursor: pointer; color: var(--fg3); font-size: 0.92em; font-weight: 600; white-space: nowrap; }
.lh-tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 1px; background: var(--accent); transform: scaleX(0); transition: transform 0.15s; }
.lh-tab[aria-selected="true"] { color: var(--fg); }
.lh-tab[aria-selected="true"]::after { transform: none; }
.lh-tab:hover { color: var(--fg2); }
.lh-menus button:focus-visible, .lh-menus input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lh-menus .lh-item:focus-visible { outline: none; }

/* buttons: white pill for the main action, hairline for the rest */
.lh-btns { display: flex; flex-wrap: wrap; gap: 0.6em; margin-top: 1.3em; }
.lh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.45em; background: transparent; border: 0; border-radius: 2em;
  box-shadow: inset 0 0 0 1px var(--hair2); padding: 0.6em 1.3em; cursor: pointer; font-size: 0.92em; font-weight: 650; color: var(--fg); white-space: nowrap; transition: background 0.12s; }
.lh-btn:hover, .lh-btn:focus { background: var(--sel); }
.lh-btn-s { padding: 0.35em 0.85em; font-size: 0.82em; }
.lh-primary { background: var(--fg); color: #14110d; box-shadow: none; }
.lh-primary:hover, .lh-primary:focus { background: #fff; box-shadow: 0 0 0 3px rgba(246, 180, 69, 0.55); }
.lh-danger { color: var(--danger); box-shadow: inset 0 0 0 1px rgba(255, 106, 77, 0.5); }
.lh-danger:hover, .lh-danger:focus { background: rgba(255, 106, 77, 0.15); }
.lh-btn[aria-disabled="true"], .lh-btn:disabled { opacity: 0.4; cursor: default; }

/* settings rows */
.lh-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) 4.2em; align-items: center; gap: 0.3em 1.2em; padding: 0.75em 0; border-bottom: 1px solid var(--hair); }
.lh-rl label { font-weight: 600; }
.lh-rl small { display: block; margin-top: 0.15em; font-size: 0.8em; line-height: 1.4; color: var(--fg3); }
.lh-rl small kbd { font-size: 0.85em; }
.lh-rc { display: flex; justify-content: flex-end; min-width: 0; }
.lh-rv { font-size: 0.9em; font-weight: 650; text-align: right; color: var(--fg2); }
.lh-seg { display: inline-flex; gap: 0.2em; padding: 0.2em; border-radius: 2em; background: rgba(251, 248, 242, 0.08); max-width: 100%; }
.lh-segb { background: none; border: 0; border-radius: 2em; padding: 0.35em 0.9em; cursor: pointer; color: var(--fg2); font-size: 0.84em; font-weight: 600; white-space: nowrap; }
.lh-segb[aria-pressed="true"] { background: var(--fg); color: #14110d; }
.lh-segb:focus-visible { outline-offset: 0 !important; }
.lh-switch { position: relative; width: 2.6em; height: 1.5em; border-radius: 1em; border: 0; background: rgba(251, 248, 242, 0.2); cursor: pointer; padding: 0; flex: none; transition: background 0.15s; }
.lh-switch i { position: absolute; top: 0.2em; left: 0.2em; width: 1.1em; height: 1.1em; border-radius: 50%; background: var(--fg); transition: transform 0.15s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.lh-switch[aria-checked="true"] { background: var(--accent); }
.lh-switch[aria-checked="true"] i { transform: translateX(1.1em); }
.lh-switch:disabled { opacity: 0.35; cursor: default; }
.lh-row input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 1.6em; background: none; cursor: pointer; margin: 0; }
.lh-row input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: var(--hair2); }
.lh-row input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 1em; height: 1em; margin-top: calc(-0.5em + 1.5px); border-radius: 50%; background: var(--fg); border: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }
.lh-row input[type="range"]:focus::-webkit-slider-thumb { background: var(--accent); }
.lh-row input[type="range"]::-moz-range-track { height: 3px; border-radius: 2px; background: var(--hair2); }
.lh-row input[type="range"]::-moz-range-thumb { width: 1em; height: 1em; border-radius: 50%; background: var(--fg); border: 0; }
.lh-row input[type="range"]:focus::-moz-range-thumb { background: var(--accent); }

/* lists, bindings, key-value tables */
.lh-bindwrap { margin-top: 1em; }
.lh-binds { display: grid; grid-template-columns: repeat(auto-fill, minmax(17em, 1fr)); gap: 0 2.2em; }
.lh-binds > div { display: flex; justify-content: space-between; align-items: center; gap: 0.8em; padding: 0.4em 0; border-bottom: 1px solid var(--hair); font-size: 0.9em; color: var(--fg2); }
.lh-kc { display: inline-flex; gap: 0.25em; flex: none; align-items: center; color: var(--fg3); }
.lh-list { margin: 0.5em 0; padding-left: 1.2em; display: grid; gap: 0.45em; font-size: 0.94em; color: var(--fg2); }
.lh-list li::marker { color: var(--fg3); }
.lh-panel p kbd, .lh-list kbd, .lh-dl kbd { margin: 0 0.1em; vertical-align: 0.05em; }
.lh-dl { margin: 0.6em 0; display: grid; }
.lh-dl > div { display: grid; grid-template-columns: 9.5em 1fr; gap: 1em; padding: 0.55em 0; border-bottom: 1px solid var(--hair); font-size: 0.92em; }
.lh-dl dt { font-weight: 650; display: flex; gap: 0.45em; align-items: flex-start; }
.lh-dl dd { margin: 0; color: var(--fg2); }
.lh-kv { margin: 0.4em 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15em, 1fr)); gap: 0 2.2em; }
.lh-kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; padding: 0.5em 0; border-bottom: 1px solid var(--hair); }
.lh-kv dt { color: var(--fg2); }
.lh-kv dd { margin: 0; font-weight: 650; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.lh-credits p { color: var(--fg2); }
.lh-credits b { color: var(--fg); }
.lh-changelog h3 { display: flex; align-items: baseline; gap: 0.6em; color: var(--fg); font-size: 0.9em; letter-spacing: 0.04em; text-transform: none; }
.lh-changelog h3 small { font-size: 0.85em; color: var(--fg3); }
.lh-changelog h4 { margin: 0.9em 0 0.2em; font-size: 0.72em; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.lh-tracks { list-style: none; margin: 0; padding: 0; display: grid; font-size: 0.92em; }
.lh-tracks li { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 0.8em; padding: 0.45em 0; border-bottom: 1px solid var(--hair); }
.lh-tracks span { color: var(--fg2); }
.lh-tracks em { font-style: normal; font-size: 0.85em; color: var(--fg3); }

/* choice cards (difficulty) */
.lh-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6em; }
.lh-card { position: relative; text-align: left; display: flex; flex-direction: column; gap: 0.35em; padding: 0.9em 1em; border: 0; border-radius: 0.8em;
  background: rgba(251, 248, 242, 0.05); box-shadow: inset 0 0 0 1px var(--hair); cursor: pointer; color: var(--fg2); transition: background 0.12s, box-shadow 0.12s; }
.lh-card:hover { background: var(--hover); }
.lh-card b { font-size: 1.05em; font-weight: 650; color: var(--fg); }
.lh-card span { font-size: 0.82em; line-height: 1.4; flex: 1; }
.lh-card em { font-style: normal; font-size: 0.72em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg3); }
.lh-card[aria-pressed="true"] { background: rgba(246, 180, 69, 0.12); box-shadow: inset 0 0 0 1.5px var(--accent); }
.lh-card[aria-pressed="true"] em { color: var(--accent); }
.lh-card[aria-pressed="true"] em::before { content: "✓ "; }
.lh-seedrow { display: flex; gap: 0.6em; }
.lh-input { flex: 1; min-width: 0; background: rgba(0, 0, 0, 0.3); border: 0; border-radius: 0.6em; box-shadow: inset 0 0 0 1px var(--hair2); padding: 0.6em 0.85em; font-size: 0.95em; color: var(--fg); user-select: text; -webkit-user-select: text; }
.lh-input::placeholder { color: var(--fg3); }
.lh-confirm { display: flex; gap: 1em; }
.lh-confirm > .ic { width: 1.8em; height: 1.8em; color: var(--warn); margin-top: 0.2em; }
.lh-confirm p { color: var(--fg2); }
.lh-confirm .lh-lead { color: var(--fg); }

/* inventory / shop rows and condition bars */
.lh-two { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 2em; }
.lh-slotrow, .lh-shoprow { display: flex; align-items: center; gap: 0.75em; padding: 0.5em 0; border-bottom: 1px solid var(--hair); min-height: 2.8em; }
.lh-shoprow:last-of-type { border-bottom: 0; }
.lh-slotempty { color: var(--fg3); }
.lh-glyph { width: 1.7em; text-align: center; font-size: 1.2em; flex: none; line-height: 1; }
.lh-sn { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.lh-sn b { font-weight: 600; }
.lh-sn small { display: block; font-size: 0.8em; color: var(--fg3); }
.lh-price { font-weight: 700; min-width: 3em; text-align: right; }
.lh-part { display: grid; grid-template-columns: minmax(0, 12em) minmax(3em, 1fr) 3.8em minmax(0, 7em); align-items: center; gap: 0.8em; padding: 0.45em 0; border-bottom: 1px solid var(--hair); font-size: 0.92em; }
.lh-pn { display: flex; align-items: center; gap: 0.45em; font-weight: 600; min-width: 0; }
.lh-part b { font-weight: 650; text-align: right; }
.lh-part em { font-style: normal; font-size: 0.86em; color: var(--fg3); }
.lh-part.bad em, .lh-part.bad .ic { color: var(--warn); }
.lh-part.bad .lh-bar i { background: var(--danger); }
.lh-bar { display: block; height: 3px; border-radius: 2px; background: var(--hair2); overflow: hidden; }
.lh-bar i { display: block; height: 100%; background: var(--fg); transform-origin: 0 50%; transform: scaleX(var(--v, 0)); }
.lh-two .lh-part { grid-template-columns: 6.2em minmax(2em, 1fr) 3.2em 3.6em; gap: 0.5em; }

/* inventory: a sheet on the right; the world stays visible */
.lh-menus[data-root="inventory"] .lh-stage { justify-content: flex-end; align-items: center; pointer-events: none; }
.lh-panel.lh-inventory-drawer { width: min(32em, 100%); max-height: min(40em, 100%); pointer-events: auto; animation: lh-slide 0.22s ease-out both; }
.lh-inventory-drawer .lh-head > .ic { order: -1; }
.lh-pocket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 9em; gap: 1.2em; padding-top: 0.6em; }
.lh-pocket-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5em; align-content: start; }
.lh-pocket { position: relative; min-width: 0; aspect-ratio: 1 / 0.95; padding: 0.7em 0.35em 0.45em; border: 0; border-radius: 0.8em; background: rgba(251, 248, 242, 0.05);
  box-shadow: inset 0 0 0 1px var(--hair); color: var(--fg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3em; font: inherit; cursor: pointer; transition: background 0.12s, box-shadow 0.12s; }
.lh-pocket:hover { background: var(--hover); }
.lh-pocket.selected { background: rgba(246, 180, 69, 0.1); box-shadow: inset 0 0 0 1.5px var(--accent); }
.lh-pocket > kbd { position: absolute; top: 0.45em; left: 0.45em; min-width: 1.4em; height: 1.4em; font-size: 0.62em; background: rgba(251, 248, 242, 0.16); color: var(--fg2); }
.lh-pocket.selected > kbd { background: var(--accent); color: #14110d; }
.lh-pocket .lh-glyph { width: 1.8em; height: 1.8em; display: grid; place-items: center; }
.lh-pocket .lh-glyph .ic { width: 1.5em; height: 1.5em; }
.lh-pocket-name { font-size: 0.72em; line-height: 1.2; overflow-wrap: anywhere; text-align: center; color: var(--fg2); }
.lh-pocket small { font-size: 0.66em; font-weight: 600; color: var(--fg3); }
.lh-pocket.empty .lh-pocket-name { color: var(--fg3); }
.lh-pocket-actions { display: flex; flex-direction: column; gap: 0.3em; padding-left: 1.1em; border-left: 1px solid var(--hair); }
.lh-inv-label { font-size: 0.68em; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg3); }
.lh-pocket-actions > b { font-size: 0.9em; font-weight: 600; min-height: 2.6em; line-height: 1.3; }
.lh-inventory-drawer .lh-pocket-actions .lh-btn-s, .lh-inv-held .lh-btn-s { justify-content: flex-start; gap: 0.55em; padding: 0.4em 0.5em; border-radius: 0.5em; box-shadow: none; font-weight: 600; }
.lh-inventory-drawer .lh-pocket-actions .lh-btn-s .ic { color: var(--fg2); }
.lh-inv-held { display: flex; gap: 0.8em; align-items: center; padding: 0.8em 0 0.2em; margin-top: 0.9em; border-top: 1px solid var(--hair); }
.lh-inv-held > .ic { color: var(--fg3); }
.lh-inv-held > span { flex: 1; display: grid; gap: 0.05em; }
.lh-inv-held small { font-size: 0.66em; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg3); }
.lh-inv-held b { font-size: 0.9em; font-weight: 600; }
.lh-inv-condition { margin-top: 0.6em; }
.lh-inv-condition summary { color: var(--fg2); font-size: 0.82em; font-weight: 600; cursor: pointer; padding: 0.3em 0; }
.lh-inv-condition .lh-part { font-size: 0.82em; }
.lh-inventory-drawer .lh-keys { justify-content: space-between; }

/* ── conversation: low on screen, the world stays above it ─────────────── */
.lh-menus[data-root="dialogue"] .lh-stage { justify-content: center; align-items: flex-end; padding-bottom: clamp(1em, 6vh, 3.6em); }
.lh-panel.lh-dlg { width: min(42em, 100%); background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 0; }
.lh-dlghead { display: flex; align-items: center; gap: 0.8em; padding: 0 0 0.5em; flex: none; min-width: 0; }
.lh-dlghead > div { min-width: 0; display: grid; gap: 0.1em; }
.lh-dlghead .lh-kicker { overflow-wrap: anywhere; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); }
.lh-dlghead h2 { margin: 0; font-size: 1.5em; font-weight: 650; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.lh-face { display: none; }
.lh-dlg .lh-scroll { padding: 0; }
.lh-said { margin: 0.3em 0 1.1em; }
.lh-said p { margin: 0.3em 0; font-size: 1.14em; line-height: 1.5; overflow-wrap: anywhere; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.lh-said p::before { content: "“"; } .lh-said p::after { content: "”"; }
.lh-dlgnote { display: flex; gap: 0.55em; align-items: flex-start; margin: 0 0 1em !important; font-size: 0.92em; font-weight: 600; color: var(--warn); overflow-wrap: anywhere; }
.lh-dlgnote .ic { margin-top: 0.15em; }
.lh-dlg h3 { display: none; }
.lh-choices { display: grid; gap: 0.15em; }
.lh-choice { display: flex; align-items: center; gap: 0.8em; width: 100%; text-align: left; cursor: pointer; padding: 0.6em 0.9em 0.6em 0.7em; border: 0; border-radius: 0.6em; background: none; color: var(--fg); transition: background 0.12s; }
.lh-choice:hover { background: var(--hover); }
.lh-choice:focus { outline: none; background: var(--sel); box-shadow: inset 3px 0 0 var(--accent); }
.lh-choice > kbd { background: rgba(251, 248, 242, 0.16); color: var(--fg); }
.lh-choice:focus > kbd { background: var(--fg); color: #14110d; }
.lh-cl { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1em 0.6em; overflow-wrap: anywhere; }
.lh-cl > b { font-size: 1.04em; font-weight: 650; }
.lh-cl small { flex-basis: 100%; font-size: 0.84em; line-height: 1.4; color: var(--fg2); }
.lh-tagrisk { display: inline-flex; align-items: center; gap: 0.3em; font-style: normal; font-size: 0.72em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--danger); }
.lh-choice.lh-risk:focus { box-shadow: inset 3px 0 0 var(--danger); }
.lh-cost { flex: none; max-width: 45%; display: grid; justify-items: end; text-align: right; }
.lh-cost i { font-style: normal; font-size: 0.66em; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg3); }
.lh-cost b { font-size: 0.98em; font-weight: 700; color: var(--accent); overflow-wrap: anywhere; }
.lh-choice[aria-disabled="true"] { cursor: not-allowed; }
.lh-choice[aria-disabled="true"] > kbd, .lh-choice[aria-disabled="true"] .lh-cl > b, .lh-choice[aria-disabled="true"] .lh-cost { opacity: 0.4; }
.lh-choice[aria-disabled="true"] .lh-cl > b { text-decoration: line-through; text-decoration-color: var(--fg3); }
.lh-cl small.lh-why { display: flex; gap: 0.35em; align-items: flex-start; color: var(--warn); font-weight: 600; }
.lh-why .ic { margin-top: 0.15em; }
.lh-dlg .lh-keys { padding: 0.9em 0 0; border-top: 0; justify-content: flex-start; }

/* ── game over, sleep ──────────────────────────────────────────────────── */
.lh-end { text-align: left; }
.lh-endhead { padding: 1.6em 1.6em 0.4em; flex: none; display: grid; gap: 0.35em; }
.lh-end .lh-kicker { color: var(--danger); }
.lh-end .lh-h1 { font-size: 2.2em; }
.lh-end .lh-lead { overflow-wrap: anywhere; color: var(--fg2); }
.lh-sleep { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1em; color: var(--fg2); text-align: center; }
.lh-sleep .ic { width: 2.4em; height: 2.4em; color: var(--fg); animation: lh-pulse 3s ease-in-out infinite; }
.lh-sleep p { margin: 0; font-size: 1.1em; font-weight: 600; letter-spacing: 0.04em; }

/* ── career, achievements, leaderboard ─────────────────────────────────── */
.lh-acct { display: flex; gap: 0.45em; align-items: center; }
.lh-acct b { color: var(--fg); }
.lh-achs, .lh-board { list-style: none; margin: 0; padding: 0; display: grid; font-size: 0.92em; }
.lh-achs li { display: grid; grid-template-columns: auto 1fr auto; gap: 0.9em; align-items: center; padding: 0.55em 0; border-bottom: 1px solid var(--hair); color: var(--fg3); }
.lh-achs li div { display: grid; gap: 0.05em; }
.lh-achs li span { font-size: 0.9em; }
.lh-achs li em { font-style: normal; font-size: 0.85em; }
.lh-achs li.lh-got { color: var(--fg2); }
.lh-achs li.lh-got b { color: var(--fg); }
.lh-achs li.lh-got > svg { color: var(--accent); }
.lh-board li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto 4.5em; gap: 0.9em; align-items: baseline; padding: 0.5em 0.4em; border-bottom: 1px solid var(--hair); }
.lh-board li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh-board li strong { text-align: right; }
.lh-board li em { font-style: normal; font-size: 0.85em; color: var(--fg3); text-align: right; }
.lh-board .lh-bhead { font-size: 0.72em; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg3); }
.lh-board .lh-bhead strong { font-weight: 700; }
.lh-board .lh-rank { color: var(--fg3); }
.lh-board .lh-top { color: var(--accent); }
.lh-board .lh-me { background: var(--sel); border-radius: 0.4em; }
.lh-board .lh-gap { display: block; text-align: center; color: var(--fg3); border: 0; padding: 0; }
.lh-wide .lh-scroll { overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.lh-split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 2.4em; }
.lh-pane { display: flex; flex-direction: column; min-height: 0; }
.lh-pane > h3:first-child { margin-top: 0; }
.lh-pane .lh-tabs { margin: 0 0 0.7em; }
.lh-panebody { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; padding-right: 0.4em; }
.lh-panebody .lh-kv { grid-template-columns: 1fr; }

/* convoy + account */
.lh-code { font-size: 2.3em; font-weight: 700; letter-spacing: 0.25em; color: var(--accent); margin: 0.1em 0 0.3em; user-select: text; -webkit-user-select: text; }
#lh-code { text-transform: uppercase; letter-spacing: 0.25em; }
.lh-login { display: grid; grid-template-columns: auto 1fr; gap: 0.6em 1em; align-items: center; }
.lh-login label { font-size: 0.9em; color: var(--fg2); }

/* ── full map (M) ──────────────────────────────────────────────────────── */
.lh-panel.lh-mapscreen { width: min(78em, 100%); height: 100%; }
.lh-mapscreen .lh-scroll { overflow: hidden; display: flex; min-height: 0; flex: 1; }
.lh-mapwrap { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 14em; gap: 1.4em; }
.lh-mapcv { width: 100%; height: 100%; min-height: 12em; border-radius: 0.7em; cursor: grab; touch-action: none; display: block; box-shadow: inset 0 0 0 1px var(--hair); }
.lh-mapcv:active { cursor: grabbing; }
.lh-mapside { overflow-y: auto; min-height: 0; }
.lh-mapside h3:first-child { margin-top: 0; }
.lh-mapkey { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45em; font-size: 0.88em; color: var(--fg2); }
.lh-mapkey li { display: flex; align-items: center; gap: 0.6em; }
.lh-mapkey small { display: block; font-size: 0.85em; color: var(--fg3); }
.lh-mapdot { display: inline-grid; place-items: center; width: 1.3em; height: 1.3em; border-radius: 50%; font: 700 0.75em/1 var(--lh-ui); font-style: normal; color: #16120d; flex: none; }
.lh-mapmember { background: #5fc4d6; }
.lh-mapruin { background: #4a443c; color: #a9a18f; position: relative; }
.lh-mapruin::after { content: ""; position: absolute; left: 15%; right: 15%; top: 50%; height: 1.5px; background: #c9bfae; transform: rotate(-45deg); }
.lh-mapstory { background: #ffc23d; }
.lh-mapdest { background: #4fa8ff; color: #0d0a07; font-size: 0.5em; }
.lh-mapintel { background: #16120d; border: 1.5px dashed currentColor; }
.lh-mapme { width: 0; height: 0; border-left: 0.45em solid transparent; border-right: 0.45em solid transparent; border-bottom: 0.9em solid var(--accent); margin: 0 0.2em; flex: none; }

/* ── campaign: chapters, journal objectives, tapes, notes ──────────────── */
.lh-campchs { list-style: none; margin: 0.4em 0; padding: 0; display: grid; }
.lh-campch { display: grid; gap: 0.1em; padding: 0.55em 0; border-bottom: 1px solid var(--hair); }
.lh-campch small { color: var(--fg3); font-size: 0.84em; }
.lh-campch.lh-locked { opacity: 0.55; }
.lh-objs, .lh-tapes, .lh-notes { list-style: none; margin: 0.4em 0; padding: 0; display: grid; gap: 0.5em; }
.lh-obj { display: flex; gap: 0.6em; align-items: flex-start; }
.lh-obj > svg { flex: none; width: 1.05em; height: 1.05em; margin-top: 0.2em; color: var(--accent); }
.lh-obj.lh-done { color: var(--fg3); text-decoration: line-through; text-decoration-thickness: 1px; }
.lh-obj.lh-done > svg { color: var(--good); }
.lh-obj small { display: block; color: var(--fg3); font-size: 0.84em; }
.lh-obj .lh-hint { color: #9fd6ff; text-decoration: none; }
.lh-notes li { font-style: italic; color: var(--fg2); }
.lh-notes small { display: block; font-style: normal; color: var(--fg3); font-size: 0.8em; }
.lh-discovery-toast { position: fixed; z-index: 100; top: 1.2rem; left: 50%; transform: translateX(-50%); padding: 0.5rem 0; color: #fbf8f2; font: 600 0.95rem var(--lh-ui);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7), 0 0 1em rgba(0, 0, 0, 0.4); pointer-events: none; }

/* ── The Way Back: cutscene captions and authored film titles ──────────── */
.lh2-cinema { position: fixed; z-index: 34; left: 12%; right: 12%; bottom: 9%; margin: auto; max-width: 1000px; padding: 0; background: transparent; border: 0;
  color: #fbf8f2; text-align: center; pointer-events: auto; font-family: var(--lh-ui); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 0.8em rgba(0, 0, 0, 0.6); }
.lh2-cinema[hidden] { display: none; }
.lh2-scene-title { display: none; }
.lh2-cinema p { margin: 0.3em 0 0.6em; font-size: clamp(16px, 1.6vw, 22px); font-weight: 550; line-height: 1.5; }
.lh2-cinema button { margin: 0 0.4em; padding: 0.3em 0.8em; border: 0; border-radius: 2em; background: rgba(0, 0, 0, 0.35); color: rgba(251, 248, 242, 0.8); font: 600 12px var(--lh-ui); cursor: pointer; }
.lh2-cinema button:focus-visible { outline: 2px solid #f6b445; }
body:has(.lh-panel) .lh2-cinema { visibility: hidden; }
.lh2-film { position: fixed; inset: 0; z-index: 32; pointer-events: none; color: #fbf8f2; font-family: var(--lh-ui); }
.lh2-film[hidden] { display: none; }
.lh2-letterbox { position: absolute; left: 0; right: 0; height: 7.5%; background: #000; z-index: 1; }
.lh2-letterbox-top { top: 0; }
.lh2-letterbox-bottom { bottom: 0; }
.lh2-film-fade { position: absolute; inset: 0; background: #000; opacity: 1; }
.lh2-film-logo { position: absolute; left: 50%; top: 46%; width: min(72vw, 880px); height: auto; opacity: 0; transform: translate(-50%, -50%) scale(0.94); filter: drop-shadow(0 4px 22px rgba(0, 0, 0, 0.55)); }
.lh2-credit { position: absolute; left: 9%; bottom: 18%; max-width: 70%; opacity: 0; text-shadow: 0 2px 18px #000, 0 1px 4px #000; }
.lh2-credit-role { font-size: clamp(12px, 1.3vw, 17px); line-height: 1.5; letter-spacing: 0.04em; color: rgba(251, 248, 242, 0.75); margin-bottom: 0.4em; }
.lh2-credit-name { font-size: clamp(26px, 3.4vw, 50px); line-height: 1.15; font-weight: 650; letter-spacing: -0.01em; }
.lh2-credit-name[data-list="true"] { font-size: clamp(18px, 2vw, 30px); line-height: 1.3; max-width: 26em; }
.lh2-byline { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); opacity: 0; white-space: nowrap; font: 600 clamp(15px, 1.7vw, 24px)/1 var(--lh-ui);
  letter-spacing: 0.2em; text-transform: uppercase; text-shadow: 0 2px 14px #000, 0 1px 3px #000; }
.lh2-chapter-card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; text-shadow: 0 2px 12px #000; }
.lh2-chapter-card[hidden] { display: none; }
.lh2-chapter-date { font-size: clamp(12px, 1.3vw, 17px); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #f6b445; margin-bottom: 0.6em; }
.lh2-chapter-title { font-size: clamp(26px, 3.4vw, 48px); font-weight: 650; letter-spacing: -0.01em; }
.lh2-film[data-kind="prologue"] .lh2-chapter-title { font-size: clamp(36px, 5.6vw, 76px); font-weight: 700; letter-spacing: -0.02em; }
.lh2-opening-skip { position: absolute; right: 4%; bottom: 2%; z-index: 2; pointer-events: auto; border: 0; background: transparent; color: rgba(251, 248, 242, 0.7); padding: 8px 12px; font: 600 12px var(--lh-ui); cursor: pointer; }
.lh2-opening-skip:hover { color: #fbf8f2; }
.lh2-opening-skip:focus-visible { outline: 2px solid #f6b445; }
body:has(.lh2-film:not([hidden])) #hud { visibility: hidden; }
body:has(.lh-panel) .lh2-film { visibility: hidden; }

/* ── high contrast ─────────────────────────────────────────────────────── */
.lh-menus.hc { --fg2: #fff; --fg3: #e6e6e6; --hair: rgba(255, 255, 255, 0.5); --hair2: #fff; --sheet: #000; }
.lh-menus.hc .lh-panel { backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: inset 0 0 0 2px #fff; }

/* ── small windows ─────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .lh-stage { padding: 0.9em 1em; }
  .lh-keys { left: 1em; }
  .lh-np { right: 1em; }
  .lh-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 3.6em; gap: 0.3em 0.8em; }
  .lh-dl > div { grid-template-columns: 8em 1fr; }
  .lh-mapwrap { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(12em, 1fr) auto; }
}
@media (max-width: 900px) {
  .lh-wide .lh-scroll { overflow-y: auto; display: block; }
  .lh-split { grid-template-columns: minmax(0, 1fr); gap: 1.6em; }
  .lh-panebody { overflow: visible; }
}
@media (max-width: 560px) {
  .lh-two, .lh-cards { grid-template-columns: 1fr; }
  .lh-row { grid-template-columns: 1fr auto; }
  .lh-row .lh-rc { grid-column: 1 / -1; grid-row: 2; justify-content: stretch; }
  .lh-login { grid-template-columns: 1fr; }
  .lh-choice { flex-wrap: wrap; }
  .lh-cl { flex-basis: calc(100% - 3em); }
  .lh-cost { max-width: none; flex: 1 1 100%; display: flex; gap: 0.6em; align-items: baseline; justify-content: flex-start; margin-left: 2.4em; text-align: left; }
  .lh-pocket-layout { grid-template-columns: minmax(0, 1fr) 7.5em; gap: 0.7em; }
  .lh-pocket-actions { padding-left: 0.7em; }
}
@media (max-height: 820px) {
  .lh-main { gap: 0.9em; }
  .lh-main .lh-logo { max-width: 17em; }
  .lh-main .lh-item { padding-top: 0.38em; padding-bottom: 0.38em; }
}
@media (max-height: 470px) {
  .lh-col { gap: 0.7em; }
  .lh-item { padding-top: 0.28em; padding-bottom: 0.28em; }
  .lh-head { padding-top: 0.6em; padding-bottom: 0.5em; }
  .lh-panel .lh-keys { padding-top: 0.45em; padding-bottom: 0.45em; }
  .lh-stage > .lh-col ~ .lh-keys, .lh-stage .lh-keys:not(.lh-panel .lh-keys) { display: none; }
}
@media (max-width: 800px), (max-height: 650px) {
  .lh-menus[data-root="inventory"] .lh-stage { padding: 0.8em; }
  html[data-lh-menu="inventory"] #hud .radar { visibility: hidden; }
}

@keyframes lh-rise { from { opacity: 0; transform: translateY(0.45em); } }
@keyframes lh-slide { from { opacity: 0; transform: translateX(1em); } }
@keyframes lh-fade { from { opacity: 0; } }
@keyframes lh-pulse { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .lh-menus *, .lh-menus *::before, .lh-menus *::after { animation: none !important; transition: none !important; } }
.lh-reduce-motion .lh-menus *, .lh-reduce-motion .lh-menus *::before, .lh-reduce-motion .lh-menus *::after { animation: none !important; transition: none !important; }

/* Sign-in gate */
.lh-auth .lh-login { grid-template-columns: 1fr; gap: 0.35em; }
.lh-auth .lh-login label { margin-top: 0.45em; }
.lh-login label small { color: var(--fg2); opacity: 0.75; font-weight: 400; margin-left: 0.4em; }
.lh-or { display: flex; align-items: center; gap: 0.8em; margin: 1.1em 0 0.3em; color: var(--fg2); font-size: 0.85em; }
.lh-or::before, .lh-or::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: 0.3; }
.lh-ghost { box-shadow: none; opacity: 0.85; }
.lh-ghost:hover, .lh-ghost:focus { opacity: 1; }
.lh-msg.lh-bad { color: var(--danger); }
.lh-btn .ic { width: 1.15em; height: 1.15em; margin-right: 0.45em; vertical-align: -0.2em; }

/* ── Sign-in modal (the auth screen): a Long Haul card over the blurred world ── */
.lh-menus[data-screen="auth"] .lh-scrim {
  background: radial-gradient(120% 90% at 50% 110%, rgba(246, 140, 60, 0.22), rgba(8, 7, 6, 0) 60%), rgba(8, 7, 6, 0.62);
  backdrop-filter: blur(14px) saturate(0.8); -webkit-backdrop-filter: blur(14px) saturate(0.8); }
.lh-menus[data-screen="auth"] .lh-stage { justify-content: center; overflow-y: auto; }
.lh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lh-am { position: relative; width: min(25em, 100%); margin: auto; padding: 2em 2em 0; border-radius: 1.1em; overflow: hidden;
  background: linear-gradient(180deg, rgba(30, 24, 19, 0.94), rgba(14, 12, 10, 0.96));
  box-shadow: 0 0 0 1px rgba(251, 248, 242, 0.09), 0 1.6em 4em rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 236, 200, 0.08);
  user-select: text; -webkit-user-select: text; animation: lh-am-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes lh-am-in { from { opacity: 0; transform: translateY(0.8em) scale(0.985); } }
@media (prefers-reduced-motion: reduce) { .lh-am { animation: none; } }
/* a low desert sun behind the logo */
.lh-am-sun { position: absolute; left: 50%; top: -9em; width: 22em; height: 16em; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(246, 170, 80, 0.32), rgba(246, 120, 50, 0.1) 55%, transparent 75%); }
.lh-am-brand { position: relative; display: grid; justify-items: center; gap: 0.35em; margin-bottom: 1.4em; }
.lh-am-brand img { width: min(14em, 80%); height: auto; filter: drop-shadow(0 0.3em 1em rgba(0, 0, 0, 0.5)); }
.lh-am-kicker { margin: 0; font-size: 0.68em; font-weight: 700; letter-spacing: 0.32em; text-transform: uppercase; color: var(--accent); }
.lh-am-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 0.25em; margin-bottom: 1.3em; border-radius: 999px; background: rgba(251, 248, 242, 0.06); }
.lh-am-tabs button { position: relative; z-index: 1; padding: 0.55em 0.5em; border: 0; border-radius: 999px; background: none; color: var(--fg2);
  font: 600 0.88em/1.2 var(--lh-ui); cursor: pointer; transition: color 0.15s, background 0.15s; }
.lh-am-tabs button[aria-selected="true"] { background: rgba(251, 248, 242, 0.92); color: #17120d; }
.lh-am-tabs button:not([aria-selected="true"]):hover { color: var(--fg); }
.lh-am-title { margin: 0 0 0.35em; font-size: 1.25em; font-weight: 700; text-align: center; }
.lh-am-lead { margin: 0 0 1.2em; color: var(--fg2); text-align: center; font-size: 0.92em; }
.lh-am-lead b { color: var(--fg); }
.lh-am-dim { color: var(--fg3); }
.lh-am-badge { display: grid; place-items: center; width: 3em; height: 3em; margin: 0 auto 0.8em; border-radius: 50%; background: rgba(246, 180, 69, 0.14); color: var(--accent); }
.lh-am-badge .ic { width: 1.5em; height: 1.5em; }
.lh-am-badge.lh-bad { background: rgba(255, 106, 77, 0.14); color: var(--danger); }
.lh-am-fields { display: grid; gap: 0.8em; }
.lh-am-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7em; }
.lh-am-f { display: grid; gap: 0.35em; font-size: 0.82em; color: var(--fg2); font-weight: 600; }
.lh-am-f small { margin-left: 0.5em; font-weight: 400; color: var(--fg3); }
.lh-am-in { width: 100%; padding: 0.75em 0.9em; border: 0; border-radius: 0.6em; background: rgba(0, 0, 0, 0.35); color: var(--fg);
  font: 500 1.08em/1.2 var(--lh-ui); box-shadow: inset 0 0 0 1px rgba(251, 248, 242, 0.12); transition: box-shadow 0.15s, background 0.15s; }
.lh-am-in:hover { box-shadow: inset 0 0 0 1px rgba(251, 248, 242, 0.24); }
.lh-menus .lh-am-in:focus, .lh-menus .lh-am-in:focus-visible { outline: none; background: rgba(0, 0, 0, 0.45); box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 4px rgba(246, 180, 69, 0.15); }
.lh-am-row { display: flex; justify-content: center; margin-top: 0.9em; }
.lh-am-row.lh-am-right { justify-content: flex-end; margin: 0.5em 0 0; }
.lh-am-link { border: 0; background: none; padding: 0.2em 0; color: var(--fg2); font: 600 0.82em/1.3 var(--lh-ui); cursor: pointer; }
.lh-am-link:hover, .lh-am-link:focus-visible { color: var(--accent); }
.lh-am-go { display: flex; align-items: center; justify-content: center; gap: 0.5em; width: 100%; margin-top: 1.2em; padding: 0.85em 1em; border: 0; border-radius: 0.65em;
  background: linear-gradient(180deg, #f9c25b, #eaa232); color: #1a1209; font: 700 1em/1.2 var(--lh-ui); letter-spacing: 0.02em; cursor: pointer;
  box-shadow: 0 0.4em 1.2em rgba(246, 160, 50, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35); transition: transform 0.12s, filter 0.15s; }
.lh-am-go:hover { filter: brightness(1.06); }
.lh-am-go:active { transform: translateY(1px); }
.lh-am-go:disabled { cursor: default; filter: saturate(0.6) brightness(0.85); }
.lh-am-go .ic { width: 1em; height: 1em; }
.lh-am-go.lh-am-quiet { background: rgba(251, 248, 242, 0.1); color: var(--fg); box-shadow: inset 0 0 0 1px rgba(251, 248, 242, 0.14); }
.lh-am-spin { width: 1em; height: 1em; border-radius: 50%; border: 2px solid rgba(26, 18, 9, 0.3); border-top-color: #1a1209; animation: lh-spin 0.8s linear infinite; }
@keyframes lh-spin { to { transform: rotate(360deg); } }
.lh-am-msg { min-height: 0; margin: 0.7em 0 0; text-align: center; font-size: 0.85em; font-weight: 600; color: var(--accent); }
.lh-am-msg:empty { display: none; }
.lh-am-msg.lh-bad { color: var(--danger); }
.lh-am-or { display: flex; align-items: center; gap: 0.8em; margin: 1.2em 0; color: var(--fg3); font-size: 0.75em; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
/* the divider is a road centre line */
.lh-am-or i { flex: 1; height: 2px; background: repeating-linear-gradient(90deg, rgba(246, 180, 69, 0.5) 0 10px, transparent 10px 18px); }
.lh-am-discord { display: flex; align-items: center; justify-content: center; gap: 0.6em; width: 100%; padding: 0.8em 1em; border: 0; border-radius: 0.65em;
  background: #5865f2; color: #fff; font: 700 0.95em/1.2 var(--lh-ui); cursor: pointer; box-shadow: 0 0.4em 1.2em rgba(88, 101, 242, 0.25); transition: filter 0.15s, transform 0.12s; }
.lh-am-discord:hover { filter: brightness(1.08); }
.lh-am-discord:active { transform: translateY(1px); }
.lh-am-discord .ic { width: 1.3em; height: 1.3em; }
.lh-am-foot { margin: 1.5em -2em 0; text-align: center; }
.lh-am-foot p { margin: 0 2em 1.1em; font-size: 0.75em; color: var(--fg3); }
/* the asphalt edge with its dashed centre line along the bottom of the card */
.lh-am-road { display: block; height: 0.55em; background:
  repeating-linear-gradient(90deg, #f6b445 0 1.6em, transparent 1.6em 2.8em) center / 100% 3px no-repeat, linear-gradient(180deg, #2a2622, #1c1916); }
@media (max-width: 520px) { .lh-am { padding: 1.5em 1.2em 0; } .lh-am-foot { margin: 1.3em -1.2em 0; } .lh-am-foot p { margin: 0 1.2em 1em; } .lh-am-pair { grid-template-columns: 1fr; } }
