/* Publisher pages (/app/games/*). Builds on /assets/ui.css tokens only. */

/* ---------- small pieces ---------- */
.gx-tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--muted); font: 700 10px/1 var(--font); cursor: help; vertical-align: 1px; margin-left: 4px; text-transform: none; letter-spacing: 0; }
.gx-tip::after { content: attr(data-tip); display: none; position: absolute; z-index: 30; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: max-content; max-width: min(260px, 72vw); background: #0b0c12; border: 1px solid var(--line-strong); color: var(--text-2); padding: 8px 10px; border-radius: 10px; font: 500 12.5px/1.45 var(--font); box-shadow: var(--shadow); white-space: normal; text-align: left; }
.gx-tip:hover::after, .gx-tip:focus::after { display: block; }
.gx-tip.left::after { left: auto; right: -8px; transform: none; }
.gx-tip.right::after { left: -8px; transform: none; }
kbd { display: inline-block; min-width: 22px; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; background: var(--surface-2); font: 600 12px/1.5 var(--mono); color: var(--text); text-align: center; }
/* chips and the date-range control are the shared .chip / .seg components in ui.css; blocked = red variant */
.gx-chip.block.on, .gx-chip.block:has(input:checked) { border-color: var(--bad-line); color: var(--bad-ink); background: var(--bad-bg); }
.gx-chip.block:has(input:checked)::before { content: "⊘"; color: var(--bad-ink); }
.gx-check { color: var(--mint); font-weight: 800; }
.gx-hint { font-size: 13px; color: var(--muted); }
.gx-host { font-family: var(--mono); font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-banner { display: flex; gap: 10px 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px 10px 16px; border-radius: var(--r); border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; margin-bottom: 16px; }
.gx-banner b { color: #fff1cf; }
/* informational strip (demo data): quiet, one line, never competes with the numbers below it */
.gx-banner.info { justify-content: flex-start; padding: 7px 12px; border-color: var(--line); background: transparent; color: var(--muted); font-size: 13px; }

/* switch */
.gx-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.gx-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gx-switch .track { width: 42px; height: 24px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-strong); position: relative; transition: background .2s; flex: none; }
.gx-switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-2); transition: transform .2s, background .2s; }
.gx-switch input:checked + .track { background: var(--gold-2); border-color: var(--gold-2); }
.gx-switch input:checked + .track::after { transform: translateX(18px); background: var(--gold-ink); }
.gx-switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(124,92,255,.35); }

