/* ---------- themes ----------
   Picked in the Account sheet and saved per device (localStorage "theme"); theme.js sets
   <html data-theme> before first paint. LD Lite is the default. */
:root {
  --bg: #041A31;
  --surface: #0A2744;
  --surface-2: #0E3155;
  --border: #1F4368;
  --text: #F2F5F9;
  --muted: #9DB0C6;
  --accent: #FE5000;
  --accent-text: #041A31; /* navy on orange: 5.3:1 contrast (white would be 3.3:1) */
  --accent-ink: #FE5000;  /* accent used as text on --bg / --surface */
  --accent-soft: rgba(254, 80, 0, .14);
  --accent-line: rgba(254, 80, 0, .35);
  --brand: var(--accent);
  --accent-border: var(--accent); /* outlines and underlines in the accent color */
  --chip-on: var(--accent);        /* selected chip fill */
  --accent-2: var(--accent-line);  /* roller guide lines (Random sets its second color here) */
  --danger: #FF6B6B;
  --focus: #6CB8FF;
  --backdrop: rgba(0, 8, 20, .7);
  --shadow: none;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: var(--font);
  --radius: 14px;
  --pill: 999px;
  --tap: 44px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #F4F6F9;
  --surface: #FFFFFF;
  --surface-2: #E9EDF2;
  --border: #D3DAE3;
  --text: #14202E;
  --muted: #586879;
  --accent: #D1D5DB;       /* light grey fill for buttons and selected chips */
  --accent-text: #111827;
  --accent-border: #6B7280; /* pale fill needs a darker edge to stand out on white */
  --chip-on: #AEB4BE;       /* selected chips a step darker than buttons */
  --accent-ink: #4B5563;    /* grey text (links); the pale fill itself is unreadable as text */
  --brand: #4B5563;
  --accent-soft: rgba(107, 114, 128, .08);
  --accent-line: rgba(107, 114, 128, .4);
  --danger: #C62828;
  --focus: #7C3AED;
  --backdrop: rgba(20, 32, 46, .45);
  color-scheme: light;
}

:root[data-theme="dark"] {
  /* AMOLED: true black page and top bar; cards lifted just enough to see their edges. */
  --bg: #000000;
  --surface: #0A0A0B;
  --surface-2: #161618;
  --border: #242428;
  --text: #F2F2F4;
  --muted: #9A9AA3;
  --accent: #D4D4D8;
  --accent-text: #000000;
  --accent-ink: #D4D4D8;
  --accent-soft: rgba(212, 212, 216, .08);
  --accent-line: rgba(212, 212, 216, .3);
  --danger: #FF6B6B;
  --focus: #FFFFFF;
  --backdrop: rgba(0, 0, 0, .8);
}

:root[data-theme="matrix"] {
  --bg: #000000;
  --surface: #03140A;
  --surface-2: #062411;
  --border: #0E4A22;
  --text: #9DFFB5;
  --muted: #3FAE62;
  --accent: #00FF41;
  --accent-text: #000000;
  --accent-ink: #00FF41;
  --accent-soft: rgba(0, 255, 65, .08);
  --accent-line: rgba(0, 255, 65, .35);
  --danger: #FF5C5C;
  --focus: #B8FFC9;
  --backdrop: rgba(0, 0, 0, .75);
  --font: "Cascadia Mono", Consolas, "SF Mono", Menlo, "Courier New", monospace;
  --radius: 4px;
  --pill: 4px;
}
:root[data-theme="matrix"] .brand { text-shadow: 0 0 8px rgba(0, 255, 65, .7); }
/* Digital rain behind the page (app.js draws it; off with reduced motion). */
#matrix-rain { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .22; pointer-events: none; }

