/* Shell-only layout on top of ds/bundle.css. Prefix gs- so it never collides with the ga- components. */
html { background: var(--bg); color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
body { min-height: 100vh; }
.gs-page { max-width: var(--content-max); margin: 0 auto; padding: var(--space-4); box-sizing: border-box; display: grid; gap: var(--space-8); }
@media (min-width: 960px) { .gs-page { padding: var(--space-6) var(--space-8) var(--space-16); } }
.gs-banner { max-width: 760px; }
.gs-head { display: grid; gap: var(--space-2); }
.gs-title { margin: 0; }
@media (max-width: 639px) { .gs-title { font-size: 30px; line-height: 34px; } }

/* real photos in the components that were drawn around placeholder divs */
img.ga-card__cover, img.ga-hcard__thumb, img.ga-menu__thumb { display: block; width: 100%; object-fit: cover; }
img.ga-gallery__img { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--media-bg); }
.gs-photo { display: block; object-fit: cover; }
.ga-drop[data-state="filled"] { cursor: default; }
.ga-compare { max-height: 78vh; margin: 0 auto; }
.ga-compare .ga-compare__img { object-fit: cover; }
.ga-gallery[data-count="1"] { max-width: 720px; margin: 0 auto; }
.ga-gallery[data-count="1"] .ga-gallery__item { display: block; max-height: 78vh; }
.ga-stage > .ga-render { margin: 0 auto; max-width: 720px; }
.ga-stage > .ga-empty { min-height: 320px; }
.ga-stage__foot { margin-top: var(--space-4); }

