/* =========================================================
   合议 · 共识投票
   A warm, editorial interface for a small consensus poll.
   ========================================================= */

:root {
  --bg: #f2eee5;
  --paper: #fffdf8;
  --paper-2: #faf6ed;
  --paper-3: #f6f0e5;
  --ink: #1f1e1a;
  --ink-2: #4d493f;
  --muted: #7c7569;
  --muted-2: #a59c8d;
  --line: #ded5c5;
  --line-strong: #c9bca8;
  --accent: #d84b2a;
  --accent-dark: #b2381b;
  --accent-soft: #f8e2d9;
  --teal: #1e6a5a;
  --teal-dark: #124c40;
  --teal-soft: #e3f0eb;
  --amber: #a56f1c;
  --amber-soft: #f7ecd5;
  --red: #bd4030;
  --red-soft: #f8e4df;
  --gray-soft: #eee8dd;
  --shadow-sm: 0 8px 26px rgba(55, 43, 26, 0.055);
  --shadow: 0 30px 90px rgba(55, 43, 26, 0.11);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius: 18px;
  --radius-sm: 13px;
  --serif: "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif;
  --sans: "Inter", "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", "Consolas", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 4% -6%, #f9ded1 0%, rgba(249, 222, 209, 0) 55%),
    radial-gradient(900px 560px at 104% 2%, #e1eee7 0%, rgba(225, 238, 231, 0) 50%),
    linear-gradient(180deg, #f5f1e8 0%, var(--bg) 52%, #eee8dc 100%);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  background-image: radial-gradient(rgba(60, 48, 31, 0.11) 0.65px, transparent 0.7px);
  background-size: 18px 18px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}

body.modal-open {
  overflow: hidden;
}

::selection {
  background: var(--accent);
  color: #fff;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.2;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

input {
  min-width: 0;
}

svg {
  display: block;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.muted {
  color: var(--muted);
}

.page-glow {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(4px);
}

.page-glow--one {
  top: 8vh;
  left: -180px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(216, 75, 42, 0.09), transparent 68%);
}

.page-glow--two {
  right: -210px;
  bottom: 2vh;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(30, 106, 90, 0.09), transparent 68%);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(245, 241, 232, 0.94) 0%, rgba(245, 241, 232, 0.78) 80%, rgba(245, 241, 232, 0) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  width: min(1180px, calc(100% - 48px));
  height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-align: left;
}

.brand-mark {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 7px 18px rgba(184, 56, 27, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.brand:hover .brand-mark {
  transform: rotate(-4deg) scale(1.03);
  box-shadow: 0 10px 24px rgba(184, 56, 27, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.brand-mark svg {
  width: 39px;
  height: 39px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 5px;
}

.brand-text strong {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.brand-text small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(201, 188, 168, 0.66);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.66);
  box-shadow: 0 5px 20px rgba(55, 43, 26, 0.035);
}

.nav-tab {
  height: 38px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-tab .icon {
  width: 16px;
  height: 16px;
}

.nav-tab:hover {
  color: var(--ink);
  background: rgba(255, 253, 248, 0.8);
}

.nav-tab.is-active {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 4px 12px rgba(31, 30, 26, 0.2);
}

.nav-tab:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.nav-tab:disabled:hover {
  color: var(--muted);
  background: transparent;
}

.nav-tab.is-active:disabled:hover {
  color: #fff;
  background: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201, 188, 168, 0.63);
  border-radius: 50%;
  color: var(--ink-2);
  background: rgba(255, 253, 248, 0.64);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.icon-button:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--paper);
  transform: translateY(-1px);
}

.icon-button--accent {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.icon-button--accent:hover {
  color: #fff;
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

/* ---------- Shared type and buttons ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.17em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(216, 75, 42, 0.12);
}

.button {
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.button .icon {
  width: 17px;
  height: 17px;
  transition: transform 180ms ease;
}

.button:hover:not(:disabled) .icon {
  transform: translateX(2px);
}

.button:active:not(:disabled) {
  transform: translateY(1px);
}

.button--primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(184, 56, 27, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.17);
}

.button--primary:hover:not(:disabled) {
  background: var(--accent-dark);
  box-shadow: 0 13px 28px rgba(184, 56, 27, 0.27), inset 0 1px 0 rgba(255, 255, 255, 0.17);
}

.button--primary:disabled {
  color: rgba(255, 255, 255, 0.56);
  background: #c9b9aa;
  box-shadow: none;
}

.button--dark {
  color: #fff;
  background: var(--ink);
}

.button--dark:hover:not(:disabled) {
  background: #000;
}

.button--ghost {
  min-height: 40px;
  color: var(--ink-2);
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.6);
}

.button--ghost:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--paper);
}

.button--ghost:disabled {
  opacity: 0.42;
}

.button--soft {
  color: var(--teal-dark);
  border-color: rgba(30, 106, 90, 0.2);
  background: var(--teal-soft);
}

.button--soft:hover:not(:disabled) {
  color: #fff;
  border-color: var(--teal);
  background: var(--teal);
}

.button--warn {
  color: #6d4610;
  border-color: rgba(165, 111, 28, 0.25);
  background: var(--amber-soft);
}

.button--warn:hover:not(:disabled) {
  color: #fff;
  border-color: var(--amber);
  background: var(--amber);
}

.button--danger {
  color: var(--red);
  border-color: rgba(189, 64, 48, 0.22);
  background: var(--red-soft);
}

.button--danger:hover:not(:disabled) {
  color: #fff;
  border-color: var(--red);
  background: var(--red);
}

.button--wide {
  width: 100%;
  min-height: 54px;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 15px;
}

.button.is-loading {
  pointer-events: none;
}

.button.is-loading span {
  opacity: 0.62;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: color 180ms ease;
}

.text-button .icon {
  width: 15px;
  height: 15px;
}

.text-button:hover {
  color: var(--ink);
}

.spinner {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(31, 30, 26, 0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

:focus-visible {
  outline: 3px solid rgba(216, 75, 42, 0.35);
  outline-offset: 3px;
}

/* ---------- Main / screens ---------- */

.page-main {
  flex: 1;
  width: 100%;
}

.screen:not([hidden]) {
  animation: screen-in 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.loading-card,
.error-card {
  width: min(540px, calc(100% - 40px));
  margin: 15vh auto 0;
  padding: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
  text-align: center;
}

.loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.loading-card .eyebrow {
  margin-top: 6px;
}

.loading-card h1,
.error-card h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.loading-card .spinner {
  margin-bottom: 4px;
}

.error-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.error-card .button {
  margin-top: 8px;
}

/* ---------- Setup ---------- */

.setup-layout {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 92px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(460px, 1.08fr);
  gap: clamp(36px, 6vw, 94px);
  align-items: start;
}

.hero {
  position: sticky;
  top: 116px;
  padding-top: 18px;
}

.hero h1 {
  margin: 20px 0 24px;
  font-family: var(--serif);
  font-size: clamp(46px, 5.4vw, 76px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.hero h1 em {
  position: relative;
  display: inline-block;
  color: var(--accent);
  font-style: normal;
  letter-spacing: -0.03em;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  left: 2px;
  right: -5px;
  bottom: -6px;
  height: 9px;
  border-radius: 50%;
  border-top: 2px solid rgba(216, 75, 42, 0.42);
  transform: rotate(-1.5deg);
}

.lede {
  max-width: 490px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.95;
}

.hero-facts {
  max-width: 500px;
  margin-top: 44px;
  padding-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  border-top: 1px solid var(--line);
}

.fact {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.fact strong {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.fact span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.55;
}

.rule-note {
  max-width: 470px;
  margin-top: 36px;
  padding: 18px 20px;
  border: 1px solid rgba(201, 188, 168, 0.58);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.46);
}

.rule-note-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--teal);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rule-note-head .icon {
  width: 15px;
  height: 15px;
}

.rule-note p {
  margin-top: 9px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.75;
}

.rule-note p b {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 14px;
}

.rule-note p span {
  color: var(--muted);
}

.hero-signature {
  max-width: 470px;
  margin-top: 25px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.hero-signature i {
  width: 34px;
  height: 1px;
  background: var(--line-strong);
}

.setup-card {
  position: relative;
  padding: clamp(22px, 3.2vw, 36px);
  border: 1px solid rgba(201, 188, 168, 0.7);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 248, 0.91);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.setup-card::before {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 58px;
  height: 58px;
  border-top: 1px solid rgba(201, 188, 168, 0.58);
  border-right: 1px solid rgba(201, 188, 168, 0.58);
  border-radius: 0 14px 0 0;
  pointer-events: none;
}

.setup-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.setup-card-head h2 {
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 29px;
  letter-spacing: -0.035em;
}

.host-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid rgba(30, 106, 90, 0.18);
  border-radius: 999px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.host-badge .icon {
  width: 13px;
  height: 13px;
}

.field {
  display: block;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.field-hint {
  display: block;
  margin-top: 7px;
  color: var(--muted-2);
  font-size: 11px;
}

.section-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.text-input {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: #fbf8f1;
  font-size: 15px;
  transition: border-color 170ms ease, box-shadow 170ms ease, background 170ms ease;
}

.text-input::placeholder {
  color: #aea493;
}

.text-input:hover {
  border-color: var(--line-strong);
}

.text-input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fffdf8;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.text-input--compact {
  height: 43px;
  padding: 0 13px;
  font-size: 14px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 26px 0 10px;
}

.section-head .field-label {
  margin-bottom: 0;
}

.count-chip {
  display: inline-flex;
  align-items: center;
  height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--paper-3);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.option-editor {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.option-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 6px 7px 6px 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbf8f1;
  transition: border-color 170ms ease, box-shadow 170ms ease, background 170ms ease;
}

.option-row:focus-within {
  border-color: rgba(216, 75, 42, 0.55);
  background: #fffdf8;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.option-index {
  width: 31px;
  flex: 0 0 auto;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  text-align: center;
}

.option-name {
  flex: 1;
  height: 34px;
  padding: 0 2px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.option-name::placeholder {
  color: #b3aa9c;
  font-weight: 400;
}

.row-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0.5;
  transition: opacity 170ms ease;
}

.option-row:hover .row-tools,
.option-row:focus-within .row-tools {
  opacity: 1;
}

.row-tool {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  transition: color 160ms ease, background 160ms ease;
}

.row-tool .icon {
  width: 14px;
  height: 14px;
}

.row-tool:hover {
  color: var(--ink);
  background: var(--paper-3);
}

.row-tool--remove:hover {
  color: var(--red);
  background: var(--red-soft);
}

.row-tool:disabled {
  opacity: 0.28;
}

.add-option {
  width: 100%;
  height: 44px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  transition: color 170ms ease, border-color 170ms ease, background 170ms ease;
}

.add-option .icon {
  width: 15px;
  height: 15px;
}

.add-option:hover {
  color: var(--accent);
  border-color: rgba(216, 75, 42, 0.5);
  background: rgba(248, 226, 217, 0.36);
}

.roster-head {
  margin-top: 21px;
}

.roster-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbf8f1;
}

.roster-input {
  display: block;
  width: 100%;
  min-height: 94px;
  padding: 11px 12px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.75;
  transition: border-color 170ms ease, box-shadow 170ms ease;
}

.roster-input::placeholder {
  color: #b3aa9c;
}

.roster-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.roster-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.roster-tools .text-button {
  flex: 0 0 auto;
  color: var(--teal);
  font-size: 10px;
}

.roster-tools .text-button:hover {
  color: var(--teal-dark);
}

.roster-tools > span {
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.55;
  text-align: right;
}

.roster-hint {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.6;
}

.roster-hint .icon {
  width: 11px;
  height: 11px;
  margin-top: 1px;
}

.code-field {
  display: block;
  margin-top: 10px;
}

.code-field .field-label {
  margin-bottom: 4px;
}

.voted-lock {
  margin: 6px 0 20px;
  padding: 34px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(30, 106, 90, 0.2);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(227, 240, 235, 0.7), rgba(255, 253, 248, 0.9));
  text-align: center;
}

.voted-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  border-radius: 50%;
  color: #fff;
  background: var(--teal);
  box-shadow: 0 10px 26px rgba(30, 106, 90, 0.2);
}

.voted-mark .icon {
  width: 24px;
  height: 24px;
  stroke-width: 2.3;
}

.voted-lock .eyebrow {
  color: var(--teal);
}

.voted-lock h2 {
  font-family: var(--serif);
  font-size: 29px;
  letter-spacing: -0.035em;
}

.voted-lock p:not(.eyebrow) {
  max-width: 380px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.voted-lock .button {
  margin-top: 8px;
  min-width: 190px;
}

.voter-roster-box {
  margin-top: 14px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-2);
}

.voter-roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.voter-roster-head strong {
  color: var(--ink-2);
  font-size: 11px;
}

.voter-roster-head span {
  color: var(--muted-2);
  font-size: 9px;
}

.voter-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 150px;
  overflow-y: auto;
  padding-right: 3px;
}

.voter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 7px;
  border-radius: 7px;
  background: rgba(255, 253, 248, 0.75);
  color: var(--ink-2);
  font-size: 10px;
}

.voter-row code {
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
}

.voter-roster-box .button {
  width: 100%;
  min-height: 33px;
  margin-top: 8px;
  border-radius: 8px;
  font-size: 9px;
}

.config-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: start;
}

.config-card {
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbf8f1;
}

.config-card > .config-copy {
  min-width: 0;
}

.config-card .field-label {
  margin-bottom: 1px;
}

.config-card .section-sub {
  font-size: 10px;
  line-height: 1.45;
}

.config-card--details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
  cursor: pointer;
}

.config-card--details summary::-webkit-details-marker {
  display: none;
}

.summary-chevron {
  width: 15px;
  height: 15px;
  color: var(--muted);
  transition: transform 180ms ease;
}

.config-card--details[open] .summary-chevron {
  transform: rotate(180deg);
}

.weight-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.weight-fields label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.weight-input {
  display: flex;
  align-items: center;
  height: 35px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
}

.weight-input b {
  width: 25px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  text-align: center;
}

.weight-input input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.weight-fields p {
  grid-column: 1 / -1;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.6;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
}

.stepper-button {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-2);
  background: var(--paper);
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.stepper-button .icon {
  width: 13px;
  height: 13px;
}

.stepper-button:hover:not(:disabled) {
  color: #fff;
  border-color: var(--ink);
  background: var(--ink);
}

.stepper-button:disabled {
  opacity: 0.35;
}

.stepper output {
  min-width: 24px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.stepper-unit {
  margin-left: -3px;
  color: var(--muted);
  font-size: 10px;
}

.formula-strip {
  margin: 13px 0 17px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-left: 2px solid var(--accent);
  border-radius: 0 9px 9px 0;
  background: rgba(248, 226, 217, 0.38);
  color: var(--muted);
  font-size: 10px;
}

.formula-strip span:first-child {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 700;
}

.formula-strip strong {
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
}

.formula-strip span:last-child {
  margin-left: auto;
  color: var(--muted);
  white-space: nowrap;
}

.privacy-line {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted-2);
  font-size: 10px;
  text-align: center;
}

.privacy-line .icon {
  width: 12px;
  height: 12px;
}

/* ---------- Ballot ---------- */

.ballot-wrap {
  width: min(780px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 148px;
}

.round-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 30px;
}

.round-pill {
  display: inline-flex;
  align-items: center;
  height: 29px;
  padding: 0 12px;
  border: 1px solid rgba(216, 75, 42, 0.18);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(248, 226, 217, 0.45);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.round-pill--runoff {
  color: var(--amber);
  border-color: rgba(165, 111, 28, 0.2);
  background: var(--amber-soft);
}

.ballot-header {
  margin-bottom: 24px;
}

.ballot-header h1 {
  margin: 12px 0 12px;
  font-family: var(--serif);
  font-size: clamp(34px, 5.3vw, 54px);
  font-weight: 700;
  line-height: 1.13;
  letter-spacing: -0.045em;
}

.ballot-desc {
  max-width: 600px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.runoff-notice {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin: 0 0 18px;
  padding: 16px 18px;
  border: 1px solid rgba(165, 111, 28, 0.2);
  border-radius: var(--radius);
  background: rgba(247, 236, 213, 0.7);
}

.runoff-notice strong {
  display: block;
  color: #6d4610;
  font-size: 13px;
}

.runoff-notice p {
  margin-top: 3px;
  color: #8f6b2f;
  font-size: 11px;
  line-height: 1.6;
}

.round-icon {
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--teal);
  background: var(--teal-soft);
}

.round-icon .icon {
  width: 17px;
  height: 17px;
}

.round-icon--warn {
  color: var(--amber);
  background: rgba(165, 111, 28, 0.12);
}

.identity-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 18px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.75);
  box-shadow: var(--shadow-sm);
}

.identity-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--accent);
  background: var(--accent-soft);
}

