:root {
  --bg: #101014;
  --fg: #f2f2f4;
  --dim: #9a9aa2;
}

* { box-sizing: border-box; }

/* A class that sets `display` beats the browser's `[hidden] { display: none }`,
   which silently leaves "hidden" elements on screen and clickable. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--fg);
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
}

main {
  max-width: 34rem;
  padding: 2rem;
  text-align: center;
}

h1 { font-size: 3rem; margin: 0 0 1rem; letter-spacing: 0.06em; }

p { font-size: 1.125rem; line-height: 1.6; }

.dim { color: var(--dim); }

.cta {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background: #7c9cff;
  color: #101014;
  font-weight: 600;
  text-decoration: none;
}

.cta:hover { background: #93adff; }

/* ---- voting screen -------------------------------------------------- */

.vote-body {
  align-items: stretch;
  /* dvh so mobile browser chrome does not push the second photo off-screen */
  min-height: 100dvh;
  overscroll-behavior: none;
}

.vote {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
  padding: 0.75rem;
  text-align: center;
}

.vote-status {
  margin: 0;
  min-height: 1.6rem;
  font-size: 1rem;
  color: var(--dim);
}

.cards {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 0;
}

.card {
  flex: 1 1 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 0.75rem;
  background: #1b1b21;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 120ms ease, transform 120ms ease;
}

.card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
}

.card:active { transform: scale(0.985); }

.card:focus-visible { outline: 2px solid #7c9cff; outline-offset: 2px; }

.card.picked {
  border-color: #7c9cff;
  box-shadow: 0 0 0 4px rgba(124, 156, 255, 0.25);
}

.vote-done {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: var(--fg);
}

.vote-note {
  margin: 0;
  min-height: 1.2rem;
  font-size: 0.875rem;
}

/* Roomier screens: side by side, the way the pair is described in the charter. */
@media (min-width: 34rem) {
  .cards { flex-direction: row; }
}