/* dialogs: centred on desktop, bottom sheet on phones */
.gs-scrim { position: fixed; inset: 0; z-index: var(--z-sheet); }
.gs-dialog { position: fixed; z-index: calc(var(--z-sheet) + 1); left: 50%; top: 12vh; transform: translateX(-50%); width: min(420px, calc(100vw - 32px)); max-height: 76vh; display: flex; flex-direction: column; box-sizing: border-box; }
.gs-menu-list { overflow: auto; min-height: 0; }
.gs-menu-thumb { width: 44px; height: 55px; border-radius: var(--radius-sm); object-fit: cover; flex: none; }
.gs-code { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.gs-code .ga-field__control { flex: 1; min-width: 0; }
@media (max-width: 639px) {
  .gs-dialog { top: auto; bottom: 0; left: 0; transform: none; width: 100%; max-height: 82vh; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
}
@media (max-width: 519px) { #mode { display: none; } .ga-header { gap: var(--space-2); } }
.gs-pad { padding: var(--space-5); gap: var(--space-1); }

/* ── Page frame: ambient layer behind, optional panels in the side strips ── */
body { background: transparent; }
button.ga-link { background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.gs-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; }
.gs-skip:focus { left: 8px; padding: 8px 12px; background: var(--surface); }
.ga-header [data-on] { background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line); }
.gs-layout { position: relative; }
.gs-main { min-width: 0; }
#view:focus { outline: none; }

.gs-panel { box-sizing: border-box; background: var(--surface-glass); -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3); overflow: auto; overscroll-behavior: contain; }
.gs-panel:focus { outline: none; }
.gs-panel--left { border-right: 1px solid var(--line); }
.gs-panel--right { border-left: 1px solid var(--line); }
.gs-panel-scrim { position: fixed; inset: 0; z-index: calc(var(--z-sheet) + 1); background: var(--scrim); }

@media (min-width: 1440px) {
  .gs-layout { display: grid; grid-template-columns: var(--lw, 0) minmax(0, 1fr) var(--rw, 0); }
  html[data-left="open"] .gs-layout { --lw: 320px; }
  html[data-right="open"] .gs-layout { --rw: 320px; }
  .gs-panel { position: sticky; top: 64px; height: calc(100vh - 64px); }
  html[data-left="closed"] .gs-panel--left, html[data-right="closed"] .gs-panel--right { display: none; }
  .gs-panel--left { grid-column: 1; grid-row: 1; }
  .gs-main { grid-column: 2; grid-row: 1; }
  .gs-panel--right { grid-column: 3; grid-row: 1; }
  .gs-panel-scrim { display: none; }
  /* the rail's sticky offset assumes a full-width page; keep it under the header */
  .ga-app { max-width: min(var(--content-max), 100%); }
}
@media (max-width: 1439px) {
  .gs-panel { position: fixed; top: 0; bottom: 0; z-index: calc(var(--z-sheet) + 2); width: min(360px, 88vw); background: var(--surface); box-shadow: var(--shadow-2); transition: transform var(--duration-base) var(--ease-standard), visibility 0s linear var(--duration-base); visibility: hidden; }
  .gs-panel--left { left: 0; transform: translateX(-104%); }
  .gs-panel--right { right: 0; transform: translateX(104%); }
  html[data-drawer="left"] .gs-panel--left, html[data-drawer="right"] .gs-panel--right { transform: none; visibility: visible; transition: transform var(--duration-base) var(--ease-standard); }
}

/* panel contents */
.gs-p-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-3) var(--space-4); background: inherit; border-bottom: 1px solid var(--line); }
.gs-panel .gs-p-head { background: var(--surface); }
@media (min-width: 1440px) { .gs-panel .gs-p-head { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; } }
.gs-p-body { display: grid; gap: var(--space-4); padding: var(--space-4) var(--space-4) var(--space-10); align-content: start; }
.gs-p-title { margin: 0; }
.gs-p-text { margin: 0; color: var(--ink-muted); font-size: 14px; line-height: 20px; }
.gs-p-foot { margin: 0; color: var(--ink-muted); font: 400 12px/16px var(--font-sans); }
.gs-p-card { display: grid; gap: var(--space-2); padding: var(--space-4); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--surface-raised) 80%, transparent); box-shadow: inset 0 0 0 1px var(--line); }
.gs-p-card__title { margin: 0; font: 700 14px/20px var(--font-sans); }
.gs-p-list { margin: 0; padding-left: 18px; color: var(--ink-muted); font-size: 14px; line-height: 20px; display: grid; gap: 4px; }
.gs-p-list b { color: var(--ink); font-weight: 600; }
.gs-p-chips { gap: 6px; }
.gs-p-chips .ga-chip { height: 32px; padding: 0 12px; font-size: 12px; }
.gs-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: var(--space-3); }
.gs-steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: var(--space-3); color: var(--ink-muted); font-size: 14px; line-height: 20px; }
.gs-steps li::before { content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-full); background: linear-gradient(100deg, var(--accent), var(--accent-2)); color: var(--on-accent); font: 800 13px/1 var(--font-sans); }
.gs-steps b, .gs-how b { color: var(--ink); }
.gs-faq { border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--line); padding: 0 var(--space-4); }
.gs-faq summary { cursor: pointer; padding: var(--space-3) 0; font: 600 14px/20px var(--font-sans); list-style: none; }
.gs-faq summary::-webkit-details-marker { display: none; }
.gs-faq summary::after { content: '+'; float: right; color: var(--ink-muted); }
.gs-faq[open] summary::after { content: '–'; }
.gs-faq p { margin: 0 0 var(--space-3); color: var(--ink-muted); font-size: 14px; line-height: 20px; }
.gs-news { display: grid; gap: 4px; padding-bottom: var(--space-4); border-bottom: 1px solid var(--line); }
.gs-news__date { margin: 0; font: 700 11px/14px var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }
.gs-news__title { margin: 0; font: 700 15px/20px var(--font-sans); }
.gs-feed { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.gs-feed__item { display: grid; grid-template-columns: 26px 1fr; gap: var(--space-2); align-items: start; padding: var(--space-2); border-radius: var(--radius-md); color: var(--ink); text-decoration: none; }
.gs-feed__item:hover { background: var(--surface-raised); }
.gs-feed__item:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
.gs-feed__rank { color: var(--ink-muted); font: 700 13px/20px var(--font-sans); text-align: right; }
.gs-feed__title { display: block; font: 600 14px/20px var(--font-sans); overflow-wrap: anywhere; }
.gs-feed__meta { display: block; color: var(--ink-muted); font: 400 12px/16px var(--font-sans); }
.gs-account { grid-template-columns: 44px 1fr; align-items: start; }
.gs-account .ga-btn { grid-column: 1 / -1; }
.gs-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-full); background: var(--accent-soft); color: var(--accent-ink); }
.gs-set .ga-chips { gap: 6px; }
.gs-switch { display: grid; grid-template-columns: 44px 1fr; gap: var(--space-3); align-items: start; cursor: pointer; }
.gs-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gs-switch__track { position: relative; width: 44px; height: 26px; border-radius: var(--radius-full); background: var(--surface-sunken); box-shadow: inset 0 0 0 1px var(--line-strong); transition: background var(--duration-fast) var(--ease-standard); }
.gs-switch__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: var(--radius-full); background: var(--ink-muted); transition: transform var(--duration-fast) var(--ease-pop), background var(--duration-fast); }
.gs-switch input:checked + .gs-switch__track { background: linear-gradient(100deg, var(--accent), var(--accent-2)); box-shadow: none; }
.gs-switch input:checked + .gs-switch__track::after { transform: translateX(18px); background: var(--on-accent); }
.gs-switch input:focus-visible + .gs-switch__track { box-shadow: var(--focus-ring); }
.gs-switch .ga-field__label, .gs-switch .ga-field__help { display: block; margin: 0; }