.identity-icon .icon {
  width: 20px;
  height: 20px;
}

.identity-body {
  min-width: 0;
}

.identity-body .field-label {
  margin-bottom: 4px;
}

.identity-hint {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.5;
}

.identity-error {
  margin-top: 5px;
  color: var(--red);
  font-size: 11px;
  font-weight: 600;
}

.one-vote-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  padding: 6px 8px;
  border-radius: 999px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.one-vote-badge .icon {
  width: 11px;
  height: 11px;
}

.ballot-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.runoff-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.runoff-group + .runoff-group {
  margin-top: 8px;
}

.runoff-group-label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 3px 2px 0;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.runoff-group-label::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(165, 111, 28, 0.19);
}

.runoff-group-label span {
  color: var(--muted-2);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
}

.vote-card {
  padding: 17px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.86);
  box-shadow: 0 5px 18px rgba(55, 43, 26, 0.028);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.vote-card.is-answered {
  border-color: rgba(30, 106, 90, 0.25);
  background: #fffdf8;
  box-shadow: 0 8px 26px rgba(30, 106, 90, 0.055);
}

.vote-card-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
}

.vote-index {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--muted);
  background: var(--paper-3);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
}

.vote-card.is-answered .vote-index {
  color: var(--teal);
  background: var(--teal-soft);
}

