@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,560;9..144,680&family=Outfit:wght@400;500;600&display=swap");

:root {
  --bg: #14110e;
  --surface: #1e1a16;
  --fg: #f3ead7;
  --muted: #a89880;
  --primary: #c4a265;
  --accent: #8f3d2c;
  --line: #322c26;
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Outfit", "Avenir Next", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
}

button, a { -webkit-tap-highlight-color: transparent; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

button:disabled { cursor: default; opacity: 0.5; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

img { max-width: 100%; display: block; }

.wrap {
  width: min(100% - 2.5rem, 64rem);
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

@media (min-width: 640px) {
  .wrap { width: min(100% - 4rem, 64rem); padding-top: 3rem; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand svg { width: 3.5rem; height: 3.5rem; flex: none; }

.kicker {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}

h1 {
  margin: 0.15rem 0 0;
  font-family: var(--display);
  font-size: 2.5rem;
  font-weight: 560;
  line-height: 1;
}

@media (min-width: 640px) {
  h1 { font-size: 3rem; }
}

.carousel { margin-top: 2rem; }

.frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}

.slide {
  position: absolute;
  inset: 0;
  color: inherit;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.slide.is-on { opacity: 1; pointer-events: auto; }

.slide img { width: 100%; height: 100%; object-fit: cover; }

.caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
}

@media (min-width: 640px) {
  .caption { padding: 1rem 1.5rem; }
}

.track {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}

.caption strong {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--display);
  font-size: 1.875rem;
  font-weight: 560;
  line-height: 1;
}

@media (min-width: 640px) {
  .caption strong { font-size: 2.25rem; }
}

.blurb {
  display: -webkit-box;
  margin-top: 0.5rem;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-width: 28rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
}

.open-phone {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
}

.open-desk { display: none; }

@media (min-width: 640px) {
  .open-phone { display: none; }
  .open-desk {
    display: inline-flex;
    align-items: center;
    height: 2.75rem;
    padding: 0 1.25rem;
    border-radius: 999px;
    background: var(--primary);
    color: var(--bg);
    font-weight: 500;
    flex: none;
  }
}

.arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  transform: translateY(-50%);
}

.arrow.prev { left: 0.75rem; }
.arrow.next { right: 0.75rem; }
.arrow svg, .icon-btn svg { width: 1.25rem; height: 1.25rem; }

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 0.75rem;
}

.dot, .icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
}

.icon-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.dot span {
  display: block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--line);
}

.dot[aria-current="true"] span { width: 1.5rem; background: var(--primary); }

.about { max-width: 36rem; margin-top: 2.5rem; }

.about h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.875rem;
  font-weight: 560;
  line-height: 1;
}

.about p {
  margin: 1rem 0 0;
  line-height: 1.6;
  color: var(--muted);
}

.contact {
  display: inline-flex;
  align-items: center;
  height: 2.75rem;
  margin-top: 1.5rem;
  color: var(--primary);
  font-weight: 500;
  text-underline-offset: 4px;
}

.contact span { margin-left: 0.5rem; color: var(--muted); font-weight: 400; text-decoration: none; }

.stage {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}

.top a, .top button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}

.titles { min-width: 0; flex: 1; }
.titles p { margin: 0; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary); }
.titles h1 { overflow: hidden; font-size: 1.5rem; text-overflow: ellipsis; white-space: nowrap; }

.tally-score { text-align: right; }
.tally-score strong { display: block; font-family: var(--display); font-size: 1.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.tally-score span { font-size: 0.75rem; color: var(--muted); }

.play {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  width: min(100%, 28rem);
  min-height: 0;
  margin: 0 auto;
  padding: 0 1rem;
}

.board {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  overflow: auto;
  padding: 0.5rem 0 1rem;
}

.meta, .hint, .fact { margin: 0; font-size: 0.875rem; line-height: 1.5; color: var(--muted); text-align: center; }
.fact { text-align: left; }

.choice, .prompt, .panel, .coin, .card, .tray {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}

.choice {
  min-height: 4rem;
  padding: 1rem;
  text-align: left;
}

.choice b { display: block; font-family: var(--display); font-size: 1.25rem; font-weight: 560; line-height: 1.2; }
.choice span { display: block; margin-top: 0.25rem; font-size: 0.875rem; color: var(--muted); }
.choice.is-right { border-color: var(--primary); }
.choice.is-wrong { border-color: var(--accent); }

.panel { padding: 1rem; text-align: center; }
.panel .due { margin: 0.25rem 0 0; font-family: var(--display); font-size: 2.5rem; line-height: 1; font-variant-numeric: tabular-nums; }

.coins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.coin { min-height: 4rem; padding: 0.75rem 0.5rem; background: var(--bg); }
.coin span { display: block; font-size: 0.875rem; }
.coin b { display: block; margin-top: 0.25rem; font-family: var(--display); font-size: 1.25rem; color: var(--primary); }

.tray { min-height: 4rem; padding: 0.75rem; background: var(--bg); text-align: left; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.chip {
  height: 2.75rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.875rem;
}

.prompt { padding: 1.25rem 1rem; font-family: var(--display); font-size: 1.5rem; line-height: 1.3; text-align: left; }

.stack { display: grid; gap: 0.5rem; }
.option {
  height: 3rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--bg);
}
.option.is-right { border-color: var(--primary); background: var(--surface); }
.option.is-wrong { border-color: var(--accent); background: var(--surface); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 5rem;
  padding: 0.5rem;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.25;
  text-align: center;
}
.card.is-up { background: var(--surface); color: var(--fg); }
.card.is-gone { border-color: var(--primary); background: var(--surface); color: var(--primary); }

.settle, .next {
  height: 3rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--bg);
  font-weight: 500;
}
.next { width: 100%; height: 2.75rem; margin-top: 1rem; }

.note-box { padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--bg); text-align: left; }

.foot {
  padding: 0.75rem 1rem max(1rem, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}

.veil {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
}

.veil[hidden] { display: none; }

.veil .panel { width: min(100%, 20rem); padding: 1.5rem; }
.veil h2 { margin: 0; font-family: var(--display); font-size: 1.875rem; line-height: 1; }
.veil .big { margin: 1rem 0 0; font-family: var(--display); font-size: 2.5rem; font-variant-numeric: tabular-nums; }

.missing { max-width: 28rem; margin: auto; padding: 1.5rem; }
.missing h1 { font-size: 1.875rem; }
.missing a { color: var(--primary); }

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