:root[data-theme="retro"] {
  --bg: #F3E4C6;
  --surface: #FBF3E2;
  --surface-2: #EFDDB9;
  --border: #3B2416;
  --text: #3B2416;
  --muted: #7A5A40;
  --accent: #E8702A;
  --accent-text: #2B1A0E;
  --accent-ink: #A8431A;
  --brand: #D2601A;
  --accent-soft: rgba(232, 112, 42, .14);
  --accent-line: #3B2416;
  --danger: #B3261E;
  --focus: #2E7F7A;
  --backdrop: rgba(59, 36, 22, .5);
  --shadow: 3px 3px 0 #3B2416;
  --font-display: "Cooper Black", "Cooper Std", "Rockwell Extra Bold", Rockwell, Georgia, serif;
  --radius: 12px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 var(--font);
  overflow-x: hidden;
}

h2 { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.2; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.error { color: var(--danger); margin: 6px 0; font-size: .95rem; }
.error:empty { display: none; }
.error.ok { color: var(--muted); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.brand { font-family: var(--font-display); font-weight: 800; letter-spacing: -.01em; color: var(--brand); white-space: nowrap; }
.brand-lg { font-size: 1.9rem; text-align: center; margin-bottom: 18px; }

/* ---------- buttons & inputs ---------- */
.btn {
  min-height: var(--tap);
  padding: 10px 18px;
  border-radius: var(--pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  box-shadow: var(--shadow);
  cursor: pointer;
  touch-action: manipulation;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent-border); color: var(--accent-text); font-weight: 700; }
.btn-ghost { background: transparent; box-shadow: none; }
.btn-danger { background: transparent; border-color: transparent; color: var(--danger); box-shadow: none; }
.btn-block { display: block; width: 100%; }
.linklike {
  background: none; border: 0; color: var(--text); font: inherit; font-size: .95rem; font-weight: 600;
  min-height: var(--tap); padding: 0 4px; cursor: pointer;
  max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.field { display: block; margin: 14px 0; }
.field > span { display: block; font-weight: 600; margin-bottom: 6px; }
.hint { display: block; color: var(--muted); font-size: .8rem; margin-top: 4px; }
input[type="text"], input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* prevents iOS zoom on focus */
}

/* ---------- auth screen ---------- */
.gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 16px;
}
.gate-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
}
.gate-card .btn-primary { margin-top: 8px; }
.switch {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
  padding: 4px; border-radius: var(--pill); background: var(--bg);
}
.switch button {
  min-height: 40px; border: 0; border-radius: var(--pill);
  background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer;
}
.switch button[aria-selected="true"] { background: var(--surface-2); color: var(--text); }
#auth-form[data-mode="login"] .signup-only,
#auth-form[data-mode="login"] .guest-only,
#auth-form[data-mode="signup"] .login-only,
#auth-form[data-mode="signup"] .guest-only,
#auth-form[data-mode="guest"] .signup-only,
#auth-form[data-mode="guest"] .login-only,
#auth-form[data-mode="guest"] .account-only { display: none; }

/* Guest mode: only the roller, the result and its details. */
body.guest .member-only, body.guest #d-edit { display: none !important; }
body:not(.guest) .guest-note { display: none; }

