:root {
  color-scheme: light;
  --cream: #fff9f2;
  --paper: #fffdf9;
  --ink: #252321;
  --muted: #635f59;
  --teal: #166b63;
  --teal-dark: #0c4e48;
  --teal-soft: #dcefe9;
  --coral: #d36c32;
  --coral-soft: #f9e3d5;
  --gold: #d69a37;
  --gold-soft: #fff0cf;
  --line: #e5ddd2;
  --shadow: 0 20px 55px rgb(37 35 33 / 12%);
  --radius: 28px;
  font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--cream);
  font-size: 18px;
  line-height: 1.65;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 20;
  left: 16px;
  top: -64px;
  padding: 10px 16px;
  border-radius: 12px;
  color: white;
  background: var(--teal-dark);
}
.skip-link:focus { top: 16px; }

:focus-visible { outline: 4px solid var(--coral); outline-offset: 4px; }
.site-header {
  width: min(1180px, calc(100% - 40px));
  min-height: 88px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { min-height: 48px; display: inline-flex; align-items: center; gap: 12px; font-size: 28px; font-weight: 800; text-decoration: none; letter-spacing: -.03em; }
.brand img { width: 48px; height: 48px; border-radius: 14px; }
.site-nav, .footer-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; }
.site-nav a, .footer-nav a, .back-link { min-width: 48px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; text-decoration: none; text-underline-offset: 4px; }
.site-nav a:hover, .footer-nav a:hover, .back-link:hover { text-decoration: underline; }
.site-header-page { border-bottom: 1px solid var(--line); }

