/* เบบี้แลนด์ ออนไลน์: the game's website (docs/Website_TH.md). Pastel toy-world look matching the game. */
:root {
  --purple: #8a4fd6;
  --purple-d: #5b2fa3;
  --pink: #ff6fa3;
  --pink-l: #ff9ad5;
  --mint: #3cc4ac;
  --sun: #ffcf4d;
  --sky: #6ec3ff;
  --ink: #3a2858;
  --soft: #6f5f88;
  --cream: #fffaf4;
  --lav: #f5efff;
  --card: #ffffff;
  --line: #ece2f7;
  --r-lg: 32px;
  --r: 22px;
  --shadow: 0 10px 30px rgba(90, 50, 140, 0.12);
  --shadow-lg: 0 24px 60px rgba(90, 50, 140, 0.2);
  --head: 'Mali', 'Mitr', system-ui, sans-serif;
  --body: 'Mitr', 'Sukhumvit Set', 'Noto Sans Thai', system-ui, sans-serif;
  --gutter: 20px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--body); font-weight: 300; font-size: 17px; line-height: 1.7; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
.nb { white-space: nowrap; }
@media (max-width: 359px) { .nb { white-space: normal; } }
h2, h3 { text-wrap: balance; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.3; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { width: min(820px, 100%); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 14px; border-radius: 10px; background: #fff; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 8px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border: 0; border-radius: 999px; font-family: var(--body); font-weight: 500; font-size: 16px; text-decoration: none; cursor: pointer; transition: transform 0.2s cubic-bezier(.2, 1.4, .4, 1), box-shadow 0.2s, filter 0.2s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-play { color: #fff; background: linear-gradient(180deg, #ff9fc8 0%, #ff6fa3 55%, #f0508c 100%); box-shadow: 0 6px 0 #c93a72, 0 12px 26px rgba(240, 80, 140, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.5); text-shadow: 0 1px 0 rgba(160, 30, 80, 0.35); }
.btn-play:hover { box-shadow: 0 8px 0 #c93a72, 0 16px 32px rgba(240, 80, 140, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.5); }
.btn-play:active { box-shadow: 0 3px 0 #c93a72, 0 6px 14px rgba(240, 80, 140, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.5); }
.btn-ghost { color: var(--purple-d); background: rgba(255, 255, 255, 0.92); box-shadow: 0 6px 0 rgba(120, 80, 180, 0.25), 0 10px 24px rgba(90, 50, 140, 0.15); }
.btn-xl { padding: 16px 30px; font-size: 19px; }

/* ---------- header ---------- */
.top { position: fixed; inset: 0 0 auto; z-index: 50; transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s; padding-top: env(safe-area-inset-top); }
.top.solid { background: rgba(255, 250, 244, 0.86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 6px 24px rgba(90, 50, 140, 0.1); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(90, 50, 140, 0.25); }
.brand span { display: flex; flex-direction: column; line-height: 1; }
.brand b { font-family: var(--head); font-size: 20px; color: #fff; text-shadow: 0 2px 0 var(--purple), 0 0 12px rgba(90, 40, 150, 0.4); }
.brand small { margin-top: 3px; font-size: 10px; font-weight: 600; letter-spacing: 3px; color: #fff; opacity: 0.9; }
.top.solid .brand b { color: var(--purple); text-shadow: none; }
.top.solid .brand small { color: var(--pink); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 999px; font-size: 15px; font-weight: 400; text-decoration: none; color: #fff; text-shadow: 0 1px 6px rgba(50, 20, 90, 0.5); transition: background 0.2s; }
.nav a:hover { background: rgba(255, 255, 255, 0.2); }
.top.solid .nav a { color: var(--ink); text-shadow: none; }
.top.solid .nav a:hover { background: var(--lav); }
.nav .nav-play, .top.solid .nav .nav-play { margin-left: 8px; padding: 9px 18px; color: #fff; text-shadow: 0 1px 0 rgba(160, 30, 80, 0.35); box-shadow: 0 4px 0 #c93a72, 0 8px 18px rgba(240, 80, 140, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.5); }
.menu-btn { display: none; width: 46px; height: 46px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, 0.9); box-shadow: var(--shadow); cursor: pointer; padding: 12px 11px; flex-direction: column; justify-content: space-between; }
.menu-btn span { display: block; height: 3px; border-radius: 3px; background: var(--purple); transition: transform 0.25s, opacity 0.25s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; isolation: isolate; padding: calc(96px + env(safe-area-inset-top)) 0 110px; }
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; }
.hero-bg img { animation: kenburns 30s ease-in-out infinite alternate; transform-origin: 60% 40%; }
.hero-shade { position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(100deg, rgba(70, 30, 130, 0.72) 0%, rgba(110, 50, 170, 0.5) 38%, rgba(120, 60, 180, 0.08) 65%, transparent 80%),
              linear-gradient(180deg, rgba(60, 25, 110, 0.35) 0%, transparent 25%, transparent 70%, var(--cream) 99%); }
.hero-in { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 24px; }
.hero-copy { color: #fff; max-width: 600px; }
.pill-beta { display: inline-block; margin-bottom: 30px; padding: 7px 16px; border-radius: 999px; background: linear-gradient(180deg, #ffe066, #ffb52e); color: #7a3600; font-weight: 600; font-size: 14px; letter-spacing: 0.5px; box-shadow: 0 4px 0 #d98a12, 0 8px 18px rgba(255, 170, 40, 0.4); transform: rotate(-2deg); }
.logo { position: relative; display: inline-flex; flex-direction: column; align-items: center; margin: 0 0 6px -4px; }
.logo b { position: relative; z-index: 1; white-space: nowrap; font-family: var(--head); font-weight: 700; font-size: clamp(60px, 8.2vw, 108px); line-height: 1.25; color: #fff; letter-spacing: 1px; filter: drop-shadow(0 8px 0 rgba(70, 30, 120, 0.35)) drop-shadow(0 12px 24px rgba(50, 20, 90, 0.35)); }
.logo b::before { content: attr(data-t); position: absolute; inset: 0; z-index: -1; -webkit-text-stroke: 0.2em var(--purple); color: var(--purple); }
.logo span { margin-top: -0.6em; padding: 4px 22px 4px 28px; border-radius: 999px; border: 4px solid #fff; background: linear-gradient(180deg, var(--pink-l), var(--pink)); font-family: var(--body); font-weight: 600; font-size: clamp(16px, 2.2vw, 24px); letter-spacing: 0.4em; color: #fff; box-shadow: 0 6px 16px rgba(240, 80, 140, 0.4); position: relative; z-index: 2; }
.tagline { margin-top: 14px; font-family: var(--head); font-weight: 700; font-size: clamp(28px, 4.2vw, 46px); line-height: 1.35; text-shadow: 0 3px 0 rgba(70, 30, 120, 0.45), 0 6px 22px rgba(40, 10, 80, 0.4); }
.tagline em { font-style: normal; color: #ffe36e; text-shadow: 0 3px 0 #b8630a, 0 6px 20px rgba(120, 50, 0, 0.45); }
.lead { margin-top: 14px; font-size: 18px; line-height: 1.8; max-width: 520px; text-shadow: 0 2px 10px rgba(40, 10, 80, 0.55); }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chips li { padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.4); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: 14px; font-weight: 400; }
.hero-art { position: relative; height: min(72vh, 660px); }
.hero-art::before { content: ''; position: absolute; left: -4%; right: -4%; bottom: -6%; height: 70%; border-radius: 50%; background: radial-gradient(ellipse at 50% 72%, rgba(255, 255, 255, 0.75) 0%, rgba(255, 240, 255, 0.4) 35%, transparent 68%); }
.hero-art .h { position: absolute; bottom: 0; height: auto; filter: drop-shadow(0 16px 26px rgba(40, 10, 80, 0.35)); animation: bob 5s ease-in-out infinite; }
.h-knight { left: 12%; width: 60%; z-index: 3; }
.h-mage { left: -4%; width: 40%; bottom: 10% !important; z-index: 2; animation-delay: -1.2s !important; }
.h-healer { right: -6%; width: 54%; bottom: 8% !important; z-index: 2; animation-delay: -2.4s !important; }
.h-gunner { right: 20%; width: 36%; z-index: 4; animation-delay: -3.6s !important; }
.sparkles i { position: absolute; z-index: -1; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle, #fff 0%, rgba(255, 255, 255, 0) 70%); box-shadow: 0 0 14px 4px rgba(255, 240, 180, 0.7); animation: twinkle 3.6s ease-in-out infinite; }
.sparkles i:nth-child(1) { left: 8%; top: 22%; }
.sparkles i:nth-child(2) { left: 46%; top: 14%; animation-delay: -0.6s; width: 7px; height: 7px; }
.sparkles i:nth-child(3) { left: 62%; top: 30%; animation-delay: -1.2s; }
.sparkles i:nth-child(4) { left: 86%; top: 18%; animation-delay: -1.8s; width: 14px; height: 14px; }
.sparkles i:nth-child(5) { left: 30%; top: 70%; animation-delay: -2.4s; width: 6px; height: 6px; }
.sparkles i:nth-child(6) { left: 76%; top: 62%; animation-delay: -3s; }
.sparkles i:nth-child(7) { left: 52%; top: 50%; animation-delay: -0.9s; width: 6px; height: 6px; }
.sparkles i:nth-child(8) { left: 18%; top: 46%; animation-delay: -2.1s; width: 8px; height: 8px; }
.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); width: 30px; height: 48px; border: 3px solid rgba(90, 50, 140, 0.55); border-radius: 20px; }
.scroll-cue span { position: absolute; left: 50%; top: 9px; width: 6px; height: 10px; margin-left: -3px; border-radius: 3px; background: var(--purple); animation: cue 1.8s ease-in-out infinite; }

/* ---------- numbers strip ---------- */
.stats { position: relative; z-index: 2; margin-top: -54px; }
.stats-in { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; padding: 18px 10px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow-lg); width: min(980px, calc(100% - 2 * var(--gutter))); }
.stats-in div { display: flex; flex-direction: column; align-items: center; padding: 4px 0; }
.stats-in div + div { border-left: 2px dashed var(--line); }
.stats-in b { font-family: var(--head); font-size: clamp(30px, 4vw, 44px); line-height: 1.1; background: linear-gradient(180deg, var(--pink), var(--purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats-in span { font-size: 14px; font-weight: 400; color: var(--soft); }

/* ---------- sections ---------- */
.sec { position: relative; padding: 110px 0; }
.sec-head { max-width: 760px; margin: 0 auto 46px; text-align: center; }
.kicker { display: inline-block; margin-bottom: 10px; padding: 4px 14px; border-radius: 999px; background: var(--lav); color: var(--purple); font-size: 14px; font-weight: 500; }
.sec-head h2 { font-size: clamp(30px, 4.4vw, 46px); }
.sec-head h2 + p { margin-top: 14px; color: var(--soft); font-size: 18px; }

/* growth */
.grow { padding-top: 120px; }
.grow-stage { position: relative; padding: 30px 30px 34px; border-radius: 40px; background: radial-gradient(ellipse at 50% 30%, #fff 0%, #fdf4ff 45%, #f1e6ff 100%); box-shadow: var(--shadow); overflow: hidden; }
.grow-stage::before { content: ''; position: absolute; left: 6%; right: 6%; top: 52%; height: 10px; border-radius: 10px; background: repeating-linear-gradient(90deg, #e3d2f7 0 18px, transparent 18px 30px); }
.grow-stage img { position: relative; width: 100%; max-width: 980px; margin: 0 auto; }
.grow-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.grow-steps li { position: relative; padding: 20px 20px 18px; border-radius: var(--r); background: #fff; box-shadow: 0 6px 18px rgba(90, 50, 140, 0.08); text-align: center; }
.grow-steps .lv { display: inline-block; margin-bottom: 6px; padding: 2px 12px; border-radius: 999px; background: linear-gradient(180deg, var(--pink-l), var(--pink)); color: #fff; font-weight: 600; font-size: 14px; }
.grow-steps b { display: block; font-family: var(--head); font-size: 21px; }
.grow-steps p { margin-top: 6px; font-size: 15px; color: var(--soft); line-height: 1.6; }

/* classes */
.classes { background: linear-gradient(180deg, var(--cream) 0%, var(--lav) 22%, var(--lav) 78%, var(--cream) 100%); }
.class-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.class-tabs button { display: flex; align-items: center; gap: 8px; padding: 8px 18px 8px 10px; border: 3px solid transparent; border-radius: 999px; background: #fff; box-shadow: var(--shadow); font-family: var(--body); font-size: 16px; font-weight: 500; color: var(--ink); cursor: pointer; transition: transform 0.2s, border-color 0.2s, background 0.2s; }
.class-tabs button img { width: 40px; height: 40px; }
.class-tabs button:hover { transform: translateY(-2px); }
.class-tabs button[aria-selected="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.class-panels { position: relative; }
.class-panel { display: none; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 30px; padding: 30px 40px; border-radius: 40px; background: radial-gradient(circle at 28% 50%, #fff 0%, var(--c2) 60%), #fff; box-shadow: var(--shadow-lg); border: 3px solid #fff; }
.class-panel.on { display: grid; animation: panelIn 0.5s cubic-bezier(.2, 1.2, .4, 1); }
.cp-art { position: relative; display: flex; justify-content: center; }
.cp-art::before { content: ''; position: absolute; left: 50%; bottom: 4%; width: 70%; height: 14%; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 35%, transparent), transparent); }
.cp-art img { position: relative; max-height: 460px; width: auto; filter: drop-shadow(0 18px 24px rgba(40, 10, 80, 0.25)); animation: bob 5s ease-in-out infinite; }
.cp-text .role { display: inline-block; padding: 3px 14px; border-radius: 999px; background: var(--c); color: #fff; font-size: 14px; font-weight: 500; }
.cp-text h3 { margin-top: 8px; font-size: clamp(32px, 4vw, 44px); color: var(--ink); }
.cp-text > p:not(.role) { margin-top: 8px; color: var(--soft); }
.skills { display: grid; gap: 8px; margin-top: 18px; }
.skills li { display: flex; flex-direction: column; padding: 10px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.85); border-left: 6px solid var(--c); }
.skills li b { font-weight: 500; font-size: 16px; }
.skills li span { font-size: 14px; color: var(--soft); }
.skills li.sk-hero { background: linear-gradient(90deg, #fff7d6, #fff); border-left-color: var(--sun); }

/* world rail */
.world { overflow: hidden; }
.world-bg { position: absolute; inset: 0; z-index: -1; background: url('assets/img/key-candy-s.webp') center / cover; opacity: 0.18; -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent); }
.rail-wrap { position: relative; }
.rail { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px max(var(--gutter), calc((100vw - 1180px) / 2 + var(--gutter))) 26px; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.map { flex: 0 0 min(400px, 80vw); scroll-snap-align: center; border-radius: 26px; background: #fff; box-shadow: var(--shadow); overflow: hidden; transition: transform 0.25s; }
.map:hover { transform: translateY(-4px); }
.map img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.map div { padding: 14px 18px 18px; }
.map .tag { display: inline-block; padding: 2px 12px; border-radius: 999px; background: var(--mint); color: #fff; font-size: 13px; font-weight: 500; }
.map.town .tag { background: var(--sky); }
.map.dungeon .tag { background: var(--purple); }
.map b { display: block; margin-top: 6px; font-family: var(--head); font-size: 21px; }
.map p { margin-top: 2px; font-size: 15px; color: var(--soft); line-height: 1.6; }
.rail-btn { position: absolute; top: calc(50% - 40px); z-index: 2; width: 52px; height: 52px; border: 0; border-radius: 50%; background: #fff; box-shadow: var(--shadow-lg); font-size: 34px; line-height: 1; color: var(--purple); cursor: pointer; transition: transform 0.2s; }
.rail-btn:hover { transform: scale(1.08); }
.rail-btn.prev { left: max(8px, calc((100vw - 1180px) / 2 - 20px)); }
.rail-btn.next { right: max(8px, calc((100vw - 1180px) / 2 - 20px)); }

/* features */
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feat-grid li { padding: 22px 18px 20px; border-radius: var(--r); background: #fff; box-shadow: var(--shadow); text-align: center; transition: transform 0.25s, box-shadow 0.25s; }
.feat-grid li:hover { transform: translateY(-5px) rotate(-0.6deg); box-shadow: var(--shadow-lg); }
.feat-grid img { width: 64px; height: 64px; margin: 0 auto 8px; filter: drop-shadow(0 6px 8px rgba(90, 50, 140, 0.2)); }
.feat-grid b { display: block; font-family: var(--head); font-size: 18px; line-height: 1.4; }
.feat-grid p { margin-top: 6px; font-size: 14px; color: var(--soft); line-height: 1.6; }
.spots { display: grid; gap: 60px; margin-top: 90px; }
.spot { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 46px; }
.spot img { border-radius: 30px; box-shadow: var(--shadow-lg); border: 6px solid #fff; transform: rotate(-1.2deg); }
.spot.flip img { order: 2; transform: rotate(1.2deg); }
.spot h3 { font-size: clamp(26px, 3vw, 34px); }
.spot h3 + p { margin-top: 12px; color: var(--soft); }

/* fair play */
.fair { background: linear-gradient(180deg, var(--cream), #eefaf6 20%, #eefaf6 80%, var(--cream)); }
.fair .kicker { background: #d9f5ee; color: #158a76; }
.safe-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.safe-grid li { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 14px; padding: 20px; border-radius: var(--r); background: #fff; box-shadow: 0 8px 24px rgba(30, 110, 90, 0.1); }
.safe-grid i { grid-row: span 2; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: #e3f8f2; font-style: normal; font-size: 28px; }
.safe-grid b { font-family: var(--head); font-size: 18px; line-height: 1.4; align-self: end; }
.safe-grid p { font-size: 14px; color: var(--soft); line-height: 1.6; }

/* open beta */
.beta-card { position: relative; display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 30px; padding: 46px 50px; border-radius: 44px; overflow: hidden; color: #fff;
  background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.25), transparent 40%), linear-gradient(120deg, #8a4fd6 0%, #c35ad8 45%, #ff6fa3 100%); box-shadow: 0 30px 70px rgba(138, 79, 214, 0.35); }
.beta-card::after { content: ''; position: absolute; inset: 0; background: url('assets/img/key-cloud-s.webp') center / cover; opacity: 0.12; mix-blend-mode: screen; pointer-events: none; }
.beta-text { position: relative; z-index: 1; }
.beta-text h2 { font-size: clamp(30px, 4vw, 46px); text-shadow: 0 3px 0 rgba(70, 20, 110, 0.35); }
.beta-text > p:not(.pill-beta) { margin-top: 12px; font-size: 17px; }
.beta-text b { font-weight: 500; color: #fff6b0; }
.beta-text .btn-ghost { color: var(--purple-d); }
.beta-img { position: relative; z-index: 1; border-radius: 28px; border: 6px solid rgba(255, 255, 255, 0.9); box-shadow: 0 20px 40px rgba(60, 20, 100, 0.35); transform: rotate(2deg); }

/* faq */
.faq-list { display: grid; gap: 12px; }
.faq-list details { border-radius: 20px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.faq-list summary { position: relative; padding: 18px 56px 18px 22px; font-weight: 500; font-size: 17px; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; position: absolute; right: 18px; top: 50%; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%; background: var(--lav); color: var(--purple); font-size: 22px; line-height: 30px; text-align: center; transition: transform 0.25s; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding: 0 22px 20px; color: var(--soft); }

/* final call */
.final { position: relative; padding: 130px 0 140px; overflow: hidden; isolation: isolate; text-align: center; color: #fff; }
.final-bg, .final-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.final-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--cream) 0%, rgba(120, 60, 190, 0.35) 30%, rgba(90, 40, 150, 0.6) 100%); }
.final h2 { font-size: clamp(32px, 5vw, 54px); text-shadow: 0 4px 0 rgba(70, 30, 120, 0.45), 0 8px 24px rgba(40, 10, 80, 0.4); }
.final p { margin: 10px 0 28px; font-size: 19px; text-shadow: 0 2px 10px rgba(40, 10, 80, 0.6); }

/* footer */
.foot { padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); background: #2f2048; color: #d9cdee; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.foot .brand b { color: #fff; text-shadow: none; }
.foot .brand small { color: var(--pink-l); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot nav a { text-decoration: none; font-size: 15px; }
.foot nav a:hover { color: #fff; }
.copy { width: 100%; font-size: 13px; opacity: 0.7; }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2, 1, .3, 1); }
.reveal.in { opacity: 1; transform: none; }
@keyframes bob { 50% { transform: translateY(-12px); } }
@keyframes twinkle { 0%, 100% { opacity: 0.2; transform: scale(0.6); } 50% { opacity: 1; transform: scale(1.2); } }
@keyframes kenburns { from { transform: scale(1.04); } to { transform: scale(1.14) translate(-1.5%, 1%); } }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@keyframes panelIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- tablets ---------- */
@media (max-width: 1020px) {
  .feat-grid { grid-template-columns: repeat(3, 1fr); }
  .safe-grid { grid-template-columns: repeat(2, 1fr); }
  .class-panel { padding: 26px; }
}

/* ---------- phones ---------- */
@media (max-width: 820px) {
  body { font-size: 16px; }
  :root { --gutter: 16px; }
  .menu-btn { display: flex; }
  .nav { position: fixed; top: calc(68px + env(safe-area-inset-top)); left: 12px; right: 12px; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px; border-radius: 24px; background: rgba(255, 255, 255, 0.97); box-shadow: var(--shadow-lg); transform: translateY(-12px) scale(0.98); opacity: 0; pointer-events: none; transition: transform 0.25s, opacity 0.25s; }
  .nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a, .top.solid .nav a { padding: 12px 16px; color: var(--ink); text-shadow: none; font-size: 17px; }
  .nav .nav-play { margin: 8px 0 0; justify-content: center; }
  .hero { min-height: auto; padding: calc(88px + env(safe-area-inset-top)) 0 96px; align-items: flex-start; }
  .hero-shade { background: linear-gradient(180deg, rgba(70, 30, 130, 0.78) 0%, rgba(100, 45, 160, 0.55) 45%, rgba(110, 55, 170, 0.25) 72%, var(--cream) 99%); }
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 6px; text-align: center; }
  .hero-copy { margin: 0 auto; }
  .logo { margin-left: 0; }
  .lead { margin-left: auto; margin-right: auto; font-size: 16px; }
  .cta { justify-content: center; }
  .cta .btn-xl { flex: 1 1 200px; }
  .chips { justify-content: center; }
  .hero-art { height: 78vw; max-height: 380px; margin-top: 8px; }
  .scroll-cue { display: none; }
  .stats { margin-top: -40px; }
  .stats-in { grid-template-columns: repeat(3, 1fr); row-gap: 10px; padding: 14px 6px; }
  .stats-in div:nth-child(4) { border-left: 0; }
  .sec { padding: 76px 0; }
  .sec-head { margin-bottom: 30px; }
  .sec-head h2 + p { font-size: 16px; }
  .grow { padding-top: 84px; }
  .grow-stage { padding: 18px 14px 16px; border-radius: 28px; }
  .grow-stage::before { display: none; }
  .grow-steps { grid-template-columns: 1fr; gap: 10px; }
  .grow-steps li { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; text-align: left; padding: 14px 16px; }
  .grow-steps .lv { grid-row: span 2; align-self: start; margin-top: 4px; }
  .class-tabs { gap: 8px; }
  .class-tabs button { flex: 1 1 calc(50% - 8px); padding: 6px 12px 6px 6px; font-size: 15px; }
  .class-tabs button img { width: 34px; height: 34px; }
  .class-panel { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 18px 16px 20px; border-radius: 30px; }
  .cp-art img { max-height: 300px; }
  .cp-text { text-align: center; }
  .skills { text-align: left; }
  .rail-btn { display: none; }
  .feat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .feat-grid li { padding: 16px 12px; }
  .feat-grid img { width: 52px; height: 52px; }
  .feat-grid b { font-size: 16px; }
  .feat-grid p { font-size: 13px; }
  .spots { gap: 44px; margin-top: 60px; }
  .spot, .spot.flip { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .spot.flip img { order: 0; }
  .safe-grid { grid-template-columns: 1fr; gap: 10px; }
  .beta-card { grid-template-columns: minmax(0, 1fr); padding: 30px 22px; border-radius: 32px; text-align: center; }
  .beta-img { width: min(100%, 360px); margin: 0 auto; }
  .final { padding: 100px 0 110px; }
  .foot-in { flex-direction: column; text-align: center; }
  .foot nav { justify-content: center; }
}

/* ---------- icons (no emoji: line icons in UI spots, the game's icons in cards) ---------- */
.ic { display: inline-block; width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.18em; }
.btn .ic { width: 1em; height: 1em; margin-right: 2px; filter: drop-shadow(0 1px 0 rgba(160, 30, 80, 0.35)); }
.pill-beta { display: flex; width: fit-content; align-items: center; gap: 7px; }
@media (max-width: 820px) { .hero-copy .pill-beta, .beta-card .pill-beta { margin-left: auto; margin-right: auto; } }
.pill-beta .ic { width: 18px; height: 18px; color: #c26a00; }
.chips li { display: inline-flex; align-items: center; gap: 7px; }
.chips .ic { width: 17px; height: 17px; opacity: 0.95; }
.hero-badge { display: inline-flex; align-items: center; gap: 3px; margin-right: 8px; padding: 1px 9px 1px 6px; border-radius: 999px; background: linear-gradient(180deg, #ffe066, #ffb52e); color: #7a3600; font-size: 12px; font-weight: 600; vertical-align: 2px; }
.hero-badge .ic { width: 13px; height: 13px; }
.safe-grid i img { width: 46px; height: 46px; filter: drop-shadow(0 4px 6px rgba(30, 110, 90, 0.18)); }
.beta-text b.item { display: inline-flex; align-items: center; gap: 4px; vertical-align: bottom; }
.beta-text b.item img { width: 28px; height: 28px; filter: drop-shadow(0 2px 3px rgba(60, 20, 100, 0.35)); }
.ic.heart { color: var(--pink-l); vertical-align: -0.2em; }
/* The two rides, rendered from the game (riding pose as in play), on a soft glowing stage. */
.beta-art { position: relative; z-index: 1; height: 400px; }
.beta-art::before { content: ''; position: absolute; left: 4%; right: 4%; bottom: 2%; height: 82%; border-radius: 50%; background: radial-gradient(ellipse at 50% 60%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 230, 250, 0.5) 40%, transparent 70%); }
.beta-art .ride { position: absolute; bottom: 4%; height: auto; filter: drop-shadow(0 16px 20px rgba(60, 20, 100, 0.35)); animation: bob 5s ease-in-out infinite; }
.ride-board { left: 2%; width: 44%; z-index: 2; }
.ride-trike { right: 0; width: 56%; z-index: 1; animation-delay: -2.5s !important; }
.ride-tag { position: absolute; z-index: 3; padding: 6px 14px; border-radius: 999px; background: #fff; color: var(--purple-d); font-weight: 600; font-size: 14px; box-shadow: 0 8px 18px rgba(60, 20, 100, 0.25); white-space: nowrap; }
.ride-tag.t1 { left: 0; top: 10%; transform: rotate(-4deg); }
.ride-tag.t2 { right: 2%; top: 4%; transform: rotate(3deg); background: linear-gradient(180deg, #ffe066, #ffb52e); color: #7a3600; }
@media (max-width: 820px) {
  .beta-art { height: 300px; max-width: 420px; width: 100%; margin: 6px auto 0; }
  .ride-tag { font-size: 12px; padding: 5px 11px; }
}
/* The logo's stacked Thai marks rise well above its line: keep the beta pill clear of them at every size. */
.hero-copy .pill-beta { margin-bottom: clamp(30px, 3.9vw, 52px); }
@media (min-width: 821px) {
  .beta-art { height: 440px; }
  .ride-board { width: 47%; }
  .ride-trike { width: 60%; }
}

/* ---------- help us test (closed beta) + bug report / suggestion form ---------- */
.help { padding-top: 40px; padding-bottom: 40px; }
.help-card { display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: 30px; padding: 34px 40px; border-radius: 36px; background: linear-gradient(120deg, #fff 0%, #f6efff 60%, #ffeef6 100%); border: 3px solid #fff; box-shadow: var(--shadow-lg); }
.help-card h2 { font-size: clamp(26px, 3.4vw, 38px); }
.help-card h2 + p { margin-top: 10px; color: var(--soft); }
.help-btns { display: grid; gap: 12px; }
.btn-help { width: 100%; padding: 15px 22px; font-size: 18px; color: #fff; }
.btn-help.bug { background: linear-gradient(180deg, #ff8fa8, #f0507a); box-shadow: 0 6px 0 #c23a5f, 0 12px 24px rgba(240, 80, 122, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.45); }
.btn-help.idea { background: linear-gradient(180deg, #6fdcc8, #2fb79e); box-shadow: 0 6px 0 #1f8a76, 0 12px 24px rgba(47, 183, 158, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.45); }
.btn-help .ic { width: 1.1em; height: 1.1em; }
.fb { width: min(520px, calc(100vw - 24px)); max-height: calc(100svh - 24px); padding: 0; border: 0; border-radius: 30px; background: #fff; color: var(--ink); box-shadow: 0 30px 80px rgba(60, 20, 100, 0.35); overflow-y: auto; }
.fb::backdrop { background: rgba(50, 25, 80, 0.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.fb[open] { animation: panelIn 0.35s cubic-bezier(.2, 1.2, .4, 1); }
.fb-form { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 26px 24px 20px; }
.fb-form h2 { font-size: 26px; padding-right: 40px; }
.fb-x { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--lav); color: var(--purple); font-size: 26px; line-height: 1; cursor: pointer; }
.fb-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 18px; background: var(--lav); }
.fb-kinds button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 6px; border: 0; border-radius: 14px; background: transparent; font: 500 16px var(--body); color: var(--soft); cursor: pointer; }
.fb-kinds button[aria-checked="true"] { background: #fff; color: var(--purple-d); box-shadow: 0 3px 10px rgba(90, 50, 140, 0.15); }
.fb-field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 500; }
.fb-field small { font-weight: 300; color: var(--soft); }
.fb-field textarea, .fb-field input { width: 100%; box-sizing: border-box; padding: 11px 14px; border: 2px solid var(--line); border-radius: 14px; font: 400 16px var(--body); color: var(--ink); background: #fff; outline: none; resize: vertical; }
.fb-field textarea:focus, .fb-field input:focus { border-color: var(--pink-l); }
.fb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fb-status { min-height: 1.4em; font-size: 15px; font-weight: 500; color: #d9485f; }
.fb-status.good { color: #1f9e6e; }
.fb-send { width: 100%; padding: 14px; font-size: 18px; }
.fb-send:disabled { opacity: 0.6; cursor: default; }
.fb-form.sent .fb-send { display: none; }
.fb-note { font-size: 12px; color: var(--soft); text-align: center; }
@media (max-width: 1180px) and (min-width: 821px) { .nav a { padding: 8px 9px; font-size: 14px; } }
@media (max-width: 820px) {
  .help-card { grid-template-columns: minmax(0, 1fr); padding: 26px 20px; border-radius: 28px; text-align: center; }
  .fb-row { grid-template-columns: 1fr; }
}
