/* PollIt - one stylesheet, written for phones first, widened for tablets and computers. Light by default, dark when
   the device is (or the person chose it). A poll's own colour (--poll) becomes the accent on its pages. */

:root {
  --brand: #1d4ed8;
  --navy: #0b1a44;
  --navy-2: #15307a;
  --gold: #d99a00;
  --primary: var(--poll, var(--brand));
  --primary-strong: color-mix(in srgb, var(--primary) 80%, black);
  --primary-soft: color-mix(in srgb, var(--primary) 10%, var(--surface));
  --primary-line: color-mix(in srgb, var(--primary) 32%, var(--border));
  --on-primary: #fff;
  --link: color-mix(in srgb, var(--primary) 85%, black);
  --bg: #f3f6fc;
  --surface: #ffffff;
  --surface-2: #eef2fa;
  --surface-3: #e2e8f4;
  --border: #dbe2ef;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #64748b;
  --yes: #16a34a;
  --yes-soft: #dcfce7;
  --yes-text: #166534;
  --maybe: #d97706;
  --maybe-soft: #fef3c7;
  --maybe-text: #92400e;
  --no-soft: #f1f5f9;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --warn-soft: #fff7ed;
  --warn-text: #9a3412;
  --best: #facc15;
  --best-soft: color-mix(in srgb, var(--primary) 9%, var(--surface));
  --best-line: color-mix(in srgb, var(--primary) 40%, var(--border));
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 14px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 14px 36px rgba(11, 26, 68, 0.2);
  --radius: 16px;
  --radius-sm: 10px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  --gutter: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070d1f; --surface: #0f1830; --surface-2: #15213f; --surface-3: #1d2b50; --border: #22325a;
    --text: #e6ecf8; --text-2: #a8b5d1; --text-3: #7d8bb0; --gold: #fbbf24;
    --yes: #22c55e; --yes-soft: #0f3326; --yes-text: #86efac; --maybe: #f59e0b; --maybe-soft: #33270e; --maybe-text: #fcd34d;
    --no-soft: #17213b; --danger: #f87171; --danger-soft: #3a1622; --warn-soft: #2e2412; --warn-text: #fdba74;
    --primary: var(--poll, #3d6af2); --on-primary: #fff; --primary-strong: color-mix(in srgb, var(--primary) 78%, white);
    --primary-soft: color-mix(in srgb, var(--primary) 16%, var(--surface)); --link: color-mix(in srgb, var(--primary) 62%, white);
    --best-soft: color-mix(in srgb, var(--primary) 14%, var(--surface));
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow: 0 1px 3px rgba(0, 0, 0, 0.45), 0 4px 14px rgba(0, 0, 0, 0.3); --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070d1f; --surface: #0f1830; --surface-2: #15213f; --surface-3: #1d2b50; --border: #22325a;
  --text: #e6ecf8; --text-2: #a8b5d1; --text-3: #7d8bb0; --gold: #fbbf24;
  --yes: #22c55e; --yes-soft: #0f3326; --yes-text: #86efac; --maybe: #f59e0b; --maybe-soft: #33270e; --maybe-text: #fcd34d;
  --no-soft: #17213b; --danger: #f87171; --danger-soft: #3a1622; --warn-soft: #2e2412; --warn-text: #fdba74;
  --primary: var(--poll, #3d6af2); --on-primary: #fff; --primary-strong: color-mix(in srgb, var(--primary) 78%, white);
  --primary-soft: color-mix(in srgb, var(--primary) 16%, var(--surface)); --link: color-mix(in srgb, var(--primary) 62%, white);
  --best-soft: color-mix(in srgb, var(--primary) 14%, var(--surface));
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow: 0 1px 3px rgba(0, 0, 0, 0.45), 0 4px 14px rgba(0, 0, 0, 0.3); --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

/* --- base --------------------------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 4.5vw, 2.25rem); font-weight: 750; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 650; }
h4 { font-size: 0.95rem; font-weight: 650; }
p { margin: 0 0 0.8em; }
a { color: var(--link); text-underline-offset: 2px; }
small, .small { font-size: 0.85rem; }
.muted { color: var(--text-3); }
.hint { color: var(--text-3); font-size: 0.875rem; margin: 0.25rem 0 0.6rem; }
.lead { font-size: 1.1rem; color: var(--text-2); max-width: 46rem; }
.center { text-align: center; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 6px; }
.code { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; overflow-x: auto; font: 0.85rem/1.5 var(--mono); }
.code code { background: none; padding: 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; }
.icon { flex: none; }
.boot { display: grid; place-items: center; min-height: 80vh; }
.boot img { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.5; transform: scale(0.94); } }

/* --- frame ------------------------------------------------------------------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: 50; background: linear-gradient(90deg, var(--navy), var(--navy-2)); border-bottom: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 2px 12px rgba(11, 26, 68, 0.25); }
.topbar-in { max-width: 1180px; margin: 0 auto; height: 60px; padding: 0 var(--gutter); display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #fff; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.topnav { display: flex; gap: 4px; margin-left: 12px; }
.topnav a { color: rgba(255, 255, 255, 0.78); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 550; font-size: 0.95rem; display: inline-flex; align-items: center; gap: 6px; }
.topnav a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.topbar-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.lang-pick { position: relative; display: inline-flex; align-items: center; gap: 4px; color: rgba(255, 255, 255, 0.8); padding: 0 6px; border-radius: 999px; }
.lang-pick select { appearance: none; border: 0; background: transparent; padding: 8px 4px; cursor: pointer; font-size: 0.9rem; color: rgba(255, 255, 255, 0.85); min-height: 0; }
.lang-pick select option { color: #0f172a; background: #fff; }
.lang-pick:hover { background: rgba(255, 255, 255, 0.1); }
.topbar .icon-btn { color: rgba(255, 255, 255, 0.85); }
.topbar .icon-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); color: #fff; }
.topbar .btn-primary { background: #fff; color: var(--navy); box-shadow: none; }
.topbar .btn-primary:hover:not(:disabled) { background: #e3ebff; }
.icon-btn.menu-btn { display: none; }
@media (max-width: 760px) {
  .topnav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; background: var(--navy-2); border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding: 8px var(--gutter) 16px; margin: 0; box-shadow: var(--shadow-lg); }
  .topnav.open { display: flex; }
  .topnav a { padding: 12px; border-radius: var(--radius-sm); font-size: 1rem; }
  .icon-btn.menu-btn { display: inline-grid; }
  .new-btn span { display: none; }
  .new-btn { padding: 0 10px; }
  .lang-pick select { width: 2.6rem; color: transparent; position: absolute; inset: 0; opacity: 0; }
  .lang-pick { width: 40px; height: 40px; justify-content: center; }
}
.main { max-width: 1180px; margin: 0 auto; padding: 20px var(--gutter) 48px; min-height: calc(100vh - 160px); }
.footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 24px; }
.footer-in { max-width: 1180px; margin: 0 auto; padding: 24px var(--gutter); display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; color: var(--text-3); font-size: 0.9rem; }
.footer strong { color: var(--text); }
.footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--text-2); }
.by { margin-top: 2px; }

.page { max-width: 1000px; margin: 0 auto; }
.page.narrow { max-width: 520px; }
.page.narrow-wide { max-width: 860px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.page-head h1 { margin: 0; }
.page-loading { display: grid; place-items: center; min-height: 40vh; }
.section-title { margin-top: 2rem; }
.stack { display: flex; flex-direction: column; gap: 4px; }

/* --- buttons ------------------------------------------------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; font-weight: 650; font-size: 0.95rem; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background 0.15s, border-color 0.15s, transform 0.05s, box-shadow 0.15s; user-select: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 1px 2px color-mix(in srgb, var(--primary) 40%, transparent); }
.btn-primary:hover:not(:disabled) { background: var(--primary-strong); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { border-color: var(--primary-line); background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-small { min-height: 34px; padding: 0 12px; font-size: 0.875rem; gap: 6px; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid currentColor; border-color: var(--text-3) transparent var(--text-3) transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
.btn-primary.busy::after { border-color: var(--on-primary) transparent var(--on-primary) transparent; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; flex: none; }
.icon-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.link { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font-size: inherit; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
@media (pointer: coarse) { .btn { min-height: 46px; } .btn-small { min-height: 40px; } .icon-btn { width: 42px; height: 42px; } }

/* --- forms -------------------------------------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field label { font-weight: 600; font-size: 0.9rem; color: var(--text-2); }
.optional { font-weight: 400; color: var(--text-3); font-size: 0.8rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="search"], input[type="tel"], input:not([type]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; line-height: 1.45; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
.has-error input, .has-error textarea { border-color: var(--danger); }
.error-text { color: var(--danger); font-size: 0.875rem; }
.row2, .row3 { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: repeat(3, 1fr); } }
.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--text-2); }
.inline input { width: auto; min-height: 36px; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { flex: 1; margin: 0; min-width: 180px; }
.inline-form > input { flex: 1; min-width: 160px; }
.copy-field { display: flex; gap: 6px; align-items: center; }
.copy-field input { flex: 1; font-family: var(--mono); font-size: 0.85rem; background: var(--surface-2); }

.toggle { margin: 6px 0 12px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.toggle-track { flex: none; width: 42px; height: 24px; border-radius: 999px; background: var(--surface-3); position: relative; transition: background 0.2s; margin-top: 1px; }
.toggle-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform 0.2s; }
.toggle input:checked + label .toggle-track { background: var(--primary); }
.toggle input:checked + label .toggle-thumb { transform: translateX(18px); }
.toggle input:focus-visible + label .toggle-track { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; }
.toggle-text { display: flex; flex-direction: column; }
.toggle-text small { color: var(--text-3); }
.toggle.disabled { opacity: 0.6; }

.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; }
.segmented button { border: 0; background: transparent; border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 0.9rem; color: var(--text-2); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.segmented.small button { padding: 5px 11px; font-size: 0.85rem; }

.radio-cards { display: grid; gap: 8px; margin-bottom: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .radio-cards { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 14px; cursor: pointer; background: var(--surface); transition: border-color 0.15s, background 0.15s; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card.on { border-color: var(--primary); background: var(--primary-soft); }
.radio-card .icon { color: var(--primary); margin-top: 2px; }
.radio-card span { display: flex; flex-direction: column; }
.radio-card small { color: var(--text-3); line-height: 1.35; }

/* --- cards, badges, notices ----------------------------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
@media (min-width: 700px) { .card { padding: 22px; } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.card-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 0.78rem; font-weight: 650; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
.badge-ok { background: var(--yes-soft); color: var(--yes-text); border-color: transparent; }
.badge-warn { background: var(--maybe-soft); color: var(--maybe-text); border-color: transparent; }
.badge-accent { background: var(--primary-soft); color: var(--primary-strong); border-color: var(--primary-line); }
.badge-best { background: var(--best-soft); color: var(--text); border-color: var(--best-line); }
.badge-closed { background: var(--text); color: var(--surface); border-color: transparent; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--primary-soft); border: 1px solid var(--primary-line); margin: 10px 0; font-size: 0.95rem; }
.notice > .icon { color: var(--primary-strong); margin-top: 2px; }
.notice > div { flex: 1; min-width: 0; }
.notice-error { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.notice-error > .icon { color: var(--danger); }
.notice-ok { background: var(--yes-soft); border-color: transparent; }
.notice-ok > .icon { color: var(--yes); }
.notice .field { margin: 10px 0 6px; }
.empty { text-align: center; padding: 56px 16px; color: var(--text-2); }
.empty .icon { color: var(--text-3); }
.empty h3 { margin-top: 12px; color: var(--text); }
.spinner { display: inline-flex; align-items: center; gap: 10px; color: var(--text-3); }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--primary); animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; flex: none; line-height: 1; }
.chip { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 0.85rem; }
.chip-toggle { border: 1.5px solid var(--border); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.chip-toggle.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-strong); }
.bar { display: block; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--primary); transition: width 0.4s ease; }

/* --- dialogs, toasts ------------------------------------------------------------------------------------------------ */
.modal { border: 0; padding: 0; border-radius: 20px; background: var(--surface); color: var(--text); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow-lg); }
.modal.wide { width: min(820px, calc(100vw - 24px)); }
.modal::backdrop { background: rgba(10, 15, 25, 0.55); backdrop-filter: blur(2px); }
.modal-body { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px 22px; }
.modal-head h2 { margin: 0; }
.modal-content { padding: 4px 22px 16px; overflow-y: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
@media (max-width: 600px) {
  .modal, .modal.wide { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 20px 20px 0 0; max-height: 92vh; }
  .modal-body { max-height: 92vh; }
  .modal-content { padding: 4px 16px 16px; }
  .modal-actions { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
  .modal-actions .btn { flex: 1; }
}
.toasts { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.toast { display: flex; gap: 8px; align-items: center; background: var(--text); color: var(--surface); padding: 10px 16px; border-radius: 999px; box-shadow: var(--shadow-lg); font-weight: 550; font-size: 0.95rem; animation: rise 0.2s ease-out; }
.toast-error { background: var(--danger); color: #fff; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

/* --- home --------------------------------------------------------------------------------------------------------- */
.hero { display: grid; gap: 32px; align-items: center; padding: 36px 28px; margin-top: 4px; border-radius: 24px; color: #fff;
  background: radial-gradient(900px 380px at 0% 0%, rgba(59, 130, 246, 0.45), transparent 60%), radial-gradient(700px 360px at 100% 100%, rgba(250, 204, 21, 0.12), transparent 60%), linear-gradient(135deg, var(--navy), var(--navy-2));
  box-shadow: var(--shadow-lg); }
@media (min-width: 900px) { .hero { grid-template-columns: 1.15fr 1fr; padding: 56px 48px; } }
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 16px; background: linear-gradient(120deg, #fff 35%, #9cc0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: rgba(255, 255, 255, 0.82); }
.hero .btn-primary { background: #fff; color: var(--navy); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
.hero .btn-primary:hover:not(:disabled) { background: #e3ebff; }
.hero .pin-form input { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.28); color: #fff; }
.hero .pin-form input::placeholder { color: rgba(255, 255, 255, 0.6); }
.hero .pin-form .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.hero .pin-form .btn-secondary:hover:not(:disabled) { background: rgba(255, 255, 255, 0.1); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }
.hero-actions > .btn { min-height: 50px; padding: 0 26px; font-size: 1.05rem; }
.pin-form { display: flex; gap: 6px; }
.pin-form input { width: 7.5rem; text-align: center; letter-spacing: 0.12em; border-radius: 999px; min-height: 50px; }
.pin-form .btn { min-height: 50px; }
.hero-art { display: flex; justify-content: center; }
.mock { width: min(420px, 100%); color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 16px 18px 20px; transform: rotate(-1.5deg); }
.mock-head { display: flex; gap: 6px; margin-bottom: 14px; }
.mock-head span { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.mock-row { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 6px; align-items: center; padding: 5px 0; }
.mock-row i { font-style: normal; color: var(--text-2); font-size: 0.9rem; }
.mock-row b { text-align: center; font-size: 0.85rem; color: var(--text-3); }
.mock-row em { font-style: normal; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; }
.mock-row em.y { background: var(--yes-soft); color: var(--yes); }
.mock-row em.m { background: var(--maybe-soft); color: var(--maybe); }
.mock-row em.n { background: var(--no-soft); }
.mock-row.total strong { text-align: center; font-size: 1.1rem; }
.mock-row .best { background: var(--best-soft); border: 1px solid var(--best-line); border-radius: 10px; }
.home-section { margin: 40px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.recent { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.recent a { display: flex; flex-direction: column; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; text-decoration: none; color: var(--text); }
.recent a:hover { border-color: var(--primary-line); }
.recent small { color: var(--text-3); }
.recent-title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.type-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); }
.type-grid.compact { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); margin: 24px 0; }
.type-card { display: flex; flex-direction: column; gap: 4px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.type-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary-line); }
.type-card strong { font-size: 1.05rem; margin-top: 8px; }
.type-card small { color: var(--text-3); line-height: 1.4; }
.type-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-strong); flex: none; }
.type-icon.small { width: 28px; height: 28px; border-radius: 8px; }
.ti-date { --ti: #0369a1; } .ti-grid { --ti: #15803d; } .ti-choice { --ti: #6d28d9; } .ti-rank { --ti: #c2410c; }
.ti-score { --ti: #a16207; } .ti-signup { --ti: #be185d; } .ti-booking { --ti: #0f766e; } .ti-open { --ti: #4338ca; }
.type-icon[class*="ti-"] { background: color-mix(in srgb, var(--ti) 13%, var(--surface)); color: var(--ti); }
:root[data-theme="dark"] .type-icon[class*="ti-"] { background: color-mix(in srgb, var(--ti) 30%, var(--surface)); color: color-mix(in srgb, var(--ti) 45%, white); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .type-icon[class*="ti-"] { background: color-mix(in srgb, var(--ti) 30%, var(--surface)); color: color-mix(in srgb, var(--ti) 45%, white); } }
.template-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); margin-bottom: 12px; }
.template { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; text-decoration: none; color: var(--text); }
.template .icon { color: var(--primary); margin-top: 2px; }
.template span { display: flex; flex-direction: column; }
.template small { color: var(--text-3); }
.template:hover { border-color: var(--primary-line); background: var(--primary-soft); }
.highlights { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.highlight { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.highlight .icon { color: var(--primary); }
.highlight h3 { margin: 10px 0 6px; }
.highlight p { color: var(--text-2); margin: 0; font-size: 0.95rem; }

/* --- making a poll ---------------------------------------------------------------------------------------------- */
.create { max-width: 860px; }
.create-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.create-head h1 { margin: 0; }
.create-head p { margin: 0; }
.submit-bar { position: sticky; bottom: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; justify-content: space-between; }
.submit-bar .toggle { margin: 0; }
.submit-actions { display: flex; gap: 8px; margin-left: auto; }
@media (max-width: 600px) { .submit-actions { width: 100%; } .submit-actions .btn { flex: 1; } }
.date-options { display: grid; gap: 20px; }
@media (min-width: 780px) { .date-options { grid-template-columns: 320px 1fr; } .date-options > .field { grid-column: 1 / -1; } }
.date-tools { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.date-list { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.placeholder { display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--text-3); padding: 32px 16px; border: 2px dashed var(--border); border-radius: var(--radius); }
.day-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 6px 10px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.day-name { width: 7.2rem; flex: none; padding-top: 6px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.day-times { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.time-chip { display: inline-flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 2px 2px 2px 8px; }
.time-chip.busy { border-color: var(--maybe); background: var(--maybe-soft); }
.time-chip input { border: 0; min-height: 32px; padding: 2px; width: 7.6rem; background: transparent; box-shadow: none; }
.time-chip input:focus { box-shadow: none; }
.time-chip .icon-btn { width: 28px; height: 28px; }
@media (max-width: 520px) { .day-row { flex-wrap: wrap; } .day-name { width: auto; flex-direction: row; align-items: center; flex: 1; padding: 0; } .day-times { order: 3; flex-basis: 100%; } }
.month { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; user-select: none; }
.month-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.month-head strong { display: inline-block; }
.month-head strong::first-letter { text-transform: uppercase; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.month-wd { text-align: center; font-size: 0.75rem; color: var(--text-3); padding: 4px 0; text-transform: capitalize; }
.month-day { aspect-ratio: 1; border: 0; border-radius: 10px; background: transparent; cursor: pointer; font-weight: 600; font-size: 0.95rem; position: relative; min-height: 38px; }
.month-day:hover:not(:disabled) { background: var(--surface-2); }
.month-day.other { color: var(--text-3); font-weight: 400; }
.month-day.today { box-shadow: inset 0 0 0 1.5px var(--primary-line); }
.month-day.on, .month-day.on:hover:not(:disabled) { background: var(--primary); color: var(--on-primary); }
.month-day.busy::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--maybe); }
.month-day:disabled { opacity: 0.3; cursor: default; }
.month-foot { display: flex; justify-content: space-between; margin-top: 6px; color: var(--text-3); }
.list-options { display: flex; flex-direction: column; gap: 8px; }
.opt-row { display: flex; align-items: flex-start; gap: 6px; padding: 6px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); }
.opt-move { display: flex; flex-direction: column; }
.opt-move .icon-btn { width: 28px; height: 22px; border-radius: 6px; }
.opt-image { width: 44px; height: 44px; border-radius: 10px; border: 1.5px dashed var(--border); display: grid; place-items: center; color: var(--text-3); cursor: pointer; overflow: hidden; position: relative; flex: none; background: var(--surface); }
.opt-image input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.opt-image.has { border-style: solid; }
.opt-image img { width: 100%; height: 100%; object-fit: cover; }
.opt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.opt-label { font-weight: 550; }
.opt-more { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.opt-more > input { flex: 1 1 100%; }
.opt-when { flex-wrap: wrap; }
.opt-when input { width: auto; }
.weekday-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.weekly, .overrides { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.week-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.week-row .toggle { margin: 0; min-width: 9.5rem; }
.ranges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.range { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 2px 2px 2px 6px; }
.range select { min-height: 32px; border: 0; padding: 2px 22px 2px 4px; width: auto; background-color: transparent; background-position: calc(100% - 10px) 50%, calc(100% - 5px) 50%; }
.booking-options h3 { margin-top: 18px; }
.settings-group { border-top: 1px solid var(--border); }
.settings-group:first-child { border-top: 0; }
.settings-group summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 14px 0; }
.settings-group summary::-webkit-details-marker { display: none; }
.settings-group summary h3 { margin: 0; }
.settings-group summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg); transition: transform 0.2s; margin-right: 6px; }
.settings-group[open] summary::after { transform: rotate(-135deg); }
.settings-body { padding-bottom: 12px; }
.fields-editor { margin-top: 6px; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.field-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px; align-items: center; margin-bottom: 8px; }
.field-row select { width: auto; }
.field-row .choices { grid-column: 1 / -1; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr auto; } }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 2.5px var(--text); }
.swatch.auto { background: linear-gradient(135deg, #3b82f6, #1e3a8a); color: #fff; font-weight: 800; font-size: 0.75rem; }
.cover-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cover-pick img { width: 160px; height: 64px; object-fit: cover; border-radius: 10px; }

/* --- the poll page ------------------------------------------------------------------------------------------------ */
.poll-layout { display: grid; gap: 20px; }
@media (min-width: 1040px) { .poll-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } .poll-side { position: sticky; top: 76px; } }
.poll-main { min-width: 0; }
.poll-head { margin-bottom: 16px; }
.cover { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius); margin-bottom: 14px; display: block; }
.poll-kind { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--text-3); font-weight: 600; font-size: 0.85rem; margin-bottom: 8px; }
.poll-head h1 { margin-bottom: 4px; word-wrap: break-word; }
.poll-head .by { color: var(--text-3); margin-bottom: 8px; }
.poll-head .desc { white-space: pre-wrap; color: var(--text-2); max-width: 48rem; }
.poll-facts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.fact { display: inline-flex; gap: 6px; align-items: center; color: var(--text-2); text-decoration: none; font-size: 0.9rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tz-pick { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 0.85rem; margin-top: 4px; max-width: 100%; }
.tz-pick select { min-height: 34px; padding: 4px 30px 4px 10px; font-size: 0.85rem; width: auto; max-width: calc(100vw - 80px); border-radius: 999px; }
.welcome { border: 2px solid var(--primary-line); background: linear-gradient(135deg, var(--primary-soft), var(--surface) 60%); }
.welcome-head { display: flex; gap: 12px; align-items: flex-start; }
.welcome-head > .icon { color: var(--gold); margin-top: 4px; }
.welcome-head > div { flex: 1; }
.welcome-head h2 { margin: 0 0 2px; font-size: 1.3rem; }
.answer-card { padding: 14px; }
@media (min-width: 700px) { .answer-card { padding: 20px; } }
.cal-row { display: flex; justify-content: flex-end; margin: -4px -4px 4px; }
.add-option-row { margin-top: 10px; }
.add-option { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.add-option input { flex: 1; min-width: 8rem; width: auto; }
.final-banner { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius); margin-bottom: 16px; background: linear-gradient(135deg, var(--best-soft), var(--surface)); border: 1px solid var(--best-line); }
.final-banner > .icon { color: var(--gold); flex: none; }
.final-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 750; color: var(--text-3); }
.final-what { font-size: 1.2rem; font-weight: 750; }
.final-note { margin: 6px 0; white-space: pre-wrap; }
.add-cal { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 0.875rem; margin-top: 8px; color: var(--text-3); }
.poll-side .card { padding: 16px; }
.side-foot { text-align: center; color: var(--text-3); font-size: 0.85rem; }
.manage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.manage-grid .btn { justify-content: flex-start; padding: 0 10px; overflow: hidden; }
.manage-grid .btn span { overflow: hidden; text-overflow: ellipsis; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.share.big .share-buttons .btn { min-height: 40px; }
.qr { background: #fff; border-radius: 12px; padding: 6px; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-big { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; word-break: break-all; }
.gate { text-align: center; padding: 8px 0 16px; }
.gate .icon { color: var(--primary); }
.vote-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.vote-tools .segmented { margin: 0 0 10px; }

/* the table of a meeting poll */
.table-wrap { overflow-x: auto; margin: 0 -14px; padding: 0; -webkit-overflow-scrolling: touch; }
@media (min-width: 700px) { .table-wrap { margin: 0 -20px; } }
.vote-table { border-collapse: separate; border-spacing: 0; font-size: 0.95rem; }
.vote-table th, .vote-table td { padding: 0; text-align: center; border-bottom: 1px solid var(--border); }
.vote-table thead th { vertical-align: bottom; padding: 8px 4px; }
.vote-table th[scope="row"], .vote-table .corner { position: sticky; left: 0; background: var(--surface); z-index: 2; text-align: left; padding: 6px 12px 6px 14px; min-width: 9rem; max-width: 14rem; font-weight: 550; box-shadow: 1px 0 0 var(--border); }
@media (min-width: 700px) { .vote-table th[scope="row"], .vote-table .corner { padding-left: 20px; } }
.vote-table tr > :last-child { padding-right: 14px; }
.vote-table .corner { color: var(--text-3); font-size: 0.85rem; font-weight: 500; vertical-align: bottom; }
.opt-head { min-width: 5.4rem; border-radius: 12px 12px 0 0; }
.opt-head.best { background: var(--best-soft); }
.opt-head.busy .oh-busy { color: var(--maybe-text); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.oh-month { font-size: 0.72rem; text-transform: uppercase; color: var(--text-3); font-weight: 700; letter-spacing: 0.04em; }
.oh-day { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.oh-wd { font-size: 0.8rem; color: var(--text-2); text-transform: capitalize; }
.oh-time { font-size: 0.78rem; color: var(--text-2); font-weight: 600; white-space: nowrap; margin-top: 2px; }
.oh-label { font-weight: 650; font-size: 0.88rem; max-width: 8rem; margin: 0 auto; overflow-wrap: anywhere; }
.oh-places { font-size: 0.72rem; color: var(--text-3); }
.oh-places.full { color: var(--danger); font-weight: 700; }
.vote-table .opt-thumb { width: 52px; height: 52px; }
.pname { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pname > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vote-table td { height: 44px; }
.vote-table td.v-y { background: var(--yes-soft); }
.vote-table td.v-m { background: var(--maybe-soft); }
.vote-table td.v-w { background: var(--surface-2); }
.vote-table tbody tr:hover th, .vote-table tbody tr:hover td:not(.v-y):not(.v-m) { background: var(--surface-2); }
.vote-table tr.mine th { color: var(--primary-strong); }
.mark { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.mark.y { color: var(--yes); }
.mark.m { color: var(--maybe); font-size: 0.85rem; }
.mark.w { color: var(--text-3); }
.me-row th, .me-row td { background: var(--primary-soft); border-bottom: 2px solid var(--primary-line); }
.me-row th[scope="row"] { background: color-mix(in srgb, var(--primary) 12%, var(--surface)); }
.me-label { font-weight: 750; color: var(--primary-strong); padding-left: 2px; }
.cell-btn { width: calc(100% - 8px); height: 38px; margin: 4px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; display: grid; place-items: center; transition: background 0.12s, border-color 0.12s, transform 0.05s; }
.cell-btn:active { transform: scale(0.95); }
.cell-btn.v-y { background: var(--yes); border-color: var(--yes); }
.cell-btn.v-y .mark.y { color: #fff; }
.cell-btn.v-m { background: var(--maybe-soft); border-color: var(--maybe); }
.vote-table tfoot td, .vote-table tfoot th { border-bottom: 0; padding: 10px 4px; font-size: 1.05rem; }
.vote-table tfoot td.best { background: var(--best-soft); border-radius: 0 0 12px 12px; }
.vote-table tfoot td.best .icon { color: var(--gold); margin-left: 2px; vertical-align: -2px; }
.vote-table tfoot small { color: var(--maybe-text); font-weight: 600; }

/* options as a list (phones) */
.opt-list { display: flex; flex-direction: column; gap: 10px; }
.opt-card { border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: var(--surface); }
.opt-card.best { border-color: var(--best-line); background: var(--best-soft); }
.opt-card.busy { background: var(--warn-soft); }
.opt-card-main { display: flex; gap: 12px; align-items: flex-start; }
.opt-card-text { flex: 1; min-width: 0; }
.opt-card-counts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.opt-thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; }
.cnt { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 0.9rem; }
.cnt.y { color: var(--yes); } .cnt.m { color: var(--maybe); } .cnt.n { color: var(--text-3); } .cnt.full { color: var(--danger); }
.who { margin-top: 6px; font-size: 0.85rem; color: var(--text-2); }
.who summary { cursor: pointer; color: var(--text-3); }
.ynm { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.ynm-btn { min-height: 44px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.ynm-btn.y.on { background: var(--yes); border-color: var(--yes); color: #fff; }
.ynm-btn.m.on { background: var(--maybe-soft); border-color: var(--maybe); color: var(--maybe-text); }
.ynm-btn.n.on { background: var(--surface-3); border-color: var(--surface-3); }

.answer-form { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--border); }
.identity-fields { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .identity-fields { grid-template-columns: 1fr 1fr; } }
.mine-bar { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.mine-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: var(--primary-soft); }
.mine-row > span { flex: 1; min-width: 12rem; font-weight: 550; }
.decline { display: block; margin-top: 4px; color: var(--text-3); }

/* multiple choice */
.choices { display: flex; flex-direction: column; gap: 10px; }
.choices.with-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
.choice { position: relative; display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; width: 100%; }
.choice:hover:not(:disabled) { border-color: var(--primary-line); }
.choice:disabled { cursor: default; opacity: 1; }
.choice.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary); }
.choice.best { border-color: var(--best-line); }
.choice img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.choice-row { display: flex; align-items: center; gap: 10px; }
.choice-label { flex: 1; font-weight: 600; display: flex; flex-direction: column; }
.choice-label small { font-weight: 400; color: var(--text-3); }
.choice-num { font-weight: 800; font-variant-numeric: tabular-nums; }
.choice-num small { color: var(--text-3); font-weight: 500; }
.choice .voters { color: var(--text-3); }
.choice.other input { margin-top: 2px; }
.choice small.full { color: var(--danger); font-weight: 700; }
.tick { width: 22px; height: 22px; flex: none; border: 2px solid var(--text-3); display: grid; place-items: center; color: var(--on-primary); }
.tick.radio { border-radius: 50%; }
.tick.box { border-radius: 6px; }
.choice.on .tick { background: var(--primary); border-color: var(--primary); }
.others { margin-top: 10px; }
.others summary { cursor: pointer; color: var(--text-2); }

/* sign-up sheet */
.slots { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.slot { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); }
.slot.on { border-color: var(--primary); background: var(--primary-soft); }
.slot.full:not(.on) { background: var(--surface-2); }
.slot-main { flex: 1; min-width: 0; }
.places { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.places .bar { flex: 1; max-width: 12rem; }
.places small { color: var(--text-3); white-space: nowrap; }
.slot-names { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.name-chip { font-size: 0.8rem; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.name-chip.waiting { color: var(--text-3); border-style: dashed; }
@media (max-width: 520px) { .slot { flex-wrap: wrap; } .slot > .btn { width: 100%; } }

/* availability grid */
.grid-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-panel { min-width: 0; }
.grid-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.grid-panel-head h3 { margin: 0; }
.grid-panel-head .segmented { margin: 0; }
.grid-table { display: grid; gap: 2px; margin: 10px 0; overflow-x: auto; touch-action: pan-y; user-select: none; }
.grid-table.paint { touch-action: none; }
.gt-col { text-align: center; display: flex; flex-direction: column; font-size: 0.75rem; color: var(--text-3); line-height: 1.15; padding-bottom: 4px; text-transform: capitalize; }
.gt-col strong { font-size: 1rem; color: var(--text); }
.gt-row { font-size: 0.72rem; color: var(--text-3); text-align: right; padding-right: 6px; transform: translateY(-0.55em); white-space: nowrap; }
.gt-cell { height: 22px; background: var(--surface-2); border-radius: 3px; }
.gt-cell.hour { box-shadow: inset 0 1px 0 var(--border); }
.paint .gt-cell { cursor: pointer; }
.gt-cell.on { background: var(--yes); }
.gt-cell.maybe { background: color-mix(in srgb, var(--maybe) 55%, var(--surface)); }
.gt-cell.busy:not(.on):not(.maybe) { background: repeating-linear-gradient(45deg, var(--surface-2) 0 4px, var(--maybe-soft) 4px 8px); }
.gt-cell.heat { background: color-mix(in srgb, var(--yes) calc(var(--heat) * 100%), var(--surface-2)); cursor: pointer; }
.gt-cell.focus { outline: 2px solid var(--text); outline-offset: 1px; }
.gt-cell.none { background: transparent; }
.heat-legend { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--text-3); }
.heat-scale { flex: 1; max-width: 160px; height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--surface-2), var(--yes)); }
.who-box { margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--surface-2); font-size: 0.9rem; display: flex; flex-direction: column; gap: 4px; }
.best-times { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.best-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.best-head .field { margin: 0; min-width: 8rem; }
.best-list { padding-left: 1.4rem; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.best-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.best-list small { flex-basis: 100%; }
@media (max-width: 900px) { .grid-panels { grid-template-columns: 1fr; } }

/* ranking */
.sortable { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sortable li { display: flex; align-items: center; gap: 8px; padding: 8px 6px 8px 4px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); touch-action: pan-y; }
.sortable li.dragging { border-color: var(--primary); box-shadow: var(--shadow-lg); background: var(--primary-soft); z-index: 2; }
.grip { cursor: grab; color: var(--text-3); padding: 6px 2px; touch-action: none; display: grid; }
.rank-no { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; font-size: 0.85rem; flex: none; }
li:first-child > .rank-no, .winner .rank-no { background: var(--primary); color: var(--on-primary); }
.rank-item { flex: 1; display: flex; gap: 10px; align-items: center; min-width: 0; font-weight: 600; }
.rank-item .opt-thumb { width: 44px; height: 44px; }
.rank-item > span { flex: 1; display: flex; flex-direction: column; }
.rank-item small { font-weight: 400; color: var(--text-3); }
.rank-item.beyond { opacity: 0.45; }
.rank-move { display: flex; }
.unranked { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0; }
.unranked h4 { margin: 0 6px 0 0; color: var(--text-3); }
.results-head { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; }
.results-head h3 { margin: 0; }
.results-head small { color: var(--text-3); }
.result-list { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-direction: column; gap: 10px; }
.result-list li { display: flex; align-items: center; gap: 10px; }
.result-list .opt-thumb { width: 44px; height: 44px; }
.rl-main { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rl-main small { color: var(--text-3); }
.result-list .winner .icon { color: var(--gold); }
.dist { display: flex; align-items: flex-end; gap: 2px; height: 34px; }
.dist span { width: 10px; background: color-mix(in srgb, var(--primary) 55%, var(--surface-2)); border-radius: 2px 2px 0 0; }
.rounds { margin: 12px 0; }
.rounds summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.small-table { border-collapse: collapse; font-size: 0.875rem; }
.small-table th, .small-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); text-align: center; white-space: nowrap; }
.small-table th:first-child { text-align: left; }
.small-table td.win { background: var(--yes-soft); font-weight: 700; }
.small-table td.out { color: var(--text-3); text-decoration: line-through; }
.pairwise td.out { text-decoration: none; background: var(--no-soft); }
.small-table td.self { color: var(--text-3); }

/* rating */
.score-list { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 8px; }
.score-list li { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.score-list .opt-thumb { width: 48px; height: 48px; }
.score-label { flex: 1 1 10rem; display: flex; flex-direction: column; }
.score-label small { color: var(--text-3); }
.stars, .faces, .numbers { display: inline-flex; gap: 2px; flex-wrap: wrap; }
.stars button { border: 0; background: none; padding: 4px; color: var(--surface-3); cursor: pointer; }
.stars button.on { color: #f59e0b; }
.stars button.on svg { fill: #f59e0b; }
.faces button { font-size: 1.6rem; border: 2px solid transparent; background: none; border-radius: 12px; padding: 2px 4px; cursor: pointer; filter: grayscale(1); opacity: 0.6; }
.faces button.on { filter: none; opacity: 1; border-color: var(--primary); }
.numbers button { min-width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface); font-weight: 700; cursor: pointer; }
.numbers button.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.score-slider { display: inline-flex; align-items: center; gap: 10px; flex: 1 1 12rem; }
.score-slider input { flex: 1; accent-color: var(--primary); min-height: 0; }
.score-slider output { font-weight: 800; min-width: 2.5rem; text-align: center; }
.points { display: inline-flex; align-items: center; gap: 4px; }
.points input { width: 5rem; text-align: center; }
.budget { position: sticky; top: 64px; z-index: 3; background: var(--surface); padding: 10px 0; display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.budget.over strong { color: var(--danger); }

/* booking */
.day-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.day-tab { flex: none; display: flex; flex-direction: column; align-items: center; padding: 8px 12px; min-width: 4.2rem; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; line-height: 1.2; }
.day-tab small { color: var(--text-3); text-transform: capitalize; }
.day-tab strong { font-size: 1.3rem; }
.day-tab.on { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.day-tab.on small { color: inherit; opacity: 0.85; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: 8px; margin: 6px 0 4px; }
.slot-btn { min-height: 44px; border-radius: 12px; border: 1.5px solid var(--primary-line); background: var(--surface); color: var(--primary-strong); font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.slot-btn small { font-weight: 500; color: var(--text-3); }
.slot-btn.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.slot-btn:hover:not(.on) { background: var(--primary-soft); }
.booked-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--yes-soft); margin-bottom: 10px; }
.booked-card > .icon { color: var(--yes); }
.bookings { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
.booking-day ul { list-style: none; padding: 0; margin: 0 0 12px; }
.booking-day li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.booking-day li > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 10rem; }
.when { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 7.5rem; }

/* open answers */
.open-answer { margin-bottom: 10px; font-size: 1.05rem; }
.cloud { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: center; padding: 18px; border-radius: var(--radius); background: var(--surface-2); margin: 10px 0; line-height: 1.1; }
.cloud span { font-weight: 750; color: hsl(var(--hue) 55% 40%); }
:root[data-theme="dark"] .cloud span { color: hsl(var(--hue) 65% 70%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cloud span { color: hsl(var(--hue) 65% 70%); } }
.answers { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.answers li { padding: 10px 14px; border-radius: 12px; background: var(--surface-2); }
.answers p { margin: 0; white-space: pre-wrap; }

/* comments */
.comments { margin-top: 8px; }
.comments h2 small { color: var(--text-3); font-weight: 500; }
.comment-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 12px; }
.comment-list li { display: flex; gap: 10px; }
.comment-body { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 4px 14px 14px 14px; padding: 8px 12px; }
.by-organizer .comment-body { border-color: var(--primary-line); }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.comment-meta small { color: var(--text-3); }
.comment-meta .icon-btn { margin-left: auto; width: 30px; height: 30px; }
.comment-body p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-form { display: grid; gap: 8px; grid-template-columns: 1fr; }
.comment-form .btn { justify-self: end; }

/* organizer */
.decide-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 4px; max-height: 40vh; overflow-y: auto; }
.decide-list label { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.decide-list label:hover { background: var(--surface-2); }
.decide-list input { width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.decide-list span { flex: 1; }
.invite-summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0 8px; }
.invite-list { list-style: none; padding: 0; margin: 0; }
.invite-list li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.inv-who { flex: 1; min-width: 10rem; display: flex; flex-direction: column; }
.inv-who small { color: var(--text-3); }
.inv-actions { display: flex; gap: 4px; }
.export-list { display: flex; flex-direction: column; gap: 8px; }
.export-list .btn { justify-content: flex-start; }
.activity { list-style: none; padding: 0; margin: 0; }
.activity li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }

/* my polls, account */
.list-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 12px 0; }
.list-tools .segmented { margin: 0; }
.search { max-width: 260px; border-radius: 999px !important; }
.my-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.my-list li { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; flex-wrap: wrap; }
.my-list li.gone { opacity: 0.6; }
.my-main { flex: 1 1 16rem; display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--text); min-width: 0; }
.my-text { display: flex; flex-direction: column; min-width: 0; }
.my-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-text small { color: var(--text-3); }
.my-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.key-list { list-style: none; padding: 0; margin: 0 0 12px; }
.key-list li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.key-list small { flex: 1; }
.join { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.pin-input { font-size: 2rem !important; text-align: center; letter-spacing: 0.25em; max-width: 14rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.cal-import { display: flex; flex-direction: column; gap: 12px; }
.cal-import .or { text-align: center; color: var(--text-3); }
.features-page .feature-groups { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); }
.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.checks li { display: flex; gap: 8px; align-items: flex-start; }
.checks .icon { color: var(--yes); margin-top: 4px; }
.docs ul { padding-left: 1.2rem; }
.docs li { margin-bottom: 6px; }

/* live presentation */
.present { min-height: 100vh; background: radial-gradient(1200px 600px at 0% 0%, #13296b, transparent 60%), #070d1f; color: #e6ecf8; padding: 20px clamp(16px, 4vw, 48px); --surface: #0f1830; --surface-2: #1a2748; --border: #22325a; --text: #e6ecf8; --text-2: #a8b5d1; --text-3: #7d8bb0; --primary: var(--poll, #5b86ff); --on-primary: #fff; }
.present-top { display: flex; gap: 8px; align-items: center; }
.present-top .btn-ghost { color: #aab4c2; }
.present-back { color: #aab4c2; text-decoration: none; display: inline-flex; align-items: center; margin-right: auto; }
.present-body { display: grid; gap: 32px; margin-top: 20px; align-items: start; }
@media (min-width: 1000px) { .present-body { grid-template-columns: 320px 1fr; } }
.present-join { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; background: #0f1830; border: 1px solid #22325a; border-radius: 24px; padding: 24px; }
.present-url { font-size: 1.15rem; font-weight: 700; word-break: break-all; margin: 0; }
.present-pin { color: #aab4c2; display: flex; flex-direction: column; margin: 0; }
.present-pin strong { font-size: 2.8rem; letter-spacing: 0.08em; color: #fff; font-variant-numeric: tabular-nums; }
.present-main h1 { font-size: clamp(2rem, 4.5vw, 3.6rem); color: #fff; }
.present-count { display: flex; gap: 8px; align-items: center; font-size: 1.2rem; color: #aab4c2; }
.present-bars { list-style: none; padding: 0; margin: 20px 0; display: flex; flex-direction: column; gap: 14px; }
.present-bars li { display: grid; grid-template-columns: minmax(8rem, 1.3fr) 2fr auto; gap: 14px; align-items: center; font-size: clamp(1rem, 2vw, 1.4rem); }
.present-bars img { display: none; }
.present-bars .bar { height: 26px; }
.present-bars .best .pb-label { font-weight: 800; color: #fff; }
.pb-num { font-weight: 800; font-variant-numeric: tabular-nums; }
.pb-num small { color: #8592a3; font-weight: 500; }
.present .cloud { background: #0f1830; font-size: 1.4rem; }

/* embedded in another page */
.embed-root { background: var(--surface); }
.embed { padding: 16px; }
.embed-foot { text-align: right; font-size: 0.85rem; margin-top: 12px; }

/* printing: the poll and its results, without the app around them */
@media print {
  .topbar, .footer, .poll-side, .answer-form, .mine-bar, .comment-form, .vote-tools, .cal-row, .add-option-row, .welcome, .toasts, .submit-bar, .tz-pick { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .poll-layout { display: block; }
  .table-wrap { overflow: visible; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* phones: compact cards in one column, the hero without its picture */
@media (max-width: 600px) {
  .type-grid, .type-grid.compact { gap: 8px; }
  .type-card { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 12px 14px; }
  .type-card .type-icon { grid-row: span 2; width: 40px; height: 40px; }
  .type-card strong { margin-top: 0; font-size: 1rem; }
  .hero { padding: 26px 18px; gap: 16px; border-radius: 20px; }
  .hero-art { display: none; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions > .btn { width: 100%; }
  .pin-form input { flex: 1; width: auto; }
  .home-section { margin: 28px 0; }
  .highlight { padding: 16px; }
}
.rank-results, .score-results, .open-results { margin-top: 18px; border-top: 1px solid var(--border); }
.rank-item .link.small { font-size: 0.8rem; color: var(--text-3); text-decoration: none; padding: 4px 8px; border-radius: 999px; }
.rank-item .link.small:hover { background: var(--surface-2); color: var(--text); }
.answer-form:first-child, div:first-child > .answer-form:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.day-strip::-webkit-scrollbar { height: 6px; }
.day-strip::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 999px; }
.manage-grid .btn { white-space: normal; line-height: 1.15; text-align: left; padding: 6px 10px; }
.opt-when-text { color: var(--text-3); padding-left: 4px; }
.rank-item .leave-out { width: 30px; height: 30px; color: var(--text-3); }
@media (max-width: 520px) { .rank-move .icon-btn { width: 32px; height: 36px; } .sortable li { gap: 4px; } }
