:root {
  color-scheme: dark;
  --ink: #f2f0e9;
  --muted: #aaa69c;
  --paper: #10100f;
  --panel: #181816;
  --panel-2: #20201d;
  --line: rgba(242, 240, 233, 0.12);
  --acid: #d9ff57;
  --violet: #a995ff;
  --coral: #ff775f;
  --cyan: #65e7dc;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% -10%, rgba(169, 149, 255, 0.18), transparent 32rem),
    radial-gradient(circle at 100% 20%, rgba(217, 255, 87, 0.11), transparent 30rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, textarea { font: inherit; }
button { color: inherit; }
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background:
    repeating-linear-gradient(117deg, transparent 0 7px, rgba(255,255,255,.018) 8px 9px),
    repeating-linear-gradient(23deg, transparent 0 11px, rgba(255,255,255,.012) 12px 13px);
}

.app-shell { min-height: 100vh; }
.page { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 750; letter-spacing: -0.02em; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #10100f;
  background: var(--acid);
  border-radius: 10px 10px 10px 2px;
  font-weight: 900;
}
.campaign-label { color: var(--muted); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.nav { display: flex; gap: 4px; padding: 5px; background: rgba(255,255,255,.045); border: 1px solid var(--line); border-radius: 999px; }
.nav button {
  border: 0;
  padding: 9px 13px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.nav button.active { color: #10100f; background: var(--ink); }
.profile { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; }
.profile-button { padding: 5px 6px 5px 12px; border: 1px solid transparent; border-radius: 999px; background: transparent; cursor: pointer; text-align: right; }
.profile-button:hover { border-color: var(--line); background: rgba(255,255,255,.035); }
.profile-button strong, .profile-button small { display: block; }
.profile-button strong { color: var(--ink); font-size: 13px; }
.profile-button small { margin-top: 1px; color: var(--cyan); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--violet); color: #17141f; font-weight: 800; }
.avatar-image { display: block; object-fit: cover; background: var(--panel-2); }

.entry {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 10vw;
  align-items: center;
  padding: 48px 0;
}
.eyebrow { color: var(--acid); text-transform: uppercase; letter-spacing: .13em; font-size: 12px; font-weight: 800; }
.entry h1 { margin: 18px 0 18px; max-width: 780px; font-size: clamp(54px, 8vw, 112px); line-height: .88; letter-spacing: -.075em; }
.entry-copy { max-width: 620px; color: var(--muted); font-size: clamp(18px, 2vw, 23px); line-height: 1.5; }
.entry-card { padding: 28px; border: 1px solid var(--line); background: rgba(24,24,22,.86); border-radius: 26px; box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.entry-card h2 { margin: 0 0 8px; font-size: 24px; }
.entry-card p { margin: 0 0 24px; color: var(--muted); line-height: 1.5; }
.auth-error { margin: -6px 0 18px; padding: 12px 14px; border: 1px solid rgba(239, 118, 102, .35); border-radius: 12px; background: rgba(239, 118, 102, .1); color: #ffd3cc; font-size: 14px; line-height: 1.45; }
.field-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13px; }
.text-field, .text-area {
  width: 100%;
  color: var(--ink);
  background: #11110f;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 15px;
  outline: none;
}
.text-field:focus, .text-area:focus { border-color: var(--acid); box-shadow: 0 0 0 3px rgba(217,255,87,.12); }
.primary {
  width: 100%;
  margin-top: 12px;
  padding: 14px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--acid);
  color: #15150e;
  font-weight: 850;
  cursor: pointer;
}
.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.google-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 18px;
  border: 1px solid #d4d7dc;
  border-radius: 12px;
  color: #202124;
  background: #fff;
  font-weight: 750;
  cursor: pointer;
}
.google-button:hover { background: #f7f8f8; box-shadow: 0 2px 10px rgba(0,0,0,.22); }
.google-g { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; background: conic-gradient(from -45deg, #4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0); font-weight: 900; font-size: 13px; }
.identity-note { display: flex; gap: 11px; align-items: flex-start; margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.identity-note > span { color: var(--acid); font-weight: 900; }
.identity-note strong { color: var(--ink); }

.content { padding: 42px 0 80px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading h1 { margin: 6px 0 0; font-size: clamp(34px, 5vw, 58px); letter-spacing: -.055em; }
.section-heading p { max-width: 510px; margin: 0; color: var(--muted); line-height: 1.55; }
.progress { min-width: 150px; text-align: right; color: var(--muted); font-size: 13px; }
.progress-line { height: 5px; margin-top: 9px; overflow: hidden; border-radius: 99px; background: var(--panel-2); }
.progress-line span { display: block; height: 100%; background: var(--acid); border-radius: inherit; }

.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; align-items: stretch; }
.name-card {
  position: relative;
  min-height: 520px;
  padding: clamp(26px, 5vw, 58px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(36,36,32,.97), rgba(20,20,18,.98));
  box-shadow: var(--shadow);
}
.name-card::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -90px;
  top: -110px;
  border: 44px solid rgba(217,255,87,.10);
  border-radius: 50%;
}
.card-index { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; letter-spacing: .09em; text-transform: uppercase; }
.candidate-name { margin: 22px 0 12px; font-size: clamp(48px, 8vw, 96px); line-height: .94; letter-spacing: -.07em; overflow-wrap: anywhere; }
.pronunciation { color: var(--acid); font-size: 15px; }
.story { max-width: 700px; margin: 30px 0 0; color: #d3d0c7; font-size: clamp(19px, 2.2vw, 27px); line-height: 1.45; }
.territory { margin-top: 16px; color: var(--muted); }
.family-preview { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 32px; }
.family-preview span { padding: 8px 11px; border-radius: 999px; color: #111; background: var(--ink); font-size: 13px; font-weight: 760; }
.review-panel { display: flex; flex-direction: column; gap: 14px; }
.reason-box, .guide-box { padding: 19px; border: 1px solid var(--line); background: rgba(24,24,22,.72); border-radius: 18px; }
.reason-box h3, .guide-box h3 { margin: 0 0 12px; font-size: 14px; }
.reason-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.reason-header h3 { margin: 0; }
.note-toggle { flex: 0 0 auto; padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--cyan); background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; text-decoration: none; }
.note-toggle:hover { border-color: var(--cyan); background: rgba(101,231,220,.08); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.chip.selected { color: #111; background: var(--cyan); border-color: var(--cyan); }
.guide-box { color: var(--muted); font-size: 13px; line-height: 1.5; }
.note-sheet { position: fixed; inset: 0; z-index: 60; display: none; width: 100vw; height: 100dvh; padding: 20px; color: var(--ink); background: rgba(0,0,0,.72); backdrop-filter: blur(8px); }
.note-sheet:target { display: grid; place-items: center; }
.note-dialog { position: relative; z-index: 1; width: min(520px, 100%); padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); box-shadow: var(--shadow); }
.note-dialog h3 { margin: 8px 0; font-size: 28px; letter-spacing: -.035em; }
.note-dialog p { margin: 0 0 16px; color: var(--muted); line-height: 1.5; }
.note-dialog .text-area { min-height: 150px; }
.note-actions { display: grid; grid-template-columns: 1fr; gap: 9px; margin-top: 12px; text-align: center; }
.note-actions .primary { display: block; margin-top: 0; text-decoration: none; }
.vote-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.vote {
  min-height: 68px;
  padding: 10px 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  cursor: pointer;
  font-weight: 760;
  font-size: 13px;
}
.vote span { display: block; margin-bottom: 4px; font-size: 18px; }
.vote.pass:hover { border-color: var(--coral); }
.vote.maybe:hover { border-color: var(--violet); }
.vote.keep:hover { border-color: var(--cyan); }
.vote.champion { color: #10100f; background: var(--acid); border-color: var(--acid); }
.empty-state { padding: 72px 28px; text-align: center; border: 1px dashed var(--line); border-radius: 24px; }
.empty-state h2 { font-size: 34px; margin: 0 0 10px; }
.empty-state p { color: var(--muted); }
.supply-state { justify-items: center; }
.supply-spinner { width: 34px; height: 34px; margin: 0 auto 18px; border: 3px solid var(--line); border-top-color: var(--acid); border-radius: 50%; animation: supply-spin .9s linear infinite; }
@keyframes supply-spin { to { transform: rotate(360deg); } }

.score-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; }
.candidate-list { display: flex; flex-direction: column; gap: 7px; }
.candidate-list button { padding: 12px 13px; text-align: left; color: var(--muted); border: 1px solid transparent; border-radius: 11px; background: transparent; cursor: pointer; }
.candidate-list button.active { color: var(--ink); background: var(--panel-2); border-color: var(--line); }
.rubric-card { padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: rgba(24,24,22,.85); }
.rubric-header { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.rubric-header h2 { margin: 0 0 7px; font-size: 32px; letter-spacing: -.04em; }
.score-total { min-width: 88px; height: 68px; display: grid; place-items: center; border-radius: 16px; color: #111; background: var(--acid); font-size: 24px; font-weight: 900; }
.rubric-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(220px, 1.5fr) 30px; gap: 16px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.rubric-row label { font-size: 14px; font-weight: 720; }
.rubric-row input[type="range"] { width: 100%; accent-color: var(--acid); }
.rubric-row output { text-align: right; color: var(--acid); font-weight: 850; }
.score-note { margin-top: 18px; }

.results-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.metric { grid-column: span 3; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.metric strong { display: block; margin-top: 8px; font-size: 28px; }
.metric span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.leaderboard { grid-column: 1 / -1; margin-top: 8px; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.result-row { display: grid; grid-template-columns: 52px minmax(160px, 1.5fr) repeat(4, minmax(85px, .7fr)); gap: 16px; align-items: center; padding: 17px 20px; border-top: 1px solid var(--line); }
.result-row:first-child { border-top: 0; }
.rank { color: var(--muted); font-variant-numeric: tabular-nums; }
.result-name strong { display: block; font-size: 18px; }
.result-name span, .result-stat span { color: var(--muted); font-size: 12px; }
.result-notes { margin-top: 10px; }
.result-notes summary { color: var(--cyan); cursor: pointer; font-size: 12px; font-weight: 800; }
.result-notes blockquote { margin: 8px 0 0; padding: 9px 11px; border-left: 2px solid var(--cyan); border-radius: 0 9px 9px 0; color: #d3d0c7; background: rgba(101,231,220,.055); font-size: 12px; line-height: 1.45; }
.result-notes blockquote span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.result-stat strong { display: block; font-variant-numeric: tabular-nums; }
.bar { height: 5px; margin-top: 6px; overflow: hidden; border-radius: 99px; background: var(--panel-2); }
.bar span { display: block; height: 100%; background: var(--violet); }

.recall-card, .submit-card { max-width: 720px; padding: 30px; border: 1px solid var(--line); background: var(--panel); border-radius: 22px; }
.recall-card h2, .submit-card h2 { margin-top: 0; font-size: 30px; }
.recall-card p, .submit-card p { color: var(--muted); line-height: 1.55; }
.text-area { min-height: 120px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field.full { grid-column: 1 / -1; }
.secondary { padding: 12px 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-2); cursor: pointer; }

.preview-banner {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 54px;
  padding: 9px 24px;
  color: #14140f;
  background: var(--acid);
  box-shadow: 0 10px 35px rgba(0,0,0,.28);
}
.preview-banner div { display: flex; align-items: baseline; gap: 10px; }
.preview-banner span { color: rgba(20,20,15,.7); font-size: 13px; }
.preview-banner button { padding: 8px 12px; border: 1px solid rgba(20,20,15,.25); border-radius: 999px; color: #14140f; background: rgba(255,255,255,.35); cursor: pointer; font-weight: 800; }
.preview-banner button:hover { background: #fff; }

.admin-heading { align-items: center; }
.preview-button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 250px;
  padding: 14px 16px;
  border: 1px solid rgba(217,255,87,.36);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(217,255,87,.08);
  cursor: pointer;
  text-align: left;
}
.preview-button span { color: var(--acid); font-weight: 850; }
.preview-button:hover { background: rgba(217,255,87,.13); }
.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 24px;
  align-items: center;
  padding: clamp(26px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(39,39,34,.96), rgba(19,19,17,.98));
  box-shadow: var(--shadow);
}
.admin-hero h2 { margin: 14px 0 8px; font-size: clamp(36px, 5vw, 62px); letter-spacing: -.055em; }
.admin-hero p { max-width: 690px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.55; }
.phase-pill { display: inline-flex; padding: 7px 10px; border-radius: 999px; color: #111; background: var(--acid); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.release-control { padding: 20px; border: 1px solid rgba(255,119,95,.34); border-radius: 18px; background: rgba(255,119,95,.07); }
.release-control.released { border-color: rgba(101,231,220,.36); background: rgba(101,231,220,.07); }
.release-control > span, .release-control > strong { display: block; }
.release-control > span { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.release-control > strong { margin: 7px 0 15px; }
.release-control .secondary { width: 100%; }
.algorithm-note { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: 14px; padding: 18px 22px; border: 1px solid rgba(101,231,220,.28); border-radius: 16px; background: rgba(101,231,220,.055); }
.algorithm-note div span, .algorithm-note div strong { display: block; }
.algorithm-note div span { color: var(--cyan); font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.algorithm-note div strong { margin-top: 5px; }
.algorithm-note p { max-width: 600px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; text-align: right; }
.admin-section { margin-top: 26px; padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: rgba(24,24,22,.72); }
.admin-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.admin-section-heading h2 { margin: 6px 0 0; font-size: 28px; letter-spacing: -.035em; }
.admin-section-heading p { max-width: 520px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; text-align: right; }
.phase-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.phase-card { display: flex; flex-direction: column; min-height: 190px; padding: 17px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: var(--panel); cursor: pointer; text-align: left; }
.phase-card > span { color: var(--muted); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.phase-card > strong { margin-top: 14px; font-size: 18px; }
.phase-card > small { margin-top: 7px; color: var(--muted); line-height: 1.45; }
.phase-card > em { margin-top: auto; padding-top: 14px; color: var(--cyan); font-size: 12px; font-style: normal; font-weight: 800; }
.phase-card:hover { border-color: rgba(101,231,220,.45); transform: translateY(-1px); }
.phase-card.active { border-color: var(--acid); background: rgba(217,255,87,.08); }
.phase-card.active > em { color: var(--acid); }
.participant-table { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; }
.participant-row { display: grid; grid-template-columns: minmax(190px, 1.7fr) repeat(4, minmax(75px, .65fr)) minmax(145px, 1fr); gap: 14px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line); }
.participant-row:first-child { border-top: 0; }
.participant-row > span strong, .participant-row > span small { display: block; }
.participant-row > span strong { font-size: 14px; }
.participant-row > span small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.participant-head { color: var(--muted); background: rgba(255,255,255,.025); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.participant-identity strong { color: var(--ink); }
.participant-empty { padding: 28px; color: var(--muted); text-align: center; }
.status-card { max-width: 760px; margin: 8vh auto 0; padding: clamp(30px, 6vw, 62px); border: 1px solid var(--line); border-radius: 26px; background: var(--panel); text-align: center; box-shadow: var(--shadow); }
.status-card h1 { margin: 20px 0 12px; font-size: clamp(42px, 7vw, 76px); letter-spacing: -.06em; }
.status-card p { margin: 0 auto; max-width: 560px; color: var(--muted); font-size: 18px; line-height: 1.55; }
.status-lock { margin-top: 28px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--cyan); background: rgba(101,231,220,.06); font-size: 13px; }
.status-lock.compact { display: inline-block; margin-top: 14px; }

.toast { position: fixed; right: 20px; bottom: 20px; z-index: 20; max-width: 360px; padding: 13px 16px; border-radius: 12px; background: var(--ink); color: #111; box-shadow: var(--shadow); transform: translateY(120px); opacity: 0; transition: .25s ease; }
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; padding: 16px 0; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .nav button { flex: 1; white-space: nowrap; }
  .entry { grid-template-columns: 1fr; gap: 48px; }
  .review-grid, .score-layout { grid-template-columns: 1fr; }
  .candidate-list { flex-direction: row; overflow-x: auto; padding-bottom: 8px; }
  .candidate-list button { white-space: nowrap; }
  .metric { grid-column: span 6; }
  .result-row { grid-template-columns: 42px 1fr 90px; }
  .result-row .hide-mobile { display: none; }
  .admin-hero { grid-template-columns: 1fr; }
  .phase-grid { grid-template-columns: 1fr 1fr; }
  .participant-table { overflow-x: auto; }
  .participant-row { min-width: 850px; }
}

@media (max-width: 600px) {
  .page { width: min(100% - 20px, 1180px); }
  .entry h1 { font-size: 58px; }
  .profile span { display: none; }
  .section-heading { align-items: start; flex-direction: column; }
  .progress { width: 100%; text-align: left; }
  .name-card { min-height: 470px; border-radius: 20px; }
  .vote-actions { grid-template-columns: 1fr 1fr; }
  .rubric-card { padding: 20px; }
  .rubric-row { grid-template-columns: 1fr 34px; gap: 9px; }
  .rubric-row input { grid-column: 1 / -1; grid-row: 2; }
  .metric { grid-column: 1 / -1; }
  .result-row { padding: 14px 12px; gap: 8px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .preview-banner { align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px; }
  .preview-banner div { display: block; }
  .preview-banner span { display: block; margin-top: 2px; }
  .preview-banner button { white-space: nowrap; }
  .admin-heading, .admin-section-heading { align-items: stretch; flex-direction: column; }
  .algorithm-note { align-items: flex-start; flex-direction: column; }
  .algorithm-note p { text-align: left; }
  .admin-section-heading p { text-align: left; }
  .preview-button { width: 100%; min-width: 0; }
  .admin-section { padding: 18px; }
  .phase-grid { grid-template-columns: 1fr; }
  .phase-card { min-height: 150px; }

  /* Review is designed as a focused, one-screen mobile decision surface. */
  body[data-view="review"] { height: 100dvh; overflow: hidden; }
  body[data-view="review"] .app-shell {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  body[data-view="review"] .preview-banner {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 6px 10px;
    align-items: center;
  }
  body[data-view="review"] .preview-banner span { display: none; }
  body[data-view="review"] .preview-banner button { padding: 6px 9px; font-size: 11px; }
  body[data-view="review"] .page {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  body[data-view="review"] .topbar {
    flex: 0 0 56px;
    min-height: 56px;
    padding: 0;
    gap: 8px;
    flex-wrap: nowrap;
  }
  body[data-view="review"] .topbar > div:first-child { flex: 0 0 auto; }
  body[data-view="review"] .brand { gap: 8px; font-size: 14px; }
  body[data-view="review"] .brand-mark { width: 30px; height: 30px; border-radius: 9px 9px 9px 2px; }
  body[data-view="review"] .campaign-label { display: none; }
  body[data-view="review"] .nav {
    order: initial;
    width: auto;
    min-width: 0;
    margin-left: auto;
    padding: 3px;
    gap: 2px;
    overflow: visible;
  }
  body[data-view="review"] .nav button {
    display: none;
    flex: 0 0 auto;
    padding: 7px 9px;
    font-size: 12px;
  }
  body[data-view="review"] .nav button[data-view="review"],
  body[data-view="review"] .nav button[data-view="submit"] { display: block; }
  body[data-view="review"] .profile-button { flex: 0 0 auto; padding: 3px; }
  body[data-view="review"] .avatar { width: 30px; height: 30px; }
  body[data-view="review"] .content {
    flex: 1 1 auto;
    min-height: 0;
    padding: 8px 0 10px;
    display: flex;
    flex-direction: column;
  }
  body[data-view="review"] .section-heading {
    flex: 0 0 auto;
    display: block;
    margin: 0 0 8px;
  }
  body[data-view="review"] .section-heading .eyebrow { font-size: 9px; letter-spacing: .11em; }
  body[data-view="review"] .section-heading h1 {
    margin-top: 2px;
    font-size: clamp(22px, 6.4vw, 29px);
    line-height: 1;
    letter-spacing: -.045em;
  }
  body[data-view="review"] .progress { display: none; }
  body[data-view="review"] .review-grid {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
  }
  body[data-view="review"] .name-card {
    min-height: 0;
    padding: 15px 16px;
    border-radius: 18px;
    box-shadow: 0 16px 42px rgba(0, 0, 0, .3);
  }
  body[data-view="review"] .name-card::after {
    width: 180px;
    height: 180px;
    right: -72px;
    top: -88px;
    border-width: 30px;
  }
  body[data-view="review"] .card-index { font-size: 9px; letter-spacing: .075em; }
  body[data-view="review"] .candidate-name {
    margin: 9px 0 4px;
    max-width: 100%;
    font-size: clamp(34px, 11vw, 54px);
    line-height: .92;
    letter-spacing: -.06em;
  }
  body[data-view="review"] .pronunciation { font-size: 12px; }
  body[data-view="review"] .story {
    display: -webkit-box;
    max-width: none;
    margin: 12px 0 0;
    overflow: hidden;
    color: #ddd9d0;
    font-size: clamp(14px, 3.8vw, 17px);
    line-height: 1.32;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  body[data-view="review"] .territory {
    margin-top: 8px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body[data-view="review"] .name-card > div:last-child { min-width: 0; }
  body[data-view="review"] .name-card > div:last-child > .eyebrow { font-size: 9px; }
  body[data-view="review"] .family-preview {
    flex-wrap: nowrap;
    gap: 5px;
    max-width: 100%;
    margin-top: 6px;
    overflow: hidden;
  }
  body[data-view="review"] .family-preview span {
    flex: 0 0 auto;
    padding: 5px 8px;
    font-size: 10px;
  }
  body[data-view="review"] .review-panel { min-width: 0; width: 100%; gap: 7px; }
  body[data-view="review"] .reason-box {
    min-width: 0;
    padding: 9px 10px;
    overflow: hidden;
    border-radius: 14px;
  }
  body[data-view="review"] .reason-box h3 { margin: 0 0 6px; font-size: 11px; }
  body[data-view="review"] .reason-header { margin-bottom: 6px; }
  body[data-view="review"] .reason-header h3 { margin: 0; }
  body[data-view="review"] .note-toggle { padding: 4px 7px; font-size: 9px; }
  body[data-view="review"] .chips {
    flex-wrap: nowrap;
    gap: 5px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  body[data-view="review"] .chips::-webkit-scrollbar { display: none; }
  body[data-view="review"] .chip {
    flex: 0 0 auto;
    padding: 6px 8px;
    font-size: 10px;
  }
  body[data-view="review"] .vote-actions { min-width: 0; width: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  body[data-view="review"] .vote {
    min-width: 0;
    min-height: 54px;
    padding: 6px 2px;
    border-radius: 12px;
    font-size: 11px;
  }
  body[data-view="review"] .vote span { margin-bottom: 1px; font-size: 16px; }
  body[data-view="review"] .guide-box { display: none; }
  body[data-view="review"] .note-sheet { align-items: end; padding: 0; }
  body[data-view="review"] .note-dialog { padding: 20px 16px max(18px, env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; }
  body[data-view="review"] .note-dialog h3 { font-size: 25px; }
  body[data-view="review"] .note-dialog .text-area { min-height: 125px; }
  body[data-view="review"] .empty-state {
    flex: 1 1 auto;
    display: grid;
    place-content: center;
    padding: 24px 18px;
  }
}

@media (max-width: 600px) and (max-height: 740px) {
  body[data-view="review"] .topbar { flex-basis: 52px; min-height: 52px; }
  body[data-view="review"] .content { padding-top: 6px; padding-bottom: 7px; }
  body[data-view="review"] .section-heading { margin-bottom: 6px; }
  body[data-view="review"] .section-heading .eyebrow { display: none; }
  body[data-view="review"] .name-card { padding: 12px 14px; }
  body[data-view="review"] .candidate-name { margin-top: 7px; font-size: clamp(32px, 10vw, 46px); }
  body[data-view="review"] .story { margin-top: 9px; -webkit-line-clamp: 2; }
  body[data-view="review"] .territory { display: none; }
  body[data-view="review"] .name-card > div:last-child > .eyebrow { display: none; }
  body[data-view="review"] .family-preview { margin-top: 4px; }
  body[data-view="review"] .reason-box { padding-top: 7px; padding-bottom: 7px; }
  body[data-view="review"] .vote { min-height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
