/* Per site: redesign these tokens AND page composition before publication. */
:root {
  color-scheme: light dark;
  --bg: #fafafa;
  --surface: #eeeeee;
  --text: #202020;
  --muted: #555555;
  --accent: #29547a;
  --accent-text: #ffffff;
  --border: #999999;
  --owner-bg: #e5eef5;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: .35rem;
  --space: 1rem;
  --page-width: 70rem;
  --reading-width: 68ch;
  --player-ratio: 16 / 9;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161616; --surface: #262626; --text: #efefef; --muted: #bcbcbc; --accent: #a9d4fa; --accent-text: #111111; --border: #666666; --owner-bg: #243645; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1.125rem/1.65 var(--font); overflow-wrap: anywhere; }
a { color: var(--accent); }
button, input, textarea { font: inherit; }
button { min-height: 48px; padding: .5rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
img { display: block; max-width: 100%; }
main, .site-header, .site-footer { max-width: var(--page-width); margin-inline: auto; }
h1, .site-header, .site-footer, .engage, .other-game { padding-inline: var(--space); }
h1 { font-size: clamp(1.6rem, 5vw, 2.5rem); line-height: 1.2; }
.site-header, .site-footer { padding-block: var(--space); }
.site-header a { font-weight: 700; }
.skip-link { position: absolute; left: 1rem; top: -10rem; z-index: 5; }
.skip-link:focus { top: 1rem; background: var(--bg); }
.stage { position: relative; width: 100%; aspect-ratio: var(--player-ratio); background: var(--surface); overflow: hidden; }
.stage > iframe, .cover, .loader { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cover { display: grid; place-items: center; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cover button { position: relative; background: var(--accent); color: var(--accent-text); }
.loader { display: none; align-items: center; justify-content: center; flex-direction: column; background: var(--surface); }
[data-gf-state="loading"] .cover, [data-gf-state="playing"] .cover { display: none; }
[data-gf-state="loading"] .loader { display: flex; }
[data-gf-state="playing"] .loader { display: none; }
.stage:not([data-gf-state="playing"]) > iframe { visibility: hidden; }
.loading-tiles { display: flex; gap: .5rem; }
.loading-tiles i { width: 1rem; height: .5rem; background: var(--accent); animation: tile-pulse 1.2s ease-in-out infinite alternate; }
.loading-tiles i:nth-child(2) { animation-delay: .2s; }
.loading-tiles i:nth-child(3) { animation-delay: .4s; }
@keyframes tile-pulse { from { transform: translateY(0); opacity: .3; } to { transform: translateY(-.5rem); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .loading-tiles i { animation: none; } }
.engage { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: var(--space); }
[data-gf-liked], [data-gf-like][aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 700; }
.prose { max-width: var(--reading-width); margin: 2rem auto; padding-inline: var(--space); }
.prose img { height: auto; }
.prose pre { overflow-x: auto; }
.other-game { margin-block: var(--space); }
.other-game img { width: 12rem; aspect-ratio: 16 / 9; object-fit: cover; }
details { padding-block: .75rem; border-bottom: 1px solid var(--border); }
summary { cursor: pointer; font-weight: 600; }
form label { display: grid; gap: .25rem; margin-block: .75rem; }
input, textarea { min-width: 0; width: 100%; padding: .5rem; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
textarea { resize: vertical; }
.comment { padding: var(--space); margin-block: var(--space); border: 1px solid var(--border); border-radius: var(--radius); }
.comment header { display: flex; flex-wrap: wrap; gap: .75rem; }
.comment time { color: var(--muted); }
[data-gf-owner] { border-inline-start: .4rem solid var(--accent); background: var(--owner-bg); }
[data-gf-c-owner] { display: none; font-weight: 700; }
[data-gf-owner] > header > [data-gf-c-owner] { display: inline; }
.reply-state { display: none; }
[data-gf-comments][data-gf-empty]::before { display: block; content: "What's your best score? Share a tip for other players."; }
[data-gf-comments][data-gf-off]::before { display: block; content: "Comments are closed."; }
[data-gf-comments][data-gf-off] > * { display: none; }
[data-gf-comment-form][data-gf-replying] .reply-state { display: flex; flex-wrap: wrap; gap: .5rem; }
.comments:has([data-gf-off]) [data-gf-comment-form] { display: none; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--space); }
/* Optional structural switch; customize markup as well for each distinct site. */
body[data-layout="compact"] { --page-width: 56rem; --space: .75rem; }
/* Mancala: a quiet table, warm timber and river stones. */
:root { color-scheme:light; --bg:#f7f1e5; --surface:#eadeca; --text:#352c23; --muted:#716450; --accent:#2c6051; --accent-text:#fffaf0; --border:#c5b497; --owner-bg:#e5eadb; --font:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; --radius:.75rem; --page-width:72rem; --reading-width:70ch; }
body:not(.embed) { background:radial-gradient(ellipse at 20% 0,#fffcf4,transparent 55%),var(--bg); }
body:not(.embed) h1, body:not(.embed) h2 { font-family:Georgia,"Times New Roman",serif; font-weight:500; }
.site-header { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1.4rem 1.25rem; border-bottom:1px solid var(--border); }
.site-header a { text-decoration:none; color:var(--text); font-family:Georgia,serif; font-size:1.3rem; }
.brand-stones { color:#4d786a; font-size:.65rem; letter-spacing:.16rem; vertical-align:middle; margin-right:.4rem; }
.site-tagline { color:var(--muted); font-size:.85rem; }
.page-intro { text-align:center; padding:1.7rem 1rem 1.1rem; }
.page-intro .eyebrow { font-size:.65rem; letter-spacing:.2em; color:var(--muted); }
.page-intro h1 { margin:.3rem 0; font-size:clamp(1.8rem,4vw,3rem); }
.stage { border-radius:1.25rem; background:#e9ddc6; border:1px solid #c2aa86; box-shadow:0 12px 40px #5d412016; }
.cover { background:radial-gradient(ellipse at 50% 25%,#f9efda,#d5c3a6); isolation:isolate; }
.cover button { border:0; border-radius:99px; padding:.85rem 1.6rem; box-shadow:0 5px 20px #33281955; font-weight:650; font-size:clamp(1rem,2vw,1.3rem); }
.cover-board { position:absolute; width:88%; height:60%; display:flex; gap:3%; padding:3%; border-radius:40px; transform:rotate(-4deg); background:repeating-linear-gradient(2deg,transparent 0 7px,#ad73372b 8px 10px),linear-gradient(120deg,#c48e51,#eac18a,#ba8149); box-shadow:0 8px 0 #976334,0 20px 30px #5b3d2333,inset 0 2px 4px #fff9; }
.cover-store { width:10%; border-radius:40px; background:#946036; box-shadow:inset 0 5px 8px #49270b70; }
.cover-pits { flex:1; display:grid; grid-template-columns:repeat(6,1fr); grid-template-rows:1fr 1fr; gap:12% 4%; }
.cover-pits i { position:relative; border-radius:50%; background:radial-gradient(ellipse at 50% 70%,#a67441,#7e4c27); box-shadow:inset 0 4px 5px #49270b70,0 2px 1px #f6d9a5; }
.cover-pits span { position:absolute; width:18%; height:22%; left:25%; top:25%; border-radius:48%; background:radial-gradient(circle at 30% 25%,#c8e4cf,#487a67); box-shadow:1.1vw .3vw 0 #e4c08a,.2vw 1.2vw 0 #d2c5a4,1.3vw 1.5vw 0 #456b70; }
.loader { gap:1rem; background:#f2e7d3; color:#5e4c36; }
.loading-tiles { height:3rem; width:5rem; align-items:flex-start; justify-content:center; border-radius:0 0 50% 50%; border-bottom:8px solid #8e603b; box-shadow:0 3px 0 #dfbb85; }
.loading-tiles i { width:.7rem; height:.9rem; border-radius:50%; background:radial-gradient(circle at 30% 25%,#b9dbc7,#3d7265); animation:seed-drop 1.4s ease-in infinite; }
@keyframes seed-drop { 0% { transform:translateY(-8px); opacity:0; } 25% { opacity:1; } 70%,100% { transform:translateY(26px); opacity:0; } }
.engage { justify-content:center; padding-bottom:1rem; border-bottom:1px solid var(--border); }
.engage button { border-radius:99px; background:transparent; font-size:.9rem; }
.engage [aria-pressed="true"] { background:var(--accent); color:var(--accent-text); }
.prose { margin-block:3rem; }
.prose h2 { font-size:1.8rem; line-height:1.25; }
.faq details { padding:1rem 0; }
.faq summary { list-style-position:outside; margin-left:1.25rem; }
.faq p { color:#625440; padding-left:1.25rem; }
.comments { padding-block:1rem; border-top:1px solid var(--border); }
.comments h2 { font-size:1.6rem; }
.comments [type=submit] { background:var(--accent); color:var(--accent-text); border:0; }
.other-game { display:flex; flex-wrap:wrap; align-items:start; justify-content:center; gap:1.5rem; }
.other-game h2 { flex-basis:100%; text-align:center; }
.other-game a { display:grid; gap:.5rem; text-decoration:none; }
.other-game img { border-radius:.75rem; }
.site-footer { border-top:1px solid var(--border); margin-top:3rem; padding:2rem 1.25rem; font-size:.9rem; color:var(--muted); }
.site-footer > a { font-family:Georgia,serif; font-size:1.2rem; }
.site-footer nav { margin-top:1rem; }
@media (max-width:600px) { .site-tagline { display:none; } .site-header { padding:1rem; } .stage { border-radius:0; border-inline:0; aspect-ratio:auto; height:min(850px, calc(100svh - 24px)); min-height:680px; } .cover-board { width:95%; height:28%; } .cover button { transform:translateY(85px); } .page-intro { padding-top:1rem; } }
@media (prefers-reduced-motion:reduce) { .loading-tiles i { animation:none; transform:translateY(18px); } }