:root {
  --felt-980: #02100d;
  --felt-950: #041914;
  --felt-900: #06271f;
  --felt-820: #0a3428;
  --felt-760: #0f4637;
  --gold-600: #c99c44;
  --gold-500: #d9b665;
  --gold-300: #f2dfa9;
  --ivory: #fffaf0;
  --muted: #d8ceb6;
  --danger: #f1b6aa;
  --line: rgba(242, 223, 169, 0.24);
  --shadow: rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  background: var(--felt-980);
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ivory);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at 50% -8%, rgba(242, 223, 169, 0.18), transparent 30rem),
    radial-gradient(circle at 12% 18%, rgba(17, 82, 63, 0.56), transparent 26rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 8px),
    linear-gradient(45deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 10px),
    linear-gradient(155deg, var(--felt-820), var(--felt-980));
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 4px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025), rgba(0, 0, 0, 0.08));
  box-shadow: inset 0 0 9rem rgba(0, 0, 0, 0.58);
  content: "";
}

button,
input {
  font: inherit;
}

.vote-page {
  display: grid;
  width: 100%;
  min-height: 100vh;
  padding: clamp(16px, 4vw, 40px);
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
}

.vote-form {
  position: relative;
  width: 100%;
  max-width: 900px;
  min-width: 0;
  overflow: hidden;
  padding: clamp(22px, 4vw, 46px);
  border: 1px solid rgba(242, 223, 169, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, rgba(4, 25, 20, 0.96), rgba(5, 39, 31, 0.92));
  box-shadow:
    0 28px 80px var(--shadow),
    inset 0 1px rgba(255, 255, 255, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.vote-form::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(242, 223, 169, 0.12), transparent) top / 100% 1px no-repeat,
    radial-gradient(circle at 50% 0, rgba(217, 182, 101, 0.16), transparent 22rem);
  content: "";
}

.vote-form.is-locked {
  filter: saturate(0.96);
}

.vote-header,
.questions,
.form-status,
.form-actions {
  position: relative;
}

.vote-header {
  display: grid;
  justify-items: center;
  text-align: center;
}

.logo-frame {
  position: relative;
  display: grid;
  width: min(360px, 78vw);
  margin-bottom: 18px;
  padding: 18px 24px;
  border: 0;
  background: transparent;
  isolation: isolate;
  place-items: center;
}

.logo-frame::before {
  position: absolute;
  inset: 2px 0;
  z-index: -1;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at center, rgba(255, 250, 240, 0.86) 0%, rgba(255, 250, 240, 0.68) 44%, rgba(242, 223, 169, 0.28) 72%, transparent 100%);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(242, 223, 169, 0.3);
  content: "";
}

.vote-logo {
  position: relative;
  display: block;
  z-index: 1;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.18));
}

.header-rule {
  width: min(250px, 62vw);
  height: 1px;
  margin-bottom: 22px;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
}

h1 {
  max-width: 780px;
  margin: 0;
  color: var(--ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 650;
  line-height: 1.12;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.questions {
  display: grid;
  gap: 16px;
  margin-top: clamp(26px, 4vw, 40px);
}

.question {
  min-width: 0;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(242, 223, 169, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
    rgba(7, 45, 35, 0.68);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

.question-heading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.question-number {
  display: inline-grid;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(217, 182, 101, 0.7);
  border-radius: 50%;
  background: rgba(2, 16, 13, 0.28);
  color: var(--gold-300);
  font-weight: 850;
  line-height: 1;
  place-items: center;
}

.question-copy {
  min-width: 0;
}

.question-title {
  margin: 1px 0 0;
  color: var(--ivory);
  font-size: clamp(18px, 2.3vw, 22px);
  font-weight: 800;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.question-subtitle {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.choice-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.choice {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 58px;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 250, 240, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.052);
  color: var(--ivory);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.choice:hover {
  border-color: rgba(217, 182, 101, 0.62);
  background: rgba(255, 255, 255, 0.082);
  transform: translateY(-1px);
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-mark {
  display: inline-grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(242, 223, 169, 0.75);
  border-radius: 50%;
  place-items: center;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.choice-mark::after {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 18px rgba(217, 182, 101, 0.66);
  content: "";
  opacity: 0;
  transform: scale(0.45);
  transition: opacity 160ms ease, transform 160ms ease;
}

.choice input:checked + .choice-mark::after {
  opacity: 1;
  transform: scale(1);
}

.choice:has(input:checked) {
  border-color: rgba(217, 182, 101, 0.95);
  background: linear-gradient(180deg, rgba(217, 182, 101, 0.17), rgba(217, 182, 101, 0.09));
  box-shadow: inset 0 0 0 1px rgba(217, 182, 101, 0.18), 0 12px 28px rgba(0, 0, 0, 0.2);
}

.choice:focus-within {
  outline: 3px solid rgba(242, 223, 169, 0.38);
  outline-offset: 3px;
}

.choice-label {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.vote-form.is-locked .choice,
.vote-form.is-locked .submit-button {
  cursor: not-allowed;
}

.form-status {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--danger);
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

.form-status.is-success {
  color: var(--gold-300);
}

.form-actions {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.submit-button {
  width: min(100%, 330px);
  min-height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, #f3dda0, #c99c44);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26), inset 0 1px rgba(255, 255, 255, 0.48);
  color: #142016;
  cursor: pointer;
  font-weight: 900;
  transition: filter 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.submit-button:not(:disabled):hover {
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32), inset 0 1px rgba(255, 255, 255, 0.54);
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.submit-button:focus-visible,
.modal-close:focus-visible {
  outline: 3px solid rgba(242, 223, 169, 0.5);
  outline-offset: 3px;
}

.submit-button:disabled {
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.2), rgba(255, 250, 240, 0.1));
  box-shadow: none;
  color: rgba(255, 250, 240, 0.48);
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  padding: 20px;
  background: rgba(2, 11, 9, 0.74);
  backdrop-filter: blur(10px);
  place-items: center;
}

.modal[hidden] {
  display: none;
}

.modal-panel {
  position: relative;
  width: min(100%, 420px);
  padding: 36px 28px 32px;
  border: 1px solid rgba(217, 182, 101, 0.44);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffaf0, #f0e5c9);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.48);
  color: #172119;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #253229;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.modal-emblem {
  display: inline-grid;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-500), var(--gold-600));
  box-shadow: 0 10px 24px rgba(201, 156, 68, 0.32);
  color: #102018;
  font-size: 30px;
  font-weight: 900;
  place-items: center;
}

.modal h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.2;
}

.modal p {
  margin: 10px 0 0;
  color: #455044;
  font-size: 17px;
}

@media (max-width: 680px) {
  .vote-page {
    align-items: start;
    padding: 12px;
  }

  .vote-form {
    padding: 20px 14px 22px;
  }

  .logo-frame {
    width: min(320px, 82vw);
    margin-bottom: 16px;
    padding: 14px 18px;
  }

  .header-rule {
    margin-bottom: 18px;
  }

  h1 {
    font-size: clamp(22px, 6vw, 27px);
    line-height: 1.16;
  }

  .questions {
    gap: 14px;
    margin-top: 24px;
  }

  .question {
    padding: 16px 14px;
  }

  .question-heading {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
  }

  .question-number {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .question-title {
    font-size: 18px;
  }

  .question-subtitle {
    font-size: 14px;
  }

  .choice-list {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 16px;
  }

  .choice {
    min-height: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
