/* Popravimo pilot app: phone-first. On wide screens the app sits in a phone-sized
   column, because citizen reporting is phone-only by design (on-the-spot GPS +
   live photo, D16); a computer views and shares. Palette: asphalt neutrals,
   road-marking yellow as the accent, signal colours for case states. Type:
   Barlow Condensed (road-sign display) + Barlow (body). */
:root {
  --bg: #eceae4;
  --surface: #fbfaf7;
  --surface-2: #f2f0ea;
  --ink: #1c1d20;
  --ink-2: #55575d;
  --line: #d9d6cd;
  --accent: #f2c230;
  --accent-ink: #1c1d20;
  --road-major: #ffffff;
  --road-street: #ffffff;
  --road-minor: #f6f4ef;
  --road-path: #c9c5ba;
  --road-casing: #cfcabf;
  --map-bg: #e4e1d8;
  --s-open: #d9481e;
  --s-ack: #c98a00;
  --s-claim: #2563c9;
  --s-fixed: #1f8a55;
  --s-declined: #7a5aa6;
  --s-stale: #9a978f;
  --you: #1a6ef2;
  --shadow: 0 10px 30px rgba(28, 29, 32, .16);
  /* Barlow has no Cyrillic: Roboto (Condensed) draws the Cyrillic letters (D31).
     Google Fonts splits each family by script, so its Cyrillic files are only
     downloaded on a page that shows Cyrillic. */
  --display: "Barlow Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", "Roboto", "Segoe UI", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121315; --surface: #1c1d21; --surface-2: #25272c; --ink: #ecebe6; --ink-2: #a6a7ad;
    --line: #34363c; --accent: #f2c230; --accent-ink: #16171a;
    --road-major: #5b5e66; --road-street: #474a51; --road-minor: #3a3c42; --road-path: #4b4d53;
    --road-casing: #26282c; --map-bg: #1b1c20;
    --s-open: #ff6a3d; --s-ack: #f0b232; --s-claim: #5b95ff; --s-fixed: #3dbb7d; --s-declined: #a98ad6; --s-stale: #7b7d83;
    --you: #4c8dff; --shadow: 0 10px 30px rgba(0, 0, 0, .5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121315; --surface: #1c1d21; --surface-2: #25272c; --ink: #ecebe6; --ink-2: #a6a7ad;
  --line: #34363c; --accent: #f2c230; --accent-ink: #16171a;
  --road-major: #5b5e66; --road-street: #474a51; --road-minor: #3a3c42; --road-path: #4b4d53;
  --road-casing: #26282c; --map-bg: #1b1c20;
  --s-open: #ff6a3d; --s-ack: #f0b232; --s-claim: #5b95ff; --s-fixed: #3dbb7d; --s-declined: #a98ad6; --s-stale: #7b7d83;
  --you: #4c8dff; --shadow: 0 10px 30px rgba(0, 0, 0, .5); color-scheme: dark;
}

html, body { height: 100%; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.45; }
button { font: inherit; color: inherit; }
button:focus-visible, input:focus-visible, label:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.stage { height: 100%; display: flex; justify-content: center; gap: 32px; padding-inline: 0; }
.phone { position: relative; width: 100%; max-width: 440px; height: 100%; display: flex; flex-direction: column; background: var(--surface); overflow: hidden; }

@media (min-width: 900px) {
  .stage { padding-block: 24px; padding-inline: 24px; align-items: stretch; }
  .phone { height: min(860px, 100%); border-radius: 28px; box-shadow: var(--shadow); border: 1px solid var(--line); }
}

/* Top bar */
.topbar { position: relative; display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 3; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: .3px; }
.brand-mark { width: 26px; height: 26px; border-radius: 6px; background: url(/static/icons/icon.svg) center / cover no-repeat; flex: none; }
/* The headline reads as one phrase: "Popravimo Kulu" / "Let's fix Kula". The
   place takes the brand's type, underlined in road-marking yellow. */
.headline { display: flex; align-items: center; gap: 7px; min-width: 0; margin: 0; font: inherit; line-height: 1.2; }
.headline .brand { flex: none; line-height: 1.2; }
.city { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: .3px; color: var(--ink); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.2; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 4px;
  /* room for the underline inside the clipped box, without lifting the text off the brand's line */
  padding-bottom: 6px; margin-bottom: -6px; }
