/* หมากรุกไทย พี่วินปากซอย / Soi Makruk — the soi at golden hour: board navy, vest orange with its reflective stripe,
   terrazzo, warm cream. Dark mode is the same soi after the street lights come on. See DESIGN.md. */
:root {
  --bg: #F6EEDF; --paper: #FFF9EE; --ink: #1E2647; --soft: #5A6278; --line: #E5D8C2;
  --navy: #262D63; --navy-2: #1B2150; --orange: #E8762B; --orange-ink: #B9541A; --gold: #C9A24E;
  --stone: #EFE7DD; --chip: #F1E2C9; --shadow: 0 18px 40px -18px rgba(40, 28, 10, .35);
  --font: "Sukhumvit Set", -apple-system, BlinkMacSystemFont, "Thonburi", "Noto Sans Thai", "Leelawadee UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121A2E; --paper: #1B2440; --ink: #F3EBDD; --soft: #B8BFD0; --line: #2C3756;
    --navy: #0E1430; --navy-2: #0A0F26; --orange: #F08A43; --orange-ink: #F6A266; --gold: #D9B666;
    --stone: #262C40; --chip: #26304F; --shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  --bg: #121A2E; --paper: #1B2440; --ink: #F3EBDD; --soft: #B8BFD0; --line: #2C3756;
  --navy: #0E1430; --navy-2: #0A0F26; --orange: #F08A43; --orange-ink: #F6A266; --gold: #D9B666;
  --stone: #262C40; --chip: #26304F; --shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.7 var(--font); overflow-x: clip; }
:lang(en) body, body:lang(en) { line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-ink); }
h1, h2, h3 { line-height: 1.3; margin: 0; letter-spacing: -.005em; }
h2 { font-size: clamp(28px, 4.2vw, 44px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
section { padding: clamp(64px, 9vw, 112px) 0; position: relative; }
section[id] { scroll-margin-top: 76px; }
.eyebrow { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--orange-ink); font-size: 15px; letter-spacing: .02em; }
.eyebrow img { width: 56px; height: 56px; border-radius: 14px; box-shadow: var(--shadow); }
.eyebrow.small { margin-bottom: 10px; }
.eyebrow.small::before { content: ""; width: 26px; height: 8px; border-radius: 3px; background: linear-gradient(var(--orange) 0 35%, #D8DDE3 35% 65%, var(--orange) 65%); }
.lead { color: var(--soft); font-size: clamp(17px, 1.6vw, 19px); max-width: 640px; margin-top: 14px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 8px; }

/* header */
.nav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.nav .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 16px; min-width: 0; }
.brand img { border-radius: 10px; flex: none; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu { margin-left: auto; }
.menu ul, .langs ul { display: flex; gap: 4px; }
.menu a, .langs a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 600; }
.menu a:hover, .langs a:hover { background: var(--chip); }
.langs a[aria-current] { background: var(--ink); color: var(--bg); }
@media (max-width: 760px) { .menu { display: none; } .nav .langs { margin-left: auto; } .brand span { font-size: 15px; } }

/* hero */
.hero { padding: 0; overflow: hidden; min-height: min(820px, 100svh); display: flex; flex-direction: column; justify-content: center; }
.soi { position: absolute; inset: 0; }
.soi img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 30%; }
.soi::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 92%, transparent) 34%, color-mix(in srgb, var(--bg) 35%, transparent) 62%, transparent 100%),
  linear-gradient(0deg, var(--bg) 0%, transparent 26%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .soi img { filter: brightness(.55) saturate(.9) hue-rotate(-8deg); } }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 72px 0 96px; }
