/* Cut B v2 — Weio Design System v2 App Shell + Portal Token Bridges
   Loads AFTER tokens.css, weio-ui.css, index-CsDJ9nrG.css, settings-navigation, drawer.css.
   Zero hardcoded hexes in component rules: all surfaces/inks flow through --w-* tokens. */

:root,
html[data-theme="dark"],
html[data-workspace-shell="friday-chat"]:not([data-theme="light"]),
html[data-workspace-shell="friday-chat"]:not([data-theme="light"]) body,
html[data-workspace-shell="friday-chat"]:not([data-theme="light"]) .friday-chat-shell {
  color-scheme: dark;
  /* Bridge the 25 legacy portal --w-* semantic vars onto DSv2 tokens (DESIGN-V2-COMPAT-1127) */
  --w-bg-page: var(--w-paper);
  --w-bg-surface: var(--w-surface);
  --w-bg-raised: var(--w-raise);
  --w-bg-sunken: var(--w-sunk);
  --w-text-primary: var(--w-ink);
  --w-text-secondary: var(--w-ink-2);
  --w-text-muted: var(--w-ink-3);
  --w-text-faint: var(--w-ink-3);
  --w-border-line: var(--w-line);
  --w-border-strong: var(--w-line-2);
  --w-accent: var(--w-gold);
  --w-accent-hover: var(--w-gold-hover);
  --w-accent-tint: var(--w-gold-tint);
  --w-cta: var(--w-solid);
  --w-cta-on: var(--w-on-solid);
  --w-font-ui: var(--w-sans);
  --w-font-mono: var(--w-mono);
  --w-radius-sm: var(--w-r-sm);
  --w-radius-md: var(--w-r-md);
  --w-radius-lg: var(--w-r-lg);
  --w-radius-pill: var(--w-r-pill);
  --w-focus-ring: var(--w-focus);
  --w-motion-fast: var(--w-fast);
  --w-ease-standard: var(--w-ease);
  --w-space-4: var(--w-s4);
  --w-space-6: var(--w-s6);
  --w-bg: var(--w-paper);
  --w-text: var(--w-ink);
  --w-font: var(--w-sans);
}

html[data-theme="light"],
html[data-workspace-shell="friday-chat"][data-theme="light"] body,
html[data-workspace-shell="friday-chat"][data-theme="light"] .friday-chat-shell {
  color-scheme: light;
  --w-bg-page: var(--w-paper);
  --w-bg-surface: var(--w-surface);
  --w-bg-raised: var(--w-raise);
  --w-bg-sunken: var(--w-sunk);
  --w-text-primary: var(--w-ink);
  --w-text-secondary: var(--w-ink-2);
  --w-text-muted: var(--w-ink-3);
  --w-text-faint: var(--w-ink-3);
  --w-border-line: var(--w-line);
  --w-border-strong: var(--w-line-2);
  --w-accent: var(--w-gold-ink);
  --w-accent-hover: var(--w-gold-hover);
  --w-accent-tint: var(--w-gold-tint);
  --w-cta: var(--w-solid);
  --w-cta-on: var(--w-on-solid);
  --w-font-ui: var(--w-sans);
  --w-font-mono: var(--w-mono);
  --w-radius-sm: var(--w-r-sm);
  --w-radius-md: var(--w-r-md);
  --w-radius-lg: var(--w-r-lg);
  --w-radius-pill: var(--w-r-pill);
  --w-focus-ring: var(--w-focus);
  --w-motion-fast: var(--w-fast);
  --w-ease-standard: var(--w-ease);
  --w-space-4: var(--w-s4);
  --w-space-6: var(--w-s6);
  --w-bg: var(--w-paper);
  --w-text: var(--w-ink);
  --w-font: var(--w-sans);
}

/* Bridge legacy .w-btn.primary / .w-btn.sm onto DSv2 .w-btn BEM system */
.w-btn.primary {
  --_bg: var(--w-gold);
  --_fg: var(--w-on-gold);
  --_bd: transparent;
  background: var(--w-gold);
  color: var(--w-on-gold);
  border-color: transparent;
}
.w-btn.primary:hover {
  background: var(--w-gold-hover);
}
.w-btn.sm {
  height: 34px;
  min-height: 34px;
  padding: 0 12px;
  font-size: var(--w-fs-sm);
}

/* Global canvas */
html[data-workspace-shell="friday-chat"],
html[data-workspace-shell="friday-chat"] body {
  background: var(--w-paper);
  color: var(--w-ink);
  font-family: var(--w-sans);
}

/* DSv2 Topbar (.topbar.lumen-header) */
html[data-workspace-shell="friday-chat"] .topbar.lumen-header {
  height: var(--w-header-h, 64px);
  min-height: var(--w-header-h, 64px);
  background: var(--w-header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--w-line);
  padding: 0 16px;
  z-index: var(--w-z-header, 40);
}
html[data-workspace-shell="friday-chat"] .lumen-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
html[data-workspace-shell="friday-chat"] .lumen-brand.w-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--w-ink);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.035em;
  flex: none;
}
html[data-workspace-shell="friday-chat"] .lumen-brand.w-logo svg {
  width: 24px;
  height: 24px;
  flex: none;
}
html[data-workspace-shell="friday-chat"] .lumen-title-slot {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}
html[data-workspace-shell="friday-chat"] .lumen-title-slot button,
html[data-workspace-shell="friday-chat"] .lumen-title-slot .chat-title-btn {
  color: var(--w-ink) !important;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-workspace-shell="friday-chat"] .lumen-title-slot svg {
  color: var(--w-ink-3) !important;
}
html[data-workspace-shell="friday-chat"] .v2-topbar-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}
html[data-workspace-shell="friday-chat"] .v2-topbar-title .chat-title-btn {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  color: var(--w-ink) !important;
}
html[data-workspace-shell="friday-chat"] .v2-proj-sub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--w-ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-workspace-shell="friday-chat"] .v2-proj-sub .w-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--w-gold);
  flex: none;
}

