:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #171717;
  background: #F7F5F0;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --page: #F7F5F0;
  --card: #FFFFFF;
  --screen: #FBF9F5;
  --ink: #171717;
  --muted: #71685F;
  --line: #E8E2D9;
  --coral: #FF5A4F;
  --coral-link: #C5332B;
  --streak: #F6A623;
  --measure: 70ch;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
  background: var(--page);
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { color: var(--ink); background: #FFD6CE; }

a {
  color: var(--coral-link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:hover { text-decoration-thickness: 0.13em; }

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--coral-link);
  outline-offset: 4px;
  border-radius: 4px;
}

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

.site-width { width: min(100% - 48px, 1120px); margin-inline: auto; }

.skip-link {
  position: absolute;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 0.7rem 1rem;
  transform: translateY(-160%);
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.site-header {
  width: min(100% - 48px, 1240px);
  min-height: 88px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.brand img { width: 42px; height: 42px; object-fit: contain; }

.main-nav,
.footer-inner nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
}

.main-nav a,
.footer-inner nav a {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 650;
  text-decoration: none;
}

.main-nav a[aria-current="page"],
.footer-inner nav a[aria-current="page"] { color: var(--coral-link); }

.hero {
  min-height: 690px;
  padding-block: 4.6rem 5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.84fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
}

.hero-copy { max-width: 600px; }

h1, h2, p { margin-top: 0; }

.hero h1 {
  max-width: 8ch;
  margin-bottom: 1.35rem;
  font-size: clamp(3.4rem, 7.4vw, 6rem);
  font-weight: 850;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.hero-lead,
.page-lead {
  max-width: 39ch;
  margin-bottom: 1.8rem;
  color: var(--muted);
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  line-height: 1.55;
}

.button-link {
  min-height: 52px;
  padding: 0.82rem 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: var(--coral);
  border: 1px solid #E84940;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 760;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

.button-link:hover { background: #FF766D; transform: translateY(-1px); }

.game-list {
  width: 116px;
  flex: 0 0 116px;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  list-style: none;
}

.game-list li {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
}

.game-list img { width: 36px; height: 36px; flex: 0 0 36px; object-fit: contain; }

.feature-device { display: grid; justify-items: center; }

.hero-device {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.65rem, 1.8vw, 1.25rem);
}

.hero-phone {
  min-width: 0;
  width: min(100%, 302px);
  max-width: 302px;
  flex: 1 1 302px;
  margin: 0;
  display: grid;
  justify-items: center;
}

.app-mockup { display: block; width: 100%; height: auto; }

.mockup-figure {
  width: min(100%, 258px);
  margin: 0;
  display: grid;
  justify-items: center;
}

.mockup-figure figcaption {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  text-align: center;
}

.feature-device--pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.feature-device--pair .mockup-figure {
  width: calc(50% - 0.325rem);
  max-width: 220px;
}

.device-caption {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 650;
  text-align: center;
}

.feature-section { padding-block: 5.75rem; border-top: 1px solid var(--line); }
.feature-section--character { background: var(--card); }

.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.85fr);
  align-items: center;
  gap: clamp(2.5rem, 9vw, 8rem);
}

.feature-row--reverse .feature-copy { order: 2; }
.feature-row--reverse .feature-device { order: 1; }
.feature-copy { max-width: 500px; }

.feature-copy h2 {
  max-width: 10ch;
  margin-bottom: 1rem;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 820;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.feature-copy p {
  max-width: 40ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.65;
}

.supporting-art {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 720;
}

.supporting-art img { width: 48px; height: 48px; object-fit: contain; }

.site-footer {
  padding-block: 2rem;
  background: var(--page);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand--footer { font-size: 0.95rem; }
.brand--footer img { width: 32px; height: 32px; }
.footer-inner p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.footer-inner nav { gap: 1.3rem; }
.footer-inner nav a { font-size: 0.88rem; }

.reading-page {
  max-width: 760px;
  padding-block: 4.8rem 6rem;
}

.reading-page h1 {
  max-width: 14ch;
  margin-bottom: 0.7rem;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  font-weight: 840;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.reading-page .page-lead { margin-bottom: 2.4rem; }

.reading-page h2 {
  margin: 2.8rem 0 0.8rem;
  font-size: 1.55rem;
  font-weight: 790;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.tutorial-scoring {
  max-width: var(--measure);
  margin-bottom: 2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}

.tutorial-list { border-top: 1px solid var(--line); }

.tutorial-entry {
  padding-block: 2.2rem;
  border-bottom: 1px solid var(--line);
}

.tutorial-entry h2 {
  max-width: none;
  margin: 0 0 1.1rem;
  font-size: clamp(1.8rem, 4vw, 2.25rem);
  letter-spacing: -0.035em;
}

.tutorial-entry h3 {
  margin: 1.15rem 0 0.35rem;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 740;
}

.tutorial-entry h3:first-of-type { margin-top: 0; }
.tutorial-entry p { margin-bottom: 0.55rem; }
.tutorial-entry ul { margin: 0.35rem 0 0.65rem; padding-left: 1.25rem; }
.tutorial-entry li { margin-block: 0.25rem; }

.reading-page p,
.reading-page li {
  max-width: var(--measure);
  color: #4B453E;
  font-size: 1rem;
  line-height: 1.75;
}

.publication-note {
  margin: 0 0 3rem;
  padding: 1.15rem 1.25rem;
  background: #FFF7E8;
  border: 1px solid #E9D9B7;
  border-radius: 16px;
}

.publication-note strong { display: block; margin-bottom: 0.3rem; }
.publication-note p { margin: 0; color: #5B4B32; }

.table-wrap {
  margin: 1.3rem 0 1.5rem;
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  scrollbar-color: #B8ADA2 #F1EBE2;
}

table { width: 100%; min-width: 560px; border-collapse: collapse; text-align: left; }
th, td { padding: 0.9rem 1rem; vertical-align: top; border-bottom: 1px solid var(--line); }
th { color: var(--ink); background: #FBF9F5; font-size: 0.88rem; }
td { color: #4B453E; font-size: 0.93rem; line-height: 1.6; }
td:first-child { width: 34%; color: var(--ink); font-weight: 650; }
tr:last-child td { border-bottom: 0; }

.contact-panel {
  margin: 2rem 0 3rem;
  padding: clamp(1.4rem, 4vw, 2.2rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 14px 28px -28px rgb(23 23 23 / 30%);
}

.reading-page .contact-panel h2 { margin: 0 0 0.65rem; }
.contact-email {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 780;
  letter-spacing: -0.025em;
}
.contact-panel p:last-child { margin-bottom: 0; }

.support-page details {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.support-page details:first-of-type { border-top: 1px solid var(--line); }
.support-page summary { color: var(--ink); font-size: 1.05rem; font-weight: 730; cursor: pointer; }
.support-page details p { margin: 0.8rem 0 0; }
.support-page .support-policy-link { margin-top: 2rem; }

@media (max-width: 760px) {
  .site-width,
  .site-header { width: min(100% - 36px, 560px); }
  .site-header { min-height: 76px; }
  .brand { gap: 0.45rem; font-size: 1rem; }
  .brand img { width: 36px; height: 36px; }
  .main-nav { gap: 1rem; }
  .main-nav a { font-size: 0.86rem; }
  .hero {
    min-height: auto;
    padding-block: 4rem 4.5rem;
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero h1 { max-width: 9ch; font-size: clamp(3.25rem, 13vw, 5.1rem); }
  .hero-lead { max-width: 37ch; }
  .hero-device { gap: 0.8rem; }
  .game-list { gap: 0.55rem; }
  .game-list img { width: 34px; height: 34px; flex-basis: 34px; }
  .feature-section { padding-block: 4.5rem; }
  .feature-row,
  .feature-row--reverse { grid-template-columns: 1fr; gap: 2.4rem; }
  .feature-row--reverse .feature-copy,
  .feature-row--reverse .feature-device { order: initial; }
  .feature-copy { max-width: 560px; }
  .feature-copy h2 { max-width: 12ch; font-size: clamp(2.5rem, 10vw, 3.5rem); }
  .footer-inner { flex-wrap: wrap; }
  .footer-inner p { order: 3; width: 100%; }
}

@media (min-width: 761px) and (max-width: 920px) {
  .hero { grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr); gap: 1.5rem; }
}

@media (max-width: 420px) {
  .site-width,
  .site-header { width: min(100% - 32px, 360px); }
  .site-header { gap: 0.7rem; }
  .main-nav { gap: 0.8rem; }
  .main-nav a { font-size: 0.82rem; }
  .hero { padding-top: 3.5rem; }
  .hero-device { gap: 0.45rem; }
  .game-list { width: 108px; flex-basis: 108px; gap: 0.6rem; }
  .game-list li { gap: 0.4rem; font-size: 0.7rem; }
  .game-list img { width: 32px; height: 32px; flex-basis: 32px; }
  .feature-device--pair { flex-direction: column; }
  .feature-device--pair .mockup-figure { width: min(100%, 220px); }
  .reading-page { padding-block: 3.5rem 4.5rem; }
  .footer-inner { align-items: flex-start; }
  .footer-inner nav { width: 100%; justify-content: flex-start; }
}

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