.topbar > * { flex: none; }
.topbar > .headline { flex: 0 1 auto; }
.topbar .spacer { flex: 1; }
.chip-btn { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
/* The top-bar menu (menu.js): one round button, initials or a person icon. */
.menu-open { z-index: 50 !important; }
.avatar { width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .5px; cursor: pointer; flex: none; }
.avatar.signed-in { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.avatar svg { display: block; }
.menu { position: absolute; top: calc(100% + 6px); right: 10px; z-index: 40; width: 290px; max-width: calc(100vw - 20px); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; gap: 4px; font-family: var(--body); letter-spacing: normal; text-transform: none; }
.menu-who { display: flex; align-items: center; gap: 10px; padding: 8px; border-bottom: 1px solid var(--line); }
.menu-who-text { display: flex; flex-direction: column; min-width: 0; font-size: 13.5px; }
.menu-who-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-who-text span { color: var(--ink-2); font-size: 12.5px; }
.menu-items { display: flex; flex-direction: column; padding-block: 2px; border-bottom: 1px solid var(--line); }
.menu-item { text-align: left; background: none; border: 0; border-radius: 8px; padding: 9px 10px; font-size: 14.5px; font-weight: 600; cursor: pointer; color: var(--ink); }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); }
/* Places are links, actions are buttons; both read as one list. */
a.menu-item { display: block; text-decoration: none; }
.menu-item[aria-current="page"] { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.menu-item.primary { background: var(--accent); color: var(--accent-ink); text-align: center; }
.menu-account { padding-top: 2px; }
.menu { max-height: calc(100dvh - 80px); overflow-y: auto; }
/* "What can I do?" — the role, explained in place. */
.menu-role { display: inline-flex; align-items: center; gap: 6px; }
.info-btn { display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 1.5px solid currentColor; background: none; color: var(--ink-2); font: italic 700 11px/1 Georgia, serif; cursor: pointer; flex: none; }
.info-btn:hover, .info-btn[aria-expanded="true"] { color: var(--ink); background: var(--accent); border-color: var(--accent); }
.menu-about { margin: 0 4px 2px; padding: 9px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px; line-height: 1.45; }
.menu-about b { display: block; margin-bottom: 4px; font-size: 13px; }
.menu-about p { margin: 0 0 6px; color: var(--ink); }
.menu-about a { color: var(--ink); font-weight: 600; }
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px; font-size: 13.5px; color: var(--ink-2); }
.menu .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface-2); }
.menu .seg button { border: 0; background: none; border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink-2); display: grid; place-items: center; min-height: 26px; }
.menu .seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.demo-badge { font-family: var(--display); font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; background: var(--ink); color: var(--surface); padding: 2px 8px; border-radius: 4px; }

/* Demo controls */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 4px 9px; cursor: pointer; font-size: 13px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.clock { font-variant-numeric: tabular-nums; font-weight: 700; }

/* Map */
.map-wrap { position: relative; flex: 1; min-height: 0; }
#map { position: absolute; inset: 0; background: var(--map-bg); }
.map-hint { position: absolute; left: 12px; top: 12px; right: 64px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 12.5px; color: var(--ink-2); box-shadow: var(--shadow); z-index: 2; }
.map-hint b { color: var(--ink); }
.recenter { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; font-size: 18px; z-index: 2; }
.attrib { position: absolute; right: 6px; bottom: 4px; font-size: 10.5px; color: var(--ink-2); background: color-mix(in srgb, var(--surface) 80%, transparent); padding: 1px 5px; border-radius: 4px; z-index: 2; }

/* FAB */
.fab { position: absolute; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 4; display: flex; align-items: center; gap: 8px; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px; padding: 12px 22px; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: .5px; box-shadow: var(--shadow); cursor: pointer; }
.fab[disabled] { opacity: .55; cursor: not-allowed; }

/* Bottom sheet */
.sheet { background: var(--surface); border-top: 1px solid var(--line); max-height: 46%; display: flex; flex-direction: column; z-index: 3; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px 6px; }
.sheet-head h2 { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 700; text-wrap: balance; }
.filters { display: flex; gap: 6px; padding: 0 14px 8px; flex-wrap: wrap; }
.filters button { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 3px 11px; font-size: 13px; font-weight: 600; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.filters .count { font-weight: 500; opacity: 0.6; font-variant-numeric: tabular-nums; margin-left: 2px; }
.list { overflow-y: auto; padding: 0 8px 70px; }
.row { width: 100%; display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 8px 6px; cursor: pointer; }
.row:hover { background: var(--surface-2); }
.thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.row-main { min-width: 0; }
.row-title { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { display: block; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.row-dist { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--pc) 16%, transparent); color: var(--pc); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--pc); }
.flag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 4px; border: 1px solid var(--line); color: var(--ink-2); }