/* Hide mobile menu button and duplicate drawer top brand on desktop (>= 901px, where full-width topbar holds I/O Weio) */
@media (min-width: 901px) {
  html[data-workspace-shell="friday-chat"] .w-topbar__menu {
    display: none !important;
  }
  html[data-workspace-shell="friday-chat"] .w-hide-desk {
    display: none !important;
  }
  html[data-workspace-shell="friday-chat"] .v2-sidebar-top {
    display: none !important;
  }
}

/* Ensure topbar hamburger menu button is crisp 44x44 touch target on phone */
html[data-workspace-shell="friday-chat"] .w-topbar__menu {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--w-r-sm);
  border: 0;
  background: transparent;
  color: var(--w-ink);
  cursor: pointer;
  flex: none;
}
html[data-workspace-shell="friday-chat"] .w-topbar__menu:hover {
  background: var(--w-sunk);
}

/* Hide legacy primary island pill on friday-chat so DSv2 sidebar owns navigation cleanly */
html[data-workspace-shell="friday-chat"] .topbar.lumen-header .island {
  display: none !important;
}

/* DSv2 Workspace Chat Layout */
html[data-workspace-shell="friday-chat"] .workspace-chat {
  height: calc(100dvh - 64px) !important;
  margin: 0 !important;
  background: var(--w-paper);
}
html[data-workspace-shell="friday-chat"] .shell.lumen .content,
html[data-workspace-shell="friday-chat"] main.content {
  padding: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

/* DSv2 Left Sidebar (Desktop 272px persistent, Phone min(320px, 85vw) slide-over drawer) */
html[data-workspace-shell="friday-chat"] #workspace-conversation-history.w-sidebar {
  width: 272px;
  min-width: 272px;
  max-width: 272px;
  height: 100%;
  background: var(--w-surface) !important;
  border-right: 1px solid var(--w-line) !important;
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 8px;
  box-sizing: border-box;
  overflow: hidden;
}
html[data-workspace-shell="friday-chat"] .v2-sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 6px;
}
html[data-workspace-shell="friday-chat"] .v2-sidebar-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--w-ink);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.035em;
  text-decoration: none;
}
html[data-workspace-shell="friday-chat"] .v2-sidebar-brand svg {
  width: 24px;
  height: 24px;
  flex: none;
}
html[data-workspace-shell="friday-chat"] .v2-new-chat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--w-r-pill);
  background: var(--w-gold);
  color: var(--w-on-gold);
  font-family: var(--w-sans);
  font-size: var(--w-fs-ui);
  font-weight: 600;
  cursor: pointer;
  flex: none;
  transition: background var(--w-fast) var(--w-ease);
}
html[data-workspace-shell="friday-chat"] .v2-new-chat-btn:hover {
  background: var(--w-gold-hover);
}
html[data-workspace-shell="friday-chat"] .v2-sidebar-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden !important;
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 2px;
}
html[data-workspace-shell="friday-chat"] .v2-side-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 8px 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--w-ink-3);
}
html[data-workspace-shell="friday-chat"] .v2-side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 0;
  border-radius: var(--w-r-sm);
  background: transparent;
  color: var(--w-ink-2);
  font-family: var(--w-sans);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  transition: background var(--w-fast) var(--w-ease), color var(--w-fast) var(--w-ease);
}
html[data-workspace-shell="friday-chat"] .v2-side-item:hover {
  background: var(--w-sunk);
  color: var(--w-ink);
}
html[data-workspace-shell="friday-chat"] .v2-side-item.is-active {
  background: var(--w-gold-tint);
  color: var(--w-gold-ink);
}
html[data-workspace-shell="friday-chat"] .v2-side-item svg {
  width: 17px;
  height: 17px;
  flex: none;
  opacity: 0.85;
}
html[data-workspace-shell="friday-chat"] .v2-trunc {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-workspace-shell="friday-chat"] .v2-age {
  font-family: var(--w-mono);
  font-size: 11.5px;
  color: var(--w-ink-3);
  flex: none;
}
html[data-workspace-shell="friday-chat"] .v2-chat-row {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  border-radius: var(--w-r-sm);
}
html[data-workspace-shell="friday-chat"] .v2-chat-row:hover {
  background: var(--w-sunk);
}
html[data-workspace-shell="friday-chat"] .v2-chat-row.is-active {
  background: var(--w-gold-tint);
}
html[data-workspace-shell="friday-chat"] .v2-chat-row.is-active .v2-side-item {
  color: var(--w-gold-ink);
}
html[data-workspace-shell="friday-chat"] .v2-chat-row .v2-side-item {
  background: transparent;
  flex: 1;
  min-width: 0;
  width: auto;
}
html[data-workspace-shell="friday-chat"] .v2-chat-del {
  width: 28px;
  height: 28px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--w-ink-3);
  cursor: pointer;
  opacity: 0.7;
}
html[data-workspace-shell="friday-chat"] .v2-chat-del:hover {
  background: var(--w-raise);
  color: var(--w-err);
  opacity: 1;
}
html[data-workspace-shell="friday-chat"] .v2-sidebar-foot {
  border-top: 1px solid var(--w-line);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: none;
}
html[data-workspace-shell="friday-chat"] .v2-acct-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  margin-top: 2px;
  border-radius: var(--w-r-sm);
}
html[data-workspace-shell="friday-chat"] .v2-acct-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--w-gold-tint);
  color: var(--w-gold-ink);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 13px;
  flex: none;
}
html[data-workspace-shell="friday-chat"] .v2-theme-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border: 1px solid var(--w-line);
  border-radius: 10px;
  background: var(--w-raise);
  color: var(--w-ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
}
html[data-workspace-shell="friday-chat"] .v2-theme-btn:hover {
  background: var(--w-sunk);
  color: var(--w-ink);
}
html[data-workspace-shell="friday-chat"] .v2-plan-badge {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--w-r-pill);
  background: var(--w-sunk);
  color: var(--w-ink-2);
  border: 1px solid var(--w-line);
  text-transform: capitalize;
}