.vote-card h3 {
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.vote-tag {
  margin-left: auto;
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--amber);
  background: var(--amber-soft);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.choice-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.choice-button {
  min-height: 47px;
  padding: 7px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: #faf6ee;
  font-size: 12px;
  font-weight: 700;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.choice-button .icon {
  width: 15px;
  height: 15px;
}

.choice-button:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  background: #fffdf8;
}

.choice-button:active {
  transform: scale(0.985);
}

.choice-button[aria-pressed="true"] {
  color: #fff;
  box-shadow: 0 6px 15px rgba(35, 31, 25, 0.13);
}

.choice-button[data-choice="yes"][aria-pressed="true"] {
  border-color: var(--teal);
  background: var(--teal);
}

.choice-button[data-choice="abstain"][aria-pressed="true"] {
  border-color: #5b554a;
  background: #5b554a;
}

.choice-button[data-choice="no"][aria-pressed="true"] {
  border-color: var(--red);
  background: var(--red);
}

.choice-button[data-choice="yes"]:hover:not([aria-pressed="true"]) {
  color: var(--teal);
  border-color: rgba(30, 106, 90, 0.32);
  background: var(--teal-soft);
}

.choice-button[data-choice="abstain"]:hover:not([aria-pressed="true"]) {
  color: #5b554a;
  border-color: rgba(91, 85, 74, 0.28);
  background: var(--gray-soft);
}

.choice-button[data-choice="no"]:hover:not([aria-pressed="true"]) {
  color: var(--red);
  border-color: rgba(189, 64, 48, 0.25);
  background: var(--red-soft);
}

.sticky-submit {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 60;
  width: min(720px, calc(100% - 28px));
  min-height: 72px;
  padding: 11px 11px 11px 20px;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 21px;
  background: rgba(29, 28, 24, 0.95);
  box-shadow: 0 20px 55px rgba(30, 25, 17, 0.27);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translateX(-50%);
}

.submit-progress {
  min-width: 0;
}

.submit-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  font-weight: 600;
}