/* ── Explore extras ── */
.gs-recent { display: flex; gap: var(--space-3); overflow-x: auto; padding-bottom: var(--space-2); scroll-snap-type: x proximity; }
.gs-recent__item { flex: none; width: 240px; display: grid; grid-template-columns: 56px 1fr; gap: var(--space-3); align-items: center; padding: var(--space-2); border-radius: var(--radius-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; scroll-snap-align: start; transition: box-shadow var(--duration-fast) var(--ease-standard); }
.gs-recent__item:hover { box-shadow: inset 0 0 0 1px var(--job, var(--line-strong)), 0 8px 24px -12px var(--job, transparent); }
.gs-recent__item:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
.gs-recent__item img { width: 56px; height: 70px; border-radius: var(--radius-sm); object-fit: cover; background: var(--skeleton); }
.gs-recent__title { display: block; font: 700 14px/18px var(--font-sans); }
.gs-recent__time { display: block; color: var(--ink-muted); font: 400 12px/16px var(--font-sans); }
.gs-how { display: grid; gap: var(--space-5); padding: var(--space-8) 0 var(--space-4); border-top: 1px solid var(--line); }
.gs-how h2 { margin: 0; }
.gs-how__steps { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.gs-how__steps li { display: grid; gap: var(--space-2); padding: var(--space-5); border-radius: var(--radius-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-muted); }
.gs-how__steps b { font: 700 17px/22px var(--font-sans); }
.gs-how__n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-full); background: linear-gradient(100deg, var(--accent), var(--accent-2)); color: var(--on-accent); font: 800 15px/1 var(--font-sans); }

/* ── Footer ── */
.gs-footer { max-width: var(--content-max); margin: 0 auto; box-sizing: border-box; padding: var(--space-8) var(--space-4) var(--space-10); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-6); border-top: 1px solid var(--line); }
@media (min-width: 960px) { .gs-footer { padding: var(--space-8) var(--space-8) var(--space-12); } }
.gs-footer__mark { font-size: 15px; }
.gs-footer__links { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.gs-footer__note { margin: 0; flex-basis: 100%; color: var(--ink-muted); font: 400 12px/16px var(--font-sans); }
html[data-route="app"] .gs-footer { display: none; }

/* ── Phone tab bar (not on app pages, where Generate owns the bottom edge) ── */
.gs-tabbar { display: none; }
@media (max-width: 639px) {
  .gs-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-rail-footer); display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px var(--space-2) calc(6px + env(safe-area-inset-bottom)); background: var(--surface-glass); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); border-top: 1px solid var(--line); }
  .gs-tabbar a, .gs-tabbar button { display: grid; justify-items: center; gap: 2px; padding: 6px 0; border: 0; background: none; border-radius: var(--radius-md); color: var(--ink-muted); font: 600 11px/14px var(--font-sans); text-decoration: none; cursor: pointer; }
  .gs-tabbar [aria-current="page"] { color: var(--ink); }
  .gs-tabbar [aria-current="page"] .ga-icon { color: var(--accent-ink); }
  .gs-tabbar :focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
  html[data-route="app"] .gs-tabbar { display: none; }
  html:not([data-route="app"]) .gs-main { padding-bottom: 72px; }
  #toggle-left, #toggle-right { display: none; }
  html[data-route="app"] #toggle-left, html[data-route="app"] #toggle-right { display: inline-flex; }
}

/* ── Toasts, lightbox, pickers ── */
.gs-toasts { position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: var(--z-toast); display: grid; gap: var(--space-2); justify-items: end; pointer-events: none; }
@media (max-width: 639px) { .gs-toasts { left: var(--space-4); bottom: calc(84px + env(safe-area-inset-bottom)); } html[data-route="app"] .gs-toasts { bottom: calc(96px + env(safe-area-inset-bottom)); } }
.gs-toast { pointer-events: auto; width: min(360px, calc(100vw - 32px)); box-sizing: border-box; background: var(--surface); box-shadow: var(--shadow-2); animation: gs-in var(--duration-base) var(--ease-pop); transition: opacity var(--duration-slow), transform var(--duration-slow); }
.gs-toast.is-out { opacity: 0; transform: translateY(8px); }
@keyframes gs-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.gs-lightbox { position: fixed; inset: 0; z-index: calc(var(--z-sheet) + 3); display: grid; place-items: center; background: color-mix(in srgb, var(--media-bg) 92%, transparent); animation: gs-in var(--duration-base) var(--ease-standard); }
.gs-lightbox img { max-width: calc(100vw - 32px); max-height: calc(100vh - 120px); object-fit: contain; border-radius: var(--radius-md); }
.gs-lightbox__bar { position: fixed; left: 50%; bottom: calc(var(--space-5) + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: var(--space-2); }
.gs-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); overflow: auto; margin-top: var(--space-3); }
.gs-pick button { padding: 0; border: 0; border-radius: var(--radius-md); overflow: hidden; cursor: pointer; aspect-ratio: 4 / 5; background: var(--skeleton); }
.gs-pick button:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
.gs-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gs-from-history { margin-top: var(--space-1); justify-self: start; }