/* Mobile Slide-Over Drawer (<= 900px): min(320px, 85vw), z-index 60, scrim z-index 59 */
html[data-workspace-shell="friday-chat"] .v2-drawer-scrim {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 11, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 59;
}
@media (max-width: 900px) {
  html[data-workspace-shell="friday-chat"] #workspace-conversation-history.w-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    transform: none !important;
    width: min(320px, 85vw) !important;
    min-width: 0 !important;
    max-width: min(320px, 85vw) !important;
    inline-size: min(320px, 85vw) !important;
    z-index: 60 !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
    padding-top: max(12px, env(safe-area-inset-top, 12px));
    padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
  }
}

/* Light/dark safe markdown inline code, code blocks, and composer attach button */
html[data-workspace-shell="friday-chat"] .w-md code {
  background: var(--w-sunk) !important;
  color: var(--w-ink) !important;
  border: 1px solid var(--w-line) !important;
  border-radius: 6px;
  padding: 1px 6px;
}
html[data-workspace-shell="friday-chat"] .w-md pre {
  background: var(--w-sunk) !important;
  color: var(--w-ink) !important;
  border: 1px solid var(--w-line) !important;
  border-radius: 12px;
}
html[data-workspace-shell="friday-chat"] .w-md pre code {
  background: transparent !important;
  border: 0 !important;
  padding: 0;
}
html[data-workspace-shell="friday-chat"] .workspace-chat-composer button:not([type="submit"]) {
  background: var(--w-sunk) !important;
  color: var(--w-ink) !important;
  border: 1px solid var(--w-line-2) !important;
}
html[data-workspace-shell="friday-chat"] .workspace-chat-composer button:not([type="submit"]):hover {
  background: var(--w-gold-tint) !important;
  color: var(--w-gold-ink) !important;
}

/* DSv2 Chat Thread & Messages (SPEC §7 + mockups/chat.html) */
html[data-workspace-shell="friday-chat"] .msg-hover.w-msg {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px !important;
}
html[data-workspace-shell="friday-chat"] .msg-hover.w-msg--user {
  justify-content: flex-end !important;
}
html[data-workspace-shell="friday-chat"] .msg-hover.w-msg--user > .v2-msg-bubble {
  max-width: min(82%, 560px) !important;
  background: var(--w-sunk) !important;
  color: var(--w-ink) !important;
  border-radius: 18px !important;
  padding: 11px 16px !important;
  box-shadow: inset 0 0 0 1px var(--w-ring);
}
html[data-workspace-shell="friday-chat"] .msg-hover.w-msg--ai {
  justify-content: flex-start !important;
}
html[data-workspace-shell="friday-chat"] .msg-hover.w-msg--ai > .v2-msg-bubble {
  flex: 1;
  min-width: 0;
  background: transparent !important;
  color: var(--w-ink) !important;
  padding: 2px 0 !important;
}
html[data-workspace-shell="friday-chat"] .v2-msg-mark.w-appicon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 8px;
  margin-top: 2px;
  background: var(--w-sunk);
  box-shadow: inset 0 0 0 1px var(--w-ring);
  display: grid;
  place-items: center;
  flex: none;
}
html[data-workspace-shell="friday-chat"] .v2-msg-mark.w-appicon svg {
  width: 18px;
  height: 18px;
}

/* DSv2 Composer (SPEC §7: 20px radius, raise surface, hairline ring, gold focus ring & caret) */
html[data-workspace-shell="friday-chat"] .workspace-chat-composer {
  background: var(--w-paper) !important;
  border-top: 1px solid var(--w-line) !important;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom, 12px)) !important;
}
html[data-workspace-shell="friday-chat"] .v2-composer-box {
  max-width: 760px !important;
  margin: 0 auto !important;
  border: 0 !important;
  border-radius: 20px !important;
  background: var(--w-raise) !important;
  box-shadow: inset 0 0 0 1px var(--w-ring-2) !important;
  padding: 12px 14px !important;
  transition: box-shadow var(--w-fast) var(--w-ease);
}
html[data-workspace-shell="friday-chat"] .v2-composer-box:focus-within {
  box-shadow: inset 0 0 0 1.5px var(--w-gold), 0 0 0 3px var(--w-gold-tint) !important;
}
html[data-workspace-shell="friday-chat"] .v2-composer-box textarea {
  caret-color: var(--w-gold);
  color: var(--w-ink) !important;
}
html[data-workspace-shell="friday-chat"] .v2-composer-box textarea::placeholder {
  color: var(--w-ink-3);
}