/* Admin panel */
.back-link { color: var(--accent-ink); max-width: none; padding: 0; }
#screen-admin .topbar .brand { color: var(--text); }
.admin-entry { margin: 4px 0 8px; }
.admin-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.admin-card h2 { margin-bottom: 6px; }
.admin-card .chips { margin: 12px 0 4px; }
.temp-pw {
  padding: 12px 14px; margin-bottom: 12px; border-radius: var(--radius);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.temp-pw code { font-size: 1.15rem; font-weight: 700; letter-spacing: .04em; user-select: all; }
.temp-pw .btn { margin-top: 8px; }
.user-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.user-actions .btn { padding: 8px 14px; font-size: .9rem; }
.btn-danger-outline { background: transparent; border-color: var(--danger); color: var(--danger); }

/* ---------- layout ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.topbar .brand { font-size: 1.15rem; }
#account-btn::after { content: " ▾"; color: var(--muted); }
.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 16px calc(32px + env(safe-area-inset-bottom));
}

/* ---------- roller ---------- */
.spin-card {
  text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 28px;
  padding: 20px 16px 12px; box-shadow: var(--shadow);
}
.roller {
  --row: 60px;
  position: relative; display: block; width: 100%; padding: 0; border: 0;
  border-radius: 20px; background: var(--surface-2);
  color: var(--text); font: inherit; cursor: default;
}
.roller:not(:disabled) { cursor: pointer; }
/* Guide lines above and below the middle row. */
.roller::before, .roller::after {
  content: ""; position: absolute; left: 8%; right: 8%; height: 2px; z-index: 1;
  background: var(--accent-2); border-radius: 2px; pointer-events: none;
}
.roller::before { top: calc(50% - var(--row) / 2); }
.roller::after { top: calc(50% + var(--row) / 2 - 2px); }
.roller-window {
  display: block; height: calc(var(--row) * 3); overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent);
  mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent);
}
.roller-strip { display: block; will-change: transform; }
.roller-item {
  display: block; height: var(--row); line-height: var(--row); padding: 0 12%;
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em;
  color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.roller-item.placeholder { font-size: 1.15rem; font-weight: 600; }
.roller-item.hit { color: var(--accent-ink); animation: pop .35s ease-out; }
@keyframes pop { 40% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .roller-item.hit { animation: none; } }
.roller-count { margin: 8px 0 0; min-height: 1.3em; }
.empty-message {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  text-align: left;
}
.empty-message ul { margin: 6px 0 0; padding-left: 20px; }
.result { min-height: 1.5em; margin: 6px 0 10px; }
.result .linklike { color: var(--accent-ink); max-width: none; font-size: .9rem; }
.btn-spin { width: 100%; font-size: 1.25rem; min-height: 60px; border-radius: 18px; letter-spacing: .04em; text-transform: uppercase; }
.filters-link { display: block; margin: 6px auto 0; max-width: 100%; color: var(--muted); font-weight: 500; font-size: .9rem; }

/* ---------- filters sheet ---------- */
.topbar-actions { display: flex; align-items: center; gap: 6px; min-width: 0; }
#account-btn { max-width: 42vw; }
.icon-btn {
  position: relative; flex: none;
  width: var(--tap); height: var(--tap); display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); cursor: pointer; box-shadow: var(--shadow);
}
.icon-btn .dot {
  position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface);
}
/* Pinned to the bottom of the sheet so Done is reachable however many tags there are. */
.filters-footer {
  position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom)); z-index: 1;
  margin: 12px -16px calc(-20px - env(safe-area-inset-bottom));
  padding: 4px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--border);
}
.filters-remaining { margin: 0; }
.filters-footer .clear-link { margin-top: 0; }
.group-label { font-size: .85rem; font-weight: 600; color: var(--muted); margin: 14px 0 8px; }
.group-label:first-child { margin-top: 0; }
.clear-link { color: var(--accent-ink); font-size: .9rem; margin-top: 6px; padding: 0; }
.group-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* Full 44px tap target without pushing the chips further down. */
.select-all { color: var(--accent-ink); font-size: .85rem; margin: -12px 0; padding: 0 0 0 12px; max-width: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--tap);
  padding: 8px 14px;
  border-radius: var(--pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}
.chip[aria-pressed="true"] { background: var(--chip-on); border-color: var(--accent-border); color: var(--accent-text); font-weight: 600; }
.chips .empty { color: var(--muted); font-size: .9rem; }

/* ---------- tabs & lists ---------- */
.tabs {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin: 20px 0 12px;
  border-bottom: 1px solid var(--border);
}
.tab {
  min-height: var(--tap);
  background: none; border: 0; border-bottom: 3px solid transparent;
  color: var(--muted); font: inherit; font-weight: 600; cursor: pointer;
}
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent-border); }