/* ── Ambient effects ── */
.gs-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; contain: strict; --wo: .16; }
html[data-theme="light"] .gs-fx { --wo: .12; }
html[data-ambient="off"] .gs-fx { display: none; }
.gs-wisp { position: absolute; width: 52vmax; height: 52vmax; border-radius: 50%; background: radial-gradient(circle at 50% 50%, var(--wc) 0, transparent 62%); opacity: var(--wo); filter: blur(30px); animation: gs-drift var(--wd, 80s) ease-in-out infinite alternate; transition: opacity 1.2s var(--ease-standard), scale 1.6s var(--ease-standard), filter 1.6s var(--ease-standard); will-change: transform; }
.gs-wisp--1 { --wc: var(--accent); left: -22vmax; top: -18vmax; --wd: 70s; }
.gs-wisp--2 { --wc: var(--accent-2); right: -24vmax; bottom: -22vmax; --wd: 90s; animation-delay: -20s; }
.gs-wisp--3 { --wc: var(--job-style); left: -26vmax; bottom: -20vmax; --wd: 110s; animation-delay: -45s; }
.gs-wisp--4 { --wc: var(--job-edits); right: -26vmax; top: -10vmax; --wd: 95s; animation-delay: -60s; }
@keyframes gs-drift {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(6vmax, 4vmax) rotate(25deg); }
  100% { transform: translate(-3vmax, 8vmax) rotate(-15deg); }
}
/* queued: the light gathers in; rendering: brighter and slowly turning; done: one bright sweep */
html[data-fx="queued"] .gs-wisp { opacity: calc(var(--wo) * 1.4); scale: .9; }
html[data-fx="rendering"] .gs-wisp { opacity: calc(var(--wo) * 1.8); scale: 1.08; filter: blur(30px) hue-rotate(25deg); }
html[data-fx="done"] .gs-wisp { opacity: calc(var(--wo) * 2.2); scale: 1.15; }
html[data-fx="error"] .gs-wisp--1, html[data-fx="error"] .gs-wisp--4 { --wc: var(--danger); }
.gs-fx::before { content: ''; position: absolute; inset: -20%; background: conic-gradient(from 0deg, transparent 0 20%, color-mix(in srgb, var(--accent) 60%, transparent) 30%, transparent 45% 70%, color-mix(in srgb, var(--accent-2) 60%, transparent) 80%, transparent 95%); opacity: 0; filter: blur(60px); transition: opacity 1.4s var(--ease-standard); animation: gs-turn 24s linear infinite; }
html[data-fx="rendering"] .gs-fx::before { opacity: .07; }
@keyframes gs-turn { to { transform: rotate(1turn); } }
.gs-sweep { position: absolute; top: -20%; bottom: -20%; left: -40%; width: 30%; background: linear-gradient(100deg, transparent, color-mix(in srgb, var(--on-media) 5%, transparent), color-mix(in srgb, var(--accent) 9%, transparent), transparent); transform: skewX(-18deg); opacity: 0; }
.gs-sweep.is-on { animation: gs-sweep 1.6s var(--ease-standard); }
@keyframes gs-sweep { 0% { left: -40%; opacity: 0; } 15% { opacity: 1; } 100% { left: 120%; opacity: 0; } }
.gs-glint { position: absolute; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); border-radius: 50%; background: var(--c); box-shadow: 0 0 calc(var(--s) * 2) var(--c), 0 0 calc(var(--s) * 5) color-mix(in srgb, var(--c) 40%, transparent); opacity: 0; animation: gs-glint var(--t) var(--ease-standard) forwards; }
.gs-glint::before, .gs-glint::after { content: ''; position: absolute; left: 50%; top: 50%; width: calc(var(--s) * 4); height: 1px; margin-left: calc(var(--s) * -2); background: linear-gradient(90deg, transparent, var(--c), transparent); opacity: .8; }
.gs-glint::after { transform: rotate(90deg); }
@keyframes gs-glint {
  0% { opacity: 0; transform: translate(0, 0) scale(.3) rotate(0deg); }
  18% { opacity: .95; transform: translate(calc(var(--dx) * .15), calc(var(--dy) * .15)) scale(1) rotate(20deg); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.4) rotate(70deg); }
}
html[data-ambient="calm"] .gs-wisp { animation-duration: 240s; }
html[data-ambient="calm"] .gs-fx::before { display: none; }
@media (prefers-reduced-motion: reduce) {
  .gs-wisp, .gs-fx::before, .gs-sweep, .gs-glint { animation: none !important; }
  .gs-wisp { transition: none; }
}
/* the tools stay calm: surfaces are opaque, so effects only show in the strips and through glass */
.ga-rail, .ga-stage, .ga-hero, .ga-card, .gs-how__steps li { isolation: isolate; }
.ga-stage { scroll-margin-top: 80px; }
.gs-footer__by { color: var(--ink-muted); font: 600 13px/18px var(--font-sans); margin-left: calc(-1 * var(--space-4)); }