/* DSv2 Phone Bottom Tab Bar (.w-tabbar): visible on portal/home/non-chat views at <= 900px, HIDDEN inside open chat */
html[data-workspace-shell="friday-chat"] .v2-phone-tabbar.w-tabbar {
  display: none;
}
@media (max-width: 900px) {
  html[data-workspace-shell="friday-chat"] .v2-phone-tabbar.w-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--w-tabbar-h, 64px);
    background: var(--w-surface);
    border-top: 1px solid var(--w-line);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: var(--w-z-tabbar, 45);
  }
  html[data-workspace-shell="friday-chat"] .v2-phone-tabbar.w-tabbar a,
  html[data-workspace-shell="friday-chat"] .v2-phone-tabbar.w-tabbar button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    border: 0;
    background: transparent;
    color: var(--w-ink-3);
    font-family: var(--w-sans);
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    padding: 4px 2px;
  }
  html[data-workspace-shell="friday-chat"] .v2-phone-tabbar.w-tabbar a[aria-current="page"],
  html[data-workspace-shell="friday-chat"] .v2-phone-tabbar.w-tabbar button[aria-current="page"] {
    color: var(--w-gold-ink);
  }
  html[data-workspace-shell="friday-chat"] .v2-phone-tabbar.w-tabbar svg {
    width: 20px;
    height: 20px;
  }
  html[data-workspace-shell="friday-chat"] .v2-has-tabbar {
    padding-bottom: calc(var(--w-tabbar-h, 64px) + 16px) !important;
  }
}