/* Overlay panels (case detail, report flow, modals) */
.panel { position: absolute; inset: 0; background: var(--surface); z-index: 10; display: flex; flex-direction: column; }
.panel[hidden] { display: none !important; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-family: var(--display); font-size: 21px; font-weight: 700; flex: 1; min-width: 0; text-wrap: balance; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; font-size: 17px; flex: none; }
.panel-body { overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.hero-photo { width: 100%; aspect-ratio: 4 / 3; max-width: 100%; border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fact { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.fact b { display: block; font-family: var(--display); font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fact span { font-size: 12px; color: var(--ink-2); }
.notice { border-radius: 10px; padding: 10px 12px; font-size: 13.5px; background: var(--surface-2); border-left: 4px solid var(--nc, var(--accent)); }
.section-title { font-family: var(--display); font-size: 15px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-2); margin: 4px 0 -4px; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.action { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 10px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.action b { font-size: 14.5px; }
.action small { font-size: 12px; color: var(--ink-2); }
.action.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.action.primary small { color: color-mix(in srgb, var(--surface) 75%, transparent); }
.action[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.timeline .when { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.timeline .row-sub, .notice .row-sub { display: inline; }
.timeline .sys { color: var(--ink-2); font-style: italic; }

/* Report flow */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cat { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px; cursor: pointer; display: flex; align-items: center; gap: 10px; text-align: left; font-weight: 600; }
.cat img { width: 40px; height: 40px; border-radius: 8px; }
.cat[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.big-btn { border: 0; border-radius: 12px; padding: 13px 16px; font-family: var(--display); font-size: 19px; font-weight: 700; cursor: pointer; background: var(--accent); color: var(--accent-ink); }
.big-btn.secondary { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.big-btn[disabled] { opacity: .5; cursor: not-allowed; }
.loc-lock { display: flex; gap: 10px; align-items: center; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.loc-lock .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--you); flex: none; }
.rules { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.dupe { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.dupe img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }

/* Share card */

.toast { position: absolute; left: 50%; bottom: 80px; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 8px 14px; border-radius: 10px; font-size: 14px; z-index: 30; max-width: 86%; box-shadow: var(--shadow); }

@media (prefers-reduced-motion: no-preference) {
  .panel { animation: slide-up .18s ease-out; }
  @keyframes slide-up { from { transform: translateY(16px); opacity: .6; } to { transform: none; opacity: 1; } }
}

/* Pilot additions: forms, sign-in, accuracy ring, moderation rows */
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.err { color: var(--s-open); font-size: 13.5px; }
.muted { color: var(--ink-2); font-size: 13.5px; }
.mod-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mod-actions button, .mod-actions select { font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 5px 9px; cursor: pointer; color: var(--ink); }
.who { display: flex; align-items: center; gap: 6px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; cursor: pointer; font-size: 13.5px; }

/* Moderator location picker (D23): a fixed cross at the map centre */
.pick-bar { position: absolute; inset: 0; z-index: 8; pointer-events: none; }
.pick-cross { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; }
.pick-cross::before, .pick-cross::after { content: ""; position: absolute; background: var(--s-open); }
.pick-cross::before { left: 17px; top: 0; width: 2px; height: 36px; }
.pick-cross::after { top: 17px; left: 0; height: 2px; width: 36px; }
.pick-panel { pointer-events: auto; position: absolute; left: 12px; right: 12px; bottom: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; box-shadow: var(--shadow); }
.pick-panel span { grid-column: 1 / -1; font-size: 13.5px; }
.tips { margin: 0; padding-left: 20px; font-size: 13.5px; color: var(--ink-2); display: flex; flex-direction: column; gap: 3px; }
.cat-search { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; box-sizing: border-box; }
.cat-group { display: flex; flex-direction: column; gap: 6px; }
.cat-group[hidden] { display: none !important; }
.cat-group-title { margin: 6px 0 0; font-size: 12.5px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .8px; }
.cat-chosen { display: flex; align-items: center; gap: 12px; }
.cat-chosen .cat { flex: 1; }
.cat-pick { display: flex; flex-direction: column; gap: 8px; }
.legend { position: absolute; right: 12px; top: 60px; z-index: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12.5px; max-width: calc(100% - 24px); }
.legend-toggle { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center; padding: 0; }
.legend-toggle[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.legend-body { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; width: 250px; max-width: 100%; }
.legend-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.legend-close { border: 0; background: transparent; color: var(--ink-2); font-size: 22px; line-height: 1; width: 32px; height: 32px; margin: -6px -6px -6px 0; border-radius: 8px; cursor: pointer; }
.legend-close:hover { background: var(--surface-2); color: var(--ink); }
.legend ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #fff; box-shadow: 0 0 0 1px var(--line); flex: none; }
.menu-legal { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 6px 8px 4px; border-top: 1px solid var(--line); font-size: 12.5px; }
.menu-legal a { color: var(--ink-2); }
.legal { font-size: 12.5px; }
.legal a { color: inherit; }

/* Checks near you: a short list above "Nearby", in the accent colour. */
.checks { margin: 0 12px 8px; padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--accent) 60%, var(--line)); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-radius: 12px; display: flex; flex-direction: column; gap: 2px; }
.checks-title { margin: 0 0 2px; font-family: var(--display); font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.checks-count { background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 12px; padding: 0 7px; }
.check-row { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; background: none; border: 0; border-top: 1px solid var(--line); padding: 6px 2px; text-align: left; cursor: pointer; color: var(--ink); }
.check-row:first-of-type { border-top: 0; }
.check-kind { font-weight: 700; font-size: 14px; }
.check-kind::before { content: "→ "; color: var(--ink-2); }
.check-line { display: flex; gap: 8px; align-items: center; margin: 4px 0 12px; }

/* A button that is working: dimmed, with a small spinner. */
.busy { opacity: .75; cursor: progress; position: relative; }
.busy::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 8px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.send-why { margin: 6px 2px 0; text-align: center; }

/* "Waking the server" banner (common.js): top centre, above everything. */
.waking { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 100; background: var(--ink); color: var(--surface); padding: 8px 14px 8px 12px; border-radius: 999px; font-size: 13.5px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 24px); }
.waking::before { content: ""; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
/* menu.js: an English page stays hidden until it has rendered in English. */
html.lang-wait body { visibility: hidden; }
/* D32: a case whose photo is not public — waiting for a reviewer, or taken down. */
.thumb-none, .hero-none { display: grid; place-items: center; color: var(--ink-2); background: var(--surface-2); }
/* A taken-down photo, for its reporter and staff only: blurred and grey with
   the reason on top; a tap shows it, another veils it again. */
.hero-veil { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 12px; overflow: hidden; }
.hero-veil .hero-photo { display: block; filter: blur(18px) grayscale(1) brightness(.75); transform: scale(1.08); transition: filter .2s; }
.hero-veil .veil-label { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 18px; text-align: center; color: #fff; background: rgba(20, 20, 24, .45); }
.hero-veil .veil-label b { font-size: 17px; }
.hero-veil .veil-label small { font-size: 13px; opacity: .92; }
.hero-veil.open .hero-photo { filter: none; transform: none; }
.hero-veil.open .veil-label { inset: auto 0 0 0; background: rgba(20, 20, 24, .7); padding: 8px 12px; }
.hero-veil.open .veil-label small { display: none; }
.photo-state { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.photo-state.hero-none { aspect-ratio: 4 / 3; border-radius: 12px; flex-direction: column; justify-content: center; }
.flag-btn { align-self: center; font-size: 13px; color: var(--ink-2); }
.radio-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.radio-row input { width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
/* Tap-to-blur on the report photo. */
.blur-canvas { width: 100%; height: auto; border-radius: 12px; display: block; cursor: crosshair; touch-action: manipulation; background: var(--surface-2); }
.blur-tools { display: flex; align-items: center; gap: 10px; justify-content: space-between; font-size: 13px; color: var(--ink-2); }
/* Emergency numbers in the report flow (spec §7 step 5). */
/* Sign-in: the code step stacks like the rest of the sheet (no overlap). */
.auth-step:not([hidden]) { display: flex; flex-direction: column; gap: 14px; }
/* "How it works" and the maker's credit. */
.sheet-head .spacer { flex: 1; }
.sheet-by { margin: 4px 14px 14px; font-size: 12px; color: var(--ink-2); text-align: center; }
.sheet-by a, .menu-by a { color: var(--ink-2); }
.menu-by { padding: 2px 8px 6px; font-size: 12px; color: var(--ink-2); }
/* Category search (D34): closest matches, and "Other" with the typed text. */
.cat-none { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
#catBest .cat-other { margin-top: 8px; }
/* Correcting the problem type (D35). */
.cat-fix { align-self: flex-start; }
.cat-decide { display: flex; gap: 8px; margin-top: 8px; }
/* Problem types: groups first, a tap opens one (accordion). */
.cat-group-head { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px; cursor: pointer; font: inherit; font-weight: 700; color: var(--ink); text-align: left; }
.cat-group-head .name { flex: 1; }
.cat-group-head .count { font-weight: 600; font-size: 13px; color: var(--ink-2); }
.cat-group-head .chev { font-size: 20px; line-height: 1; color: var(--ink-2); transition: transform .15s; }
.cat-group-head[aria-expanded="true"] { border-color: var(--ink); }
.cat-group-head[aria-expanded="true"] .chev { transform: rotate(90deg); }
.cat-group .cat-grid { padding: 2px 0 6px; }
.cat-group .cat-grid[hidden] { display: none; }
/* Build and database version (menu footer). */
.menu-version { padding: 0 8px 6px; font-size: 11.5px; color: var(--ink-2); }
.menu-version code { font-size: 11.5px; }
.menu-db-bad { color: var(--s-open); font-weight: 700; }

.case-svc { margin: 0; font-size: 14px; }