.hero {
  position: relative;
  isolation: isolate;
  width: min(1180px, calc(100% - 40px));
  min-height: 700px;
  margin: 8px auto 84px;
  padding: 72px clamp(24px, 7vw, 88px);
  overflow: hidden;
  border-radius: 40px;
  color: var(--ink);
  background: linear-gradient(130deg, #fff1e3 0%, #fff9f2 58%, #e5f3ed 100%);
}
.hero-copy { position: relative; z-index: 2; width: min(100%, 570px); }
.eyebrow { margin: 0 0 10px; color: var(--teal); font-size: 15px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1 { margin: 0; font-size: clamp(48px, 6.5vw, 82px); line-height: 1.06; letter-spacing: -.06em; }
h1 em { color: var(--coral); font-style: normal; }
h2 { margin: 0; font-size: clamp(33px, 4vw, 52px); line-height: 1.16; letter-spacing: -.045em; }
h3 { margin: 0; font-size: 27px; line-height: 1.25; letter-spacing: -.035em; }
.lead { max-width: 510px; margin: 28px 0; color: var(--muted); font-size: clamp(19px, 2.1vw, 23px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.button { min-height: 56px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 22px; border: 2px solid transparent; border-radius: 18px; font-weight: 800; text-align: center; text-decoration: none; transition: transform 160ms ease, background-color 160ms ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: white; background: var(--teal); }
.button-primary:hover { background: var(--teal-dark); }
.button-secondary { border-color: var(--teal); color: var(--teal-dark); background: #ffffffa8; }
.availability { display: flex; align-items: center; gap: 9px; margin-top: 26px; font-size: 16px; font-weight: 700; }
.status-dot { width: 12px; height: 12px; flex: 0 0 12px; border-radius: 50%; background: var(--gold); }
.hero-shot { position: absolute; z-index: 1; right: clamp(22px, 6vw, 88px); bottom: -135px; width: min(33vw, 318px); margin: 0; }
.framed-phone img { border: 8px solid var(--ink); border-radius: 35px; box-shadow: var(--shadow); background: var(--ink); }
figcaption { margin-top: 12px; font-size: 15px; line-height: 1.45; text-align: center; color: var(--muted); }
.shape-one, .shape-two { position: absolute; z-index: -1; border-radius: 50%; opacity: .7; }
.shape-one { width: 390px; height: 390px; right: -210px; top: -120px; background: #f4bc75; }
.shape-two { width: 280px; height: 280px; left: 38%; bottom: -180px; background: #bde0d7; }

.section-shell { width: min(1100px, calc(100% - 40px)); margin: 0 auto 120px; }
.section-intro { max-width: 720px; margin-bottom: 36px; }
.split-intro { max-width: none; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 48px; align-items: end; }
.section-note { margin: 0; color: var(--muted); }
.benefit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.benefit-card { min-height: 265px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 8px 22px rgb(37 35 33 / 5%); }
.benefit-card p, .game-card p, .privacy-copy p, .progress-copy > p { color: var(--muted); }
.benefit-icon { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 18px; color: var(--teal-dark); background: var(--teal-soft); font-size: 25px; font-weight: 800; }

.game-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.game-card { position: relative; min-height: 254px; overflow: hidden; border-radius: var(--radius); background: var(--paper); }
.game-card-featured { grid-column: span 4; border: 1px solid var(--line); }
.game-card-text { position: relative; z-index: 1; padding: 28px 28px 0; max-width: 92%; }
.game-card-text p { margin-bottom: 0; }
.game-card-featured img { width: 160px; position: absolute; right: -25px; bottom: -110px; transform: rotate(-7deg); border: 5px solid var(--ink); border-radius: 20px; box-shadow: 0 14px 24px rgb(37 35 33 / 16%); }
.game-demo-link { position: absolute; z-index: 2; left: 24px; bottom: 18px; min-height: 48px; display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 12px; color: var(--teal-dark); background: #fffdf9ed; font-size: 15px; font-weight: 800; text-decoration: none; }
.game-demo-link:hover { background: white; }
.coral-card { background: var(--coral-soft); }
.gold-card { background: var(--gold-soft); }
.text-card { grid-column: span 3; padding: 30px; display: flex; flex-direction: column; justify-content: flex-end; }
.text-card p { margin-bottom: 0; }
.teal-card { color: white; background: var(--teal); }
.teal-card p { color: #e3f5f0; }
.cream-card { background: #f8ebdc; }
.sequence-card { background: #deeef0; }
.clock-card { background: #f2e7d9; }
.pill { display: inline-flex; width: fit-content; margin-bottom: 12px; padding: 4px 11px; border-radius: 999px; color: var(--teal-dark); background: #ffffffc9; font-size: 14px; font-weight: 800; }
.pill-light { color: var(--teal-dark); background: #ffffff; }

.progress-showcase, .privacy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 330px); gap: clamp(32px, 8vw, 110px); align-items: center; }
.progress-copy { max-width: 620px; }
.check-list { padding: 0; margin: 28px 0 0; list-style: none; }
.check-list li { position: relative; margin: 12px 0; padding-left: 34px; font-weight: 700; }
.check-list li::before { content: "✓"; position: absolute; left: 0; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--teal); font-size: 15px; }
.journey-shot, .privacy-image { margin: 0; }
.privacy { grid-template-columns: minmax(260px, 330px) minmax(0, 1fr); margin-bottom: 100px; }
.privacy-copy { max-width: 650px; }
.privacy-copy p { margin: 16px 0; }
.disclaimer { padding: 20px 22px; border-left: 5px solid var(--coral); border-radius: 0 14px 14px 0; background: var(--coral-soft); color: var(--ink) !important; }

.closing { margin-top: 40px; padding: 80px 20px; text-align: center; color: white; background: var(--teal-dark); }
.closing-inner { width: min(650px, 100%); margin: auto; }
.closing-inner img { width: 80px; height: 80px; margin: 0 auto 14px; border-radius: 23px; }
.eyebrow-light { color: #d4eee8; }
.closing h2 { color: #fff9f2; }
.closing p:not(.eyebrow) { margin: 20px auto 28px; color: #d7ebe6; }
.button-light { color: var(--teal-dark); background: var(--cream); }
.site-footer { width: min(1100px, calc(100% - 40px)); min-height: 98px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 15px; }
.site-footer p { margin: 0; }
.site-footer a { font-weight: 700; text-underline-offset: 4px; }

.information-page { max-width: 900px; padding: 72px 0 110px; }
.information-page h1 { margin-bottom: 16px; }
.page-lead { max-width: 650px; margin: 0 0 38px; color: var(--muted); font-size: clamp(19px, 2.1vw, 23px); }
.notice-card { margin: 0 0 28px; padding: 26px 28px; border: 1px solid #e7c8b5; border-radius: var(--radius); background: var(--coral-soft); }
.notice-card h2, .information-card h2 { font-size: 25px; }
.notice-card p { margin-bottom: 0; }
.information-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.information-card { min-height: 230px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.information-card p, .information-card li { color: var(--muted); }
.information-card p:last-child, .information-card ul:last-child, .information-card ol:last-child { margin-bottom: 0; }
.information-card ul, .information-card ol { padding-left: 25px; }
.information-card li + li { margin-top: 9px; }
.support-grid .information-card { min-height: 200px; }

.play-page { min-height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr); background: linear-gradient(135deg, #fff0e3 0%, var(--cream) 48%, #e2f2ec 100%); }
.play-header { width: min(780px, calc(100% - 40px)); min-height: 76px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.back-link { color: var(--teal-dark); }
.play-main { width: min(780px, calc(100% - 40px)); min-height: 0; margin: auto; padding: 12px 0 22px; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 14px; }
.play-intro { text-align: center; }
.play-intro .eyebrow { margin-bottom: 2px; }
.stage-line { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px 16px; color: var(--muted); font-size: 15px; font-weight: 700; }
.stage-line p { margin: 0; }
.stage-label { color: var(--teal-dark); }
.play-intro h1 { margin: 1px 0 0; font-size: clamp(34px, 5vw, 48px); }
.play-help { margin: 2px 0 0; color: var(--muted); font-size: 16px; }
.demo-game { min-height: 0; display: grid; align-content: center; justify-items: center; gap: 12px; }
.game-status { min-height: 28px; margin: 0; color: var(--teal-dark); font-weight: 800; text-align: center; }
.memory-board { width: min(100%, 440px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 2vw, 14px); }
.memory-card { aspect-ratio: 1 / 1; min-width: 48px; min-height: 48px; display: grid; place-items: center; padding: 8px; overflow: hidden; border: 3px solid var(--teal-dark); border-radius: 22px; color: var(--teal-dark); background: var(--paper); box-shadow: 0 7px 16px rgb(37 35 33 / 10%); cursor: pointer; font: inherit; transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease; }
.memory-card:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 18px rgb(37 35 33 / 15%); }
.memory-card:disabled { cursor: default; opacity: 1; }
.card-back { width: 54%; height: 54%; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--teal); font-size: clamp(25px, 6vw, 38px); font-weight: 900; line-height: 1; }
.memory-card.is-revealed { background: #fef4e9; }
.memory-card.is-matched { border-color: var(--teal); background: var(--teal-soft); }
.card-art { width: clamp(30px, 8vw, 52px); height: clamp(30px, 8vw, 52px); display: grid; place-items: center; }
.card-art svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 4; }
.card-name { margin-top: 3px; font-size: clamp(13px, 3.5vw, 17px); font-weight: 800; line-height: 1.15; }
.play-actions { min-height: 56px; display: flex; justify-content: center; gap: 12px; }
.play-actions .button { min-width: 132px; font: inherit; cursor: pointer; }
.play-actions .button:disabled { cursor: wait; opacity: .62; transform: none; }
.play-actions [hidden] { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 860px) {
  .hero { min-height: 0; padding-top: 54px; }
  .hero-copy { width: 100%; }
  .hero-shot {
    position: relative;
    right: auto;
    bottom: auto;
    width: 245px;
    margin: 40px auto 0;
  }
  .benefit-grid { grid-template-columns: 1fr; }
  .benefit-card { min-height: 0; }
  .game-card-featured { grid-column: span 6; }
  .text-card { grid-column: span 6; }
  .split-intro, .progress-showcase, .privacy { grid-template-columns: 1fr; gap: 32px; }
  .progress-showcase .journey-shot, .privacy-image { width: min(330px, 72vw); }
  .progress-showcase .journey-shot { justify-self: end; }
  .information-page { padding-top: 48px; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .site-header, .hero, .section-shell, .site-footer { width: min(calc(100% - 28px), 1100px); }
  .site-header { min-height: 76px; }
  .site-nav { gap: 8px; }
  .site-nav a { min-height: 48px; font-size: 14px; }
  .brand { font-size: 24px; }
  .brand img { width: 42px; height: 42px; }
  .hero { margin-top: 0; margin-bottom: 68px; padding: 46px 24px 34px; border-radius: 28px; }
  h1 { font-size: clamp(40px, 11.5vw, 50px); line-height: 1.08; }
  h2 { font-size: 34px; }
  .lead { margin: 22px 0; font-size: 19px; }
  .hero-actions { display: grid; }
  .button { width: 100%; min-height: 58px; }
  .hero-shot { width: 196px; margin-top: 32px; }
  .hero-shot figcaption { width: 255px; margin-left: -31px; }
  .shape-one { right: -270px; }
  .shape-two { left: -100px; }
  .section-shell { margin-bottom: 80px; }
  .section-intro { margin-bottom: 26px; }
  .game-grid { grid-template-columns: 1fr; }
  .game-card-featured, .text-card { grid-column: auto; min-height: 230px; }
  .game-card-featured img { width: 145px; }
  .progress-showcase .journey-shot, .privacy-image { justify-self: center; width: min(270px, 72vw); }
  .privacy { margin-bottom: 80px; }
  .closing { padding: 66px 20px; }
  .site-footer { min-height: 120px; flex-direction: column; justify-content: center; text-align: center; }
  .footer-nav { justify-content: center; }
  .information-page { padding: 36px 0 72px; }
  .information-grid { grid-template-columns: 1fr; }
  .information-card, .support-grid .information-card { min-height: 0; padding: 24px; }
  .notice-card { padding: 23px; }
  .play-header, .play-main { width: min(calc(100% - 28px), 780px); }
  .play-header { min-height: 64px; }
  .play-header .brand { font-size: 23px; }
  .play-header .brand img { width: 40px; height: 40px; }
  .back-link { min-height: 48px; font-size: 15px; }
  .play-main { padding-top: 5px; gap: 8px; }
  .play-intro h1 { font-size: 34px; }
  .demo-game { gap: 9px; }
  .memory-board { gap: 8px; }
  .memory-card { border-radius: 18px; }
  .play-actions .button { min-height: 52px; min-width: 124px; padding-inline: 14px; }
}
@media (max-height: 620px) and (max-width: 560px) {
  .play-header { min-height: 58px; }
  .play-main { padding-bottom: 8px; }
  .play-intro .eyebrow, .play-help { display: none; }
  .stage-line { font-size: 14px; }
  .play-intro h1 { font-size: 30px; line-height: 1.05; }
  .game-status { min-height: 22px; font-size: 15px; line-height: 1.35; }
  .memory-board { width: min(100%, 360px); gap: 7px; }
  .memory-card { border-width: 2px; border-radius: 15px; }
  .card-name { font-size: 13px; }
  .play-actions { min-height: 48px; }
  .play-actions .button { min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
