/* One conversation: glass header, messages, cards and the docked composer. */
.chat-view { max-width: 840px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; padding: 0 28px; }
.chat-header {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; margin: 0 -28px; padding: 14px 28px;
  background: var(--glass); backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid transparent; transition: border-color .2s;
}
.main.scrolled .chat-header { border-bottom-color: var(--line); }
.layout.collapsed .chat-header { padding-left: 110px; }
.chat-heading { font-family: var(--display); font-size: 16px; font-weight: 650; letter-spacing: -.01em; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-header .pill { background: color-mix(in srgb, var(--b2) 14%, transparent); color: color-mix(in srgb, var(--b2) 70%, var(--ink)); }

.messages { flex: 1; display: flex; flex-direction: column; gap: 26px; padding: 22px 0 28px; }
.msg { display: flex; gap: 14px; animation: rise .35s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.msg.user { justify-content: flex-end; }
.msg.user .bubble { max-width: 72%; background: var(--raise); padding: 11px 17px; border-radius: 22px 22px 6px 22px; font-size: 15.5px; line-height: 1.5; }
.msg.agent > .orb { width: 30px; height: 30px; margin-top: 0; }
.msg.agent:not(.working) > .orb { animation: none; }
.msg .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; line-height: 1.65; font-size: 15.5px; }
.msg .who { font-size: 13px; font-weight: 700; letter-spacing: -.005em; margin-bottom: -6px; }
.msg .text { white-space: pre-wrap; margin: 0; color: var(--ink); }

.card.inset { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-radius: 20px; }
.card.inset > button { align-self: flex-start; }
.card-head { display: flex; align-items: center; gap: 10px; }
.card-head .tile { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: #fff; background: var(--brand); flex: none; }
.card-head strong { font-size: 16px; letter-spacing: -.01em; }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.option { background: var(--card); color: var(--ink); border: 1px solid var(--line); font-weight: 500; box-shadow: var(--shadow-sm); padding: 9px 15px; }
.option:hover:not(:disabled) { border-color: transparent; box-shadow: var(--shadow); transform: translateY(-1px); }
.option.chosen { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.approve { margin-top: 6px; padding: 12px 20px; background: var(--brand); color: #fff; box-shadow: 0 8px 22px color-mix(in srgb, var(--b2) 38%, transparent); }
.thinking { display: flex; align-items: center; gap: 10px; color: var(--muted); margin: 0; font-weight: 500; }
.thinking.shimmer { background: linear-gradient(90deg, var(--muted) 30%, var(--ink) 50%, var(--muted) 70%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 1.8s linear infinite; }
progress { width: 100%; height: 7px; border-radius: 99px; overflow: hidden; appearance: none; border: 0; background: var(--raise); }
progress::-webkit-progress-bar { background: var(--raise); }
progress::-webkit-progress-value { background: var(--brand); border-radius: 99px; transition: width .4s var(--ease); }
progress::-moz-progress-bar { background: var(--b2); }
.steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.step { display: flex; align-items: center; gap: 10px; }
.step::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--strong-line); flex: none; }
.step.writing::before, .step.hooks::before, .step.planning::before, .step.ideas::before { background: var(--b2); animation: breathe 1s ease-in-out infinite; }
.step.done::before { background: var(--success); }
.step.failed::before { background: var(--danger); }
.step span:first-of-type { flex: 1; }
.concepts { display: grid; gap: 10px; }
.concept { display: flex; gap: 14px; background: var(--side); border-radius: 16px; padding: 14px 16px; }
.concept .num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--card); box-shadow: var(--shadow-sm); font-size: 12.5px; font-weight: 700; flex: none; }
.concept .concept-body { flex: 1; min-width: 0; }
.concept p { white-space: pre-wrap; margin: 6px 0 0; font-size: 14.5px; line-height: 1.6; }
.concept .hook { color: var(--muted); font-style: italic; }
.concept .line { cursor: pointer; border-radius: 4px; transition: background .15s; }
.concept .line:hover { background: color-mix(in srgb, var(--b2) 18%, transparent); }
.concept .cast-line { white-space: normal; }
.gif-icon { width: 28px; height: 28px; vertical-align: middle; border-radius: 7px; }
.video-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.prod-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.prod-head strong { font-size: 16px; letter-spacing: -.01em; }
.prod-rows { display: flex; flex-direction: column; gap: 14px; }
.prod-row { display: flex; flex-direction: column; gap: 6px; }
.prod-title { display: flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 550; }
.prod-title > svg { color: var(--success); flex: none; }
.prod-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px dotted var(--b2); flex: none; }
.prod-dot.running, .prod-dot.queued, .prod-dot.stopping { animation: spin 2.4s linear infinite; }
.prod-dot.failed, .prod-dot.interrupted { border: 0; background: var(--danger); }
.prod-dot.cancelled { border-style: solid; border-color: var(--strong-line); }
.prod-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.prod-meta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-eta { font-variant-numeric: tabular-nums; flex: none; }
.prod-row.failed .prod-meta { color: var(--danger); }
.prod-row.failed .prod-meta span:first-child { white-space: normal; }
.prod-retry:empty { display: none; }
.chat-video { width: 230px; max-width: 100%; aspect-ratio: 9 / 16; background: #000; border-radius: 20px; box-shadow: var(--shadow-lg); }
.askable { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.chat-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); padding: 14vh 0; text-align: center; }
.chat-empty .orb { width: 48px; height: 48px; }
.chat-status .error { text-align: center; }
.composer-dock { position: sticky; bottom: 0; isolation: isolate; padding: 12px 0 8px; background: linear-gradient(transparent, var(--bg) 28%); }
.composer-dock .composer-box textarea { min-height: 28px; font-size: 16px; }
.composer-dock .site-picker { margin: 0 0 6px 8px; }
.composer-dock .site-menu { top: auto; bottom: calc(100% + 6px); }
.fineprint { text-align: center; font-size: 12px; color: var(--muted); margin: 10px 0 2px; }

@media (max-width: 860px) {
  .chat-view { padding: 0 14px; }
  .chat-header, .layout.collapsed .chat-header { margin: 0 -14px; padding: 12px 14px 12px 104px; }
  .msg.user .bubble { max-width: 88%; }
  .msg.agent > .orb { display: none; }
}
