/* PU-COPILOT-ROUND2 (2026-10-26). One action colour (violet). Neutral tags/chips. Lime stays only on the approved "New" pill (not used here).
   Error red is a state colour, not an action colour. No teal/cyan/blue/green tag colours. */
:root {
  --ws-accent: #a79bff;          /* accent text / outlines on dark (>= 7:1) */
  --ws-accent-fill: #6b5bf0;     /* filled action background; white text = 4.8:1 */
  --ws-accent-bg: rgba(139, 124, 255, .14);
  --ws-red: #ff8a9d; --ws-red-bg: rgba(255, 113, 137, .10);
  --ws-line: #2c3245; --ws-line2: #3b4259; --ws-card: #10131c; --ws-card2: #151926;
  --ws-text: #f4f6fb; --ws-muted: #aab2c4;
}
.ws-muted { color: var(--ws-muted); font-size: 13px; }
.ws-sr-only, .ws-polish #model { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }
.ws-menu-hide { display: none !important; }
/* P0-1: no provider logo / model chip in the header */
.ws-polish #chatModelIcon, .ws-polish .copilot-model-icon, .ws-polish .has-model-icon > .copilot-model-icon { display: none !important; }
.ws-auto { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--ws-line2); background: var(--ws-card2); color: var(--ws-text); font-size: 14px; font-weight: 600; }
.ws-auto::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ws-accent); margin-right: 8px; }

/* ---- Hero / welcome ---- */
.welcome.ws-welcome { max-width: 1040px; margin: 0 auto; padding: 24px 24px 16px; text-align: left; display: block; }
.welcome.ws-welcome[hidden] { display: none !important; }  /* P0-2: author display:block must not defeat [hidden] */
.ws-welcome-head h2 { font-size: clamp(26px, 3vw, 38px); margin: 0 0 8px; letter-spacing: -.01em; }
.ws-welcome-head p { color: var(--ws-muted); margin: 0 0 18px; max-width: 62ch; font-size: 15px; }
.ws-hero .ws-welcome-head { text-align: center; padding-top: 3vh; } .ws-hero .ws-welcome-head p { margin-left: auto; margin-right: auto; }
.ws-hero-slot:empty { display: none; }
.ws-hero-slot .composer-wrap { max-width: 720px; margin: 0 auto 22px; padding: 0; background: none; }
.ws-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.ws-hero .ws-tabs { justify-content: flex-start; }
.ws-tab { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--ws-line2); background: transparent; color: var(--ws-muted); font: inherit; font-size: 14px; cursor: pointer; min-height: 36px; }
.ws-tab:hover { color: var(--ws-text); border-color: var(--ws-accent); }
.ws-tab[aria-pressed="true"] { background: var(--ws-accent-bg); border-color: var(--ws-accent); color: var(--ws-text); }

