@font-face {
  font-family: Inter;
  font-weight: 100 900;
  font-display: swap;
  src: url('/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: Inter;
  font-weight: 100 900;
  font-display: swap;
  src: url('/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
:root {
  color-scheme: light;
  font: 16px/1.45 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #211a32;
  --muted: #625e71;
  --paper: #f8f7fc;
  --line: #e7e2ee;
  --accent: #6240cd;
  --accent-dark: #4a2cae;
  --mint: #e1f4eb;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; }
h1, h2, p { margin: 0; }
h1, h2 { line-height: 1.12; }
a, button, input, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #8768e5; outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { display: inline-flex; align-items: center; justify-content: center; width: 1em; flex: 0 0 auto; }
.site-header { background: white; border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1160px; min-height: 66px; padding: 0 28px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; gap: 0; align-items: center; text-decoration: none; font-weight: 850; font-size: 24px; }
.brand-mark { width: 35px; height: 35px; margin-right: 9px; display: grid; place-items: center; border-radius: 8px; background: var(--accent); color: white; font-size: 20px; }
.brand-dot { color: #825fea; }
.header-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 650; }
.header-label .icon { color: var(--accent); }
.workspace, .projection { max-width: 1160px; padding: 30px 28px 42px; margin: auto; }
.intro { margin-bottom: 24px; }
.eyebrow { color: var(--accent-dark); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; gap: 7px; }
.intro h1 { font-size: 42px; font-weight: 850; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.panel { background: white; border: 1px solid var(--line); border-radius: 8px; }
.editor { padding: 24px; display: grid; gap: 19px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; margin-bottom: 9px; font-weight: 800; font-size: 17px; }
textarea, input { min-width: 0; }
textarea { display: block; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfaff; resize: vertical; }
::placeholder { color: #706a7d; }
.counter { display: block; margin-top: 4px; text-align: right; color: var(--muted); font-size: 12px; }
.option-list, .preview-options { display: grid; gap: 8px; }
.option-input { display: flex; min-height: 44px; align-items: center; gap: 9px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; }
.choice-badge { width: 29px; height: 29px; flex: 0 0 auto; border-radius: 6px; background: var(--choice); color: white; display: inline-grid; place-items: center; font-weight: 800; font-size: 13px; }
.option-input input { width: 100%; border: 0; background: transparent; padding: 4px 2px; }
.icon-button { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.icon-button:hover { background: var(--paper); color: var(--ink); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 41px; padding: 8px 13px; border: 1px solid transparent; border-radius: 8px; font-size: 14px; font-weight: 750; line-height: 1.25; text-decoration: none; text-align: center; }
.button .icon { font-size: 16px; }
.add-button { margin-top: 7px; padding-left: 0; min-height: 34px; background: transparent; color: var(--accent-dark); }
.add-button:not(:disabled):hover { text-decoration: underline; }
.add-button:disabled { opacity: .48; }
.time-controls, .presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.time-controls { gap: 10px; }
.preset { min-width: 52px; min-height: 39px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 14px; font-weight: 700; }
.preset:hover, .preset[aria-pressed="true"] { background: #eee8ff; color: var(--accent-dark); border-color: #dbcef9; }
.custom-time { display: inline-flex; align-items: center; gap: 5px; min-height: 39px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 14px; font-weight: 700; }
.custom-time .icon { color: var(--muted); }
.custom-time input { width: 49px; padding: 2px 0 2px 3px; border: 0; }
.primary { background: var(--accent); color: white; }
.primary:not(:disabled):hover { background: var(--accent-dark); }
.primary:disabled { opacity: .65; }
.create { justify-content: flex-start; min-height: 48px; padding-inline: 14px; }
.create .icon:last-child { margin-left: auto; }
.error { color: #9c252d; font-weight: 650; font-size: 14px; overflow-wrap: anywhere; }
.preview { min-width: 0; background: var(--mint); border-radius: 8px; padding: 16px 18px 22px; }
.preview-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 750; color: #17473d; font-size: 14px; }
.preview-head > span:first-child { display: flex; align-items: center; gap: 6px; }
.phone { width: min(100%, 260px); min-height: 310px; margin: 16px auto 0; border: 5px solid #25203b; border-radius: 22px; background: #fbfaff; box-shadow: 0 6px 0 #b8dbcb; overflow: hidden; }
.phone-top { display: flex; justify-content: space-between; align-items: center; padding: 8px 13px; border-bottom: 1px solid var(--line); background: white; font-size: 13px; font-weight: 850; }
.signal { width: 7px; height: 7px; background: #148675; border-radius: 50%; }
.phone-content { padding: 15px 11px; text-align: center; }
.phone-icon, .ballot-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; color: var(--accent-dark); background: #ebe4fc; font-size: 19px; }
.phone h2 { font-size: 18px; margin: 10px 0 12px; overflow-wrap: anywhere; }
.preview-options > div { min-width: 0; display: flex; align-items: center; gap: 7px; padding: 5px; background: white; border: 1px solid var(--line); border-radius: 7px; text-align: left; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.preview-options .choice-badge { width: 23px; height: 23px; font-size: 11px; }
.projection { max-width: 1360px; }
.projection-head, .projection-footer { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 10px; }
.tool { background: white; border-color: var(--line); }
.tool:not(:disabled):hover { background: #eee8ff; border-color: #dbcef9; }
.projection h1 { margin: 19px 0; font-size: 46px; font-weight: 850; overflow-wrap: anywhere; }
.stage { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.stage-timer { display: flex; flex-direction: column; min-width: 0; align-items: center; justify-content: center; padding: 24px 12px; text-align: center; background: #262038; color: #fff; }
.timer-label, .live-count, .join-label { display: inline-flex; align-items: center; gap: 7px; font-weight: 750; }
.timer-label, .live-count { color: #e0d9ef; }
.clock { font: 850 112px/1.15 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.progress { width: min(340px, 85%); height: 7px; overflow: hidden; border-radius: 9px; background: #514762; margin: 6px 0 14px; }
.progress span { display: block; height: 100%; width: 100%; border-radius: inherit; background: #ad97ff; transition: width 150ms linear; }
.start { background: #a98fff; color: #201437; margin-top: 12px; }
.start:not(:disabled):hover { background: #c3b1ff; }
.join { min-width: 0; display: grid; justify-items: center; align-content: center; gap: 10px; padding: 18px 12px; background: var(--mint); }
.join img { display: block; width: min(100%, 224px); height: auto; background: white; border-radius: 7px; }
.projection > .error { margin-top: 10px; }
body:has(.finished), :root:fullscreen:has(.finished) { background: #fff; }
:fullscreen body:has(.finished) .site-header,
:fullscreen .finished .projection-footer { display: none; }
.projection.finished { max-width: 1600px; padding: clamp(14px, 2.8svh, 30px) clamp(20px, 4vw, 68px); }
.projection.finished h1 { margin: 9px 0 17px; font-size: 46px; }
.finished .projection-footer { justify-content: flex-end; margin-top: 14px; }
.result-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 18px; margin-bottom: 10px; }
.result-summary h2 { display: flex; align-items: center; gap: 9px; font-size: 28px; color: var(--accent-dark); }
.result-total { font-size: 21px; font-weight: 750; }
.result-chart { margin: 0; padding: 0; list-style: none; display: grid; gap: clamp(5px, 1svh, 12px); }
.result-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(7ch, auto); align-items: center; gap: clamp(8px, 1.5vw, 24px); padding: clamp(5px, 1svh, 13px) clamp(10px, 1.4vw, 22px); border: 2px solid #dedde6; border-radius: 9px; }
.result-row.leading { background: #f1ebff; border-color: #6240cd; }
.result-answer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.result-answer strong { flex: 1 1 0; min-width: 0; font-size: 27px; line-height: 1.12; overflow-wrap: anywhere; }
.result-answer .choice-badge { width: 1.4em; height: 1.4em; font-size: 22px; }
.result-answer .icon { color: var(--accent-dark); font-size: 24px; }
.result-track { height: clamp(14px, 3svh, 35px); border-radius: 6px; background: #d4d2df; overflow: hidden; }
.result-fill { display: block; width: var(--share); height: 100%; border-radius: inherit; background: var(--series); transform-origin: left; animation: stretch 440ms ease-out both; }
.result-numbers { display: grid; justify-items: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.result-numbers strong { font-size: 39px; line-height: 1; font-weight: 850; }
.result-numbers span { font-size: 17px; font-weight: 650; color: #474153; }
@keyframes stretch { from { transform: scaleX(0); } }
.ballot { max-width: 510px; margin: auto; padding: 32px 18px; text-align: center; }
.ballot-icon { width: 52px; height: 52px; font-size: 25px; }
.ballot .eyebrow { display: flex; justify-content: center; margin: 10px 0; }
.ballot h1 { font-size: 32px; font-weight: 850; overflow-wrap: anywhere; margin-bottom: 16px; }
.ballot-clock { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-variant-numeric: tabular-nums; margin-bottom: 12px; }
.ballot-choices { display: grid; gap: 8px; text-align: left; }
.ballot-option { min-height: 54px; width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; text-align: left; background: white; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-weight: 750; overflow-wrap: anywhere; }
.ballot-option:hover:not(:disabled), .ballot-option.chosen { background: var(--mint); border-color: #95c7b5; }
.ballot-option:disabled:not(.chosen) { color: var(--muted); }
.ballot-option .icon { color: #087f77; }
.ballot .error { margin-top: 12px; }
@media (min-width: 1200px) {
  .projection { padding-top: 40px; }
  .projection h1 { font-size: 54px; }
  .stage { min-height: 405px; }
  .join img { width: min(100%, 264px); }
  .clock { font-size: 142px; }
}
@media (min-width: 1400px) and (min-height: 820px) {
  .projection.finished h1 { font-size: 60px; }
  .result-summary h2, .result-answer strong { font-size: 34px; }
  .result-total { font-size: 26px; }
  .result-numbers strong { font-size: 50px; }
  .result-numbers span { font-size: 21px; }
}
@media (max-width: 760px) {
  .header-inner { padding-inline: 16px; min-height: 58px; }
  .workspace, .projection { padding: 22px 14px 28px; }
  .intro h1, .projection h1 { font-size: 32px; }
  .studio-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .editor { padding: 16px; gap: 16px; }
  .stage { grid-template-columns: minmax(0, 1fr); }
  .clock { font-size: 84px; }
  .projection.finished { padding-inline: 14px; }
  .projection.finished h1 { font-size: 32px; }
  .result-summary h2 { font-size: 22px; }
  .result-total { font-size: 17px; }
  .result-row { grid-template-columns: minmax(0, 1fr) auto; }
  .result-track { grid-column: 1 / -1; grid-row: 2; height: 12px; }
  .result-answer strong { font-size: 19px; }
  .result-numbers strong { font-size: 28px; }
  .result-numbers span { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .result-fill { animation: none; }
  .progress span { transition: none; }
}
