/* Shared quiz chrome — matches /memory/ */
:root {
  --paper: #faf6f3;
  --paper-warm: #f6eee9;
  --cream: #fffaf7;
  --ink: #3a2c2e;
  --ink-soft: #6d5a5c;
  --line: #e8d5d0;
  --accent: #b56e7a;
  --accent-hover: #9a5562;
  --gold: #c9a66b;
  --gold-soft: #e8d5a8;
  --gold-deep: #8a7040;
  --shadow: 0 10px 24px rgba(58, 44, 46, 0.08);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 50% -8%, var(--paper-warm), transparent 55%),
    var(--paper);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

.app {
  width: min(26.5rem, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: max(0.8rem, env(safe-area-inset-top)) 0 max(1rem, env(safe-area-inset-bottom));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.mark {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(58, 44, 46, 0.08);
}

.eyebrow {
  margin: 0 0 0.1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
}

h1 { font-size: 1.65rem; }

h2 {
  font-size: clamp(1.8rem, 6vw, 2.3rem);
  margin: 0 0 0.65rem;
}

.bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin-bottom: 0.8rem;
}

.lead,
.foot,
.win-copy,
.win-note,
.win-stat,
.intro-copy,
.disclaimer { color: var(--ink-soft); }

.lead,
.moves {
  margin: 0;
  font-size: 0.92rem;
}

.moves {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.moves strong {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
}

.new-game,
.sound-btn {
  color: var(--gold-deep);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.new-game { margin-left: auto; }

.sound-btn {
  margin-left: 0.35rem;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.disclaimer {
  margin: -0.25rem 0 0.75rem;
  font-size: 0.78rem;
}

.home-link { color: inherit; text-decoration: none; }
.home-link:hover { color: var(--accent); }

.intro {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  text-align: center;
  padding: 1.2rem 0 1.6rem;
}

.intro-mark {
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 0.6rem;
  object-fit: cover;
  margin: 0 auto 1rem;
  box-shadow: 0 0 0 1px rgba(58, 44, 46, 0.08), var(--shadow);
}

.intro h2 {
  font-size: clamp(1.7rem, 6vw, 2.1rem);
  margin-bottom: 0.7rem;
}

.intro-copy {
  margin: 0 0 0.7rem;
  font-size: 1.02rem;
}

.quiz {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.prompt {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 8vw, 2.55rem);
  font-weight: 600;
  text-align: center;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 1.15rem 0 1.25rem;
}

.prompt .seq { letter-spacing: 0.02em; }

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.choice {
  min-height: 4.25rem;
  padding: 0.7rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(201, 166, 107, 0.55);
  background: radial-gradient(80% 90% at 50% 0%, #fff 0%, var(--cream) 70%);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.choice:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.choice:disabled { cursor: default; }

.choice.is-correct {
  border-color: var(--gold);
  background: #f8f1e2;
  color: var(--gold-deep);
  box-shadow: 0 0 0 1px var(--gold-soft), var(--shadow);
}

.choice.is-wrong {
  border-color: var(--accent);
  background: #f7e6e8;
  color: var(--accent);
}

.foot {
  margin: auto 0 0;
  padding-top: 0.85rem;
  text-align: center;
  font-size: 0.82rem;
}

.foot a {
  color: var(--gold-deep);
  font-weight: 600;
  text-decoration: none;
}

.foot a:hover { color: var(--ink); }

.win {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 1.1rem;
  background: rgba(58, 44, 46, 0.28);
  backdrop-filter: blur(6px);
}

.win[hidden] { display: none; }

.win-card {
  width: min(26rem, 100%);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.2rem 1.25rem;
  text-align: center;
}

.win-logo {
  display: block;
  width: min(11rem, 58%);
  height: auto;
  margin: 0 auto 0.5rem;
}

.win-band {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  color: var(--ink);
}

.win-band strong {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent);
}

.win-copy {
  margin: 0 0 0.85rem;
  font-size: 0.98rem;
}

.win-stat {
  margin: 0 0 1.05rem;
  font-size: 0.92rem;
}

.win-stat strong {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.15rem;
}

.win-note {
  margin: 1rem 0 0;
  font-size: 0.78rem;
}

.win-actions { display: grid; gap: 0.55rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.7rem 1.15rem;
  border-radius: 4px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary { background: var(--accent); color: #fffaf7; }
.btn-primary:hover { background: var(--accent-hover); color: #fffaf7; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--cream); }
.btn-text { background: transparent; color: var(--gold-deep); border: 0; min-height: 2.4rem; }
.btn-text:hover { color: var(--ink); }

[hidden] { display: none !important; }

@media (min-width: 520px) {
  .app {
    width: min(26rem, calc(100% - 2.5rem));
    padding-top: 1.35rem;
  }
}

@media (max-height: 700px) {
  h1 { font-size: 1.4rem; }
  .app { padding-top: 0.55rem; }
  .prompt { margin-top: 0.6rem; font-size: 1.7rem; }
  .choice { min-height: 3.6rem; font-size: 1.45rem; }
}
