/* The look of the screen: dark glass panels with rounded corners, one warm yellow accent, a narrow bold face.
   After a Gemini mock-up of the HUD (2026-11-17). Loaded by index.html after styles.css; the panels that are linked from
   JS later (combat.css, dialogue.css, touch.css, coop.css) read these variables. Change a colour or a radius here only.
   The same values for canvas drawing: ui/icons.js `UI`. */
:root {
  --accent: #f6c23a;
  --accent-ink: #1a1407;
  --accent-soft: rgba(246, 194, 58, 0.18);
  --accent-edge: rgba(246, 194, 58, 0.55);
  --ink: #f5f3ee;
  --muted: #b3bac2;
  --panel: rgba(14, 18, 24, 0.84);
  --glass: rgba(14, 18, 24, 0.84);
  --glass-strong: rgba(10, 13, 18, 0.9);
  --glass-edge: rgba(255, 255, 255, 0.12);
  --glass-blur: none; /* a blur behind a panel over the live 3D canvas costs ~6 fps: the glass is a plain translucent fill */
  --radius: 16px;
  --radius-s: 10px;
  --good: #5fcf6a;
  --danger: #e8412c;
  --shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
  /* narrow and bold, Cyrillic included, nothing downloaded: Arial Narrow ships with macOS and Windows Office,
     Roboto Condensed / Bahnschrift with Android and Windows 10+ */
  --font: "Arial Narrow", "Roboto Condensed", "Bahnschrift", "Helvetica Neue", system-ui, -apple-system, "Segoe UI", sans-serif;
}
html, body { font-family: var(--font); font-weight: 700; letter-spacing: 0.01em; }
button, input, select { font-family: inherit; }

/* A glass panel */
#topleft, #topright, #prompt, #info, #toast, #help, #speed, #street, #mouse-hint, #door-hint {
  background: var(--glass); border: 1px solid var(--glass-edge); border-radius: var(--radius); box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); text-shadow: none;
}

/* top left: the game and what you are doing */
#topleft { top: 16px; left: 16px; padding: 9px 16px 9px 14px; gap: 3px; border-left: 4px solid var(--accent); }
#topleft .title { color: var(--accent); font-size: 15px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
#mode { color: var(--ink); font-size: 14px; display: flex; align-items: center; gap: 8px; }
#mode::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
#mode:empty { display: none; }

/* top right: clock, weather, coordinates */
#topright { top: 16px; right: 16px; padding: 8px 16px 8px 18px; gap: 1px; align-items: flex-end; min-width: 150px; }
#clock { font-size: 24px; font-weight: 800; letter-spacing: 0.04em; line-height: 1.1; }
#weather { color: var(--ink); font-size: 15px; display: inline-flex; align-items: center; gap: 7px; }
#weather::before { content: ''; width: 16px; height: 16px; flex: none; background: var(--accent);
  -webkit-mask: var(--icon-sun) center / contain no-repeat; mask: var(--icon-sun) center / contain no-repeat; }
#weather:empty::before { display: none; }
#coords { color: var(--muted); font-size: 11px; font-weight: 400; font-variant-numeric: tabular-nums; }
:root { --icon-sun: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='6'/%3E%3Cpath d='M16 2v4M16 26v4M2 16h4M26 16h4M6 6l2.800 2.800M23.200 23.200L26 26M26 6l-2.800 2.800M8.800 23.200L6 26' stroke='%23000' stroke-width='2.600' stroke-linecap='round' fill='none'/%3E%3C/svg%3E"); }

/* the round map with its yellow ring (the north chip and the arrow are drawn in ui/minimap.js) */
#minimap { left: 20px; bottom: 28px; width: 200px; height: 200px; background: #1c2128;
  box-shadow: 0 0 0 3px var(--accent), 0 0 0 7px rgba(10, 13, 18, 0.7), 0 8px 26px rgba(0, 0, 0, 0.55); }

/* bottom right: the street, the car's speed (the health and weapon panel is ui/combat.css) */
#street { right: 20px; bottom: 168px; padding: 8px 16px; border-right: 4px solid var(--accent); }
#street-name { font-size: 22px; font-weight: 800; letter-spacing: 0.02em; }
#street-old { font-size: 13px; color: var(--accent); font-weight: 700; }
#speed { right: 20px; bottom: 28px; padding: 6px 18px 8px; font-size: 46px; font-weight: 800; line-height: 1.05; color: var(--ink); }
#speed small { font-size: 15px; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; }

/* the action prompt: a pill with the key as a yellow cap */
#hud #prompt { left: 50%; bottom: 84px; padding: 7px 20px 7px 8px; border-radius: 999px; font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 12px;
  letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; }
#prompt kbd, .dlg-option kbd { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 9px; font: 800 19px/1 var(--font);
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35), inset 0 -2px 0 rgba(0, 0, 0, 0.15); text-transform: none; }
#hud #prompt.door { bottom: 96px; font-size: 21px; background: var(--glass-strong); border: 2px solid var(--accent); box-shadow: 0 0 22px rgba(246, 194, 58, 0.25), var(--shadow); }
#hud #prompt.door::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--good); margin-left: 6px; order: 3; }