/* In-shell Portal Home / Projects / Work views */
html[data-workspace-shell="friday-chat"] .v2-panel-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 20px 32px;
  background: var(--w-paper);
}
html[data-workspace-shell="friday-chat"] .v2-panel-inner {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
html[data-workspace-shell="friday-chat"] .v2-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
html[data-workspace-shell="friday-chat"] .v2-card {
  background: var(--w-card);
  box-shadow: inset 0 0 0 1px var(--w-ring);
  border-radius: var(--w-r-lg);
  padding: 18px;
  color: var(--w-ink);
}
html[data-workspace-shell="friday-chat"] .v2-card-btn {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}
html[data-workspace-shell="friday-chat"] .v2-card-btn:hover {
  box-shadow: inset 0 0 0 1px var(--w-ring-2);
}

/* DSv2 New Project Modal (matches partials/project-modal.html) */
html[data-workspace-shell="friday-chat"] .v2-modal-wrap {
  position: fixed;
  inset: 0;
  z-index: var(--w-z-modal, 70);
  background: rgba(6, 8, 11, 0.68);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 16px;
}
html[data-workspace-shell="friday-chat"] .v2-modal-card {
  width: min(460px, 100%);
  background: var(--w-raise);
  color: var(--w-ink);
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px var(--w-ring-2), 0 24px 64px rgba(0, 0, 0, 0.5);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
html[data-workspace-shell="friday-chat"] .v2-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
html[data-workspace-shell="friday-chat"] .v2-modal-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
html[data-workspace-shell="friday-chat"] .v2-modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
html[data-workspace-shell="friday-chat"] .v2-modal-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--w-ink-2);
}
html[data-workspace-shell="friday-chat"] .v2-modal-field input,
html[data-workspace-shell="friday-chat"] .v2-modal-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-radius: 12px;
  background: var(--w-sunk);
  color: var(--w-ink);
  box-shadow: inset 0 0 0 1px var(--w-ring-2);
  padding: 10px 12px;
  font-family: var(--w-sans);
  font-size: 16px;
}
html[data-workspace-shell="friday-chat"] .v2-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Mark frame & cursor colors */
.w-mark-frame { stroke: var(--w-io-in, #7D838B); }
.w-mark-cursor { fill: var(--w-gold, #E8B05C); }

/* P1 Fix: Ensure empty-state chat welcome heading, chips, and all workspace headings use --w-ink in both dark & light */
html[data-workspace-shell="friday-chat"] body,
html[data-workspace-shell="friday-chat"] .friday-chat-shell {
  background: var(--w-paper) !important;
  color: var(--w-ink) !important;
}
html[data-workspace-shell="friday-chat"] .friday-chat-welcome,
html[data-workspace-shell="friday-chat"] .friday-chat-welcome h1,
html[data-workspace-shell="friday-chat"] .v2-panel-wrap,
html[data-workspace-shell="friday-chat"] .v2-panel-wrap h1,
html[data-workspace-shell="friday-chat"] .v2-panel-wrap b {
  color: var(--w-ink) !important;
}
html[data-workspace-shell="friday-chat"] .workspace-plan-status {
  color: var(--w-ink-3) !important;
}

/* P2 Fixes (r3): keep mobile drawer Close (x) visible at 900px exact & reserve tabbar height on empty chat <= 900px */
@media (max-width: 900px) {
  html[data-workspace-shell="friday-chat"] #workspace-conversation-history .w-hide-desk {
    display: inline-flex !important;
  }
  html[data-workspace-shell="friday-chat"] .workspace-chat.v2-chat-has-tabbar {
    height: calc(100dvh - 64px - var(--w-tabbar-h, 64px)) !important;
  }
}

/* ============================================================================
   Chat Screen v2.1 + App Shell v2.2 + App Shell v2.3 (L134427) + Voice Orb
   + L134455 Pro Sizes + r3 P1/P2 + L134404 Delete Safety — 100% --w-* tokens
   ============================================================================ */
:root,
html[data-theme="dark"],
html[data-theme="light"] {
  --w-error: var(--w-err);
}

/* Explicit Light Mode surface overrides so legacy dark hexes NEVER bleed through */
html[data-workspace-shell="friday-chat"][data-theme="light"],
html[data-workspace-shell="friday-chat"][data-theme="light"] body,
html[data-workspace-shell="friday-chat"][data-theme="light"] .friday-chat-shell,
html[data-workspace-shell="friday-chat"][data-theme="light"] .workspace-chat,
html[data-workspace-shell="friday-chat"][data-theme="light"] .topbar.lumen-header,
html[data-workspace-shell="friday-chat"][data-theme="light"] .workspace-chat-composer {
  background: var(--w-paper) !important;
  color: var(--w-ink) !important;
}
html[data-workspace-shell="friday-chat"][data-theme="light"] aside#workspace-conversation-history {
  background: var(--w-surface) !important;
  color: var(--w-ink) !important;
  border-color: var(--w-line) !important;
}
html[data-workspace-shell="friday-chat"][data-theme="light"] .v2-composer-box {
  background: var(--w-raise) !important;
  color: var(--w-ink) !important;
  box-shadow: inset 0 0 0 1px var(--w-line-2), 0 2px 10px rgba(0, 0, 0, 0.04) !important;
}
html[data-workspace-shell="friday-chat"][data-theme="light"] .lumen-avatar-menu,
html[data-workspace-shell="friday-chat"][data-theme="light"] .v21-chat-menu,
html[data-workspace-shell="friday-chat"][data-theme="light"] .v23-attach-menu,
html[data-workspace-shell="friday-chat"][data-theme="light"] .v23-move-menu,
html[data-workspace-shell="friday-chat"][data-theme="light"] .v23-voice-overlay {
  background: var(--w-raise) !important;
  color: var(--w-ink) !important;
}
html[data-workspace-shell="friday-chat"][data-theme="light"] .msg-hover.w-msg--user > .v2-msg-bubble {
  background: var(--w-sunk) !important;
  color: var(--w-ink) !important;
}

/* Drop bottom tab bar on ALL signed-in pages */
html[data-workspace-shell="friday-chat"] .w-tabbar,
html[data-workspace-shell="friday-chat"] .v2-phone-tabbar {
  display: none !important;
}

/* 56px Top Bar across ALL widths */
html[data-workspace-shell="friday-chat"] .topbar.lumen-header {
  height: 56px !important;
  min-height: 56px !important;
  padding: 0 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}
html[data-workspace-shell="friday-chat"] .topbar.lumen-header .lumen-left {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}
html[data-workspace-shell="friday-chat"] .topbar.lumen-header .lumen-title-slot {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 4px !important;
}
html[data-workspace-shell="friday-chat"] .topbar.lumen-header .lumen-right {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex: none !important;
}
@media (min-width: 901px) {
  html[data-workspace-shell="friday-chat"] .w-topbar__menu {
    display: inline-flex !important;
  }
  html[data-workspace-shell="friday-chat"] .v2-sidebar-top {
    display: flex !important;
  }
}

/* v2.3 Top Bar gold Upgrade pill (>= 44px) for Free users */
html[data-workspace-shell="friday-chat"] .v23-upgrade-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  background: var(--w-gold) !important;
  color: var(--w-on-gold) !important;
  font-family: var(--w-sans) !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}
html[data-workspace-shell="friday-chat"] .v23-upgrade-pill:hover {
  background: var(--w-gold-hover) !important;
}

html[data-workspace-shell="friday-chat"] .v21-topbar-new {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: var(--w-r-sm);
  border: 0;
  background: transparent;
  color: var(--w-ink);
  cursor: pointer;
}
html[data-workspace-shell="friday-chat"] .v21-topbar-new:hover {
  background: var(--w-sunk);
}
html[data-workspace-shell="friday-chat"] .lumen-avatar {
  min-width: 44px !important;
  min-height: 44px !important;
  width: 44px !important;
  height: 44px !important;
}

/* Account Menu (v2.3: NO Theme switch — Theme lives strictly in Settings > Appearance!) */
html[data-workspace-shell="friday-chat"] .lumen-avatar-menu {
  min-width: 240px !important;
  border-radius: 14px !important;
  background: var(--w-raise) !important;
  color: var(--w-ink) !important;
  box-shadow: inset 0 0 0 1px var(--w-ring-2), 0 16px 40px rgba(0, 0, 0, 0.38) !important;
  padding: 8px !important;
}
html[data-workspace-shell="friday-chat"] .lumen-avatar-menu .isl-menu-item,
html[data-workspace-shell="friday-chat"] .lumen-avatar-menu .isl-menu-item[href="/workspace/account#billing"] {
  display: flex !important;
  min-height: 44px !important;
  color: var(--w-ink) !important;
  border-radius: 10px !important;
}
html[data-workspace-shell="friday-chat"] .lumen-avatar-menu .isl-menu-item:hover {
  background: var(--w-sunk) !important;
}
html[data-workspace-shell="friday-chat"] .lumen-avatar-menu .lumen-upsell {
  color: var(--w-gold-ink) !important;
  font-weight: 600 !important;
}

/* Top Bar Title Button */
html[data-workspace-shell="friday-chat"] .v21-title-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: min(320px, 100%);
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--w-ink) !important;
  font-family: var(--w-sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
html[data-workspace-shell="friday-chat"] .v21-title-btn:hover {
  background: var(--w-sunk);
}
html[data-workspace-shell="friday-chat"] .v21-title-btn svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--w-ink-3) !important;
}
html[data-workspace-shell="friday-chat"] .v21-title-rename {
  display: flex;
  align-items: center;
  gap: 6px;
  width: min(300px, 100%);
}
html[data-workspace-shell="friday-chat"] .v21-title-rename input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1.5px solid var(--w-gold);
  background: var(--w-raise);
  color: var(--w-ink);
  font-family: var(--w-sans);
  font-size: 15px;
}

