:root {
  color-scheme: dark;
  /* Octane brand (octane-tech.io): purple #4D1565, gradient #7C3AED → #5A196A, and red #E51B31 for accents */
  --brand: #4D1565;
  --brand-violet: #7C3AED;
  --brand-plum: #5A196A;
  --brand-wine: #901F53;
  --brand-red: #E51B31;
  --brand-grad: linear-gradient(135deg, #7C3AED, #5A196A);
  --brand-grad-hot: linear-gradient(90deg, #A855F7, #E51B31);
  --night: #0E0A14;
  --panel: rgba(20, 12, 28, .86);
  --line: #2F2340;
  /* Corner radii: one consistent scale for the UI */
  --r-xl: 24px; --r-lg: 16px; --r-md: 12px;
  --line-soft: rgba(255, 255, 255, .06);
  --ink: #EEE9F4;
  --muted: #A196B0;
  --faint: #6C6080;
  --accent: #C084FC;
  --chip-ink: #160F1C;
  --cyan: #6FD6E8;
  --ok: #4CC38A;
  --warn: #F2C94C;
  --info: #7AA7FF;
  --plate-blue: #2F6FD6;
  --amber: #FFA62B;
  /* Secondary surfaces inside panels and scene cards; they switch with the theme (see "Day theme" below) */
  --hover: rgba(255, 255, 255, .06);
  --row-busy: rgba(255, 255, 255, .035);
  --track: #1C2830;
  --bar: #2A3A44;
  --knob-off: #26343D;
  --tag-bg: rgba(10, 16, 21, .88);
  --toll: #4FD1C5;
  --mint: #2DD4A7;
  --hud-fade: rgba(14, 10, 20, .88);
  --scrim: rgba(8, 5, 12, .35);
  --logo-ink: #fff;
  --logo-shadow: rgba(14, 10, 20, .9);
  --f-display: "Cairo", "Tajawal", system-ui, sans-serif;
  --f-body: "Cairo", "Tajawal", system-ui, sans-serif;
  --f-latin: "Montserrat", "Cairo", system-ui, sans-serif;
  --f-num: "Montserrat", "Cairo", ui-sans-serif, system-ui, sans-serif;
}
/* Day theme: setSky in input.js sets data-sky on <html>, and the panels and cards follow it */
:root[data-sky="day"] {
  color-scheme: light;
  --panel: rgba(255, 255, 255, .86);
  --line: #E2D9EC;
  --line-soft: rgba(40, 20, 60, .08);
  --ink: #1F1529;
  --muted: #65597A;
  --faint: #978CA6;
  --accent: #7C3AED;
  --cyan: #0B8AA0;
  --ok: #1B9A5E;
  --warn: #B07D08;
  --info: #2F6FD6;
  --amber: #D9800F;
  --hover: rgba(40, 20, 60, .06);
  --row-busy: rgba(124, 58, 237, .05);
  --track: #ECE6F2;
  --bar: #D6CCE2;
  --knob-off: #D3CADD;
  --tag-bg: rgba(255, 255, 255, .92);
  --toll: #0F8F84;
  --mint: #0E9F7A;
  --hud-fade: rgba(236, 242, 247, .7);
  --scrim: rgba(40, 30, 60, .18);
  --logo-ink: #2A1838;
  --logo-shadow: rgba(255, 255, 255, .8);
}
/* The service colours are light, so they are darkened on the white panel to stay readable */
:root[data-sky="day"] .bay-ic, :root[data-sky="day"] .bay[data-state="busy"] .bay-st { color: color-mix(in srgb, var(--c) 72%, #000); }
.panel, .icon-btn, .live, .station-sel, .tag .card, .tag .prog.gauge, .bldg-tip, .tipfx { transition: background-color .6s, border-color .6s, color .6s; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--night);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 14px;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }

.hud {
  position: fixed; inset: 0; pointer-events: none;
  display: grid;
  grid-template-columns: minmax(250px, 300px) 1fr minmax(250px, 310px);
  grid-template-rows: auto minmax(0, 1fr) 52px;
  gap: 16px;
  padding: calc(16px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px));
}
.hud::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 140px; pointer-events: none;
  background: linear-gradient(to bottom, var(--hud-fade), transparent);
}

/* top bar */
.topbar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; position: relative; flex-wrap: wrap; }
/* The logo is pinned to the bottom-left corner of the screen, mark before the name in either language; the last row (52px) is reserved for it so the left panel never covers it */
.brand { position: absolute; left: calc(16px + env(safe-area-inset-left, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 10px; direction: ltr; }
.brand h1 { text-shadow: 0 1px 8px var(--logo-shadow); }
/* The logo is a mask (--mark from brand-mark.js) filled with a gradient lighter than the image's colours, so it reads on the dark bar */
.brand-mark {
  width: 34px; height: 42px; flex: none;
  background: linear-gradient(90deg, #A855F7, #B0247A 55%, #E51B31);
  -webkit-mask: var(--mark) center / contain no-repeat; mask: var(--mark) center / contain no-repeat;
}
.brand h1 { font-family: var(--f-latin); font-weight: 600; font-size: 26px; margin: 0; line-height: 1; letter-spacing: -0.01em; direction: ltr; color: var(--logo-ink); }
.top-meta { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }
.live { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 12.5px; color: var(--ink); pointer-events: auto; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 0 rgba(242, 201, 76, .6); animation: ping 1.8s infinite; }
.live[data-mode="live"] i { background: var(--ok); box-shadow: 0 0 0 0 rgba(76, 195, 138, .6); }
.live[data-mode="paused"] i { background: var(--faint); animation: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 8px rgba(0,0,0,0); } 100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); } }
.station-sel { pointer-events: auto; max-width: 220px; font: 500 12.5px var(--f-body); color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
/* The clock sits at the bottom right of the screen, opposite the logo, in the reserved last row */
.clock { position: absolute; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); height: 52px; display: flex; align-items: center; font-family: var(--f-num); font-size: 15px; font-weight: 600; color: var(--logo-ink); font-variant-numeric: tabular-nums; direction: ltr; text-shadow: 0 1px 8px var(--logo-shadow); }

