@charset "UTF-8";

:root {
  color-scheme: light;
  --page: #f9f8f4;
  --surface: #ffffff;
  --lavender-surface: #f2efe8;
  --cream: #f5f3ec;
  --ink: #1f1e1b;
  --muted: #78736a;
  --line: #e6e3db;
  --purple: #1f1e1b;
  --purple-dark: #141311;
  --purple-soft: #efece4;
  --purple-accent: #2e7d52;
  --lavender: #c8c3b8;
  --secondary: #dde6ed;
  --warm-highlight: #f3e8dc;
  --amber: #926623;
  --radius: 14px;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font-size: 14px; line-height: 1.5; }
button, input, textarea { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: var(--ink); text-underline-offset: 3px; }
button, textarea { border: 1px solid var(--line); }
button { background: var(--surface); }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible, textarea:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
svg { display: block; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; z-index: 20; top: 12px; left: 12px; padding: 12px 20px; border-radius: 10px; background: white; box-shadow: 0 4px 20px #1f1e1b20; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }

/* Full-bleed Arena.ai workspace layout with sliding right preview pane */
.app-shell {
  --sidebar-width: 236px;
  --team-width: min(22vw, 310px);
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) 0px;
  grid-template-rows: 50px minmax(0, 1fr);
  height: 100dvh;
  min-height: 0;
  max-width: none;
  margin: 0;
  background: var(--page);
  border: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  transition: grid-template-columns .2s ease;
}
.app-shell.team-open {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--team-width);
}
.app-shell.sidebar-collapsed {
  --sidebar-width: 52px;
}

