:root {
  --bg: #ffffff;
  --surface: #f4f4f6;
  --ink: #121214;
  --ink-dim: #6f6f78;
  --accent: #3654ff;
  --accent-ink: #ffffff;
  --border: #e7e7ea;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0e;
    --surface: #19191c;
    --ink: #f5f5f7;
    --ink-dim: #98989f;
    --accent: #7b93ff;
    --accent-ink: #0c0c0e;
    --border: #232327;
  }
}

:root[data-theme="dark"] {
  --bg: #0c0c0e;
  --surface: #19191c;
  --ink: #f5f5f7;
  --ink-dim: #98989f;
  --accent: #7b93ff;
  --accent-ink: #0c0c0e;
  --border: #232327;
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f4f4f6;
  --ink: #121214;
  --ink-dim: #6f6f78;
  --accent: #3654ff;
  --accent-ink: #ffffff;
  --border: #e7e7ea;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

/* ---------- gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.frame {
  margin: 0;
}

.frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  border-radius: 20px;
  background: var(--surface);
}

.frame figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-dim);
}

/* ---------- ballot ---------- */

.ballot {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.question {
  margin: 0;
  font-size: clamp(20px, 3.4vw, 26px);
  font-weight: 700;
  text-wrap: balance;
}

.ballot-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.ballot-btn {
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 32px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.ballot-btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.ballot-btn:disabled {
  cursor: default;
  opacity: 0.4;
  transform: none;
}

.ballot-btn.yes {
  background: var(--accent);
  color: var(--accent-ink);
}

.ballot-btn.no {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}

.poll-result {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-dim);
  max-width: 46ch;
}

/* ---------- responsive ---------- */

@media (max-width: 600px) {
  .gallery {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  main {
    padding: 24px 16px 64px;
    gap: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ballot-btn {
    transition: none;
  }
}