/* A/B covers in Explore: the compare slider fills the 4:5 card art */
.ga-card .ga-compare { max-height: none; margin: 0; cursor: ew-resize; }
.ga-card .ga-compare__handle { width: 36px; height: 36px; margin: -18px 0 0 -18px; }

/* explore covers: the result sits left of the divider and the original right of it, so moving the divider right reveals the result */
@property --pos { syntax: '<percentage>'; inherits: true; initial-value: 50%; }
.ga-card .ga-compare .ga-compare__before { clip-path: inset(0 0 0 var(--pos)); }
.ga-card .ga-compare.ga-snap { transition: --pos .28s ease; }

/* many-view results (Orbit returns 8): two columns on phones, four on wide screens; clips keep their own shape */
.ga-gallery[data-count="5"], .ga-gallery[data-count="6"], .ga-gallery[data-count="7"], .ga-gallery[data-count="8"] { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 960px) { .ga-gallery[data-count="8"] { grid-template-columns: repeat(4, 1fr); } }
video.ga-gallery__img { aspect-ratio: auto; max-height: 70vh; background: #000; }

/* Under the hood: the line the app sends, plus one control per mapped workflow field */
.gs-cmd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.45; resize: vertical; min-height: 5.5em; }
.gs-cmd__bar { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-2); flex-wrap: wrap; }

/* the first screen: where do you want to start from */
.gs-start { display: grid; gap: var(--space-3); grid-template-columns: 1fr; margin: var(--space-6) 0 var(--space-3); text-align: left; }
@media (min-width: 720px) { .gs-start { grid-template-columns: repeat(3, 1fr); } }
.gs-start__tile { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5); border-radius: var(--radius-lg); background: var(--surface, rgba(255,255,255,.04)); border: 1px solid var(--line, rgba(255,255,255,.12)); color: inherit; text-decoration: none; transition: transform var(--duration-base) var(--ease-pop), border-color var(--duration-base); }
a.gs-start__tile:hover, a.gs-start__tile:focus-visible { transform: translateY(-2px); border-color: var(--accent); }
.gs-start__tile--off { opacity: .55; }
.gs-start__icon .ga-icon { width: 28px; height: 28px; }
.gs-start__title { font-weight: 700; font-size: 1.15rem; }
.gs-start__line { opacity: .8; }
.gs-start__count { margin-top: auto; font-size: .85rem; opacity: .7; }
.gs-start__all { margin: var(--space-3) 0 0; }

/* prompt sections: the chips for each part of a templated prompt, and the shuffle button above them */
.gs-sections { display: grid; gap: var(--space-4); }
.gs-sections__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }

/* a maker's kept example render, shown in the empty result area */
.gs-preview { display: grid; gap: var(--space-3); }
.gs-preview__media { width: 100%; max-height: 70vh; object-fit: contain; border-radius: var(--radius-lg); background: var(--surface-raised); }