/* info, toasts, the key list, hints of the first minutes */
#info { top: 112px; right: 16px; border-top: 3px solid var(--accent); }
#info-title { color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; }
#info-body { font-weight: 400; font-size: 15px; }
#toast { top: 16%; padding: 10px 22px; font-size: 18px; border-radius: 999px; border: 1px solid var(--accent-edge); }
#help { font-weight: 400; font-size: 15px; border-top: 3px solid var(--accent); }
#hud #mouse-hint { bottom: 34px; border-radius: 999px; font-weight: 400; font-size: 14px; color: var(--ink); padding: 6px 16px; }
#hud #door-hint { top: 90px; border-radius: 999px; font-size: 16px; padding: 8px 18px 8px 10px; border: 1px solid var(--accent-edge); }
#hud #door-hint i { background: var(--accent); color: var(--accent-ink); border-radius: 5px; font: 800 9px var(--font); }
#attribution { left: 50%; right: auto; transform: translateX(-50%); bottom: 6px; font-size: 11px; font-weight: 400; color: rgba(255, 255, 255, 0.6); white-space: nowrap; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }
#stats { top: 74px; left: 16px; border-radius: 8px; }

/* the loading screen and the start / pause panel: the key art, dark on the left where the text goes */
#loading, #start { background: var(--glass-strong); }
#loading, #start.cover {
  --key-art: url("../../assets/ui/menu.jpg");
  background:
    linear-gradient(90deg, rgba(8, 10, 14, 0.92) 0%, rgba(8, 10, 14, 0.72) 38%, rgba(8, 10, 14, 0.12) 78%),
    radial-gradient(ellipse at 50% 55%, transparent 55%, rgba(6, 8, 11, 0.7) 100%),
    var(--key-art) center / cover no-repeat, #0d1116;
}
/* the loading picture: the next of four on every visit (the inline script of index.html sets data-art), one per load,
   so nothing changes while it loads; Gemini key art, web/assets/textures/CREDITS.md */
:root[data-art="1"] #loading { --key-art: url("../../assets/ui/loading/a.webp"); }
:root[data-art="2"] #loading { --key-art: url("../../assets/ui/loading/b.webp"); }
:root[data-art="3"] #loading { --key-art: url("../../assets/ui/loading/c.webp"); }
/* a phone: the words sit in the middle, over the bright part of the picture — darken it evenly */
@media (max-width: 899px) {
  #loading, #start.cover {
    background:
      linear-gradient(rgba(8, 10, 14, 0.62), rgba(8, 10, 14, 0.78)),
      var(--key-art) center / cover no-repeat, #0d1116;
  }
}
#start { background: rgba(8, 10, 14, 0.78); }
@media (min-width: 900px) {
  #loading, #start { align-items: flex-start; text-align: left; padding-left: clamp(24px, 6vw, 110px); }
}
#loading .brand, #start h1 { font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; line-height: 1.05; }
#loading .brand { font-size: clamp(30px, 5.4vw, 60px); border-left: 6px solid var(--accent); padding-left: 14px; }
#loading .sub { color: var(--muted); font-weight: 400; letter-spacing: 0.04em; margin: 8px 0 26px 20px; }
.spinner { border-color: rgba(255, 255, 255, 0.14); border-top-color: var(--accent); }
.progress { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.progress > i { background: linear-gradient(90deg, #e0a41c, var(--accent)); }
#loading-text, #loading-pct { color: var(--ink); font-weight: 400; }
#loading-retry, #play { background: var(--accent); color: var(--accent-ink); border-radius: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3), 0 0 24px rgba(246, 194, 58, 0.22); }
#play { font-size: 19px; padding: 13px 34px; }
#play:hover { filter: brightness(1.08); }
#play.warming { background: #3a4452; color: var(--ink); box-shadow: none; text-transform: none; }
#play.warming > i { background: var(--accent); opacity: 0.55; }
#start .panel { background: var(--glass); border: 1px solid var(--glass-edge); border-top: 3px solid var(--accent); border-radius: 18px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); max-width: 720px; }
#start .lead { font-weight: 400; font-size: 15px; }
.controls { font-size: 15px; font-weight: 400; }
.controls b { display: inline-block; min-width: 1.6em; padding: 0 6px; margin-right: 2px; border-radius: 6px; text-align: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; }

/* settings, in the same glass */
.settings { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-edge); border-radius: 12px; }
.settings summary { text-transform: uppercase; letter-spacing: 0.06em; font-weight: 800; }
.set-row, .set-line { font-weight: 400; font-size: 15px; }
.set-chip { background: rgba(255, 255, 255, 0.08); border-radius: 999px; color: var(--ink); font-weight: 700; padding: 6px 14px; }
.set-chip.on { background: var(--accent); color: var(--accent-ink); }
.set-row input[type=range] { accent-color: var(--accent); }

/* the full map keeps the canvas; only its frame is ours */
#fullmap { background: #1d232b; }

/* declutter (2026-12): «Все клавиши» and «Авторы» fold under the short key list; the HUD keeps no technical lines */
#start details.all-keys, #start details.credits { text-align: left; margin: 0 0 14px; padding: 6px 12px; cursor: default;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-edge); border-radius: 12px; }
#start details.all-keys > summary, #start details.credits > summary { cursor: pointer; color: var(--accent); padding: 4px 0;
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 800; }
#start details.all-keys .controls { margin: 8px 0 4px; font-size: 14px; }
#start details.credits ul { list-style: none; margin: 6px 0 4px; padding: 0; font-size: 13px; font-weight: 400; line-height: 1.5; color: var(--muted); }
#start details.credits b { color: var(--ink); font-weight: 700; }
#start details.credits a { color: inherit; }
#start details :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#hud #mode, #hud #coords { display: none; }
body.touch #start details.all-keys { display: none; }
