:root {
  color-scheme: light;
  --page: #f7f8f6;
  --paper: #ffffff;
  --paper-alt: #f7f8f7;
  --hero-surface: #f0f1ee;
  --ink: #181818;
  --muted: #5c6460;
  --line: #dde2de;
  --yuno-brand-base: #006b5f;
  --yuno-brand-deep: #004c45;
  --yuno-brand: var(--yuno-brand-base);
  --accent: var(--yuno-brand);
  --accent-deep: var(--yuno-brand-deep);
  --accent-soft: #edf3ef;
  --status-ink: var(--accent-deep);
  --status-bg: #e4eee8;
  --shadow: 0 18px 55px rgb(0 0 0 / 5%);
  --on-primary: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', system-ui, sans-serif;
  background: var(--page);
  color: var(--ink);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #202321;
  --paper: #282d2a;
  --paper-alt: #303632;
  --hero-surface: #3c4440;
  --ink: #f5f5f5;
  --muted: #bfc7c2;
  --line: #4a554e;
  --yuno-brand: #82cbbf;
  --accent-deep: #a9e0d5;
  --accent-soft: #28322e;
  --status-bg: #303d36;
  --shadow: 0 18px 55px rgb(0 0 0 / 16%);
  --on-primary: #122620;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #202321;
    --paper: #282d2a;
    --paper-alt: #303632;
    --hero-surface: #3c4440;
    --ink: #f5f5f5;
    --muted: #bfc7c2;
    --line: #4a554e;
    --yuno-brand: #82cbbf;
    --accent-deep: #a9e0d5;
    --accent-soft: #28322e;
    --status-bg: #303d36;
    --shadow: 0 18px 55px rgb(0 0 0 / 16%);
    --on-primary: #122620;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: var(--page); }
:root[data-yuno-host="native_webview"], :root[data-yuno-host="native_webview"] body { overscroll-behavior-y: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .68; }
input { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.shell { width: min(100% - 32px, 1180px); margin-inline: auto; padding: max(80px, calc(env(safe-area-inset-top) + 68px)) 0 max(32px, calc(env(safe-area-inset-bottom) + 24px)); }
:root[data-public-ballot] .shell { padding-top: max(clamp(28px, 4vw, 44px), calc(env(safe-area-inset-top) + 20px)); }
:root[data-yuno-host="web"] body .yuno-mini-return {
  position: absolute !important;
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 8px 24px rgb(0 0 0 / 14%);
}
:root[data-yuno-host="web"] body .yuno-mini-return:focus-visible { outline-color: var(--accent); }
:root[data-yuno-host="native_webview"] .shell { padding-top: max(44px, calc(var(--yuno-safe-area-top, 0px) + 18px)); padding-bottom: max(32px, calc(var(--yuno-safe-area-bottom, 0px) + 16px)); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 28px; }
:root[data-yuno-host="native_webview"] .site-header { padding-right: calc(var(--yuno-safe-area-right, 0px) + 82px); }
.language-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); }
.language-picker select { max-width: 100%; min-height: 40px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; }
:root[data-yuno-host="native_webview"] .language-picker,
:root[data-yuno-host="web"] .header-tag { display: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 800; letter-spacing: -.035em; white-space: nowrap; }
.brand-mark { display: block; flex: none; width: 32px; height: 32px; border-radius: 25%; }
.yuno-wordmark { color: var(--yuno-brand); }
.brand-divider { color: #909090; padding: 0 5px; font-weight: 500; }
.header-tag { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; background: var(--paper); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  min-height: 326px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--hero-surface);
  color: var(--ink);
}
.hero-copy { align-self: center; padding: clamp(24px, 4.6vw, 58px); }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; color: var(--accent-deep); font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.eyebrow-line { flex: none; width: 23px; height: 1px; background: var(--accent); }
.hero h1 { margin: 0; color: var(--yuno-brand); font-size: clamp(32px, 4.45vw, 60px); font-weight: 750; line-height: 1.14; letter-spacing: -.045em; white-space: pre-line; text-wrap: balance; }
.hero h1:lang(zh) { letter-spacing: -.025em; }
.hero-lead { max-width: 540px; margin: 20px 0 0; color: var(--muted); font-size: clamp(14px, 1.5vw, 17px); line-height: 1.65; }
.hero-visual { position: relative; min-width: 0; background: #222; }
.hero-visual img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 53% 50%; filter: brightness(1.23) contrast(.96); }