/* Workspace height matches 56px top bar */
html[data-workspace-shell="friday-chat"] .workspace-chat {
  height: calc(100dvh - 56px) !important;
}
html[data-workspace-shell="friday-chat"] .v21-static-logo {
  cursor: default !important;
  user-select: none;
  pointer-events: none;
}

/* Full-width neutral "New chat" row in sidebar */
html[data-workspace-shell="friday-chat"] .v21-new-chat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--w-line);
  border-radius: 12px;
  background: var(--w-raise);
  color: var(--w-ink);
  font-family: var(--w-sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  flex: none;
  text-align: left;
}
html[data-workspace-shell="friday-chat"] .v21-new-chat-row:hover {
  background: var(--w-sunk);
  border-color: var(--w-line-2);
}

/* v2.3 Sidebar Gold-Tint Upgrade Card (Free tier only, above Plans & billing) + Free badge on account row */
html[data-workspace-shell="friday-chat"] .v23-side-upgrade {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: var(--w-gold-tint);
  border: 1px solid var(--w-gold);
  color: var(--w-ink);
  text-decoration: none;
}
html[data-workspace-shell="friday-chat"] .v23-side-upgrade-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--w-ink);
}
html[data-workspace-shell="friday-chat"] .v23-side-upgrade-sub {
  font-size: 12px;
  color: var(--w-ink-2);
  line-height: 1.4;
}
html[data-workspace-shell="friday-chat"] .v23-side-upgrade-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--w-gold);
  color: var(--w-on-gold);
  font-size: 12.5px;
  font-weight: 600;
  align-self: flex-start;
}
html[data-workspace-shell="friday-chat"] .v2-side-item {
  min-height: 44px !important;
}
html[data-workspace-shell="friday-chat"] .v2-theme-btn {
  display: none !important;
}
html[data-workspace-shell="friday-chat"] .v21-row-more {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--w-ink-3);
  cursor: pointer;
  opacity: 0.72;
}
html[data-workspace-shell="friday-chat"] .v2-chat-row:hover .v21-row-more,
html[data-workspace-shell="friday-chat"] .v21-row-more:focus-visible,
html[data-workspace-shell="friday-chat"] .v21-row-more:hover {
  opacity: 1;
  background: var(--w-raise);
  color: var(--w-ink);
}
@media (max-width: 900px), (hover: none) {
  html[data-workspace-shell="friday-chat"] .v21-row-more {
    opacity: 1 !important;
  }
}
html[data-workspace-shell="friday-chat"] .v21-row-rename-form {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 2px 4px;
  box-sizing: border-box;
}
html[data-workspace-shell="friday-chat"] .v21-row-rename-form input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 4px 10px;
  border-radius: 10px;
  border: 1.5px solid var(--w-gold);
  background: var(--w-raise);
  color: var(--w-ink);
  font-size: 14px;
}

/* Chat Menu & Attach Menu & Move-to-Project Submenu: Popover (radius 14) >= 600px, Bottom Sheet < 600px */
html[data-workspace-shell="friday-chat"] .v21-menu-scrim {
  position: fixed;
  inset: 0;
  z-index: 79;
  background: transparent;
}
html[data-workspace-shell="friday-chat"] .v21-chat-menu,
html[data-workspace-shell="friday-chat"] .v23-attach-menu {
  position: fixed;
  z-index: 80;
  min-width: 210px;
  background: var(--w-raise);
  color: var(--w-ink);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--w-ring-2), 0 16px 40px rgba(0, 0, 0, 0.42);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
html[data-workspace-shell="friday-chat"] .v23-attach-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
}
html[data-workspace-shell="friday-chat"] .v21-chat-menu-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--w-ink);
  font-family: var(--w-sans);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