/* code blocks */
.gx-code { position: relative; }
.gx-code pre { margin: 0; padding-right: 76px; white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.6; }
.gx-code .copy { position: absolute; top: 8px; right: 8px; }
.gx-code .s { color: #ffd27a; } .gx-code .c { color: var(--muted); } /* #8a93a6: 6.5:1 on the code block's #07080c (was #6f7890, 4.5:1 there and 3.9–4.4:1 on cards) */ .gx-code .k { color: #b7a6ff; } .gx-code .t { color: #7dd3fc; }
.gx-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.gx-tabs button, .gx-tabs a { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font: 600 14px var(--font); padding: 10px 12px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.gx-tabs button.on, .gx-tabs a.on { color: var(--text); border-bottom-color: var(--gold); }
.gx-tabs button:hover, .gx-tabs a:hover { color: var(--text); }
.gx-label { font-size: 12.5px; color: var(--muted); font-weight: 600; margin: 14px 0 6px; display: flex; align-items: center; gap: 6px; }
.gx-label:first-child { margin-top: 0; }

/* ---------- onboarding stepper ---------- */
.gx-steps { list-style: none; margin: 0; padding: 0; max-width: 940px; }
.gx-step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; position: relative; padding-bottom: 18px; }
.gx-step::before { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: var(--line); }
.gx-step:last-child::before { display: none; }
.gx-step .num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 800 15px var(--display); background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--muted); position: relative; z-index: 1; }
.gx-step[data-state="active"] .num { background: var(--grad-gold); color: var(--gold-ink); border-color: transparent; box-shadow: 0 0 0 6px rgba(255,190,40,.12); }
.gx-step[data-state="done"] .num { background: #0f2a1d; color: var(--mint); border-color: #1d5a3c; }
.gx-step[data-state="done"]::before { background: #1d5a3c; }
.gx-step .body { min-width: 0; }
.gx-step .head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 8px; margin-bottom: 10px; }
.gx-step .head h3 { margin: 0; font-size: 18px; }
.gx-step[data-state="todo"] .head h3 { color: var(--muted); }
.gx-step[data-state="todo"] .panel { display: none; }
.gx-step .todo-note { display: none; font-size: 13.5px; color: var(--muted); }
.gx-step[data-state="todo"] .todo-note { display: block; }
.gx-step[data-state="active"] .panel.card { border-color: rgba(255,201,60,.35); box-shadow: 0 0 0 1px rgba(255,201,60,.08), 0 18px 50px rgba(0,0,0,.3); }
.gx-step .summary-line { font-size: 14px; color: var(--text-2); }

/* verification */
.gx-verify { display: flex; gap: 18px; align-items: center; }
.gx-radar { width: 64px; height: 64px; flex: none; position: relative; border-radius: 50%; display: grid; place-items: center; }
.gx-radar .core { width: 18px; height: 18px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 18px rgba(255,201,60,.7); }
.gx-radar::before, .gx-radar::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--gold); opacity: 0; animation: gx-pulse 2.2s ease-out infinite; }
.gx-radar::after { animation-delay: 1.1s; }
@keyframes gx-pulse { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }
.gx-okmark { width: 64px; height: 64px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #0f2a1d; border: 2px solid var(--mint); color: var(--mint); font: 800 28px var(--display); animation: gx-pop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes gx-pop { 0% { transform: scale(.2); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.gx-verify .big { font: 700 18px/1.3 var(--display); }
.gx-verify .big.ok { color: var(--mint); }
.gx-dots::after { content: ""; animation: gx-dots 1.4s steps(4) infinite; }
@keyframes gx-dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* agent feed */
.gx-feed { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
.gx-screen { position: relative; border-radius: var(--r); overflow: hidden; background: #07080c; border: 1px solid var(--line); aspect-ratio: 1280 / 760; }
.gx-screen img { width: 100%; height: 100%; object-fit: cover; display: block; animation: gx-fade .35s ease; }
@keyframes gx-fade { from { opacity: .2; } to { opacity: 1; } }
.gx-screen .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 9px; background: linear-gradient(transparent, rgba(0,0,0,.78)); font-size: 12.5px; color: #e6e9f2; }
.gx-screen .live { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.6); font: 700 11px var(--font); letter-spacing: .08em; color: #fff; }
.gx-screen .live i { width: 8px; height: 8px; border-radius: 50%; background: #ff4d4d; animation: gx-blink 1s ease-in-out infinite alternate; }
@keyframes gx-blink { to { opacity: .25; } }
.gx-screen .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13.5px; text-align: center; padding: 20px; }
.gx-thumbs { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; padding-bottom: 4px; scrollbar-width: thin; }
.gx-thumbs img { width: 76px; height: 45px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); flex: none; cursor: pointer; opacity: .8; }
.gx-thumbs img:hover, .gx-thumbs img.on { opacity: 1; border-color: var(--gold); }
.gx-log { background: #07080c; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; height: 380px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; scroll-behavior: smooth; }
.gx-log .e { animation: gx-in .3s ease; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; line-height: 1.45; }
@keyframes gx-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.gx-log .e .ic { color: var(--muted); text-align: center; }
.gx-log .e .tx { overflow-wrap: anywhere; }
.gx-log .e.thought .tx { color: var(--text); }
.gx-log .e.thought .ic { color: var(--violet); }
.gx-log .e.tool .tx { color: var(--cyan); font-family: var(--mono); font-size: 12.5px; }
.gx-log .e.stage .tx { color: var(--muted); font-size: 12.5px; }
.gx-log .e.error .tx { color: #ff9b9b; }
.gx-log .e.image .tx { color: var(--text-2); font-size: 12.5px; }
.gx-log .typing { color: var(--muted); font-size: 12.5px; padding-left: 26px; }
.gx-log .empty-log { color: var(--muted); margin: auto; text-align: center; font-size: 13.5px; }

/* world summary */
.gx-world-hero { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 16px; align-items: start; }
.gx-world-hero img { width: 100%; border-radius: var(--r); border: 1px solid var(--line); aspect-ratio: 1280/760; object-fit: cover; }
.gx-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.gx-fact { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 11px 13px; min-width: 0; }
.gx-fact .k { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.gx-fact .v { font: 650 16px/1.3 var(--display); margin-top: 4px; overflow-wrap: anywhere; }
.gx-controls { display: flex; flex-direction: column; gap: 6px; }
.gx-controls .c { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; color: var(--text-2); }
.gx-controls .c .in { flex: none; max-width: 48%; display: flex; flex-wrap: wrap; gap: 4px; }
.gx-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.gx-swatches span { width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); }
.gx-map { width: 100%; max-width: 320px; aspect-ratio: 1; background: #0b1016; border: 1px solid var(--line); border-radius: var(--r); display: block; }
.gx-place { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 16px; align-items: start; }
.gx-ready { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: #0f2a1d; border: 1px solid #1d5a3c; color: #a6f0c9; font: 700 17px var(--display); margin-top: 16px; }
.gx-ready .ok { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: #062015; font-size: 17px; flex: none; }

/* directed to children */
.gx-kids { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface-2); cursor: pointer; font-size: 14.5px; }
.gx-kids input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.gx-kids .d { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }

/* test ad */
.gx-testad { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 18px; align-items: start; }
.gx-testad .art { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); position: relative; }
.gx-testad .art img { display: block; width: 100%; aspect-ratio: 1376/768; object-fit: cover; }
.gx-testad .art .tag { position: absolute; top: 8px; left: 8px; }
.gx-golive { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-strong); margin-top: 16px; }

/* ---------- games list ---------- */
.gx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.gx-card { display: flex; flex-direction: column; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; transition: border-color .2s, transform .15s; min-width: 0; }
.gx-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.gx-card .thumb { aspect-ratio: 1280/600; background: var(--grad); position: relative; overflow: hidden; }
.gx-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gx-card .thumb .initial { position: absolute; inset: 0; display: grid; place-items: center; font: 800 46px var(--display); color: rgba(255,255,255,.88); }
.gx-card .thumb::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(10,11,16,.18), transparent 40%, rgba(10,11,16,.35)); box-shadow: inset 0 -1px 0 var(--line); }
.gx-card .thumb .pills { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.gx-card .thumb .pills .pill { background: rgba(10,11,16,.82); backdrop-filter: blur(6px); }
.gx-card .bd { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.gx-card .name { font: 700 17px var(--display); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-card .ping { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.gx-card .ping i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.gx-card .ping i.on { background: var(--mint); box-shadow: 0 0 8px var(--mint); }
.gx-card .money { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: end; padding-top: 10px; border-top: 1px solid var(--line); margin-top: auto; }
.gx-card .money .k { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.gx-card .money .v { font: 750 19px var(--display); }
.gx-card .setup { font-size: 13.5px; color: var(--gold); font-weight: 600; }
.gx-empty { text-align: center; padding: 50px 24px; border: 1px dashed var(--line-strong); border-radius: var(--r-xl); background: radial-gradient(600px 240px at 50% 0%, rgba(124,92,255,.12), transparent); }
.gx-empty h2 { font-size: 28px; }
.gx-empty .how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 760px; margin: 26px auto 0; text-align: left; }
.gx-empty .how div { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; font-size: 13.5px; color: var(--text-2); }
.gx-empty .how b { display: block; color: var(--text); font-family: var(--display); margin-bottom: 4px; }
.gx-sumrow { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 18px; }
/* summary strip above the game cards: three numbers separated by hairlines */
.gx-kpis { display: flex; flex-wrap: wrap; align-items: stretch; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-lg); }
.gx-kpis > div { padding: 12px 22px; min-width: 0; }
.gx-kpis > div + div { border-left: 1px solid var(--line); }
.gx-kpis .k { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .07em; display: flex; align-items: center; }
.gx-kpis .v { font: 750 22px/1.2 var(--display); letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.gx-kpis .tag { display: flex; align-items: center; }
@media (max-width: 640px) { .gx-kpis { width: 100%; } .gx-kpis > div { padding: 10px 14px; flex: 1 1 30%; } .gx-kpis .tag { flex-basis: 100%; border-left: 0 !important; border-top: 1px solid var(--line); padding: 8px 14px; } .gx-kpis .v { font-size: 19px; } }

/* ---------- game detail ---------- */
.gx-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.gx-stats .stat .v { font-size: 26px; }
.gx-form-sec { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 22px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.gx-form-sec:last-of-type { border-bottom: 0; }
.gx-form-sec h3 { font-size: 16px; margin-bottom: 4px; }
.gx-opt { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-1); }
.gx-opt + .gx-opt { margin-top: 10px; }
.gx-opt .t { font-weight: 650; }
.gx-opt .d { font-size: 13px; color: var(--muted); margin-top: 2px; }
.gx-opt.sub { margin-left: 22px; background: transparent; }
.gx-money-in { position: relative; max-width: 160px; }
.gx-money-in::before { content: "$"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.gx-money-in input { padding-left: 24px; }
.gx-savebar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 12px 0; margin-top: 8px; border-top: 1px solid var(--line); background: rgba(10,11,16,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 5; }
.gx-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.gx-gallery a { display: block; text-decoration: none; }
.gx-gallery img { width: 100%; aspect-ratio: 1280/760; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.gx-gallery .cap { font-size: 12px; color: var(--muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; font-size: 14px; }
.gx-kv dt { color: var(--muted); } .gx-kv dd { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 1100px) { .gx-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .gx-feed, .gx-testad, .gx-place, .gx-form-sec { grid-template-columns: minmax(0, 1fr); }
  .gx-form-sec { gap: 12px; }
  .gx-log { height: 300px; }
  .gx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gx-empty .how { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .gx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gx-stats .stat .v { font-size: 22px; }
  .gx-step { grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
  .gx-step .num { width: 30px; height: 30px; font-size: 13px; }
  .gx-step::before { left: 14px; top: 30px; }
  .gx-step .head { padding-top: 3px; }
  .gx-world-hero { grid-template-columns: minmax(0, 1fr); }
  .gx-verify { flex-direction: column; align-items: flex-start; }
  .gx-opt.sub { margin-left: 0; }
  .gx-cards { grid-template-columns: 1fr; }
  .card { padding: 14px; }
}

/* integration tab: install on the left, status cards on the right; one column on narrow screens */
.gx-int-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .gx-int-grid { grid-template-columns: minmax(0, 1fr); } }
.gx-world-hero.noimg { grid-template-columns: minmax(0, 1fr); }
/* phones: all four game tabs fit without a hidden scroll; tables drop their least important column */
@media (max-width: 520px) {
  .gx-tabs { gap: 0; }
  .gx-tabs button, .gx-tabs a { padding: 10px 8px; font-size: 13.5px; }
  .hide-sm { display: none; }
}
/* "Made for kids?" declaration (COPPA) — compliance */
.gx-mfk { margin: 0; min-width: 0; cursor: default; }
.gx-mfk-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 6px; }
.gx-mfk-opt { display: flex; gap: 8px; align-items: flex-start; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); cursor: pointer; font-size: 14px; min-width: 0; }
.gx-mfk-opt.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.gx-mfk-opt input { margin-top: 3px; flex: none; }
@media (max-width: 520px) { .gx-mfk-opts { grid-template-columns: 1fr; } }
.gx-comp .row { flex-wrap: wrap; }
.gx-comp pre { white-space: pre-wrap; word-break: break-all; }
