:root {
  color-scheme: light;
  --ink: #10242b;
  --muted: #607178;
  --line: #d9e4e2;
  --paper: #fffdf8;
  --soft: #edf6f2;
  --blue: #0d8fb3;
  --blue-dark: #0f3b4a;
  --green: #5d963d;
  --sun: #f2b84b;
  --red: #b94937;
  --shadow: 0 18px 45px rgba(19, 45, 51, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(237, 246, 242, 0.92), rgba(255, 253, 248, 0.98) 42%),
    #fffdf8;
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  min-height: 320px;
  overflow: hidden;
  align-items: end;
  padding: clamp(28px, 7vw, 76px);
  border-radius: 8px;
  color: white;
  background:
    linear-gradient(90deg, rgba(12, 34, 43, 0.82), rgba(12, 34, 43, 0.2)),
    url("/assets/anji-rafting.jpg");
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.hero-copy {
  max-width: 650px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #cbed95;
}

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

h1 {
  max-width: 10em;
  margin-bottom: 14px;
  font-size: clamp(2.3rem, 6vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.no-break {
  white-space: nowrap;
}

.hero-text {
  max-width: 28em;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.7;
}

.hero-stats {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  background: rgba(15, 59, 74, 0.58);
  backdrop-filter: blur(8px);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 850;
  line-height: 1;
}

.stat-label {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
}

.vote-panel,
.results-panel {
  margin-top: 18px;
  padding: clamp(18px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 10px 26px rgba(19, 45, 51, 0.08);
}

.name-field {
  display: grid;
  gap: 8px;
  max-width: 360px;
  margin-bottom: 30px;
  color: var(--blue-dark);
  font-weight: 800;
}

.name-field input,
.comment-field textarea {
  width: 100%;
  border: 1px solid #cbdad7;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  outline: none;
}

.name-field input {
  min-height: 48px;
  padding: 0 14px;
}

.comment-field {
  display: grid;
  gap: 8px;
  margin-top: 34px;
  color: var(--blue-dark);
  font-weight: 800;
}

.comment-field textarea {
  min-height: 112px;
  resize: vertical;
  padding: 12px 14px;
  line-height: 1.55;
}

.name-field input:focus,
.comment-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(13, 143, 179, 0.15);
}

.section-block + .section-block {
  margin-top: 34px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading h2,
.result-columns h3 {
  margin: 0;
  color: var(--blue-dark);
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  letter-spacing: 0;
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.date-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.option-card {
  position: relative;
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.option-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(19, 45, 51, 0.12);
}

.option-card input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.option-card:has(input:checked) {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(13, 143, 179, 0.14);
}

.checkmark {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(15, 59, 74, 0.54);
  color: white;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.date-card .checkmark {
  border-color: rgba(15, 59, 74, 0.22);
  background: white;
  color: var(--blue-dark);
  box-shadow: none;
}

.checkmark::after {
  content: "";
  width: 8px;
  height: 14px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  opacity: 0;
  transform: translateY(-1px) rotate(45deg);
}

.option-card:has(input:checked) .checkmark {
  background: var(--blue);
  color: white;
}

.option-card:has(input:checked) .checkmark::after {
  opacity: 1;
}

.location-card {
  grid-template-rows: 190px minmax(270px, auto);
}

.location-card img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.option-body,
.date-card {
  padding: 16px;
}

.option-meta {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--soft);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
}

.option-title {
  display: block;
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 850;
  line-height: 1.25;
}

.option-copy {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.travel-line {
  display: block;
  margin-top: 10px;
  color: var(--blue-dark);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.45;
}

.option-highlights {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.option-highlights li {
  position: relative;
  padding-left: 16px;
  color: #425b62;
  font-size: 0.9rem;
  line-height: 1.45;
}

.option-highlights li::before {
  content: "";
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sun);
}

.date-card {
  min-height: 150px;
  padding-right: 54px;
  align-content: start;
}

.date-main {
  display: block;
  margin-bottom: 16px;
  color: var(--red);
  font-size: 1.28rem;
  font-weight: 900;
  line-height: 1.2;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 850;
}

.primary-button {
  border: 0;
  background: var(--blue-dark);
  color: white;
}

.secondary-button {
  border: 1px solid #bfd1ce;
  background: white;
  color: var(--blue-dark);
}

.danger-button {
  min-height: 48px;
  border: 1px solid rgba(179, 67, 50, 0.35);
  border-radius: 8px;
  padding: 0 18px;
  background: #fff7f5;
  color: #a33b2d;
  font-weight: 850;
}

.status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.privacy-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.status[data-tone="success"] {
  color: var(--green);
}

.status[data-tone="error"] {
  color: #a33b2d;
}

.result-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.result-columns h3 {
  margin-bottom: 12px;
  font-size: 1.12rem;
}

.result-list {
  display: grid;
  gap: 12px;
}

.result-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: white;
}

.result-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--blue-dark);
}

.result-topline span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

.bar {
  height: 9px;
  margin: 12px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e7efed;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--sun));
}

.voter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.voter-chip {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
  border: 1px solid #d7e4e1;
  border-radius: 999px;
  padding: 4px 9px 4px 4px;
  background: #fbfdfb;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 750;
}

.voter-chip.avatar-only {
  border: 0;
  padding: 0;
  background: transparent;
}

.avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--avatar-bg, var(--blue-dark));
  color: white;
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.empty-voters {
  color: var(--muted);
  font-size: 0.92rem;
}

[hidden] {
  display: none !important;
}

.admin-shell {
  max-width: 1120px;
}

.admin-hero {
  margin-top: 18px;
  padding: clamp(22px, 5vw, 40px);
  border-radius: 8px;
  background: var(--blue-dark);
  color: white;
  box-shadow: var(--shadow);
}

.admin-hero h1 {
  max-width: 12em;
  font-size: clamp(2rem, 5vw, 3.8rem);
}

.admin-hero .secondary-button {
  margin-top: 0;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.admin-status {
  min-height: 24px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.76);
}

.admin-status[data-tone="success"] {
  color: #cbed95;
}

.admin-status[data-tone="error"] {
  color: #ffd0c8;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.summary-card {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: white;
}

.summary-card strong {
  color: var(--blue-dark);
  font-size: 1.35rem;
}

.summary-card span,
.admin-vote-head span {
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-name {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--soft);
  color: var(--blue-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.admin-votes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-vote-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: white;
}

.admin-vote-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-vote-head div {
  display: grid;
  gap: 2px;
}

.admin-vote-card dl {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

.admin-vote-card dt {
  color: var(--muted);
  font-weight: 800;
}

.admin-vote-card dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}

@media (max-width: 860px) {
  .hero {
    min-height: 420px;
    grid-template-columns: 1fr;
    background:
      linear-gradient(180deg, rgba(12, 34, 43, 0.16), rgba(12, 34, 43, 0.84)),
      url("/assets/anji-rafting.jpg");
    background-size: cover;
    background-position: center;
  }

  .hero-stats {
    width: 92px;
    height: 92px;
  }

  .location-grid,
  .date-grid,
  .result-columns,
  .admin-summary,
  .admin-votes {
    grid-template-columns: 1fr;
  }

  .location-card {
    grid-template-rows: 210px auto;
  }
}

@media (max-width: 520px) {
  .shell {
    padding: 10px;
  }

  .hero {
    min-height: 440px;
    padding: 26px 20px;
  }

  h1 {
    font-size: clamp(2.15rem, 14vw, 3.2rem);
  }

  .vote-panel,
  .results-panel {
    padding: 18px 14px;
  }

  .section-heading {
    display: block;
  }

  .actions {
    display: grid;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