.submit-progress-top strong {
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.progress-track {
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.13);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e46d50, #f2a086);
  transition: width 240ms ease;
}

.submit-button {
  min-width: 188px;
  min-height: 49px;
  justify-content: space-between;
  border-radius: 14px;
  font-size: 13px;
}

.ballot-footnote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 17px;
  color: var(--muted-2);
  font-size: 10px;
}

/* ---------- Results ---------- */

.results-wrap {
  width: min(1020px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 92px;
}

.waiting-wrap {
  width: min(620px, calc(100% - 40px));
  margin: 0 auto;
  padding: 10vh 0 80px;
}

.waiting-card {
  padding: 44px 38px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
  text-align: center;
}

.waiting-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 20px;
  color: var(--amber);
  background: var(--amber-soft);
}

.waiting-icon .icon {
  width: 28px;
  height: 28px;
}

.waiting-card .eyebrow {
  justify-content: center;
  color: var(--amber);
}

.waiting-card h1 {
  margin: 10px 0 12px;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 48px);
  letter-spacing: -0.045em;
}

.waiting-text {
  max-width: 420px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.waiting-status {
  margin: 22px 0 6px;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  color: var(--ink-2);
  background: var(--paper-2);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.7;
}

.waiting-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.waiting-actions .button {
  min-width: 150px;
}

.waiting-note {
  margin-top: 18px;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.6;
}

@media (max-width: 520px) {
  .waiting-wrap {
    width: calc(100% - 30px);
    padding-top: 5vh;
  }

  .waiting-card {
    padding: 34px 20px 26px;
    border-radius: 24px;
  }

  .waiting-actions {
    flex-direction: column;
  }

  .waiting-actions .button {
    width: 100%;
  }
}

.results-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.results-header h1 {
  margin: 10px 0 9px;
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.results-sub {
  color: var(--muted);
  font-size: 13px;
}

.results-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 3px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.stat-card {
  padding: 15px 17px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.66);
}

.stat-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.45;
}

