/* Concept: Sweet AI front and center in Creator Studio.
   studio.css is the real studio stylesheet (unchanged apart from the font files, which come from Google Fonts here).
   This file only adds the Sweet AI pieces, in the studio's own tokens. */

.sa-spark { width: 1em; height: 1em; flex: none; fill: none; stroke: var(--pink); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sa-spark circle { fill: var(--pink); stroke: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
@keyframes sa-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- the Sweet AI panel (dashboard and game workspace) ---------- */
.sa { position: relative; margin: 0 0 18px; padding: 24px 26px 16px; border-radius: var(--r); border: 1px solid #ff2d9e73; background: linear-gradient(110deg, #ff2d9e1f, var(--panel) 55%); }
.sa-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 34px; }
.sa-brand { display: inline-flex; align-items: center; gap: 10px; font: 700 26px/1 var(--display); text-transform: uppercase; letter-spacing: 0.01em; }
.sa-brand .sa-spark { font-size: 27px; }
.sa-role { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.sa-role i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px #4fe3c126; flex: none; }
.app .sa-new { display: none; }
.sa[data-state="chat"] .sa-new { display: inline-flex; }
.sa-intro h2 { font: 800 clamp(32px, 3.4vw, 46px)/0.95 var(--display); text-transform: uppercase; margin: 16px 0 6px; }
.app .sa-intro p { color: var(--muted); font-size: 17px; margin: 0; }
.sa[data-state="chat"] .sa-intro { display: none; }

/* composer */
.sa-box { margin-top: 18px; border: 1px solid var(--line-2); background: var(--ink); border-radius: 16px; padding: 12px 12px 10px 18px; cursor: text; transition: border-color 0.15s, box-shadow 0.15s; }
.sa-box:focus-within { border-color: var(--pink); box-shadow: 0 0 0 3px #ff2d9e26; }
.app .sa-box textarea { display: block; width: 100%; min-height: 58px; max-height: 220px; padding: 6px 0 0; border: 0; border-radius: 0; background: transparent; resize: none; font: 400 19px/1.45 var(--body); color: var(--cream); }
.app .sa-box textarea:focus { outline: none; }
.app .sa-box textarea::placeholder { color: #7d74a0; }
.sa-atts { display: flex; flex-wrap: wrap; gap: 6px; }
.sa-atts:empty { display: none; }
.sa-att { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 4px 6px 4px 4px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); font-size: 13px; color: var(--cream); }
.sa-att img, .sa-att .ic { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; display: grid; place-items: center; background: var(--panel-2); color: var(--muted); flex: none; }
.sa-att .ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sa-att span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.sa-att button { border: 0; background: none; color: var(--dim); font-size: 17px; line-height: 1; cursor: pointer; padding: 0 2px; }
.sa-att button:hover { color: var(--cream); }
.sa-tools { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.sa-icon { width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; flex: none; }
.sa-icon:hover { background: var(--panel-2); color: var(--cream); }
.sa-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sa-scope { position: relative; min-width: 0; }
.sa-scope-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; max-width: 260px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--cream); font: 600 14px/1 var(--body); cursor: pointer; }
.sa-scope-btn:hover, .sa-scope-btn[aria-expanded="true"] { border-color: var(--line-2); background: var(--panel-2); }
.sa-scope-btn svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.sa-scope-btn .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sa-scope-btn .chev { width: 6px; height: 6px; flex: none; margin: 0 2px 3px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); }
.sa-scope-btn .thumb { width: 30px; border-radius: 5px; font-size: 11px; }
.sa-menu { position: absolute; left: 0; top: calc(100% + 8px); z-index: 45; width: 310px; max-height: 360px; overflow: auto; padding: 6px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--panel); box-shadow: 0 24px 60px #0000008c; animation: sa-in 0.15s ease; }
.sa-menu-k { padding: 8px 10px 6px; font: 600 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.sa-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: 10px; background: none; color: var(--cream); font: 500 15px/1.2 var(--body); text-align: left; cursor: pointer; }
.sa-menu button:hover, .sa-menu button[aria-checked="true"] { background: var(--panel-2); }
.sa-menu .thumb { width: 46px; border-radius: 6px; font-size: 13px; }
.sa-menu .globe { width: 46px; display: grid; place-items: center; }
.sa-menu .globe svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.sa-menu small { margin-left: auto; color: var(--dim); font-size: 12px; white-space: nowrap; }
.sa-hint { margin-left: auto; color: var(--dim); font-size: 13px; white-space: nowrap; }
.sa-hint kbd { font: 600 11px/1 var(--mono); padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); }
.sa-send { width: 42px; height: 42px; flex: none; border-radius: 50%; border: 0; background: var(--pink); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: transform 0.15s, background 0.15s, opacity 0.15s; }
.sa-send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.sa-send:hover { background: #ff54b0; transform: translateY(-1px); }
.sa-send:disabled { opacity: 0.38; cursor: default; transform: none; background: var(--pink); }
.sa-tools .sa-send { margin-left: auto; }
.sa-hint + .sa-send { margin-left: 0; }
.sa-tool { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px 0 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--cream); font: 600 14px/1 var(--body); white-space: nowrap; cursor: pointer; flex: none; }
.sa-tool:hover { border-color: var(--line-2); background: var(--panel-2); }
.sa-tool:disabled { opacity: 0.45; cursor: default; border-color: var(--line); background: var(--panel); }
.sa-tool svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* starter chips + example prompts (dashboard, before the first message) */
.sa-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sa-chips .chip { cursor: pointer; font-size: 15px; padding: 9px 14px; }
.sa-chips .chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sa-ex { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sa-ex:empty { display: none; }
.sa-ex button { padding: 9px 13px; border-radius: 14px 14px 14px 4px; border: 1px solid var(--line-2); background: var(--ink); color: var(--cream); font: 400 13px/1.35 var(--mono); text-align: left; cursor: pointer; animation: sa-in 0.2s ease both; }
.sa-ex button:hover { border-color: var(--pink); }
.sa[data-state="chat"] .sa-chips, .sa[data-state="chat"] .sa-ex { display: none; }
.sa-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13.5px; }
.app .sa-foot a { color: var(--muted); }
.app .sa-foot a:hover { color: var(--cream); }

/* thread */
.sa-thread { list-style: none; margin: 18px 0 0; padding: 0 8px 2px 0; display: flex; flex-direction: column; gap: 20px; max-height: min(62vh, 660px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.sa-thread:empty { display: none; }
.sa-msg { animation: sa-in 0.28s ease both; min-width: 0; }
.sa-msg.me { align-self: flex-end; max-width: min(80%, 640px); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.sa-bubble { padding: 10px 14px; border-radius: 14px 14px 4px 14px; border: 1px solid #ff2d9e4d; background: #ff2d9e29; font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sa-msg.me .sa-att { background: var(--ink-2); }
.sa-who { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; font: 600 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--pink); }
.sa-who .sa-spark { font-size: 15px; }
.sa-who time { color: var(--dim); font-weight: 500; letter-spacing: 0.04em; text-transform: none; }
.sa-msg.other .sa-who { color: var(--muted); }
.sa-msg.other .sa-body { color: var(--muted); }
.sa-body { font-size: 16.5px; line-height: 1.55; min-width: 0; }
.sa-body > p, .sa-body > ul, .sa-body > ol { max-width: 76ch; }
.app .sa-body p { margin: 0 0 10px; }
.sa-body b { font-weight: 600; color: var(--cream); }
.sa-body ul { margin: 0 0 12px; padding-left: 20px; }
.sa-body li { margin: 4px 0; }
.sa-body li::marker { color: var(--pink); }
.sa-body > :last-child { margin-bottom: 0; }
.sa-msg.sys { align-self: center; max-width: 100%; color: var(--dim); font-size: 14px; text-align: center; }
.sa-think { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; }
.sa-think .spinner { color: var(--pink); }
.sa-pop { animation: sa-in 0.3s ease both; }
.sa-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 2px; }
.sa-acts .chip { cursor: pointer; }
.sa-acts .chip svg { width: 14px; height: 14px; fill: none; stroke: var(--pink); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* game context card (hand-off to the game workspace) */
.sa-ctx { max-width: 580px; margin: 4px 0 6px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--ink-2); overflow: hidden; }
.sa-ctx-top { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.sa-ctx .thumb { width: 128px; border-radius: 10px; font-size: 30px; }
.sa-ctx-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sa-ctx-text strong { font: 700 24px/1.05 var(--display); text-transform: uppercase; }
.sa-ctx-text .meta { color: var(--muted); font-size: 14.5px; }
.sa-ok { display: inline-flex; align-items: center; gap: 6px; color: var(--teal); font-size: 14.5px; font-weight: 500; }
.sa-ok svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sa-ctx-foot { position: relative; display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); isolation: isolate; overflow: hidden; }
.sa-ctx-foot::before { content: ""; position: absolute; inset: 0 auto 0 0; z-index: -1; width: 0; background: #ff2d9e1f; }
.sa-ctx.counting .sa-ctx-foot::before { animation: sa-count 3.4s linear forwards; }
@keyframes sa-count { to { width: 100%; } }
.sa-ctx-go { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 13px 16px; border: 0; background: none; color: var(--cream); font: 600 15px/1.2 var(--body); text-align: left; cursor: pointer; }
.sa-ctx-foot:hover { background: var(--panel-2); }
.sa-ctx-go .arr { color: var(--pink); font-size: 19px; transition: transform 0.15s; }
.sa-ctx-go:hover .arr { transform: translateX(3px); }
.sa-ctx-stay { display: none; flex: none; margin-right: 14px; padding: 0; border: 0; background: none; color: var(--dim); font: 500 13.5px/1 var(--body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sa-ctx.counting .sa-ctx-stay { display: inline; }
.sa-ctx-stay:hover { color: var(--cream); }

/* ranked plays */
.sa-rank { display: flex; flex-direction: column; gap: 4px; max-width: 640px; margin: 6px 0 12px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--ink-2); }
.sa-rank-row { display: grid; grid-template-columns: 22px 52px minmax(0, 170px) minmax(0, 1fr) 44px; align-items: center; gap: 12px; padding: 5px 8px; border-radius: 10px; border: 0; background: none; color: var(--cream); font: inherit; text-align: left; cursor: pointer; }
.sa-rank-row:hover { background: var(--panel-2); }
.sa-rank-row .n { color: var(--dim); font: 500 12px/1 var(--mono); }
.sa-rank-row .thumb { width: 52px; border-radius: 6px; font-size: 13px; }
.sa-rank-row b { font: 700 18px/1.1 var(--display); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sa-bar { height: 8px; border-radius: 4px; background: #ffffff0d; overflow: hidden; }
.sa-bar i { display: block; height: 100%; border-radius: 4px; background: var(--violet); transform-origin: left; animation: sa-grow 0.6s ease both; }
@keyframes sa-grow { from { transform: scaleX(0); } }
.sa-rank-row .num { font: 800 20px/1 var(--display); font-variant-numeric: tabular-nums; text-align: right; }
.sa-rank-foot { padding: 6px 8px 2px; color: var(--dim); font-size: 13px; }

/* mini stats reuse the studio's .live-stats; this only sizes them inside a reply */
.sa-body .live-stats { max-width: 560px; margin: 4px 0 12px; }

/* numbered findings */
.sa-finds { list-style: none; counter-reset: f; margin: 4px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.sa-finds li { counter-increment: f; position: relative; margin: 0; padding: 14px 16px 14px 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--ink-2); }
.sa-finds li::before { content: counter(f); position: absolute; left: 16px; top: 14px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #ff2d9e24; color: var(--pink); font: 700 13px/1 var(--body); }
.sa-finds b { display: block; margin-bottom: 2px; }
.sa-finds p { margin: 0; color: var(--muted); font-size: 15.5px; }
.sa-finds .btn { margin-top: 10px; }

/* plan for approval */
.sa-plan { max-width: 720px; margin: 4px 0 12px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--ink-2); overflow: hidden; }
.sa-plan-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.sa-plan-head strong { font: 700 22px/1 var(--display); text-transform: uppercase; }
.sa-plan-list { list-style: none; margin: 0; padding: 4px 6px; max-height: 380px; overflow-y: auto; }
.sa-plan-list li { margin: 0; }
.sa-plan-list label { display: grid; grid-template-columns: 18px 58px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.sa-plan-list label:hover { background: var(--panel-2); }
.sa-plan-list .thumb { width: 58px; border-radius: 6px; font-size: 14px; }
.sa-plan-list b { display: block; font: 700 18px/1.1 var(--display); text-transform: uppercase; }
.sa-plan-list small { display: block; color: var(--muted); font-size: 14px; line-height: 1.35; }
.sa-plan-list .p { color: var(--dim); font-size: 13px; white-space: nowrap; }
.sa-plan-list input:not(:checked) ~ span, .sa-plan-list input:not(:checked) ~ .thumb { opacity: 0.45; }
.sa-plan-skip { margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13.5px; }
.sa-plan-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.sa-plan.done .sa-plan-list label { cursor: default; }
.sa-plan.done .sa-plan-list label:hover { background: none; }

/* game ideas */
/* cover options drawn by Sweet AI */
.sa-covers { display: grid; max-width: 900px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.sa-cover-opt { margin: 0; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: var(--ink-2); transition: opacity 0.2s, border-color 0.2s; }
.sa-cover-opt:hover { border-color: var(--line-2); }
.sa-cover-img { display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; background: #000; overflow: hidden; cursor: pointer; }
.sa-cover-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s; }
.sa-cover-img:hover img { transform: scale(1.03); }
.sa-cover-opt figcaption { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 12px; font: 600 14px/1 var(--body); color: var(--cream); }
.sa-covers.done .sa-cover-opt:not(.chosen) { opacity: 0.4; }
.sa-covers.done .sa-cover-img { cursor: default; }
.sa-covers.done .sa-cover-img:hover img { transform: none; }
.sa-covers .sa-cover-opt.chosen { border-color: var(--pink); }
.app .sa-covers .btn:disabled { opacity: 1; cursor: default; }
.sa-covers .chosen .btn { border-color: var(--pink); }
.cover-actions .sa-spark { font-size: 17px; }
.sa-ideas { display: grid; max-width: 980px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.sa-idea { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--ink-2); }
.sa-idea .k { font: 500 12px/1.2 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); }
.sa-idea strong { font: 800 26px/0.95 var(--display); text-transform: uppercase; }
.sa-idea p { margin: 0 !important; font-size: 15px; line-height: 1.45; }
.sa-idea .why { color: var(--dim); font-size: 13.5px; }
.sa-idea .feats { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.sa-idea .feats span { padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-size: 12px; font-weight: 600; }
.sa-idea button { margin-top: auto; align-self: flex-start; padding: 8px 0 0; border: 0; background: none; color: var(--pink); font: 700 18px/1 var(--display); text-transform: uppercase; letter-spacing: 0.02em; cursor: pointer; }
.sa-idea button:hover { color: #ff54b0; }

/* option rows (new game) */
.sa-opts { display: flex; flex-direction: column; gap: 10px; max-width: 640px; margin: 6px 0 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--ink-2); }
.sa-opt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.sa-opt > span { width: 64px; color: var(--dim); font: 600 12px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.sa-opt .seg button { cursor: pointer; }
.sa-opts .btn { align-self: flex-start; margin-top: 4px; }
.sa-opts.done .seg button { cursor: default; }

/* game picker */
.sa-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.sa-pick button { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--cream); font: 600 14px/1 var(--body); cursor: pointer; }
.sa-pick button:hover { border-color: var(--pink); }
.sa-pick .thumb { width: 40px; border-radius: 999px 6px 6px 999px; font-size: 11px; }

/* ---------- nav: ask from anywhere ---------- */
.sa-navask { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 12px; border-radius: 999px; border: 1px solid #ff2d9e73; background: var(--ink-2); color: var(--cream); font: 600 15px/1 var(--body); cursor: pointer; white-space: nowrap; opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity 0.2s, transform 0.2s, border-color 0.15s; }
.sa-navask.show { opacity: 1; transform: none; pointer-events: auto; }
.sa-navask:hover { border-color: var(--pink); }
.sa-navask .sa-spark { font-size: 17px; }
.sa-navask kbd { font: 600 11px/1 var(--mono); padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); }

/* ---------- game workspace (the real AI-build page, with Sweet AI live beside the draft) ---------- */
.ws-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.ws-grid > .sa { margin: 0; }
.ws-grid .sa-thread { min-height: 280px; max-height: clamp(300px, 100vh - 440px, 720px); }
.ws-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ws-side .card-head h2 { font-size: 26px; }
.ws-side .card-head { margin-bottom: 10px; }
.app .ws-side p { font-size: 15.5px; }
.ws-notes { color: var(--cream); }
.ws-side .submit-box .form { gap: 12px; }
.app .ws-side .submit-box input { width: 100%; }
.ws-meter { height: 6px; margin: 12px 0 16px; border-radius: 3px; background: var(--line); overflow: hidden; }
.ws-meter i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--pink); transition: width 0.5s ease; }
.ws-meter.indet i { width: 35%; animation: ws-indet 1.4s ease-in-out infinite; }
@keyframes ws-indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(290%); } }
.ws-steps.timeline li { padding-bottom: 12px; color: var(--dim); }
.ws-steps .timeline-dot { border-color: var(--line-2); }
.ws-steps li.done { color: var(--muted); }
.ws-steps li.done .timeline-dot { border-color: var(--teal); background: var(--teal); }
.ws-steps li.now { color: var(--cream); }
.ws-steps li.now .timeline-dot { border-color: var(--pink); animation: ws-pulse 1s ease-in-out infinite; }
@keyframes ws-pulse { 50% { box-shadow: 0 0 0 5px #ff2d9e2e; } }
.ws-side .live-card { margin-top: 4px; }
.ws-side .cover-row > .cover-frame { flex: 1 1 100%; }
.app .ws-side .cover-row-text p { margin: 2px 0 6px; }
.sa-gen-cover { width: 100%; height: 100%; display: grid; place-items: center; padding: 18px; text-align: center; background: radial-gradient(80% 90% at 30% 20%, #9a7bff47, transparent 70%), radial-gradient(70% 80% at 80% 90%, #ff2d9e40, transparent 70%), linear-gradient(135deg, var(--panel-2), var(--ink)); font: 800 clamp(30px, 3vw, 46px)/0.9 var(--display); text-transform: uppercase; color: var(--cream); letter-spacing: 0.02em; }
.sa-gen-cover.empty { color: var(--dim); font: 500 14px/1.4 var(--body); text-transform: none; letter-spacing: 0; }
.ws-view .page-header .badge + .badge { margin-left: 0; }
.ws-view .subtitle .sep { color: var(--dim); }
.ws-view .progress[hidden] { display: none; }

/* page swap */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.28s; }
::view-transition-group(sa-title) { animation-duration: 0.36s; }

/* ---------- small screens ---------- */
@media (max-width: 1000px) {
  .ws-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .sa { padding: 18px 16px 14px; }
  .sa-brand { font-size: 23px; }
  .sa-role { margin-left: 0; width: 100%; order: 3; }
  .sa[data-state="chat"] .sa-role { display: none; }
  .sa-hint { display: none; }
  .sa-hint + .sa-send { margin-left: auto; }
  .sa-scope-btn { max-width: 170px; }
  .app .sa-box textarea { font-size: 17px; min-height: 62px; }
  .sa-box { padding: 10px 10px 8px 14px; }
  .sa-msg.me { max-width: 92%; }
  .sa-rank-row { grid-template-columns: 18px 44px minmax(0, 1fr) 40px; }
  .sa-rank-row .sa-bar { display: none; }
  .sa-rank-row .thumb { width: 44px; }
  .sa-ctx .thumb { width: 92px; font-size: 22px; }
  .sa-ctx-text strong { font-size: 21px; }
  .sa-plan-list label { grid-template-columns: 18px 48px minmax(0, 1fr); }
  .sa-plan-list .p { display: none; }
  .sa-plan-list .thumb { width: 48px; }
  .sa-navask .t, .sa-navask kbd { display: none; }
  .sa-navask { width: 40px; padding: 0; justify-content: center; }
  .sa-opt > span { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .sa-msg, .sa-pop, .sa-ex button, .sa-bar i, .sa-menu { animation: none; }
  .ws-meter.indet i { animation: none; width: 100%; opacity: 0.5; }
}

/* ---------- Sweet AI's questions for a new game, and the filled-in New game card ---------- */
.sa-q-n { display: block; margin-bottom: 4px; color: var(--dim); font: 600 12px/1.2 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
.sa-q .chip { color: var(--cream); }
.sa-q .chip.sa-q-auto { color: var(--muted); border-style: dashed; }
.sa-q.done .chip { cursor: default; }
.sa-q.done .chip:not([aria-pressed="true"]) { opacity: 0.4; }
.sa-q.done .chip[aria-pressed="true"] { opacity: 1; }
.sa-q .chip[aria-pressed="true"] { color: var(--ink); }   /* the picked answer: cream chip, ink text (the cream text rule above made it a blank pill) */
.sa-ng-url { font-family: var(--mono); font-size: 12.5px; }
.sa-ng-url b { color: var(--cream); font-weight: 600; }
.sa-ng-rows { margin: 0; padding: 4px 16px 6px; }
.sa-ng-rows > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.sa-ng-rows > div:first-child { border-top: 0; }
.sa-ng-rows dt { color: var(--dim); font-size: 13.5px; font-weight: 600; }
.sa-ng-rows dd { margin: 0; font-size: 14.5px; line-height: 1.45; }
.sa-ng-feats { display: flex; flex-wrap: wrap; gap: 6px; }
.sa-ng-feats span { padding: 4px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; line-height: 1.2; }
.sa-ng-note { margin: 0 16px 12px; padding: 10px 12px; border-radius: 10px; background: var(--info-soft); color: var(--cream); font-size: 13.5px; line-height: 1.4; }
.sa-ng-note[hidden] { display: none; }
.sa-ng-btns { display: inline-flex; gap: 8px; }
.sa-ng.done .sa-ng-btns .btn { opacity: 0.55; cursor: default; }
@media (max-width: 720px) {
  .sa-ng-rows > div { grid-template-columns: 1fr; gap: 4px; }
  .sa-ng-btns { width: 100%; }
  .sa-ng-btns .btn { flex: 1; }
}

/* Build rows have no cover thumbnail: give the name the room the thumbnail column would take. */
@media (min-width: 901px) {
  #builds-list .game-row { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.4fr) 130px; }
}

/* Phones: the workspace chat uses most of the screen (it was ~370px tall, so the New game card needed scrolling inside it). */
@media (max-width: 720px) {
  .ws-grid .sa-thread { min-height: 240px; max-height: calc(100vh - 240px); max-height: calc(100svh - 240px); }
}
/* phone audit 12-05: the user menu name showed as "littl…" and "8 h 17 min" broke over two lines at 320 px */
@media (max-width: 360px) { .usermenu-name { display: none; } .stats-row .stat-value { font-size: 24px; white-space: nowrap; } }
@media (min-width: 361px) and (max-width: 560px) { .stats-row .stat-value { white-space: nowrap; } }