.panel {
  pointer-events: auto;
  background: var(--panel);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
}
.side { align-self: start; max-height: 100%; overflow: auto; display: flex; flex-direction: column; scrollbar-width: thin; }
/* Both side panels stop at the second row: the last row holds the logo on the left and the clock on the right */
.side-start { grid-column: 1; grid-row: 2; }
.side-end { grid-column: 3; grid-row: 2; align-self: start; max-height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; scrollbar-width: thin; overscroll-behavior: contain; }
.side-end > .panel { flex: none; }
.side-end > .feed-panel { flex: 0 1 auto; min-height: 140px; overflow: auto; scrollbar-width: thin; }

/* Collapsing and hiding panels */
[data-phead] > :first-child { margin-inline-end: auto; }
.pctl { display: inline-flex; gap: 2px; margin-inline-start: 2px; }
.pbtn { width: 22px; height: 22px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--faint); cursor: pointer; }
.pbtn:hover { color: var(--ink); background: var(--hover); }
.pbtn svg { width: 14px; height: 14px; transition: transform .2s; }
.panel.collapsed .pbtn[data-act="col"] svg { transform: rotate(180deg); }
.panel.collapsed > :not(:first-child) { display: none; }
.panel.collapsed > [data-phead] { padding-bottom: 12px; margin-bottom: 0; }
.side-end > .feed-panel.collapsed { min-height: 0; overflow: visible; }
.panel.off { display: none !important; }

/* Service centre */
.svc-h { padding: 14px 18px 0; margin-bottom: 6px; }
.linkbtn { font: 500 12px var(--f-body); color: var(--cyan); background: none; border: 0; padding: 3px 6px; margin: -3px -6px; border-radius: 999px; cursor: pointer; }
.linkbtn:hover { background: rgba(111, 214, 232, .08); }
.bays { list-style: none; margin: 0; padding: 0 8px 6px; display: grid; gap: 2px; }
.bay { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-lg); transition: background .3s; }
.bay[data-state="busy"] { background: var(--row-busy); }
.bay-ic { width: 32px; height: 32px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--cb); color: var(--c); }
.bay-ic svg { width: 18px; height: 18px; }
.bay-top { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.bay-top b { font-weight: 500; white-space: nowrap; }
.bay .short { display: none; }
.bay-st { margin-inline-start: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.bay[data-state="busy"] .bay-st { color: var(--c); }
/* The bay's bar in the panel: in the service's colour, with stripes running through it during service, like the tag's gauge (gauge-flow) */
.bay-bar { height: 5px; background: var(--track); border-radius: 999px; overflow: hidden; margin: 6px 0 5px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); }
.bay-bar i { position: relative; display: block; height: 100%; width: 0; overflow: hidden; border-radius: inherit;
  background: linear-gradient(to left, color-mix(in srgb, var(--c) 55%, var(--track)), var(--c)); transition: width .25s linear; }
.bay[data-state="busy"] .bay-bar i::after {
  content: ""; position: absolute; inset-block: 0; right: -12px; left: -12px;
  background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .22) 0 4px, transparent 4px 8px);
  animation: gauge-flow .5s linear infinite;
}
.bay[data-state="busy"] .bay-bar i { box-shadow: 0 0 6px color-mix(in srgb, var(--c) 60%, transparent); }
.bay-sub { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--faint); min-height: 16px; }
.bay-now { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bay[data-state="busy"] .bay-now { color: var(--muted); }
.bay-q { margin-inline-start: auto; white-space: nowrap; }
.bay-add { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 500 16px var(--f-num); line-height: 1; cursor: pointer; }
.bay-add:hover { color: var(--ink); background: var(--hover); }
.svc-foot { display: flex; justify-content: space-between; gap: 8px; padding: 10px 18px 12px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); }
.svc-foot b { color: var(--ink); font-weight: 600; }