.stat-label span {
  display: block;
  color: var(--muted-2);
  font-size: 9px;
}

.stat-value {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.stat-value small {
  margin-left: 2px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
}

.status-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 18px;
  padding: 20px 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.86);
  box-shadow: var(--shadow-sm);
}

.status-banner::after {
  content: "";
  position: absolute;
  right: -35px;
  top: -55px;
  width: 160px;
  height: 160px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.08;
  pointer-events: none;
}

.status-banner.is-live {
  border-color: rgba(30, 106, 90, 0.18);
  background: linear-gradient(120deg, rgba(227, 240, 235, 0.7), rgba(255, 253, 248, 0.9));
}

.status-banner.is-tie {
  border-color: rgba(165, 111, 28, 0.26);
  background: linear-gradient(120deg, rgba(247, 236, 213, 0.9), rgba(255, 253, 248, 0.92));
}

.status-banner.is-final {
  color: #fff;
  border-color: transparent;
  background:
    radial-gradient(380px 190px at 95% 0%, rgba(216, 75, 42, 0.36), transparent 70%),
    linear-gradient(135deg, #1e3a32 0%, #17241f 62%, #141a17 100%);
  box-shadow: 0 24px 60px rgba(21, 40, 33, 0.2);
}

.status-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--teal);
  background: var(--teal-soft);
}

.status-banner.is-tie .status-icon {
  color: var(--amber);
  background: rgba(165, 111, 28, 0.12);
}

.status-banner.is-final .status-icon {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.status-icon .icon {
  width: 20px;
  height: 20px;
}

.status-body {
  min-width: 0;
  flex: 1;
}

.status-body h2 {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.025em;
}

.status-banner.is-final .status-body h2 {
  color: #fff;
}

.status-body p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.status-banner.is-final .status-body p {
  color: rgba(255, 255, 255, 0.64);
}

.status-banner.is-final .button--ghost {
  color: rgba(255, 255, 255, 0.86);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.status-banner.is-final .button--ghost:hover:not(:disabled) {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.14);
}

.status-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  flex: 0 0 auto;
  padding-top: 3px;
}

.finalist-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}

.finalist-chip {
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 600;
}

.tie-list-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  margin-top: 9px;
  font-size: 11px;
  color: #7b5a20;
}

.tie-list-inline b {
  color: #5d400e;
}

.ranking-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow-sm);
}

.ranking-card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px 18px;
}

.ranking-card-head h2 {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 27px;
  letter-spacing: -0.035em;
}

