/* Public "Try a game world" page: brand header, pixel editor, world picker and the call to action. */
:root {
    --tg-brand: #4f46e5;
    --tg-ink: #1f2430;
    --tg-muted: #4a5160;
    --tg-line: #e2e5ec;
    --tg-bg: #f6f7fb;
    --tg-card: #ffffff;
}
body.tg-body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--tg-ink); background: var(--tg-bg); --brand-primary: var(--tg-brand); }
.tg-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; background: var(--tg-card); border-bottom: 1px solid var(--tg-line); }
.tg-brand { font-weight: 800; font-size: 20px; color: var(--tg-brand); text-decoration: none; }
.tg-link { color: var(--tg-brand); font-weight: 600; text-decoration: none; }
.tg-link:hover, .tg-brand:hover { text-decoration: underline; }
.tg-main { max-width: 980px; margin: 0 auto; padding: 24px 16px 48px; display: flex; flex-direction: column; gap: 20px; }
.tg-intro h1 { margin: 0 0 8px; font-size: clamp(28px, 5vw, 40px); }
.tg-lead { font-size: 18px; margin: 0 0 6px; color: var(--tg-muted); }
.tg-note { margin: 0; font-size: 14px; color: var(--tg-muted); }
.tg-step, .tg-play, .tg-cta { background: var(--tg-card); border: 1px solid var(--tg-line); border-radius: 12px; padding: 20px; }
.tg-step h2, .tg-play h2, .tg-cta h2 { margin: 0 0 8px; font-size: 20px; display: flex; align-items: center; gap: 8px; }
.tg-step-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tg-brand); color: #fff; font-size: 15px; }
.tg-help { margin: 0 0 12px; font-size: 14px; color: var(--tg-muted); }
.tg-draw { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.tg-grid { width: 288px; max-width: 100%; height: auto; border: 1px solid var(--tg-line); border-radius: 8px; cursor: crosshair; touch-action: none; image-rendering: pixelated; background: #fff; }
.tg-grid:focus-visible { outline: 3px solid var(--tg-brand); outline-offset: 2px; }
.tg-draw-side { display: flex; flex-direction: column; gap: 12px; min-width: 180px; }
.tg-palette { display: flex; flex-wrap: wrap; gap: 8px; max-width: 220px; }
.tg-swatch { width: 36px; height: 36px; border-radius: 8px; border: 2px solid var(--tg-line); cursor: pointer; padding: 0; font-size: 16px; background-clip: padding-box; }
.tg-swatch[aria-checked="true"] { border-color: var(--tg-ink); box-shadow: 0 0 0 2px #fff inset; }
.tg-swatch:focus-visible { outline: 3px solid var(--tg-brand); outline-offset: 2px; }
.tg-draw-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tg-preview { width: 160px; height: 160px; border-radius: 8px; background: linear-gradient(#e9eefc, #f8f9fe); border: 1px solid var(--tg-line); }
.tg-worlds { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tg-world { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 16px; border: 2px solid var(--tg-line); border-radius: 12px; background: var(--tg-card); color: var(--tg-ink); font: inherit; cursor: pointer; }
.tg-world:hover, .tg-world:focus-visible { border-color: var(--tg-brand); outline: none; }
.tg-world[aria-pressed="true"] { border-color: var(--tg-brand); background: #f2f4ff; }
.tg-world strong { font-size: 17px; }
.tg-world span:last-child { font-size: 14px; color: var(--tg-muted); }
.tg-world-icon { font-size: 28px; }
.tg-status { font-size: 14px; color: var(--tg-muted); margin-top: 8px; }
.tg-summary { text-align: center; padding: 12px; }
.tg-summary p { margin: 6px 0; font-size: 17px; }
.tg-summary .sg-actions { justify-content: center; }
.tg-features { margin: 8px 0 16px; padding-left: 20px; line-height: 1.7; }
.tg-cta .sg-btn { text-decoration: none; display: inline-block; }
.tg-cta .sg-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 600px) {
    .tg-header { padding: 12px 16px; }
    .tg-step, .tg-play, .tg-cta { padding: 16px; }
}
