/* The source-derived Paper icon anchors the table, not a gameplay mockup. */
@font-face {
  font-family: "Outfit";
  src: url("/site-assets/Outfit_700Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-paper: #F4EFE6;
  --bg-paper-card: #FFFCF6;
  --bg-paper-subtle: #EAE3D5;
  --text-ink: #231F1A;
  --text-ink-muted: #5C554E;
  --coral: #EE8063;
  --coral-hover: #E57357;
  --border-paper: #DCD3C3;
  --font-heading: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-w: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-paper);
  color: var(--text-ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; line-height: 1.15; }
h2 { font-size: clamp(1.6rem, 2.4vw, 2rem); letter-spacing: -0.025em; }
h3 { font-size: 1.2rem; letter-spacing: -0.015em; }
p { max-width: 72ch; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--text-ink);
  outline-offset: 4px;
}
.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  background: var(--text-ink);
  color: var(--bg-paper);
  border-radius: 8px;
  z-index: 100;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--border-paper); }
.header-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.15rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
}
.brand-icon { flex: none; width: 36px; height: 36px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: 1.25rem; }
.nav-app-link { font-size: 0.9rem; text-underline-offset: 4px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.3rem;
  border: 1.5px solid transparent;
  border-radius: 9px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.btn-primary { background: var(--coral); color: var(--text-ink); }
.btn-primary:hover { background: var(--coral-hover); }
.btn-secondary { border-color: var(--text-ink); color: var(--text-ink); }
.btn-secondary:hover { background: var(--bg-paper-subtle); }
.btn-sm { min-height: 44px; padding: 0.6rem 1rem; font-size: 0.875rem; }
.btn-disabled {
  border-color: var(--border-paper);
  color: var(--text-ink-muted);
  background: var(--bg-paper-subtle);
  cursor: default;
  pointer-events: none;
}

.main-content {
  flex: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}
.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 2rem;
  padding: 5rem 0 4.5rem;
}
.hero-title {
  font-size: clamp(2.6rem, 4.3vw, 3.85rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
  max-width: 13ch;
}
.hero-subtitle { font-size: 1.12rem; color: var(--text-ink-muted); max-width: 43ch; margin-top: 1.6rem; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 2rem; }
.hero-note { margin-top: 1.25rem; color: var(--text-ink-muted); font-size: 0.85rem; max-width: 43ch; }
.hero-table { min-width: 0; text-align: center; }
.table-art { width: min(100%, 440px); aspect-ratio: 1; margin: 0 auto; position: relative; }
.table-surface {
  position: absolute;
  inset: 8%;
  border: 2px solid var(--text-ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-paper);
}
.hero-icon { width: 90%; height: 90%; border-radius: 50%; object-fit: contain; }
.table-seat {
  position: absolute;
  width: 18%;
  height: 5%;
  border: 2px solid var(--text-ink);
  border-radius: 18px;
  background: var(--bg-paper-subtle);
}
.seat-top { left: 41%; top: 0; }
.seat-bottom { left: 41%; bottom: 0; background: var(--coral); }
.seat-left { left: -6.5%; top: 47.5%; transform: rotate(90deg); }
.seat-right { right: -6.5%; top: 47.5%; transform: rotate(90deg); }
.hero-table figcaption { margin-top: 1.25rem; color: var(--text-ink-muted); font-size: 0.875rem; }

.room-section { border-top: 1px solid var(--border-paper); padding: 3.5rem 0 3rem; }
.section-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.section-intro p { color: var(--text-ink-muted); max-width: 46ch; }
.room-steps { list-style: none; counter-reset: room-step; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.room-steps li { counter-increment: room-step; border-top: 2px solid var(--text-ink); padding-top: 1rem; }
.room-steps li::before {
  content: counter(room-step);
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 1rem;
  border-radius: 8px;
  background: var(--bg-paper-subtle);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
}
.room-steps h3 { margin-bottom: 0.75rem; }
.room-steps p { color: var(--text-ink-muted); font-size: 0.95rem; }
.late-join-note { margin-top: 2rem; color: var(--text-ink-muted); font-size: 0.9rem; }
.play-section { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; padding: 3rem 0; border-top: 1px solid var(--border-paper); }
.play-detail { min-width: 0; }
.play-detail h2 { max-width: 18ch; }
.play-detail p { margin-top: 1.25rem; color: var(--text-ink-muted); max-width: 49ch; }
.closing-section { border-top: 1px solid var(--border-paper); padding: 3rem 0 1rem; display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
.closing-section h2 { max-width: 22ch; }

.site-footer { border-top: 1px solid var(--border-paper); padding: 1.8rem 1.5rem; margin-top: auto; }
.footer-container { max-width: var(--max-w); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-links a { font-size: 0.875rem; color: var(--text-ink-muted); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.footer-links a:hover { color: var(--text-ink); }
.footer-copy { font-size: 0.8rem; color: var(--text-ink-muted); }

.install-container { max-width: 540px; margin: 3.5rem auto 0; text-align: center; }
.install-icon { margin: 0 auto 1.25rem; border-radius: 24px; }
.install-title { font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -0.035em; }
.install-intro { margin: 1rem auto 1.5rem; color: var(--text-ink-muted); max-width: 41ch; }
.install-buttons { display: grid; gap: 1.25rem; max-width: 380px; margin: 1.75rem auto; }
.install-buttons .btn { width: 100%; }
.store-option { display: grid; gap: 0.5rem; }
.badge-unavailable { font-size: 0.825rem; color: var(--text-ink-muted); }
.status-message { padding: 0.875rem 1rem; border-radius: 9px; font-size: 0.9rem; text-align: left; }
.status-message.info { background: var(--bg-paper-subtle); color: var(--text-ink); }
.status-message.error { background: #F8D6D0; color: #702617; }
.qr-section { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border-paper); display: flex; flex-direction: column; align-items: center; }
.qr-section h2 { font-size: 1.25rem; }
.qr-section p { font-size: 0.875rem; color: var(--text-ink-muted); }
.qr-code-img { width: 180px; height: 180px; border-radius: 8px; background: #fff; padding: 0.5rem; border: 1px solid var(--border-paper); margin: 1rem 0; }
.install-help { margin: 1.25rem auto 0; color: var(--text-ink-muted); font-size: 0.8rem; max-width: 50ch; }
.install-help a { text-underline-offset: 3px; }

.error-page { text-align: center; padding: 5rem 0 3rem; max-width: 520px; margin: 0 auto; }
.error-code { font-family: var(--font-heading); font-weight: 700; font-size: 5rem; color: var(--text-ink); line-height: 1; margin-bottom: 1.25rem; }
.error-title { font-size: 2rem; letter-spacing: -0.03em; }
.error-desc { color: var(--text-ink-muted); margin: 1rem auto 2rem; max-width: 40ch; }
.error-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* Shared document styles keep policy pages readable without card chrome. */
.legal-page { max-width: 840px; padding-top: 3.5rem; }
.legal-page h1 { font-size: clamp(2.1rem, 5vw, 3rem); letter-spacing: -0.035em; margin-bottom: 1rem; }
.legal-meta { font-size: 0.875rem; color: var(--text-ink-muted); margin-bottom: 1.5rem; }
.legal-intro { font-size: 1.125rem; color: var(--text-ink-muted); margin-bottom: 2rem; }
.legal-page p { margin: 0.9rem 0; overflow-wrap: anywhere; }
.legal-page a { text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-page a:hover { text-decoration-thickness: 2px; }
.legal-page h2 { font-size: 1.5rem; margin: 2.5rem 0 0.9rem; }
.legal-page h3 { margin: 1.5rem 0 0.75rem; }
.legal-page ul, .legal-page ol { padding-left: 1.4rem; margin: 1rem 0; }
.legal-page li { margin: 0.55rem 0; overflow-wrap: anywhere; }
.legal-page code { font-size: 0.9em; border-radius: 4px; background: var(--bg-paper-subtle); padding: 0.1em 0.35em; overflow-wrap: anywhere; }
.legal-callout { border-left: 3px solid var(--coral); background: var(--bg-paper-subtle); padding: 0.65rem 1.25rem; margin: 1.5rem 0; }
.legal-section { margin-top: 2rem; }
.legal-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.legal-actions .btn { text-decoration: none; }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; gap: 2.5rem; padding: 3.5rem 0 3rem; }
  .hero-copy { max-width: 580px; }
  .hero-title { max-width: 18ch; }
  .hero-subtitle { max-width: 47ch; }
  .hero-table { width: min(100%, 390px); justify-self: center; }
  .section-intro { grid-template-columns: 1fr; gap: 1rem; }
  .room-steps { gap: 1.25rem; }
  .play-section { gap: 2rem; }
}
@media (max-width: 540px) {
  .header-container { padding: 0.9rem 1.1rem; gap: 0.75rem; }
  .brand-link { font-size: 1.15rem; }
  .nav-links { width: 100%; justify-content: space-between; gap: 0.75rem; }
  .main-content { padding-left: 1.1rem; padding-right: 1.1rem; padding-bottom: 3rem; }
  .hero { padding-top: 2.5rem; }
  .hero-title { font-size: clamp(2.35rem, 9.5vw, 3rem); }
  .hero-subtitle { font-size: 1rem; margin-top: 1.2rem; }
  .hero-actions { margin-top: 1.5rem; gap: 0.6rem; }
  .hero-actions .btn { font-size: 0.9rem; padding: 0.8rem 1.05rem; }
  .hero-table { width: min(100%, 330px); }
  .room-section { padding-top: 2.5rem; }
  .room-steps { grid-template-columns: 1fr; gap: 1.5rem; margin-top: 2rem; }
  .room-steps li { padding-left: 2.75rem; position: relative; }
  .room-steps li::before { position: absolute; left: 0; top: 1rem; margin: 0; }
  .play-section { grid-template-columns: 1fr; gap: 2.5rem; padding: 2.5rem 0; }
  .play-detail h2 { max-width: 22ch; }
  .closing-section { flex-direction: column; align-items: flex-start; gap: 1.5rem; padding-top: 2.5rem; }
  .site-footer { padding: 1.5rem 1.1rem; }
  .footer-links { gap: 0.85rem 1.2rem; }
  .install-container { margin-top: 2.5rem; }
  .legal-page { padding-top: 2.5rem; }
  .legal-intro { font-size: 1rem; }
  .legal-callout { padding-left: 1rem; padding-right: 1rem; }
  .error-page { padding-top: 3.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
