/* The Studio (studio.js; Concept A, the owner's pick 2026-11-07): one screen that never scrolls. The signature large
   in an e-mail with a strip of the designs on the left (on top on a phone), the conversation on the right (below on a
   phone); only the messages scroll. The personal page (lead-studio.js) and the landing (landing-studio.js) share it.
   The bubbles, the website card and the field come from chat.css; the page's tokens from site.css. Light theme only. */
.st-app { --st-ease: cubic-bezier(.2, 0, 0, 1); position: fixed; left: 0; right: 0; top: var(--vv-top, 0px); height: var(--vv-h, 100dvh); z-index: 55;
  display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); background: var(--bg); color: var(--ink); }
.st-app[hidden] { display: none; }
html.st-lock { overflow: hidden; overscroll-behavior: none; } /* the page under the Studio does not scroll */
html.st-cover body > nav, html.st-cover body > main, html.st-cover body > footer { display: none; } /* the personal page: the wizard waits */
.st-app > * { transition: opacity .2s ease; }
.st-app.hush > * { opacity: 0; } /* opening: the room first, then its content */

/* the top bar */
.st-top { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 12px 0 max(16px, env(safe-area-inset-left, 0px)); padding-top: env(safe-area-inset-top, 0px); box-sizing: content-box; border-bottom: .5px solid var(--hair); background: var(--bg); position: relative; z-index: 3; }
.st-mark { display: flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; flex: none; }
.st-who { min-width: 0; font-size: .875rem; color: var(--ink-2); padding-left: 12px; border-left: .5px solid var(--hair-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-sp { flex: 1; }
.st-top .btn { flex: none; }
.st-icon { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; transition: background-color .2s ease, color .2s ease, opacity .2s ease; }
.st-icon:hover { background: var(--bg-2); color: var(--ink); }
.st-icon:disabled { opacity: .3; pointer-events: none; }
.st-icon[aria-pressed="true"] { background: var(--ink); color: #fff; }
/* "More": the page's links (privacy, terms, "Delete my data") in a small menu */
.st-menu { position: absolute; right: 12px; top: calc(100% + 6px); z-index: 6; min-width: 220px; max-width: calc(100vw - 24px); padding: 8px; border-radius: 16px; background: var(--surface); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .3), 0 0 0 .5px var(--hair-2);
  opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top right; pointer-events: none; transition: opacity .2s ease, transform .2s var(--st-ease); }
.st-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.st-menu footer, .st-menu .wrap { padding: 0; margin: 0; max-width: none; border: 0; background: none; }
.st-menu a, .st-menu button { display: flex; align-items: center; min-height: 40px; padding: 0 10px; border-radius: 10px; font-size: .875rem; color: var(--ink); text-decoration: none; }
.st-menu a:hover, .st-menu button:hover { background: var(--bg-2); }

.st-main { display: grid; grid-template-columns: minmax(0, 1fr) clamp(360px, 33vw, 440px); grid-template-rows: minmax(0, 1fr); min-height: 0; }
.st-app section { padding: 0; } /* not the landing's section spacing (site.css) */

/* the stage: the design on screen, its name, the strip of designs */
.st-stage { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); min-height: 0; background: var(--bg-2); }
.st-bar { display: flex; align-items: center; gap: 4px; padding: 12px 16px 0 24px; min-height: 52px; max-height: 64px; overflow: hidden; transition: min-height .3s var(--st-ease), max-height .3s var(--st-ease), padding .3s var(--st-ease), opacity .2s ease; }
.st-name { flex: 1; min-width: 0; display: grid; }
.st-name b { font-size: .9375rem; font-weight: 600; letter-spacing: -0.01em; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-name span { font-size: .8125rem; color: var(--ink-2); line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-count { font-size: .8125rem; color: var(--ink-3); font-variant-numeric: tabular-nums; padding: 0 6px; flex: none; }
.st-nav { display: none; }
.st-photo { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 10px; margin-right: 4px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair-2); font: 500 .8125rem var(--sans); color: var(--ink); cursor: pointer; transition: background-color .2s ease, opacity .2s ease, transform .15s ease; }
.st-photo:hover { background: var(--bg); }
.st-photo:active { transform: scale(.97); }
.st-photo[hidden] { display: none; }
.st-canvas { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; padding: 20px; cursor: pointer; transition: height .3s var(--st-ease); }
.st-frame { view-transition-name: st-frame; transition: opacity .25s ease; }
.st-mail { width: 428px; padding: 20px 24px 22px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 .5px var(--hair-2), 0 24px 60px -30px rgba(0, 0, 0, .25); }
.st-subj { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; line-height: 22px; }
.st-from { display: flex; gap: 10px; align-items: center; margin: 10px 0 12px; font-size: .8125rem; line-height: 18px; }
.st-from i { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-2); flex: none; }
.st-from span { display: block; color: var(--ink-3); font-size: .75rem; }
.st-text { display: grid; gap: 7px; margin-bottom: 14px; }
.st-text i { height: 7px; border-radius: 4px; background: var(--bg-2); }
.st-text i + i { width: 64%; }
/* the signature as in the e-mail: the GIF's 400 px frame (designs.js FRAME), its content in line with the mail's text */
.st-sig { position: relative; margin: 0 -10px; min-height: 120px; display: grid; justify-items: start; align-items: center; transition: opacity .2s ease; } /* a low design in the middle of its room */
.st-sig > .live { padding: 10px; display: grid; justify-items: start; }
/* the company's text under the signature (disclaimer.js): live text in the e-mail, never in the design. On the stage the
   design is what counts, so a long text shows its first lines and an ellipsis; the panel's preview shows all of it */
.st-disc { overflow: hidden; }
.st-disc .disc-in { padding: 2px 2px 0; }
.st-disc .disc-in > div { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden; }
/* while there is nothing to show yet: a shimmering signature, never an empty template (over the whole canvas: the chips'
   row under the e-mail is out of sight meanwhile – .st-loading, below) */
.st-skel { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 14px; pointer-events: none; opacity: 0; transition: opacity .25s ease; }
.st-skel.on { opacity: 1; }
.st-skel .sk { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: center; width: min(320px, 80%); padding: 22px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 .5px var(--hair-2); }
.st-skel .sk > span:first-child { width: 72px; height: 72px; border-radius: 50%; }
.st-skel .sk div { display: grid; gap: 9px; }
.st-skel .sk .b { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--bg-2) 25%, #ebebee 50%, var(--bg-2) 75%) 0 0 / 200% 100%; animation: stShimmer 1.2s linear infinite; }
.st-skel .sk > span.b:first-child { height: 72px; border-radius: 50%; }
.st-skel p { font-size: .875rem; color: var(--ink-2); }
@keyframes stShimmer { to { background-position: -200% 0; } }
.st-badge { position: absolute; top: 12px; left: 50%; z-index: 3; display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .8125rem; white-space: nowrap; max-width: calc(100% - 32px);
  opacity: 0; transform: translate(-50%, -6px); pointer-events: none; transition: opacity .2s ease, transform .3s var(--st-ease); }
.st-badge.on { opacity: 1; transform: translate(-50%, 0); }
.st-badge .spin { width: 12px; height: 12px; border: 1.5px solid rgba(255, 255, 255, .5); border-right-color: transparent; border-radius: 50%; animation: stSpin .7s linear infinite; }
.st-badge > span:last-child { overflow: hidden; text-overflow: ellipsis; }
@keyframes stSpin { to { transform: rotate(360deg); } }
.st-film { display: flex; gap: 10px; justify-content: center; padding: 8px 20px 18px; overflow-x: auto; scrollbar-width: none; }
.st-film::-webkit-scrollbar { display: none; }
.st-thumb { position: relative; flex: none; width: 124px; height: 78px; border: 0; padding: 0; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--hair); overflow: hidden; display: grid; place-items: center; cursor: pointer; transition: box-shadow .2s ease, transform .15s ease, opacity .25s ease; }
.st-thumb:active { transform: scale(.97); }
.st-thumb[aria-current="true"] { box-shadow: 0 0 0 2px var(--ink); }
.st-thumb .mini { width: 400px; zoom: .28; pointer-events: none; display: grid; justify-items: center; }
.st-thumb .mini > .live { width: 400px; padding: 10px; display: grid; justify-items: start; } /* where its GIF will be */
.st-thumb .mini .g-gif { display: block; width: 400px; }
.st-thumb .mini * { animation-play-state: paused !important; }
.st-thumb .tag { position: absolute; left: 6px; bottom: 6px; height: 18px; padding: 0 6px; border-radius: 6px; background: var(--ink); color: #fff; font-size: .6875rem; line-height: 18px; }
.st-thumb.busy .mini { opacity: .35; }
.st-thumb.busy::after { content: ""; position: absolute; width: 16px; height: 16px; border: 1.5px solid var(--ink-3); border-right-color: transparent; border-radius: 50%; animation: stSpin .7s linear infinite; }
.st-dots { display: none; }

/* the conversation (the bubbles, the card and the field: chat.css) */
.st-app .chat { margin: 0; max-width: none; border: 0; border-radius: 0; background: var(--bg); }
.st-talk { display: grid; grid-template-rows: minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); min-height: 0; border-left: .5px solid var(--hair); }
.st-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 18px clamp(14px, 2vw, 20px) 6px; scrollbar-width: none; }
.st-scroll::-webkit-scrollbar { display: none; }
.st-log { display: grid; grid-template-columns: minmax(0, 1fr); }
.st-row { overflow: hidden; } /* a row opens to its height, then its content fades in (studio.js grow) */
.st-row > div { padding-bottom: 8px; }
.st-echo { font-size: .75rem; line-height: 16px; color: var(--ink-3); padding: 0 4px; text-align: right; }
.st-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.st-acts .btn { gap: 6px; }
.st-up { display: inline-flex; align-items: center; gap: 10px; }
.st-up img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.st-rating { display: grid; gap: 10px; }
.st-rating-top { display: flex; align-items: baseline; gap: 10px; }
.st-rating-top b { font-size: 1.75rem; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.st-rating-top b small { font-size: .9375rem; color: var(--ink-3); font-weight: 500; }
.st-cells { display: flex; gap: 4px; }
.st-cells i { width: 16px; height: 6px; border-radius: 3px; background: #e2e2e6; }
.st-cells i.on { background: var(--c); }
.st-miss { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: .875rem; color: var(--ink-2); }
.st-miss li { display: flex; align-items: flex-start; gap: 8px; }
.st-miss li::before { content: ""; width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: #e5484d; flex: none; }
/* what the agent is doing: one line per progress note, a spinner that turns into a check */
.st-steps { list-style: none; margin: 0; padding: 12px 14px; display: grid; gap: 8px; border-radius: 18px; border-bottom-left-radius: 6px; background: var(--bg-2); min-width: 220px; max-width: min(86%, 420px); }
.st-steps li { display: flex; align-items: center; gap: 10px; font-size: .875rem; line-height: 20px; color: var(--ink-2); transition: color .2s ease; }
.st-steps li.done { color: var(--ink); }
.st-st { position: relative; flex: none; width: 16px; height: 16px; display: grid; place-items: center; }
.st-st > * { grid-area: 1 / 1; transition: opacity .2s ease, transform .2s var(--st-ease); }
.st-st .spin { width: 14px; height: 14px; border: 1.5px solid var(--ink-3); border-right-color: transparent; border-radius: 50%; animation: stSpin .7s linear infinite; }
.st-st svg { color: #30a46c; opacity: 0; transform: scale(.6); }
.st-steps li.done .st-st .spin { opacity: 0; }
.st-steps li.done .st-st svg { opacity: 1; transform: none; }

.st-dock { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 6px 14px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--bg); }
.st-app.kb .st-dock { padding-bottom: 10px; } /* the keyboard covers the home indicator */
.st-chips { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; scrollbar-width: none; transition: opacity .2s ease; mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); } /* one row; the rest scrolls in from the right */
.st-chips::-webkit-scrollbar { display: none; }
.st-chips:empty { display: none; }
.st-chips.off { opacity: .4; pointer-events: none; } /* while the agent works */
.st-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair-2); font: 400 .875rem var(--sans); color: var(--ink); cursor: pointer; white-space: nowrap; transition: background-color .2s ease, transform .15s ease; }
.st-chip:hover { background: var(--bg-2); }
.st-chip:active { transform: scale(.97); }
.st-chip svg { flex: none; color: var(--ink-2); }
.st-dock .ch-row textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-dock.busy .ch-send, .st-dock.busy .ch-icon { opacity: .4; pointer-events: none; }
.st-dock textarea { transition: box-shadow .2s ease; }
.st-dock textarea.ph-swap::placeholder { opacity: 0; transition: opacity .2s ease; } /* the placeholder fades to its new words */
.st-dock textarea::placeholder { transition: opacity .2s ease; }