.results-header h2 { margin: 0; color: var(--yuno-brand); font-size: clamp(23px, 3vw, 32px); font-weight: 750; letter-spacing: -.035em; }
.search-icon { position: absolute; left: 17px; width: 19px; height: 19px; color: var(--muted); }
.search-icon svg { width: 100%; height: 100%; }

.results { margin: 28px 0 0; }
.results-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 0 9px; }
.results-header h2 { font-size: clamp(30px, 4vw, 44px); }
.results-header h2 { overflow-wrap: anywhere; }
.results-subtitle { margin: 9px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.vote-total-stack { display: flex; flex: none; flex-direction: column; align-items: flex-end; padding-bottom: 4px; }
.vote-total { display: flex; align-items: baseline; gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.vote-total strong { color: var(--accent); font-size: 41px; line-height: .9; font-weight: 600; }
.virtual-vote-count { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.25; }
.ranking-note { margin: 26px 0 18px; padding: 13px 17px; border-left: 3px solid var(--accent); border-radius: 0 11px 11px 0; background: var(--accent-soft); color: var(--ink); font-size: 13px; line-height: 1.5; }
.nominate-button[hidden] { display: none; }
.result-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.leaderboard-panel, .candidate-panel { min-width: 0; padding: clamp(19px, 2.5vw, 29px); border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.panel-heading h3 { margin: 0; font-size: 23px; font-weight: 600; letter-spacing: -.03em; }
.status-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 27px; padding: 4px 9px; border-radius: 999px; background: var(--status-bg); color: var(--status-ink); font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-pill.collecting { background: var(--accent-soft); color: var(--accent-deep); }
.rank-list, .candidate-list { display: grid; gap: 10px; }
.rank-card { position: relative; overflow: hidden; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: start; min-height: 99px; padding: 19px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-alt); }
.rank-card.is-first { background: var(--accent-soft); border-color: transparent; }
.rank-number { color: var(--accent); font-size: 29px; line-height: 1; letter-spacing: -.07em; }
.rank-card h4, .candidate-card h4 { overflow-wrap: anywhere; margin: 0; font-size: 15px; line-height: 1.35; }
.rank-card p, .candidate-card p { margin: 5px 0 0; font-size: 12px; line-height: 1.5; }
.rank-card p { color: var(--muted); }
.rank-votes { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; color: var(--accent-deep); font-size: 12px; font-weight: 800; }
.rank-votes::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.rank-empty { display: grid; place-items: center; min-height: 152px; padding: 24px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); text-align: center; }
.rank-empty p { max-width: 245px; margin: 0; font-size: 13px; line-height: 1.6; }
.more-tied { margin: 3px 3px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.candidate-count { color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.panel-intro { margin: -7px 0 17px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.shop-search { position: relative; margin-bottom: 6px; }
.shop-search .search-icon { top: 50%; left: 13px; transform: translateY(-50%); width: 17px; height: 17px; }
.shop-search input { width: 100%; min-height: 44px; padding: 10px 14px 10px 40px; border: 1.5px solid var(--line); border-radius: 12px; outline: 0; background: var(--paper-alt); font-size: 14px; }
.shop-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.shop-search-status { min-height: 18px; margin: 0 0 11px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.candidate-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 92px; padding: 15px; border: 1px solid var(--yuno-brand-base); border-radius: 10px; background: var(--yuno-brand-base); color: #fff; }
.candidate-card.is-my-vote { border-color: #fff; background: var(--yuno-brand-deep); box-shadow: inset 0 0 0 1px #fff; }
.candidate-card .mine { display: inline-block; margin: 6px 0 0 8px; font-size: 11px; font-weight: 900; }
.candidate-votes { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 800; }
.candidate-card .virtual-vote-count { color: rgb(255 255 255 / 80%); font-size: 10px; }
.source-tag { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.vote-button { min-height: 35px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--accent-deep); font-size: 12px; font-weight: 800; white-space: nowrap; }
.vote-button:hover { background: var(--accent); color: var(--on-primary); }
.candidate-card .vote-button { border-color: rgb(255 255 255 / 65%); background: var(--yuno-brand-deep); color: #fff; }
.candidate-card .vote-button:hover { border-color: #fff; background: transparent; }
.candidate-card .vote-button:focus-visible { outline-color: #fff; }
.candidate-empty { padding: 23px 16px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 13px; line-height: 1.6; text-align: center; }
.more-shops-button { display: block; width: 100%; min-height: 39px; margin-top: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-alt); color: var(--accent-deep); font-size: 12px; font-weight: 800; }
.more-shops-button:hover { border-color: var(--accent); }
.places-attribution { margin: 12px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.nominate-button { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 45px; margin-top: 14px; padding: 9px; border: 1.5px dashed var(--line); border-radius: 12px; background: transparent; color: var(--accent-deep); font-size: 13px; font-weight: 800; }
.nominate-button:hover { border-color: var(--accent); background: var(--accent-soft); }
.nominate-button > span:first-child { font-size: 20px; font-weight: 400; line-height: 0; }
.welcome-icon { color: var(--accent); font-size: 28px; }
.yuno-promo { display: none; }
:root[data-public-ballot] .yuno-promo {
  display: block;
  margin-top: clamp(48px, 8vw, 88px);
  padding-top: clamp(24px, 4vw, 40px);
  border-top: 1px solid var(--line);
}
.yuno-promo-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(18px, 3vw, 28px);
}
.yuno-promo-logo { flex: none; border-radius: 25%; }
.yuno-promo-heading h2 {
  margin: 0;
  font-size: clamp(25px, 3.5vw, 38px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.15;
}
.yuno-promo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 20px);
}
.yuno-promo-feature {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}
.yuno-promo-preview {
  display: grid;
  place-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #edf6f3;
}
.yuno-promo-preview img {
  display: block;
  width: min(100%, 160px);
  height: auto;
}
.yuno-promo-copy { padding: clamp(16px, 2vw, 24px); }
.yuno-promo-copy h3 {
  margin: 0 0 6px;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.25;
  letter-spacing: -.02em;
}
.yuno-promo-copy p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.yuno-promo-download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: clamp(12px, 2vw, 20px);
  padding: 12px clamp(16px, 3vw, 26px);
  border: 1px solid var(--yuno-brand-base);
  border-radius: 16px;
  background: var(--yuno-brand-base);
  color: #fff;
}
.yuno-promo-download h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.yuno-promo-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.yuno-promo-badges a { display: inline-grid; align-items: center; min-height: 44px; border-radius: 6px; }
.yuno-promo-badges img { display: block; height: 36px; width: auto; }
.yuno-promo-badges a:focus-visible { outline-color: #82cbbf; }
:root[data-public-ballot] .yuno-promo + .footer { margin-top: 16px; border-top: 0; }

@media (max-width: 680px) {
  .yuno-promo-grid { grid-template-columns: 1fr; }
  .yuno-promo-feature { grid-template-columns: clamp(90px, 29vw, 130px) 1fr; grid-template-rows: auto; }
  .yuno-promo-preview { padding: 6px; border-right: 1px solid var(--line); border-bottom: 0; }
  .yuno-promo-preview img { width: min(100%, 100px); }
  .yuno-promo-copy { align-self: center; }
  .yuno-promo-download { justify-content: center; gap: 4px; text-align: center; }
  .yuno-promo-download h3 { flex-basis: 100%; }
  .yuno-promo-badges { justify-content: center; }
}

.footer a { color: inherit; }
.footer { margin: 45px 0 0; padding: 20px 2px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }

.action-dialog { width: min(calc(100% - 28px), 460px); max-height: min(680px, calc(100dvh - 32px)); overflow-y: auto; padding: 30px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); box-shadow: 0 28px 70px rgb(0 0 0 / 25%); }
.action-dialog::backdrop { background: rgb(0 0 0 / 58%); backdrop-filter: blur(4px); }
.dialog-close-form { position: absolute; top: 12px; right: 12px; margin: 0; }
.dialog-close { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--paper-alt); color: var(--muted); font-size: 24px; line-height: 1; }
.dialog-close:hover { background: var(--accent-soft); color: var(--accent-deep); }
.dialog-kicker { margin: 0 0 12px; color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .2em; }
.action-dialog h2 { max-width: 340px; margin: 0; font-size: 29px; font-weight: 750; letter-spacing: -.035em; }
.dialog-shop { margin: 11px 0 0; color: var(--accent-deep); font-size: 17px; font-weight: 800; }
.dialog-copy { margin: 12px 0 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.field-label { display: block; margin: 15px 0 7px; color: var(--ink); font-size: 12px; font-weight: 800; }
.action-dialog input:not([type="checkbox"]) { display: block; width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: var(--paper-alt); font-size: 14px; }
.action-dialog input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.attest { display: flex; align-items: start; gap: 10px; margin: 19px 0; font-size: 12px; line-height: 1.55; color: var(--muted); cursor: pointer; }
.attest input { flex: none; width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--accent); }
.primary-button { width: 100%; min-height: 48px; padding: 10px 17px; border: 0; border-radius: 11px; background: var(--accent); color: var(--on-primary); font-size: 14px; font-weight: 900; }
.primary-button:hover { filter: brightness(1.12); }
.form-note { margin: 13px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.auth-dialog { max-height: calc(100dvh - 32px); }
.legal-consent { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 10px; color: var(--muted); font-size: 12px; line-height: 1.55; cursor: pointer; }
.legal-consent input { flex: none; width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--accent); }
.legal-consent a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.auth-status { min-height: 18px; margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.auth-status[data-error="true"] { color: var(--ink); font-weight: 700; }
.auth-back { display: block; width: 100%; margin-top: 10px; padding: 9px; border: 0; background: transparent; color: var(--accent-deep); font-size: 12px; font-weight: 800; }
.auth-back[hidden], .legal-consent[hidden] { display: none; }
.toast { position: fixed; z-index: 2147483001; left: 50%; bottom: max(25px, calc(env(safe-area-inset-bottom) + 15px)); width: min(calc(100% - 32px), 480px); transform: translateX(-50%); padding: 12px 16px; border-radius: 13px; background: var(--ink); color: var(--paper); box-shadow: 0 12px 32px rgb(0 0 0 / 20%); font-size: 13px; line-height: 1.45; text-align: center; }

@media (max-width: 680px) {
  .shell { width: min(100% - 24px, 540px); padding-top: max(71px, calc(env(safe-area-inset-top) + 66px)); }
  :root[data-yuno-host="native_webview"] .shell { padding-top: max(58px, calc(var(--yuno-safe-area-top, 0px) + 14px)); }
  .site-header { padding-bottom: 16px; }
  :root[data-yuno-host="native_webview"] .site-header { padding-right: calc(var(--yuno-safe-area-right, 0px) + 76px); }
  .brand { font-size: 13px; }
  .brand-mark { width: 25px; height: 25px; }
  .header-tag { padding: 6px 9px; font-size: 10px; }
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-copy { padding: 25px 22px; }
  .hero h1 { font-size: clamp(26px, 7.45vw, 42px); }
  .hero-lead { max-width: 380px; margin-top: 14px; }
  .eyebrow { margin-bottom: 12px; font-size: 10px; }
  .hero-visual { aspect-ratio: 2.3; }
  .hero-visual img { object-position: 50% 48%; }
  .search-icon { left: 13px; width: 17px; height: 17px; }
  .results { margin-top: 24px; }
  .results-header { padding: 0 3px; }
  .results-header h2 { font-size: 32px; }
  .results-subtitle { font-size: 12px; }
  .vote-total-stack { align-items: center; }
  .vote-total strong { font-size: 33px; }
  .vote-total { display: grid; gap: 2px; text-align: center; }
  .ranking-note { margin-top: 18px; font-size: 12px; }
  .result-grid { grid-template-columns: 1fr; gap: 12px; }
  .leaderboard-panel, .candidate-panel { padding: 19px 16px; border-radius: 12px; }
  .panel-heading h3 { font-size: 21px; }
  .footer { margin-top: 32px; }
}

@media (max-width: 380px) {
  :root[data-yuno-host="web"] .site-header { flex-wrap: wrap; }
  .header-tag { display: none; }
  .candidate-card { grid-template-columns: 1fr; }
  .vote-button { justify-self: start; }
}