/* ---- Media-first workflow cards: 3 col, 16:9 ---- */
.ws-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ws-card { display: flex; flex-direction: column; background: var(--ws-card); border: 1px solid var(--ws-line); border-radius: 14px; overflow: hidden; transition: border-color .15s, transform .15s; }
.ws-card[hidden] { display: none; }
.ws-card:hover, .ws-card:focus-within { border-color: var(--ws-accent); transform: translateY(-2px); }
.ws-media { position: relative; background: #0b0d14; overflow: hidden; }
.ws-card-media { aspect-ratio: 16 / 9; }
.ws-media::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, #0f121b 30%, #1b2030 50%, #0f121b 70%); background-size: 220% 100%; animation: ws-shimmer 1.4s linear infinite; }
.ws-media.is-loaded::before, .ws-media.ws-wave::before { animation: none; background: #0b0d14; opacity: 0; }
.ws-media.is-failed::before { animation: none; background: radial-gradient(circle at 50% 60%, rgba(139,124,255,.25), transparent 70%), #0b0d14; }
.ws-media img, .ws-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ws-media img { opacity: 0; transition: opacity .25s; } .ws-media.is-loaded img { opacity: 1; } .ws-media.is-failed img { display: none; }
.ws-media video { opacity: 0; transition: opacity .3s; } .ws-media.is-playing video { opacity: 1; }
.ws-fallback-ico { display: none; }
.ws-media.is-failed .ws-fallback-ico { display: block; position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; background: var(--ws-muted); opacity: .6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-5-5L5 21'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-5-5L5 21'/%3E%3C/svg%3E") center / contain no-repeat; }
.ws-wave { display: flex; align-items: center; justify-content: center; gap: 3px; padding: 0 18px; background: radial-gradient(circle at 50% 60%, rgba(139,124,255,.28), transparent 70%), #0b0d14; }
.ws-wave i { display: block; width: 4px; height: var(--h); border-radius: 2px; background: var(--ws-accent); opacity: .8; position: relative; }
@keyframes ws-shimmer { to { background-position: -220% 0; } }
.ws-card-type { position: absolute; left: 10px; top: 10px; z-index: 2; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(8,10,16,.82); color: var(--ws-text); border: 1px solid rgba(255,255,255,.14); }
.ws-card-reveal { position: absolute; inset: auto 0 0 0; z-index: 2; padding: 34px 12px 12px; background: linear-gradient(transparent, rgba(8,10,16,.94) 45%); opacity: 0; transform: translateY(6px); transition: opacity .18s, transform .18s; }
.ws-card:hover .ws-card-reveal, .ws-card:focus-within .ws-card-reveal { opacity: 1; transform: none; }
.ws-card-prompt { margin: 0 0 10px; font-size: 13.5px; line-height: 1.4; color: var(--ws-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ws-card-try { color: var(--ws-muted); }
.ws-card-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ws-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.ws-card-body h3 { margin: 0; font-size: 16px; }
.ws-card-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ws-in-chip { font-size: 13px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--ws-line2); color: var(--ws-muted); }
.ws-card-more { margin: 0; padding: 0 14px 14px; color: var(--ws-muted); font-size: 14px; line-height: 1.45; }
.ws-card-more[hidden] { display: none; }
/* buttons: one primary action colour */
.ws-polish .ws-btn { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--ws-line2); background: rgba(16,19,28,.6); color: var(--ws-text); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2; }
.ws-polish .ws-btn:hover { border-color: var(--ws-accent); }
.ws-polish .ws-btn.is-primary { background: var(--ws-accent-fill); border-color: var(--ws-accent-fill); color: #fff; }
.ws-polish .ws-btn.is-primary:hover { background: #7a6bff; }
.ws-polish .ws-btn.is-unavailable { background: transparent; border-color: var(--ws-line2); color: var(--ws-muted); }
.ws-polish :is(.ws-btn, .ws-tab, .ws-quick-btn, .ws-rail-item, .ws-chip-x, .ws-history-toggle, .ws-expand, .ws-more summary, .ws-v-nav, .ws-v-close, .ws-v-strip button, .ws-link):focus-visible { outline: 2px solid var(--ws-accent); outline-offset: 2px; }
.ws-welcome-note { margin: 18px 0 0; color: var(--ws-muted); font-size: 13px; }

/* ---- Inspiration rail ---- */
.ws-rail { margin-top: 26px; }
.ws-rail-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.ws-rail-head h3 { margin: 0; font-size: 16px; } .ws-link { color: var(--ws-accent); font-size: 14px; }
.ws-rail-row { list-style: none; margin: 0; padding: 0 0 6px; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; }
.ws-rail-row li { flex: 0 0 168px; scroll-snap-align: start; }
.ws-rail-item { display: block; width: 100%; padding: 0; text-align: left; border: 1px solid var(--ws-line); border-radius: 12px; background: var(--ws-card); color: var(--ws-text); overflow: hidden; cursor: pointer; font: inherit; }
.ws-rail-item:hover { border-color: var(--ws-accent); }
.ws-rail-media { aspect-ratio: 4 / 5; }
.ws-rail-cap { display: block; padding: 8px 10px 0; font-size: 14px; font-weight: 600; }
.ws-rail-try { display: block; padding: 0 10px 10px; font-size: 13px; color: var(--ws-muted); }

/* ---- History ---- */
#conversationList button[data-id] { display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; min-height: 52px; }
.ws-h-icon { flex: 0 0 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--ws-card2); border: 1px solid var(--ws-line); overflow: hidden; }
.ws-h-icon::before { content: ""; width: 16px; height: 16px; background: var(--ws-muted); -webkit-mask: var(--ws-ico) center / contain no-repeat; mask: var(--ws-ico) center / contain no-repeat; }
.ws-h-icon.has-thumb::before { display: none; } .ws-h-thumb { width: 100%; height: 100%; object-fit: cover; }
.ws-h-icon[data-kind="chat"] { --ws-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z'/%3E%3C/svg%3E"); }
.ws-h-icon[data-kind="image"] { --ws-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-5-5L5 21'/%3E%3C/svg%3E"); }
.ws-h-icon[data-kind="video"] { --ws-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='2' y='5' width='14' height='14' rx='2'/%3E%3Cpath d='m16 10 6-3v10l-6-3z'/%3E%3C/svg%3E"); }
.ws-h-icon[data-kind="audio"] { --ws-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 10v4M8 6v12M12 3v18M16 7v10M20 10v4'/%3E%3C/svg%3E"); }
.ws-h-icon[data-kind="image"]::before, .ws-h-icon[data-kind="video"]::before, .ws-h-icon[data-kind="audio"]::before { background: var(--ws-accent); }
.ws-h-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ws-h-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--ws-text); }
.ws-h-sub { display: flex; gap: 6px; font-size: 12.5px; color: var(--ws-muted); overflow: hidden; white-space: nowrap; }
.ws-h-project { overflow: hidden; text-overflow: ellipsis; } .ws-h-status[data-state="failed"] { color: var(--ws-red); } .ws-h-status[data-state="processing"] { color: var(--ws-text); }
.ws-h-when { margin-left: auto; }
#conversationList button.ws-probe { display: none; } #conversationList.ws-show-all button.ws-probe { display: flex; opacity: .75; }
.ws-history-toggle { width: 100%; margin-top: 6px; padding: 8px 10px; border: 1px dashed var(--ws-line2); border-radius: 10px; background: transparent; color: var(--ws-muted); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }

/* ---- Context strip (neutral) ---- */
.ws-context { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; } .ws-context[hidden] { display: none; }
.ws-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 6px 4px 10px; border-radius: 999px; border: 1px solid var(--ws-line2); background: var(--ws-card); font-size: 13px; }
.ws-chip-k { color: var(--ws-muted); } .ws-chip-v { color: var(--ws-text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 28ch; }
.ws-chip.is-op { border-color: var(--ws-accent); background: var(--ws-accent-bg); }
.ws-chip:not(:has(.ws-chip-x)) { padding-right: 10px; }
.ws-chip-x { border: 0; background: transparent; color: var(--ws-muted); font-size: 15px; line-height: 1; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; } .ws-chip-x:hover { background: rgba(255,255,255,.08); color: var(--ws-text); }
.ws-chip-action { padding: 4px 12px; border-radius: 999px; border: 1px dashed var(--ws-accent); background: transparent; color: var(--ws-accent); font: inherit; font-size: 13px; cursor: pointer; }

/* ---- Composer ---- */
.ws-polish .composer { border-radius: 18px; } .ws-polish .composer:focus-within { border-color: var(--ws-accent); }
.ws-quick { display: flex; gap: 6px; margin-left: 6px; }
.ws-quick-btn { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--ws-line2); background: transparent; color: var(--ws-muted); font: inherit; font-size: 14px; cursor: pointer; }
.ws-quick-btn:hover:not(:disabled), .ws-quick-btn[aria-pressed="true"] { border-color: var(--ws-accent); color: var(--ws-text); background: var(--ws-accent-bg); }
.ws-quick-btn { display: inline-flex; align-items: center; gap: 6px; } .ws-quick-ico { flex: none; } .ws-quick-btn[aria-pressed="true"] { font-weight: 600; box-shadow: inset 0 0 0 1px var(--ws-accent); }
.ws-quick-btn:disabled { opacity: .55; cursor: not-allowed; }
.ws-polish .composer-bar .send { margin-left: auto; }
.ws-polish .composer-bar .send:not(:disabled) { background: var(--ws-accent-fill); border-color: var(--ws-accent-fill); color: #fff; }
.ws-polish #modeDisclosure:not(.is-relevant) { display: none; }
.ws-menu-wf::after { content: " …"; } /* RC4: opens the dedicated workflow picker (no inline list, no nested scroll) */

/* ---- Creation tray ---- */
.creation-tray.ws-tray { display: block; padding: 0; border: 1px solid var(--ws-line2); border-radius: 14px; background: var(--ws-card); margin-bottom: 8px; overflow: hidden; }
.creation-tray.ws-tray[hidden] { display: none; }
.ws-tray-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; background: var(--ws-accent-bg); }
.ws-tray-head strong { color: var(--ws-text); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.ws-tray-summary { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.ws-tray-toggle { padding: 5px 14px; border-radius: 999px; border: 1px solid var(--ws-line2); background: var(--ws-card); color: var(--ws-text); font: inherit; font-size: 14px; cursor: pointer; min-height: 32px; }
.ws-tray-body { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ws-tray.is-open .ws-tray-body { display: grid; max-height: min(46vh, 420px); overflow: auto; }
.ws-tray-sec { padding: 10px 14px 12px; border-top: 1px solid var(--ws-line); min-width: 0; } .ws-tray-sec[hidden] { display: none; }
.ws-tray-sec[data-step="4"] { grid-column: 1 / -1; }
.ws-tray-sec h4 { margin: 0 0 8px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ws-muted); }
.ws-tray-est { font-size: 14px; } .ws-tray-refs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.ws-tray-sec small { display: block; color: var(--ws-muted); font-size: 13px; line-height: 1.45; }
.ws-tray label { display: grid; gap: 4px; color: var(--ws-muted); font-size: 13px; }

/* ---- Event cards, failure actions, progress ---- */
.message.ws-event .bubble { border: 1px solid var(--ws-line); border-left: 3px solid var(--ws-line2); border-radius: 12px; padding: 10px 14px; background: var(--ws-card); }
.ws-event-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 4px; font-size: 13px; }
.ws-event-type { font-weight: 600; color: var(--ws-muted); text-transform: uppercase; letter-spacing: .05em; } .ws-event-state { font-weight: 600; }
.ws-event-failure .bubble { border-left-color: var(--ws-red); } .ws-event-failure .ws-event-state { color: var(--ws-red); }
.ws-event-success .bubble, .ws-event-review .bubble, .ws-event-progress .bubble { border-left-color: var(--ws-accent); }
.ws-fail-actions { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--ws-line); }
.ws-fail-hint { margin: 0 0 10px; color: var(--ws-muted); font-size: 14px; line-height: 1.45; } .ws-fail-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ws-status-fail { margin: -2px 0 8px; padding: 10px 12px; border: 1px solid #713444; border-radius: 10px; background: var(--ws-card); }
.ws-status-fail .ws-fail-actions { margin: 0; padding: 0; border: 0; }
.ws-timeline { margin: 0 0 8px; padding: 10px 12px; border: 1px solid var(--ws-line); border-radius: 12px; background: var(--ws-card); font-size: 14px; }
.ws-steps { list-style: none; display: flex; gap: 0; margin: 0; padding: 0; overflow-x: auto; }
.ws-steps li { flex: 1; display: flex; align-items: center; gap: 6px; color: var(--ws-muted); white-space: nowrap; font-size: 13px; }
.ws-steps li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ws-line2); flex: none; } .ws-steps li + li { padding-left: 8px; }
.ws-steps li[data-state="done"] { color: var(--ws-text); } .ws-steps li[data-state="done"]::before { background: var(--ws-accent); border-color: var(--ws-accent); }
.ws-steps li[data-state="active"] { color: var(--ws-text); font-weight: 600; }
.ws-steps li[data-state="active"]::before { border-color: var(--ws-accent); background: var(--ws-accent); box-shadow: 0 0 0 4px var(--ws-accent-bg); animation: ws-pulse 1.4s ease-in-out infinite; }
.ws-timeline[data-failed="true"] { border-color: #713444; }
.ws-progress { margin: 8px 0 0; color: var(--ws-text); } .ws-elapsed { color: var(--ws-muted); font-variant-numeric: tabular-nums; }
@keyframes ws-pulse { 50% { box-shadow: 0 0 0 7px transparent; } }

/* ---- Result cards ---- */
.generated-asset-card.ws-output { position: relative; max-width: 560px; border-radius: 14px; border: 1px solid var(--ws-line); background: var(--ws-card); overflow: hidden; }
.ws-output figcaption { gap: 8px; } .ws-output-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.ws-fact { font-size: 13px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--ws-line2); color: var(--ws-muted); list-style: none; }
.ws-output-actions { gap: 8px !important; align-items: center; }
.ws-polish .ws-output-actions .generated-asset-download { min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--ws-line2); background: transparent; color: var(--ws-text); font: inherit; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; }
.ws-more { position: relative; } .ws-more summary { list-style: none; cursor: pointer; padding: 6px 14px; min-height: 36px; border-radius: 999px; border: 1px solid var(--ws-line2); color: var(--ws-text); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; } .ws-more summary::-webkit-details-marker { display: none; }
.ws-more[open] .ws-more-menu { position: absolute; z-index: 5; bottom: calc(100% + 6px); right: 0; min-width: 190px; display: grid; gap: 2px; padding: 6px; background: #1a1f2d; border: 1px solid var(--ws-line2); border-radius: 12px; box-shadow: 0 14px 40px #000a; }
.ws-more-menu > * { display: block; text-align: left; padding: 9px 12px; border-radius: 8px; border: 0; background: transparent; color: var(--ws-text); font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; }
.ws-more-menu > *:hover, .ws-more-menu > *:focus-visible { background: var(--ws-accent-bg); }
.ws-more:not([open]) .ws-more-menu { display: none; }
.ws-expand { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: rgba(8,10,16,.75); cursor: pointer; padding: 0; }
.ws-expand::before { content: ""; display: block; width: 16px; height: 16px; margin: auto; background: #fff; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7'/%3E%3C/svg%3E") center / contain no-repeat; }
.ws-clickable { cursor: zoom-in; }

/* ---- Viewer ---- */
dialog.ws-viewer { width: min(1180px, calc(100vw - 32px)); max-width: none; height: min(760px, calc(100dvh - 32px)); padding: 0; border: 1px solid var(--ws-line2); border-radius: 16px; background: #0c0f17; color: var(--ws-text); overflow: hidden; }
dialog.ws-viewer[open] { display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
dialog.ws-viewer::backdrop { background: rgba(4,6,10,.8); }
.ws-v-close { position: absolute; top: 10px; right: 10px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--ws-line2); background: rgba(8,10,16,.8); color: #fff; font-size: 22px; cursor: pointer; }
.ws-v-main { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-width: 0; min-height: 0; }
.ws-v-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 16px; background: #05070b; }
.ws-v-stage { overflow: hidden; } .ws-v-media { position: absolute; inset: 16px 64px; display: grid; place-items: center; } .ws-v-media img, .ws-v-media video { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; } .ws-v-media audio { width: min(480px, 100%); }
.ws-v-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--ws-line2); background: rgba(8,10,16,.8); color: #fff; font-size: 22px; cursor: pointer; z-index: 2; } .ws-v-prev { left: 12px; } .ws-v-next { right: 12px; }
.ws-v-strip { list-style: none; margin: 0; padding: 10px 14px; display: flex; gap: 8px; overflow-x: auto; border-top: 1px solid var(--ws-line); }
.ws-v-strip button { width: 64px; height: 64px; padding: 0; border-radius: 8px; border: 2px solid transparent; background: var(--ws-card2); overflow: hidden; cursor: pointer; color: var(--ws-text); } .ws-v-strip button[aria-current="true"] { border-color: var(--ws-accent); } .ws-v-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ws-v-side { padding: 22px 20px; overflow: auto; display: flex; flex-direction: column; gap: 12px; border-left: 1px solid var(--ws-line); }
.ws-v-title { margin: 0; font-size: 18px; padding-right: 36px; } .ws-v-prompt { margin: 0; color: var(--ws-muted); font-size: 14px; line-height: 1.5; }
.ws-v-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; } .ws-v-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

/* ---- Sources ---- */
.ws-sources { margin-top: 12px; } .ws-sources h4 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ws-muted); }
.ws-source-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.ws-source { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; padding: 8px 10px; border: 1px solid var(--ws-line); border-radius: 10px; background: var(--ws-card); text-decoration: none; color: var(--ws-text); } .ws-source:hover { border-color: var(--ws-accent); }
.ws-source-n { grid-row: span 2; width: 22px; height: 22px; border-radius: 6px; background: var(--ws-accent-bg); color: var(--ws-text); font-size: 12.5px; display: grid; place-items: center; }
.ws-source-t { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ws-source-d { font-size: 13px; color: var(--ws-muted); }

/* mobile-only duplicate action (shown in the media queries below) */
.ws-polish .ws-btn.ws-btn-mob { display: none; }
/* ---- Responsive ---- */
@media (max-width: 1180px) { .ws-cards { gap: 12px; } }
@media (max-width: 900px) { .ws-tray-body { grid-template-columns: 1fr; } dialog.ws-viewer[open] { grid-template-columns: minmax(0, 1fr) 280px; } }
@media (max-width: 760px) {
  .welcome.ws-welcome { padding: 14px 14px 8px; }
  .ws-hero .ws-welcome-head { text-align: left; padding-top: 0; }
  .ws-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ws-card-body { padding: 10px; } .ws-card-body h3 { font-size: 15px; }
  .ws-card-reveal { display: none; } .ws-polish .ws-btn.ws-btn-mob { display: inline-flex; justify-content: center; margin-top: 2px; }
  .ws-quick-btn { padding: 6px 10px; }
  .ws-polish main > header #privacyLabel { display: none; }
  dialog.ws-viewer { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; border: 0; }
  dialog.ws-viewer[open] { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .ws-v-stage { min-height: 38dvh; } .ws-v-media { inset: 12px 48px; }
  .ws-v-side { border-left: 0; border-top: 1px solid var(--ws-line); max-height: 46dvh; padding-bottom: 14px; } .ws-v-actions { position: sticky; bottom: 0; background: #0c0f17; padding-top: 8px; }
  .ws-rail-row li { flex-basis: 140px; }
}
@media (max-width: 400px) { .ws-quick { margin-left: 2px; gap: 4px; } .ws-quick-btn { padding: 5px 8px; font-size: 13px; } }
@media (hover: none) { .ws-card-reveal { display: none; } .ws-polish .ws-btn.ws-btn-mob { display: inline-flex; justify-content: center; } }
@media (prefers-reduced-motion: reduce) {
  .ws-media::before, .ws-steps li::before { animation: none !important; } .ws-card, .ws-card-reveal, .ws-media img, .ws-media video { transition: none !important; } .ws-card:hover, .ws-card:focus-within { transform: none; }
}
/* Specificity guards: app.css styles bare buttons */
.ws-polish .ws-card .ws-btn, .ws-polish .ws-fail-row .ws-btn, .ws-polish .ws-v-actions .ws-btn { min-width: 0; }
.ws-polish button.ws-chip-x { min-height: 0; min-width: 0; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; }
.ws-polish .ws-quick .ws-quick-btn { min-height: 0; padding: 6px 12px; }
.ws-polish .ws-output-actions .ws-btn { min-height: 36px; }

.ws-output .generated-asset-download-status:empty { display: none; }

/* + menu: hero composer sits near the top, so the menu opens downward there; long workflow list scrolls */
.ws-hero .add-menu[open] > div { bottom: auto; top: calc(100% + 8px); }
.ws-tray.is-open .ws-tray-body { max-height: min(52vh, 460px); }
.ws-polish .add-menu[open] > div { max-height: min(70vh, 420px); overflow-y: auto; }
.ws-polish .ws-card-more { font-size: 14px; line-height: 1.45; }
.ws-polish .ws-btn.ws-btn-ghost { background: transparent; }
/* a11y sizing: no text under 12px, interactive targets >= 24px */
.ws-polish .disclaimer, .ws-polish .shell small, .ws-polish .creation-tray small { font-size: 13px; }
.ws-link { display: inline-flex; align-items: center; min-height: 32px; }
.ws-polish button.ws-chip-x { width: 24px; height: 24px; }
.ws-polish .sidebar a[href="/terms.html"], .ws-polish .sidebar a[href="/privacy.html"], .ws-polish .sidebar a[href="/rules.html"] { display: inline-block; min-height: 24px; line-height: 24px; }
.ws-polish .attachment-tray span, .ws-polish .conversation-input-card span { font-size: 12.5px; }

/* ---- Secondary model choice (owner correction): pill is a button, chooser dialog, notice, result Details ---- */
button.ws-auto { cursor: pointer; font-family: inherit; gap: 0; } button.ws-auto:hover { border-color: var(--ws-accent); } button.ws-auto:focus-visible { outline: 2px solid var(--ws-accent); outline-offset: 2px; }
.ws-auto.is-explicit::before { display: none; } .ws-auto .ws-auto-ico { display: inline-flex; margin-right: 8px; line-height: 0; } .ws-auto .ws-auto-name { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ws-auto .elabs-model-pill, .ws-auto [class*="promo"] { margin-left: 8px; }
.ws-model-notice { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 0; padding: 8px 16px; font-size: 14px; background: var(--ws-card2); border-bottom: 1px solid var(--ws-line); color: var(--ws-text); } .ws-model-notice[hidden] { display: none; }
dialog.ws-modelpick { width: min(440px, calc(100vw - 24px)); max-height: min(78vh, 640px); padding: 18px 16px 16px; border: 1px solid var(--ws-line2); border-radius: 16px; background: var(--ws-card); color: var(--ws-text); }
dialog.ws-modelpick::backdrop { background: rgba(4, 6, 12, .66); } .ws-mp-head { display: flex; align-items: center; justify-content: space-between; } .ws-mp-head h2 { margin: 0; font-size: 18px; }
.ws-mp-close { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--ws-line2); background: none; color: var(--ws-text); font-size: 20px; cursor: pointer; } .ws-mp-note { margin: 8px 0 12px; font-size: 14px; color: var(--ws-muted); }
.ws-mp-list { display: grid; gap: 6px; overflow: auto; max-height: min(56vh, 460px); }
.ws-mp-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--ws-line); background: var(--ws-card2); color: var(--ws-text); font: inherit; text-align: left; cursor: pointer; }
.ws-mp-row:hover { border-color: var(--ws-accent); } .ws-mp-row:focus-visible { outline: 2px solid var(--ws-accent); outline-offset: 2px; } .ws-mp-row[aria-checked="true"] { border-color: var(--ws-accent); box-shadow: inset 0 0 0 1px var(--ws-accent); }
.ws-mp-ico { display: inline-flex; width: 24px; justify-content: center; line-height: 0; } .ws-mp-txt { display: grid; flex: 1; min-width: 0; } .ws-mp-name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; } .ws-mp-sub { font-size: 13px; color: var(--ws-muted); }
.ws-menu-model { } .ws-v-details { border: 1px solid var(--ws-line); border-radius: 10px; padding: 8px 12px; } .ws-v-details[hidden] { display: none; } .ws-v-details summary { cursor: pointer; font-size: 14px; font-weight: 600; min-height: 24px; }
.ws-v-details summary:focus-visible { outline: 2px solid var(--ws-accent); outline-offset: 2px; } .ws-v-det-row { display: flex; gap: 10px; align-items: center; padding-top: 8px; font-size: 14px; } .ws-v-det-k { color: var(--ws-muted); } .ws-v-det-v { display: inline-flex; align-items: center; gap: 8px; } .ws-v-det-ico { display: inline-flex; line-height: 0; }
@media (max-width: 760px) { .ws-auto .ws-auto-name { max-width: 110px; } .ws-model-notice { justify-content: flex-start; } }
.ws-polish #chatModelPromo { display: none !important; } /* hidden select description; the Auto/model pill carries the same pill */
.ws-auto .ws-auto-name { margin-right: 8px; } .ws-auto .ws-auto-name:last-child { margin-right: 0; }
/* Model chooser groups (owner correction 2026-10-26): tabs never remove a model; "All models" is the complete list */
.ws-mp-count { margin: 0 0 8px; font-size: 13px; color: var(--ws-muted, #b4b9c8); }
.ws-mp-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: thin; }
.ws-mp-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--ws-line, #333a4d); background: none; color: var(--ws-text, #f2f4fa); font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.ws-mp-tab[aria-selected="true"] { background: #6b5bf0; border-color: #6b5bf0; color: #fff; }
.ws-mp-tab:focus-visible { outline: 2px solid var(--ws-accent, #8f84ff); outline-offset: 2px; }
.ws-mp-n { font-size: 12.5px; opacity: .85; }
.ws-mp-row.is-off { opacity: .62; cursor: not-allowed; }
.ws-mp-empty { margin: 8px 4px; font-size: 14px; color: var(--ws-muted, #b4b9c8); }
@media (prefers-reduced-motion: reduce) { .ws-mp-tab { transition: none; } }
dialog.ws-modelpick[open] { display: flex; flex-direction: column; width: min(560px, calc(100vw - 24px)); max-height: min(86vh, 760px); overflow: hidden; }
dialog.ws-modelpick .ws-mp-list { flex: 1 1 auto; min-height: 120px; max-height: none; }
.ws-mp-tabs { flex-wrap: wrap; overflow: visible; }
/* Attachment chips (owner requirement 2026-10-26): 44px rounded thumbnail, name only in tooltip/accessible names */
.ws-sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.attachment-tray { display: flex; flex-wrap: wrap; gap: 8px; overflow: visible; }
.attachment-tray li.attach-chip { position: relative; display: block; min-width: 0; width: 44px; max-width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 10px; overflow: visible; flex: 0 0 auto; }
.attachment-tray li.attach-chip .conversation-input-preview, .attachment-tray li.attach-chip .chip-ico { position: absolute; inset: 0; width: 44px; height: 44px; border-radius: 10px; overflow: hidden; border: 1px solid var(--ws-line2, #333a4d); background: #0b0e16; display: grid; place-items: center; }
.attachment-tray li.attach-chip .conversation-input-preview img { object-fit: cover; }
.attachment-tray li.attach-chip .chip-ico { font-size: 18px; color: var(--ws-text, #f2f4fa); }
.attachment-tray li.attach-chip .conversation-input-preview-status { display: none; }
.attachment-tray li.attach-chip.conversation-input-removable { padding-right: 0; max-width: 44px; min-height: 44px; }
.attachment-tray li.attach-chip > .conversation-input-remove { position: absolute; top: -7px; right: -7px; width: 24px; min-width: 24px; height: 24px; min-height: 24px; font-size: 16px; border-radius: 50%; padding: 0; background: #1b2030; border: 1px solid var(--ws-line2, #4a5270); color: #fff; opacity: 0; transition: opacity .12s; z-index: 2; cursor: pointer; }
.attachment-tray li.attach-chip:hover > .conversation-input-remove, .attachment-tray li.attach-chip:focus-within > .conversation-input-remove, .attachment-tray li.attach-chip > .conversation-input-remove:focus-visible { opacity: 1; }
@media (hover: none), (pointer: coarse) { .attachment-tray li.attach-chip > .conversation-input-remove { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .attachment-tray li.attach-chip > .conversation-input-remove { transition: none; } }
.ws-chip-tip { position: fixed; z-index: 2147483000; pointer-events: none; max-width: min(280px, 80vw); padding: 4px 8px; border-radius: 6px; background: #f2f4fa; color: #10131c; font-size: 12.5px; line-height: 1.3; overflow-wrap: anywhere; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.ws-mp-search { width: 100%; box-sizing: border-box; min-height: 40px; margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--ws-line2, #333a4d); background: #0b0e16; color: var(--ws-text, #f2f4fa); font: inherit; font-size: 14.5px; }
.ws-mp-search:focus-visible { outline: 2px solid var(--ws-accent, #8f84ff); outline-offset: 1px; }

@media (max-width: 400px) { .ws-quick-btn { gap: 4px; } .ws-quick-ico { width: 14px; height: 14px; } }

/* ---------- RC4-COPILOT-UI 2026-10-27 ---------- */
/* + menu rows: one consistent 44px hit target */
.ws-polish .add-menu[open] > div > button, .ws-polish .add-menu[open] > div > a { min-height: 44px; display: flex; align-items: center; }
/* CP-UI-CLOSE: 44px target, zero padding/margin (dialog button sets 9px 11px), SVG centered by grid */
dialog .ws-mp-close, .ws-mp-close { flex: 0 0 44px; box-sizing: border-box; width: 44px; height: 44px; min-width: 44px; min-height: 44px; margin: 0; padding: 0;
  display: inline-grid; place-items: center; line-height: 0; font-size: 0; border-radius: 10px; border: 1px solid var(--ws-line2); background: none; color: var(--ws-text); cursor: pointer; }
.ws-mp-close svg { display: block; width: 20px; height: 20px; pointer-events: none; }
.ws-mp-close:hover { background: var(--ws-card2); border-color: var(--ws-accent); }
.ws-mp-close:focus-visible { outline: 2px solid var(--ws-accent); outline-offset: 2px; }
.ws-mp-head { gap: 12px; }
/* Workflow picker: one scroll area (the list); heading + Close stay put */
dialog.ws-wfpick[open] { width: min(520px, calc(100vw - 24px)); }
.ws-wf-list { display: grid; gap: 6px; overflow-y: auto; overscroll-behavior: contain; }
.ws-wf-item { display: block; }
.ws-wf-row { width: 100%; min-height: 52px; }
.ws-wf-type { flex: 0 0 auto; font-size: 12.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--ws-line2); color: var(--ws-muted); }
.ws-wf-row .is-unavailable { color: var(--ws-red); }
@media (max-width: 600px) {
  dialog.ws-wfpick[open] { position: fixed; inset: auto 0 0 0; margin: 0; width: 100vw; max-width: 100vw; max-height: min(82dvh, 640px);
    border-radius: 16px 16px 0 0; border-bottom: 0; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
}
/* Over-limit / checking Send: visibly unavailable but still focusable so a press can explain why */
.ws-polish .composer-bar .send[aria-disabled="true"], .send[aria-disabled="true"] { background: #2a2f40; border-color: #3b4259; color: #c3c9d8; cursor: not-allowed; }
.send.is-checking { display: inline-flex; align-items: center; gap: 8px; width: auto; padding-inline: 12px; cursor: progress; }
.send .send-state { font-size: 13px; font-weight: 600; white-space: nowrap; }
/* Pending attachment chip */
.attachment-tray li.attach-chip.attach-chip-checking { width: auto; max-width: 240px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px dashed var(--ws-accent); color: var(--ws-text); font-size: 13px; }
.attach-chip-checking .chip-checking-label { position: static !important; display: inline; max-width: none; white-space: nowrap; color: var(--ws-text); font-size: 13px; margin: 0; }
.chip-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ws-line2); border-top-color: var(--ws-accent); animation: ws-spin .9s linear infinite; flex: 0 0 auto; }
@keyframes ws-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .chip-spin { animation: none; border-top-color: var(--ws-accent); } }
.reference-load-more { min-height: 44px; margin-top: 10px; }
.ws-polish .add-menu.ws-up[open] > div { top: auto; bottom: calc(100% + 8px); }
.ws-polish .add-menu.ws-down[open] > div { bottom: auto; top: calc(100% + 8px); }

/* LANE-C: checking-chip controls and saved-image placeholders */
.attach-chip-checking .chip-cancel-send { min-height: 44px; min-width: 44px; padding: 4px 14px; margin-left: 0; white-space: nowrap; flex: 0 0 auto; border-radius: 999px; border: 1px solid currentColor; background: transparent; color: inherit; font: inherit; font-size: 12px; cursor: pointer; }
.attach-chip-checking .chip-cancel-send { font-weight: 600; }
.attachment-tray li.attach-chip > .chip-remove-pending:disabled { opacity: .55; cursor: default; }
.attach-chip-checking button:focus-visible { outline: 2px solid #8b7bff; outline-offset: 2px; }
.reference-asset-card { position: relative; }
/* LANE-C: scoped under .reference-asset-card so app.css `.reference-asset-card span { display: block }` cannot override the centring */
.reference-asset-card .reference-asset-placeholder { display: grid; place-items: center; aspect-ratio: 1 / 1; width: 100%; border-radius: 8px; background: rgba(127,127,127,.15); color: rgba(200,200,210,.85); font-size: 12px; text-align: center; padding: 6px; box-sizing: border-box; }
.reference-asset-card .reference-asset-placeholder.is-failed { background: rgba(220,80,80,.12); }
.reference-asset-card .reference-asset-placeholder[hidden] { display: none; }
/* LANE-C: the checking chip wraps to a second row instead of truncating; the label is never clipped and the buttons stay 44px */
.attachment-tray li.attach-chip.attach-chip-checking { height: auto; min-height: 44px; max-width: 100%; flex: 1 1 auto; flex-wrap: wrap; row-gap: 6px; column-gap: 8px; padding: 6px 12px; overflow: visible; }
.attachment-tray li.attach-chip.attach-chip-checking .chip-checking-label { flex: 0 0 auto; white-space: nowrap; overflow: visible; text-overflow: clip; }
.reference-asset-card .reference-asset-placeholder { place-items: center; place-content: center; align-content: center; justify-content: center; }
/* LANE-C (visual disposition 2026-10-28): one top-right X for every attachment chip state (confirmed, checking, queued).
   The visual stays 24px; a transparent ::after extends the hit area to 44x44. The checking chip shows its X always. */
.attachment-tray li.attach-chip > .conversation-input-remove { display: inline-grid; place-items: center; line-height: 1; }
.attachment-tray li.attach-chip > .conversation-input-remove::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; }
.attachment-tray li.attach-chip.attach-chip-checking > .conversation-input-remove { opacity: 1; }