.list { list-style: none; margin: 12px 0 0; padding: 0; }
.list > li + li { margin-top: 8px; }
.row {
  display: block; width: 100%;
  min-height: 56px;
  padding: 12px 14px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
}
button.row { cursor: pointer; }
.row-title { font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.row-title .chev { color: var(--muted); font-weight: 600; }
.row-meta { color: var(--muted); font-size: .9rem; margin-top: 2px; overflow-wrap: anywhere; }
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); font-size: .8rem; margin: 4px 4px 0 0;
}
.list .empty { color: var(--muted); text-align: center; padding: 16px; }

/* Welcome screen (new accounts): buttons pinned to the bottom so they're always in reach. */
.welcome-title { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.2; margin: 8px 0 6px; }
.welcome-screen { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
.welcome-actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--border);
}
.welcome-actions-inner { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.saved { color: var(--accent-ink); font-weight: 600; }

/* ---------- bottom sheets ---------- */
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  margin: auto auto 0;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  border: 0;
  border-radius: 20px 20px 0 0;
  background: var(--surface);
  color: var(--text);
  overflow-y: auto;
}
.sheet::backdrop { background: var(--backdrop); }
@media (min-width: 600px) {
  .sheet { margin: auto; border-radius: 20px; }
}
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.sheet-actions.single { grid-template-columns: 1fr; }
#display-form, #password-form { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
#r-delete { margin-top: 8px; }

textarea { resize: vertical; line-height: 1.4; }
select { appearance: none; cursor: pointer; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px; background-repeat: no-repeat; }
#r-special-text { margin-top: 8px; }