/* a phone: the preview pinned on top, smaller while the keyboard is up; the messages below; nothing else scrolls */
@media (max-width: 899px) {
  .st-who { display: none; }
  .st-top { padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: 8px; gap: 6px; }
  .st-top .btn { height: 36px; padding: 0 12px; font-size: .875rem; }
  .st-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .st-stage { grid-template-rows: auto auto auto; border-bottom: .5px solid var(--hair); }
  .st-bar { padding: 4px 4px 0; min-height: 44px; }
  .st-name { text-align: center; }
  .st-name span { display: none; }
  .st-nav { display: grid; }
  .st-photo .lb { display: none; }
  .st-photo { width: 40px; height: 40px; padding: 0; justify-content: center; box-shadow: none; background: transparent; color: var(--ink-2); margin: 0; }
  .st-canvas { height: var(--stage-h, clamp(168px, 28dvh, 240px)); padding: 4px 16px 6px; }
  .st-film { display: none; }
  .st-dots { display: flex; justify-content: center; gap: 6px; padding: 0 0 10px; transition: opacity .2s ease, padding .3s var(--st-ease); }
  .st-dots i { width: 6px; height: 6px; border-radius: 3px; background: #d2d2d7; transition: width .3s var(--st-ease), background-color .2s ease; }
  .st-dots i.on { width: 18px; background: var(--ink); }
  .st-talk { border-left: 0; }
  .st-scroll { padding: 12px 14px 6px; }
  .st-subj, .st-from, .st-text { display: none; }
  .st-mail { width: 412px; padding: 6px; box-shadow: 0 0 0 .5px var(--hair-2), 0 16px 40px -28px rgba(0, 0, 0, .3); }
  .st-sig { margin: 0; } /* the GIF's frame (its 10px margin, where the ring's text turns) inside a 6px inset: off the card's edge */
  .st-disc .disc-in { padding: 0 10px 14px; }
  .st-disc .disc-in > div { -webkit-line-clamp: 2; line-clamp: 2; }
  /* typing: the signature shrinks and the bar above it folds away, so the messages keep the room */
  .st-app.compact .st-canvas { height: 104px; }
  .st-app.compact .st-bar { min-height: 0; max-height: 0; padding-top: 0; opacity: 0; }
  .st-app.compact .st-dots { opacity: 0; padding-bottom: 4px; }
}
@media (max-width: 380px) { .st-mark .wm { display: none; } }
@media (prefers-reduced-motion: reduce) { .st-skel .sk .b { animation: none; } }

/* a form shown in the conversation (the landing's account box, "send it to me") */
.st-card { width: min(100%, 420px); padding: 14px 16px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 .5px var(--hair-2); }
.st-card .selfrow { display: flex; gap: 8px; }
.st-card .selfrow input { flex: 1; min-width: 0; }

/* a design gliding to the next (studio.js glide): only the frame moves; the conversation never ghosts */
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-group(st-frame) { animation-duration: .42s; animation-timing-function: cubic-bezier(.2, 0, 0, 1); }

/* the animations' chips and tray (fx-controls.js; their styles: fx-controls.css): their place in the Studio */
.st-canvas { align-content: center; row-gap: 14px; }
.st-talk { position: relative; }
/* no signature yet (the shimmer, studio.js loading): nothing to tune or point at – the chips fade out (on a phone they
   sat on the shimmer's caption), their place kept, so nothing moves when the e-mail comes in */
.st-fx { transition: opacity .2s ease, visibility 0s; }
.st-app.st-loading .st-fx { opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s .2s; }
@media (max-width: 899px) {
  .st-app.has-fx .st-canvas { height: calc(var(--stage-h, clamp(168px, 28dvh, 240px)) + 52px); row-gap: 8px; }
  /* typing: the chips step out of the way and the stage shrinks as it always does */
  .st-app.compact.has-fx .st-canvas { height: 104px; }
  .st-app.compact .st-fx { position: absolute; left: 16px; right: 16px; bottom: 4px; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
}

/* the gallery (gallery.js, gallery.css) over the stage: on a computer the stage's column; on a phone everything between
   the top bar and the field – the only scroller there, the conversation waits under it (studio.js showGallery). An
   overlay: nothing under it moves when it opens. */
.st-gallery { position: absolute; inset: 0; z-index: 4; overflow-y: auto; overscroll-behavior: contain; background: var(--bg-2); }
.st-gallery[hidden] { display: none; }
.st-gallery.gl-wait > * { opacity: 0; }
.st-app.gl-open .st-stage > :is(.st-bar, .st-canvas, .st-film, .st-dots) { visibility: hidden; }
@media (max-width: 899px) {
  .st-main { position: relative; }
  .st-app.gl-open .st-stage { position: static; } /* the gallery's box is the main area, down to the field */
  .st-gallery { bottom: var(--dock-h, 0px); box-shadow: 0 .5px 0 var(--hair); }
  .st-app.gl-open .st-scroll { visibility: hidden; } /* under the gallery: out of reach, its place kept */
}
