:root {
  --background: #faf5f0;
  --surface: #ffffff;
  --surface-soft: #fdfbf7;
  --primary: #ff6f3c;
  --primary-dark: #d94f21;
  --secondary: #f5e8e2;
  --gold: #ffb800;
  --gold-dark: #d98a00;
  --success: #4caf50;
  --error: #e53935;
  --ink: #2e2522;
  --muted: #746965;
  --line: #eadfd8;
  --shadow: rgba(78, 63, 58, 0.12);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --content: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 184, 0, 0.13), transparent 24rem),
    radial-gradient(circle at 92% 22%, rgba(255, 111, 60, 0.11), transparent 26rem),
    var(--background);
  color: var(--ink);
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(46, 37, 34, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 37, 34, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  pointer-events: none;
}

a {
  color: #ad3c17;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--primary-dark);
}

button,
input,
textarea {
  font: inherit;
}

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

:focus-visible {
  outline: 4px solid rgba(255, 184, 0, 0.6);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(234, 223, 216, 0.85);
  background: rgba(250, 245, 240, 0.94);
  backdrop-filter: blur(16px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 36px), var(--content));
  min-height: 76px;
  margin-inline: auto;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(217, 79, 33, 0.35);
  border-radius: 11px;
  background: url("assets/pabble-icon.png") center / cover no-repeat;
  box-shadow: 0 4px 0 rgba(217, 79, 33, 0.45);
  color: transparent;
  font-size: 0;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--secondary);
  color: var(--primary-dark);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 900;
}

.container {
  width: min(calc(100% - 36px), var(--content));
  margin-inline: auto;
}

.hero {
  display: grid;
  min-height: 720px;
  align-items: center;
  padding: 72px 0 104px;
}

.home-page .hero {
  min-height: calc(100svh - 77px);
}

.hero-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-copy {
  display: flex;
  width: min(100%, 820px);
  align-items: center;
  flex-direction: column;
}

.hero-app-icon {
  width: clamp(150px, 20vw, 220px);
  height: auto;
  margin-bottom: 30px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 24%;
  box-shadow: 0 18px 45px rgba(151, 73, 25, 0.22), 0 8px 0 rgba(217, 79, 33, 0.28);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 18px;
  padding: 7px 12px;
  border: 1px solid #ffd3c4;
  border-radius: 999px;
  background: #fff5f1;
  color: #a83b18;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.08;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(3rem, 7vw, 6rem);
  letter-spacing: -0.06em;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.04em;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

.hero h1 {
  text-wrap: balance;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 620px;
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 14px;
}

.app-store-badge {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  box-shadow: 0 9px 20px rgba(46, 37, 34, 0.16);
  cursor: not-allowed;
  line-height: 0;
}

.app-store-badge img {
  display: block;
  width: clamp(230px, 22vw, 260px);
  max-width: calc(100vw - 52px);
  height: auto;
}

.app-store-badge:disabled {
  opacity: 1;
}

.hero-copy .app-store-status {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 800;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.button-row-centered {
  justify-content: center;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 2px solid transparent;
  border-radius: 15px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  border-color: var(--primary-dark);
  background: var(--primary);
  box-shadow: 0 5px 0 var(--primary-dark);
  color: #fff;
}

.button-primary:hover {
  color: #fff;
  transform: translateY(1px);
  box-shadow: 0 4px 0 var(--primary-dark);
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 4px 0 #dfd3cc;
}

.button-secondary:hover {
  color: var(--primary-dark);
  transform: translateY(1px);
}

.game-card {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 52px);
  border: 2px solid var(--line);
  border-radius: 38px;
  background: var(--surface);
  box-shadow: 0 24px 55px var(--shadow), 0 8px 0 #e8ddd7;
}

.game-card::before {
  position: absolute;
  top: -90px;
  right: -70px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 184, 0, 0.16);
  content: "";
}

.game-label {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tile-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(5px, 1.4vw, 9px);
  margin-bottom: 32px;
}

.letter-tile {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid var(--gold-dark);
  border-radius: clamp(9px, 2vw, 15px);
  background: var(--gold);
  box-shadow: 0 6px 0 var(--gold-dark);
  color: #fff;
  font-size: clamp(1.3rem, 4vw, 2.2rem);
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(99, 53, 0, 0.24);
}

.match-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  gap: 16px;
}

.match-line:last-child {
  padding-bottom: 0;
}

.match-line strong {
  display: block;
  line-height: 1.2;
}

.match-line span {
  color: var(--muted);
  font-size: 0.9rem;
}

.score {
  min-width: 48px;
  color: var(--primary-dark) !important;
  font-size: 1.45rem !important;
  font-weight: 900;
  text-align: right;
}

.section {
  padding: 92px 0;
}

.section-tight {
  padding: 68px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 38px;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.info-card {
  min-height: 250px;
  padding: 28px;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 7px 0 #e8ddd7;
}

.info-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.card-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 15px;
  background: var(--secondary);
  color: var(--primary-dark);
  font-size: 1.4rem;
  font-weight: 900;
}

.split-banner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: clamp(30px, 5vw, 54px);
  border: 2px solid #442f28;
  border-radius: var(--radius-lg);
  background: var(--ink);
  box-shadow: 0 8px 0 #120d0b;
  gap: 30px;
}

