/* Poslední míle – vzhled rozhraní: provozní příručka telekomunikačního technika.
   Krémový papír, inkoust, signální barva firmy, tvrdé stíny. */

@font-face { font-family: "Big Shoulders Display"; src: url(../fonts/shoulders-ext.woff2) format("woff2"); font-weight: 500 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2113; }
@font-face { font-family: "Big Shoulders Display"; src: url(../fonts/shoulders.woff2) format("woff2"); font-weight: 500 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Instrument Sans"; src: url(../fonts/instrument-ext.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2113; }
@font-face { font-family: "Instrument Sans"; src: url(../fonts/instrument.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: "Azeret Mono"; src: url(../fonts/azeret-ext.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2113; }
@font-face { font-family: "Azeret Mono"; src: url(../fonts/azeret.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }

:root {
  --paper: #f4ecd8;
  --paper-2: #eadfc6;
  --paper-3: #dccfb0;
  --ink: #1d2433;
  --ink-2: #4b5368;
  --ink-3: #7f8698;
  --brand: #ff5a2a;
  --teal: #0e9f96;
  --amber: #e39a12;
  --red: #d63a33;
  --green: #2a9a5a;
  --shadow: 4px 4px 0 rgba(18, 23, 36, 0.88);
  --fd: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --fb: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fm: "Azeret Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .25 0 0 0 0 .18 0 0 0 0 .1 0 0 0 .11 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1f4f4c; color: var(--ink); font-family: var(--fb); font-size: 14px; line-height: 1.4; -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
.hidden { display: none !important; }
svg { display: block; width: 100%; height: 100%; }

#world { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; cursor: grab; touch-action: none; }
#world.panning { cursor: grabbing; }
#world[data-tool="build"] { cursor: crosshair; }
#world.over-label { cursor: pointer; }
#vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(8, 14, 26, 0.38) 100%); }

/* ------------------------------------------------------------------ základní stavební prvky */
.panel { background-color: var(--paper); background-image: var(--grain); border: 2px solid var(--ink); box-shadow: var(--shadow); color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 12px; background: var(--paper); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); font-family: var(--fd); font-weight: 800; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; transition: transform 0.06s, box-shadow 0.06s, background 0.12s; }
.btn:hover { background: #fff8e6; }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.btn.accent { background: var(--brand); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); }
.btn.accent:hover { filter: brightness(1.08); background: var(--brand); }
.btn.ghost { background: transparent; box-shadow: none; border-style: dashed; color: var(--ink-2); }
.btn.ghost:hover { color: var(--red); border-color: var(--red); background: transparent; }
.btn.icon { width: 34px; padding: 0; }
.btn.big { height: 52px; padding: 0 26px; font-size: 22px; box-shadow: 4px 4px 0 var(--ink); }
.btn.big:active { transform: translate(4px, 4px); }
.btn.dis { opacity: 0.4; pointer-events: auto; cursor: not-allowed; filter: grayscale(0.6); }
.btn svg, .ico svg { width: 18px; height: 18px; }
.ico { display: inline-flex; width: 18px; height: 18px; flex: none; }

.meter { height: 8px; background: var(--paper-3); border: 1.5px solid var(--ink); margin: 4px 0 8px; position: relative; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ink); transition: width 0.4s; }
.meter i.mid { background: var(--amber); }
.meter i.bad { background: var(--red); }
.meter.brand i { background: var(--brand); }
.meter.teal i { background: var(--teal); }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px 0; height: 19px; border: 1.5px solid var(--ink); font-family: var(--fm); font-size: 10.5px; font-weight: 600; font-style: normal; letter-spacing: 0.02em; text-transform: uppercase; background: var(--paper-2); white-space: nowrap; }
.chip svg { width: 11px; height: 11px; }
.chip.ok, .chip.good { background: var(--green); color: #fff; }
.chip.bad { background: var(--red); color: #fff; }
.chip.mid { background: var(--amber); color: var(--ink); }
.chip.off { background: var(--paper-3); color: var(--ink-2); }

.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; border-bottom: 1px dashed rgba(29, 36, 51, 0.22); font-size: 13px; }
.row span { color: var(--ink-2); }
.row b { font-family: var(--fm); font-weight: 600; font-size: 12.5px; text-align: right; }
.row b small { color: var(--ink-3); font-weight: 500; margin-left: 3px; }
.row.bad b { color: var(--red); }
.row a, .note a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 2px; cursor: pointer; }

.note { margin: 8px 0 2px; padding: 7px 9px; font-size: 12.5px; line-height: 1.4; background: rgba(29, 36, 51, 0.06); border-left: 3px solid var(--ink-3); color: var(--ink-2); }
.note.bad { border-left-color: var(--red); background: rgba(214, 58, 51, 0.1); color: #7c1d18; }
.note.good { border-left-color: var(--green); background: rgba(42, 154, 90, 0.12); color: #17573a; }
.note.wide { margin: 0 0 14px; }
.mono { font-family: var(--fm); font-size: 11.5px; }

/* ------------------------------------------------------------------ horní lišta */
#hud { position: fixed; top: 10px; left: 10px; right: 10px; height: 62px; display: flex; align-items: stretch; z-index: 20; animation: drop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
@keyframes drop { from { transform: translateY(-90px); } }
.hud-brand { display: flex; align-items: center; gap: 10px; padding: 0 16px 0 12px; background: var(--ink); color: var(--paper); min-width: 0; }
.logo { width: 36px; height: 36px; flex: none; }
.hud-company { font-family: var(--fd); font-weight: 900; font-size: 21px; line-height: 1; letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.hud-tag { font-family: var(--fm); font-size: 9px; letter-spacing: 0.24em; color: var(--brand); margin-top: 4px; }
.hud-cell { display: flex; flex-direction: column; justify-content: center; padding: 0 16px; border-right: 2px solid var(--ink); min-width: 0; position: relative; }
.hud-cell .lbl { font-family: var(--fm); font-size: 9.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.hud-cell .val { font-family: var(--fd); font-weight: 800; font-size: 27px; line-height: 1.02; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hud-cell .val.small { font-size: 17px; line-height: 1.25; }
.hud-cell .val small { font-family: var(--fm); font-size: 10px; font-weight: 500; color: var(--brand); margin-left: 7px; letter-spacing: 0; }
.hud-cell .val .sep { color: var(--ink-3); margin: 0 4px; font-weight: 500; }
.hud-cell .pos { color: var(--green); }
.hud-cell .neg, .neg { color: var(--red); }
.hud-cell .meter { margin: 2px 0 0; height: 6px; width: 132px; }
.hud-cell.research .val { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.val.rep { display: flex; align-items: flex-end; gap: 8px; }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 22px; padding-bottom: 3px; }
.bars i { width: 5px; background: var(--paper-3); border: 1px solid var(--ink); }
.bars i:nth-child(1) { height: 6px; } .bars i:nth-child(2) { height: 10px; } .bars i:nth-child(3) { height: 14px; } .bars i:nth-child(4) { height: 18px; } .bars i:nth-child(5) { height: 22px; }
.bars i.on { background: var(--green); } .bars i.on.mid { background: var(--amber); } .bars i.on.bad { background: var(--red); }
.hud-spacer { flex: 1; }
.hud-date { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; padding: 0 14px; border-left: 2px solid var(--ink); }
.hud-date .date { font-family: var(--fd); font-weight: 800; font-size: 22px; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; line-height: 1.1; }
.daybar { width: 100%; min-width: 108px; height: 5px; background: var(--paper-3); border: 1px solid var(--ink); margin-top: 4px; }
.daybar i { display: block; height: 100%; background: var(--brand); }
.speed { display: flex; align-items: center; gap: 0; padding: 0 12px 0 2px; }
.speed button { width: 36px; height: 34px; padding: 7px; background: var(--paper); border: 2px solid var(--ink); margin-left: -2px; color: var(--ink); }
.speed button:first-child { margin-left: 0; }
.speed button:hover { background: #fff8e6; }
.speed button.on { background: var(--ink); color: var(--paper); }
.speed button[data-speed="0"].on { background: var(--red); color: #fff; animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { background: var(--ink); } }
.hud-btns { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-left: 2px solid var(--ink); }

/* ------------------------------------------------------------------ stavební nabídka */
#palette { position: fixed; top: 84px; left: 10px; width: 164px; padding: 6px 8px 10px; z-index: 15; max-height: calc(100vh - 160px); overflow-y: auto; scrollbar-width: none; animation: slideL 0.5s 0.1s cubic-bezier(0.2, 0.9, 0.3, 1.1) both; }
@keyframes slideL { from { transform: translateX(-200px); } }
#palette h4 { margin: 8px 0 5px; font-family: var(--fm); font-size: 9.5px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
#palette h4::after { content: ""; flex: 1; height: 1.5px; background: var(--ink); opacity: 0.25; }
.pal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tool { position: relative; height: 76px; padding: 2px 2px 3px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; background: var(--paper-2); border: 2px solid var(--ink); transition: transform 0.08s, background 0.12s; overflow: hidden; }
.tool:hover { background: #fff8e6; transform: translate(-1px, -1px); box-shadow: 2px 2px 0 var(--ink); }
.tool.on { background: var(--ink); color: var(--paper); box-shadow: inset 0 0 0 2px var(--brand); }
.tool img { width: 46px; height: 46px; object-fit: contain; pointer-events: none; margin-bottom: -2px; }
.tool-ico { width: 30px; height: 30px; margin-bottom: 8px; }
.tool-ico svg { width: 30px; height: 30px; }
.tool-name { font-family: var(--fd); font-weight: 800; font-size: 12.5px; line-height: 1; text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; }
.tool-cost { font-family: var(--fm); font-size: 9.5px; color: var(--ink-3); line-height: 1.3; display: flex; align-items: center; }
.tool.on .tool-cost { color: var(--paper-3); }
.tool-cost svg { width: 10px; height: 10px; }
.tool.locked { background: repeating-linear-gradient(135deg, var(--paper-2) 0 6px, var(--paper-3) 6px 12px); color: var(--ink-3); }
.tool.locked img { filter: grayscale(1) contrast(0.6); opacity: 0.55; }
.tool.locked .tool-ico { opacity: 0.5; }

/* ------------------------------------------------------------------ cíl */
#objective { position: fixed; top: 84px; left: 186px; width: 292px; padding: 0 0 9px; z-index: 14; cursor: pointer; animation: drop 0.5s 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.1) both; }
.obj-head { display: flex; justify-content: space-between; align-items: center; background: var(--ink); color: var(--paper); padding: 4px 9px; font-family: var(--fm); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; }
.obj-head span { display: inline-flex; align-items: center; gap: 6px; }
.obj-head svg { width: 13px; height: 13px; color: var(--brand); }
.obj-head b { color: var(--brand); font-weight: 600; letter-spacing: 0.05em; }
.obj-title { font-family: var(--fd); font-weight: 900; font-size: 22px; line-height: 1.05; text-transform: uppercase; padding: 8px 10px 2px; }
.obj-text { padding: 0 10px 6px; font-size: 12.5px; color: var(--ink-2); line-height: 1.38; }
#objective .meter { margin: 2px 10px 3px; }
.obj-prog { display: flex; justify-content: space-between; padding: 0 10px; font-family: var(--fm); font-size: 10.5px; color: var(--ink-2); }
.obj-rew { color: var(--green); font-weight: 600; }

/* ------------------------------------------------------------------ detail výběru */
#inspector { position: fixed; top: 84px; right: 10px; width: 292px; padding: 12px 12px 12px; z-index: 15; max-height: calc(100vh - 420px); min-height: 120px; overflow-y: auto; animation: slideR 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.1) both; scrollbar-width: thin; scrollbar-color: var(--ink) transparent; }
@keyframes slideR { from { transform: translateX(40px); opacity: 0; } }
.insp-close { position: absolute; top: 4px; right: 6px; width: 26px; height: 26px; border: 0; background: none; font-size: 24px; line-height: 1; color: var(--ink-2); }
.insp-close:hover { color: var(--red); }
.insp-head { display: flex; gap: 10px; align-items: center; margin: -2px 22px 8px 0; }
.insp-head img { width: 54px; height: 54px; object-fit: contain; background: var(--paper-2); border: 2px solid var(--ink); flex: none; }
.insp-head h3 { margin: 0 0 4px; font-family: var(--fd); font-weight: 900; font-size: 21px; line-height: 1; text-transform: uppercase; }
.insp-sub { margin: 12px 0 2px; font-family: var(--fm); font-size: 9.5px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }
.insp-actions { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.insp-actions .btn { width: 100%; font-size: 13.5px; height: 32px; }
.insp-actions .btn svg { width: 15px; height: 15px; }

/* ------------------------------------------------------------------ zprávy */
#ticker { position: fixed; left: 10px; bottom: 10px; width: min(620px, calc(100vw - 330px)); height: 40px; display: flex; align-items: stretch; z-index: 14; animation: rise 0.5s 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.1) both; }
@keyframes rise { from { transform: translateY(80px); } }
.ticker-head { width: 40px; flex: none; background: var(--ink); color: var(--paper); border: 0; padding: 9px; }
.ticker-head:hover { color: var(--brand); }
.ticker-line { flex: 1; display: flex; align-items: center; padding: 0 12px; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; line-height: 36px; animation: tick 0.5s both; border-left: 5px solid var(--ink-3); }
@keyframes tick { from { transform: translateY(14px); opacity: 0; } }
.ticker-line.bad { border-left-color: var(--red); }
.ticker-line.good { border-left-color: var(--green); }
.ticker-line.info { border-left-color: var(--teal); }
.ticker-line.link { cursor: pointer; }
.ticker-log { position: absolute; left: -2px; right: -2px; bottom: 44px; max-height: 320px; overflow-y: auto; background: var(--paper); background-image: var(--grain); border: 2px solid var(--ink); box-shadow: var(--shadow); scrollbar-width: thin; scrollbar-color: var(--ink) transparent; }
.log-item { display: flex; gap: 10px; padding: 6px 10px; font-size: 12.5px; border-bottom: 1px dashed rgba(29, 36, 51, 0.2); border-left: 4px solid var(--ink-3); }
.log-item.bad { border-left-color: var(--red); } .log-item.good { border-left-color: var(--green); } .log-item.info { border-left-color: var(--teal); }
.log-item.link { cursor: pointer; } .log-item.link:hover { background: var(--paper-2); }
.log-item time { font-family: var(--fm); font-size: 10.5px; color: var(--ink-3); white-space: nowrap; padding-top: 1px; min-width: 62px; }

/* ------------------------------------------------------------------ minimapa */
#mini { position: fixed; right: 10px; bottom: 10px; width: 292px; padding: 7px; z-index: 14; animation: rise 0.5s 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1) both; }
.mini-map { background: #17393a; border: 2px solid var(--ink); padding: 5px 4px 3px; margin-bottom: 6px; }
#minimap { width: 100%; height: auto; display: block; cursor: pointer; touch-action: none; }
.mini-row { display: flex; margin-top: 5px; }
.mini-row button { flex: 1; height: 26px; padding: 0 2px; border: 2px solid var(--ink); background: var(--paper); margin-left: -2px; font-family: var(--fd); font-weight: 800; font-size: 12.5px; letter-spacing: 0.03em; text-transform: uppercase; display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }
.mini-row button:first-child { margin-left: 0; }
.mini-row button:hover { background: #fff8e6; }
.mini-row button.on { background: var(--ink); color: var(--paper); }
.mini-row.layers button { height: 32px; font-size: 15px; }
.mini-row.layers button.on[data-layer="1"] { background: #0a2a4a; color: #6fe9ff; }
.mini-row .ico, .mini-row .ico svg { width: 16px; height: 16px; }
.mini-row.overlays button { font-size: 11.5px; }
.mini-row.overlays button:first-child { flex: 0 0 26px; }

/* ------------------------------------------------------------------ kancelář */
.window { position: fixed; left: 50%; top: 50%; width: min(980px, calc(100vw - 24px)); height: min(660px, calc(100vh - 110px)); transform: translate(-50%, -47%); z-index: 30; display: flex; flex-direction: column; animation: pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
@keyframes pop { from { transform: translate(-50%, -44%) scale(0.96); opacity: 0; } }
.tabs { display: flex; gap: 4px; padding: 0 44px 0 8px; margin-bottom: -2px; position: relative; z-index: 2; overflow-x: auto; scrollbar-width: none; flex: none; }
.tabs button { height: 38px; padding: 0 16px; background: var(--paper-3); border: 2px solid var(--ink); font-family: var(--fd); font-weight: 800; font-size: 17px; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; transform: translateY(5px); transition: transform 0.1s; }
.tabs button:hover { transform: translateY(2px); }
.tabs button.on { background: var(--paper); background-image: var(--grain); border-bottom-color: var(--paper); transform: none; }
.win-close { position: absolute; top: 2px; right: 0; width: 34px; height: 34px; background: var(--ink); color: var(--paper); border: 2px solid var(--ink); font-size: 22px; line-height: 1; z-index: 3; }
.win-close:hover { background: var(--red); }
.win-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 18px 20px; background-color: var(--paper); background-image: var(--grain); border: 2px solid var(--ink); box-shadow: 6px 6px 0 rgba(18, 23, 36, 0.88); scrollbar-width: thin; scrollbar-color: var(--ink) transparent; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.col { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.box { border: 2px solid var(--ink); padding: 10px 12px 12px; background: rgba(255, 255, 255, 0.28); }
.box-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.box-head h4 { margin: 0; font-family: var(--fd); font-weight: 900; font-size: 20px; text-transform: uppercase; letter-spacing: 0.02em; }
.box-head span { font-family: var(--fm); font-size: 10.5px; color: var(--ink-3); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.btn-row .btn { font-size: 13.5px; height: 32px; }

.ledger { width: 100%; border-collapse: collapse; font-size: 13px; }
.ledger th { font-family: var(--fm); font-size: 9.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); text-align: right; padding: 0 0 6px 8px; }
.ledger td { padding: 4px 0 4px 8px; text-align: right; font-family: var(--fm); font-size: 12px; border-bottom: 1px dashed rgba(29, 36, 51, 0.2); white-space: nowrap; }
.ledger td:first-child { text-align: left; font-family: var(--fb); font-size: 13px; padding-left: 0; white-space: normal; }
.ledger td:nth-child(3) { color: var(--ink-2); }
.ledger tr.sec td { font-family: var(--fd); font-weight: 900; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; padding-top: 12px; border-bottom: 2px solid var(--ink); }
.ledger tr.tot td { font-weight: 700; border-bottom: 0; }
.ledger tr.tot td:first-child { font-weight: 700; }
.ledger tr.res td { background: var(--ink); color: var(--paper); font-weight: 700; padding: 7px 8px; font-size: 13px; }
.ledger tr.res td:first-child { font-family: var(--fd); font-size: 16px; text-transform: uppercase; letter-spacing: 0.05em; padding-left: 8px; }
.ledger tr.res td:nth-child(3) { color: #8be0a8; }
.ledger tr.res.neg td:nth-child(3) { color: #ff9a8f; }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kpi { border: 2px solid var(--ink); padding: 7px 10px 8px; background: rgba(255, 255, 255, 0.28); }
.kpi span { display: block; font-family: var(--fm); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.kpi b { font-family: var(--fd); font-weight: 800; font-size: 26px; line-height: 1.1; white-space: nowrap; }
.chart-wrap { border: 2px solid var(--ink); background: repeating-linear-gradient(0deg, transparent 0 29px, rgba(29, 36, 51, 0.08) 29px 30px), rgba(255, 255, 255, 0.3); padding: 4px 4px 0; position: relative; }
#chart { width: 100%; height: auto; display: block; }
.chart-legend { position: absolute; top: 6px; left: 9px; display: flex; gap: 12px; font-family: var(--fm); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); }
.lg::before { content: ""; display: inline-block; width: 12px; height: 4px; margin-right: 5px; vertical-align: middle; }
.lg.cash::before { background: var(--brand); outline: 1.5px solid var(--ink); }
.lg.profit::before { background: var(--green); height: 8px; opacity: 0.7; }

.tariffs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.tariff { border: 2px solid var(--ink); padding: 10px 12px 10px; background: rgba(255, 255, 255, 0.28); }
.tariff.off { opacity: 0.45; filter: grayscale(0.7); }
.tariff-head { display: flex; flex-direction: column; }
.tariff-head h4 { margin: 0; font-family: var(--fd); font-weight: 900; font-size: 24px; line-height: 1; text-transform: uppercase; }
.tariff-head span { font-family: var(--fm); font-size: 10px; color: var(--ink-3); margin-top: 2px; }
.tariff-price { display: flex; align-items: baseline; gap: 7px; margin: 10px 0 4px; flex-wrap: wrap; }
.tariff-price b { font-family: var(--fd); font-weight: 900; font-size: 46px; line-height: 0.9; font-variant-numeric: tabular-nums; }
.tariff-price span { font-family: var(--fm); font-size: 10.5px; color: var(--ink-2); }
.tariff-price .chip { margin-left: auto; align-self: center; }
.tariff-scale { display: flex; justify-content: space-between; font-family: var(--fm); font-size: 9.5px; color: var(--ink-3); margin: -2px 0 8px; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; cursor: pointer; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 8px; background: var(--paper-3); border: 2px solid var(--ink); }
input[type="range"]::-moz-range-track { height: 4px; background: var(--paper-3); border: 2px solid var(--ink); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 24px; margin-top: -10px; background: var(--brand); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); border-radius: 0; }
input[type="range"]::-moz-range-thumb { width: 12px; height: 20px; background: var(--brand); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); border-radius: 0; }
input[type="range"]:disabled { opacity: 0.5; cursor: not-allowed; }

.grid { width: 100%; border-collapse: collapse; }
.grid th { font-family: var(--fm); font-size: 9.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); text-align: left; padding: 0 10px 7px 0; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.grid td { padding: 7px 10px 7px 0; font-family: var(--fm); font-size: 12px; border-bottom: 1px dashed rgba(29, 36, 51, 0.22); white-space: nowrap; }
.grid td:first-child { font-family: var(--fb); font-size: 13.5px; }
.grid td small { color: var(--ink-3); margin-left: 3px; }
.grid.click tbody tr:not(.tot) { cursor: pointer; }
.grid.click tbody tr:not(.tot):hover td { background: rgba(29, 36, 51, 0.07); }
.grid tr.tot td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; }
.cellbar { position: relative; width: 120px; height: 18px; background: var(--paper-3); border: 1.5px solid var(--ink); }
.cellbar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink-3); }
.cellbar.brand i { background: var(--brand); }
.cellbar span { position: absolute; inset: 0; display: flex; align-items: center; padding-left: 6px; font-size: 11px; font-weight: 600; color: var(--ink); mix-blend-mode: normal; text-shadow: 0 0 3px var(--paper), 0 0 3px var(--paper); }

.tree { display: flex; flex-direction: column; gap: 14px; }
.track { display: grid; grid-template-columns: 34px 1fr; border: 2px solid var(--ink); background: rgba(255, 255, 255, 0.2); }
.track-name { writing-mode: vertical-rl; transform: rotate(180deg); background: var(--ink); color: var(--paper); font-family: var(--fd); font-weight: 800; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; display: flex; align-items: center; justify-content: center; white-space: nowrap; }
.track-items { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px; }
.tech { flex: 1 1 190px; max-width: 260px; border: 2px solid var(--ink); padding: 8px 10px 9px; background: var(--paper); position: relative; display: flex; flex-direction: column; }
.tech-year { position: absolute; top: 0; right: 0; background: var(--ink); color: var(--paper); font-family: var(--fm); font-size: 10px; font-weight: 600; padding: 2px 6px; }
.tech h5 { margin: 0 44px 4px 0; font-family: var(--fd); font-weight: 900; font-size: 17px; line-height: 1.05; text-transform: uppercase; }
.tech p { margin: 0 0 6px; font-size: 11.5px; line-height: 1.35; color: var(--ink-2); flex: 1; }
.tech-meta { font-family: var(--fm); font-size: 10px; color: var(--ink-3); margin-bottom: 7px; }
.tech-foot { min-height: 30px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; align-items: flex-start; }
.tech-foot .btn { width: 100%; height: 30px; font-size: 13px; }
.tech-foot .meter { width: 100%; margin: 0 0 2px; }
.tech-foot .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tech.done { background: rgba(42, 154, 90, 0.13); }
.tech.done h5 { color: #1c6b40; }
.tech.active { box-shadow: 0 0 0 3px var(--teal); }
.tech.future, .tech.locked { background: repeating-linear-gradient(135deg, var(--paper) 0 7px, var(--paper-2) 7px 14px); }
.tech.future h5, .tech.locked h5, .tech.future p, .tech.locked p { opacity: 0.6; }
.tech.ready { box-shadow: 3px 3px 0 var(--ink); }

.stepper { display: flex; align-items: center; gap: 12px; margin: 4px 0 8px; }
.stepper b { font-family: var(--fd); font-weight: 900; font-size: 40px; line-height: 1; min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; }
.stepper.wide b { font-size: 30px; min-width: 150px; }
.stepper .btn { font-size: 22px; font-family: var(--fm); font-weight: 500; }
.stepper.off { opacity: 0.4; pointer-events: none; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 2px 0 8px; cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border: 2px solid var(--ink); background: var(--paper); margin: 0; flex: none; position: relative; cursor: pointer; }
.check input:checked { background: var(--brand); }
.check input:checked::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

.goals { display: flex; flex-direction: column; gap: 8px; }
.goal { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; border: 2px solid var(--ink); padding: 8px 12px 8px 8px; background: rgba(255, 255, 255, 0.28); }
.goal-n { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--ink); font-family: var(--fd); font-weight: 900; font-size: 20px; background: var(--paper); }
.goal-n svg { width: 20px; height: 20px; }
.goal h5 { margin: 0; font-family: var(--fd); font-weight: 900; font-size: 18px; text-transform: uppercase; line-height: 1.1; }
.goal p { margin: 1px 0 0; font-size: 12.5px; color: var(--ink-2); }
.goal p.goal-when { margin-top: 3px; font-family: var(--fm); font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--green); }
.goal-rew { font-family: var(--fm); font-size: 11px; font-weight: 600; color: var(--green); white-space: nowrap; }
.goal.done { opacity: 0.62; } .goal.done .goal-n { background: var(--green); color: #fff; }
.goal.cur { box-shadow: 4px 4px 0 var(--brand); } .goal.cur .goal-n { background: var(--brand); color: #fff; }
.goal.todo { background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(29, 36, 51, 0.05) 7px 14px); } .goal.todo h5, .goal.todo p { opacity: 0.55; }

/* ------------------------------------------------------------------ oznámení a nápovědy */
#toasts { position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 26; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(520px, calc(100vw - 24px)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; font-size: 13.5px; font-weight: 500; border-left-width: 8px; animation: toast 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; max-width: 100%; }
@keyframes toast { from { transform: translateY(-24px) scale(0.94); opacity: 0; } }
.toast.out { transition: opacity 0.35s, transform 0.35s; opacity: 0; transform: translateY(-14px); }
.toast.bad { border-left-color: var(--red); } .toast.good { border-left-color: var(--green); } .toast.info { border-left-color: var(--teal); }
.toast-go { flex: none; width: 30px; height: 30px; padding: 5px; border: 2px solid var(--ink); background: var(--paper-2); }
.toast-go:hover { background: var(--ink); color: var(--paper); }

#hint { position: fixed; z-index: 60; max-width: 260px; padding: 6px 9px; background: var(--ink); color: var(--paper); font-size: 12px; line-height: 1.35; pointer-events: none; box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35); }
#hint.rich { max-width: 290px; width: 290px; padding: 11px 13px 12px; background: var(--paper); background-image: var(--grain); color: var(--ink); border: 2px solid var(--ink); box-shadow: var(--shadow); }
#hint h5 { margin: 0 0 4px; font-family: var(--fd); font-weight: 900; font-size: 19px; text-transform: uppercase; line-height: 1.05; }
#hint p { margin: 0 0 8px; font-size: 12.5px; color: var(--ink-2); }
#hint table { width: 100%; border-collapse: collapse; }
#hint td { padding: 3px 0; border-top: 1px dashed rgba(29, 36, 51, 0.25); font-size: 12px; color: var(--ink-2); vertical-align: top; }
#hint td:last-child { text-align: right; font-family: var(--fm); font-size: 11px; font-weight: 600; color: var(--ink); padding-left: 10px; }
.card-lock { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 5px 7px; background: var(--ink); color: var(--paper); font-size: 11.5px; }
.card-lock svg { width: 13px; height: 13px; flex: none; }

#cursorTip { position: fixed; z-index: 25; pointer-events: none; padding: 6px 9px 7px; background: var(--ink); color: var(--paper); font-size: 12px; line-height: 1.45; border-left: 4px solid var(--brand); box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3); white-space: nowrap; }
#cursorTip b { font-family: var(--fd); font-weight: 800; font-size: 15px; letter-spacing: 0.03em; text-transform: uppercase; }
#cursorTip div b { font-family: var(--fm); font-size: 12px; text-transform: none; letter-spacing: 0; }
#cursorTip.bad { border-left-color: var(--red); }
#cursorTip .why { color: #ff9a8f; white-space: normal; max-width: 260px; }
#cursorTip .ok { color: #8be0a8; }
#cursorTip .dim { color: #a9b0c0; }

/* ------------------------------------------------------------------ dialogy */
#modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; background: rgba(12, 18, 32, 0.62); padding: 16px; animation: fade 0.25s both; }
@keyframes fade { from { opacity: 0; } }
.modal-card { width: min(760px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 24px 28px 26px; box-shadow: 8px 8px 0 rgba(18, 23, 36, 0.9); animation: pop2 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
@keyframes pop2 { from { transform: scale(0.94) translateY(12px); opacity: 0; } }
.modal-card h2 { margin: 0 0 14px; font-family: var(--fd); font-weight: 900; font-size: 44px; line-height: 0.95; text-transform: uppercase; }
.help { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px 20px; }
.help b { font-family: var(--fd); font-weight: 900; font-size: 18px; text-transform: uppercase; display: block; border-bottom: 2px solid var(--ink); padding-bottom: 2px; margin-bottom: 5px; }
.help p { margin: 0; font-size: 12.8px; line-height: 1.42; color: var(--ink-2); }
.keys { margin-top: 18px; font-size: 12px; color: var(--ink-2); line-height: 2.1; }
kbd { font-family: var(--fm); font-size: 10.5px; font-weight: 600; background: var(--paper-2); border: 1.5px solid var(--ink); box-shadow: 1.5px 1.5px 0 var(--ink); padding: 2px 6px; margin: 0 3px 0 10px; color: var(--ink); }
kbd:first-child { margin-left: 0; }
.modal-actions { display: flex; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.end-kicker { font-family: var(--fm); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.end h2 { font-size: 64px; }
.end.bad h2 { color: var(--red); } .end.good h2 { color: var(--brand); }
.end p { font-size: 15px; line-height: 1.5; max-width: 56ch; margin: 0 0 18px; }
.end-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.end-stats div { border: 2px solid var(--ink); padding: 8px 12px; background: rgba(255, 255, 255, 0.3); }
.end-stats span { display: block; font-family: var(--fm); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.end-stats b { font-family: var(--fd); font-weight: 900; font-size: 28px; white-space: nowrap; }

/* ------------------------------------------------------------------ úvodní obrazovka */
#start { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; padding: 24px clamp(16px, 5vw, 72px); background: linear-gradient(100deg, rgba(10, 16, 30, 0.82) 0%, rgba(10, 16, 30, 0.55) 34%, rgba(10, 16, 30, 0) 68%); transition: opacity 0.6s, visibility 0.6s; overflow-y: auto; }
#start.gone { opacity: 0; visibility: hidden; pointer-events: none; }
#start.gone .start-card { transform: translateX(-60px); }
.start-card { width: min(500px, 100%); padding: 26px 30px 22px; box-shadow: 10px 10px 0 rgba(8, 12, 22, 0.85); transition: transform 0.6s cubic-bezier(0.5, 0, 0.8, 0.4); position: relative; margin: auto 0; }
.start-card::before { content: ""; position: absolute; top: -2px; left: -2px; right: -2px; height: 10px; background: repeating-linear-gradient(90deg, var(--brand) 0 22px, var(--ink) 22px 44px); border: 2px solid var(--ink); }
.start-card > * { animation: reveal 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.start-card > :nth-child(1) { animation-delay: 0.1s; } .start-card > :nth-child(2) { animation-delay: 0.18s; } .start-card > :nth-child(3) { animation-delay: 0.3s; } .start-card > :nth-child(4) { animation-delay: 0.4s; } .start-card > :nth-child(5) { animation-delay: 0.5s; } .start-card > :nth-child(6) { animation-delay: 0.6s; }
@keyframes reveal { from { opacity: 0; transform: translateY(16px); } }
.start-kicker { font-family: var(--fm); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); margin-top: 12px; }
#start h1 { margin: 6px 0 10px; font-family: var(--fd); font-weight: 900; font-size: clamp(64px, 11vw, 104px); line-height: 0.82; letter-spacing: -0.01em; text-transform: uppercase; display: flex; flex-direction: column; }
#start h1 .accent { color: var(--brand); -webkit-text-stroke: 2px var(--ink); text-shadow: 5px 5px 0 var(--ink); position: relative; align-self: flex-start; }
.start-lead { margin: 14px 0 18px; font-size: 15px; line-height: 1.5; color: var(--ink-2); max-width: 44ch; }
.start-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.fld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fld > span { font-family: var(--fm); font-size: 9.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); display: flex; justify-content: space-between; align-items: baseline; }
.fld > span b { font-family: var(--fd); font-size: 18px; font-weight: 900; color: var(--ink); letter-spacing: 0; line-height: 0.6; }
.fld input[type="text"] { height: 36px; padding: 0 10px; background: #fffaf0; border: 2px solid var(--ink); font-family: var(--fd); font-weight: 800; font-size: 19px; letter-spacing: 0.03em; outline: none; width: 100%; user-select: text; -webkit-user-select: text; min-width: 0; }
.fld input[type="text"]:focus { box-shadow: 3px 3px 0 var(--brand); }
.fld.seed input { text-transform: uppercase; font-family: var(--fm); font-size: 14px; font-weight: 600; }
.seedrow { display: flex; gap: 8px; }
.seedrow .btn { height: 36px; width: 36px; flex: none; }
.swatches { display: flex; gap: 7px; height: 36px; align-items: center; }
.swatch { width: 30px; height: 30px; border: 2px solid var(--ink); background: var(--c); padding: 0; transition: transform 0.1s; }
.swatch:hover { transform: translateY(-2px); }
.swatch.on { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); transform: translateY(-2px); }
.diffs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; grid-column: 1 / -1; }
.fld:has(.diffs) { grid-column: 1 / -1; }
.diff { padding: 6px 8px 7px; border: 2px solid var(--ink); background: var(--paper); margin-left: -2px; text-align: left; display: flex; flex-direction: column; }
.diff:first-child { margin-left: 0; }
.diff b { font-family: var(--fd); font-weight: 900; font-size: 18px; text-transform: uppercase; line-height: 1.1; }
.diff span { font-family: var(--fm); font-size: 9.5px; color: var(--ink-3); line-height: 1.3; }
.diff.on { background: var(--ink); color: var(--paper); } .diff.on span { color: var(--paper-3); }
.start-actions { display: flex; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.start-actions .btn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.start-foot { margin-top: 16px; font-family: var(--fm); font-size: 9.5px; letter-spacing: 0.04em; color: var(--ink-3); line-height: 1.5; }

/* ------------------------------------------------------------------ menší obrazovky */
@media (max-width: 1280px) {
  .hud-cell.wide { display: none; }
  .hud-company { max-width: 130px; }
}
@media (max-width: 1080px) {
  .hud-cell.research { display: none; }
  #btnOffice { font-size: 0; gap: 0; width: 34px; padding: 0; }
  .hud-cell { padding: 0 11px; }
  .hud-cell .val { font-size: 22px; }
  #objective { width: 250px; }
}
@media (max-width: 860px) {
  #hud { height: auto; flex-wrap: wrap; top: 6px; left: 6px; right: 6px; }
  .hud-brand, .hud-spacer, .hud-cell.wide, .hud-cell.research, #hudQueue, #btnSave, #btnSound { display: none !important; }
  .hud-cell { flex: 1 1 22%; padding: 4px 7px 3px; border-bottom: 2px solid var(--ink); }
  .hud-cell:nth-child(5) { border-right: 0; }
  .hud-cell .lbl { font-size: 7.5px; letter-spacing: 0.06em; white-space: nowrap; overflow: hidden; }
  .hud-cell .val { font-size: 18px; }
  .bars { height: 16px; transform: scale(0.8); transform-origin: left bottom; margin-right: -4px; }
  .hud-date { flex: 1 1 auto; border-left: 0; align-items: flex-start; padding: 4px 8px; }
  .hud-date .date { font-size: 17px; }
  .daybar { min-width: 0; }
  .speed { flex: 0 0 auto; padding: 4px 6px 4px 0; }
  .speed button { width: 32px; height: 32px; padding: 6px; }
  .hud-btns { flex: 0 0 auto; padding: 4px 6px; gap: 5px; }
  #btnOffice { font-size: 0; gap: 0; width: 34px; padding: 0; }
  #palette { top: auto; bottom: 52px; left: 6px; right: 6px; width: auto; max-height: none; display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; padding: 6px; animation: none; }
  #palette h4 { display: none; }
  .pal-grid { display: flex; gap: 6px; }
  .tool { width: 64px; height: 70px; flex: none; }
  #objective { top: 100px; left: 6px; width: min(240px, calc(100vw - 12px)); animation: none; }
  .obj-title { font-size: 17px; padding: 5px 8px 2px; }
  .obj-text { display: none; }
  #inspector { top: 100px; right: 6px; left: auto; width: min(280px, calc(100vw - 12px)); max-height: 44vh; z-index: 16; }
  #mini { right: 6px; bottom: 140px; width: 150px; padding: 4px; animation: none; }
  .mini-map { margin-bottom: 0; padding: 3px; }
  .mini-row.overlays, .mini-row.tod { display: none; }
  .mini-row.layers button { height: 28px; font-size: 12px; gap: 3px; }
  .mini-row.layers .ico { display: none; }
  #ticker { left: 6px; right: 6px; bottom: 6px; width: auto; height: 38px; animation: none; }
  #toasts { top: auto; bottom: 150px; width: calc(100vw - 172px); left: 6px; transform: none; align-items: flex-start; }
  .toast { font-size: 12px; padding: 6px 8px 6px 10px; }
  #hint { display: none !important; }
  .cols, .tariffs { grid-template-columns: 1fr; }
  .help { grid-template-columns: 1fr; gap: 10px; }
  .keys { display: none; }
  .window { height: calc(100dvh - 16px); width: calc(100vw - 12px); transform: translate(-50%, -50%); }
  .win-body { padding: 12px 10px 16px; }
  .tabs button { font-size: 14px; padding: 0 10px; height: 34px; }
  .grid td, .grid th { padding-right: 6px; }
  .cellbar { width: 64px; }
  .start-form { grid-template-columns: 1fr; }
  #start { background: rgba(10, 16, 30, 0.6); padding: 12px; align-items: flex-start; }
  .end-stats { grid-template-columns: 1fr; }
  .modal-card { padding: 16px 16px 18px; }
  .modal-card h2 { font-size: 32px; }
  .end h2 { font-size: 40px; }
}
@media (max-height: 760px) and (min-width: 861px) {
  .tool { height: 66px; }
  .tool img { width: 38px; height: 38px; }
  #inspector { max-height: calc(100vh - 360px); }
  .start-card { padding: 18px 26px 16px; }
  #start h1 { font-size: 72px; }
  .start-lead { margin: 8px 0 12px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
