:root {
  --bg: #120c14;
  --bg-2: #1c141e;
  --cream: #f4ead6;
  --ink: #1c1410;
  --muted: #8a7d72;
  --gold: #c9a227;
  --gold-2: #e8c547;
  --yes: #2f6f4e;
  --no: #6b2a32;
  --display: "Fraunces", Georgia, serif;
  --sans: "Outfit", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  -webkit-tap-highlight-color: transparent;
}

body {
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(201, 162, 39, 0.16), transparent 55%),
    var(--bg);
}

.app {
  width: min(430px, 100%);
  margin: 0 auto;
  min-height: 100dvh;
  padding: 1rem 1rem 1.4rem;
  display: flex;
  flex-direction: column;
}

.screen { display: none; flex: 1; flex-direction: column; }
.screen.on { display: flex; }

.kicker {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0.4rem 0 0.5rem;
}

h1, h2 {
  font-family: var(--display);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}

h1 { font-size: clamp(2.4rem, 10vw, 3.3rem); }

.lede {
  color: #cfc4b4;
  line-height: 1.5;
  margin: 0.9rem 0 1.6rem;
  overflow-wrap: break-word;
}

.dots {
  display: flex;
  gap: 0.4rem;
  margin: 0.4rem 0 0.9rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(244, 234, 214, 0.18);
}
.dot.on { background: var(--gold); }
.dot.done { background: var(--cream); }

.card {
  background: var(--cream);
  color: var(--ink);
  border-radius: 18px;
  padding: 0.85rem 0.75rem 0.9rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.55rem;
  padding: 0 0.2rem;
}

.card-top .which {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-top .key {
  font-family: var(--display);
  font-size: 1.35rem;
  color: #8a6a10;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.28rem;
  flex: 1;
}

.cell {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(28, 20, 16, 0.05);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: clamp(0.95rem, 3.8vw, 1.15rem);
}

.cell.corner {
  background: #c9a227;
  color: #1c1410;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
}

.ask {
  text-align: center;
  margin: 1rem 0 0.85rem;
  font-size: 1.05rem;
}

.choices {
  display: grid;
  gap: 0.7rem;
}

.pic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin: 0 0 1.1rem;
}

.pic-grid img,
.grid.pics img,
.reveal-pic {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  background: var(--cream);
}

.grid.pics {
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
}

.card.pics {
  padding: 0.65rem;
}

.reveal-pic {
  width: min(70vw, 280px);
  margin: 0.8rem auto 1.2rem;
  display: block;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.reveal-pic[hidden],
.big[hidden] {
  display: none;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

#play .btn.ghost,
#intro-number .btn.ghost,
#intro-picture .btn.ghost,
#reveal .btn.ghost {
  margin-top: 0.65rem;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
}

.btn {
  min-height: 56px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
}

.btn.gold {
  background: var(--gold);
  color: #1c1410;
}

.btn.ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(244, 234, 214, 0.25);
}

.btn.yes { background: var(--yes); color: #f4ead6; }
.btn.no { background: var(--no); color: #f4ead6; }

.btn:active { transform: scale(0.97); }

.reveal-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.big {
  font-family: var(--display);
  font-size: clamp(5rem, 28vw, 8rem);
  line-height: 0.9;
  color: var(--gold-2);
  margin: 0.4rem 0 0.6rem;
}

.sum {
  color: #cfc4b4;
  font-variant-numeric: tabular-nums;
  min-height: 1.4rem;
}

.how {
  margin-top: 1.4rem;
  color: #a3988c;
  font-size: 0.9rem;
  line-height: 1.45;
  max-width: 22rem;
}
