:root {
  color-scheme: light;
  --ink: #252c24;
  --muted: #5c695e;
  --line: #d8e1d5;
  --paper: #fff;
  --tint: #edf4e9;
  --soft: #f6f8f4;
  --strong: #225740;
  --strong-hover: #183f2e;
  --warn: #8f332b;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: #f2f5ee;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
body::before { content: ''; display: block; height: 5px; background: #2a6046; }
a { color: var(--strong); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid #418064; outline-offset: 2px; }
h1, h2, p, ul, ol { margin: 0; }
h1 { font-size: clamp(1.65rem, 5vw, 2.55rem); line-height: 1.2; letter-spacing: -.03em; overflow-wrap: anywhere; }
h2 { font-size: 1.16rem; line-height: 1.35; }
.shell { width: min(100% - 30px, 700px); margin: clamp(24px, 6vw, 62px) auto; }
.compact { max-width: 470px; }
.member-shell { max-width: 600px; margin-top: clamp(15px, 5vw, 48px); }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 9px 32px #193a2613; }
.hero { display: grid; gap: 13px; padding: clamp(20px, 5vw, 32px); background: var(--tint); border-radius: 16px 16px 0 0; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--strong); font-size: .91rem; font-weight: 650; }
.brand > span:first-child { width: 15px; height: 15px; border: 2px solid currentColor; border-radius: 4px 4px 4px 1px; }
.dot { color: var(--muted); }
.meta, .row, .footer-actions, .ballot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 12px; }
.meta { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.row { justify-content: space-between; }
.row > div p { margin-top: 4px; }
.phase { display: inline-flex; align-items: center; gap: 6px; background: var(--paper); border: 1px solid var(--line); padding: 2px 9px; border-radius: 22px; font-size: .86rem; color: var(--muted); white-space: nowrap; }
.phase::before { background: currentColor; content: ''; width: 6px; height: 6px; border-radius: 50%; }
.phase.open { color: var(--strong); font-weight: 650; }
.paragraph { color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.content { padding: clamp(17px, 5vw, 30px); }
.stack { display: grid; gap: 15px; }
.center { display: grid; justify-items: center; text-align: center; gap: 9px; padding-block: 36px; }
.center .button { margin-top: 7px; }
.device-offer { display: grid; justify-items: center; gap: 6px; }
.device-qr { display: block; width: 184px; height: 184px; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: white; }
#device-code strong { color: var(--ink); letter-spacing: .08em; }
.receipt-mark { display: grid; place-items: center; height: 44px; width: 44px; margin-bottom: 4px; background: var(--tint); color: var(--strong); border-radius: 50%; font-size: 1.35rem; font-weight: 700; }
.muted { color: var(--muted); font-size: .9rem; }
.link { border: 0; background: transparent; color: var(--strong); padding: 3px 0; text-decoration: underline; text-underline-offset: 3px; }
.back { display: inline-block; margin-bottom: 10px; font-size: .9rem; text-underline-offset: 3px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 8px 15px; border: 1px solid transparent; border-radius: 9px; text-decoration: none; text-align: center; font-weight: 650; }
.primary { background: var(--strong); color: white; }
.primary:hover:not(:disabled) { background: var(--strong-hover); }
.primary:disabled { background: var(--tint); color: var(--muted); border-color: var(--line); }
.secondary { background: var(--paper); border-color: var(--line); color: var(--ink); }
.secondary:hover:not(:disabled) { background: var(--soft); }
.secondary:disabled { color: var(--muted); opacity: .7; }
.field { display: grid; gap: 5px; min-width: 0; font-weight: 650; }
.field .muted { font-weight: 400; }
.field input:not([type=checkbox]), .field textarea, .share-row input { background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; width: 100%; min-width: 0; font-weight: 400; min-height: 44px; }
.field input[type=file] { padding: 7px; }
.field input::file-selector-button { border: 1px solid var(--line); border-radius: 6px; background: var(--soft); font: inherit; color: var(--ink); padding: 2px 9px; margin-inline-end: 9px; }
.field textarea { resize: vertical; }
fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
legend { margin-bottom: 7px; font-weight: 650; }
.time-grid, .candidate-grid, .names { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.notice { background: var(--tint); color: var(--strong); border-radius: 8px; padding: 9px 12px; font-size: .92rem; }
.notice.error { background: #fbefec; color: var(--warn); }
.confirm .notice { color: var(--ink); }
.confirm .notice strong { color: var(--warn); }
.upload { padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); }
.event-list, .names { padding: 0; list-style: none; }
.event-list li + li { margin-top: 8px; }
.event-item { display: flex; align-items: center; justify-content: space-between; gap: 9px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; overflow-wrap: anywhere; }
.event-item:hover { background: var(--soft); }
.event-item .muted { display: block; }
.names li { padding: 6px 10px; color: var(--ink); background: var(--soft); border: 1px solid var(--line); border-radius: 7px; overflow-wrap: anywhere; }
.names li span { display: block; }
.empty { color: var(--muted); padding: 14px 0; }
.share-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.footer-actions { justify-content: flex-end; }
.candidate { display: flex; align-items: center; gap: 10px; min-height: 48px; border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; cursor: pointer; overflow-wrap: anywhere; }
.candidate:hover { background: var(--soft); }
.candidate:has(input:checked) { background: var(--tint); border-color: var(--strong); }
.candidate:has(input:disabled) { color: var(--muted); background: var(--soft); cursor: default; }
input[type=checkbox] { width: 19px; height: 19px; margin: 0; flex-shrink: 0; accent-color: var(--strong); }
.candidate small, .results-table small { display: block; color: var(--muted); font-size: .84rem; }
.ballot-actions { position: sticky; bottom: 0; z-index: 1; justify-content: space-between; padding: 11px clamp(17px, 5vw, 30px) max(11px, env(safe-area-inset-bottom)); background: var(--soft); border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; }
.ballot-actions strong, [data-count] { color: var(--strong); font-variant-numeric: tabular-nums; }
.member-account { display: flex; justify-content: center; margin-top: 14px; }
.results-table, .excel-preview { border-collapse: collapse; width: 100%; }
.results-table th, .results-table td, .excel-preview th, .excel-preview td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; overflow-wrap: anywhere; }
.results-table th, .excel-preview th { background: var(--soft); color: var(--muted); }
.results-table :is(th, td):nth-child(n+2) { width: 18%; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.select-person { display: inline-grid; min-width: 44px; min-height: 37px; place-items: center; cursor: pointer; }
dialog { width: min(calc(100% - 34px), 395px); border: 1px solid var(--line); border-radius: 13px; padding: 18px; color: var(--ink); background: var(--paper); }
dialog::backdrop { background: #14261cc0; }
dialog .excel-preview { margin: 12px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 410px) {
  .shell { width: calc(100% - 18px); }
  .time-grid { grid-template-columns: 1fr; }
  .candidate { padding-inline: 8px; gap: 7px; }
  .share-row { grid-template-columns: 1fr; }
}