html[data-workspace-shell="friday-chat"] .v21-chat-menu-btn:hover {
  background: var(--w-sunk);
}
html[data-workspace-shell="friday-chat"] .v21-chat-menu-btn.is-danger {
  color: var(--w-err);
}
html[data-workspace-shell="friday-chat"] .v23-menu-subhdr {
  padding: 6px 12px 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--w-ink-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
@media (max-width: 599px) {
  html[data-workspace-shell="friday-chat"] .v21-menu-scrim {
    background: rgba(6, 8, 11, 0.56);
    backdrop-filter: blur(3px);
  }
  html[data-workspace-shell="friday-chat"] .v21-chat-menu,
  html[data-workspace-shell="friday-chat"] .v23-attach-menu {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 0 !important;
    transform: none !important;
    width: 100% !important;
    min-width: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    padding: 14px 14px max(18px, env(safe-area-inset-bottom, 18px)) !important;
    box-sizing: border-box !important;
    z-index: 80 !important;
  }
}

/* Centered Empty State: Geist 28/34 + 28px I/O mark blinking ONCE */
@keyframes v21-cursor-blink-once {
  0% { opacity: 1; }
  45% { opacity: 0.12; }
  100% { opacity: 1; }
}
html[data-workspace-shell="friday-chat"] .v21-empty-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  text-align: center;
  padding: 0 16px;
}
html[data-workspace-shell="friday-chat"] .v21-empty-mark {
  width: 28px;
  height: 28px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
html[data-workspace-shell="friday-chat"] .v21-empty-mark svg {
  width: 28px;
  height: 28px;
}
html[data-workspace-shell="friday-chat"] .v21-empty-mark .w-mark-cursor {
  animation: v21-cursor-blink-once 0.9s ease-in-out 1;
}
@media (prefers-reduced-motion: reduce) {
  html[data-workspace-shell="friday-chat"] .v21-empty-mark .w-mark-cursor {
    animation: none;
  }
}
html[data-workspace-shell="friday-chat"] .friday-chat-welcome h1 {
  margin: 0 !important;
  font-family: var(--w-sans) !important;
  font-size: 28px !important;
  line-height: 34px !important;
  font-weight: 500 !important;
  letter-spacing: -0.025em !important;
  color: var(--w-ink) !important;
}

/* Out-of-Messages Banner above composer (L134426 #3 + L134427) */
html[data-workspace-shell="friday-chat"] .v23-quota-banner {
  max-width: 760px;
  margin: 0 auto 10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--w-gold-tint);
  border: 1px solid var(--w-gold);
  color: var(--w-ink);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.45;
  box-sizing: border-box;
}
html[data-workspace-shell="friday-chat"] .v23-quota-banner a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--w-gold);
  color: var(--w-on-gold);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

