@font-face {
  font-family: "QiaoQiaoHandmadeVote";
  src: url("./assets/qiao-handmade-title.woff") format("woff");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  unicode-range: U+0050,U+0063,U+0069,U+006B,U+4E3B,U+53A8,U+5E72,U+60A8,U+7684,U+996D;
}
:root {
  --brand-red: #b5162b;
  --brand-red-deep: #901125;
  --brand-red-soft: #f8e9e9;
  --brand-navy: #151c2b;
  --brand-gold: #f2b567;
  --page-paper: #f6f2ea;
  --surface: #fffdf8;
  --surface-inset: #eee9e1;
  --ink: #252a33;
  --ink-secondary: #565953;
  --ink-muted: #686b66;
  --line: #d5d3cb;
  --line-soft: #e6e2da;
  --focus: #315a91;
  --radius: 8px;
  --form-air: 0px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px;
  --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; background: var(--brand-navy); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100svh; color: var(--ink); background: var(--brand-navy); font: 16px/1.5 "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input { font: inherit; }
button, a, .rating-option { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--brand-red-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 30; top: 8px; left: -10000px; padding: 12px 16px; color: var(--surface); background: var(--brand-navy); }
.skip-link:focus { left: 8px; }
.vote-backdrop { position: fixed; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; background: var(--brand-navy); }
.vote-shell { position: relative; z-index: 1; display: flex; flex-direction: column; width: min(calc(100% - 24px),480px); min-height: 100vh; min-height: 100svh; min-height: 100dvh; margin-inline: auto; background: transparent; }
.vote-header { position: relative; isolation: isolate; display: grid; flex: 0 0 auto; grid-template-columns: 60px minmax(0,1fr); gap: 3px 12px; align-items: center; min-height: 0; padding: max(18px,env(safe-area-inset-top)) 4px 18px; color: var(--surface); background: transparent; }
.vote-header::after { content: ""; position: absolute; z-index: -1; top: 0; left: 0; width: 100%; height: 3px; background: var(--brand-red); }
.brand-row { grid-column: 1; grid-row: 1 / span 2; }
.brand-word { display: block; flex: 0 0 auto; }
.brand-wordmark { display: block; width: 60px; max-width: 100%; height: auto; object-fit: contain; }
.header-tag { display: none; }
.header-tag span { display: block; color: #f1d3ab; font-size: 12px; letter-spacing: .1em; }
.hero-copy { position: relative; grid-column: 2; margin: 0; max-width: 100%; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #d9dde4; font-size: 11px; letter-spacing: .12em; }
.hero-eyebrow::before { content: ""; width: 16px; height: 2px; background: var(--brand-red); }
h1 { max-width: 100%; margin: 0; font-size: 22px; font-weight: 750; line-height: 1.3; letter-spacing: -.02em; overflow-wrap: anywhere; }
#pageTitle { font-family: "QiaoQiaoHandmadeVote", "PingFang SC", "Microsoft YaHei", sans-serif; font-weight: 900; font-synthesis: none; }
.hero-title-prefix { display: inline; margin-right: 4px; color: #f6f2ea; font-size: 17px; font-weight: 900; letter-spacing: 0; }
.hero-title-main { display: inline; font-size: 28px; line-height: 1.3; letter-spacing: .01em; }
.hero-title-word { display: inline-block; white-space: nowrap; }
.daily-rule { grid-column: 2; display: flex; align-items: center; gap: 4px; width: fit-content; max-width: 100%; margin: 0; color: #d8dde4; font-size: 11px; line-height: 1.5; }
.daily-rule svg { flex: 0 0 14px; width: 14px; height: 14px; fill: none; stroke: var(--brand-gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.vote-content { --ink-muted: #50554f; position: relative; z-index: 2; isolation: isolate; display: flex; flex: 1 0 auto; flex-direction: column; min-height: 0; padding: 14px max(16px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)); border-radius: 12px 12px 0 0; background: var(--page-paper); box-shadow: inset 0 1px 0 #fffaf0; }
.vote-content::before { content: ""; position: absolute; z-index: -1; top: 72px; left: 0; width: 100%; aspect-ratio: 960 / 561; pointer-events: none; opacity: .16; background: url("./assets/qiao-chef-background.webp") center / contain no-repeat; }
.page-description { margin: 16px 0 0; color: var(--ink-secondary); font-size: 12px; line-height: 1.6; }
.vote-form { flex: 0 0 auto; margin: 0; padding: 0; }
.vote-followup { flex: 0 0 auto; padding-top: 12px; }
.has-submit-dock .vote-followup { margin-top: auto; }
.question-section { min-inline-size: 0; margin: 0; padding: 0 0 12px; border: 0; }
.section-label { margin-bottom: 10px; }
.section-label h2 { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.5; }
.step-number { display: inline-flex; align-items: center; justify-content: flex-start; flex: 0 0 24px; width: 24px; color: var(--brand-red); font: 600 12px/1.5 "SFMono-Regular", Consolas, monospace; font-variant-numeric: tabular-nums; }
.meal-fields { display: grid; gap: calc(12px + var(--form-air)); }
.field { min-width: 0; }
.field > label { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--ink); font-size: 13px; font-weight: 600; }
.required-mark { color: var(--ink-muted); font-size: 11px; font-weight: 400; }
input[type="text"], input[type="date"] { display: block; width: 100%; min-width: 0; max-width: 100%; height: 48px; padding: 10px 12px; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); outline: none; font-size: 16px; line-height: 1.5; }
input::placeholder { color: var(--ink-muted); font-size: 13px; }
input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--focus); }
input[aria-invalid="true"] { border-color: var(--brand-red); }
.date-field { display: grid; grid-template-columns: 64px minmax(0,1fr); column-gap: 12px; align-items: center; min-width: 0; }
.date-field > .date-label { margin: 0; color: var(--ink); font-size: 13px; font-weight: 600; }
.date-control { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; max-width: 100%; height: 48px; overflow: hidden; border: 0; border-radius: var(--radius); background: rgb(255 253 248 / .65); box-shadow: inset 0 0 0 1px var(--line); }
.date-value { display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; height: 100%; padding: 0 12px; color: var(--ink); font-size: 16px; line-height: 1; white-space: nowrap; }
.date-field .field-help, .date-field .field-error { grid-column: 1 / -1; }
.lookup-field { display: flex; gap: 8px; }
.lookup-field input { flex: 1; width: 0; font-variant-numeric: tabular-nums; }
.lookup-button { flex: 0 0 auto; min-width: 80px; min-height: 48px; padding: 10px; color: var(--surface); border: 1px solid var(--brand-navy); border-radius: var(--radius); background: var(--brand-navy); font-size: 13px; font-weight: 600; transition: background-color .18s; }
.lookup-button:disabled { opacity: .6; }
.field-help { margin: 4px 0 0; color: var(--ink-muted); font-size: 11px; line-height: 1.5; }
.field-error { margin: 8px 0 0; color: var(--brand-red-deep); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.field-error:empty, .lookup-state:empty, .form-message:empty { display: none; }
.lookup-state { margin: 12px 0 0; color: var(--ink-muted); font-size: 13px; }
.chef-confirmation { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px 0 0; border-top: 1px dashed var(--line); }
.chef-portrait { display: grid; flex: 0 0 40px; width: 40px; height: 48px; place-items: center; overflow: hidden; border-radius: 6px; background: var(--surface-inset); }
.chef-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.chef-portrait > span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; color: var(--ink-muted); font-size: 10px; line-height: 1.5; }
.placeholder-title { color: var(--ink); font-size: 12px; font-weight: 600; letter-spacing: .12em; }
.chef-info { min-width: 0; }
.confirmed-label { display: none; }
.chef-info h3 { display: inline; margin: 0; font-size: 15px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.chef-info p { margin: 0; color: var(--ink-secondary); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.chef-info .chef-ticket { margin-top: 0; color: var(--ink-muted); font-size: 11px; }
.chef-ticket strong { margin-left: 5px; color: var(--brand-red-deep); font: 700 13px/1.5 "SFMono-Regular", Consolas, monospace; }
.rating-section { border-top: 1px solid var(--line); padding-top: calc(12px + var(--form-air)); padding-bottom: 12px; }
.rating-section legend { float: left; display: flex; align-items: center; gap: 8px; width: 100%; padding: 0; color: var(--ink); font-size: 15px; font-weight: 650; line-height: 1.4; }
.rating-help { clear: both; margin: 0 0 16px; padding-top: 6px; color: var(--ink-muted); font-size: 13px; }
.rating-options { clear: both; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding-top: 8px; }
.rating-option { position: relative; display: flex; min-width: 0; cursor: pointer; }
.rating-option input { position: absolute; z-index: 1; top: 10px; right: 9px; width: 16px; height: 16px; margin: 0; opacity: 0; }
.rating-content { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 72px; padding: calc(24px + var(--form-air) / 2) 8px calc(8px + var(--form-air) / 2); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: background-color .18s,border-color .18s,color .18s; }
.rating-letter { position: absolute; top: 10px; left: 12px; color: var(--ink-muted); font: 500 11px/1.5 "SFMono-Regular", Consolas, monospace; }
.rating-face { display: none; }
.rating-word { font-size: 16px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.rating-note { color: var(--ink-muted); font-size: 11px; line-height: 1.5; }
.rating-check { position: absolute; top: 10px; right: 9px; width: 16px; height: 16px; border: 1px solid var(--line); border-radius: 50%; background: transparent; }
.rating-option input:checked + .rating-content { color: var(--surface); border-color: var(--brand-red); background: var(--brand-red); }
.rating-option input:checked + .rating-content .rating-letter, .rating-option input:checked + .rating-content .rating-note { color: var(--surface); }
.rating-option input:checked + .rating-content .rating-check { border-color: var(--surface); background: var(--surface); }
.rating-option input:checked + .rating-content .rating-check::after { content: ""; position: absolute; left: 4px; top: 2px; width: 4px; height: 7px; border: solid var(--brand-red); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.rating-option input:focus-visible + .rating-content { outline: 3px solid var(--focus); outline-offset: 3px; }
.rating-option input:disabled + .rating-content { opacity: .6; cursor: default; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 18px; border: 1px solid transparent; border-radius: var(--radius); font-size: 15px; font-weight: 600; line-height: 1.5; text-decoration: none; text-align: center; transition: background-color .18s,border-color .18s; }
.primary-button { color: var(--surface); background: var(--brand-red); }
.primary-button:active { background: var(--brand-red-deep); }
.primary-button:disabled { color: #66665f; background: #e0ded5; border-color: #cfcec5; }
.secondary-button { color: var(--ink); border-color: var(--line); background: var(--surface); }
.secondary-button:active { background: var(--surface-inset); }
.submit-area { margin-top: var(--form-air); padding: 0; }
.submit-dock { position: static; padding: 0; }
.submit-button { display: flex; width: 100%; min-height: 48px; letter-spacing: .05em; }
.submit-note { margin: 8px 0 0; color: var(--ink-muted); font-size: 11px; line-height: 1.5; text-align: center; }
input { scroll-margin-block: 24px; }
.form-message { margin: 0 0 16px; padding: 12px 14px; color: var(--brand-red-deep); border-left: 3px solid var(--brand-red); background: var(--brand-red-soft); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.page-state { margin: 12px 0 0; padding: 12px 0; border-block: 1px solid var(--line); }
.state-copy { min-width: 0; }
.state-eyebrow { color: var(--brand-red-deep); font-size: 12px; font-weight: 600; }
.page-state h2, .result-panel h2 { margin: 6px 0 8px; font-size: 24px; font-weight: 700; line-height: 1.4; }
.state-copy > p, .result-panel > p { margin: 0; color: var(--ink-secondary); font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.state-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.page-state[data-mode="compact"] { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 0; }
.page-state[data-mode="compact"] .state-copy { flex: 1 1 180px; }
.page-state[data-mode="compact"] .state-eyebrow { display: none; }
.page-state[data-mode="compact"] h2 { margin: 0 0 2px; font-size: 15px; }
.page-state[data-mode="compact"] p { font-size: 12px; }
.page-state[data-mode="compact"] .state-actions { flex: 0 0 auto; margin: 0; }
.page-state[data-mode="compact"] .secondary-button { min-height: 44px; padding: 8px 0 8px 8px; border: 0; border-radius: 0; color: var(--brand-red-deep); background: transparent; font-size: 12px; }
.preview-notice { margin: 12px 0 0; padding: 8px 10px; color: var(--ink-secondary); border-left: 2px solid var(--line); background: #efebe3; font-size: 11px; line-height: 1.5; }
.result-panel { padding: 24px 0; border-top: 1px solid var(--line); text-align: center; }
.result-check { display: grid; width: 56px; height: 56px; place-items: center; margin: 0 auto 16px; border-radius: 50%; color: var(--surface); background: var(--brand-red); }
.result-check svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.result-details { display: grid; grid-template-columns: 1fr minmax(0,1.7fr); gap: 12px 16px; margin: 24px 0; padding: 20px 0; border-block: 1px solid var(--line); font-size: 14px; text-align: left; }
.result-details:empty { display: none; }
.result-details dt { color: var(--ink-muted); }
.result-details dd { margin: 0; color: var(--ink); text-align: right; overflow-wrap: anywhere; }
.vote-footer { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 28px; color: var(--ink-muted); font-size: 11px; text-align: center; }
.vote-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-muted); font-size: 10px; text-decoration: none; }
@media (max-width: 359px) {
  .vote-content { padding-inline: max(16px,env(safe-area-inset-left)) max(16px,env(safe-area-inset-right)); }
  .section-label h2 { font-size: 13px; }
  .rating-section legend { font-size: 15px; }
  .rating-content { padding-inline: 6px; }
  .rating-letter { left: 9px; }
  .rating-word { font-size: 16px; }
  .rating-note { font-size: 11px; }
  .lookup-button { min-width: 80px; padding-inline: 9px; }
  .date-field { grid-template-columns: minmax(0,1fr); row-gap: 6px; }
  .date-field .field-help { margin-top: 0; }
}
@media (max-width: 359px), (max-height: 699px) {
  .vote-header { grid-template-columns: 50px minmax(0,1fr); gap: 2px 10px; padding-block: max(12px,env(safe-area-inset-top)) 12px; }
  .brand-wordmark { width: 50px; }
  .hero-title-prefix { font-size: 16px; }
  .hero-title-main { font-size: 24px; }
}
@media (min-width: 600px) {
  .vote-content { padding-top: 24px; }
}
@media (hover: hover) {
  .lookup-button:not(:disabled):hover { background: #26344c; }
  .rating-option:hover .rating-content { border-color: var(--brand-red); }
  .primary-button:not(:disabled):hover { background: var(--brand-red-deep); }
  .secondary-button:hover { color: var(--brand-red-deep); border-color: var(--brand-red); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
