@font-face {
  font-family: 'Playfair Display';
  src: url('/playfair-bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #FAFAFA;
  --ink: #16171A;
  --text-2: #464646;
  --text-3: #707070;
  --surface: #FFFFFF;
  --control: #F3F3F3;
  --display: 'Playfair Display', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
.brand { font: 700 22px/1 var(--display); letter-spacing: -0.01em; }
.hero-fallback { width: 100%; height: 100%; object-fit: contain; }
#hero { flex: 1 1 0; width: 100%; min-height: 300px; }
/* Signal chip (QuizSignalChip): on a rival's icon, or .chip--card as the glass card's pill. */
.chip {
  position: absolute;
  padding: 5.3px 6.2px;
  border-radius: 999px;
  font: 700 13.8px/1.2 var(--sans);
  letter-spacing: -0.28px;
  white-space: nowrap;
}
.chip--card { position: static; padding: 4.5px 7px; font-size: 11px; letter-spacing: -0.1px; }

/* Welcome hero (QuizWelcomeHero): the 402 × 448 design canvas, scaled to fit by welcome.js (--s). */
.hero { position: relative; text-align: left; }
.hero__canvas {
  position: absolute; left: 50%; top: 50%;
  width: 402px; height: 448px;
  transform: translate(-50%, -50%) scale(var(--s, 1));
}
.hero__canvas > * { position: absolute; transform: translate(-50%, -50%) rotate(-5.24deg); }
.hero__still {
  left: 201px; top: 226px; width: 432.3px; height: 432.3px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 80%, transparent),
                      linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 80%, transparent),
              linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-composite: intersect;
}
.hero__soften {
  left: 204.4px; top: 273.2px; width: 274.5px; height: 174.3px;
  border-radius: 20.3px; background: rgba(255, 255, 255, .5); filter: blur(10.6px);
}
.hero__card {
  left: 196px; top: 273px; width: 236px; height: 160px;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 8px;
  color: #0B0B0E;
}
.hero__title { font: 500 24.7px/25.5px var(--sans); letter-spacing: -0.49px; }
.hero__line { font: 400 14.1px/20px var(--sans); letter-spacing: -0.28px; }
.hero .word { display: inline-block; white-space: nowrap; }
.hero .word > span { display: inline-block; }

/* Keep the app's welcome composition on the public home page. */
.welcome {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 440px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.welcome .hero { flex: 1 1 0; width: calc(100% + 48px); margin: 0 -24px; min-height: 300px; }
.welcome__content { flex-shrink: 0; width: 100%; }
.welcome__headline {
  font: 700 clamp(22px, 9.4vw, 36px)/1.06 var(--display);
  letter-spacing: -0.72px;
  text-wrap: balance;
}
.welcome__headline span { display: block; }
.welcome__lede { max-width: 300px; margin: 20px auto 0; color: var(--text-2); line-height: 1.5; text-wrap: pretty; }
.download { margin-top: 32px; }
.store-badge { display: inline-block; border-radius: 8px; vertical-align: top; }
.store-badge img { display: block; width: 180px; height: auto; }
.availability { margin-top: 12px; color: var(--text-3); font-size: 14px; }
.site-footer { flex-shrink: 0; padding-top: 24px; }
.site-footer nav { display: flex; justify-content: center; flex-wrap: wrap; column-gap: 24px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

dialog {
  margin: auto;
  width: min(400px, calc(100% - 40px));
  max-height: calc(100dvh - 32px);
  padding: 56px 32px 32px;
  border: 0;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgb(16 17 20 / 18%);
  color: var(--ink);
  text-align: center;
}
dialog::backdrop { background: rgb(22 23 26 / 30%); backdrop-filter: blur(6px); }
dialog h2 { max-width: 280px; margin: 0 auto; font: 700 28px/1.18 var(--display); letter-spacing: -.02em; text-wrap: balance; }
dialog p { max-width: 280px; margin: 16px auto 0; color: var(--text-2); font-size: 16px; line-height: 1.5; text-wrap: pretty; }
dialog .availability { margin-top: 16px; color: var(--text-3); font-size: 14px; }
.dialog-close {
  position: absolute; top: 12px; right: 12px;
  width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  background: var(--control); color: var(--ink);
  font: 26px/1 var(--sans); cursor: pointer;
}
.dialog-close:hover { background: #E8E8E8; }
.download-qr { display: block; width: 248px; max-width: 100%; height: auto; margin: 24px auto 8px; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 500; }

.legal { max-width: 704px; margin: 0 auto; padding: 32px 28px 48px; overflow-wrap: anywhere; }
.legal > header { margin-bottom: 64px; }
.legal > header a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.legal h1 { margin-bottom: 16px; font: 700 clamp(36px, 7vw, 48px)/1.15 var(--display); letter-spacing: -.02em; }
.legal h2 { margin: 40px 0 12px; font: 600 22px/1.3 var(--sans); letter-spacing: -.015em; text-wrap: balance; }
.legal p, .legal li { margin-top: 16px; color: var(--text-2); line-height: 1.7; }
.legal p a, .legal li a { color: var(--ink); }
.legal > .meta + p { margin-top: 32px; }
.legal ul, .legal ol { padding-left: 24px; }
.legal .meta { color: var(--text-3); font-size: 14px; }
.legal .site-footer { margin-top: 48px; border-top: 1px solid #E6E6E6; }

@media (max-width: 480px) {
  .welcome { padding-left: 20px; padding-right: 20px; }
  .welcome .hero { width: calc(100% + 40px); margin-left: -20px; margin-right: -20px; }
  .welcome__headline { font-size: clamp(26px, 8.5vw, 36px); }
  .legal { padding: 24px 24px 32px; }
  .legal > header { margin-bottom: 40px; }
  dialog { padding-left: 24px; padding-right: 24px; }
}

@media (prefers-reduced-motion: no-preference) {
  .store-badge { transition: opacity .16s ease-out; }
  .store-badge:hover { opacity: .85; }
  dialog[open] { animation: dialog-arrive .22s cubic-bezier(.16, 1, .3, 1) both; }
  dialog[open]::backdrop { animation: backdrop-arrive .22s ease-out both; }
}
@keyframes dialog-arrive { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes backdrop-arrive { from { opacity: 0; } to { opacity: 1; } }
