:root {
  --blue: #1677d2;
  --blue-dark: #105ea8;
  --green: #1ea96b;
  --red: #e44141;
  --ink: #163047;
  --muted: #647385;
  --line: #dce8f2;
  --surface: #ffffff;
  --page: #f4f9fc;
  --shadow: 0 14px 34px rgba(19, 76, 123, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  background: #e9f4fb;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.page-shell {
  width: min(100%, 460px);
  margin: 0 auto;
  padding: 0 14px 96px;
}

.hero {
  position: relative;
  margin: 0 -14px;
  min-height: 430px;
  overflow: hidden;
  background: #d9efff;
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(244,249,252,.92) 0%, rgba(244,249,252,.74) 42%, rgba(244,249,252,.2) 68%, #f4f9fc 100%),
    linear-gradient(90deg, rgba(255,255,255,.86) 0%, rgba(255,255,255,.48) 54%, rgba(255,255,255,.1) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 52px 22px 22px;
}

.school-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #184b72;
  font-size: 13px;
  font-weight: 700;
}

.school-line span {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 10px;
  border: 1px solid rgba(22, 119, 210, .28);
  border-radius: 999px;
  background: rgba(255, 255, 255, .76);
}

h1,
h2,
p {
  margin: 0;
}

.hero h1 {
  margin-top: 16px;
  max-width: 7em;
  color: #102f4c;
  font-size: 38px;
  line-height: 1.1;
  font-weight: 850;
}

.hero p {
  margin-top: 14px;
  max-width: 290px;
  color: #34556e;
  font-size: 16px;
  line-height: 1.65;
  font-weight: 500;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 24px;
}

.hero__stats div {
  min-height: 74px;
  padding: 12px 8px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: var(--radius);
  background: rgba(255,255,255,.84);
  box-shadow: 0 8px 22px rgba(22, 91, 142, .12);
}

.hero__stats strong {
  display: block;
  color: var(--blue-dark);
  font-size: 21px;
  line-height: 1.1;
}

.hero__stats span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.notice,
.support-card,
.privacy-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.notice {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: -48px;
  position: relative;
  z-index: 2;
  padding: 16px;
}

.notice strong {
  display: block;
  margin-bottom: 5px;
  font-size: 16px;
}

.notice p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.notice > span {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.support-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 15px;
}

.support-card__label {
  display: block;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
}

.support-card h2 {
  margin-top: 3px;
  font-size: 20px;
  line-height: 1.25;
}

.support-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #eef7ff;
  color: var(--blue);
}

.icon-button svg,
.modal__close svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin: 24px 0 12px;
}

.section-head h2 {
  font-size: 21px;
}

.section-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.plain-button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  background: #eaf5ff;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.candidate-list {
  display: grid;
  gap: 10px;
}

.candidate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(19, 76, 123, 0.08);
}

.candidate.is-selected {
  border-color: rgba(228, 65, 65, .58);
  box-shadow: 0 10px 24px rgba(228, 65, 65, .12);
}

.candidate__name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.candidate__name strong {
  font-size: 17px;
}

.rank {
  flex: 0 0 auto;
  min-width: 38px;
  padding: 3px 6px;
  border-radius: 999px;
  background: #f0f7ff;
  color: var(--blue);
  font-size: 11px;
  text-align: center;
  font-weight: 800;
}

.candidate__meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.candidate__vote {
  min-width: 64px;
  min-height: 38px;
  border-radius: 7px;
  background: var(--red);
  color: white;
  font-size: 14px;
  font-weight: 800;
}

.privacy-panel {
  margin-top: 18px;
  padding: 16px;
}

.privacy-panel h2 {
  font-size: 17px;
}

.privacy-panel p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.text-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.doc-page {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 34px 18px 60px;
}

.doc-page h1 {
  font-size: 28px;
  line-height: 1.25;
}

.doc-page h2 {
  margin-top: 26px;
  font-size: 18px;
}

.doc-page p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.doc-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 28px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.sticky-vote {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  width: min(100%, 460px);
  padding: 12px 14px max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  box-shadow: 0 -12px 24px rgba(25, 67, 99, .12);
  backdrop-filter: blur(14px);
}

.sticky-vote span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.sticky-vote strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
}

.primary-button,
.secondary-button {
  min-height: 44px;
  border-radius: 8px;
  font-weight: 850;
}

.primary-button {
  min-width: 134px;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--red), #ff6a4d);
  color: white;
  box-shadow: 0 10px 20px rgba(228, 65, 65, .24);
}

.primary-button:disabled {
  opacity: .55;
}

.primary-button--wide {
  width: 100%;
  margin-top: 16px;
}

.secondary-button--wide {
  width: 100%;
  margin-top: 16px;
}

.secondary-button {
  padding: 0 14px;
  background: #eef7ff;
  color: var(--blue-dark);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 86px;
  z-index: 40;
  max-width: calc(100% - 44px);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(22, 48, 71, .92);
  color: white;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: end;
  background: rgba(11, 31, 49, .45);
}

.modal.is-open {
  display: flex;
}

.modal__panel {
  position: relative;
  width: min(100%, 460px);
  margin: 0 auto;
  padding: 22px 18px max(18px, env(safe-area-inset-bottom));
  border-radius: 16px 16px 0 0;
  background: white;
  box-shadow: 0 -18px 44px rgba(7, 35, 60, .2);
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #edf4fa;
  color: #486275;
}

.modal h2 {
  padding-right: 44px;
  font-size: 22px;
}

.modal__intro {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.permission-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.permission-list label {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
}

.permission-list input {
  width: 20px;
  height: 20px;
  accent-color: var(--blue);
}

.permission-list strong,
.permission-list em {
  display: block;
}

.permission-list strong {
  font-size: 15px;
}

.permission-list em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.upload-row span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

@media (max-width: 360px) {
  .hero h1 {
    font-size: 34px;
  }

  .notice {
    display: block;
  }

  .notice > span {
    display: inline-block;
    margin-top: 10px;
  }

  .support-card {
    grid-template-columns: minmax(0, 1fr) 38px;
  }
}