/* long clips: "Step 2 of 4", one segment per step, and the video so far */
.gs-chain { display: flex; flex-direction: column; gap: var(--space-4); }
.gs-chain__head { display: flex; flex-direction: column; gap: var(--space-2); }
.gs-chain__title { margin: 0; font-weight: 700; font-size: 1.15rem; }
.gs-chain__sub { margin: 0; font-size: .9rem; opacity: .75; }
.gs-chain__bar { display: flex; gap: 6px; }
.gs-chain__bar i { flex: 1; height: 8px; border-radius: 999px; background: var(--line, rgba(255,255,255,.14)); }
.gs-chain__bar i.is-done { background: var(--accent); }
.gs-chain__bar i.is-now { background: linear-gradient(90deg, var(--accent), var(--line, rgba(255,255,255,.14))); animation: gs-chain-pulse 1.6s ease-in-out infinite; }
@keyframes gs-chain-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .gs-chain__bar i.is-now { animation: none; } }
.gs-chain__preview:empty { display: none; }
.gs-chain__cap { margin: 0 0 var(--space-2); font-size: .85rem; opacity: .7; }
.gs-chain__video { width: 100%; max-height: 320px; border-radius: var(--radius-md, 12px); background: #000; }

/* ── Account card: the API key block spans the whole card (the card itself is a 44px + 1fr grid) ── */
.gs-key { grid-column: 1 / -1; display: grid; gap: var(--space-2); }
.gs-key .ga-field__control { width: 100%; box-sizing: border-box; }

/* ── Deck: strip under the header on phones, panel tab on larger screens ── */
.gs-deckbar { display: none; }
@media (max-width: 959px) {
  .gs-deckbar { display: block; position: sticky; top: 64px; z-index: calc(var(--z-header) - 1); }
  #toggle-deck { display: none; }
}
.gd { box-sizing: border-box; }
.gd--strip { background: var(--surface-glass); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); border-bottom: 1px solid var(--line); }
.gd__bar { display: flex; align-items: center; gap: var(--space-3); width: 100%; box-sizing: border-box; padding: 6px var(--space-4); border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.gd__barthumb { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line); flex: none; color: var(--ink-muted); }
.gd__barimg { width: 100%; height: 100%; object-fit: cover; display: block; }
.gd__bartext { display: grid; min-width: 0; flex: 1; }
.gd__bartext b { font: 600 13px/16px var(--font-sans); }
.gd__bartext small { color: var(--ink-muted); font: 400 12px/16px var(--font-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd__chev { transition: transform var(--duration-fast) var(--ease-standard); color: var(--ink-muted); }
.gd--strip[data-open="true"] .gd__chev { transform: rotate(180deg); }
.gd--strip[data-open="false"] .gd__body { display: none; }
.gd__body { padding: 0 var(--space-4) var(--space-3); display: grid; gap: var(--space-2); }
.gd__row { display: flex; gap: var(--space-2); overflow-x: auto; padding: 2px 0 6px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.gd__row .gd-slot { flex: none; width: 64px; height: 80px; scroll-snap-align: start; }
.gd__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.gd__grid .gd-slot { aspect-ratio: 4 / 5; }
.gd-slot { position: relative; padding: 0; border: 0; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; color: var(--ink-muted); display: grid; place-items: center; }
.gd-slot__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.gd-slot[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent, #7c6cff); }
.gd-slot--empty { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.gd-slot--empty:hover { color: var(--ink); }
.gd-slot__badge { position: absolute; right: 4px; bottom: 4px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: var(--radius-full); background: rgb(0 0 0 / .6); color: #fff; }
.gd-slot__badge .ga-icon { width: 12px; height: 12px; }
.gd__sel { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.gd__selname { font: 600 13px/18px var(--font-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.gd__selact { display: flex; gap: var(--space-1); flex: none; }
.gd__hint, .gd__fine { margin: 0; color: var(--ink-muted); font: 400 12px/16px var(--font-sans); }
.gd--panel { display: grid; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-lg); border: 1.5px dashed transparent; }
.is-drop .gd--panel, .gd--strip.is-drop { border-color: var(--accent, #7c6cff); background: color-mix(in srgb, var(--accent, #7c6cff) 8%, transparent); }
.gd__tools { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.gd__slots { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--ink-muted); font: 500 12px/16px var(--font-sans); }

/* "Use deck selection" under a photo slot */
.gs-deckuse { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); }
.gs-deckuse:empty { display: none; }
.gs-deckuse__pick { gap: var(--space-2); }
.gs-deckuse__img { width: 22px; height: 22px; border-radius: var(--radius-sm); object-fit: cover; margin-left: -6px; }

/* tap an app twice: the card asks before it spends a render */
.ga-card { position: relative; }
.gs-arm { position: absolute; inset: 0; z-index: 2; display: grid; grid-template-columns: 1fr auto; grid-template-rows: 1fr auto; align-items: end; gap: var(--space-2); padding: var(--space-3); border-radius: inherit; background: linear-gradient(to top, rgb(0 0 0 / .82), rgb(0 0 0 / .35)); color: #fff; }
.gs-arm__q { grid-column: 1; align-self: start; font: 700 14px/18px var(--font-sans); }
.gs-arm__thumb { grid-column: 2; grid-row: 1; width: 40px; height: 40px; border-radius: var(--radius-md); overflow: hidden; box-shadow: 0 0 0 2px #fff; }
.gs-arm__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gs-arm__go { grid-column: 2; grid-row: 2; display: grid; place-items: center; width: 52px; height: 52px; border: 0; border-radius: var(--radius-full); background: #22c55e; color: #052e14; cursor: pointer; box-shadow: 0 6px 18px rgb(34 197 94 / .45); }
.gs-arm__go .ga-icon { width: 26px; height: 26px; stroke-width: 2.4; }
.gs-arm__open { grid-column: 1; grid-row: 2; justify-self: start; font: 600 12px/16px var(--font-sans); text-decoration: underline; cursor: pointer; opacity: .85; }

/* an app's looping examples */
.gs-preview__frame { position: relative; }
.gs-preview__slide[hidden] { display: none; }
.gs-preview__dots { display: flex; justify-content: center; gap: 8px; }
.gs-preview__dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: var(--radius-full); background: var(--line-strong); cursor: pointer; }
.gs-preview__dot[aria-selected="true"] { background: var(--ink); }
/* an unfolded deck scrolls away with the page; only the slim folded bar stays pinned */
@media (max-width: 959px) { .gs-deckbar:has(.gd[data-open="true"]) { position: static; } }

/* sections whose options have stills: smaller tiles, pictures fill the square */
.gs-sec-tiles { --tile-min: 84px; gap: var(--space-2); }
.gs-tile-img { display: block; width: 100%; object-fit: cover; }
.gs-tile-none { background: var(--surface-raised); }
.gs-sec-tiles .ga-tile { font-size: 12px; line-height: 16px; }

/* ── Deck: a person and their looks ── */
.gd__person { display: grid; gap: var(--space-2); padding: var(--space-3); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--surface-raised) 70%, transparent); box-shadow: inset 0 0 0 1px var(--line); }
.gd__person--new { grid-template-columns: 1fr auto; align-items: center; }
.gd__name { font-weight: 600; }
.gd__looks { display: flex; gap: var(--space-2); overflow-x: auto; padding: 2px 0 4px; scrollbar-width: thin; }
.gd-look { position: relative; flex: none; width: 56px; display: grid; gap: 2px; justify-items: center; }
.gd-look__pick { position: relative; width: 56px; height: 70px; padding: 0; border: 0; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.gd-look__pick[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent, #7c6cff); }
.gd-look__lock { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: var(--radius-full); background: rgb(0 0 0 / .6); color: #fff; cursor: pointer; }
.gd-look__lock .ga-icon { width: 12px; height: 12px; }
.gd-look__lock[aria-pressed="true"] { background: #22c55e; color: #052e14; }
.gd-look__label { max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-muted); font: 500 11px/14px var(--font-sans); }
.gd-look--add { height: 70px; width: 56px; border: 0; border-radius: var(--radius-md); background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--ink-muted); cursor: pointer; display: grid; place-items: center; }
.gd-look--add:hover { color: var(--ink); }
.gd__pact { display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: flex-end; }

/* the "new look" dialog */
.gd-mix { display: grid; gap: var(--space-3); margin: var(--space-3) 0; }
.gd-mix__row { display: grid; gap: var(--space-2); padding-bottom: var(--space-3); border-bottom: 1px solid var(--line); }
.gd-mix__use { display: flex; align-items: center; gap: var(--space-3); font: 600 13px/18px var(--font-sans); cursor: pointer; }
.gd-mix__img { width: 44px; height: 55px; border-radius: var(--radius-md); object-fit: cover; flex: none; }
.gd-mix__takes .ga-chip { height: 32px; padding: 0 12px; font-size: 12px; }
.gs-sec-group { grid-column: 1 / -1; margin: var(--space-2) 0 0; color: var(--ink-muted); font: 600 11px/14px var(--font-sans); letter-spacing: .05em; text-transform: uppercase; }
.gs-sec-drawer .ga-drawer__body { padding-top: var(--space-3); }

/* in the side panel every look is visible: they wrap instead of hiding behind a sideways scroll */
.gd--panel, .gd--panel > * { min-width: 0; }
.gd--panel .gd__looks { flex-wrap: wrap; overflow: visible; }

/* ── Starter people in the deck ── */
.gd__starters { border-radius: var(--radius-lg); background: color-mix(in srgb, var(--surface-raised) 60%, transparent); box-shadow: inset 0 0 0 1px var(--line); padding: var(--space-2) var(--space-3); }
.gd__starters > summary { cursor: pointer; font: 600 13px/20px var(--font-sans); }
.gd__sgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin-top: var(--space-2); max-height: 340px; overflow-y: auto; }
.gd--strip .gd__sgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-height: 260px; }
.gd-starter { position: relative; display: grid; gap: 2px; padding: 0; border: 0; background: none; color: var(--ink-muted); cursor: pointer; text-align: center; font: 500 10px/13px var(--font-sans); }
.gd-starter img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--line); display: block; }
.gd-starter[aria-pressed="true"] img { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent, #7c6cff); }
.gd-starter span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── The render status bar: a pill in the header on every page; the list drops down from it ── */
.gs-renderbar { position: relative; margin-left: auto; min-width: 0; }
.gs-renderbar[hidden] { display: none; }
.gs-renderbar + .ga-header__end { margin-left: 0; }
.gs-renderbar[hidden] + .ga-header__end { margin-left: auto; }
.gs-rb__pill { display: flex; align-items: center; gap: var(--space-2); max-width: 300px; box-sizing: border-box; padding: 5px 12px; border: 0; border-radius: var(--radius-full); background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.gs-rb__lead { display: grid; min-width: 0; font: 600 12px/15px var(--font-sans); }
.gs-rb__lead b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.gs-rb__lead span { color: var(--ink-muted); font: 500 11px/14px var(--font-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-rb__n { flex: none; padding: 0 6px; border-radius: var(--radius-full); background: var(--accent-soft); color: var(--accent-ink); font: 700 11px/18px var(--font-sans); }
.gs-rb__chev { flex: none; color: var(--ink-muted); transition: transform var(--duration-fast) var(--ease-standard); }
.gs-rb.is-open .gs-rb__chev { transform: rotate(180deg); }
.gs-rb__spin { width: 14px; height: 14px; flex: none; }
.gs-rb__list { position: absolute; top: calc(100% + 8px); right: 0; z-index: calc(var(--z-header) + 1); width: min(380px, calc(100vw - 2 * var(--space-4))); display: grid; gap: 1px; max-height: 70vh; overflow: auto; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line-strong); padding: var(--space-2); }
@media (max-width: 639px) { .gs-rb__lead { display: none; } .gs-rb__pill { padding: 6px 10px; } .gs-rb__list { position: fixed; top: 72px; right: var(--space-4); left: var(--space-4); width: auto; } }
.gs-rb__row { display: grid; grid-template-columns: 40px 1fr; gap: var(--space-2) var(--space-3); align-items: center; padding: var(--space-2); border-radius: var(--radius-md); }
.gs-rb__row[data-state="done"] .gs-rb__txt span { color: #22c55e; }
.gs-rb__row[data-state="error"] .gs-rb__txt span { color: #f87171; }
.gs-rb__img { width: 40px; height: 40px; border-radius: var(--radius-md); object-fit: cover; background: var(--surface-raised); display: block; }
.gs-rb__txt { display: grid; min-width: 0; font: 600 13px/16px var(--font-sans); }
.gs-rb__txt span { color: var(--ink-muted); font: 500 12px/16px var(--font-sans); overflow-wrap: anywhere; }
.gs-rb__act { grid-column: 2; display: flex; gap: var(--space-1); flex-wrap: wrap; }
.gs-rb__act:empty { display: none; }

/* ── landing: create your own app ─────────────────────────────────────────── */
.gs-make-band { display: grid; gap: var(--space-3); justify-items: center; margin: var(--space-4) 0 var(--space-2); }
.gs-make-band__or { display: flex; align-items: center; gap: var(--space-3); width: 100%; max-width: 360px; color: var(--ink-muted); font-size: .85rem; }
.gs-make-band__or::before, .gs-make-band__or::after { content: ''; flex: 1; height: 1px; background: var(--line, rgba(255,255,255,.12)); }
.gs-make-band__card { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; width: 100%; box-sizing: border-box; padding: var(--space-5); border-radius: var(--radius-lg); border: 1px dashed var(--accent); background: var(--accent-soft, rgba(255,255,255,.04)); text-align: left; }
.gs-make-band__text { flex: 1 1 240px; }
.gs-make-band__text p { margin: var(--space-1) 0 0; opacity: .8; }
.gs-make-band .gs-start__all { margin: 0; }

/* ── the builder ─────────────────────────────────────────────────────────────── */
.gs-make { display: grid; gap: var(--space-6); align-items: start; }
@media (min-width: 960px) { .gs-make { grid-template-columns: minmax(0, 1fr) 320px; } .gs-make__side { grid-column: 2; grid-row: 1 / span 4; position: sticky; top: 80px; } }
.gs-make__step { display: grid; gap: var(--space-3); }
.gs-make__step .title-2 { display: flex; align-items: center; gap: var(--space-3); margin: 0; }
.gs-kinds { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 720px) { .gs-kinds { grid-template-columns: repeat(3, 1fr); } }
.gs-kind { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4); border-radius: var(--radius-lg); border: 1px solid var(--line, rgba(255,255,255,.12)); cursor: pointer; position: relative; }
.gs-kind input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.gs-kind:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.gs-kind:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.gs-kind span { opacity: .75; font-size: .9rem; }
.gs-msecs { display: grid; gap: var(--space-3); }
.gs-msec { display: grid; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-lg); border: 1px solid var(--line, rgba(255,255,255,.12)); background: var(--surface, rgba(255,255,255,.03)); }
.gs-msec__head { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.gs-msec__head .ga-field__control { flex: 1 1 180px; min-width: 0; }
.gs-msec__tools { display: flex; gap: 2px; margin-left: auto; }
.gs-mopts { display: grid; gap: var(--space-2); }
.gs-mopt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); }
.gs-mopt .ga-field__control:nth-child(2) { grid-column: 1; }
.gs-mopt .ga-btn { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
@media (min-width: 640px) { .gs-mopt { grid-template-columns: 180px minmax(0, 1fr) auto; } .gs-mopt .ga-field__control:nth-child(2) { grid-column: auto; } .gs-mopt .ga-btn { grid-column: auto; grid-row: auto; } }
.gs-msec__foot { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.gs-check { display: inline-flex; align-items: center; gap: var(--space-2); font-size: .9rem; }
.gs-num { width: 3.5em; }
.gs-madd { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.gs-make__side { display: grid; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-lg); border: 1px solid var(--line, rgba(255,255,255,.12)); background: var(--surface, rgba(255,255,255,.03)); }
.gs-make__side .title-2 { margin: 0; }
.gs-make__sample { margin: 0; font-size: .92rem; line-height: 1.5; opacity: .85; overflow-wrap: anywhere; }
.gs-make__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.gs-make__errors ul { margin: 0; padding-left: 1.2em; }
.gs-make__link { display: grid; gap: var(--space-2); }

/* ── an app someone made: the bar under its title ─────────────────────────────── */
.gs-userbar { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-3); }