.hero h1 span { display: inline-block; }
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); font-weight: 800; margin-top: 18px; color: var(--ink); text-wrap: balance; }
.hook { font-size: clamp(20px, 2.3vw, 27px); font-weight: 700; margin-top: 14px; color: var(--navy); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hook { color: var(--gold); } }
.hero .lead { margin-top: 16px; }
@media (max-width: 760px) { .hook br { display: none; } }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 12px 22px 12px 18px; border-radius: 16px; background: #0B0D14; color: #fff; text-decoration: none; box-shadow: var(--shadow); }
.btn svg { width: 30px; height: 30px; }
.btn .stack { display: flex; flex-direction: column; line-height: 1.25; font-weight: 700; font-size: 17px; }
.btn small { font-weight: 500; font-size: 13px; opacity: .78; }
.btn.soon { background: var(--navy); }
html[data-store="live"] .btn.soon { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chips li { padding: 6px 14px; border-radius: 999px; background: var(--chip); font-size: 14px; font-weight: 600; }
.hero-phone { margin: 0; justify-self: center; }
.phone { width: min(340px, 72vw); aspect-ratio: 1320 / 2868; border-radius: 46px; padding: 10px; background: linear-gradient(145deg, #2A2D3A, #0F1118); box-shadow: 0 40px 80px -30px rgba(30, 20, 5, .55), 0 0 0 1px rgba(255, 255, 255, .06) inset; transform: rotate(3deg); }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 37px; }
.stripe { position: absolute; left: 0; right: 0; bottom: 0; height: 18px; background: linear-gradient(var(--orange) 0 30%, #DCE1E6 30% 70%, var(--orange) 70%); }
@media (max-width: 860px) {
  .hero { min-height: 0; }
  .hero-grid { grid-template-columns: 1fr; padding: 48px 0 80px; gap: 36px; }
  .soi::after { background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 80%, transparent) 0%, var(--bg) 55%); }
  .phone { transform: none; width: min(300px, 76vw); }
}

/* pieces on terrazzo */
.terrazzo { margin-top: 36px; border-radius: 28px; padding: 30px 18px 24px; box-shadow: var(--shadow), inset 0 2px 0 rgba(255, 255, 255, .5);
  background: var(--stone) url(img/terrazzo.webp) center / cover; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .terrazzo { background-color: #3a3a44; background-blend-mode: multiply; } }
.pcs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; }
.pc { appearance: none; border: 0; background: none; padding: 8px 4px 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 10px; border-radius: 18px; color: var(--ink); font: inherit; }
.pc img { width: min(84px, 100%); filter: drop-shadow(0 10px 8px rgba(60, 20, 10, .28)); transition: filter .2s; }
.pc-name { font-weight: 800; font-size: 18px; padding: 2px 12px; border-radius: 999px; background: color-mix(in srgb, var(--paper) 80%, transparent); }
.pc[aria-pressed="true"] .pc-name { background: var(--orange); color: #fff; }
.pc:hover img { filter: drop-shadow(0 14px 10px rgba(60, 20, 10, .34)); }
.pc-say { margin-top: 22px; font-size: 20px; min-height: 2.4em; display: none; }
.pc-say b { color: var(--orange-ink); margin-right: 6px; }
.pc-rules { margin-top: 22px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 28px; }
.pc-rules li { color: var(--soft); }
.pc-rules b { color: var(--ink); margin-right: 6px; }
html.js .pc-say { display: block; }
html.js .pc-rules { display: none; }
.snd-note { margin-top: 10px; font-size: 13px; color: var(--soft); display: none; }
html.js .snd-note { display: block; }
@media (max-width: 640px) {
  .pcs { grid-template-columns: repeat(3, 1fr); row-gap: 18px; }
  .pc img { width: 62px; }
  .pc-rules { grid-template-columns: 1fr; }
}

/* the five people */
.people { background: var(--paper); }
.moods { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.moods li { padding: 5px 14px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 14px; font-weight: 700; }
.moods li:nth-child(1) { background: var(--orange); border-color: var(--orange); color: #fff; }
.pps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-top: 40px; }
.pp { text-align: center; position: relative; }
.bust { appearance: none; border: 0; padding: 0; background: none; cursor: pointer; position: relative; width: 100%; aspect-ratio: 360 / 400; display: block; }
.bust-bg { position: absolute; inset: 14% 4% 0; border-radius: 999px 999px 26px 26px; background: radial-gradient(circle at 50% 30%, #FFD9A8, #F2B97A 70%); }
.pp:nth-child(2) .bust-bg { background: radial-gradient(circle at 50% 30%, #FFE3C0, #F5C792 70%); }
.pp.paid .bust-bg { background: radial-gradient(circle at 50% 30%, #D9DDF2, #AEB6E0 72%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bust-bg { filter: brightness(.6); } }
.bust img { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; transition: opacity .18s; }
.bust .pleased { opacity: 0; }
.bust.on .pleased { opacity: 1; }
.bust.on .calm { opacity: 0; }
.num { position: absolute; top: 6%; left: 6%; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; font-size: 15px; display: grid; place-items: center; }
.pp h3 { margin-top: 14px; font-size: 17px; }
.pp p { color: var(--soft); font-size: 15px; margin-top: 4px; line-height: 1.5; }
.tag { display: inline-block; margin-top: 8px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; font-style: normal; background: var(--navy); color: #fff; }
.tap-note { margin-top: 26px; font-size: 14px; color: var(--soft); display: none; }
html.js .tap-note { display: block; }
@media (max-width: 900px) { .pps { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .pps { grid-template-columns: repeat(2, 1fr); gap: 22px 14px; } }

/* counting */
.ct-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.ct-rules { margin-top: 26px; display: grid; gap: 14px; }
.ct-rules li { padding: 16px 18px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); color: var(--soft); }
.ct-rules b { display: block; color: var(--ink); font-size: 17px; }
.ct-more { margin-top: 18px; color: var(--soft); }
.slate-wrap { position: relative; display: flex; justify-content: center; }
.slate-shot { width: min(270px, 62vw); border-radius: 30px; box-shadow: var(--shadow); border: 8px solid #14161E; }
.slate { position: absolute; left: -6%; top: 12%; z-index: 2; width: 220px; padding: 16px 18px 18px; border-radius: 18px; background: linear-gradient(160deg, #2A3170, #1A1F4E); color: #F6EEDF; border: 2px solid var(--gold); box-shadow: 0 24px 40px -18px rgba(10, 10, 40, .7); text-align: center; }
.slate-label { font-size: 15px; font-weight: 700; opacity: .9; }
.slate-num { font-size: 52px; font-weight: 800; line-height: 1.1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.slate-num span { font-size: 26px; opacity: .7; }
.slate-btn { margin-top: 12px; appearance: none; border: 0; border-radius: 999px; padding: 8px 18px; font: inherit; font-weight: 700; font-size: 15px; background: var(--orange); color: #fff; cursor: pointer; display: none; }
html.js .slate-btn { display: inline-block; }
@media (max-width: 860px) {
  .ct-grid { grid-template-columns: 1fr; }
  .slate-wrap { flex-direction: column; align-items: center; }
  .slate { position: relative; left: auto; top: auto; width: 210px; margin-bottom: -34px; }
}

/* two players, and the crowd that walks over */
.two { background: linear-gradient(180deg, var(--bg), var(--paper)); padding-bottom: 0; overflow: hidden; }
.stage { position: relative; width: min(980px, 100%); margin: 30px auto 0; aspect-ratio: 900 / 600; }
.stage-table { position: absolute; left: 50%; bottom: 0; width: 72%; transform: translateX(-50%); border-radius: 22px 22px 0 0;
  -webkit-mask-image: radial-gradient(ellipse 72% 80% at 50% 62%, #000 60%, transparent 100%); mask-image: radial-gradient(ellipse 72% 80% at 50% 62%, #000 60%, transparent 100%); }
.stage-pc { position: absolute; width: 6.5%; filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .3)); }
.stage-pc.p1 { left: 41%; top: 40%; }
.stage-pc.p2 { left: 54%; top: 52%; }
.walker { position: absolute; bottom: 0; width: 17%; }
.walker img { width: 100%; }
.walker .f2, .walker .f3 { position: absolute; left: 0; bottom: 0; opacity: 0; }
.walker.w-auntie { left: 4%; }
.walker.w-rider { left: 19%; width: 16%; bottom: 6%; }
.walker.w-boy { right: 4%; width: 15%; }
.walker .f1 { visibility: hidden; }
.walker .f3 { opacity: 1; }
.walker.walking .f3 { opacity: 0; }
.walker.walking.a .f1 { visibility: visible; }
.walker.walking.b .f2 { opacity: 1; }
@media (max-width: 640px) { .stage { aspect-ratio: 900 / 760; } .stage-table { width: 92%; } .walker { width: 24%; } .walker.w-rider { display: none; } .walker.w-boy { width: 21%; } }

/* practise, tables */
.fts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.ft { padding: 24px 22px; border-radius: 22px; background: var(--paper); border: 1px solid var(--line); }
.ft-n { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--orange); color: #fff; font-weight: 800; margin-bottom: 14px; }
.ft p { color: var(--soft); margin-top: 6px; }
.tb-title { margin-top: 56px; font-size: 24px; }
.tbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.tb { position: relative; border-radius: 22px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
.tb img { width: 100%; aspect-ratio: 600 / 420; object-fit: cover; object-position: 50% 30%; }
.tb span { display: block; padding: 12px 16px 14px; font-weight: 700; }
.tb .tag { position: absolute; top: 12px; right: 12px; margin: 0; }
.views { margin-top: 22px; color: var(--soft); }
@media (max-width: 760px) { .fts, .tbs { grid-template-columns: 1fr; } .tbs { grid-template-columns: repeat(3, 1fr); gap: 10px; } .tb span { font-size: 14px; padding: 8px 10px 10px; } .tb .tag { position: static; display: inline-block; margin: 0 10px 10px; } }

/* how to play: the questions people ask, answered in full in the HTML (and word for word in the FAQ data) */
.howto { background: var(--paper); }
.faq { margin: 34px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.qa { padding: 20px 22px; border-radius: 20px; background: var(--bg); border: 1px solid var(--line); }
.qa h3 { font-size: 18px; }
.qa p { margin-top: 8px; color: var(--soft); }
@media (max-width: 760px) { .faq { grid-template-columns: 1fr; } }

/* screenshots */
.shots { background: var(--navy); color: #F6EEDF; }
.shots .eyebrow.small { color: var(--gold); }
.shot-row { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 34px max(16px, (100vw - 1160px) / 2) 10px; scrollbar-width: thin; }
.shot-row li { flex: none; scroll-snap-align: center; }
.shot-row img { width: 240px; border-radius: 26px; border: 6px solid #0B0D14; box-shadow: 0 20px 40px -20px #000; }

/* free and the full game */
.py-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 32px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: 26px 26px 22px; }
.plan h3 { font-size: 20px; }
.plan ul { margin-top: 14px; display: grid; gap: 8px; }
.plan li { padding-left: 26px; position: relative; color: var(--soft); }
.plan li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 12px; height: 12px; border-radius: 50%; background: var(--orange); }
.plan.full { background: linear-gradient(160deg, #2A3170, #1A1F4E); color: #F6EEDF; border-color: var(--gold); }
.plan.full li { color: #DCE0F2; }
.plan.full li::before { background: var(--gold); }
.py-lines { margin-top: 20px; color: var(--soft); display: grid; gap: 6px; }
@media (max-width: 760px) { .py-row { grid-template-columns: 1fr; } }

/* end */
.end { background: var(--paper); border-top: 18px solid transparent; border-image: linear-gradient(var(--orange) 0 30%, #DCE1E6 30% 70%, var(--orange) 70%) 1; }
.end-grid { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: center; }
.end-bust { width: 300px; }
@media (max-width: 760px) { .end-grid { grid-template-columns: 1fr; } .end-bust { width: 220px; } }

/* footer */
.foot { padding: 40px 0 48px; font-size: 14px; color: var(--soft); background: var(--bg); }
.foot .row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
.foot ul { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { color: var(--ink); }
.foot .brand { font-size: 15px; }
.foot-langs { margin-left: auto; }
.made { margin-top: 20px; }
.note { margin-top: 6px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