/* Minimalist Arena.ai Sidebar */
.sidebar {
  grid-column: 1;
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--page);
  color: var(--ink);
  border-right: 1px solid #ece9e1;
  padding: 14px 12px 12px;
}
.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
}
.sidebar-collapse {
  width: 30px;
  height: 30px;
  color: var(--muted);
}
.brand {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding-inline: 4px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -.8px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  background: transparent;
  border-radius: 8px;
  color: var(--ink);
}
.brand-mark svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.odie-accent { fill: #b8b2a4; }
.odie-outline { fill: var(--ink); }
.brand-copy { min-width: 0; }
.brand-wordmark {
  display: block;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 28px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -1.4px;
  color: var(--ink);
  background: none;
  -webkit-text-fill-color: currentColor;
}
.brand-caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 2.4px;
  font-weight: 500;
}
.workspace-label,
#workspace-nav-label,
.sidebar-divider,
.shortcut,
.safe-note {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.new-request {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  margin-top: 4px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  transition: background .15s;
}
.new-request:hover { background: rgb(235, 232, 223); }
.new-request .icon { width: 16px; height: 16px; }
.workspace-nav { margin-top: 2px; }
.requests-nav .eyebrow {
  display: flex;
  justify-content: space-between;
  margin: 18px 10px 6px;
  padding: 0;
  color: #8f8a80;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}
.requests-nav .eyebrow span { display: none; }
.sidebar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #3d3a34;
  text-align: left;
  font-size: 13px;
  font-weight: 450;
}
.sidebar-nav .icon { width: 16px; height: 16px; color: #5c574f; }
.sidebar-nav.active, .sidebar-nav:hover {
  background: rgb(235, 232, 223);
  color: var(--ink);
}
.sidebar-nav.active { font-weight: 550; }
.nav-count { margin-left: auto; color: var(--muted); font-size: 10.5px; }
.requests-nav { flex: 1; min-height: 0; overflow-y: auto; margin-top: 0; }
.request-list { list-style: none; padding: 0; margin: 0; }
.request-list li { margin-bottom: 2px; }
.request-list button, .request-list a {
  position: relative;
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px 6px 22px;
  border: 0;
  border-radius: 8px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 450;
  color: #3d3a34;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
  text-decoration: none;
}
.request-list button::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b0aa9e;
}
.request-list button[data-state="completed"]::before,
.request-list button[data-state="ready_for_human_review"]::before,
.request-list button[data-state="visual_review"]::before {
  background: var(--purple-accent);
}
.request-list button.selected::before { background: var(--ink); }
.request-list button:hover, .request-list a:hover { background: #efece4; }
.request-list .active, .request-list [aria-current], .request-list .selected {
  background: #ece8df;
  color: var(--ink);
  font-weight: 550;
}
.request-title, .request-state { display: block; overflow: hidden; text-overflow: ellipsis; }
.request-state { display: none; }
.empty-list, .requests-empty { color: #9c978d; font-size: 11.5px; font-weight: 400; padding: 6px 10px; }
.sidebar-bottom { padding-top: 6px; }
.user-row {
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid #ece9e1;
  padding: 10px 4px 0;
  color: var(--ink);
}
.user-avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  background: #e5e1d7;
  border-radius: 50%;
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
}
.user-row > div { min-width: 0; flex: 1; }
.user-row strong { display: block; font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row > div > span { display: none; }
.icon-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.icon-button:hover { background: #ebe8df; color: var(--ink); }
.user-row .icon-button { width: 28px; height: 28px; margin-right: -2px; }

/* Desktop icon rail. Phone drawers keep the full sidebar. */
@media (min-width: 641px) {
  .app-shell.sidebar-collapsed .sidebar { padding-inline: 8px; align-items: center; }
  .app-shell.sidebar-collapsed .sidebar-top,
  .app-shell.sidebar-collapsed .brand,
  .app-shell.sidebar-collapsed .requests-nav,
  .app-shell.sidebar-collapsed .user-row > div,
  .app-shell.sidebar-collapsed .user-row .icon-button,
  .app-shell.sidebar-collapsed .nav-count { display: none; }
  .app-shell.sidebar-collapsed .new-request,
  .app-shell.sidebar-collapsed .sidebar-nav {
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    justify-content: center;
    font-size: 0;
    gap: 0;
  }
  .app-shell.sidebar-collapsed .sidebar-bottom { margin-top: auto; }
  .app-shell.sidebar-collapsed .user-row { border-top: 0; padding: 6px 0 0; justify-content: center; }
}

/* Seamless Minimalist Arena.ai Header */
.workspace-header {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  border-bottom: 0;
  background: var(--page);
  font-size: 12.5px;
}
.breadcrumb {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
  font-size: 13px;
}
.breadcrumb > span:first-child,
.breadcrumb-divider { display: none; }
.breadcrumb h1 {
  font-size: 13px;
  font-weight: 500;
  color: #4a463f;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.title-chevron { color: #8f8a80; font-size: 11px; flex-shrink: 0; }
.header-actions { display: flex; gap: 6px; align-items: center; }
.connection-status {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  color: #8f8a80;
  border: 0;
  background: transparent;
  padding: 2px 6px;
  font-size: 11px;
}
.connection-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple-accent);
}
.connection-status.offline::before, .connection-status.error::before { background: #b77c4b; }
.menu-toggle { display: none; }
.team-toggle { display: inline-flex; border: 0; color: #8f8a80; }
.app-shell.team-open .team-toggle svg { transform: rotate(180deg); }

/* Center Conversation Column */
.chat-panel {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  background: var(--page);
}

/* Minimalist Inline Workflow + 40x40 Characters Strip */
.workspace-top-strip {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  min-width: 0;
  overflow-x: clip;
  padding: 2px 24px 6px;
  background: transparent;
  border-bottom: 0;
}
.progress-bar {
  padding: 0;
  background: transparent;
  border-bottom: 0;
}
.progress-steps {
  counter-reset: stage;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 11px;
  color: #8f8a80;
}
.progress-steps li {
  counter-increment: stage;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  white-space: nowrap;
  background: none;
}
.progress-steps li::before {
  content: counter(stage);
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border: 1px solid #d8d4ca;
  border-radius: 50%;
  font-size: 8.5px;
  background: transparent;
}
.progress-steps .active, .progress-steps .current {
  color: var(--ink);
  font-weight: 600;
}
.progress-steps .current::before {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}
.progress-steps .complete, .progress-steps .completed, .progress-steps .done {
  color: var(--purple-accent);
}
.progress-steps .done::before {
  content: "✓";
  background: #e6f2eb;
  border-color: #bddbc9;
  color: var(--purple-accent);
}

/* Inline 40px by 40px Characters Cluster */
.team-room {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.team-room.disconnected { opacity: .82; }
.team-heading,
.team-intro,
.agent-meta,
.team-speech {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.team-characters {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 0;
}
.agent-card {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}
.avatar {
  position: relative;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  background: var(--purple-soft);
  border: 1px solid #dedad0;
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
}
.avatar svg {
  width: 40px;
  height: 40px;
  overflow: visible;
}
.avatar-planner { background: var(--secondary); }
.avatar-builder { background: var(--warm-highlight); }
.avatar-reviewer { background: #ebe6f2; }
.avatar-shadow { fill: #1f1e1b18; }
.character-body { transform-box: fill-box; transform-origin: center bottom; animation: character-sway 8s ease-in-out infinite; }
.character-eyes { transform-box: fill-box; transform-origin: center; animation: character-blink 7s infinite; }
[data-role="planner"] .character-body { animation-delay: -3s; }
[data-role="builder"] .character-body { animation-delay: -5s; }
[data-role="reviewer"] .character-body { animation-delay: -7s; }
[data-role="planner"] .character-eyes { animation-delay: -2s; }
[data-role="builder"] .character-eyes { animation-delay: -4s; }
[data-role="reviewer"] .character-eyes { animation-delay: -6s; }
.agent-card.active {
  animation: agent-pulse 2.4s ease-in-out infinite;
}
@keyframes agent-pulse {
  0%, 100% { box-shadow: 0 0 0 2px #1f1e1b14; }
  50% { box-shadow: 0 0 0 4px #1f1e1b24; }
}
.agent-card.active .avatar {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px #1f1e1b1f;
}
.agent-card.active .character-body { animation: character-talk 1.8s ease-in-out infinite; }
.agent-card.active .character-mouth { animation: mouth-talk 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.agent-card.waiting .avatar { border-color: #d6c39b; }
.agent-card.blocked .avatar { border-color: #d9b2a3; }
.talking-wave {
  position: absolute;
  right: 1px;
  bottom: 1px;
  display: none;
  gap: 1.5px;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
}
.agent-card.active .talking-wave { display: flex; }
.talking-wave i {
  width: 1.5px;
  height: 4px;
  border-radius: 2px;
  background: var(--purple-accent);
  animation: wave .8s ease-in-out infinite alternate;
}
.talking-wave i:nth-child(2) { height: 6px; animation-delay: -.3s; }
.talking-wave i:nth-child(3) { height: 4px; animation-delay: -.5s; }
.agent-bubble {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 10;
  margin: 0;
  padding: 3px 8px;
  width: max-content;
  max-width: 180px;
  border: 1px solid #dfdcd3;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(31, 30, 27, 0.06);
  color: var(--ink);
  font-size: 9.5px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
[data-role="builder"] .agent-bubble,
[data-role="reviewer"] .agent-bubble {
  left: auto;
  right: 0;
}
.bubble-aside {
  font-style: italic;
  background: #fff8e9;
  border-color: #e5d6b5;
  color: #826435;
}
.team-inline-ticker {
  display: flex;
  align-items: center;
  min-width: 0;
}
.team-status {
  margin: 0;
  color: #8f8a80;
  font-size: 11px;
  font-weight: 450;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chat Scroll & Minimalist Arena.ai Stream */
.chat-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 18px 24px 16px;
}
.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  max-width: 680px;
  margin-inline: auto;
  padding: 64px 0 24px;
  text-align: center;
}
.welcome-art,
.welcome-eyebrow { display: none; }
.welcome h2 {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 500;
  font-size: clamp(28px, 2.8vw, 38px);
  line-height: 1.18;
  letter-spacing: -1.2px;
  color: var(--ink);
}
.welcome h2 span { color: #6e695f; }
.welcome-description {
  margin-top: 10px;
  max-width: 460px;
  color: #8f8a80;
  font-size: 13px;
  line-height: 1.65;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 710px;
  margin: 6px auto 16px;
  font-size: 14px;
  line-height: 1.65;
}
.messages:empty { display: none; }
.message { min-width: 0; overflow-wrap: anywhere; }
.message-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color: #8f8a80;
  font-size: 11.5px;
  font-weight: 500;
}
.message-body, .plan-text { white-space: pre-wrap; }
/* Arena.ai warm sand user prompt bubble */
.message.user, .message-user, .message[data-role="user"] {
  align-self: flex-end;
  max-width: 78%;
  padding: 12px 16px;
  border: 0;
  border-radius: 14px;
  background: #efece4;
  color: var(--ink);
}
.message.user .message-author, .message-user .message-author { display: none; }
/* Arena.ai borderless assistant response directly on canvas */
.message.assistant, .message-assistant, .message-agent, .message[data-role="assistant"] {
  align-self: stretch;
  max-width: 100%;
  padding: 2px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.message p + p { margin-top: 10px; }
/* Crisp white Arena.ai code / file card */
.message pre {
  max-width: 100%;
  overflow-x: auto;
  margin-top: 10px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid #e6e3db;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.55;
}

/* Arena.ai Minimalist Inline Collapsible Activity & Thought Rows */
.answered-question {
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 12.5px;
}
.answered-question summary {
  cursor: pointer;
  color: #6e695f;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.answered-question-body { margin-top: 6px; padding-left: 12px; border-left: 1.5px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); }
.answered-question .selected-answer { margin-top: 4px; font-weight: 600; color: var(--ink); }

.progress-thread {
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  color: #78736a;
  background: transparent;
  font-size: 12.5px;
}
.progress-thread summary {
  position: relative;
  cursor: pointer;
  min-height: 22px;
  font-size: 12px;
  color: #78736a;
}
.progress-label { font-size: 12px; color: #78736a; font-weight: 500; }
.thought-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  color: #8f8a80;
  font-size: 11.5px;
  opacity: .85;
}
.progress-current-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  min-width: 0;
  flex-wrap: wrap;
}
.progress-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: #5c574f;
}
.progress-step-icon .icon {
  width: 14px;
  height: 14px;
}
.progress-step-kind {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 5px;
  background: #efede6;
  border: 1px solid #e3dfd5;
  color: #57534a;
  font-size: 11px;
  font-weight: 550;
  line-height: 1.35;
  white-space: nowrap;
}
.progress-current {
  display: inline-block;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  overflow-wrap: anywhere;
}
@keyframes text-shimmer-sweep {
  0% { background-position: 100% 50%; }
  100% { background-position: -100% 50%; }
}
.shimmer-text {
  color: #1f1e1b;
  background-image: linear-gradient(
    90deg,
    #8b867d 0%,
    #8b867d 35%,
    #111111 50%,
    #8b867d 65%,
    #8b867d 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: text-shimmer-sweep 2.2s linear infinite;
}
@keyframes progress-spin {
  to { transform: rotate(360deg); }
}
.progress-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border: 1.6px solid #d4d0c7;
  border-top-color: #1f1e1b;
  border-right-color: #1f1e1b;
  border-radius: 50%;
  animation: progress-spin 0.85s linear infinite;
}
.progress-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: #16a34a;
}
.progress-check .icon {
  width: 14px;
  height: 14px;
  stroke: #16a34a;
}
.progress-updates {
  margin-top: 6px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 6px 0 4px 12px;
  border-left: 1.5px solid var(--line);
}
.progress-updates::-webkit-scrollbar {
  display: none;
}
.progress-updates p { padding: 3px 0; }
.progress-step-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 3px 0;
  font-size: 12.5px;
  color: #5c574f;
}
.progress-step-line.is-active {
  color: var(--ink);
  font-weight: 500;
}
.progress-step-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.progress-caption { font-size: 10.5px; color: #8f8a80; }

/* Arena.ai Live Building Status Bar & Animated 3x3 Dot Grid */
@keyframes building-dot-fade {
  0%, 100% { background: #111111; opacity: 1; }
  50% { background: #78736a; opacity: 0.22; }
}
.building-status-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: 4px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #efede6;
  border: 1px solid #e3dfd5;
  font-size: 12.5px;
  line-height: 1.35;
  max-width: 100%;
  min-width: 0;
}
.preview-building-pill {
  align-self: center;
  margin-top: 2px;
}
.building-grid-icon {
  display: inline-grid;
  grid-template-columns: repeat(3, 3px);
  grid-template-rows: repeat(3, 3px);
  gap: 2px;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  align-content: center;
  justify-content: center;
}
.building-grid-icon i {
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 1px;
  background: #111111;
  opacity: 0.35;
}
.building-status-bar[data-active="true"] .building-grid-icon i {
  animation: building-dot-fade 1.35s ease-in-out infinite;
}
.building-status-bar[data-active="true"] .building-grid-icon i:nth-child(1) { animation-delay: 0s; }
.building-status-bar[data-active="true"] .building-grid-icon i:nth-child(2) { animation-delay: 0.12s; }
.building-status-bar[data-active="true"] .building-grid-icon i:nth-child(3) { animation-delay: 0.24s; }
.building-status-bar[data-active="true"] .building-grid-icon i:nth-child(4) { animation-delay: 0.36s; }
.building-status-bar[data-active="true"] .building-grid-icon i:nth-child(5) { animation-delay: 0.48s; }
.building-status-bar[data-active="true"] .building-grid-icon i:nth-child(6) { animation-delay: 0.60s; }
.building-status-bar[data-active="true"] .building-grid-icon i:nth-child(7) { animation-delay: 0.72s; }
.building-status-bar[data-active="true"] .building-grid-icon i:nth-child(8) { animation-delay: 0.84s; }
.building-status-bar[data-active="true"] .building-grid-icon i:nth-child(9) { animation-delay: 0.96s; }
.building-status-label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.building-status-timer {
  color: #78736a;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.thought-process { margin: 2px 0 6px; min-width: 0; }
.thought-summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  padding: 2px 0;
}
.thought-summary::-webkit-details-marker { display: none; }
.thought-summary::marker { content: ""; }
.thought-summary:hover { color: var(--ink); }
.thought-title { font-weight: 550; color: var(--muted); }
.thought-duration { color: var(--muted); opacity: .75; }
.thought-chevron { display: inline-block; font-size: 11px; line-height: 1; opacity: .75; transition: transform .18s ease; }
.thought-process[open] .thought-chevron { transform: rotate(180deg); }
.thought-body { margin: 4px 0 6px; padding-left: 11px; border-left: 1.5px solid var(--line); min-width: 0; }
.thought-process[data-active="true"] .thought-body { border-left-color: #b5b0a4; }
.thought-stream {
  margin: 0;
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.55;
  opacity: .68;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  transition: opacity .2s ease;
}
.thought-process[data-active="true"] .thought-stream,
.progress-thread[data-active="true"] .thought-stream { opacity: .58; }
.progress-updates .thought-stream { margin: 4px 0 6px; padding: 4px 0 4px 10px; border-left: 1.5px solid #b5b0a4; }

/* Decision Panel */
.decision-panel {
  max-width: 740px;
  margin: 16px auto;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 10px #1f1e1b08;
  font-size: 13px;
}
.decision-panel h2, .decision-panel h3 { font-size: 15px; margin-bottom: 6px; }
.decision-panel button, .details-panel button, .details-panel .button {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 8px;
  margin: 10px 6px 0 0;
  font-size: 12px;
  background: var(--surface);
  border: 1px solid #d5d0c5;
}
.decision-panel button.primary,
.decision-panel [data-action="approve"],
.decision-panel button.button:not(.secondary):not(.subtle):not(.approval-choice) {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}
.decision-panel label { display: block; margin-top: 12px; margin-bottom: 6px; font-weight: 550; }
.decision-panel textarea {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border-radius: 8px;
  background: #faf9f5;
  resize: vertical;
}
.decision-panel a.button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-top: 10px;
  padding: 8px 14px;
  border: 1px solid #d5d0c5;
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
  font-size: 12px;
  font-weight: 550;
}
.decision-panel.decision-approval {
  max-width: 640px;
  padding: 0;
  overflow: hidden;
}
.approval-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 14px;
}
.approval-shot { min-width: 0; }
.approval-shot-link {
  position: relative;
  display: flex;
  height: 100%;
  min-height: 168px;
  color: inherit;
  text-decoration: none;
}
.approval-shot-frame {
  flex: 1;
  min-height: 168px;
  overflow: hidden;
  border: 1px solid #e4e0d6;
  border-radius: 10px;
  background: #fff;
}
.approval-shot-chrome {
  display: flex;
  gap: 4px;
  padding: 8px 10px;
  background: #f4f2eb;
  border-bottom: 1px solid #e6e3db;
}
.approval-shot-chrome span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d4cfc4;
}
.approval-shot-body {
  display: grid;
  gap: 7px;
  padding: 12px 10px 10px;
}
.approval-shot-body i {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: #eceae3;
}
.approval-shot-body i:nth-child(1) { width: 72%; }
.approval-shot-body i:nth-child(2) { width: 100%; }
.approval-shot-body i:nth-child(3) { width: 54%; }
.approval-shot-caption {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.approval-shot-empty {
  padding: 16px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.approval-open {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid #e4e0d6;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px #1f1e1b14;
  pointer-events: none;
}
.approval-open .icon { width: 14px; height: 14px; }
.approval-menu { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.approval-menu-head { margin-bottom: 10px; }
.approval-menu-head h2 { margin: 0; font-size: 14px; font-weight: 560; }
.approval-menu-head .decision-note { margin-top: 4px; }
.approval-choices {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfaf7;
}
.decision-panel button.approval-choice {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 450;
  text-align: left;
}
.decision-panel button.approval-choice + button.approval-choice { border-top: 1px solid var(--line); }
.decision-panel button.approval-choice:hover:not(:disabled) { background: #f4f2eb; }
.decision-panel button.approval-choice .icon { width: 18px; height: 18px; color: #6d685f; }
.decision-note { margin-top: 10px; color: var(--muted); font-size: 11px; }

/* Arena.ai Floating Bottom Composer */
.composer-area {
  min-width: 0;
  padding: 0 24px 22px;
  background: transparent;
}
.composer-form, .workspace-footer, .preview-assurance {
  max-width: 710px;
  margin-inline: auto;
}
.composer-form {
  border: 1px solid #e6e3db;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(31, 30, 27, 0.035);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.composer-form:focus-within {
  border-color: #cbc6ba;
  box-shadow: 0 4px 18px rgba(31, 30, 27, 0.06);
}
#composer-input {
  display: block;
  width: 100%;
  min-height: 76px;
  max-height: 200px;
  padding: 16px 18px 8px;
  border: 0;
  border-radius: 20px;
  outline: none;
  background: transparent;
  color: var(--ink);
  resize: none;
  line-height: 1.55;
  font-size: 13.5px;
}
#composer-input::placeholder { color: #b5b0a5; }
#composer-input:focus-visible { outline: none; }
.composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 12px 10px;
}
.composer-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
#composer-hint,
#send-label,
.preview-assurance,
.workspace-footer {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.attachment-button { width: 28px; height: 28px; color: #78736a; }
.send-button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  flex-shrink: 0;
  border: 1px solid #e6e3db;
  border-radius: 8px;
  background: #f5f3ec;
  color: var(--ink);
  transition: background .15s, border-color .15s;
}
.send-button:hover { background: #eae7de; border-color: #d5d0c5; }
.send-button .icon { width: 14px; height: 14px; }
.button-spinner {
  display: none;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  box-sizing: border-box;
  border: 1.6px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: progress-spin 0.75s linear infinite;
}
button.is-busy .button-spinner { display: inline-block; margin-left: 8px; vertical-align: -2px; }
button.is-busy:disabled { opacity: 1; cursor: progress; }
.send-button.is-busy .icon { display: none; }
.send-button.is-busy .button-spinner { margin-left: 0; vertical-align: 0; }
.decision-panel button.approval-choice.is-busy .button-spinner { margin-left: 0; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0 18px; margin: 0; }
.attachment-list:empty { display: none; }
.attachment-list button {
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  background: #f5f3ec;
  border-radius: 7px;
  font-size: 11px;
}
.status-banner {
  max-width: 710px;
  margin: 0 auto 10px;
  padding: 10px 14px;
  background: #f4eddd;
  border: 1px solid #e5d9bd;
  border-radius: 10px;
  color: #7e6030;
  font-size: 12px;
}
.status-banner.error { color: #924b3a; background: #f9eee8; border-color: #ead4c9; }

/* Right-Hand Sliding Arena.ai Preview & Workspace Window */
.team-panel {
  position: relative;
  grid-column: 3;
  grid-row: 1 / -1;
  width: var(--team-width);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f3f1ea;
  border-left: 1px solid var(--line);
  visibility: hidden;
  transform: translateX(100%);
  opacity: 0;
  transition: transform .3s ease, opacity .2s ease, visibility .3s;
}
.team-panel-scroll {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 14px 16px;
  scrollbar-width: thin;
}
.app-shell.team-open .team-panel {
  visibility: visible;
  transform: translateX(0);
  opacity: 1;
}
.app-shell.preview-resized .team-panel {
  width: var(--team-width);
  max-width: 100%;
}
.app-shell.preview-resizing,
.app-shell.preview-resizing .team-panel { transition: none; }
.app-shell.preview-resizing,
.app-shell.preview-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}
.preview-resizer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 6;
  width: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
}
.preview-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: transparent;
}
.preview-resizer:hover::after,
.preview-resizer:focus-visible::after,
.app-shell.preview-resizing .preview-resizer::after { background: var(--ink); }
.preview-resizer:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
@media (pointer: coarse) {
  .preview-resizer { width: 28px; }
}

/* Arena.ai Preview Window Top Option Header */
.preview-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 6px;
}
.preview-option-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--ink);
}
.preview-option-tab strong {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-option-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--ink);
}
.preview-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.preview-state-pill {
  padding: 4px 10px;
  border-radius: 7px;
  background: #e7e4dc;
  color: #5c5850;
  font-size: 11px;
  font-weight: 550;
  white-space: nowrap;
}

/* Arena.ai Main Preview Stage (Demo Iframe + Building State) */
.preview-stage {
  position: relative;
  flex: 1 1 380px;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.preview-frame {
  width: 100%;
  min-height: 340px;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 0;
  background: #ffffff;
  overflow-y: auto;
}
.preview-demo-surface {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #faf9f5;
}
.preview-demo-badge {
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e6f2eb;
  color: var(--purple-accent);
  font-size: 10px;
  font-weight: 600;
}
.preview-demo-body {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
}
.preview-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 24px;
  text-align: center;
}
.preview-blocks-icon {
  width: 68px;
  height: 62px;
  margin-bottom: 14px;
}
.preview-placeholder h3 {
  font-size: 15px;
  font-weight: 650;
  color: var(--ink);
}
.preview-placeholder p {
  margin-top: 6px;
  max-width: 240px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* Details & Activity Inspector Cards inside Preview Drawer */
.details-panel {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.details-panel h2, .details-panel h3 { margin-bottom: 8px; font-size: 12.5px; font-weight: 600; }
.details-panel p { color: var(--muted); margin-bottom: 8px; }
.details-panel details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 8px;
  background: #faf9f5;
}
.details-panel summary { cursor: pointer; min-height: 22px; font-weight: 550; }
.details-panel a { display: inline-flex; align-items: center; min-height: 34px; margin-right: 8px; }
.activity-section {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.section-heading { display: flex; align-items: center; justify-content: space-between; }
.section-heading h3 { font-size: 11px; font-weight: 600; color: var(--ink); }
.activity-dot { width: 5px; height: 5px; background: var(--purple-accent); border-radius: 50%; }
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  font-size: 11px;
  color: var(--muted);
}
.activity-list:empty { display: none; }
.activity-list li {
  position: relative;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.activity-list li::before {
  content: "";
  position: absolute;
  top: 6px;
  left: -3px;
  width: 5px;
  height: 5px;
  background: var(--ink);
  border-radius: 50%;
}
.activity-list time { display: block; color: var(--muted); font-size: 9px; margin-top: 2px; }
.team-footer { margin-top: 4px; text-align: center; font-size: 9px; color: var(--muted); }

/* Login Panel */
.login-panel {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 24px;
  background: var(--page);
}
.login-card {
  max-width: 460px;
  padding: 46px 36px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 12px 40px #1f1e1b0a;
}
.brand-mark-large { width: 64px; height: 64px; margin: 0 auto 24px; border-radius: 18px; }
.brand-mark-large svg { width: 48px; height: 48px; }
.login-card .eyebrow { font-size: 9px; }
.login-card h1 {
  margin-top: 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(28px, 5vw, 38px);
  letter-spacing: -1px;
}
#login-message { margin-top: 14px; color: var(--muted); font-size: 13px; }
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 22px;
  margin-top: 22px;
  border-radius: 10px;
  background: var(--ink);
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
}
.primary-button:hover { background: #33312c; }
.primary-button .icon { transform: rotate(90deg); width: 16px; }
.login-footnote { margin-top: 32px; font-size: 10px; color: var(--muted); }

/* Cancel Confirmation Modal */
.confirm-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(31, 30, 27, 0.45);
}
.confirm-modal {
  width: min(440px, 100%);
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 16px 48px rgba(31, 30, 27, 0.18);
}
.confirm-modal h2 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.confirm-modal p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.confirm-modal-actions .button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #d5d0c5;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 550;
}
.confirm-modal-actions .button.danger {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #ffffff;
}
.confirm-modal-actions .button.danger:hover:not(:disabled) {
  background: #991b1b;
  border-color: #991b1b;
}

/* Character Animations & Reduced Motion */
@keyframes character-sway { 0%, 35%, 65%, 100% { transform: rotate(0); } 45% { transform: rotate(-1deg); } 55% { transform: rotate(1deg); } }
@keyframes character-blink { 0%, 44%, 48%, 100% { transform: scaleY(1); } 46% { transform: scaleY(.1); } }
@keyframes character-talk { 0%, 100% { transform: translateY(0) rotate(-.6deg); } 50% { transform: translateY(-1px) rotate(.6deg); } }
@keyframes mouth-talk { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.5); } }
@keyframes wave { from { transform: scaleY(.5); } to { transform: scaleY(1); } }
.motion-paused *, .reduce-motion *, .reduced-motion *, [data-reduced-motion="true"] *, [data-motion="off"] * { animation: none !important; transition: none !important; }
.motion-paused .shimmer-text { -webkit-text-fill-color: currentColor; background-image: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .shimmer-text { -webkit-text-fill-color: currentColor; background-image: none; }
}

/* Responsive Breakpoints */
@media (min-width: 1500px) {
  .app-shell { --sidebar-width: 244px; --team-width: min(26vw, 390px); }
  .app-shell.sidebar-collapsed { --sidebar-width: 52px; }
}
@media (min-width: 1001px) and (max-width: 1200px) {
  .app-shell { --sidebar-width: 206px; --team-width: 210px; }
  .app-shell.sidebar-collapsed { --sidebar-width: 52px; }
  .sidebar { padding-inline: 10px; }
  .chat-scroll { padding: 16px 20px 14px; }
  .composer-area { padding-inline: 20px; }
}
@media (max-width: 1000px) {
  .app-shell, .app-shell.team-open {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    grid-template-rows: 50px minmax(0, 1fr);
  }
  .workspace-header { grid-column: 2; padding-inline: 18px; }
  .team-panel {
    grid-column: 2;
    grid-row: 2;
    z-index: 8;
    align-self: stretch;
    justify-self: end;
    width: min(230px, 100%);
    display: none;
    box-shadow: -8px 0 30px #1f1e1b18;
  }
  .app-shell.team-open .team-panel,
  .team-panel.open,
  .team-panel.is-open,
  .team-panel.expanded,
  .app-shell:has(#team-toggle[aria-expanded="true"]) .team-panel {
    display: flex;
  }
  .chat-scroll { padding: 16px 20px 14px; }
  .composer-area { padding-inline: 20px; }
}
@media (max-width: 640px) {
  .app-shell, .app-shell.team-open {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 50px minmax(0, 1fr);
  }
  .sidebar {
    display: none;
    position: fixed;
    inset: 50px auto 0 0;
    z-index: 12;
    width: min(260px, 85vw);
    border-right: 1px solid var(--line);
    box-shadow: 10px 0 32px #1f1e1b20;
  }
  .sidebar-collapse { display: none; }
  .app-shell.sidebar-open .sidebar,
  .sidebar.open,
  .sidebar.is-open,
  .sidebar.expanded,
  .app-shell:has(#menu-toggle[aria-expanded="true"]) .sidebar {
    display: flex;
  }
  .workspace-header { grid-column: 1; padding-inline: 10px; gap: 6px; }
  .menu-toggle { display: inline-flex; }
  .breadcrumb { gap: 6px; flex: 1; font-size: 11px; }
  .breadcrumb h1 { font-size: 12px; }
  .connection-status { border: 0; background: transparent; padding: 0; font-size: 0; gap: 0; }
  .connection-status::before { width: 7px; height: 7px; margin: 0 6px; }
  .chat-panel, .team-panel { grid-column: 1; }
  .workspace-top-strip { padding: 4px 10px; gap: 4px 8px; }
  .progress-steps { gap: 6px; font-size: 9px; }
  .progress-steps li { gap: 3px; }
  .progress-steps li::before { width: 14px; height: 14px; }
  .team-room { gap: 6px; }
  .team-characters { flex-wrap: nowrap; gap: 4px; }
  .agent-bubble { max-width: 110px; }
  .chat-scroll { padding: 14px 12px 10px; }
  .welcome { padding: 24px 0 14px; }
  .welcome h2 { font-size: 28px; }
  .welcome-description { font-size: 11.5px; }
  .approval-card { grid-template-columns: 1fr; }
  .approval-shot-link, .approval-shot-frame { min-height: 120px; }
  .composer-area { padding: 0 12px max(12px, env(safe-area-inset-bottom)); }
  #composer-input, .decision-panel textarea { font-size: 16px; }
  #composer-input { min-height: 70px; padding: 14px; }
  .composer-toolbar { padding: 0 8px 8px; }
  .team-panel, .app-shell.preview-resized .team-panel { width: 100%; }
  .team-panel-scroll { padding: 10px; }
  .login-card { padding: 36px 22px; width: 100%; }
}
@media (max-height: 800px) {
  .app-shell:not(.has-request) .chat-panel { overflow-y: auto; display: flex; flex-direction: column; }
  .app-shell:not(.has-request) .chat-scroll { overflow: visible; flex: 0 0 auto; }
  .app-shell:not(.has-request) .composer-area { flex: 0 0 auto; }
}
@media (forced-colors: active) {
  .brand-mark, .new-request, .send-button, .primary-button { border: 1px solid ButtonText; }
  .agent-card.active { border: 2px solid Highlight; }
  .connection-status::before, .agent-state::before { background: CanvasText; }
}