.rule-chip {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.ranking-columns {
  display: grid;
  grid-template-columns: 67px minmax(0, 1fr) 100px;
  gap: 14px;
  padding: 9px 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted-2);
  background: rgba(246, 240, 229, 0.5);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.ranking-columns span:last-child {
  text-align: right;
}

.rank-row {
  position: relative;
  display: grid;
  grid-template-columns: 67px minmax(0, 1fr) 100px;
  gap: 14px;
  align-items: center;
  padding: 18px 26px;
  border-bottom: 1px solid var(--line);
  transition: background 170ms ease;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row:hover {
  background: rgba(250, 246, 237, 0.58);
}

.rank-row.is-top {
  background: linear-gradient(90deg, rgba(248, 236, 213, 0.42), rgba(255, 253, 248, 0) 48%);
}

.rank-row.is-top::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
}

.rank-row.is-final-top::before {
  background: var(--teal);
}

.rank-row.is-tie {
  background: linear-gradient(90deg, rgba(247, 236, 213, 0.62), rgba(255, 253, 248, 0) 55%);
}

.rank-row.is-pending::before {
  background: var(--amber);
}

.rank-index {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.rank-number {
  color: var(--muted-2);
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.rank-row.is-top .rank-number {
  color: var(--accent);
}

.rank-row.is-final-top .rank-number {
  color: var(--teal);
}

.rank-row.is-tie .rank-number {
  color: var(--amber);
}

.rank-tie {
  color: var(--amber);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.rank-main {
  min-width: 0;
}

.rank-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.rank-title h3 {
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.badge .icon {
  width: 10px;
  height: 10px;
}

.badge--selected {
  color: var(--teal);
  background: var(--teal-soft);
}

.badge--pending {
  color: #74500f;
  background: var(--amber-soft);
}

.badge--runoff {
  color: var(--muted);
  background: var(--paper-3);
}

.badge--draw {
  color: var(--red);
  background: var(--red-soft);
}

.vote-bar {
  display: flex;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--paper-3);
}

.vote-bar span {
  display: block;
  height: 100%;
  transition: width 400ms ease;
}

.vote-bar .bar-yes {
  background: var(--teal);
}

.vote-bar .bar-abstain {
  background: #c7b99f;
}

.vote-bar .bar-no {
  background: var(--accent);
}

.vote-bar.is-empty {
  background: var(--paper-3);
}

.vote-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 13px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.vote-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.vote-legend i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.legend-yes {
  background: var(--teal);
}

.legend-abstain {
  background: #c7b99f;
}

.legend-no {
  background: var(--accent);
}

.rank-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  text-align: right;
}

.rank-score strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.rank-score span {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 600;
}

.rank-score .score-runoff {
  margin-top: 3px;
  padding: 2px 5px;
  border-radius: 4px;
  color: #7a571b;
  background: var(--amber-soft);
  font-family: var(--mono);
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.rank-row.is-top .rank-score strong {
  color: var(--accent);
}

.rank-row.is-final-top .rank-score strong {
  color: var(--teal);
}

.empty-ranking {
  padding: 46px 26px;
  text-align: center;
}

.empty-ranking .round-icon {
  margin: 0 auto 12px;
}

.empty-ranking h3 {
  font-family: var(--serif);
  font-size: 23px;
}

.empty-ranking p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.tie-panel {
  margin-top: 16px;
}

.tie-card {
  padding: 21px 23px;
  border: 1px solid rgba(165, 111, 28, 0.26);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(247, 236, 213, 0.78), rgba(255, 253, 248, 0.88));
}

.tie-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.tie-card-head h2 {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.025em;
}

.tie-card-head p {
  margin-top: 3px;
  color: #8b6b31;
  font-size: 11px;
}

.tie-groups {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 15px;
}

.tie-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 9px 11px;
  border: 1px solid rgba(165, 111, 28, 0.15);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.6);
  font-size: 11px;
}

.tie-group-label {
  color: #7d5a1e;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
}

.tie-option {
  padding: 2px 6px;
  border-radius: 5px;
  color: var(--ink-2);
  background: var(--paper-3);
  font-weight: 600;
}

.tie-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.tie-note {
  color: var(--muted);
  font-size: 10px;
}

.host-panel {
  margin-top: 16px;
  padding: 22px 23px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.7);
}

.host-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.host-panel-head h2 {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -0.03em;
}

.host-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 17px;
}

.host-meta {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 10px;
}

.rounds-card {
  margin-top: 16px;
  padding: 22px 23px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.62);
}

.rounds-card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.rounds-card-head h2 {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -0.03em;
}

.rounds-card-head .muted {
  font-size: 10px;
}

.round-timeline {
  display: flex;
  gap: 8px;
  margin-top: 15px;
  overflow-x: auto;
  padding-bottom: 3px;
  scrollbar-width: thin;
}

.round-card {
  min-width: 155px;
  flex: 1;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(250, 246, 237, 0.72);
}

.round-card.is-latest {
  border-color: rgba(216, 75, 42, 0.3);
  background: rgba(248, 226, 217, 0.32);
}

.round-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.round-card-name {
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
}

.round-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.round-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted-2);
}

.round-status.is-open {
  color: var(--teal);
}

.round-status.is-open::before {
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(30, 106, 90, 0.12);
  animation: soft-pulse 2s ease infinite;
}

.round-card-meta {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.round-card-meta b {
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 10px;
}

.results-footnote {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 18px;
  padding: 0 3px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.7;
}

.results-footnote .icon {
  width: 12px;
  height: 12px;
  margin-top: 2px;
}

/* ---------- Footer ---------- */

.site-footer {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 22px 0 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.07em;
  border-top: 1px solid rgba(201, 188, 168, 0.42);
}

.site-footer i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

/* ---------- Modals ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(25, 22, 17, 0.52);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  animation: fade-in 180ms ease both;
}

.modal {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 25px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: 0 36px 110px rgba(20, 16, 10, 0.3);
  animation: modal-in 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
  scrollbar-width: thin;
}

.modal--wide {
  width: min(540px, 100%);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: var(--paper);
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.modal-close:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--paper-2);
}

.modal-close .icon {
  width: 14px;
  height: 14px;
}

.modal-eyebrow {
  margin-bottom: 8px;
}

.modal h2 {
  padding-right: 25px;
  font-family: var(--serif);
  font-size: 29px;
  letter-spacing: -0.04em;
}

.modal-desc {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 22px;
}

.modal-actions .button {
  min-width: 94px;
}

.share-link-row {
  display: flex;
  align-items: stretch;
  gap: 7px;
  margin-top: 16px;
}

.share-link-row input {
  flex: 1;
  height: 43px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 10px;
}

.share-link-row .button {
  min-height: 43px;
  border-radius: 10px;
}

.share-tip {
  margin-top: 11px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--muted);
  background: var(--paper-2);
  font-size: 10px;
  line-height: 1.65;
}

.host-key-box {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-2);
}

.host-key-box span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.host-key-box code {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.55;
}

.host-key-actions {
  display: flex;
  gap: 7px;
  margin-top: 8px;
}

.host-key-actions .button {
  min-height: 31px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 9px;
}

.admin-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.admin-section h3 {
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 700;
}

.admin-section p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.admin-section .button {
  margin-top: 9px;
}

.host-login {
  display: flex;
  gap: 7px;
  margin-top: 9px;
}

.host-login input {
  flex: 1;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 10px;
}

.host-login .button {
  margin-top: 0;
  min-height: 38px;
  border-radius: 9px;
}

/* ---------- Success receipt ---------- */

.success-modal {
  text-align: center;
  padding-top: 33px;
}

.success-mark {
  position: relative;
  width: 74px;
  height: 74px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--teal);
  box-shadow: 0 14px 32px rgba(30, 106, 90, 0.23);
}

