/* ==========================================================================
   THE SINGLE-WORKSPACE DESIGNER — 2026-09-29.
   Tokens from docs/design-reference/UI-SPEC-v1.md: --vv-red #D6202B,
   accent #E02832, page #F7F8FA, panel tint #F8F9FB, text #29282D.
   ========================================================================== */
:root {
  --red: #D6202B; --red-2: #E02832; --red-deep: #C8102E;
  --ink: #29282D; --ink-2: #4A5260; --muted: #5A6473; --faint: #8A91A0;
  --line: #E8EAEE; --line-2: #DDE1E8; --tint: #F8F9FB; --chip: #F4F5F8;
  --ok: #12885A; --warn-bg: #FFFBEB; --warn-line: #FDE68A; --warn-ink: #78350F;
  --shadow: 0 4px 18px rgba(0,0,0,.06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font-family: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif; color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }
button, input, textarea { font-family: inherit; }
.ws-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ws { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }

/* ---- top bar --------------------------------------------------------- */
.ws-top { height: 64px; flex-shrink: 0; padding: 0 16px 0 12px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); background: #fff; }
.ws-back { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink-2); font-size: 14px; font-weight: 500; padding: 9px 12px 9px 8px; border-radius: 9px; }
.ws-back:hover { background: var(--chip); }
.ws-brand { flex: 1; display: flex; align-items: center; gap: 9px; min-width: 0; }
.ws-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--red); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ws-title { font-size: 15px; font-weight: 600; letter-spacing: -.1px; white-space: nowrap; }
.ws-product { display: flex; align-items: center; gap: 8px; background: var(--chip); border: 1px solid #E3E6EC; border-radius: 999px; padding: 7px 14px 7px 12px; cursor: pointer; color: var(--ink); font-size: 13px; max-width: 46vw; }
.ws-product:hover { border-color: #C9D0DA; }
.ws-product strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-product span { color: var(--muted); white-space: nowrap; }
.ws-product svg { color: var(--muted); flex-shrink: 0; }
.ws-close { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: 8px; cursor: pointer; color: #6B7280; }
.ws-close:hover { background: var(--chip); }

/* ---- mobile tabs (hidden on desktop) ---------------------------------- */
.ws-tabs { display: none; }

/* ---- body ------------------------------------------------------------ */
.ws-body { flex: 1; display: flex; min-height: 0; }
.ws-chat { width: 38%; min-width: 380px; max-width: 560px; flex-shrink: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #fff; }
.ws-design { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--tint); }

/* ---- messages -------------------------------------------------------- */
.ws-messages { flex: 1; overflow-y: auto; padding: 28px 28px 12px; display: flex; flex-direction: column; gap: 18px; scroll-behavior: smooth; }
.ws-msg { display: flex; gap: 12px; align-items: flex-start; }
.ws-msg.user { justify-content: flex-end; }
.ws-msg.user .ws-bubble { max-width: 82%; background: var(--ink); color: #fff; border-radius: 16px 16px 4px 16px; padding: 12px 16px; font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.ws-avatar { width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; background: var(--red); display: flex; align-items: center; justify-content: center; }
.ws-msg.ai .ws-bubble { max-width: 86%; font-size: 14.5px; line-height: 1.6; padding-top: 5px; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.ws-msg.ai .ws-bubble strong { font-weight: 600; }
.ws-msg.ai .ws-bubble.err { color: #9F1239; }
.ws-welcome h1 { margin: 0 0 8px; font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -.3px; }
.ws-welcome p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); max-width: 400px; }
.ws-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 42px; }
.ws-chip { font-size: 13px; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.ws-chip:hover { border-color: #B9C0CC; }
.ws-user-files { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.ws-user-files img { width: 62px; height: 62px; object-fit: cover; border-radius: 10px; border: 1px solid #E3E6EC; background: #fff; }
.ws-typing { display: inline-flex; gap: 4px; padding: 8px 0; }
.ws-typing span { width: 6px; height: 6px; border-radius: 50%; background: #B9C0CC; animation: ws-blink 1.2s infinite; }
.ws-typing span:nth-child(2) { animation-delay: .2s; } .ws-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes ws-blink { 0%,80%,100% { opacity: .3 } 40% { opacity: 1 } }
.ws-msg-card { margin-left: 42px; display: flex; align-items: center; gap: 12px; background: var(--tint); border: 1px solid #E3E6EC; border-radius: 13px; padding: 11px 13px; cursor: pointer; text-align: left; width: calc(100% - 42px); }
.ws-msg-card:hover { border-color: #C9D0DA; }
.ws-msg-card .strip { display: flex; gap: 5px; }
.ws-msg-card .strip span { width: 26px; height: 60px; border-radius: 4px; display: block; background: #DCE8F4; overflow: hidden; }
.ws-msg-card .strip span svg, .ws-msg-card .strip span img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ws-msg-card .txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ws-msg-card .txt strong { font-size: 13.5px; font-weight: 600; }
.ws-msg-card .txt span { font-size: 12px; color: var(--muted); }

/* ---- composer -------------------------------------------------------- */
.ws-composer-wrap { flex-shrink: 0; padding: 10px 20px 18px; }
.ws-attach-row { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 4px 10px; }
.ws-attach { position: relative; width: 58px; height: 58px; border-radius: 10px; border: 1px solid #E3E6EC; overflow: hidden; background: #fff; }
.ws-attach img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ws-attach .role { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(41,40,45,.78); color: #fff; font-size: 9.5px; text-align: center; padding: 2px 0; letter-spacing: .3px; }
.ws-attach .x { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(41,40,45,.85); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; }
.ws-composer { border: 1px solid var(--line-2); border-radius: 16px; background: #fff; box-shadow: var(--shadow); padding: 8px 8px 8px 6px; display: flex; align-items: flex-end; gap: 6px; }
.ws-composer:focus-within { border-color: #B9C0CC; }
.ws-composer textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: 0; font-size: 15px; line-height: 1.45; color: var(--ink); background: none; padding: 9px 4px; max-height: 160px; }
.ws-icon { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; cursor: pointer; background: none; color: var(--muted); }
.ws-icon:hover { background: var(--chip); }
.ws-plus { background: var(--chip); color: var(--ink-2); }
.ws-send { background: var(--red); color: #fff; }
.ws-send:disabled, .ws-send.is-off { background: #E6E8ED; color: #9BA2AE; cursor: default; }
.ws-hint { margin: 10px 4px 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); }

/* ---- design pane ----------------------------------------------------- */
.ws-design-head { height: 56px; flex-shrink: 0; padding: 0 24px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #ECEEF2; }
.ws-eyebrow { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .2px; }
.ws-design-sub { font-size: 13px; color: var(--faint); }
.ws-spacer { flex: 1; }
.ws-ghost { width: 32px; height: 32px; }
.ws-canvas { flex: 1; min-height: 0; padding: 32px 40px; display: flex; align-items: center; justify-content: center; overflow: auto; }
.ws-canvas > [data-when] { display: none; width: 100%; height: 100%; }
.ws[data-phase="empty"] .ws-canvas > [data-when="empty"],
.ws[data-phase="generating"] .ws-canvas > [data-when="generating"],
.ws[data-phase="concepts"] .ws-canvas > [data-when="concepts"],
.ws[data-phase="selected"] .ws-canvas > [data-when="selected"] { display: flex; }

/* empty */
.ws-empty { border: 1.5px dashed #D4D9E1; border-radius: 16px; flex-direction: column; align-items: center; justify-content: center; gap: 26px; }
.ws-empty-frame { width: 170px; height: 400px; border-radius: 8px; background: #fff; border: 1px solid #E3E6EC; display: flex; align-items: center; justify-content: center; }
.ws-empty-frame.landscape { width: 400px; height: 310px; }
.ws-empty-text { text-align: center; display: flex; flex-direction: column; gap: 7px; }
.ws-empty-text strong { font-size: 17px; font-weight: 600; }
.ws-empty-text span { font-size: 13.5px; color: var(--muted); max-width: 340px; line-height: 1.5; }

/* generating */
.ws-progress { flex-direction: column; align-items: center; justify-content: center; gap: 34px; }
.ws-progress-frames { display: flex; gap: 40px; }
/* Skeleton frames are the PRODUCT's shape (set from its mm size in JS via
   --frame-w/--frame-h) with a light sweep across them, the way an image
   generator shows a picture on its way. */
.ws-progress-frames div { position: relative; overflow: hidden; width: var(--frame-w, 200px); height: var(--frame-h, 470px); border-radius: 10px; background: #EEF0F4; border: 1px solid #E3E6EC; animation: ws-pulse 2.4s ease-in-out infinite; }
.ws-progress-frames div:nth-child(2) { animation-delay: .25s; } .ws-progress-frames div:nth-child(3) { animation-delay: .5s; }
.ws-progress-frames div::after, .ws-sheen { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 25%, rgba(255,255,255,.85) 50%, transparent 75%); transform: translateX(-100%); animation: ws-sheen 1.7s ease-in-out infinite; pointer-events: none; }
.ws-progress-frames div:nth-child(2)::after { animation-delay: .25s; } .ws-progress-frames div:nth-child(3)::after { animation-delay: .5s; }
@keyframes ws-sheen { to { transform: translateX(100%) } }
@keyframes ws-pulse { 0%,100% { opacity: 1 } 50% { opacity: .7 } }
.ws-progress-timer { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.ws-work-time { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-2); }

/* the spinner used in the chat and on the stage */
.ws-spin { width: 15px; height: 15px; border-radius: 50%; border: 2.2px solid var(--red); border-right-color: #F2C3C6; border-bottom-color: #F2C3C6; animation: ws-spin 1s linear infinite; flex-shrink: 0; display: inline-block; }

/* a "working" bubble in the chat: title, elapsed time, and a status line that changes */
.ws-work { display: flex; flex-direction: column; gap: 6px; }
.ws-work-head { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.ws-work-sub { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; min-height: 18px; }
.ws-work-sub .ws-typing { padding: 0; }
.ws-work-sub .ws-typing span { width: 4px; height: 4px; }
.ws-work.done .ws-spin { border-color: #12885A; border-right-color: #12885A; border-bottom-color: #12885A; animation: none; background: no-repeat center / 11px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312885A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); }
.ws-work.done .ws-work-sub { color: #12885A; }
.ws-work.failed .ws-spin { border-color: #9F1239; animation: none; }
.ws-progress-list { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.ws-progress-list strong { font-size: 17px; font-weight: 600; }
.ws-progress-list ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.ws-progress-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--faint); }
.ws-progress-list li::before { content: ""; width: 17px; height: 17px; border-radius: 50%; border: 2px solid var(--line-2); flex-shrink: 0; }
.ws-progress-list li[data-state="done"] { color: var(--ink-2); }
.ws-progress-list li[data-state="done"]::before { border: 0; background: no-repeat center / 17px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312885A' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); }
.ws-progress-list li[data-state="active"] { color: var(--ink); font-weight: 600; }
.ws-progress-list li[data-state="active"]::before { border: 2.4px solid var(--red); border-right-color: #F2C3C6; border-bottom-color: #F2C3C6; animation: ws-spin 1s linear infinite; }
@keyframes ws-spin { to { transform: rotate(360deg) } }

/* concepts */
.ws-concepts { align-items: center; justify-content: center; gap: 36px; flex-wrap: wrap; }
.ws-concept { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ws-concept-prev { width: 200px; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid #E3E6EC; box-shadow: var(--shadow); cursor: pointer; transition: transform .15s ease; }
.ws-concept-prev:hover { transform: translateY(-2px); }
.ws-concept-prev svg { display: block; width: 100%; height: auto; }
.ws-concept-prev.landscape { width: 260px; }
.ws-concept-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.ws-concept-use { font-size: 13px; font-weight: 600; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.ws-concept-use:hover { border-color: var(--red); color: var(--red); }

/* selected */
.ws-selected { align-items: center; justify-content: center; gap: 36px; }
.ws-thumbs { display: flex; flex-direction: column; gap: 14px; flex-shrink: 0; }
.ws-thumb { width: 58px; padding: 0; border-radius: 7px; overflow: hidden; border: 1px solid var(--line-2); background: #fff; cursor: pointer; }
.ws-thumb svg { display: block; width: 100%; height: auto; }
.ws-thumb[aria-pressed="true"] { border: 2.5px solid var(--red); }
.ws-stage { display: flex; flex-direction: column; align-items: center; gap: 16px; min-width: 0; }
.ws-stage-prev { width: 264px; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); background: #fff; cursor: zoom-in; }
.ws-stage-prev.landscape { width: min(560px, 100%); }
.ws-stage-prev svg { display: block; width: 100%; height: auto; }
.ws-stage-prev.busy { opacity: .45; filter: saturate(.6); transition: opacity .25s; }
/* the overlay while a change is being made: sweep across the design + a pill with the elapsed time */
.ws-stage-frame { position: relative; display: inline-block; max-width: 100%; }
.ws-stage-frame.landscape { width: min(560px, 100%); }
.ws-stage-frame.landscape .ws-stage-prev { width: 100%; }
/* pull-ups: the strips the cassette and foot hide, drawn over the preview so nobody expects to see them in print */
.ws-hidden-zone { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(20,22,28,.22) 0 6px, rgba(20,22,28,.30) 6px 12px); pointer-events: none; display: flex; align-items: center; justify-content: center; }
.ws-hidden-zone--top { top: 0; height: var(--hide-top, 5.5%); border-bottom: 1px dashed rgba(255,255,255,.7); border-radius: 12px 12px 0 0; }
.ws-hidden-zone--bottom { bottom: 0; height: var(--hide-bottom, 3%); border-top: 1px dashed rgba(255,255,255,.7); border-radius: 0 0 12px 12px; }
.ws-hidden-zone span { font-size: 10px; font-weight: 600; letter-spacing: .02em; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.ws-stage-busy { position: absolute; inset: 0; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.ws-stage-busy .ws-sheen { background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.6) 50%, transparent 70%); animation-duration: 1.9s; }
.ws-stage-pill { position: relative; display: flex; align-items: center; gap: 9px; background: rgba(255,255,255,.96); border: 1px solid var(--line-2); border-radius: 999px; padding: 9px 14px 9px 12px; font-size: 13px; font-weight: 600; color: var(--ink); box-shadow: 0 6px 20px rgba(0,0,0,.12); white-space: nowrap; max-width: 92%; }
.ws-stage-pill > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; }
.ws-stage-foot { display: flex; align-items: center; gap: 12px; }
.ws-approve { background: var(--red); color: #fff; border: 0; border-radius: 10px; padding: 13px 26px; font-size: 15px; font-weight: 700; cursor: pointer; }
.ws-approve:hover { background: var(--red-2); }
.ws-approve:disabled, .ws-approve.is-off { opacity: .6; cursor: default; }
.ws-approve.is-off:hover { background: var(--red); }
.ws-stage-note { font-size: 12.5px; color: var(--muted); }
.ws-stage-status { font-size: 12.5px; line-height: 1.45; padding: 8px 12px; border-radius: 8px; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); max-width: 420px; text-align: center; }
.ws-stage-status.ok { background: #F0FDF4; border-color: #BBF7D0; color: #14532D; }

/* ---- approve dialog -------------------------------------------------- */
.ws-dim { position: fixed; inset: 0; background: rgba(20,22,28,.52); z-index: 40; }
.ws-dialog { position: fixed; z-index: 41; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 32px)); background: #fff; border-radius: 18px; box-shadow: 0 18px 60px rgba(0,0,0,.24); padding: 28px 28px 22px; display: flex; flex-direction: column; gap: 20px; }
.ws-dialog h2 { margin: 0 0 6px; font-size: 21px; font-weight: 600; letter-spacing: -.3px; }
.ws-dialog-sub { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.ws-dialog-card { display: flex; align-items: center; gap: 16px; background: var(--tint); border: 1px solid #ECEEF2; border-radius: 12px; padding: 14px 16px; }
.ws-dialog-thumb { width: 44px; flex-shrink: 0; border-radius: 6px; overflow: hidden; background: #E3E6EC; }
.ws-dialog-thumb svg { display: block; width: 100%; height: auto; }
.ws-dialog-meta { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.ws-dialog-meta strong { font-size: 14px; color: var(--ink); font-weight: 600; }
.ws-dialog-fee { display: flex; align-items: baseline; justify-content: space-between; padding: 0 2px; font-size: 14.5px; font-weight: 600; }
.ws-dialog-fee strong { font-size: 19px; font-weight: 700; }
.ws-dialog-fine { margin: -8px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); padding: 0 2px; }
.ws-dialog-state { font-size: 13px; line-height: 1.5; padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); }
.ws-dialog-state.ok { background: #F0FDF4; border-color: #BBF7D0; color: #14532D; }
.ws-dialog-state.bad { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.ws-dialog-actions { display: flex; gap: 10px; }
.ws-btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line-2); border-radius: 10px; padding: 13px 22px; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.ws-btn-primary { flex: 1; background: var(--red); color: #fff; border: 0; border-radius: 10px; padding: 13px 22px; font-size: 14.5px; font-weight: 700; cursor: pointer; }
.ws-btn-primary:disabled { opacity: .6; cursor: default; }

/* ---- lightbox -------------------------------------------------------- */
.ws-lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(20,22,28,.86); display: flex; align-items: center; justify-content: center; padding: 40px; }
.ws-lightbox[hidden] { display: none; }
.ws-lightbox-prev { max-height: 100%; max-width: 100%; border-radius: 10px; overflow: hidden; background: #fff; }
.ws-lightbox { flex-direction: column; gap: 14px; cursor: zoom-out; }
.ws-lightbox-prev svg { display: block; height: calc(100vh - 150px); width: auto; max-width: calc(100vw - 80px); }
.ws-lightbox-close { position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* ---- mobile ---------------------------------------------------------- */
@media (max-width: 900px) {
  .ws-top { height: 56px; padding: 0 8px 0 4px; gap: 6px; }
  .ws-back span { display: none; }
  .ws-title { font-size: 14.5px; }
  .ws-product { max-width: 48vw; padding: 6px 10px; font-size: 12px; }
  .ws-product span { display: none; }
  .ws-tabs { display: flex; flex-shrink: 0; padding: 0 16px; border-bottom: 1px solid var(--line); background: #fff; }
  .ws-tab { flex: 1; background: none; border: 0; border-bottom: 2.5px solid transparent; padding: 11px 0 12px; font-size: 14.5px; font-weight: 500; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; }
  .ws-tab[aria-pressed="true"] { border-bottom-color: var(--red); color: var(--ink); font-weight: 600; }
  .ws-tab-badge { min-width: 19px; height: 19px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
  .ws-body { position: relative; }
  .ws-chat, .ws-design { width: 100%; max-width: none; min-width: 0; border-right: 0; }
  .ws[data-pane="chat"] .ws-design { display: none; }
  .ws[data-pane="design"] .ws-chat { display: none; }
  .ws-messages { padding: 18px 16px 10px; }
  .ws-composer-wrap { padding: 8px 12px 22px; border-top: 1px solid #F0F1F4; }
  .ws-hint { display: none; }
  .ws-canvas { padding: 20px 16px; align-items: flex-start; }
  .ws-design-head { display: none; }
  .ws-concepts { gap: 18px; }
  .ws-concept-prev { width: 150px; }
  .ws-concept-prev.landscape { width: 100%; }
  .ws-progress-frames div { width: var(--frame-w-m, 96px); height: var(--frame-h-m, 226px); }
  .ws-progress-frames { gap: 16px; }
  .ws-selected { flex-direction: column; gap: 16px; }
  .ws-thumbs { flex-direction: row; order: 2; }
  .ws-thumb { width: 42px; }
  .ws-stage { order: 1; width: 100%; }
  .ws-stage-prev { width: 200px; }
  .ws-stage-prev.landscape { width: 100%; }
  .ws-stage-foot { flex-direction: column; width: 100%; }
  .ws-approve { width: 100%; padding: 15px 20px; }
  .ws-empty-frame { width: 120px; height: 280px; }
  .ws-empty-frame.landscape { width: 260px; height: 200px; }
}

/* Release-hardening (2026-10-06): product cut shape on the previews (clipPath #vv-shape-clip, objectBoundingBox) */
.has-shape .ws-empty-frame, .has-shape .ws-progress-frames div { clip-path: url(#vv-shape-clip); border-color: transparent; }
.has-shape .ws-concept-prev, .has-shape .ws-stage-prev, .has-shape .ws-thumb { background: transparent; border-color: transparent; box-shadow: none; }

/* onboarding (empty state) */
/* 20-Oct friction: the bubble is white-space: pre-wrap (for chat text), so the welcome card's template indentation
   rendered as blank lines and pushed the starter chips below the fold on phones. Cards lay out as normal HTML. */
.ws-msg.ai .ws-bubble.ws-welcome, .ws-brief-card, .ws-work { white-space: normal; }
.ws-welcome p { margin: 0 0 12px; }
.ws-steps { list-style: none; margin: 4px 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 14px; }
/* 20-Oct friction: these were pills (border + tint + round ends) sitting right above the real chips, and got tapped.
   They are information, so they now read as a plain numbered list, not as buttons. */
.ws-steps { flex-direction: column; gap: 6px; }
.ws-steps li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); background: none; border: 0; border-radius: 0; padding: 0; cursor: default; }
.ws-steps li span { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; background: var(--brand, #D6202B); color: #fff; font-size: 12px; font-weight: 700; }
.ws-give { font-size: 13px; color: var(--muted); line-height: 1.55; }
.ws-give strong { color: var(--ink); font-weight: 600; }

/* 2026-10-20 (Atlas chat audit): "What I'll design" brief card and the "Writing up your brief…" line. */
.ws-brief-card { border: 1px solid var(--line-2); background: var(--tint); border-radius: 12px; padding: 10px 12px; }
.ws-brief-card .ws-eyebrow { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 4px; }
.ws-brief-card p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink); }
.ws-brief-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.ws-brief-writing { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }

/* ---- 2026-10-20 (Atlas, Clarity mobile friction) --------------------------------------------------------
   designer.html: 592 dead clicks and 13 of the site's 14 rage clicks (mobile) in 15 days of Clarity. */
/* one-line answer to a tap the page can't act on yet */
.ws-toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 60; width: max-content; max-width: min(460px, calc(100vw - 32px));
  background: #29282D; color: #fff; font-size: 13.5px; line-height: 1.45; padding: 11px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.22); pointer-events: none; }
.ws-toast.show { animation: ws-toast-in .18s ease-out; }
@keyframes ws-toast-in { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }
/* empty design pane: one clear way forward */
.ws-empty { cursor: pointer; }
.ws-empty-cta { margin: 10px auto 0; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.ws-empty-cta:hover { border-color: #B9C0CC; }
.ws-progress { cursor: progress; }
/* lightbox: choose from it, or tap anywhere to close */
.ws-lightbox-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ws-lightbox-use { min-height: 48px; padding: 12px 28px; border: 0; border-radius: 12px; background: var(--red); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; }
.ws-lightbox-hint { font-size: 12.5px; color: rgba(255,255,255,.75); }
/* phones / touch: every tap target at least 44 x 44 px (WCAG 2.5.5 / Apple HIG), and no iOS zoom-on-focus */
@media (max-width: 900px), (pointer: coarse) {
  .ws-back { min-width: 44px; min-height: 44px; justify-content: center; }
  .ws-close { width: 44px; height: 44px; }
  .ws-product { min-height: 44px; }
  .ws-tab { min-height: 44px; }
  .ws-icon { width: 44px; height: 44px; }
  .ws-chip { min-height: 44px; padding: 10px 16px; }
  .ws-concept-use { min-height: 44px; padding: 10px 18px; }
  .ws-thumb { width: 48px; }
  .ws-attach .x { width: 28px; height: 28px; top: 2px; right: 2px; font-size: 15px; }
  .ws-composer textarea { font-size: 16px; }
  .ws-lightbox { padding: 64px 16px 24px; }
  .ws-toast { bottom: 104px; }
}