/* "More" section of the restaurant sheet */
.more { margin: 14px 0; border: 1px solid var(--border); border-radius: var(--radius); }
.more > summary {
  display: flex; align-items: center; gap: 8px;
  min-height: var(--tap); padding: 0 14px;
  font-weight: 600; cursor: pointer; list-style: none;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary::after { content: "▾"; color: var(--muted); margin-left: auto; }
.more[open] > summary::after { content: "▴"; }
.more > summary > .muted { font-weight: 400; }
.more-body { padding: 0 14px 4px; }
.more-body .field:first-child { margin-top: 0; }
/* Mon-Fri on one row even at 320px */
#r-closed { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
#r-closed .chip { justify-content: center; padding: 8px 0; }

/* Restaurant details sheet */
.details { margin-top: 4px; }
.detail { padding: 10px 0; border-top: 1px solid var(--border); }
.detail:first-child { border-top: 0; }
.detail-label { font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.detail-value { overflow-wrap: anywhere; white-space: pre-line; }
.detail a { color: var(--accent-ink); font-weight: 600; text-decoration: none; display: inline-flex; min-height: var(--tap); align-items: center; }
.specials { list-style: none; margin: 0; padding: 0; }
.specials li { padding: 2px 0; }
.specials .today { color: var(--accent-ink); font-weight: 700; }
.badges .badge:first-child { margin-left: 0; }

/* Spin result */
.special-today { font-size: 1rem; font-weight: 600; color: var(--accent-ink); }

.tag-editor .chips { margin-bottom: 8px; }
.tag-suggestions { margin-top: 8px; }

/* Google Places search results (restaurant name box, office location) */
.place-results { display: grid; gap: 6px; margin-top: 8px; }
.place-result {
  display: block; width: 100%; min-height: 52px; padding: 8px 12px; text-align: left;
  background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 10px;
  font: inherit; cursor: pointer;
}
.place-result strong { display: block; }
.place-result span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-results .place-empty { padding: 4px 2px; }
.place-status {
  margin-top: 8px; padding: 10px 12px; border-radius: 10px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.place-status .btn { margin-top: 8px; }
.mode-link { color: var(--accent-ink); font-size: .9rem; padding: 0; max-width: none; }
.office-current { font-weight: 600; margin: 8px 0; }
.office-current:empty { display: none; }
.tag-suggestions:empty { display: none; }
.chip.suggestion { border-style: dashed; border-color: var(--accent-border); }
.chip .count { color: var(--muted); font-size: .85em; }
.tag-notice {
  margin-top: 8px; padding: 10px 12px; border-radius: 10px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.tag-notice .chips { margin: 8px 0 0; }
.tag-editor .add-row { display: flex; gap: 8px; }
.tag-editor .add-row input { flex: 1; min-width: 0; }
.tag-editor .add-row .btn { flex: none; }

/* Theme picker (Account sheet) */
.theme-field { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.theme-chips .chip { padding-left: 10px; }
.swatch {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--sw-bg) 50%, var(--sw-accent) 50%);
  border: 1px solid var(--muted);
}
/* Random: its current three colors once rolled (set by app.js), a rainbow until then. */
.swatch-random { background: var(--sw-random, conic-gradient(#FE5000, #F2A516, #12957A, #1B6FB8, #6C5CE7, #D6336C, #FE5000)); }

/* ---------- mouse & keyboard (desktop) ---------- */
@media (hover: hover) {
  .btn:not(:disabled):hover, .chip:hover, .place-result:hover { border-color: var(--accent-border); }
  .btn-primary:not(:disabled):hover { filter: brightness(1.08); }
  .btn-danger:hover { border-color: var(--danger); }
  button.row:hover { border-color: var(--accent-line); background: var(--surface-2); }
  .tab:hover { color: var(--text); }
  .linklike:hover { text-decoration: underline; }
}
.spin-hint { display: none; }

/* ---------- wide screens ---------- */
@media (min-width: 960px) {
  .topbar { padding-inline: max(24px, calc((100% - 1200px) / 2 + 24px)); min-height: 60px; }
  .topbar .brand { font-size: 1.4rem; }
  .container { padding: 28px 24px 48px; }

  /* Roller on the left (stays put while you scroll), tabs on the right. */
  #screen-app .container {
    max-width: 1200px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
  }
  #screen-app .spin-card { position: sticky; top: 84px; padding: 32px 28px 16px; }
  .roller { --row: 84px; }
  .roller-item { font-size: 2.3rem; }
  .spin-hint { display: block; margin-top: 4px; }
  .tabs { margin-top: 0; }

  /* Guests only have the roller: keep it centered. */
  body.guest #screen-app .container { grid-template-columns: minmax(0, 1fr); max-width: 720px; }
  body.guest #screen-app .spin-card { position: static; }

  /* Admin: cards side by side, users in a grid underneath. */
  #screen-admin .container {
    max-width: 1100px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start;
  }
  #screen-admin .admin-card { margin: 0; }
  #screen-admin .admin-card:last-child { grid-column: 1 / -1; }
  #admin-users { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
  #admin-users > li + li { margin-top: 0; }

  #screen-welcome .container, .welcome-actions-inner { max-width: 760px; }

  .gate-card { max-width: 420px; padding: 32px 28px; }
  .sheet { max-width: 600px; padding: 24px; }
  .filters-footer { bottom: -24px; margin: 12px -24px -24px; padding: 4px 24px 16px; }
}
@media (min-width: 1400px) {
  #screen-app .container { max-width: 1320px; }
  .topbar { padding-inline: max(24px, calc((100% - 1320px) / 2 + 24px)); }
}

/* ---------- history votes ---------- */
.votes { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.vote {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; min-width: 64px; padding: 0 14px; justify-content: center;
  border-radius: var(--pill); border: 1px solid transparent;
  background: var(--accent-soft); color: var(--accent-ink);
  font: inherit; font-weight: 700; cursor: pointer; touch-action: manipulation;
}
.vote[aria-pressed="true"] { background: var(--chip-on); border-color: var(--accent-border); color: var(--accent-text); }
.vote svg { display: block; }
.vote-down svg { transform: rotate(180deg); }
.who-voted { color: var(--muted); font-size: .85rem; font-weight: 500; margin-left: auto; max-width: none; }
.voter-names { margin: 2px 0 0; }