.success-mark::before,
.success-mark::after {
  content: "";
  position: absolute;
  inset: -9px;
  border: 1px solid rgba(30, 106, 90, 0.22);
  border-radius: 50%;
}

.success-mark::after {
  inset: -18px;
  border-color: rgba(30, 106, 90, 0.1);
}

.success-mark .icon {
  width: 31px;
  height: 31px;
  stroke-width: 2.3;
}

.success-modal h2 {
  padding-right: 0;
  font-size: 33px;
}

.success-modal .modal-desc {
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.receipt {
  margin: 19px 0 6px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  background: var(--paper-2);
  font-size: 10px;
}

.receipt strong {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 18px;
}

.success-actions .button {
  width: 100%;
  min-height: 47px;
}

/* ---------- Toast ---------- */

.toast-root {
  position: fixed;
  left: 50%;
  bottom: 112px;
  z-index: 200;
  width: min(390px, calc(100% - 32px));
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
  transform: translateX(-50%);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 11px;
  color: #fff;
  background: rgba(31, 30, 26, 0.94);
  box-shadow: 0 12px 36px rgba(31, 30, 26, 0.2);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.55;
  pointer-events: auto;
  animation: toast-in 230ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.toast .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

.toast.is-error {
  background: rgba(151, 47, 34, 0.96);
}

.toast.is-success {
  background: rgba(21, 91, 77, 0.97);
}

.toast.is-warn {
  background: rgba(125, 82, 17, 0.97);
}

.toast.is-leaving {
  animation: toast-out 180ms ease both;
}

/* ---------- Confetti ---------- */

#confettiCanvas {
  position: fixed;
  inset: 0;
  z-index: 110;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .setup-layout {
    grid-template-columns: 1fr;
    gap: 38px;
    max-width: 720px;
    padding-top: 18px;
  }

  .hero {
    position: static;
    padding-top: 10px;
  }

  .hero h1 {
    font-size: clamp(48px, 8vw, 68px);
  }

  .hero-facts {
    margin-top: 30px;
  }

  .rule-note {
    margin-top: 28px;
  }

  .hero-signature {
    display: none;
  }
}

@media (max-width: 760px) {
  .header-inner {
    width: calc(100% - 30px);
    height: 72px;
    gap: 10px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .brand-mark svg {
    width: 34px;
    height: 34px;
  }

  .brand-text strong {
    font-size: 19px;
  }

  .brand-text small {
    font-size: 8px;
  }

  .nav-tab {
    height: 35px;
    padding: 0 12px;
    gap: 6px;
    font-size: 11px;
  }

  .nav-tab .icon {
    width: 14px;
    height: 14px;
  }

  .icon-button {
    width: 38px;
    height: 38px;
  }

  .icon-button .icon {
    width: 16px;
    height: 16px;
  }

  .setup-layout,
  .results-wrap {
    width: calc(100% - 30px);
  }

  .setup-layout {
    padding-bottom: 68px;
  }

  .ballot-wrap {
    width: calc(100% - 30px);
    padding-top: 18px;
  }

  .hero h1 {
    margin-top: 16px;
    font-size: clamp(43px, 12vw, 62px);
  }

  .lede {
    font-size: 14px;
  }

  .setup-card {
    border-radius: 24px;
  }

  .results-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .results-header-actions {
    padding-bottom: 0;
  }

  .ranking-card {
    border-radius: 24px;
  }

  .ranking-columns {
    grid-template-columns: 48px minmax(0, 1fr) 77px;
    gap: 10px;
    padding: 8px 18px;
  }

  .rank-row {
    grid-template-columns: 48px minmax(0, 1fr) 77px;
    gap: 10px;
    padding: 16px 18px;
  }

  .rank-number {
    font-size: 27px;
  }

  .rank-score strong {
    font-size: 25px;
  }

  .status-banner {
    padding: 17px;
  }

  .status-actions {
    margin-left: 0;
    padding-top: 0;
    width: 100%;
  }

  .status-actions .button {
    flex: 1;
  }

  .status-banner {
    flex-wrap: wrap;
  }

  .status-body {
    flex-basis: calc(100% - 60px);
  }

  .host-panel,
  .rounds-card {
    border-radius: 20px;
    padding: 19px;
  }

  .site-footer {
    width: calc(100% - 30px);
  }
}

@media (max-width: 620px) {
  .brand-text small {
    display: none;
  }

  .header-actions {
    gap: 5px;
  }

  .invite-button {
    display: none !important;
  }

  .hero-facts {
    gap: 10px;
  }

  .fact {
    gap: 7px;
  }

  .fact strong {
    font-size: 23px;
  }

  .fact span {
    font-size: 10px;
  }

  .config-grid {
    grid-template-columns: 1fr;
  }

  .roster-tools {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .roster-tools > span {
    text-align: left;
  }

  .config-card--details[open] {
    grid-row: auto;
  }

  .stepper {
    margin-top: 8px;
  }

  .ballot-header h1 {
    font-size: clamp(32px, 10vw, 45px);
  }

  .identity-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
  }

  .identity-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .one-vote-badge {
    grid-column: 2;
    justify-self: start;
    margin-top: 0;
  }

  .vote-card {
    padding: 14px;
    border-radius: 18px;
  }

  .vote-card-head {
    gap: 9px;
    margin-bottom: 10px;
  }

  .vote-card h3 {
    font-size: 15px;
  }

  .vote-index {
    width: 28px;
    height: 28px;
  }

  .choice-button {
    min-height: 44px;
    gap: 5px;
    font-size: 11px;
  }

  .choice-button .icon {
    width: 13px;
    height: 13px;
  }

  .sticky-submit {
    grid-template-columns: 1fr auto;
    gap: 9px;
    width: calc(100% - 20px);
    min-height: 67px;
    padding: 9px 9px 9px 14px;
    border-radius: 18px;
    bottom: max(10px, env(safe-area-inset-bottom));
  }

  .submit-button {
    min-width: 152px;
    min-height: 47px;
    padding: 0 13px;
    font-size: 12px;
  }

  .ballot-footnote {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .stat-grid {
    gap: 7px;
  }

  .stat-card {
    padding: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
  }

  .stat-value {
    font-size: 27px;
  }

  .stat-label {
    font-size: 9px;
  }

  .stat-label span {
    display: none;
  }

  .results-header h1 {
    font-size: clamp(35px, 11vw, 47px);
  }

  .results-header-actions .button {
    flex: 1;
    min-height: 39px;
    padding: 0 12px;
    font-size: 11px;
  }

  .ranking-card-head {
    padding: 19px 17px 15px;
  }

  .ranking-card-head h2 {
    font-size: 23px;
  }

  .ranking-columns {
    grid-template-columns: 42px minmax(0, 1fr) 66px;
    gap: 8px;
    padding: 7px 14px;
  }

  .rank-row {
    grid-template-columns: 42px minmax(0, 1fr) 66px;
    gap: 8px;
    padding: 14px;
  }

  .rank-number {
    font-size: 24px;
  }

  .rank-title {
    gap: 5px;
    margin-bottom: 6px;
  }

  .rank-title h3 {
    font-size: 14px;
  }

  .badge {
    font-size: 7px;
    padding: 2px 5px;
  }

  .vote-legend {
    gap: 3px 8px;
    font-size: 8px;
  }

  .rank-score strong {
    font-size: 22px;
  }

  .rank-score span {
    font-size: 7px;
  }

  .status-body h2 {
    font-size: 19px;
  }

  .status-body p {
    font-size: 11px;
  }

  .status-banner.is-final {
    padding: 18px;
  }

  .tie-card {
    padding: 17px;
  }

  .rounds-card {
    overflow: hidden;
  }

  .round-timeline {
    margin-right: -19px;
    padding-right: 19px;
  }

  .site-footer {
    flex-wrap: wrap;
    gap: 7px;
    padding-bottom: 22px;
  }

  .toast-root {
    bottom: 94px;
  }

  .modal {
    padding: 21px;
    border-radius: 24px;
  }

  .modal h2 {
    font-size: 25px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .button {
    width: 100%;
  }

  .host-login {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .brand-text {
    display: none;
  }

  .nav-tab span {
    display: none;
  }

  .nav-tab {
    width: 41px;
    justify-content: center;
    padding: 0;
  }

  .main-nav {
    margin-left: auto;
  }

  .hero h1 {
    font-size: 42px;
  }

  .formula-strip {
    flex-wrap: wrap;
    gap: 4px 8px;
  }

  .formula-strip span:last-child {
    width: 100%;
    margin-left: 0;
  }

  .setup-card {
    padding: 18px;
  }

  .setup-card-head {
    margin-bottom: 22px;
  }

  .setup-card-head h2 {
    font-size: 25px;
  }

  .host-badge {
    padding: 6px 8px;
  }

  .row-tool[data-action="up"],
  .row-tool[data-action="down"] {
    display: none;
  }

  .sticky-submit {
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: 0;
    padding: 12px;
  }

  .submit-progress {
    padding: 1px 2px 0;
  }

  .submit-button {
    width: 100%;
  }

  .ballot-wrap {
    padding-bottom: 168px;
  }

  .results-header-actions {
    width: 100%;
  }

  .status-icon {
    width: 36px;
    height: 36px;
  }

  .status-body {
    flex-basis: calc(100% - 51px);
  }

  .finalist-chip {
    font-size: 10px;
  }

  .tie-card-actions .button {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Keyframes ---------- */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(5px) scale(0.98);
  }
}

@keyframes soft-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(30, 106, 90, 0.1);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(30, 106, 90, 0.03);
  }
}