.split-banner h2,
.split-banner p {
  color: #fff;
}

.split-banner h2 {
  margin-bottom: 10px;
}

.split-banner p {
  max-width: 680px;
  margin: 0;
  opacity: 0.75;
}

.page-hero {
  padding: 78px 0 52px;
}

.page-hero h1 {
  max-width: 850px;
  margin-bottom: 18px;
  font-size: clamp(2.7rem, 6vw, 5rem);
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1.14rem;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  margin-top: 22px;
  gap: 10px;
}

.meta-chip {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.legal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
  padding-bottom: 100px;
  gap: 38px;
}

.toc {
  position: sticky;
  top: 104px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.78);
}

.toc strong {
  display: block;
  margin-bottom: 10px;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  padding: 6px 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.toc a:hover {
  color: var(--primary-dark);
}

.legal-card {
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 8px 0 #e8ddd7;
}

.legal-section {
  padding: clamp(26px, 5vw, 48px);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 105px;
}

.legal-section:last-child {
  border-bottom: 0;
}

.legal-section h2 {
  font-size: clamp(1.65rem, 3vw, 2.3rem);
}

.legal-section h3 {
  margin-top: 28px;
}

.legal-section p:last-child,
.legal-section ul:last-child {
  margin-bottom: 0;
}

.legal-section li + li {
  margin-top: 10px;
}

.notice {
  margin: 22px 0;
  padding: 18px 20px;
  border-left: 5px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: #fff5f1;
}

.notice-gold {
  border-left-color: var(--gold-dark);
  background: #fff9df;
}

.data-table-wrap {
  overflow-x: auto;
  margin: 22px 0;
}

.data-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  padding: 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: var(--surface-soft);
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding-bottom: 90px;
}

.support-card {
  padding: 30px;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 7px 0 #e8ddd7;
}

.support-card p {
  color: var(--muted);
}

.support-card .button {
  margin-top: 8px;
}

.form-card {
  max-width: 780px;
  margin-bottom: 100px;
  padding: clamp(24px, 5vw, 44px);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 8px 0 #e8ddd7;
}

.field {
  margin-bottom: 20px;
}

.field label,
.checkbox-field label {
  display: block;
  margin-bottom: 7px;
  font-weight: 900;
}

.field input,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 2px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--ink);
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--gold-dark);
  outline: 3px solid rgba(255, 184, 0, 0.23);
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  margin: 24px 0;
  gap: 11px;
}

.checkbox-field input {
  width: 20px;
  height: 20px;
  margin-top: 4px;
  accent-color: var(--primary);
}

.checkbox-field label {
  margin: 0;
  font-size: 0.92rem;
}

.form-status {
  min-height: 28px;
  margin: 16px 0 0;
  color: var(--primary-dark);
  font-weight: 800;
}

.faq-list {
  display: grid;
  margin: 0;
  gap: 12px;
}

.faq-list details {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 900;
}

.faq-list details p {
  margin-bottom: 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.52);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  padding: 54px 0 34px;
  gap: 36px;
}

.footer-grid h2,
.footer-grid h3 {
  font-size: 1rem;
  letter-spacing: 0;
}

.footer-grid p {
  max-width: 440px;
  color: var(--muted);
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li + li {
  margin-top: 8px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--primary-dark);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  gap: 20px;
}

.error-page {
  display: grid;
  min-height: calc(100vh - 77px);
  place-items: center;
  padding: 60px 0;
  text-align: center;
}

.error-tile {
  display: grid;
  width: 130px;
  height: 130px;
  margin: 0 auto 30px;
  place-items: center;
  border: 3px solid var(--gold-dark);
  border-radius: 26px;
  background: var(--gold);
  box-shadow: 0 9px 0 var(--gold-dark);
  color: #fff;
  font-size: 3rem;
  font-weight: 900;
}

.error-page h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
}

.error-page p {
  max-width: 520px;
  margin: 0 auto 28px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    right: 18px;
    left: 18px;
    display: none;
    align-items: stretch;
    padding: 12px;
    border: 2px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: 0 16px 35px var(--shadow);
    flex-direction: column;
  }

  .nav-links[data-open="true"] {
    display: flex;
  }

  .nav-links a {
    padding: 12px 14px;
  }

  .hero {
    min-height: auto;
    padding-top: 62px;
  }

  .legal-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-copy .eyebrow,
  .hero-copy > p:not(.eyebrow) {
    margin-inline: auto;
  }

  .hero-copy .button-row {
    justify-content: center;
  }

  .toc {
    position: static;
  }

  .toc ul {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    gap: 14px;
  }

  .toc a {
    white-space: nowrap;
  }

  .card-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .info-card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .nav-shell,
  .container {
    width: min(calc(100% - 26px), var(--content));
  }

  .brand-word {
    display: none;
  }

  .hero,
  .section {
    padding-block: 64px;
  }

  h1 {
    font-size: clamp(2.7rem, 16vw, 4.3rem);
  }

  .support-grid,
  .split-banner {
    grid-template-columns: 1fr;
  }

  .button-row .button,
  .form-card .button {
    width: 100%;
  }

  .page-hero {
    padding-top: 56px;
  }

  .legal-section {
    padding-inline: 22px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