/* Pinned Bottom Composer (NO Free plan picker — + left, [Gated Voice] + gold Send right!) */
html[data-workspace-shell="friday-chat"] .workspace-chat-composer {
  position: relative !important;
  border-top: 0 !important;
  background: var(--w-paper) !important;
  padding: 8px 16px max(12px, env(safe-area-inset-bottom, 12px)) !important;
}
html[data-workspace-shell="friday-chat"] .workspace-chat-composer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -28px;
  height: 28px;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--w-paper));
}
html[data-workspace-shell="friday-chat"] .v2-composer-box {
  max-width: 760px !important;
  border-radius: 24px !important;
  padding: 12px 14px 8px !important;
}
html[data-workspace-shell="friday-chat"] .v2-composer-box textarea {
  max-height: 156px !important;
  line-height: 24px !important;
  font-size: 16px !important;
}
html[data-workspace-shell="friday-chat"] .v21-comp-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  position: relative;
}
html[data-workspace-shell="friday-chat"] .v21-comp-left {
  position: relative;
  display: flex;
  align-items: center;
}
html[data-workspace-shell="friday-chat"] .v21-comp-right {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
html[data-workspace-shell="friday-chat"] .workspace-chat-composer button.v21-attach-btn,
html[data-workspace-shell="friday-chat"] .workspace-chat-composer button.v23-voice-btn {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  flex: none;
}
html[data-workspace-shell="friday-chat"] .workspace-chat-composer button.v21-attach-btn:hover,
html[data-workspace-shell="friday-chat"] .workspace-chat-composer button.v23-voice-btn:hover {
  background: transparent !important;
}
html[data-workspace-shell="friday-chat"] .v21-attach-circle,
html[data-workspace-shell="friday-chat"] .v23-voice-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--w-sunk);
  border: 1px solid var(--w-line-2);
  color: var(--w-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
html[data-workspace-shell="friday-chat"] .v21-attach-btn:hover .v21-attach-circle,
html[data-workspace-shell="friday-chat"] .v23-voice-btn:hover .v23-voice-circle {
  background: var(--w-gold-tint);
  color: var(--w-gold-ink);
}
html[data-workspace-shell="friday-chat"] .v21-send-btn {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  flex: none;
}
html[data-workspace-shell="friday-chat"] .v21-send-btn:disabled {
  cursor: default;
}
html[data-workspace-shell="friday-chat"] .v21-send-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
html[data-workspace-shell="friday-chat"] .v21-send-circle.is-ready {
  background: var(--w-gold);
  color: var(--w-on-gold);
}
html[data-workspace-shell="friday-chat"] .v21-send-btn:hover:not(:disabled) .v21-send-circle.is-ready {
  background: var(--w-gold-hover);
}
html[data-workspace-shell="friday-chat"] .v21-send-circle.is-empty {
  background: var(--w-sunk);
  color: var(--w-ink-3);
}
html[data-workspace-shell="friday-chat"] .v21-send-circle.is-stop {
  background: var(--w-solid);
  color: var(--w-on-solid);
}

/* Thread */
html[data-workspace-shell="friday-chat"] .msg-hover.w-msg--user > .v2-msg-bubble {
  border-radius: 20px !important;
}
html[data-workspace-shell="friday-chat"] .v21-msg-mark-spacer {
  width: 28px;
  min-width: 28px;
  flex: none;
}
html[data-workspace-shell="friday-chat"] .v21-inline-img {
  display: block;
  max-width: min(100%, 260px);
  max-height: 220px;
  object-fit: cover;
  border-radius: 14px;
  border: 0 !important;
  margin-bottom: 6px;
}

/* ============================================================================
   VOICE-1128 Live Voice Orb Screen (L134427 + 90ad4cd0, Default-OFF Gated)
   ============================================================================ */
@keyframes v23-orb-pulse {
  0% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.14); opacity: 0.18; }
  100% { transform: scale(1); opacity: 0.55; }
}
html[data-workspace-shell="friday-chat"] .v23-voice-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: var(--w-paper);
  color: var(--w-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 28px 20px max(28px, env(safe-area-inset-bottom, 28px));
  box-sizing: border-box;
}
html[data-workspace-shell="friday-chat"] .v23-voice-hdr {
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
html[data-workspace-shell="friday-chat"] .v23-voice-state-lbl {
  font-family: var(--w-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--w-ink-3);
}
html[data-workspace-shell="friday-chat"] .v23-voice-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  max-width: 520px;
  width: 100%;
  text-align: center;
}
html[data-workspace-shell="friday-chat"] .v23-voice-orb {
  position: relative;
  width: 156px;
  height: 156px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--w-raise);
  border: 2px solid var(--w-io-in);
  transition: border-color 0.2s ease, opacity 0.2s ease;
}
html[data-workspace-shell="friday-chat"] .v23-voice-orb::before,
html[data-workspace-shell="friday-chat"] .v23-voice-orb::after {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 2px solid var(--w-io-in);
  opacity: 0.4;
  animation: v23-orb-pulse 2.2s ease-in-out infinite;
  pointer-events: none;
}
html[data-workspace-shell="friday-chat"] .v23-voice-orb::after {
  inset: -32px;
  animation-delay: 0.7s;
  opacity: 0.22;
}
html[data-workspace-shell="friday-chat"] .v23-voice-orb[data-state="speaking"] {
  border-color: var(--w-gold);
}
html[data-workspace-shell="friday-chat"] .v23-voice-orb[data-state="speaking"]::before,
html[data-workspace-shell="friday-chat"] .v23-voice-orb[data-state="speaking"]::after {
  border-color: var(--w-gold);
}
html[data-workspace-shell="friday-chat"] .v23-voice-orb[data-state="muted"] {
  opacity: 0.48;
  border-color: var(--w-line-2);
}
html[data-workspace-shell="friday-chat"] .v23-voice-orb[data-state="muted"]::before,
html[data-workspace-shell="friday-chat"] .v23-voice-orb[data-state="muted"]::after {
  animation: none;
  opacity: 0.14;
}
@media (prefers-reduced-motion: reduce) {
  html[data-workspace-shell="friday-chat"] .v23-voice-orb::before,
  html[data-workspace-shell="friday-chat"] .v23-voice-orb::after {
    animation: none !important;
  }
}
html[data-workspace-shell="friday-chat"] .v23-voice-caption {
  min-height: 54px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--w-ink);
  margin: 0;
}
html[data-workspace-shell="friday-chat"] .v23-voice-err {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--w-sunk);
  border: 1px solid var(--w-err);
  color: var(--w-ink);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
html[data-workspace-shell="friday-chat"] .v23-voice-controls {
  display: flex;
  align-items: center;
  gap: 24px;
}
html[data-workspace-shell="friday-chat"] .v23-voice-mute-btn {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  border-radius: 50%;
  border: 1px solid var(--w-line-2);
  background: var(--w-raise);
  color: var(--w-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
html[data-workspace-shell="friday-chat"] .v23-voice-mute-btn[aria-pressed="true"] {
  background: var(--w-sunk);
  border-color: var(--w-gold);
  color: var(--w-gold-ink);
}
html[data-workspace-shell="friday-chat"] .v23-voice-end-btn {
  min-width: 64px;
  height: 64px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  background: var(--w-err);
  color: #ffffff;
  font-family: var(--w-sans);
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

/* Gated Coder View (Linked computers + Coder sessions) */
html[data-workspace-shell="friday-chat"] .v23-coder-view {
  position: absolute;
  inset: 0;
  z-index: 25;
  background: var(--w-paper);
  overflow-y: auto;
  padding: 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
html[data-workspace-shell="friday-chat"] .v23-coder-view > * {
  max-width: 780px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
html[data-workspace-shell="friday-chat"] .v23-coder-card {
  background: var(--w-surface);
  border: 1px solid var(--w-line);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Focus rings */
html[data-workspace-shell="friday-chat"] button:focus-visible,
html[data-workspace-shell="friday-chat"] a:focus-visible,
html[data-workspace-shell="friday-chat"] input:focus-visible,
html[data-workspace-shell="friday-chat"] textarea:focus-visible {
  outline: 2px solid var(--w-gold) !important;
  outline-offset: 2px !important;
}
html[data-workspace-shell="friday-chat"] .v2-composer-box textarea:focus,
html[data-workspace-shell="friday-chat"] .v2-composer-box textarea:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
