/* Games for Humanity. /os tokens; TFH color arrives as --p from .p-tfh. */
.gh-hero { min-height: 70svh; align-items: end; background: #F6F1EA; }  /* t240u: compiled mosaic world, light */
.gh-hero .ox__scrim { background: linear-gradient(to top, rgba(250,246,239,.97) 0%, rgba(250,246,239,.84) 42%, rgba(250,246,239,.12) 74%); }
.gh-hero .ox__copy { padding: 72px 24px; }
.gh-hero .os-btns { justify-content: center; }
.gh-hero__note { margin: 22px auto 0; max-width: 54ch; color: #4a3b33; font-size: 15px; }
.gh-games { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.gh-game { background: #FFFDF9; color: #16181D; border: 1px solid #E9DFD3; box-shadow: 0 1px 2px rgba(90,60,34,.08), 0 12px 30px rgba(90,60,34,.08); border-radius: var(--r); padding: 28px; display: flex; flex-direction: column; gap: 12px; min-height: 280px; }
.gh-game--soon { background: var(--alt); color: var(--ink); }
.gh-game h3 { font-size: 26px; letter-spacing: -.02em; margin: 0; }
.gh-game p { margin: 0; color: #3A3F48; }
.gh-game .os-btns { justify-content: flex-start; margin-top: auto; }
.gh-k { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: #9A3A22; }
.gh-game--soon .gh-k { color: var(--muted); }
.gh-steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); padding: 0; margin: 0; list-style: none; counter-reset: s; }
.gh-steps li { background: var(--bg); border-radius: var(--r); padding: 24px; counter-increment: s; }
.gh-steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--p); color: #fff; font-weight: 700; margin-bottom: 12px; }
.gh-steps h3 { margin: 0 0 6px; font-size: 18px; }
.gh-steps p { margin: 0; color: var(--muted); }
.gh-board { list-style: none; padding: 0; margin: 0; max-width: 640px; }
.gh-board li { display: grid; grid-template-columns: 48px 1fr auto auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.gh-board .gh-r { font-weight: 700; color: var(--pt, var(--p)); }
.gh-board small { color: var(--muted); }
.gh-board .gx-empty { display: block; color: var(--muted); }

/* the game page */
html.os body.gx-body { overflow: hidden; background: #E6DACB; overscroll-behavior: none; }
.gx { position: fixed; inset: calc(var(--bar) + 53px) 0 0 0; }  /* t240u: starts under the Tasks For Humanity bar, which used to cover the panel title */
#gx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.gx-hud { position: absolute; left: 12px; top: 12px; display: flex; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.gx-pill { background: rgba(255,252,247,.88); color: #16181D; box-shadow: 0 1px 2px rgba(90,60,34,.12), 0 6px 18px rgba(90,60,34,.10); border-radius: 999px; padding: 8px 14px; font-size: 14px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.gx-pill b { font-variant-numeric: tabular-nums; }
.gx-side { position: absolute; right: 12px; top: 12px; width: 210px; display: grid; gap: 8px; }
.gx-box { background: rgba(255,252,247,.9); color: #16181D; box-shadow: 0 1px 2px rgba(90,60,34,.12), 0 8px 24px rgba(90,60,34,.10); border-radius: 16px; padding: 12px 14px; font-size: 13px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.gx-box h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #4A4F59; margin: 0 0 6px; font-weight: 600; }
.gx-box ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.gx-box li { display: flex; justify-content: space-between; gap: 8px; white-space: nowrap; overflow: hidden; }
.gx-box li span { overflow: hidden; text-overflow: ellipsis; }
.gx-box li.is-you { color: #9A3A22; font-weight: 700; }
.gx-box .gx-empty { white-space: normal; color: #4A4F59; }
.gx-box p { margin: 6px 0 0; color: #4A4F59; font-size: 12px; }
.gx-box a { color: #9A3A22; display: inline-flex; align-items: center; min-height: 24px; }
.gx-split { position: absolute; right: 16px; bottom: 88px; border: 0; cursor: pointer; min-height: 52px; padding: 0 26px; border-radius: 999px; background: #C2492F; color: #fff; font: 600 16px var(--f); box-shadow: 0 2px 0 #9A3A22, 0 10px 24px rgba(154,58,34,.28); }
.gx-toast { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); max-width: min(560px, 92vw); text-align: center; background: #0F766E; color: #fff; padding: 10px 16px; border-radius: 14px; font-size: 14px; pointer-events: none; }
.gx-ui { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(230,218,203,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); padding: 16px; overflow-y: auto; }
.gx-panel { width: min(560px, 100%); background: #fff; color: var(--ink); border-radius: 26px; padding: 30px; box-shadow: 0 2px 4px rgba(90,60,34,.10), 0 30px 80px rgba(90,60,34,.28); }
.gx-panel h1, .gx-panel h2 { margin: 0 0 8px; letter-spacing: -.03em; line-height: 1.05; }
.gx-panel h1, .gx-panel .gx-title { font-size: clamp(34px, 6vw, 48px); }
.gx-panel h2 { font-size: 30px; }
.gx-lede { font-size: 18px; color: var(--muted); margin: 0 0 18px; line-height: 1.35; }
.gx-cta { background: #fbece8; border-radius: 18px; padding: 16px 18px; margin: 0 0 16px; }
.gx-cta b { display: block; font-size: 17px; margin-bottom: 4px; }
.gx-cta p { margin: 0 0 12px; color: #5c3a32; font-size: 15px; }
.gx-panel .os-btns { justify-content: flex-start; }
.gx-panel button.ob-btn { border: 0; cursor: pointer; font-family: inherit; }
.gx-panel button.ob-btn:disabled { opacity: .5; cursor: wait; }
.gx-me { background: var(--alt); border-radius: 18px; padding: 14px 18px; margin: 0 0 16px; font-size: 15px; }
.gx-me p { margin: 0; color: var(--muted); }
.gx-me .gx-me__h { color: var(--ink); font-weight: 700; margin-bottom: 4px; }
.gx-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0; }
.gx-stats dt { font-size: 11px; color: var(--muted); }
.gx-stats dd { margin: 0; font-size: 22px; font-weight: 700; }
.gx-fine { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.gx-key { margin: 14px 0 0; }
.gx-key summary { cursor: pointer; font-weight: 600; font-size: 15px; min-height: 32px; display: flex; align-items: center; }
.gx-key form { display: grid; gap: 10px; margin-top: 10px; }
.gx-key input[type=password] { font: inherit; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid #c9cbd1; width: 100%; }
.gx-check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.gx-check input { accent-color: var(--p); width: 18px; height: 18px; }
.gx-msg { font-size: 14px; color: #1d6b3a; margin: 0; min-height: 1.2em; }
.gx-msg.is-err { color: #a3261b; }
.gx-how { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.gx-abs { margin: 8px 0; padding-left: 18px; }
.gx-abs a { color: var(--pt, var(--p)); }
.gx-link { color: var(--pt, var(--p)); font-weight: 600; }
@media (max-width: 720px) {
  .gx-toast { top: auto; bottom: 150px; } .gx-ui { padding-bottom: 88px; place-items: start center; }
  .gx-hud { flex-direction: column; align-items: flex-start; } .gx-side { width: 168px; } .gx-side .gx-box:first-child { display: none; } .gx-box li:nth-child(n+4) { display: none; }
  .gx-panel { padding: 22px; border-radius: 22px; } .gx-stats { grid-template-columns: repeat(2, 1fr); }
  .gx-hud .gx-pill--hide { display: none; }
}
@media (hover: hover) and (pointer: fine) { .gx-split { display: none; } }
.gx-lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
button.gx-link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }
.gx-ui[hidden], .gx-panel[hidden], .gx-toast[hidden], [data-gx-signed][hidden], [data-gx-guest][hidden] { display: none; }
.gx-key[hidden] { display: none; }
/* t240u: Play right under the rules, online toggle under it */
.gx-panel .gx-play { margin: 0 0 10px; }
.gx-panel .gx-online { margin: 0 0 18px; min-height: 44px; }
.gx-panel .gx-play .ob-btn { min-width: 160px; }