/* Toll gates */
.toll-body { padding: 0 18px 12px; }
.toll-body .money { margin-top: 2px; }
.toll-body .money .num { font-size: 22px; color: var(--toll); }
.toll-sub { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.toll-sub b { color: var(--ink); font-weight: 600; }
.toll-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.eyebrow { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.treasury-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }

.treasury { padding: 18px 18px 16px; border-bottom: 1px solid var(--line-soft); }
.money { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.money .num { font-size: 28px; font-weight: 600; white-space: nowrap; color: var(--accent); line-height: 1; transition: text-shadow .3s; }
.money .cur { color: var(--muted); font-size: 14px; }
.money.bump .num { animation: bump .6s ease-out; }
@keyframes bump { 0% { transform: scale(1); text-shadow: 0 0 0 transparent; } 30% { transform: scale(1.06); text-shadow: 0 0 18px rgba(168, 85, 247, .6); } 100% { transform: scale(1); text-shadow: 0 0 0 transparent; } }
.delta { margin-top: 8px; font-size: 12.5px; color: var(--muted); min-height: 1.4em; }
.delta b { color: var(--ok); font-weight: 500; }

.stats { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line-soft); }
.stat { padding: 12px 18px; display: flex; flex-direction: column; gap: 4px; }
.stat:nth-child(odd) { border-inline-end: 1px solid var(--line-soft); }
.stat:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
.stat span { font-size: 12px; color: var(--muted); }
.stat b { font-family: var(--f-num); font-weight: 600; font-size: 18px; font-variant-numeric: tabular-nums; direction: ltr; text-align: right; }

.block { padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.block:last-child { border-bottom: 0; }
.block-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.faint { color: var(--faint); }
/* Tips: the driver pays them on top of the fuel amount, so they are not part of the treasury figure */
.tips .block-h { margin-bottom: 6px; }
.tips-money { display: flex; align-items: baseline; gap: 6px; }
.tips-money #tipsTotal { font-family: var(--f-num); font-size: 20px; font-weight: 600; color: var(--ok); white-space: nowrap; direction: ltr; }
.tips-money .cur { color: var(--muted); font-size: 12.5px; }
.tips-n { margin-inline-start: auto; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.tips-n b { color: var(--ink); font-weight: 600; }
.tips-money.bump #tipsTotal { animation: bump .6s ease-out; }
.tips-last { margin-top: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.4em; }
.tips-last b { color: var(--ink); font-weight: 500; }
/* Tip badge in the transactions list, under the amount */
.tx .amtbox { margin-inline-start: auto; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.tx-top .amtbox .amt { margin-inline-start: 0; }
.tx .tipchip { flex: none; display: inline-flex; align-items: baseline; gap: 3px; padding: 1px 7px; border-radius: 999px; font-size: 11px; color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); white-space: nowrap; }
.tx .tipchip b { font-family: var(--f-num); font-weight: 600; font-size: 11.5px; direction: ltr; }
.tx .tipchip[hidden] { display: none; }
.tx:not([data-status="paid"]) .tipchip { opacity: .55; }
/* Top stations by tips: only in the live all-stations view */
.tips-top { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line-soft); display: grid; gap: 2px; }
.tips-top-h { font-size: 11.5px; color: var(--faint); margin-bottom: 2px; }
.tips-top button { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; grid-template-columns: 1.2em 1fr auto; align-items: center; column-gap: 8px; padding: 4px 6px; margin: 0 -6px; border-radius: 6px; font-size: 12px; position: relative; }
.tips-top button:hover, .tips-top button:focus-visible { background: var(--line-soft); }
.tips-top button:focus-visible { outline: 1px solid var(--ok); }
.tips-top .rk { color: var(--faint); font-family: var(--f-num); text-align: center; }
.tips-top .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.tips-top .am { font-family: var(--f-num); color: var(--ok); white-space: nowrap; direction: ltr; }
.tips-top .bar { grid-column: 2 / 4; height: 2px; border-radius: 2px; background: var(--ok); opacity: .45; margin-top: 3px; }
/* O'Store: company-wide sales, kept separate from the fuel treasury */
.store .block-h { margin-bottom: 6px; }
.store-money { display: flex; align-items: baseline; gap: 6px; }
.store-money #storeTotal { font-family: var(--f-num); font-size: 20px; font-weight: 600; color: var(--ink); white-space: nowrap; direction: ltr; }
.store-money .cur { color: var(--muted); font-size: 12.5px; }
.store-n { margin-inline-start: auto; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.store-n b { color: var(--ink); font-weight: 600; }
.store-money.bump #storeTotal { animation: bump .6s ease-out; }
/* Mint: fleet maintenance jobs done today, company-wide; counts only, never money in the treasury */
/* Mint: fleet maintenance jobs done today, company-wide, in its own panel; counts only, never money in the treasury */
.mint-body { padding: 0 18px 12px; }
.mint-row { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
.mint-row #mintCount { font-family: var(--f-num); font-size: 22px; font-weight: 600; color: var(--mint); }
.mint-unit { font-size: 12.5px; color: var(--muted); }
.mint-row.bump #mintCount { animation: bump .6s ease-out; }
.mint-sub { margin-top: 4px; font-size: 12px; color: var(--muted); }
.mint-sub b { color: var(--ink); font-weight: 600; }
/* The day's most common jobs: name, a bar for its share of the day, and its count */
.mint-top { display: grid; gap: 6px; margin-top: 10px; }
.mint-top:empty { display: none; }
.mint-top-row { display: grid; grid-template-columns: minmax(0, 1fr) 72px 26px; align-items: center; gap: 8px; font-size: 12px; }
.mint-top-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mint-top-row .track { height: 5px; background: var(--track); border-radius: 999px; overflow: hidden; }
.mint-top-row .track i { display: block; height: 100%; border-radius: 999px; background: var(--mint); transition: width .5s ease; }
.mint-top-row .num { font-size: 12px; color: var(--muted); text-align: end; }
.mint-last { margin-top: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.4em; }
.tag.mint-tag .card { cursor: default; }   /* Mint cars can't be inspected */
.store-last { margin-top: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.4em; }

.bars { display: flex; align-items: flex-end; gap: 3px; height: 56px; }
.bars i { flex: 1; min-width: 0; background: var(--bar); border-radius: 4px 4px 1px 1px; transition: height .4s ease; }
.bars i.new { background: var(--brand-grad-hot); }

.mix { display: grid; gap: 8px; }
.mix-row { display: grid; grid-template-columns: 62px 1fr 54px; align-items: center; gap: 10px; font-size: 12.5px; }
.mix-row .track { height: 6px; background: var(--track); border-radius: 999px; overflow: hidden; }
.mix-row .track i { display: block; height: 100%; border-radius: 999px; transition: width .5s ease; }
.mix-row .num { font-size: 12px; color: var(--muted); text-align: left; }

/* feed */
.feed-h { padding: 14px 18px 0; margin-bottom: 8px; }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.pill.demo { color: var(--warn); border-color: rgba(242, 201, 76, .35); }
.pill.live-p { color: var(--ok); border-color: rgba(76, 195, 138, .35); }
.feed { list-style: none; margin: 0; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 2px; }
.tx { padding: 10px 10px; border-radius: var(--r-lg); display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; transition: background .3s; }
.tx.enter { animation: enter .45s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.tx[data-status="fueling"], .tx[data-status="servicing"], .tx[data-status="arriving"], .tx[data-status="waiting"] { background: var(--row-busy); }
.tx-top, .tx-bot { display: flex; align-items: center; gap: 8px; }
.tx-top .amt { margin-inline-start: auto; font-size: 15px; font-weight: 600; }
.tx[data-status="paid"] .amt { color: var(--ink); }
.tx:not([data-status="paid"]) .amt { color: var(--faint); }
.tx-bot { font-size: 12px; color: var(--muted); }
.tx-bot .meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-bot .st { flex: none; }
.tx-bot time { margin-inline-start: auto; font-family: var(--f-num); font-size: 11.5px; color: var(--faint); direction: ltr; }

/* Egyptian plate: black frame, a coloured strip with "Egypt" in Arabic on the right and EGYPT on the left, then digits on the left and letters on the right with a line between them */
.plate {
  --band: #6EC1EA;
  display: inline-flex; flex-direction: column; align-items: stretch; flex: none; direction: ltr;
  border: 1.5px solid #111; border-radius: 4px; overflow: hidden; background: #FBFBF8; color: #111;
  font-family: var(--f-display); font-weight: 700; font-size: 12px; line-height: 1;
  box-shadow: inset 0 0 0 1px #fff;
}
.plate[data-kind="taxi"] { --band: #F28C28; }
.plate[data-kind="cargo"] { --band: #D8322E; }
.plate[data-kind="bus"] { --band: #A9A9A4; }
.plate .pl-band { display: flex; justify-content: space-between; align-items: center; gap: 6px; background: var(--band); color: #111; font-style: normal; font-size: 6.5px; font-weight: 700; padding: 1px 3px; border-bottom: 1px solid #111; letter-spacing: .03em; }
.plate .pl-band span:last-child { font-size: 7.5px; letter-spacing: 0; }
.plate .pl-body { display: flex; align-items: stretch; justify-content: center; padding: 0 5px; white-space: nowrap; }
.plate .pl-num, .plate .pl-let { flex: 1 1 0; text-align: center; padding: 3px 4px; }
.plate .pl-num { border-inline-end: 1px solid #111; letter-spacing: .06em; }
.plate .pl-let { direction: rtl; word-spacing: .05em; }

.fuel { display: inline-block; white-space: nowrap; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; color: var(--chip-ink); }
.st { font-size: 11.5px; display: inline-flex; align-items: center; gap: 5px; }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st[data-s="pending"] { color: var(--faint); }
.st[data-s="arriving"], .st[data-s="waiting"] { color: var(--info); }
.st[data-s="fueling"], .st[data-s="servicing"] { color: var(--accent); }
.st[data-s="paid"] { color: var(--ok); }

/* Control buttons */
.btn { font: 500 14px var(--f-body); border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 9px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--brand-grad); color: #fff; border-color: transparent; font-weight: 700; border-radius: 999px; box-shadow: 0 6px 20px rgba(124, 58, 237, .35); }
.btn.primary:hover { background: linear-gradient(135deg, #8B5CF6, #6B1F7E); }
.btn.primary kbd { background: rgba(255, 255, 255, .18); }
.btn:active { transform: translateY(1px); }
.btn kbd { font: 500 11px var(--f-num); padding: 1px 6px; border-radius: 6px; background: rgba(0,0,0,.15); }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 0 6px; font-size: 13.5px; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .knob { width: 34px; height: 20px; border-radius: 999px; background: var(--knob-off); position: relative; transition: background .2s; flex: none; }
.switch .knob::after { content: ""; position: absolute; top: 3px; right: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); transition: transform .2s; }
.switch input:checked + .knob { background: var(--ok); }
.switch input:checked + .knob::after { transform: translateX(-14px); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { font: 500 13px var(--f-num); background: transparent; border: 0; color: var(--muted); padding: 9px 12px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: rgba(168, 85, 247, .18); color: var(--accent); }
.boost { font: 500 12px var(--f-body); color: var(--cyan); padding: 4px 9px; border: 1px solid rgba(111,214,232,.35); border-radius: 999px; font-variant-numeric: tabular-nums; }
.daynight { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.daynight button { display: inline-grid; place-items: center; width: 38px; height: 36px; background: transparent; border: 0; color: var(--muted); cursor: pointer; }
.daynight button:hover { color: var(--ink); }
.daynight svg { width: 18px; height: 18px; }
.daynight button[data-sky="day"][aria-pressed="true"] { background: rgba(255, 166, 43, .14); color: var(--amber); }
.daynight button[data-sky="night"][aria-pressed="true"] { background: rgba(122, 167, 255, .14); color: var(--info); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* in-scene tags */
#tags { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
/* A tip flying from the vehicle to the pump attendant. Above the plate tags, so a vehicle tag that enters after it doesn't cover it */
.tipfx { position: absolute; z-index: 2; left: 0; top: 0; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 3px 8px; border-radius: 999px; font-size: 11px; color: var(--ok); white-space: nowrap; will-change: transform, opacity;
  background: var(--tag-bg); border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); }
.tipfx-l { display: inline-flex; align-items: baseline; gap: 4px; }
.tipfx b { font-family: var(--f-num); font-size: 13px; font-weight: 600; direction: ltr; }
.tipfx .cur, .tx .tipchip .cur { font-size: .85em; opacity: .75; }
.tipfx small { font-size: 11px; color: var(--ink); opacity: .9; }
.tipfx.landed { border-radius: var(--r-md); box-shadow: 0 0 14px color-mix(in srgb, var(--ok) 35%, transparent); }
/* Building name under the mouse pointer (inspect.js) */
.bldg-tip { position: fixed; z-index: 9; left: 0; top: 0; transform: translate(-50%, calc(-100% - 14px)); pointer-events: none;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap;
  background: var(--tag-bg); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0, 0, 0, .2); }
.bldg-tip[hidden] { display: none; }
.tag {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -100%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 12px; white-space: nowrap; will-change: transform;
}
.tag .card { background: var(--tag-bg); border: 1px solid var(--line); border-radius: var(--r-md); padding: 5px 8px; display: flex; align-items: center; gap: 8px; }
.tag .prog { width: 100%; height: 4px; background: var(--track); border-radius: 999px; overflow: hidden; display: none; }
.tag .prog i { display: block; height: 100%; width: 0; background: var(--brand-grad-hot); }
.tag.fueling .prog, .tag.busy .prog { display: block; }
/* "Snake" progress (addSnake in data.js): a line in --fc (the fuel, bay, toll or store colour) wraps around the edge of
   the tag card in proportion to progress, starting top-right and running anticlockwise. Under the card, a small line shows the percentage and details.
   When full (.full) the line completes in green and glows */
.tag .card { position: relative; }
.tag .snake { position: absolute; left: -1px; top: -1px; width: calc(100% + 2px); height: calc(100% + 2px); overflow: visible; pointer-events: none; display: none; transform: scaleX(-1); }
.tag.fueling .snake, .tag.busy .snake { display: block; }
.tag.fueling .card, .tag.busy .card { border-color: transparent; }
.tag .snake rect { x: 1px; y: 1px; width: calc(100% - 2px); height: calc(100% - 2px); rx: var(--r-md); fill: none; stroke-width: 2; }
.tag .snake .trk { stroke: var(--line-soft); }
.tag .snake .trail { stroke: var(--fc, var(--cyan)); stroke-linecap: round; filter: drop-shadow(0 0 3px var(--fc, var(--cyan))); }
.tag.full .snake .trail { stroke: var(--ok); filter: drop-shadow(0 0 5px var(--ok)); }
.tag.full .card { animation: gauge-full .8s ease-out both; }
@keyframes gauge-full { 0% { box-shadow: 0 0 0 0 rgba(76, 195, 138, .8); } 100% { box-shadow: 0 0 0 7px rgba(76, 195, 138, 0); } }
.tag .prog.gauge {
  width: auto; height: auto; overflow: visible; padding: 2px 8px; border-radius: 999px;
  background: var(--tag-bg); border: 1px solid color-mix(in srgb, var(--fc, var(--cyan)) 40%, var(--line));
}
.tag .prog.gauge b { display: block; font: 600 10px/1.3 var(--f-num); color: var(--ink); letter-spacing: .02em; }
.tag.full .prog.gauge { border-color: var(--ok); }
/* Stripes running through the bay bars (.bay-bar) */
@keyframes gauge-flow { to { transform: translateX(-11.314px); } }
/* Eco mode (main.js): the window has no focus, so the two perpetual animations pause and stop repainting the page every frame */
:root.eco .live i, :root.eco .bay[data-state="busy"] .bay-bar i::after { animation-play-state: paused; }
.tag .live-amt { font-family: var(--f-num); font-size: 13px; color: var(--cyan); display: none; direction: ltr; }
/* The currency next to the amount: to its left in Arabic, like the other numbers on the tags; in English, EGP before it */
.tag .live-amt::before { content: "ج.م"; display: inline-block; direction: rtl; font: 500 10.5px var(--f-body); color: var(--muted); margin-right: 4px; }
html[lang="en"] .tag .live-amt::before { content: "EGP"; }
.tag.fueling .live-amt, .tag.busy .live-amt { display: inline; }
/* Honking in a jam (honk in fuel-lane.js): a yellow badge with a speaker pops up above the card and a sound ring spreads from it, and the card shakes
   with a yellow border and glow. honk re-adds the class on every press, so the animation restarts from the beginning */
.tag.honk .card { animation: honk 1.4s ease-out both; }
@keyframes honk {
  0% { transform: none; }
  8% { transform: translateX(-3px) scale(1.1); border-color: var(--warn); background: rgba(70, 56, 12, .92); box-shadow: 0 0 0 2px var(--warn), 0 0 22px rgba(242, 201, 76, .7); }
  16% { transform: translateX(3px) scale(1.1); }
  24% { transform: translateX(-3px) scale(1.08); }
  32% { transform: translateX(2px) scale(1.06); }
  40% { transform: none; }
  75% { border-color: var(--warn); background: rgba(70, 56, 12, .92); box-shadow: 0 0 0 2px var(--warn), 0 0 22px rgba(242, 201, 76, .7); }
  100% { transform: none; border-color: var(--line); background: var(--tag-bg); box-shadow: none; }
}
.tag.honk::before, .tag.honk::after {
  content: ""; position: absolute; left: 50%; bottom: calc(100% + 6px); width: 30px; height: 30px; margin-left: -15px;
  border-radius: 50%; pointer-events: none;
}
.tag.honk::before {
  background: var(--warn) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23160F1C' stroke='%23160F1C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10v4h3l5 4V6L6 10z'/%3E%3Cpath fill='none' d='M15 9a4 4 0 0 1 0 6M18 6.5a8 8 0 0 1 0 11'/%3E%3C/svg%3E") center / 18px no-repeat;
  box-shadow: 0 0 16px rgba(242, 201, 76, .8);
  animation: honk-badge 1.4s ease-out both;
}
.tag.honk::after { border: 2px solid var(--warn); animation: honk-ring .9s ease-out .1s both; }
@keyframes honk-badge {
  0% { opacity: 0; transform: translateY(6px) scale(.3); }
  12% { opacity: 1; transform: translateY(0) scale(1.2); }
  22% { transform: scale(1) rotate(-14deg); }
  32% { transform: scale(1) rotate(12deg); }
  42% { transform: scale(1) rotate(-8deg); }
  52% { transform: scale(1) rotate(0); }
  80% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-8px); }
}
@keyframes honk-ring { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(2.4); } }
.tag .stem { width: 1px; height: 14px; background: linear-gradient(var(--line), transparent); }

/* Collected cash on its way to the counter: a green banknote and a gold coin */
.cash { position: fixed; left: 0; top: 0; z-index: 10; pointer-events: none; will-change: transform, opacity; }
.cash.bill {
  width: 30px; height: 15px; border-radius: 2px;
  background:
    radial-gradient(ellipse 5px 4.5px at 50% 50%, rgba(235, 255, 238, .9) 0 60%, transparent 66%),
    radial-gradient(circle 2px at 17% 50%, rgba(255, 255, 255, .45) 0 70%, transparent 80%),
    radial-gradient(circle 2px at 83% 50%, rgba(255, 255, 255, .45) 0 70%, transparent 80%),
    linear-gradient(135deg, #5CCB8A, #2E8B57 55%, #1F6B42);
  border: 1px solid rgba(220, 255, 230, .55);
  box-shadow: inset 0 0 0 2px rgba(20, 70, 40, .55), 0 4px 12px rgba(0, 0, 0, .45), 0 0 10px rgba(76, 195, 138, .35);
}
.cash.coin {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFF4C2, #F2C94C 45%, #B8860B 80%, #7A5A08);
  border: 1px solid rgba(255, 236, 160, .8);
  box-shadow: inset 0 0 0 2px rgba(150, 105, 10, .5), 0 3px 9px rgba(0, 0, 0, .45), 0 0 10px rgba(242, 201, 76, .45);
}

/* Selected vehicle details */
.tag .card { pointer-events: auto; cursor: pointer; }
.tag.store-tag .card { cursor: default; }   /* the O'Store truck can't be inspected */
.tag.sel .card { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 6px 20px rgba(168, 85, 247, .3); }
body.inspecting .tag:not(.sel) .card, body.inspecting .tag:not(.sel) .stem { opacity: .3; }
.tx[data-status="arriving"], .tx[data-status="waiting"], .tx[data-status="fueling"], .tx[data-status="servicing"] { cursor: pointer; }
.inspect { grid-column: 2; grid-row: 2; align-self: start; justify-self: center; width: min(400px, 100%); max-height: 100%; overflow: auto; scrollbar-width: thin; }
.ins-h { display: flex; align-items: center; gap: 12px; padding: 14px 16px 12px; border-bottom: 1px solid var(--line-soft); }
.plate.big { font-size: 17px; flex: none; }
.plate.big .pl-band { font-size: 8px; padding: 2px 5px; }
.plate.big .pl-band span:last-child { font-size: 9.5px; }
.plate.big .pl-body { padding: 0 6px; }
.plate.big .pl-num, .plate.big .pl-let { padding: 5px 7px; }
.ins-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ins-title b { font-family: var(--f-display); font-weight: 600; font-size: 15px; }
.ins-x { margin-inline-start: auto; flex: none; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 500 18px var(--f-num); line-height: 1; cursor: pointer; }
.ins-x:hover { color: var(--ink); background: var(--hover); }
.ins-amt { padding: 12px 16px 0; }
.ins-amt .money { margin-top: 4px; }
.ins-amt .of { color: var(--faint); font-size: 12px; }
/* The tip under the amount: on top of the fuel amount, together with the full amount the driver paid */
.ins-tip { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.ins-tip b { color: var(--ok); font-weight: 600; font-family: var(--f-num); }
.ins-tip .num { color: var(--ink); font-family: var(--f-num); }
.ins-tip.none b { color: var(--faint); font-weight: 500; }
.ins-bar { margin: 10px 16px 2px; height: 4px; }
.ins-grid { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 7px 10px; margin: 0; padding: 10px 16px 14px; font-size: 12.5px; }
.ins-grid dt { color: var(--muted); }
.ins-grid dd { margin: 0; text-align: end; min-width: 0; overflow-wrap: anywhere; }
.ins-grid .u { color: var(--muted); margin-inline-start: 4px; }
.ins-foot { padding: 0 16px 14px; }
.ins-foot:has(> [hidden]) { display: none; }
.ins-go { width: 100%; justify-content: center; }
.tag.parked .card::after { content: "مركونة"; font-size: 11px; color: var(--info); border: 1px solid currentColor; border-radius: 999px; padding: 0 6px; }
html[lang="en"] .tag.parked .card::after { content: "Parked"; }

/* Settings side panel */
.icon-btn { pointer-events: auto; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { color: var(--ink); border-color: var(--accent); }
.icon-btn svg { width: 17px; height: 17px; transition: transform .3s; }
.icon-btn[aria-expanded="true"] svg { transform: rotate(60deg); }
.settings-scrim { position: fixed; inset: 0; z-index: 20; background: var(--scrim); }
.settings {
  position: fixed; z-index: 21; top: calc(12px + env(safe-area-inset-top, 0px)); inset-inline-start: 12px;
  max-height: calc(100% - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  width: min(320px, calc(100vw - 32px)); box-sizing: border-box; overflow: auto; scrollbar-width: thin;
  display: flex; flex-direction: column; animation: settings-in .22s ease-out;
}
.settings[hidden], .settings-scrim[hidden] { display: none; }
@keyframes settings-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
:root[dir="ltr"] .settings { animation-name: settings-in-ltr; }
@keyframes settings-in-ltr { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
.settings-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line-soft); }
.settings-h b { font-size: 16px; font-weight: 700; }
.set-group { padding: 12px 18px 8px; border-bottom: 1px solid var(--line-soft); }
.set-group:last-child { border-bottom: 0; }
.set-group .eyebrow { margin-bottom: 6px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; }
.set-row > span:first-child { margin-inline-end: auto; }
.set-row.switch { padding: 0; font-size: 13.5px; }
.set-row kbd { font: 500 11px var(--f-num); color: var(--faint); padding: 1px 6px; border: 1px solid var(--line); border-radius: 6px; }
.settings .daynight button { width: auto; gap: 6px; padding: 0 12px; font: 500 12.5px var(--f-body); grid-auto-flow: column; }
.settings .daynight svg { width: 16px; height: 16px; }
.settings .seg button { font-family: var(--f-body); padding: 7px 12px; }
.settings .seg button[lang="en"] { font-family: var(--f-latin); }
.set-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 6px; }
.set-actions .btn { justify-content: center; padding: 9px 10px; font-size: 13.5px; }
.set-wide { width: 100%; justify-content: center; margin: 6px 0 4px; font-size: 13.5px; }
/* Hiding plate numbers: the card open for inspection stays */
body.no-plates #tags .tag:not(.sel) { display: none !important; }

@media (max-width: 860px) {
  .hud { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 10px; }
  .hud::before { height: 220px; }
  /* On a phone, one column: the logo at the bottom-left of the scene, above the bottom panels */
  .brand { position: static; grid-column: 1; grid-row: 3; justify-self: left; align-self: end; }
  .clock { position: static; height: auto; grid-column: 1; grid-row: 3; justify-self: right; align-self: end; }
  .side-start, :root[dir="ltr"] .side-start { grid-column: 1; grid-row: 2; }
  .side-start .block { display: none; }
  .treasury { padding: 12px 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; border-bottom: 0; }
  .money { margin-top: 0; }
  .money .num { font-size: 26px; }
  .delta { margin-top: 0; width: 100%; }
  .stats { grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-soft); border-bottom: 0; }
  .stat { padding: 8px 10px; }
  .stat:nth-child(odd) { border-inline-end: 0; }
  .stat:not(:last-child) { border-inline-end: 1px solid var(--line-soft); }
  .stat:nth-child(-n+2) { border-bottom: 0; }
  .stat span { font-size: 11px; }
  .stat b { font-size: 14px; }
  .side-end, :root[dir="ltr"] .side-end { grid-column: 1; grid-row: 4; max-height: 36vh; gap: 8px; }
  .side-end > .feed-panel { min-height: 90px; }
  /* The panel spans the screen width: the tip badge goes beside the amount, not under it, so the row keeps its height */
  .tx .amtbox { flex-direction: row-reverse; align-items: center; gap: 6px; }
  .svc-h { padding: 10px 12px 0; margin-bottom: 4px; }
  .bays { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0 6px 6px; gap: 4px; }
  .bay { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 4px; padding: 6px 4px; }
  .bay-ic { width: 26px; height: 26px; }
  .bay-ic svg { width: 15px; height: 15px; }
  .bay-main { width: 100%; }
  .bay-top { flex-direction: column; align-items: center; gap: 1px; font-size: 12px; }
  .bay-st { margin: 0; font-size: 11px; }
  .bay .full, .bay-sub, .bay-add, .svc-foot { display: none; }
  .bay .short { display: inline; }
  .toll-body { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 12px 8px; }
  .toll-body .money .num { font-size: 17px; }
  .toll-last { display: none; }
  .mint-body { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 12px 8px; }
  .mint-row #mintCount { font-size: 17px; }
  .mint-top, .mint-last { display: none; }
  .bay-bar { margin: 4px 0 0; }
  /* On a phone, the vehicle details replace the service and transactions panels, leaving the scene to the vehicle */
  .inspect { grid-column: 1; grid-row: 4; width: 100%; max-height: 40vh; }
  body.inspecting .side-end { display: none; }
  .ins-grid { font-size: 12px; gap: 6px 10px; }
  /* The English labels are longer, so they shrink until the four columns fit */
  :root[lang="en"] .stat { padding: 8px 6px; }
  :root[lang="en"] .stat span { font-size: 10px; }
}
/* English UI: left to right, with a Latin font */
:root[lang="en"] { --f-display: "Montserrat", "Cairo", system-ui, sans-serif; --f-body: "Montserrat", "Cairo", system-ui, sans-serif; }
:root[dir="ltr"] .stat b { text-align: left; }
:root[lang="en"] .mix-row { grid-template-columns: 88px 1fr 48px; }
:root[dir="ltr"] .mix-row .num { text-align: right; }
:root[dir="ltr"] .switch .knob::after { right: auto; left: 3px; }
:root[dir="ltr"] .switch input:checked + .knob::after { transform: translateX(14px); }
@media (prefers-reduced-motion: reduce) {
  .live i { animation: none; }
  .settings, .icon-btn svg { animation: none; transition: none; }
  .tx.enter { animation: none; }
}

/* Cinematic mode (cinema.js): the panels hide, letterbox bars slide in, and a caption names the shot */
.icon-btn[aria-pressed="true"] { color: var(--ink); border-color: var(--accent); }
body.cinema .hud, body.cinema #settings, body.cinema #settingsScrim, body.cinema .bldg-tip { display: none !important; }
body.cinema:not(.cine-awake), body.cinema:not(.cine-awake) canvas { cursor: none !important; }
.cine { position: fixed; inset: 0; pointer-events: none; z-index: 30; }
.cine-bar { position: absolute; inset-inline: 0; height: 5.5vh; background: #000; animation: cine-bar 1.2s cubic-bezier(.2, .7, .2, 1) both; }
.cine-bar.top { top: 0; transform-origin: top; }
.cine-bar.bot { bottom: 0; transform-origin: bottom; }
@keyframes cine-bar { from { transform: scaleY(0); } }
.cine-fade { position: absolute; inset: 0; background: #000; opacity: 0; }
.cine-cap {
  position: absolute; bottom: calc(5.5vh + 28px); inset-inline-start: clamp(20px, 4vw, 64px);
  display: grid; gap: 2px; max-width: 46vw; color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, .7);
  opacity: 0; transform: translateY(10px); transition: opacity .9s, transform .9s;
}
.cine-cap.show { opacity: 1; transform: none; }
.cine-brand { font: 700 clamp(11px, .95vw, 15px)/1.3 Cairo, sans-serif; letter-spacing: .08em; color: var(--accent); }
.cine-title { font: 800 clamp(22px, 2.6vw, 44px)/1.25 Cairo, sans-serif; }
.cine-sub { font: 500 clamp(12px, 1.05vw, 17px)/1.4 Cairo, sans-serif; color: rgba(255, 255, 255, .72); }
.cine-kpi {
  position: absolute; bottom: calc(5.5vh + 28px); inset-inline-end: clamp(20px, 4vw, 64px);
  display: flex; gap: clamp(14px, 1.6vw, 28px); padding: 12px 18px; border-radius: var(--r-md);
  background: rgba(10, 6, 16, .58); border: 1px solid rgba(255, 255, 255, .08); backdrop-filter: blur(8px); color: #fff;
  opacity: 0; transform: translateY(10px); transition: opacity .9s .25s, transform .9s .25s;
}
.cine-kpi.show { opacity: 1; transform: none; }
.cine-stat { display: grid; gap: 3px; }
.cine-stat + .cine-stat { padding-inline-start: clamp(14px, 1.6vw, 28px); border-inline-start: 1px solid rgba(255, 255, 255, .12); }
.cine-stat span { font: 600 clamp(11px, .85vw, 14px)/1.3 Cairo, sans-serif; color: rgba(255, 255, 255, .7); white-space: nowrap; }
.cine-stat b { font: 600 clamp(17px, 1.7vw, 28px)/1.2 "IBM Plex Mono", monospace; white-space: nowrap; }
.cine-exit {
  position: absolute; top: calc(5.5vh + 16px); inset-inline-end: 20px; pointer-events: auto;
  padding: 8px 14px; font: 600 13px/1 Cairo, sans-serif; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer; opacity: 0; transition: opacity .3s;
}
body.cine-awake .cine-exit { opacity: 1; }
.cine-exit:hover { border-color: var(--accent); }
@media (max-width: 900px) { .cine-kpi { inset-inline: 16px; bottom: calc(5.5vh + 16px); flex-wrap: wrap; } .cine-cap { bottom: calc(5.5vh + 110px); inset-inline-start: 16px; } }
@media (prefers-reduced-motion: reduce) { .cine-bar { animation: none; } .cine-cap, .cine-kpi { transition: none; } }
