/* Geist (SIL OFL 1.1, see /fonts/Geist-OFL.txt), self-hosted so participants make no third-party requests. */
@font-face { font-family: "Geist"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("/fonts/geist-latin-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("/fonts/geist-latin-ext-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Overlap: crisp, calm, cool-neutral. Tokens first. */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fa;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --line: #e6e8ee;
  --line-strong: #d3d8e1;
  --ink: #0c111c;
  --ink-2: #333b4d;
  --muted: #5d6677;
  --accent: #3a4ff5;
  --accent-hover: #2d40e0;
  --accent-ink: #2b3bd4;
  --accent-soft: #eef0ff;
  --accent-line: #c9cffd;
  --teal: #14b8c9;
  --yes: #0e9f6e;
  --yes-ink: #08754f;
  --yes-soft: #e2f6ee;
  --maybe: #e2a000;
  --maybe-ink: #855800;
  --maybe-soft: #fdf3d6;
  --no: #8a92a3;
  --no-ink: #5d6677;
  --no-soft: #f1f2f5;
  --danger: #d1343e;
  --danger-soft: #fdecee;
  --ring: 0 0 0 3px rgba(58, 79, 245, .28);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 24px -8px rgba(16, 24, 40, .10);
  --shadow-pop: 0 12px 40px -12px rgba(16, 24, 40, .25), 0 2px 6px rgba(16, 24, 40, .06);
  --r: 12px;
  --r-lg: 18px;
  --font: "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
/* Dark theme: opt-in only, via the toggle (html[data-theme="dark"]). Light is the default for everyone. */
:root[data-theme="dark"] {
  --bg: #0a0c11;
  --bg-soft: #0f1218;
  --surface: #12161e;
  --surface-2: #161b24;
  --line: #232937;
  --line-strong: #323a4c;
  --ink: #eef1f7;
  --ink-2: #c7cdd9;
  --muted: #949db0;
  --accent: #6f7dff;
  --accent-hover: #8390ff;
  --accent-ink: #aab3ff;
  --accent-soft: #191e3d;
  --accent-line: #343d7a;
  --yes: #34d399;
  --yes-ink: #5ee2b0;
  --yes-soft: #0f2a21;
  --maybe: #f5c040;
  --maybe-ink: #f5c862;
  --maybe-soft: #2e2510;
  --no: #6b7487;
  --no-ink: #9aa3b5;
  --no-soft: #1a1f29;
  --danger: #f26b73;
  --danger-soft: #2e1519;
  --ring: 0 0 0 3px rgba(111, 125, 255, .40);
  --shadow-sm: none;
  --shadow: 0 1px 0 rgba(255, 255, 255, .02) inset;
  --shadow-pop: 0 16px 48px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: clamp(26px, 3.4vw, 32px); }
h2 { font-size: 18px; letter-spacing: -0.01em; }
h3, .h3 { font-size: 16px; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
strong { font-weight: 600; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--bg-soft); border: 1px solid var(--line); padding: 1px 5px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 50; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); }
.icon { flex: none; }

/* ---------- Shell ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1120px; margin: 0 auto; padding: 0 16px; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-center { justify-content: center; display: flex; margin-bottom: 28px; }
.logo-mark .lm-a { fill: var(--accent); fill-opacity: .28; }
.logo-mark .lm-b { fill: var(--teal); fill-opacity: .36; }
.logo-mark .lm-x { fill: var(--accent); }
.topnav { display: flex; align-items: center; gap: 10px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 32px 16px 64px; flex: 1; }
.wrap-narrow { max-width: 480px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 32px; }
@media (min-width: 720px) { .topbar-in, .wrap { padding-left: 32px; padding-right: 32px; } .wrap { padding-top: 44px; } }

/* ---------- Buttons ---------- */
.btn {
  --h: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 550; font-size: 14.5px; letter-spacing: -0.005em; white-space: nowrap;
  cursor: pointer; text-decoration: none !important; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-sm { --h: 34px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.btn-lg { --h: 48px; padding: 0 22px; font-size: 15.5px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(30, 40, 160, .25), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn-primary:hover { background: var(--accent-hover); }
[data-theme="dark"] .btn-primary { color: #0a0c11; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-danger { background: var(--danger); color: #fff; }
[data-theme="dark"] .btn-danger { color: #1a0a0c; }
.btn-danger-text { color: var(--danger); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-ink); font-weight: 550; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.chip:hover { background: var(--bg-soft); color: var(--ink); }
.chip:focus-visible { outline: none; box-shadow: var(--ring); }

/* ---------- Forms ---------- */
.stack > * + * { margin-top: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: 18px; }
.label { font-size: 13.5px; font-weight: 550; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.opt-tag { font-weight: 450; color: var(--muted); font-size: 12.5px; }
input:not([type=radio]):not([type=checkbox]), textarea, select {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 12px; height: 42px; width: 100%;
  transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
textarea { padding: 10px 12px; height: auto; resize: vertical; min-height: 84px; line-height: 1.5; }
select { padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a92a3' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
input:hover:not(:disabled), textarea:hover, select:hover { border-color: color-mix(in srgb, var(--line-strong) 50%, var(--muted)); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
input:disabled { background: var(--bg-soft); color: var(--muted); }
[aria-invalid=true] { border-color: var(--danger) !important; }
.field-err { color: var(--danger); font-size: 13px; font-weight: 500; margin-top: 4px; }
.grid-2 { display: grid; gap: 18px; }
.grid-2 .field + .field { margin-top: 0; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; gap: 20px; } }

/* Segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 11px; }
.seg a, .seg label span { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 8px; color: var(--muted); font-weight: 550; font-size: 14px; cursor: pointer; text-decoration: none; }
.seg a:hover, .seg label:hover span { color: var(--ink); }
.seg a.seg-on, .seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 0 0 1px var(--line); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg input:focus-visible + span { box-shadow: var(--ring); }
.seg-wide { margin-bottom: 20px; }

/* ---------- Flash ---------- */
.flash { border-radius: var(--r); padding: 12px 14px; font-size: 14px; margin: 0 0 20px; border: 1px solid; line-height: 1.5; }
.flash-ok { background: var(--yes-soft); border-color: color-mix(in srgb, var(--yes) 30%, transparent); color: var(--ink); }
.flash-warn { background: var(--accent-soft); border-color: var(--accent-line); color: var(--ink); }
.flash-err { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, transparent); color: var(--ink); }
.edit-link { display: block; margin-top: 4px; color: var(--ink-2); }

/* ---------- Cards & page heads ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin-top: 6px; }
.backlink { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 500; margin-bottom: 16px; }
.backlink:hover { color: var(--ink); text-decoration: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-open { background: var(--yes-soft); color: var(--yes-ink); }
.pill-closed { background: var(--no-soft); color: var(--no-ink); }

/* ---------- Landing ---------- */
.hero { display: grid; gap: 48px; align-items: center; padding: 24px 0 56px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.1fr 1fr; padding: 56px 0 80px; } }
.hero h1 { font-size: clamp(36px, 6vw, 56px); letter-spacing: -0.035em; line-height: 1.04; max-width: 13ch; }
.lede { font-size: 18px; color: var(--ink-2); margin-top: 20px; max-width: 46ch; line-height: 1.55; }
.hero-cta { display: flex; align-items: center; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 14px; }
.hero-art { display: flex; justify-content: center; }
.mini-grid { display: flex; gap: 10px; padding: 24px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-pop); }
.mg-col { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 12px 16px; border-radius: 14px; }
.mg-best { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent-line); }
.mg-d { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.mg-md { font-size: 15px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
.mg-cell { width: 40px; height: 28px; border-radius: 8px; }
.mg-cell.v2 { background: var(--yes); }
.mg-cell.v1 { background: var(--maybe); opacity: .75; }
.mg-cell.v0 { background: var(--no-soft); box-shadow: inset 0 0 0 1px var(--line); }
.mg-pill { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
[data-theme="dark"] .mg-pill { color: #0a0c11; }
.features { display: grid; gap: 28px; border-top: 1px solid var(--line); padding-top: 40px; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(3, 1fr); } }
.features h2 { font-size: 16px; margin-bottom: 6px; }
.features p { color: var(--muted); }

/* ---------- Auth ---------- */
.auth { padding: 40px 0 24px; text-align: left; }
.auth h1 { font-size: 26px; text-align: center; }
.auth > p.muted { text-align: center; margin: 10px auto 28px; max-width: 38ch; }
.auth .btn-ghost { display: flex; margin: 0 auto; width: fit-content; }
.auth .small { text-align: center; margin-top: 24px; }
.devbox { border: 1px dashed var(--accent-line); background: var(--accent-soft); border-radius: var(--r); padding: 16px; margin: 0 0 8px; }
.devbox-title { font-weight: 600; margin-bottom: 4px; }
.devbox p { font-size: 14px; color: var(--ink-2); margin-bottom: 12px; }

/* ---------- Dashboard ---------- */
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.search { position: relative; flex: 1 1 260px; max-width: 360px; display: block; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-left: 38px !important; height: 40px !important; }
.poll-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.poll-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; box-shadow: var(--shadow-sm); }
.poll-card:hover { text-decoration: none; border-color: var(--line-strong); box-shadow: var(--shadow); }
.poll-card:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--accent); }
.pc-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pc-title { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-meta { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }
.pc-loc { max-width: 24ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-side { display: flex; align-items: center; gap: 18px; flex: none; color: var(--muted); font-size: 13.5px; }
.pc-count { display: inline-flex; align-items: center; gap: 6px; }
.pc-count strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.pc-date { min-width: 120px; text-align: right; }
@media (max-width: 719px) {
  .poll-card { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; }
  .pc-title { white-space: normal; }
  .pc-side { gap: 14px; flex-wrap: wrap; }
  .pc-date { display: none; }
}
.empty { text-align: center; padding: 56px 16px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.empty h2, .empty h3 { margin-top: 20px; }
.empty p { margin: 8px auto 20px; max-width: 40ch; }
.empty-sm { padding: 40px 16px; }
.empty-sm p { margin-bottom: 0; }
.empty-art { display: inline-flex; gap: 6px; }
.empty-art span { width: 28px; height: 36px; border-radius: 8px; background: var(--no-soft); box-shadow: inset 0 0 0 1px var(--line); }
.empty-art span:nth-child(2) { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent-line); transform: translateY(-6px); }
.empty-line { padding: 24px 0; }

/* ---------- Poll form ---------- */
.poll-form { display: grid; gap: 20px; max-width: 880px; }
.poll-form > *, .builder > * { min-width: 0; }
.form-sec { padding: 24px; }
@media (min-width: 720px) { .form-sec { padding: 28px 32px; } }
.sec-title { display: flex; align-items: center; gap: 12px; font-size: 17px; margin-bottom: 22px; }
.step { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 650; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.builder { display: grid; gap: 28px; }
@media (min-width: 760px) { .builder { grid-template-columns: 320px 1fr; gap: 36px; } }
.builder.is-allday { grid-template-columns: 1fr; }
.builder.is-allday .b-times { display: none; }
.b-cal .label, .b-times .label, .preview .label { margin-bottom: 10px; }

/* Calendar */
.cal { user-select: none; max-width: 320px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.cal-nav { display: flex; gap: 4px; }
.cal-nav button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.cal-nav button:hover:not(:disabled) { background: var(--bg-soft); }
.cal-nav button:disabled { opacity: .4; cursor: default; }
.cal-nav button:focus-visible { outline: none; box-shadow: var(--ring); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { font-size: 12px; color: var(--muted); text-align: center; font-weight: 500; padding: 6px 0; }
.cal-day { aspect-ratio: 1; border: 0; background: transparent; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; position: relative; transition: background .12s, color .12s; }
.cal-day:hover:not(:disabled):not([aria-pressed=true]) { background: var(--bg-soft); }
.cal-day:focus-visible { outline: none; box-shadow: var(--ring); }
.cal-day:disabled { color: color-mix(in srgb, var(--muted) 55%, transparent); cursor: default; }
.cal-day.is-today::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.cal-day[aria-pressed=true] { background: var(--accent); color: #fff; font-weight: 600; }
[data-theme="dark"] .cal-day[aria-pressed=true] { color: #0a0c11; }
.cal-day[aria-pressed=true].is-today::after { background: currentColor; }
.cal-pad { aspect-ratio: 1; }

/* Time slots */
.slots { display: grid; gap: 8px; }
.slot { display: flex; align-items: center; gap: 8px; }
.slot input[type=time] { flex: 1 1 0; min-width: 0; max-width: 150px; height: 40px; font-variant-numeric: tabular-nums; }
.slot .dash { color: var(--muted); }
.icon-btn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--bg-soft); color: var(--ink); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.slot-actions { margin: 12px 0 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.preview { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.opt-preview { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.op-day { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.op-date { width: 92px; flex: none; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.op-times { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.op-chip { height: 30px; padding: 0 8px 0 11px; border-radius: 8px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.op-chip .x { opacity: .6; font-size: 15px; line-height: 1; }
.op-chip[aria-pressed=false] { background: transparent; border-style: dashed; border-color: var(--line-strong); color: var(--muted); text-decoration: line-through; }
.op-chip:focus-visible { outline: none; box-shadow: var(--ring); }
.op-empty { color: var(--muted); font-size: 14px; }

/* ---------- Poll head / share ---------- */
.page-head-poll { align-items: flex-start; }
.ph-main { min-width: 0; flex: 1 1 420px; }
.title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.desc { color: var(--ink-2); margin-top: 10px; max-width: 64ch; white-space: pre-line; }
.poll-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; color: var(--muted); font-size: 14px; }
.poll-meta span { display: inline-flex; align-items: center; gap: 6px; }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.share { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 18px 20px; margin-bottom: 36px; flex-wrap: wrap; background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%); border-color: var(--accent-line); }
.share h2 { font-size: 15px; }
.share-row { display: flex; gap: 8px; flex: 1 1 420px; max-width: 620px; }
.share-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important; font-size: 13.5px !important; color: var(--ink-2) !important; background: var(--surface) !important; min-width: 0; }
@media (max-width: 560px) { .share-row { flex-wrap: wrap; } .share-row .share-input { flex: 1 1 100%; } .share-row .btn { flex: 1; } }
.copied { background: var(--yes) !important; }

/* ---------- Results ---------- */
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.count-chip { display: inline-flex; vertical-align: 2px; margin-left: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line); padding: 1px 9px; border-radius: 999px; letter-spacing: 0; }
.tz-note { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; }
.best { padding: 18px 20px; margin-bottom: 20px; border-color: var(--accent-line); }
.best-kicker { font-size: 13px; font-weight: 600; color: var(--accent-ink); margin-bottom: 10px; }
.best-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.best-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.best-list .opt { font-size: 17px; font-weight: 600; }
.best-stat { color: var(--muted); font-size: 14px; }

.opt { display: inline-flex; gap: 6px; align-items: baseline; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.opt-dow { color: var(--muted); font-weight: 500; }
.opt-md { font-weight: 600; color: var(--ink); }
.opt-time { color: var(--ink-2); }
.opt-compact { flex-direction: column; align-items: center; gap: 0; line-height: 1.3; }
.opt-compact .opt-dow { font-size: 12px; }
.opt-compact .opt-md { font-size: 14.5px; }
.opt-compact .opt-time { font-size: 12px; color: var(--muted); white-space: nowrap; }

.grid-scroll { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
.grid-scroll:focus-visible { outline: none; box-shadow: var(--ring); }
.rgrid { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 14px; }
.rgrid th, .rgrid td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--line); }
.rgrid tbody tr:last-child th, .rgrid tbody tr:last-child td { border-bottom: 0; }
.rgrid thead th { position: relative; padding: 22px 10px 12px; vertical-align: bottom; font-weight: 400; background: var(--surface-2); }
.rgrid .rg-name { position: sticky; left: 0; z-index: 2; text-align: left; background: var(--surface); min-width: 200px; max-width: 260px; padding-left: 16px; border-right: 1px solid var(--line); font-weight: 500; }
.rgrid thead .rg-name { background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 550; vertical-align: bottom; z-index: 3; }
.rgrid .rg-opt { min-width: 84px; }
.rgrid .rg-best { background: color-mix(in srgb, var(--accent-soft) 70%, transparent); }
.rgrid thead .rg-best { background: var(--accent-soft); }
.best-pill { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 650; color: var(--accent-ink); background: var(--surface); border: 1px solid var(--accent-line); border-radius: 999px; padding: 0 7px; line-height: 16px; }
.rgrid tfoot th, .rgrid tfoot td { border-top: 1px solid var(--line); border-bottom: 0; background: var(--surface-2); padding-top: 12px; padding-bottom: 14px; }
.rgrid tfoot .rg-best { background: var(--accent-soft); }
.rgrid tfoot .rg-name { color: var(--muted); font-size: 13px; font-weight: 550; background: var(--surface-2); }
.tot-n { display: block; font-weight: 650; font-size: 17px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tot-sub { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.tbar { display: flex; height: 5px; border-radius: 999px; overflow: hidden; background: var(--no-soft); box-shadow: inset 0 0 0 1px var(--line); width: 100%; min-width: 44px; margin-top: 6px; }
.tbar-yes { background: var(--yes); }
.tbar-maybe { background: var(--maybe); }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.person-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-email { font-size: 12.5px; color: var(--muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vote { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; }
.vote.v-yes { background: var(--yes-soft); color: var(--yes-ink); }
.vote.v-maybe { background: var(--maybe-soft); color: var(--maybe-ink); }
.vote.v-no { color: color-mix(in srgb, var(--no) 70%, transparent); }
.vote.v-no .icon { width: 14px; height: 14px; }
.vote.v-unasked { color: var(--muted); font-weight: 600; }
.unasked-note { margin-top: 12px; }
.ranked { margin-top: 36px; }
.ranked h2 { margin-bottom: 12px; }
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: r; }
.rank { display: grid; grid-template-columns: 28px minmax(0, 1fr) 140px 52px; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); counter-increment: r; }
.rank::before { content: counter(r); color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.rank .tbar { margin: 0; height: 6px; }
.rank-best { border-color: var(--accent-line); background: var(--accent-soft); }
.rank-n { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.rank-n strong { color: var(--ink); }
@media (max-width: 560px) { .rank { grid-template-columns: 22px minmax(0, 1fr) 44px; } .rank .tbar { grid-column: 2 / 4; grid-row: 2; } }

/* Menus */
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--teal)); color: #fff; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.avatar-sm { width: 28px; height: 28px; font-size: 12.5px; background: var(--bg-soft); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
summary.avatar:focus-visible { outline: none; box-shadow: var(--ring); }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; z-index: 30; }
.menu-pop a, .menu-pop button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--ink); font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--bg-soft); text-decoration: none; }
.menu-email { font-size: 12.5px; color: var(--muted); padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; }
.menu-row summary { width: 28px; height: 28px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.menu-row summary:hover { background: var(--bg-soft); color: var(--ink); }
.menu-row summary:focus-visible { outline: none; box-shadow: var(--ring); }
.menu-row .menu-pop { left: 0; right: auto; min-width: 170px; }
.menu-row .menu-pop button { color: var(--danger); }

/* ---------- Vote page ---------- */
.vote-page { max-width: 720px; margin: 0 auto; }
.vote-head { margin-bottom: 28px; }
.kicker { color: var(--accent-ink); font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.who { padding: 20px; margin-bottom: 24px; }
.vote-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.set-all { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vote-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.vote-row + .vote-row { border-top: 1px solid var(--line); }
.vote-row fieldset { border: 0; margin: 0; padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label tri" "tally tri"; align-items: center; gap: 2px 16px; min-width: 0; }
.vr-label { grid-area: label; padding: 0; float: left; width: 100%; font-size: 15px; }
.vr-tally { grid-area: tally; font-size: 12.5px; color: var(--muted); }
.tri { grid-area: tri; display: inline-flex; padding: 3px; gap: 3px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; }
.tri label { position: relative; display: flex; }
.tri label > span { flex: 1; }
.tri input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tri span { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 9px; color: var(--muted); font-weight: 550; font-size: 13.5px; white-space: nowrap; transition: background .12s, color .12s; cursor: pointer; }
.tri span .icon { width: 16px; height: 16px; }
.tri label:hover span { color: var(--ink); }
.tri input:focus-visible + span { box-shadow: var(--ring); }
.tri-yes input:checked + span { background: var(--yes-ink); color: #fff; } /* 5.6:1 */
.tri-maybe input:checked + span { background: var(--maybe); color: #241800; }
.tri-no input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line-strong), 0 1px 2px rgba(16, 24, 40, .06); }
[data-theme="dark"] .tri-yes input:checked + span { background: var(--yes); color: #05261a; }
fieldset:disabled .tri { opacity: .6; }
fieldset:disabled .tri span { cursor: default; }
.vote-row:has(.tri-yes input:checked) { background: color-mix(in srgb, var(--yes-soft) 55%, transparent); }
.vote-row:has(.tri-maybe input:checked) { background: color-mix(in srgb, var(--maybe-soft) 55%, transparent); }
@media (max-width: 600px) {
  .vote-row fieldset { grid-template-columns: 1fr; grid-template-areas: "label" "tally" "tri"; gap: 2px; }
  .tri { margin-top: 10px; display: grid; grid-template-columns: repeat(3, 1fr); }
  .tri span { justify-content: center; padding: 0 6px; }
}
.blank-hint { margin: -4px 0 12px; }
.submit-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 0 calc(16px + env(safe-area-inset-bottom)); margin-top: 8px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--line); flex-wrap: wrap; }
@media (max-width: 600px) { .submit-bar .btn { width: 100%; } }

/* Confirm */
.confirm { padding: 28px; margin-top: 24px; }
.confirm h1 { font-size: 22px; }
.confirm p { margin: 12px 0 24px; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* Theme toggle */
.theme-toggle { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.theme-toggle:hover { background: var(--bg-soft); color: var(--ink); }
.theme-toggle:focus-visible { outline: none; box-shadow: var(--ring); }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.theme-form { display: inline-flex; margin: 0; }
.foot { display: flex; align-items: center; justify-content: center; gap: 14px; }

@media (max-width: 480px) {
  .form-sec { padding: 20px 16px; }
  .slot { gap: 6px; }
  .slot input[type=time] { padding: 0 8px; font-size: 14px; }
  .op-day { flex-direction: column; gap: 6px; }
  .op-date { width: auto; }
}
