    @font-face {
      font-family: "Inter Variable";
      src: url("/fonts/InterVariable.woff2") format("woff2");
      font-style: normal;
      font-weight: 100 900;
      font-display: swap;
    }
    @font-face {
      font-family: "Inter Variable";
      src: url("/fonts/InterVariable-Italic.woff2") format("woff2");
      font-style: italic;
      font-weight: 100 900;
      font-display: swap;
    }
    :root {
      color-scheme: light;
      --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      --font-sans: "Inter Variable", var(--font-system);
      --font-mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
      --type-caption: 0.6875rem;
      --type-label: 0.75rem;
      --type-small: 0.8125rem;
      --type-body: 0.875rem;
      --type-title: 1rem;
      --type-heading: 1.125rem;
      --type-metric: 1.25rem;
      --weight-regular: 400;
      --weight-medium: 500;
      --weight-semibold: 600;
      --weight-bold: 700;
      --leading-control: 1.25;
      --leading-compact: 1.35;
      --leading-body: 1.5;
      --sidebar: #f4f7fa;
      --sidebar-muted: #667386;
      --sidebar-line: rgba(55, 75, 99, 0.1);
      --surface: #ffffff;
      --canvas: #f3f5f7;
      --line: #dfe4ea;
      --text: #17202c;
      --muted: #6b7686;
      --blue: #1769e0;
      --blue-dark: #0e55bd;
      --amber: #e9a23b;
      --danger: #b42318;
      --sidebar-width: 15.5rem;
      --project-panel-width: 26rem;
      --workspace-header-height: 4.4rem;
      --sidebar-frame-gap: 0.5rem;
      --safe-top: env(safe-area-inset-top, 0px);
      --safe-right: env(safe-area-inset-right, 0px);
      --safe-bottom: env(safe-area-inset-bottom, 0px);
      --safe-left: env(safe-area-inset-left, 0px);
      --chat-width: 47rem;
    }
    *, *::before, *::after { box-sizing: border-box; }
    html, body { width: 100%; height: 100%; margin: 0; }
    html { background: var(--canvas); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
    body {
      overflow: hidden; color: var(--text); background: var(--canvas); overscroll-behavior: none;
      font-family: var(--font-sans); font-size: var(--type-body); font-weight: var(--weight-regular);
      line-height: var(--leading-body); letter-spacing: 0; font-optical-sizing: auto;
      font-kerning: normal; font-feature-settings: "liga" 1, "calt" 1; font-synthesis: none;
    }
    html.pwa-standalone,
    html.pwa-standalone body {
      height: var(--app-height, 100vh);
      min-height: var(--app-height, 100vh);
      max-height: var(--app-height, 100vh);
      overflow: hidden;
    }
    button, input, textarea, select { font: inherit; line-height: var(--leading-control); letter-spacing: 0; }
    button { touch-action: manipulation; }
    button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
    [hidden] { display: none !important; }

    #boot-view {
      position: relative; isolation: isolate; width: 100%; height: 100vh; height: 100dvh;
      overflow: hidden; display: grid; place-items: center;
      background:
        radial-gradient(circle at 50% 46%, rgba(23,105,224,0.09), transparent 15rem),
        var(--canvas);
      color: var(--text);
    }
    #boot-view::before {
      content: ''; position: absolute; z-index: -1; inset: 0;
      background-image:
        linear-gradient(rgba(32,36,43,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(32,36,43,0.035) 1px, transparent 1px);
      background-size: 1.75rem 1.75rem;
      -webkit-mask-image: radial-gradient(circle at center, #000, transparent 68%);
      mask-image: radial-gradient(circle at center, #000, transparent 68%);
    }
    .boot-scene { display: grid; justify-items: center; gap: 1.2rem; transform: translateY(-2vh); }
    .boot-workspace { width: min(20rem, calc(100vw - 2rem)); }
    .boot-workspace-visual { width: 100%; height: auto; display: block; overflow: visible; animation: boot-workspace-float 4.8s ease-in-out infinite; }
    .boot-shell-card { fill: #fff; filter: url(#boot-shell-shadow); }
    .boot-shell-surface { fill: url(#boot-shell-surface); }
    .boot-shell-grid { fill: none; stroke: rgba(45,63,83,0.1); stroke-width: 1; }
    .boot-shell-header text { fill: #fff; font: 800 7px/1 var(--font-sans); letter-spacing: -0.04em; }
    .boot-shell-header rect { fill: #d5dce4; }
    .boot-shell-header rect:nth-of-type(2) { fill: #e3e8ed; }
    .boot-shell-header > circle:not(.boot-brand-core) { fill: #cbd4dc; }
    .boot-brand-core { fill: #15c725; animation: boot-brand-pulse 2.2s ease-in-out infinite; transform-origin: 34px 32px; }
    .boot-stage { transform-box: fill-box; transform-origin: center; animation: boot-stage-assemble 3.6s cubic-bezier(.2,.8,.2,1) infinite; }
    .boot-stage-projects { animation-delay: -3.6s; }
    .boot-stage-conversation { animation-delay: -3.28s; }
    .boot-stage-result { animation-delay: -2.96s; }
    .boot-stage-projects > rect:not(.boot-project-active) { fill: #d6dde4; }
    .boot-project-active { fill: #eaf2ff; stroke: rgba(23,105,224,0.24); }
    .boot-stage-projects circle { fill: #1769e0; }
    .boot-message-user { fill: #e8eef5; }
    .boot-message-teamon { fill: #eef8f1; stroke: rgba(21,199,37,0.2); }
    .boot-stage-conversation rect:not(.boot-message):not(.boot-composer) { fill: #aebdca; }
    .boot-message-core { fill: #15c725; }
    .boot-composer { fill: #fff; stroke: #dce3e9; }
    .boot-stage-conversation > circle:not(.boot-message-core) { fill: #b8c4cf; }
    .boot-result-card { fill: #fff; stroke: #dbe4df; }
    .boot-result-core { fill: #15c725; animation: boot-result-pulse 2.4s ease-in-out infinite; transform-origin: 312.5px 111px; }
    .boot-result-check { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 18; animation: boot-check-draw 2.4s ease-in-out infinite; }
    .boot-stage-result rect:not(.boot-result-card):not(.boot-result-ready) { fill: #cbd5dc; }
    .boot-result-ready { fill: #e6f7eb; }
    .boot-flow { fill: none; stroke: rgba(21,199,37,0.52); stroke-width: 1.7; stroke-linecap: round; stroke-dasharray: 3 7; animation: boot-flow 1.2s linear infinite; }
    .boot-flow-node { fill: #15c725; stroke: #fff; stroke-width: 2; animation: boot-flow-node 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
    .boot-flow-node-b { animation-delay: -0.65s; }
    .boot-copy { display: grid; justify-items: center; gap: 0.32rem; text-align: center; }
    .boot-copy strong { font-size: var(--type-heading); font-weight: var(--weight-bold); letter-spacing: -0.015em; }
    .boot-copy span {
      display: inline-flex; align-items: center; gap: 0.42rem; color: var(--muted);
      font-size: var(--type-small); font-weight: var(--weight-medium);
    }
    .boot-copy span::before {
      content: ''; width: 0.38rem; height: 0.38rem; border-radius: 50%; background: #15c725;
      box-shadow: 0 0 0 0.22rem rgba(21,199,37,0.1);
      animation: boot-status 1.35s ease-in-out infinite;
    }
    #boot-retry {
      min-height: 2.7rem; margin-top: 0.55rem; padding: 0.55rem 1rem;
      border: 1px solid rgba(23,105,224,0.3); border-radius: 999px;
      background: rgba(255,255,255,0.88); color: var(--blue); font-weight: var(--weight-semibold);
      box-shadow: 0 8px 24px rgba(25,34,48,0.08);
    }
    @keyframes boot-workspace-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
    @keyframes boot-stage-assemble { 0%, 9% { opacity: 0.25; transform: translateY(5px) scale(0.985); } 28%, 88% { opacity: 1; transform: none; } 100% { opacity: 0.34; transform: translateY(-2px); } }
    @keyframes boot-brand-pulse { 0%, 100% { transform: scale(0.94); } 50% { transform: scale(1.08); } }
    @keyframes boot-result-pulse { 0%, 100% { transform: scale(0.92); } 45% { transform: scale(1.08); } }
    @keyframes boot-check-draw { 0%, 18% { stroke-dashoffset: 18; opacity: 0.3; } 48%, 100% { stroke-dashoffset: 0; opacity: 1; } }
    @keyframes boot-flow { to { stroke-dashoffset: -40; } }
    @keyframes boot-flow-node { 0%, 100% { opacity: 0.45; transform: scale(0.75); } 50% { opacity: 1; transform: scale(1.15); } }
    @keyframes boot-status { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

    #login-view {
      min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
      padding: calc(1.25rem + var(--safe-top)) calc(1.25rem + var(--safe-right)) calc(1.25rem + var(--safe-bottom)) calc(1.25rem + var(--safe-left));
      background: #eef1f4;
    }
    #login-panel {
      width: min(100%, 24rem); padding: 1.6rem; background: var(--surface);
      border: 1px solid #d8dee6; border-radius: 8px; box-shadow: 0 16px 46px rgba(25, 34, 48, 0.1);
    }
    .login-brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
    .brand-mark {
      width: 2.65rem; height: 2.65rem; display: grid; place-items: center;
      overflow: visible; border: 0; border-radius: 0.85rem;
      background: transparent;
      color: #111922; box-shadow: none;
    }
    .brand-symbol { width: 100%; height: 100%; display: block; object-fit: cover; }
    .login-brand strong { display: block; font-size: var(--type-title); }
    .login-brand span { display: block; margin-top: 0.12rem; color: var(--muted); font-size: var(--type-body); }
    #login-form { display: grid; gap: 0.9rem; }
    .field { display: grid; gap: 0.35rem; }
    .field label { color: #3e4958; font-size: var(--type-small); font-weight: var(--weight-semibold); }
    .field input {
      width: 100%; min-height: 2.75rem; padding: 0.65rem 0.72rem;
      border: 1px solid #cbd3dd; border-radius: 6px; background: #fff; color: var(--text); outline: none;
    }
    .field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.12); }
    #login-submit {
      min-height: 2.75rem; border: 0; border-radius: 6px; background: var(--blue); color: #fff;
      font-weight: var(--weight-bold); cursor: pointer;
    }
    #login-submit:hover { background: var(--blue-dark); }
    #login-submit:disabled { opacity: 0.58; cursor: default; }
    #login-error { min-height: 1.2rem; color: var(--danger); font-size: var(--type-small); line-height: 1.35; }

    #app { width: 100%; height: 100vh; height: 100dvh; height: var(--app-height, 100dvh); display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); overflow: hidden; transition: grid-template-columns 160ms ease; }
    html.pwa-standalone #boot-view,
    html.pwa-standalone #login-view,
    html.pwa-standalone #app {
      position: fixed;
      inset: 0;
      width: 100%;
      height: 100%;
      min-height: 0;
      max-height: 100%;
    }
    #sidebar {
      position: relative;
      min-width: 0; min-height: 0; display: grid;
      grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto;
      margin: var(--sidebar-frame-gap) 0.34rem var(--sidebar-frame-gap) var(--sidebar-frame-gap);
      padding-top: var(--safe-top); padding-bottom: var(--safe-bottom); padding-left: var(--safe-left);
      overflow: hidden; color: #1d2938; border: 1px solid rgba(83,105,133,0.13); border-radius: 0.82rem;
      background:
        linear-gradient(180deg, rgba(249,251,253,0.88), rgba(242,246,250,0.92)),
        url("/art/sidebar-atmosphere-v1.jpg") center / cover no-repeat;
      box-shadow: 0 10px 28px rgba(35,52,74,0.065), inset 0 1px 0 rgba(255,255,255,0.9);
      font-size: var(--type-small); line-height: var(--leading-compact);
      backdrop-filter: blur(24px) saturate(112%);
    }
    .sidebar-brand { min-width: 0; padding: 0.72rem 0.72rem 0.66rem; border-bottom: 1px solid var(--sidebar-line); }
    .sidebar-brand-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.58rem; min-width: 0; }
    .sidebar-brand .brand-mark { width: 2.12rem; height: 2.12rem; flex: 0 0 auto; border-radius: 0.7rem; }
    .sidebar-brand .brand-symbol { width: 1.62rem; height: 1.62rem; }
    #sidebar-collapse { padding: 0; font: inherit; cursor: pointer; transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease; }
    #sidebar-collapse:hover { filter: drop-shadow(0 5px 9px rgba(24,92,49,0.15)); transform: translateY(-1px); }
    #sidebar-collapse:focus-visible { outline: 2px solid #16a846; outline-offset: 2px; }
    .sidebar-brand-copy { min-width: 0; }
    .sidebar-brand-copy strong {
      display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
      font-size: 0.92rem; font-weight: var(--weight-bold); letter-spacing: -0.02em; line-height: 1.2;
    }
    .sidebar-brand-copy span {
      display: block; margin-top: 0.14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
      color: #6d7989; font-size: 0.68rem; font-weight: var(--weight-medium); letter-spacing: -0.005em;
    }
    .sidebar-search {
      min-width: 0; display: grid; grid-template-columns: 0.88rem minmax(0, 1fr); gap: 0.38rem;
      align-items: center; margin: 0.42rem 0.58rem 0.16rem; padding: 0.34rem 0.48rem;
      border: 1px solid rgba(73,96,125,0.1); border-radius: 0.48rem;
      background: rgba(75,94,118,0.055); color: #7b8797;
      transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
    }
    .sidebar-search:focus-within { border-color: rgba(47,112,191,0.36); background: rgba(255,255,255,0.76); box-shadow: 0 0 0 2px rgba(47,112,191,0.08); }
    .sidebar-search svg { width: 0.82rem; height: 0.82rem; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; }
    #sidebar-project-search { width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: #26364a; font-size: 0.75rem; outline: none; }
    #sidebar-project-search::placeholder { color: #8b95a2; }
    #sidebar-project-search::-webkit-search-cancel-button { opacity: 0.55; }
    #addressed-messages {
      position: relative; min-width: 0; min-height: 1.82rem; display: grid;
      grid-template-columns: 1.12rem minmax(0, auto) auto; gap: 0.3rem; align-items: center;
      margin: 0; padding: 0.22rem 0.32rem; border: 1px solid rgba(182,109,23,0.18);
      border-radius: 999px; background: rgba(255,240,215,0.68); color: #754b15;
      font: inherit; font-size: 0.72rem; font-weight: var(--weight-semibold); text-align: left; cursor: pointer;
      transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
    }
    #addressed-messages[hidden] { display: none; }
    #addressed-messages:hover { border-color: rgba(182,109,23,0.34); background: #fff0d7; transform: translateY(-1px); }
    #addressed-messages:focus-visible { outline: 2px solid rgba(182,109,23,0.62); outline-offset: 1px; }
    .addressed-messages-icon {
      width: 1.12rem; height: 1.12rem; display: grid; place-items: center; border-radius: 50%;
      background: #b66d17; color: #fff; font-size: 0.64rem; font-weight: var(--weight-bold);
    }
    .addressed-messages-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #addressed-messages-count {
      min-width: 1.12rem; padding: 0.08rem 0.25rem; border-radius: 999px; background: rgba(182,109,23,0.12);
      font-size: 0.62rem; text-align: center;
    }
    #personal-chat-toggle, #admin-toggle {
      width: calc(100% - 1.16rem); min-height: 3.05rem; display: grid;
      grid-template-columns: 2rem minmax(0, 1fr); gap: 0.58rem; align-items: center;
      margin: 0.42rem 0.58rem 0.14rem; padding: 0.43rem 0.52rem;
      border: 1px solid rgba(45,103,169,0.18); border-radius: 0.72rem;
      background: linear-gradient(135deg, rgba(229,241,253,0.92), rgba(246,250,254,0.78));
      color: #24496d; font: inherit; text-align: left; cursor: pointer;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.84);
      transition: border-color 120ms ease, background 120ms ease, transform 120ms ease, box-shadow 120ms ease;
    }
    #personal-chat-toggle[hidden], #admin-toggle[hidden] { display: none; }
    #personal-chat-toggle:hover { border-color: rgba(45,103,169,0.34); background: #edf6ff; transform: translateY(-1px); }
    #personal-chat-toggle.active, #personal-chat-toggle[aria-pressed="true"] {
      border-color: rgba(38,102,177,0.38); background: linear-gradient(135deg, #dceeff, #f3f8fd);
      color: #175b9e; box-shadow: 0 5px 14px rgba(43,103,174,0.1), inset 0 1px 0 #fff;
    }
    #personal-chat-toggle:focus-visible { outline: 2px solid #397aca; outline-offset: 1px; }
    .personal-chat-toggle-icon {
      width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 0.62rem;
      background: linear-gradient(145deg, #4e8ac8, #2f68a5); color: #fff;
      box-shadow: 0 4px 10px rgba(47,104,165,0.18), inset 0 0 0 1px rgba(255,255,255,0.18);
    }
    .personal-chat-toggle-icon svg { width: 1.16rem; height: 1.16rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
    #personal-chat-toggle > span:last-child { min-width: 0; }
    #personal-chat-toggle strong, #personal-chat-toggle small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #personal-chat-toggle strong { font-size: 0.76rem; font-weight: var(--weight-bold); }
    #personal-chat-toggle small { margin-top: 0.08rem; color: #718397; font-size: 0.64rem; }
    #admin-toggle {
      margin-top: 0.28rem; border-color: rgba(70,94,122,0.12);
      background: rgba(255,255,255,0.46); color: #35485f;
    }
    #admin-toggle:hover { border-color: rgba(45,103,169,0.25); background: rgba(241,247,253,0.9); transform: translateY(-1px); }
    #admin-toggle.active, #admin-toggle[aria-pressed="true"] { border-color: rgba(38,102,177,0.3); background: #eaf3fc; color: #175b9e; box-shadow: inset 0 1px 0 #fff; }
    #admin-toggle:focus-visible { outline: 2px solid #397aca; outline-offset: 1px; }
    .admin-toggle-icon {
      width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 0.62rem;
      background: rgba(67,105,147,0.1); color: #39688f;
    }
    .admin-toggle-icon svg { width: 1.16rem; height: 1.16rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
    #admin-toggle > span:last-child { min-width: 0; }
    #admin-toggle strong, #admin-toggle small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #admin-toggle strong { font-size: 0.76rem; font-weight: var(--weight-bold); }
    #admin-toggle small { margin-top: 0.08rem; color: #788697; font-size: 0.64rem; }
    .sidebar-section-title {
      display: flex; align-items: center; gap: 0.42rem; padding: 0.42rem 0.72rem 0.24rem;
      color: #7b8797; font-size: 0.64rem; font-weight: var(--weight-semibold); letter-spacing: 0.065em; text-transform: uppercase;
    }
    .sidebar-section-line { height: 1px; flex: 1 1 auto; background: rgba(72,93,119,0.09); }
    #sidebar-companies-toggle {
      width: 1.52rem; height: 1.52rem; display: grid; place-items: center; flex: 0 0 auto; padding: 0;
      border: 1px solid rgba(78,105,137,0.12); border-radius: 0.58rem;
      background: rgba(255,255,255,0.48); color: #6f7e90; cursor: pointer;
      transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
    }
    #sidebar-companies-toggle:hover {
      border-color: rgba(54,119,195,0.22); background: rgba(255,255,255,0.8); color: #2f70b7; transform: translateY(-1px);
    }
    #sidebar-companies-toggle:focus-visible { outline: 2px solid #397aca; outline-offset: 2px; }
    #sidebar-companies-toggle:disabled { opacity: 0.38; cursor: default; transform: none; }
    #sidebar-companies-toggle svg {
      width: 0.92rem; height: 0.92rem; fill: none; stroke: currentColor; stroke-width: 1.65;
      stroke-linecap: round; stroke-linejoin: round; transition: transform 160ms ease;
    }
    #sidebar-companies-toggle[aria-pressed="true"] svg { transform: rotate(180deg); }
    #project-list {
      min-height: 0; overflow-y: auto; padding: 0 0.45rem 0.58rem;
      scrollbar-color: rgba(81,107,139,0.2) transparent; scrollbar-width: thin;
    }
    #project-list::-webkit-scrollbar { width: 0.42rem; }
    #project-list::-webkit-scrollbar-thumb { border: 0.12rem solid transparent; border-radius: 999px; background: rgba(81,107,139,0.22); background-clip: padding-box; }
    .visually-hidden {
      position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important;
      padding: 0 !important; border: 0 !important; margin: -1px !important; clip: rect(0 0 0 0) !important;
      white-space: nowrap !important;
    }
    .project-company-group {
      padding: 0.12rem; border: 1px solid transparent; border-radius: 0.56rem;
      transition: border-color 140ms ease, background 140ms ease;
    }
    .project-company-group:not(.is-collapsed) {
      border-color: rgba(78,104,136,0.075);
      background: rgba(255,255,255,0.4);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.64);
    }
    .project-company-group.is-collapsed:hover { border-color: rgba(78,104,136,0.09); background: rgba(255,255,255,0.38); }
    .project-company-group + .project-company-group { margin-top: 0.24rem; }
    .project-lifecycle-group { margin-top: 0.48rem; border-top-color: rgba(78,104,136,0.09); }
    .project-lifecycle-group:not(.is-collapsed) { background: rgba(245,247,250,0.62); }
    .project-lifecycle-heading { color: #68778a; }
    .project-lifecycle-archived .project-lifecycle-heading { color: #7c8490; }
    .project-pinned-group {
      border-color: rgba(57,122,202,0.1); background: rgba(242,248,255,0.72);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.76);
    }
    .project-pinned-heading {
      min-width: 0; display: flex; align-items: center; gap: 0.4rem;
      padding: 0.38rem 0.44rem 0.3rem; color: #365d89; font-size: 0.72rem;
      font-weight: var(--weight-semibold); letter-spacing: -0.006em;
    }
    .project-pinned-heading svg {
      width: 0.78rem; height: 0.78rem; flex: 0 0 auto; fill: none; stroke: currentColor;
      stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round;
    }
    .project-navigation-divider {
      margin: 0.58rem 0.4rem 0.2rem; color: #7b8797; font-size: 0.62rem;
      font-weight: var(--weight-semibold); letter-spacing: 0.055em; text-transform: uppercase;
    }
    .project-company-header { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; }
    .project-company-header.has-management { grid-template-columns: minmax(0, 1fr) 1.72rem; }
    .project-company-heading {
      width: 100%; min-width: 0; overflow: hidden; display: grid; grid-template-columns: 0.8rem minmax(0, 1fr); gap: 0.42rem;
      align-items: center;
      padding: 0.38rem 0.44rem; border: 0; border-radius: 0.44rem; background: transparent; color: #425267;
      font-size: 0.75rem; font-weight: var(--weight-semibold); letter-spacing: -0.008em;
      text-align: left; text-overflow: ellipsis; text-transform: none; white-space: nowrap;
      cursor: pointer;
    }
    .project-company-heading:hover { background: rgba(69,105,149,0.06); color: #17263a; }
    .project-company-heading.is-static { display: block; cursor: default; }
    .project-company-heading.is-static:hover { color: #425267; }
    .project-company-heading:focus-visible, .project-company-manage:focus-visible { outline: 2px solid rgba(48,116,197,0.7); outline-offset: -2px; border-radius: 0.62rem; }
    .project-company-chevron { width: 0.8rem; height: 0.8rem; display: grid; place-items: center; color: #7b899a; transition: transform 140ms ease, color 140ms ease; }
    .project-company-heading:hover .project-company-chevron { color: #3677c3; }
    .project-company-chevron svg { width: 0.68rem; height: 0.68rem; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
    .project-company-heading[aria-expanded="true"] .project-company-chevron { transform: rotate(90deg); }
    .project-company-copy { min-width: 0; display: grid; gap: 0.08rem; }
    .project-company-title { min-width: 0; display: flex; align-items: center; gap: 0.34rem; }
    .project-company-title strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: var(--weight-semibold); }
    .project-company-unread { flex: 0 0 auto; margin-left: 0.08rem; }
    .project-company-responsible { min-width: 0; display: flex; align-items: center; gap: 0.24rem; overflow: hidden; color: #6d7a8b; font-size: 0.63rem; font-weight: var(--weight-medium); letter-spacing: -0.006em; line-height: 1.18; text-overflow: ellipsis; text-transform: none; }
    .project-company-responsible-crown { width: 0.78rem; height: 0.78rem; display: grid; place-items: center; flex: 0 0 auto; color: #e9b949; }
    .project-company-responsible-crown svg { width: 0.72rem; height: 0.72rem; fill: currentColor; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
    .project-company-responsible > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .project-company-manage { width: 1.64rem; height: 1.64rem; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 0.44rem; background: transparent; color: #748398; font-size: 0.7rem; font-weight: var(--weight-bold); letter-spacing: 0.08em; cursor: pointer; }
    .project-company-manage:hover { border-color: rgba(59,106,163,0.12); background: rgba(68,108,157,0.06); color: #2c6bb5; }
    .project-company-manage svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
    .project-company-projects, .project-tree { display: grid; }
    .project-company-projects[hidden] { display: none; }
    .project-company-empty, .sidebar-search-empty { padding: 0.48rem 0.52rem 0.62rem; color: #778396; font-size: 0.7rem; }
    .sidebar-search-empty { margin: 0.35rem 0.2rem; text-align: center; }
    .project-row {
      min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 1.72rem; align-items: center;
    }
    .project-item {
      position: relative;
      width: 100%; min-height: 1.88rem; display: grid; grid-template-columns: 1.34rem minmax(0, 1fr); gap: 0.46rem;
      align-items: center; margin: 0.02rem 0; padding: 0.14rem 0.42rem; border: 1px solid transparent;
      border-radius: 0.46rem; background: transparent; color: #26364a; text-align: left; cursor: pointer;
      transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
    }
    .project-item.has-unread { padding-right: 2.08rem; }
    .project-item:hover { background: rgba(58,104,159,0.055); color: #14263d; }
    .project-item.active {
      border-color: rgba(47,112,191,0.13); background: rgba(52,126,217,0.13); color: #153f70;
      box-shadow: inset 2px 0 0 #3984d8;
    }
    .project-item:disabled { cursor: default; }
    .project-item.project-inactive { color: #667487; }
    .project-item.project-inactive .project-badge { filter: saturate(0.58); opacity: 0.78; }
    .project-item.project-inactive:hover { background: rgba(91,105,123,0.055); color: #344255; }
    .project-item.project-child {
      width: calc(100% - (var(--project-depth) * 0.72rem));
      margin-left: calc(var(--project-depth) * 0.72rem);
    }
    .project-item.project-child::before {
      position: absolute; top: -0.9rem; bottom: -0.12rem; left: -0.38rem; width: 1px;
      background: rgba(76,103,136,0.18); content: "";
    }
    .project-item.project-child::after {
      position: absolute; top: 50%; left: -0.38rem; width: 0.34rem; height: 1px;
      background: rgba(76,103,136,0.24); content: "";
    }
    .project-item.project-child .project-badge { width: 1.22rem; height: 1.22rem; margin-left: 0.04rem; }
    .project-pin {
      width: 1.58rem; height: 1.58rem; display: grid; place-items: center; padding: 0;
      border: 1px solid transparent; border-radius: 0.42rem; background: transparent; color: #718197;
      opacity: 0; cursor: pointer; transition: opacity 120ms ease, color 120ms ease, background 120ms ease, border-color 120ms ease;
    }
    .project-row:hover .project-pin, .project-pin:focus-visible, .project-pin.is-pinned { opacity: 1; }
    .project-pin:hover, .project-pin:focus-visible { border-color: rgba(56,119,193,0.15); background: rgba(57,124,204,0.08); color: #286eb9; outline: none; }
    .project-pin.is-pinned { color: #2f73bd; }
    .project-pin:disabled { opacity: 0.42; cursor: wait; }
    .project-pin svg { width: 0.92rem; height: 0.92rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
    .project-pin.is-pinned svg { fill: rgba(57,124,204,0.16); }
    .project-badge {
      position: relative; width: 1.34rem; height: 1.34rem; display: grid; place-items: center; border: 1px solid rgba(255,255,255,0.09); border-radius: 0.38rem;
      background: linear-gradient(145deg, #3f83aa, #2d5f80); color: #fff; font-size: 0.62rem; font-weight: var(--weight-bold);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
    }
    .project-badge-label { display: block; }
    .project-row:nth-child(4n+2) .project-badge { background: linear-gradient(145deg, #9269a3, #714d80); }
    .project-row:nth-child(4n+3) .project-badge { background: linear-gradient(145deg, #4b9675, #347258); }
    .project-row:nth-child(4n+4) .project-badge { background: linear-gradient(145deg, #aa744d, #845537); }
    .project-copy { min-width: 0; display: flex; align-items: baseline; gap: 0.32rem; }
    .project-copy strong { min-width: 0; display: block; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.77rem; font-weight: var(--weight-medium); letter-spacing: -0.01em; }
    .project-copy span { display: block; margin-top: 0.18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--sidebar-muted); font-size: var(--type-label); }
    .project-copy .project-card-company { min-width: 0; flex: 0 1 auto; margin: 0; color: #607590; font-size: 0.62rem; }
    .project-copy .project-card-company[hidden] { display: none; }
    .project-unread-stack { position: absolute; z-index: 1; top: 50%; right: 0.42rem; display: flex; align-items: center; transform: translateY(-50%); }
    .project-unread {
      --unread-color: #3d7fc5;
      position: relative; min-width: 1.08rem; height: 1.08rem; display: inline-grid; place-items: center; padding: 0 0.22rem;
      border: 2px solid rgba(255,255,255,0.98); border-radius: 999px;
      background: var(--unread-color); color: #fff; font-size: 0.58rem; font-weight: var(--weight-bold); line-height: 1;
      box-shadow: 0 1px 3px rgba(31,52,76,0.24);
    }
    .project-unread.team { --unread-color: #36845c; }
    .project-unread.mention { --unread-color: #b66d17; }
    .project-unread.overflow { min-width: 0.42rem; width: 0.42rem; height: 0.42rem; padding: 0; }
    #user-panel { position: relative; min-width: 0; padding: 0.38rem 0.48rem; border-top: 1px solid var(--sidebar-line); }
    #user-menu-toggle {
      width: 100%; min-width: 0; min-height: 2.45rem; display: grid; grid-template-columns: 1.72rem minmax(0, 1fr) 0.8rem;
      gap: 0.46rem; align-items: center; padding: 0.32rem; border: 1px solid transparent; border-radius: 0.52rem;
      background: transparent; color: #26364a; text-align: left; cursor: pointer;
    }
    #user-menu-toggle:hover, #user-menu-toggle[aria-expanded="true"] { border-color: rgba(67,101,142,0.1); background: rgba(255,255,255,0.54); }
    #user-menu-toggle:focus-visible { outline: 2px solid #397aca; outline-offset: 1px; }
    #user-avatar { width: 1.72rem; height: 1.72rem; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #dce8f5, #cbdbea); color: #2f608f; font-size: 0.64rem; font-weight: var(--weight-bold); box-shadow: inset 0 0 0 1px rgba(70,104,143,0.1); }
    #user-copy { min-width: 0; }
    #user-name, #user-login { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #user-name { font-size: 0.73rem; font-weight: var(--weight-semibold); }
    #user-login { margin-top: 0.04rem; color: var(--sidebar-muted); font-size: 0.64rem; }
    .user-menu-chevron { width: 0.46rem; height: 0.46rem; justify-self: center; border-top: 1.5px solid #8794a6; border-left: 1.5px solid #8794a6; transform: rotate(45deg); transition: transform 140ms ease; }
    #user-menu-toggle[aria-expanded="true"] .user-menu-chevron { transform: rotate(225deg); }
    #user-menu {
      position: absolute; z-index: 8; right: 0.65rem; bottom: calc(100% + 0.4rem); left: 0.65rem;
      display: grid; gap: 0.12rem; padding: 0.3rem; border: 1px solid rgba(73,96,125,0.14); border-radius: 0.78rem;
      background: rgba(252,253,254,0.97); box-shadow: 0 16px 38px rgba(34,52,75,0.16);
    }
    #user-menu[hidden] { display: none; }
    #user-menu > button {
      width: 100%; min-height: 2.35rem; padding: 0.46rem 0.58rem; border: 0; border-radius: 5px;
      background: transparent; color: #34455a; font-size: var(--type-label); font-weight: var(--weight-semibold); text-align: left; cursor: pointer;
    }
    #user-menu > button:hover { background: rgba(61,108,166,0.07); }
    #owner-activity-toggle.active, #memory-toggle.active { background: rgba(53,112,184,0.1); color: #235f9f; }
    #user-menu > button:disabled { opacity: 0.45; cursor: default; }
    #logout { color: #a54137; }
    #sidebar-resizer {
      position: absolute; z-index: 9; top: 0; right: -0.22rem; width: 0.44rem; height: 100%;
      padding: 0; border: 0; background: transparent; cursor: col-resize; touch-action: none;
    }
    #sidebar-resizer::after { content: ''; position: absolute; inset: 0 auto 0 0.16rem; width: 1px; background: transparent; transition: background 120ms ease; }
    #sidebar-resizer:hover::after, #sidebar-resizer:focus-visible::after, body.sidebar-resizing #sidebar-resizer::after { background: #6ea6ed; }
    #sidebar-resizer:focus-visible { outline: none; }
    body.sidebar-resizing { cursor: col-resize; user-select: none; }

    #app.sidebar-collapsed { grid-template-columns: 4.25rem minmax(0, 1fr); }
    #app.sidebar-collapsed .sidebar-brand { padding: 0.85rem 0.55rem; }
    #app.sidebar-collapsed .sidebar-brand-row { grid-template-columns: minmax(0, 1fr); justify-items: center; }
    #app.sidebar-collapsed .sidebar-brand-copy,
    #app.sidebar-collapsed .sidebar-search,
    #app.sidebar-collapsed .sidebar-section-title,
    #app.sidebar-collapsed .project-company-header,
    #app.sidebar-collapsed .project-company-heading,
    #app.sidebar-collapsed .project-pinned-heading,
    #app.sidebar-collapsed .project-navigation-divider,
    #app.sidebar-collapsed .project-company-empty,
    #app.sidebar-collapsed .sidebar-search-empty,
    #app.sidebar-collapsed .project-copy,
    #app.sidebar-collapsed #user-copy,
    #app.sidebar-collapsed .user-menu-chevron,
    #app.sidebar-collapsed #user-menu,
    #app.sidebar-collapsed #sidebar-resizer { display: none; }
    #app.sidebar-collapsed #addressed-messages {
      width: 2.12rem; min-height: 2.12rem; grid-template-columns: minmax(0, 1fr); place-items: center;
      gap: 0; margin: 0.36rem 0 0; padding: 0.28rem;
    }
    #app.sidebar-collapsed .addressed-messages-icon { width: 1.5rem; height: 1.5rem; font-size: 0.72rem; }
    #app.sidebar-collapsed .addressed-messages-label { display: none; }
    #app.sidebar-collapsed #addressed-messages-count {
      position: absolute; margin: -1.45rem 0 0 1.28rem; min-width: 1rem; padding: 0.08rem 0.24rem;
      border: 2px solid rgba(255,255,255,0.98); background: #b66d17; color: #fff;
    }
    #app.sidebar-collapsed #personal-chat-toggle {
      width: 3.05rem; min-height: 3.05rem; grid-template-columns: minmax(0, 1fr); place-items: center;
      gap: 0; margin: 0.45rem 0.6rem 0.1rem; padding: 0.38rem;
    }
    #app.sidebar-collapsed #personal-chat-toggle > span:last-child { display: none; }
    #app.sidebar-collapsed #admin-toggle {
      width: 3.05rem; min-height: 3.05rem; grid-template-columns: minmax(0, 1fr); place-items: center;
      gap: 0; margin: 0.32rem 0.6rem 0.1rem; padding: 0.38rem;
    }
    #app.sidebar-collapsed #admin-toggle > span:last-child { display: none; }
    #app.sidebar-collapsed #project-list { padding: 0.55rem 0.45rem 0.75rem; }
    #app.sidebar-collapsed .project-company-group + .project-company-group { margin-top: 0; }
    #app.sidebar-collapsed .project-company-group { padding: 0; border: 0; background: transparent; }
    #app.sidebar-collapsed .project-company-group.is-empty { display: none; }
    #app.sidebar-collapsed .project-company-projects { gap: 0.12rem; }
    #app.sidebar-collapsed .project-row { display: block; }
    #app.sidebar-collapsed .project-pin { display: none; }
    #app.sidebar-collapsed .project-item { min-height: 3.05rem; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 0.48rem; }
    #app.sidebar-collapsed .project-item.project-child { width: 100%; margin-left: 0; }
    #app.sidebar-collapsed .project-item.project-child::before,
    #app.sidebar-collapsed .project-item.project-child::after { display: none; }
    #app.sidebar-collapsed .project-item.project-child .project-badge { width: 2rem; height: 2rem; margin-left: 0; }
    #app.sidebar-collapsed .project-badge { width: 2rem; height: 2rem; }
    #app.sidebar-collapsed .project-item.has-unread { padding-right: 0.48rem; }
    #app.sidebar-collapsed .project-unread-stack { top: 0.34rem; right: 0.34rem; transform: none; }
    #app.sidebar-collapsed .project-unread { min-width: 1.08rem; height: 1.08rem; }
    #app.sidebar-collapsed #user-panel { padding: 0.55rem 0.45rem; }
    #app.sidebar-collapsed #user-menu-toggle { min-height: 2.75rem; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 0.35rem; }

    @media (min-width: 901px) {
      .sidebar-brand {
        height: calc(var(--workspace-header-height) - var(--sidebar-frame-gap) - 1px);
        display: flex;
        align-items: center;
        padding-top: 0;
        padding-bottom: 0;
      }
      #app.sidebar-collapsed .sidebar-brand { padding-top: 0; padding-bottom: 0; }
    }

    #workspace { position: relative; min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; background: var(--canvas); }
    #workspace-progress {
      position: absolute; z-index: 12; top: 0; right: 0; left: 0;
      height: 2px; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity 100ms ease;
    }
    #workspace-progress::after {
      content: ''; display: block; width: 32%; height: 100%; background: var(--blue);
      transform: translateX(-110%); animation: workspace-progress 920ms ease-in-out infinite;
    }
    #app.navigation-pending #workspace-progress { opacity: 1; }
    @keyframes workspace-progress { from { transform: translateX(-110%); } to { transform: translateX(420%); } }
    #workspace-header {
      position: relative; z-index: 9;
      min-width: 0; min-height: var(--workspace-header-height); display: grid; grid-template-columns: minmax(0, 1fr) auto;
      align-items: center; gap: 0.55rem;
      padding: calc(0.72rem + var(--safe-top)) calc(1.15rem + var(--safe-right)) 0.72rem calc(1.15rem + var(--safe-left));
      background: var(--surface); border-bottom: 1px solid var(--line);
    }
    #workspace.project-chat-active #workspace-header { display: none; }
    #workspace-bar { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; }
    #sidebar-toggle { display: none; }
    #project-header-identity { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.62rem; }
    #project-header-icon {
      position: relative; width: 2.35rem; height: 2.35rem; display: grid; place-items: center; padding: 0; border: 2px solid transparent; border-radius: 7px;
      background: #346f96; color: #fff; font-size: var(--type-small); font-weight: var(--weight-bold); cursor: pointer;
      transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
    }
    #project-header-icon:hover:not(:disabled), #project-header-icon:focus-visible:not(:disabled) {
      border-color: #d7eafa; background: #2e6488; box-shadow: 0 0 0 3px rgba(52,111,150,0.18); transform: translateY(-1px); outline: none;
    }
    #project-header-icon:disabled { cursor: default; }
    #project-meta { min-width: 0; }
    #project-title-row { min-width: 0; display: flex; align-items: center; gap: 0.5rem; }
    #project-title { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--type-title); font-weight: var(--weight-bold); }
    #project-primary-result {
      min-width: 0;
      min-height: 2rem;
      flex: 0 0 auto;
      display: inline-flex;
      align-items: center;
      gap: 0.36rem;
      padding: 0.19rem 0.42rem 0.19rem 0.2rem;
      border: 1px solid rgba(28, 48, 70, 0.12);
      border-radius: 0.68rem;
      background: rgba(255, 255, 255, 0.82);
      color: #32475a;
      font-size: var(--type-caption);
      font-weight: var(--weight-bold);
      line-height: 1;
      text-decoration: none;
      white-space: nowrap;
      box-shadow: 0 2px 7px rgba(28, 48, 70, 0.07), inset 0 1px rgba(255, 255, 255, 0.9);
      backdrop-filter: blur(10px);
      transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
    }
    #project-primary-result[hidden] { display: none; }
    #project-primary-result .project-primary-result-icon {
      position: relative;
      width: 1.56rem;
      height: 1.56rem;
      flex: 0 0 auto;
      display: grid;
      place-items: center;
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.64);
      border-radius: 0.49rem;
      background:
        radial-gradient(circle at 70% 22%, rgba(126, 235, 219, 0.92), transparent 30%),
        linear-gradient(145deg, #293f78 4%, #3c78a2 52%, #3a907f 100%);
      color: #fff;
      box-shadow: 0 3px 8px rgba(35, 70, 101, 0.22), inset 0 1px rgba(255, 255, 255, 0.25);
    }
    #project-primary-result .project-primary-result-icon svg {
      position: relative;
      z-index: 1;
      width: 0.96rem;
      height: 0.96rem;
      flex: 0 0 auto;
      fill: none;
      stroke: currentColor;
      stroke-linecap: round;
      stroke-linejoin: round;
      stroke-width: 1.7;
    }
    #project-primary-result .project-primary-result-arrow {
      width: 0.68rem;
      height: 0.68rem;
      flex: 0 0 auto;
      fill: none;
      stroke: currentColor;
      stroke-linecap: round;
      stroke-linejoin: round;
      stroke-width: 1.8;
      opacity: 0.44;
      transition: opacity 140ms ease, transform 140ms ease;
    }
    #project-primary-result:hover,
    #project-primary-result:focus-visible {
      border-color: rgba(43, 85, 112, 0.27);
      background: #fff;
      box-shadow: 0 6px 16px rgba(31, 61, 88, 0.13), inset 0 1px rgba(255, 255, 255, 0.96);
      color: #20394d;
      outline: none;
      transform: translateY(-1px);
    }
    #project-primary-result:hover .project-primary-result-arrow,
    #project-primary-result:focus-visible .project-primary-result-arrow {
      opacity: 0.9;
      transform: translate(1px, -1px);
    }
    #project-overview-actions { flex: 0 0 auto; }
    #project-overview-actions:empty { display: none; }
    #project-description-wrap { min-width: 0; }
    #project-description {
      display: -webkit-box; margin-top: 0.22rem; overflow: hidden; color: var(--muted); font-size: var(--type-small);
      text-overflow: ellipsis; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 1;
    }
    #project-description.is-expanded { display: block; overflow: visible; text-overflow: clip; -webkit-line-clamp: unset; }
    #project-description-toggle {
      flex: 0 0 auto;
      margin-bottom: 0.02rem;
      padding: 0.14rem 0;
      border: 0;
      background: transparent;
      color: #b9cbe0;
      font: inherit;
      font-size: 0.74rem;
      font-weight: var(--weight-semibold);
      cursor: pointer;
    }
    #project-description-toggle:hover,
    #project-description-toggle:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 0.18rem; }
    #model-control {
      width: 100%; min-width: 0; display: grid; gap: 0.72rem;
      padding: 1rem 0; border-bottom: 1px solid #e4e9ef;
    }
    #model-control[hidden] { display: none; }
    .project-model-heading { display: grid; gap: 0.18rem; }
    .project-model-heading strong { color: #24364a; font-size: var(--type-title); }
    .project-model-heading span { color: #6b7a8d; font-size: var(--type-small); line-height: 1.42; }
    #model-control label { color: #526276; font-size: var(--type-label); font-weight: var(--weight-semibold); }
    #model-select {
      width: 100%; min-width: 0; min-height: 2.55rem; padding: 0.48rem 2rem 0.48rem 0.58rem;
      border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #334155;
      font-size: var(--type-small); font-weight: var(--weight-semibold); outline: none; cursor: pointer;
    }
    #model-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,224,0.1); }
    #model-select:disabled { opacity: 0.52; cursor: default; }
    #project-navigation { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 0.55rem; }
    #project-subviews { min-width: 0; }
    .project-subview-group { display: flex; align-items: center; justify-content: flex-end; }
    #chat-subviews { justify-content: center; gap: 0.4rem; }
    #chat-mode-switch { display: inline-flex; align-items: center; gap: 0.08rem; padding: 0; border: 0; border-radius: 1rem; background: transparent; }
    .project-subview-tab { min-height: 1.7rem; padding: 0.2rem 0.48rem; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #68768a; font-size: var(--type-label); font-weight: var(--weight-semibold); cursor: pointer; }
    #agent-passport-toggle { min-height: 1.73rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem; padding: 0.15rem 0.58rem; border: 1px solid #ccd6e2; border-radius: 0.78rem; background: transparent; color: #68768a; font: inherit; font-size: var(--type-label); font-weight: var(--weight-semibold); cursor: pointer; }
    .chat-mode-icon { width: 0.9rem; height: 0.9rem; display: inline-grid; place-items: center; flex: 0 0 auto; }
    .chat-mode-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .chat-mode-label { line-height: 1; }
    #agent-passport-toggle:hover { border-color: #b6c4d3; background: #edf1f5; color: #3f5872; }
    #agent-passport-toggle[aria-expanded="true"] { border-color: #8fb3da; background: transparent; color: var(--blue); box-shadow: none; }
    #passport-subviews {
      position: absolute; top: 100%; right: 0; left: 0;
      min-height: 3.15rem; justify-content: center; padding: 0.34rem max(1.15rem, var(--safe-right)) 0.3rem max(1.15rem, var(--safe-left));
      overflow-x: auto; border-bottom: 1px solid var(--line); background: var(--surface);
      scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    #passport-subviews::-webkit-scrollbar { display: none; }
    .project-subview-tab:hover { color: #27364a; }
    .project-subview-tab.active { border-bottom-color: var(--blue); color: var(--blue); }
    .project-subview-tab:disabled { opacity: 0.48; cursor: default; }
    #project-inspector { min-height: 0; grid-row: 2; overflow-y: auto; overscroll-behavior: contain; padding: 0.82rem 1.15rem; background: #fbfcfd; font-size: var(--type-body); line-height: var(--leading-body); -webkit-overflow-scrolling: touch; }
    #owner-activity-panel {
      width: min(100%, 58rem); min-height: 100%; margin: 0 auto; display: grid; align-content: start; gap: 0.9rem;
      padding: clamp(0.4rem, 1.5vw, 1.1rem) 0 clamp(2rem, 5vw, 4rem);
    }
    #owner-activity-panel[hidden] { display: none; }
    .owner-activity-header {
      display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
      padding-bottom: 0.95rem; border-bottom: 1px solid var(--line);
    }
    .owner-activity-header h2 { margin: 0; color: var(--text); font-size: var(--type-heading); line-height: var(--leading-compact); }
    .owner-activity-header p { margin: 0.25rem 0 0; color: var(--muted); font-size: var(--type-small); }
    #owner-activity-refresh {
      min-height: 2.35rem; padding: 0.42rem 0.78rem; border: 1px solid #c7d4e2; border-radius: 0.7rem;
      background: #fff; color: #315d8e; font: inherit; font-size: var(--type-label); font-weight: var(--weight-semibold); cursor: pointer;
    }
    #owner-activity-refresh:hover { border-color: #8eafd2; background: #f5f9fd; }
    #owner-activity-refresh:focus-visible { outline: 2px solid #397aca; outline-offset: 2px; }
    #owner-activity-refresh:disabled { opacity: 0.55; cursor: default; }
    #owner-activity-status { min-height: 1.25rem; color: var(--muted); font-size: var(--type-caption); }
    #owner-activity-list { display: grid; gap: 0.5rem; }
    .owner-activity-item {
      width: 100%; display: grid; grid-template-columns: 2.35rem minmax(0, 1fr); gap: 0.8rem; align-items: start;
      padding: 0.85rem; border: 1px solid transparent; border-radius: 0.9rem; background: transparent;
      color: var(--text); font: inherit; text-align: left; cursor: pointer;
    }
    .owner-activity-item:hover { border-color: #d5e0ec; background: #fff; box-shadow: 0 6px 18px rgba(33,52,76,0.06); }
    .owner-activity-item:focus-visible { outline: 2px solid #397aca; outline-offset: 2px; }
    .owner-activity-item:disabled { cursor: default; opacity: 0.72; }
    .owner-activity-avatar {
      width: 2.35rem; height: 2.35rem; display: grid; place-items: center; border: 1px solid var(--team-author-color);
      border-radius: 0.72rem; background: var(--team-author-soft); color: var(--team-author-color);
      font-size: var(--type-label); font-weight: var(--weight-bold);
    }
    .owner-activity-content { min-width: 0; display: grid; gap: 0.26rem; }
    .owner-activity-meta { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 0.8rem; }
    .owner-activity-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--type-small); }
    .owner-activity-meta time { flex: 0 0 auto; color: var(--muted); font-size: var(--type-caption); }
    .owner-activity-body {
      display: -webkit-box; overflow: hidden; color: #344255; font-size: var(--type-body); line-height: 1.48;
      overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
    }
    .owner-activity-project {
      width: max-content; max-width: 100%; overflow: hidden; padding: 0.16rem 0.48rem; border-radius: 999px;
      background: #edf3f9; color: #46647f; font-size: var(--type-caption); font-weight: var(--weight-semibold);
      text-overflow: ellipsis; white-space: nowrap;
    }
    .owner-activity-empty {
      min-height: 16rem; display: grid; place-content: center; justify-items: center; gap: 0.35rem;
      color: var(--muted); text-align: center;
    }
    .owner-activity-empty strong { color: var(--text); font-size: var(--type-title); }
    .owner-activity-empty span { max-width: 28rem; font-size: var(--type-small); line-height: 1.5; }
    #personal-chat-panel {
      min-height: 0; grid-row: 2 / 4; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
      overflow: hidden; background: #f7f8fa;
    }
    #personal-chat-panel[hidden] { display: none; }
    #personal-chat-context-bar {
      position: relative; z-index: 2; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
      padding: 0.65rem max(1rem, calc((100% - 48rem) / 2)); border-bottom: 1px solid #e2e8ef;
      background: rgba(251,252,253,0.92); backdrop-filter: blur(14px);
    }
    #personal-chat-context-bar > div:first-child { min-width: 0; }
    #personal-chat-context-bar strong, #personal-chat-context-bar span { display: block; }
    #personal-chat-context-bar > div:first-child strong { color: #29384a; font-size: var(--type-small); }
    #personal-chat-context-bar > div:first-child span { margin-top: 0.1rem; color: var(--muted); font-size: var(--type-caption); }
    #personal-chat-context-picker { position: relative; flex: 0 0 auto; }
    #personal-chat-context-picker summary {
      display: flex; align-items: center; gap: 0.45rem; min-height: 2rem; padding: 0.34rem 0.58rem;
      border: 1px solid #cfdae5; border-radius: 999px; background: #fff; color: #42566d;
      font-size: var(--type-caption); cursor: pointer; list-style: none;
    }
    #personal-chat-context-picker summary::-webkit-details-marker { display: none; }
    #personal-chat-context-picker summary strong { color: #2466a8; }
    #personal-chat-context-options {
      position: absolute; top: calc(100% + 0.42rem); right: 0; width: min(22rem, calc(100vw - 2rem)); max-height: min(22rem, 58vh);
      display: grid; gap: 0.2rem; overflow-y: auto; padding: 0.45rem; border: 1px solid #cfd9e4; border-radius: 0.75rem;
      background: #fff; box-shadow: 0 14px 34px rgba(28,43,61,0.16);
    }
    .personal-chat-context-option { display: grid; grid-template-columns: 1rem minmax(0, 1fr); gap: 0.48rem; align-items: center; padding: 0.42rem 0.48rem; border-radius: 0.48rem; color: #33465b; font-size: var(--type-small); cursor: pointer; }
    .personal-chat-context-option:hover { background: #f1f6fb; }
    .personal-chat-context-option input { margin: 0; accent-color: var(--blue); }
    .personal-chat-context-option input:disabled + span { opacity: 0.48; }
    .personal-chat-context-empty { padding: 0.5rem; color: var(--muted); font-size: var(--type-small); }
    #personal-chat-messages {
      width: 100%; min-height: 0; overflow-y: auto; padding: clamp(1rem, 3vw, 2.4rem) max(1rem, calc((100% - 48rem) / 2));
      overscroll-behavior: contain; scrollbar-gutter: stable; -webkit-overflow-scrolling: touch;
    }
    .personal-chat-empty {
      min-height: 100%; display: grid; place-content: center; justify-items: center; gap: 0.42rem;
      color: var(--muted); text-align: center;
    }
    .personal-chat-empty strong { color: var(--text); font-size: var(--type-title); }
    .personal-chat-empty span { max-width: 30rem; font-size: var(--type-small); line-height: 1.55; }
    .personal-chat-loading {
      min-height: 100%; display: grid; place-content: center; justify-items: center; gap: 0.7rem;
      color: var(--muted); font-size: var(--type-small); text-align: center;
    }
    .personal-chat-loading::before {
      width: 1.5rem; height: 1.5rem; border: 2px solid #d4dde6; border-top-color: var(--blue);
      border-radius: 50%; content: ""; animation: spin 800ms linear infinite;
    }
    .personal-chat-message { width: min(100%, 42rem); margin: 0 auto 1.25rem; }
    .personal-chat-message.user { display: flex; justify-content: flex-end; }
    .personal-chat-message-body {
      max-width: 88%; padding: 0.72rem 0.86rem; border: 1px solid #d7e0e9; border-radius: 16px;
      background: #fff; color: var(--text); font-size: var(--type-body); line-height: 1.55; white-space: pre-wrap;
    }
    .personal-chat-message.user .personal-chat-message-body { border-color: #c6ddd1; border-radius: 16px 16px 5px 16px; background: #edf7f1; }
    .personal-chat-message.assistant .personal-chat-message-body { max-width: 100%; padding-right: 0; padding-left: 0; border: 0; background: transparent; }
    .personal-chat-message-meta { margin-top: 0.28rem; color: var(--muted); font-size: var(--type-caption); }
    .personal-chat-context-receipt { display: flex; flex-wrap: wrap; gap: 0.28rem; margin-top: 0.38rem; }
    .personal-chat-context-receipt span { padding: 0.16rem 0.42rem; border: 1px solid #d5e1ed; border-radius: 999px; background: #f2f7fc; color: #526c86; font-size: var(--type-caption); }
    .personal-chat-message.user .personal-chat-message-meta { display: none; }
    .personal-chat-message.pending .personal-chat-message-body { color: var(--muted); }
    .personal-chat-message.failed .personal-chat-message-body,
    .personal-chat-message.interrupted .personal-chat-message-body { color: #8a4d46; }
    #personal-chat-dock {
      display: grid; justify-items: center; padding: 0.35rem 0 calc(0.55rem + var(--safe-bottom));
      background: linear-gradient(to bottom, rgba(247,248,250,0), #f7f8fa 24%);
    }
    #personal-chat-form {
      width: min(calc(100% - 2rem), 48rem); min-height: 3.7rem; display: grid;
      grid-template-columns: minmax(0, 1fr) auto auto; align-items: end; gap: 0.2rem; margin: 0 auto; padding: 0.42rem;
      border: 1px solid rgba(193,202,212,0.92); border-radius: 21px; background: rgba(255,255,255,0.96);
      box-shadow: 0 12px 34px rgba(25,38,54,0.11), 0 2px 6px rgba(25,38,54,0.05);
      backdrop-filter: blur(18px); transition: border-color 120ms ease, box-shadow 120ms ease;
    }
    #personal-chat-form:focus-within { border-color: #8aaed7; box-shadow: 0 0 0 3px rgba(35,99,166,0.09), 0 14px 38px rgba(24,36,52,0.13); }
    #personal-chat-input {
      width: 100%; min-height: 2.75rem; max-height: 9rem; resize: none; overflow-y: auto;
      padding: 0.7rem 0.55rem; border: 0; background: transparent; color: var(--text);
      font: inherit; font-size: 16px; line-height: 1.45; outline: none;
    }
    #personal-chat-voice,
    #personal-chat-send {
      width: 2.8rem; height: 2.8rem; display: grid; place-items: center; border: 0; border-radius: 50%;
      cursor: pointer;
    }
    #personal-chat-voice { background: transparent; color: #647386; }
    #personal-chat-voice:hover { background: #edf3f8; color: var(--blue); }
    #personal-chat-voice.recording { background: #fff1f0; color: #b42318; }
    #personal-chat-send { background: var(--blue); color: #fff; box-shadow: 0 3px 9px rgba(29,95,159,0.22); }
    #personal-chat-send:hover { background: #194f89; }
    #personal-chat-voice svg,
    #personal-chat-send svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    #personal-chat-voice:disabled,
    #personal-chat-send:disabled { opacity: 0.45; cursor: default; }
    #personal-chat-status {
      min-height: 1.7rem; max-width: min(calc(100% - 2rem), 44rem); margin: 0 auto 0.28rem; padding: 0.3rem 0.68rem;
      border: 1px solid #d6e0e9; border-radius: 999px; background: rgba(255,255,255,0.88);
      color: #526579; font-size: var(--type-caption); text-align: center; box-shadow: 0 5px 16px rgba(25,38,54,0.05);
    }
    #personal-chat-status:empty { display: none; }
    #personal-chat-status.error { border-color: #e3c5c0; background: #fff7f5; color: #9a433b; }
    #project-inspector.with-project-tabs { padding-top: calc(3.15rem + 0.82rem); }
    #agent-passport-details, #project-activity-panel, #project-capabilities-panel { width: min(100%, 72rem); margin: 0 auto; display: grid; gap: 1.1rem; }
    .passport-section { min-width: 0; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
    .passport-section:last-child { border-bottom: 0; }
    .passport-columns { min-width: 0; display: grid; grid-template-columns: minmax(15rem, 20rem) minmax(0, 1fr); gap: 2rem; }
    .passport-columns > .passport-section { padding-bottom: 0; border-bottom: 0; }
    .agent-detail-group { min-width: 0; display: grid; align-content: start; gap: 0.45rem; }
    .agent-detail-title { color: var(--muted); font-size: var(--type-label); font-weight: var(--weight-bold); text-transform: uppercase; }
    .agent-detail-list { display: grid; border-top: 1px solid var(--line); }
    .project-context-heading { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.55rem; }
    .project-context-value { max-width: 62rem; color: #2e3948; font-size: var(--type-body); line-height: 1.58; overflow-wrap: anywhere; }
    .project-context-value p { margin: 0 0 0.55rem; }
    .project-context-value p:last-child { margin-bottom: 0; }
    .project-context-value h1, .project-context-value h2, .project-context-value h3 { margin: 0.75rem 0 0.35rem; font-size: var(--type-title); line-height: var(--leading-compact); }
    .project-context-value ul, .project-context-value ol { margin: 0.35rem 0 0; padding-left: 1.25rem; }
    .project-context-value li { margin: 0.2rem 0; }
    .project-context-editor { display: grid; gap: 0.55rem; }
    .project-context-editor textarea { width: 100%; min-height: 13rem; resize: vertical; padding: 0.65rem; border: 1px solid #c7d2df; border-radius: 5px; background: #fff; color: #273244; font: var(--type-small)/var(--leading-body) var(--font-mono); outline: none; }
    .project-context-editor textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,224,0.1); }
    .project-context-actions { display: flex; justify-content: flex-end; gap: 0.45rem; }
    .project-context-edit, .project-context-save, .project-context-cancel { min-height: 2rem; padding: 0.35rem 0.6rem; border: 1px solid #c7d2df; border-radius: 5px; background: #fff; color: #405169; font-size: var(--type-small); font-weight: var(--weight-semibold); cursor: pointer; }
    .project-context-edit:hover, .project-context-cancel:hover { background: #f1f5f9; }
    .project-context-save { border-color: var(--blue); background: var(--blue); color: #fff; }
    .project-context-edit:disabled, .project-context-save:disabled, .project-context-cancel:disabled { opacity: 0.5; cursor: default; }
    .project-context-error { color: var(--danger); font-size: var(--type-label); }
    .project-company-overview { min-width: 0; display: flex; align-items: center; gap: 0.48rem; }
    .project-company-summary { min-width: 0; min-height: 3rem; flex: 1 1 auto; display: grid; grid-template-columns: 2.15rem minmax(0, 1fr) auto; gap: 0.58rem; align-items: center; padding: 0.42rem 0.58rem 0.42rem 0.46rem; border: 1px solid #dbe4ed; border-radius: 0.72rem; background: #f8fafc; color: #263547; font: inherit; text-align: left; }
    button.project-company-summary { cursor: pointer; transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease; }
    button.project-company-summary:hover, button.project-company-summary:focus-visible { border-color: #9db8d3; background: #f2f7fc; box-shadow: 0 0 0 3px rgba(41, 112, 184, 0.08); outline: none; }
    .project-company-overview.is-empty .project-company-summary { border-style: dashed; background: #fafbfd; }
    .project-company-overview-icon { width: 2.15rem; height: 2.15rem; display: grid; place-items: center; border-radius: 0.58rem; background: #dbeafa; color: #245b8b; font-size: var(--type-small); font-weight: var(--weight-bold); line-height: 1; }
    .project-company-overview.is-empty .project-company-overview-icon { background: #edf1f5; color: #79879a; }
    .project-company-overview-copy { min-width: 0; }
    .project-company-overview-copy strong, .project-company-overview-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .project-company-overview-copy strong { color: #243144; font-size: var(--type-body); font-weight: var(--weight-semibold); line-height: var(--leading-compact); }
    .project-company-overview-copy span { margin-bottom: 0.08rem; color: var(--muted); font-size: var(--type-label); line-height: var(--leading-body); }
    .project-company-arrow { color: #71859a; font-size: 0.82rem; }
    .project-company-overview-actions { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 0.42rem; }
    .project-company-open, .project-company-change, .project-company-attach { min-height: 2rem; padding: 0.34rem 0.58rem; border: 1px solid #bdcad8; border-radius: 5px; background: #fff; color: #405169; font-size: var(--type-small); font-weight: var(--weight-semibold); cursor: pointer; }
    .project-company-change, .project-company-attach { border-color: var(--blue); color: var(--blue); }
    .project-company-attach { background: var(--blue); color: #fff; }
    .project-company-open:hover, .project-company-change:hover { background: #edf4fb; }
    .project-company-attach:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
    .project-document-index { display: grid; gap: 0.75rem; }
    .project-document-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-block: 1px solid var(--line); }
    .project-document-link { min-width: 0; min-height: 3.5rem; padding: 0.65rem 0.75rem; border: 0; border-right: 1px solid var(--line); background: transparent; color: #273244; text-align: left; cursor: pointer; }
    .project-document-link:last-child { border-right: 0; }
    .project-document-link:hover { background: #f4f7fb; }
    .project-document-link strong { display: block; overflow: hidden; color: #202b3a; font-size: var(--type-small); line-height: var(--leading-compact); text-overflow: ellipsis; white-space: nowrap; }
    .project-document-link span { display: block; margin-top: 0.2rem; color: var(--muted); font-size: var(--type-label); line-height: var(--leading-body); }
    .project-participants-section { display: grid; gap: 0.65rem; }
    .project-participants-heading { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 0.8rem; }
    .project-participants-heading-copy { min-width: 0; }
    .project-participants-caption { margin-top: 0.18rem; color: var(--muted); font-size: var(--type-label); line-height: var(--leading-body); }
    .project-participant-actions { display: flex; align-items: center; gap: 0.42rem; flex-wrap: wrap; justify-content: flex-end; }
    .project-access-menu { position: relative; }
    .project-access-trigger { min-height: 2rem; display: flex; align-items: center; gap: 0.4rem; padding: 0.34rem 0.58rem; border: 1px solid var(--blue); border-radius: 5px; background: var(--blue); color: #fff; font-size: var(--type-small); font-weight: var(--weight-semibold); cursor: pointer; list-style: none; user-select: none; }
    .project-access-trigger::-webkit-details-marker { display: none; }
    .project-access-trigger:hover, .project-access-trigger:focus-visible { border-color: var(--blue-dark); background: var(--blue-dark); outline: none; }
    .project-access-trigger:focus-visible { box-shadow: 0 0 0 3px rgba(23,105,224,0.18); }
    .project-access-chevron { font-size: 0.9rem; line-height: 1; transition: transform 120ms ease; }
    .project-access-menu[open] .project-access-chevron { transform: rotate(180deg); }
    .project-access-options { position: absolute; z-index: 40; top: calc(100% + 0.38rem); right: 0; width: min(19rem, calc(100vw - 2rem)); overflow: hidden; padding: 0.28rem; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; box-shadow: 0 16px 38px rgba(24,36,52,0.18); }
    .project-access-option { width: 100%; display: grid; gap: 0.12rem; padding: 0.62rem 0.68rem; border: 0; border-radius: 5px; background: transparent; color: #263244; text-align: left; cursor: pointer; }
    .project-access-option:hover, .project-access-option:focus-visible { background: #eef5fc; outline: none; }
    .project-access-option strong, .project-access-option span { display: block; }
    .project-access-option strong { font-size: var(--type-small); }
    .project-access-option span { color: var(--muted); font-size: var(--type-caption); line-height: 1.4; }
    .project-participant-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.65rem 1.4rem; }
    .project-participant { min-width: 0; display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: 0.6rem; align-items: center; padding: 0.52rem 0.58rem; border: 1px solid #e2e8f0; border-radius: 6px; background: #fbfcfe; }
    .project-participant.is-profile-link { cursor: pointer; transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease, transform 120ms ease; }
    .project-participant.is-profile-link:hover { border-color: #9ebee0; background: #f5f9fe; box-shadow: 0 4px 14px rgba(31, 82, 128, 0.09); transform: translateY(-1px); }
    .project-participant.is-profile-link:focus-visible { border-color: #4f91d0; outline: 3px solid rgba(35, 117, 194, 0.18); outline-offset: 2px; }
    .project-participant.is-profile-link:has(.project-participant-controls button:hover) { transform: none; }
    .project-participant.is-project-owner { border-color: #bad2ee; background: #f3f8fe; }
    .project-participant-avatar { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: #dce8f2; color: #2f506c; font-size: var(--type-label); font-weight: var(--weight-bold); }
    .project-participant.is-project-owner .project-participant-avatar { background: #d7e9fc; color: #19588d; }
    .project-participant-copy { min-width: 0; display: grid; gap: 0.24rem; }
    .project-participant-copy strong { min-width: 0; overflow-wrap: anywhere; font-size: var(--type-body); font-weight: var(--weight-semibold); line-height: var(--leading-compact); }
    .project-participant-name { min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.18rem 0.32rem; }
    .project-participant-you { flex: 0 0 auto; color: var(--muted); font-size: var(--type-caption); font-weight: var(--weight-regular); }
    .project-participant-badges { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 0.24rem; }
    .project-participant-result-owner { flex: 0 1 auto; padding: 0.08rem 0.34rem; border-radius: 999px; background: #e8f5eb; color: #26713b; font-size: var(--type-caption); font-weight: var(--weight-semibold); line-height: 1.45; }
    .project-participant-role { width: fit-content; max-width: 100%; display: inline-flex; color: var(--muted); font-size: var(--type-caption); line-height: 1.45; white-space: normal; }
    .project-participant-role.project-owner { padding: 0.06rem 0.32rem; border: 1px solid #c2daf4; border-radius: 999px; background: #e8f3ff; color: #1d5f97; font-weight: var(--weight-semibold); }
    .project-participant-role.platform-owner { color: #3e4a5a; font-weight: var(--weight-semibold); }
    .project-participant-controls { display: flex; align-items: center; justify-content: flex-end; gap: 0.12rem; }
    .project-owner-crown { width: 1.9rem; height: 1.9rem; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 50%; background: transparent; color: #8795a6; cursor: pointer; transition: color 120ms ease, border-color 120ms ease, background 120ms ease, transform 120ms ease; }
    .project-owner-crown:hover, .project-owner-crown:focus-visible { border-color: #d7b65c; background: #fff9e8; color: #a97900; outline: none; transform: translateY(-1px); }
    .project-owner-crown.is-active { border-color: #e4bc4c; background: #fff3c4; color: #c48500; }
    .project-owner-crown.is-active:disabled { opacity: 1; }
    .project-owner-crown.is-pending { cursor: wait; opacity: 0.58; }
    .project-owner-crown svg { width: 1.08rem; height: 1.08rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .project-owner-crown.is-active svg path:first-child { fill: currentColor; stroke-width: 1.25; }
    .project-result-owner { width: 1.9rem; height: 1.9rem; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 50%; background: transparent; color: #8795a6; cursor: pointer; transition: color 120ms ease, border-color 120ms ease, background 120ms ease, transform 120ms ease; }
    .project-result-owner:hover, .project-result-owner:focus-visible { border-color: #86c69b; background: #edf8f0; color: #26713b; outline: none; transform: translateY(-1px); }
    .project-result-owner.is-active { border-color: #9ccfab; background: #e8f5eb; color: #26713b; }
    .project-result-owner.is-active:disabled { opacity: 1; }
    .project-result-owner.is-pending { cursor: wait; opacity: 0.58; }
    .project-result-owner svg { width: 1.08rem; height: 1.08rem; fill: none; stroke: currentColor; stroke-width: 1.8; }
    .project-participant-remove { width: 1.75rem; height: 1.75rem; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #778597; cursor: pointer; opacity: 0; transition: opacity 120ms ease, background 120ms ease, color 120ms ease; }
    .project-participant:hover .project-participant-remove, .project-participant:focus-within .project-participant-remove { opacity: 1; }
    .project-participant-remove:hover, .project-participant-remove:focus-visible { background: #fff0f0; color: #ad2f2f; outline: none; }
    .project-participant-remove:disabled { cursor: default; opacity: 0.4; }
    .project-participant-remove svg { width: 0.95rem; height: 0.95rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .agent-detail-row { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.5rem; padding: 0.44rem 0; border-bottom: 1px solid var(--line); font-size: var(--type-body); line-height: var(--leading-compact); }
    .agent-detail-key { color: var(--muted); font-weight: var(--weight-semibold); }
    .agent-detail-value { overflow-wrap: anywhere; }
    .passport-capabilities { gap: 1rem; }
    .agent-capability-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0 1rem; border-top: 1px solid var(--line); }
    .agent-capability { min-width: 0; padding: 0.48rem 0; border-bottom: 1px solid var(--line); font-size: var(--type-body); line-height: var(--leading-compact); }
    .agent-capability strong, .agent-capability span { display: block; overflow-wrap: anywhere; }
    .agent-capability strong { font-weight: var(--weight-semibold); }
    .agent-capability span { margin-top: 0.12rem; color: var(--muted); font-size: var(--type-small); }
    #project-files-panel { min-width: 0; }
    .materials-surface { display: grid; gap: 1.45rem; }
    .materials-toolbar { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); }
    .materials-toolbar-copy strong, .materials-toolbar-copy span { display: block; }
    .materials-toolbar-copy strong { font-size: var(--type-body); }
    .materials-toolbar-copy span { margin-top: 0.12rem; color: var(--muted); font-size: var(--type-label); }
    .materials-search { width: min(100%, 24rem); min-width: 12rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border: 1px solid #c7d2df; border-radius: 6px; background: #fff; }
    #materials-search-input { width: 100%; min-width: 0; min-height: 2.4rem; padding: 0.48rem 0.62rem; border: 0; outline: 0; background: transparent; color: var(--text); font-size: var(--type-small); }
    #materials-search-input:focus { box-shadow: inset 0 0 0 1px var(--blue); border-radius: 5px; }
    #materials-search-clear { width: 2.3rem; height: 2.3rem; display: grid; place-items: center; border: 0; background: transparent; color: #657488; font-size: var(--type-title); cursor: pointer; }
    .material-section { min-width: 0; }
    .material-section + .material-section { padding-top: 1.35rem; border-top: 1px solid var(--line); }
    .material-section-header { display: grid; grid-template-columns: 0.25rem minmax(0, 1fr); gap: 0.65rem; align-items: stretch; margin-bottom: 0.25rem; }
    .material-section-marker { border-radius: 2px; background: #3d78bd; }
    .material-section[data-material-section="artifacts"] .material-section-marker { background: #3b8b68; }
    .material-section[data-material-section="knowledge"] .material-section-marker { background: #b37a2c; }
    .material-section-title { margin: 0; color: #202b3a; font-size: var(--type-body); font-weight: var(--weight-bold); }
    .material-section-description { margin-top: 0.12rem; color: var(--muted); font-size: var(--type-label); }
    .project-files-summary { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; min-height: 2rem; margin-bottom: 0.35rem; color: var(--muted); font-size: var(--type-label); }
    .project-files-controls { display: flex; align-items: center; gap: 0.45rem; }
    .archive-switch { min-height: 2rem; padding: 0.36rem 0.58rem; border: 1px solid #c7d2df; border-radius: 5px; background: #fff; color: #3f5268; font-size: var(--type-label); font-weight: var(--weight-semibold); cursor: pointer; }
    .archive-switch:hover, .archive-switch.active { background: #edf5ff; border-color: #a8c4e7; color: var(--blue); }
    .visibility-segment { display: flex; align-items: center; padding: 0.12rem; border: 1px solid #c7d2df; border-radius: 5px; background: #f2f5f8; }
    .visibility-option { min-height: 1.7rem; padding: 0.28rem 0.46rem; border: 0; border-radius: 3px; background: transparent; color: #627084; font-size: var(--type-label); font-weight: var(--weight-semibold); cursor: pointer; }
    .visibility-option.selected { background: #fff; color: var(--blue); box-shadow: 0 1px 2px rgba(28,39,55,0.13); }
    .file-upload { min-height: 2rem; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.32rem; padding: 0.36rem 0.62rem; border: 1px solid #b8cbe0; border-radius: 5px; background: #fff; color: var(--blue); font-size: var(--type-label); font-weight: var(--weight-bold); cursor: pointer; }
    .file-upload svg { width: 0.86rem; height: 0.86rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .file-upload:hover { background: #edf5ff; border-color: #a8c4e7; }
    .file-upload:disabled { opacity: 0.45; cursor: default; }
    .project-file-list { display: grid; gap: 0.45rem; }
    .project-file-row { position: relative; min-width: 0; min-height: 4rem; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; padding: 0.62rem 0.68rem; border: 1px solid #d8e0e9; border-radius: 6px; background: #fff; transition: border-color 120ms ease, box-shadow 120ms ease; }
    .project-file-row:hover, .project-file-row:focus-within { border-color: #bdccdc; box-shadow: 0 2px 7px rgba(39,55,74,0.06); }
    .project-file-row.inherited-row { border-left: 3px solid #9fb6ce; background: #fbfcfe; }
    .project-file-row.knowledge-row { grid-template-columns: minmax(0, 1fr) auto; }
    .project-file-type { width: 2.25rem; height: 2.25rem; display: grid; place-items: center; overflow: hidden; border-radius: 5px; background: #edf3f8; color: #52677d; font-size: var(--type-caption); font-weight: var(--weight-bold); text-align: center; text-overflow: ellipsis; }
    .project-file-copy { min-width: 0; }
    .project-file-title-wrap { min-width: 0; display: flex; align-items: center; gap: 0.25rem; }
    .project-file-title { min-width: 0; flex: 1 1 auto; overflow: hidden; color: #263244; font-size: var(--type-small); font-weight: var(--weight-semibold); text-overflow: ellipsis; white-space: nowrap; }
    .material-access { position: relative; width: 1.65rem; height: 1.65rem; flex: 0 0 auto; display: inline-grid; place-items: center; padding: 0; border: 1px solid #c5d1dd; border-radius: 4px; background: #f7f9fb; color: #55677b; }
    button.material-access { cursor: pointer; transition: border-color 120ms ease, background 120ms ease, color 120ms ease; }
    .material-access svg { width: 0.88rem; height: 0.88rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .material-access.project { border-color: #a9cfba; background: #f1faf5; color: #24734c; }
    .material-access.readonly { border-color: transparent; background: transparent; color: #748498; }
    .material-access.inherited { color: #58718d; }
    button.material-access:hover, button.material-access:focus-visible { border-color: #8eafd3; background: #edf5ff; color: var(--blue); outline: none; }
    button.material-access:disabled { opacity: 0.5; cursor: default; }
    .material-access::after { content: attr(data-tooltip); position: absolute; z-index: 30; bottom: calc(100% + 0.35rem); left: 0; width: max-content; max-width: min(13rem, calc(100vw - 2rem)); padding: 0.3rem 0.42rem; border-radius: 4px; background: #202a38; color: #fff; font-size: var(--type-caption); font-weight: var(--weight-regular); line-height: 1.3; text-align: left; white-space: normal; opacity: 0; pointer-events: none; }
    .material-access:hover::after, .material-access:focus-visible::after { opacity: 1; }
    .project-file-rename-inline { width: 1.45rem; height: 1.45rem; flex: 0 0 auto; display: grid; place-items: center; border: 0; border-radius: 4px; background: transparent; color: #657488; cursor: pointer; opacity: 0.6; transition: opacity 120ms ease, background 120ms ease, color 120ms ease; }
    .project-file-rename-inline svg { width: 0.82rem; height: 0.82rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .project-file-rename-inline:hover, .project-file-rename-inline:focus-visible { background: #e8f1fb; color: var(--blue); outline: none; }
    .project-file-rename-inline:disabled { opacity: 0.35; cursor: default; }
    .project-file-description { margin-top: 0.16rem; overflow: hidden; color: var(--muted); font-size: var(--type-label); text-overflow: ellipsis; white-space: nowrap; }
    .project-file-description.knowledge-description { white-space: normal; }
    .project-file-meta { margin-top: 0.18rem; color: #7d8998; font-size: var(--type-caption); font-variant-numeric: tabular-nums; }
    .project-file-actions { display: flex; align-items: center; gap: 0.38rem; }
    .material-primary-action { min-height: 2rem; display: inline-flex; align-items: center; justify-content: center; padding: 0.36rem 0.66rem; border: 1px solid #b8cbe0; border-radius: 5px; background: #fff; color: #244f7d; font-size: var(--type-label); font-weight: var(--weight-bold); text-decoration: none; cursor: pointer; }
    .material-primary-action:hover { border-color: #8eafd3; background: #edf5ff; }
    .material-primary-action:disabled { opacity: 0.45; cursor: default; }
    .material-menu { position: relative; }
    .material-menu > summary { width: 2rem; height: 2rem; display: grid; place-items: center; border: 1px solid #c7d2df; border-radius: 5px; background: #fff; color: #42566d; font-size: var(--type-title); font-weight: var(--weight-bold); line-height: 1; cursor: pointer; list-style: none; }
    .material-menu > summary::-webkit-details-marker { display: none; }
    .material-menu > summary:hover, .material-menu[open] > summary { border-color: #9db7d3; background: #edf5ff; }
    .material-menu-popover { position: absolute; z-index: 20; top: calc(100% + 0.35rem); right: 0; width: max-content; min-width: 12.5rem; max-width: min(18rem, calc(100vw - 2rem)); padding: 0.28rem; border: 1px solid #cbd6e2; border-radius: 6px; background: #fff; box-shadow: 0 12px 32px rgba(25,38,54,0.16); }
    .material-menu-action { width: 100%; min-height: 2.15rem; display: flex; align-items: center; padding: 0.42rem 0.55rem; border: 0; border-radius: 4px; background: transparent; color: #34485e; font: inherit; font-size: var(--type-label); font-weight: var(--weight-semibold); text-align: left; text-decoration: none; cursor: pointer; }
    .material-menu-action:hover, .material-menu-action:focus-visible { background: #edf5ff; outline: none; }
    .material-menu-action.danger { color: #a3362d; }
    .material-menu-action.danger:hover, .material-menu-action.danger:focus-visible { background: #fff1f0; }
    .material-menu-action:disabled { opacity: 0.45; cursor: default; }
    @media (hover: hover) {
      .project-file-rename-inline { opacity: 0; }
      .project-file-row:hover .project-file-rename-inline,
      .project-file-row:focus-within .project-file-rename-inline { opacity: 1; }
    }
    .personal-session-title { margin: 1rem 0 0.35rem; color: var(--muted); font-size: var(--type-label); font-weight: var(--weight-bold); text-transform: uppercase; }
    .memory-proposal-queue { display: grid; gap: 0.65rem; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
    .memory-proposal-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
    .memory-proposal-heading strong { font-size: var(--type-title); }
    .memory-proposal-heading span { min-width: 1.5rem; padding: 0.12rem 0.42rem; border-radius: 999px; background: #e9f2ff; color: #285b91; font-size: var(--type-caption); font-weight: var(--weight-bold); text-align: center; }
    .memory-proposal-queue > p { margin: -0.25rem 0 0; color: var(--muted); font-size: var(--type-label); line-height: 1.45; }
    .memory-proposal-card { display: grid; gap: 0.55rem; padding: 0.8rem; border: 1px solid #c9d9eb; border-radius: 8px; background: #f8fbff; }
    .memory-proposal-card input, .memory-proposal-card textarea { width: 100%; border: 1px solid #c7d5e5; border-radius: 6px; background: #fff; color: var(--text); outline: none; }
    .memory-proposal-card input { min-height: 2.25rem; padding: 0.45rem 0.55rem; font-size: var(--type-small); font-weight: var(--weight-semibold); }
    .memory-proposal-card textarea { min-height: 5.5rem; padding: 0.55rem; resize: vertical; font: var(--type-small)/1.5 var(--font-sans); }
    .memory-proposal-card input:focus, .memory-proposal-card textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,224,0.1); }
    .memory-proposal-meta, .memory-proposal-status { color: var(--muted); font-size: var(--type-caption); line-height: 1.4; }
    .memory-proposal-status.error { color: var(--danger); }
    .memory-proposal-evidence { color: #40536a; font-size: var(--type-label); }
    .memory-proposal-evidence summary { cursor: pointer; }
    .memory-proposal-evidence ul { margin: 0.45rem 0 0; padding-left: 1.2rem; }
    .memory-proposal-evidence li { margin: 0.25rem 0; overflow-wrap: anywhere; }
    .memory-proposal-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.65rem; }
    .memory-proposal-status { min-width: 0; flex: 1 1 auto; }
    .memory-proposal-actions { display: flex; gap: 0.45rem; }
    .memory-proposal-actions button { min-height: 2.2rem; padding: 0.42rem 0.68rem; border: 1px solid #bdcbd9; border-radius: 6px; background: #fff; color: #40536a; font-size: var(--type-label); font-weight: var(--weight-semibold); cursor: pointer; }
    .memory-proposal-actions .memory-proposal-accept { border-color: var(--blue); background: var(--blue); color: #fff; }
    .memory-proposal-actions button:disabled { opacity: 0.55; cursor: default; }
    .project-files-empty { padding: 1.1rem 0; color: var(--muted); font-size: var(--type-small); text-align: center; }
    #user-settings-dialog { width: min(calc(100vw - 2rem), 32rem); padding: 0; border: 1px solid #cbd4df; border-radius: 9px; background: #fff; box-shadow: 0 24px 70px rgba(16,24,40,0.24); }
    #user-settings-dialog::backdrop { background: rgba(18,25,35,0.48); }
    .user-settings-shell { display: grid; gap: 1rem; padding: 1rem; }
    .user-settings-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.8rem; align-items: start; }
    .user-settings-heading strong, .user-settings-heading span { display: block; }
    .user-settings-heading strong { color: #263547; font-size: var(--type-title); }
    .user-settings-heading span { margin-top: 0.18rem; color: var(--muted); font-size: var(--type-small); line-height: 1.45; }
    #user-settings-close { width: 2.25rem; height: 2.25rem; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #68768a; font: inherit; font-size: 1.45rem; cursor: pointer; }
    #user-settings-close:hover, #user-settings-close:focus-visible { background: #eef2f6; color: #293647; outline: none; }
    .notification-settings-card { display: grid; gap: 0.85rem; padding: 0.9rem; border: 1px solid #d8e1eb; border-radius: 8px; background: #f8fafc; }
    .notification-settings-copy strong, .notification-settings-copy span { display: block; }
    .notification-settings-copy strong { color: #29394b; font-size: var(--type-body); }
    .notification-settings-copy span { margin-top: 0.2rem; color: #6d7b8d; font-size: var(--type-label); line-height: 1.45; }
    .notification-mode-field { display: grid; gap: 0.34rem; color: #526276; font-size: var(--type-label); font-weight: var(--weight-semibold); }
    .notification-mode-field select { width: 100%; min-height: 2.55rem; padding: 0.48rem 2rem 0.48rem 0.58rem; border: 1px solid #c6d2df; border-radius: 6px; background: #fff; color: #29394b; font: inherit; font-size: var(--type-small); outline: none; }
    .notification-mode-field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,224,0.1); }
    .notification-mode-field select:disabled { background: #eef2f6; color: #748195; cursor: wait; }
    #global-notification-status, .project-notification-status { min-height: 1.15rem; margin: 0; color: #65758a; font-size: var(--type-label); line-height: 1.45; }
    .project-notification-status.is-error { color: #a33a31; }
    #notification-device-action, .project-notification-device, .project-notification-general { justify-self: start; min-height: 2.35rem; padding: 0.42rem 0.7rem; border: 1px solid #b9c9da; border-radius: 6px; background: #fff; color: #315d88; font: inherit; font-size: var(--type-label); font-weight: var(--weight-semibold); cursor: pointer; }
    #notification-device-action:hover, #notification-device-action:focus-visible, .project-notification-device:hover:not(:disabled), .project-notification-device:focus-visible:not(:disabled), .project-notification-general:hover, .project-notification-general:focus-visible { border-color: #8faaca; background: #edf5ff; outline: none; }
    #notification-device-action.is-connected { border-color: #b7d4c2; background: #f1f8f3; color: #326c4a; }
    #notification-device-action.is-error { border-color: #decba8; background: #fffaf0; color: #8a611b; }
    .project-notification-device.is-connected { border-color: #b7d4c2; background: #f1f8f3; color: #326c4a; }
    #notification-device-action:disabled, .project-notification-device:disabled { cursor: default; opacity: 0.68; }
    #preview-dialog { width: min(92vw, 72rem); height: min(86vh, 52rem); padding: 0; border: 1px solid #cbd4df; border-radius: 7px; background: #fff; box-shadow: 0 24px 70px rgba(16,24,40,0.24); }
    #preview-dialog::backdrop { background: rgba(18,25,35,0.48); }
    .preview-shell { width: 100%; height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); }
    .preview-header { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--line); background: #fff; }
    .preview-header-actions { display: flex; align-items: center; gap: 0.45rem; }
    #preview-download { min-height: 2rem; display: inline-flex; align-items: center; justify-content: center; padding: 0.36rem 0.66rem; border: 1px solid #c7d2df; border-radius: 5px; background: #fff; color: #31516f; font-size: var(--type-label); font-weight: var(--weight-semibold); text-decoration: none; }
    #preview-download:hover, #preview-download:focus-visible { border-color: #a8c4e7; background: #edf5ff; outline: none; }
    #preview-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--type-body); }
    #preview-close { width: 2rem; height: 2rem; display: grid; place-items: center; border: 1px solid #c7d2df; border-radius: 5px; background: #fff; color: #435064; font-size: var(--type-title); cursor: pointer; touch-action: manipulation; }
    #preview-content { min-width: 0; min-height: 0; display: grid; place-items: center; overflow: auto; background: #f5f7f9; }
    #preview-content[data-kind="image"] { padding: 1rem; background: #e9edf2; }
    #preview-content[data-kind="audio"] { padding: 1.5rem; }
    #preview-content[data-kind="font"] { padding: 1.25rem; background: #eef1f5; }
    #preview-content > img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 4px 20px rgba(16,24,40,0.12); }
    #preview-content > video { display: block; max-width: 100%; max-height: 100%; background: #111827; }
    #preview-content > audio { width: min(100% - 2rem, 42rem); }
    #preview-content > iframe { width: 100%; height: 100%; border: 0; background: #fff; }
    .preview-error { width: min(calc(100% - 2rem), 32rem); display: grid; gap: 0.55rem; padding: 1.1rem; border: 1px solid #d4dce6; border-radius: 7px; background: #fff; color: #516174; text-align: center; }
    .preview-error strong { color: #253247; font-size: var(--type-body); }
    .font-preview { width: min(100%, 54rem); display: grid; gap: 1rem; padding: clamp(1.4rem, 4vw, 3rem); border: 1px solid #d4dce6; border-radius: 9px; background: #fff; box-shadow: 0 8px 30px rgba(16,24,40,0.08); }
    .font-preview > span { color: #718096; font-size: var(--type-label); font-weight: var(--weight-bold); letter-spacing: 0.06em; text-transform: uppercase; }
    .font-preview-sample { color: #182131; font-size: clamp(2rem, 6vw, 4.75rem); line-height: 1.08; overflow-wrap: anywhere; }
    .font-preview-alphabet { color: #526174; font-size: clamp(1rem, 2vw, 1.35rem); line-height: 1.65; overflow-wrap: anywhere; }
    #rename-dialog { width: min(calc(100vw - 2rem), 28rem); padding: 0; border: 1px solid #cbd4df; border-radius: 7px; background: #fff; box-shadow: 0 24px 70px rgba(16,24,40,0.24); }
    #rename-dialog::backdrop { background: rgba(18,25,35,0.48); }
    #rename-form { display: grid; gap: 0.8rem; padding: 1rem; }
    #rename-title { font-size: var(--type-title); }
    .rename-field { display: grid; gap: 0.3rem; }
    .rename-field label { color: var(--muted); font-size: var(--type-label); font-weight: var(--weight-semibold); }
    #rename-input { width: 100%; min-height: 2.5rem; padding: 0.5rem 0.58rem; border: 1px solid #cbd5e1; border-radius: 5px; color: #263244; font-size: var(--type-body); outline: none; }
    #rename-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,224,0.1); }
    #rename-error { color: #b42318; font-size: var(--type-label); }
    .rename-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
    .rename-actions button { min-height: 2.25rem; padding: 0.42rem 0.72rem; border: 1px solid #c7d2df; border-radius: 5px; background: #fff; color: #435064; font-size: var(--type-label); font-weight: var(--weight-semibold); cursor: pointer; }
    #rename-submit { border-color: var(--blue); background: var(--blue); color: #fff; }
    .rename-actions button:disabled { opacity: 0.5; cursor: default; }
    #project-member-dialog { width: min(calc(100vw - 2rem), 32rem); padding: 0; border: 1px solid #cbd4df; border-radius: 7px; background: #fff; box-shadow: 0 24px 70px rgba(16,24,40,0.24); }
    #project-member-dialog::backdrop { background: rgba(18,25,35,0.48); }
    #project-member-form { display: grid; gap: 0.9rem; padding: 1rem; }
    .project-member-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.7rem; align-items: start; }
    .project-member-heading strong, .project-member-heading span { display: block; }
    #project-member-title { font-size: var(--type-title); }
    #project-member-description { margin-top: 0.22rem; color: var(--muted); font-size: var(--type-label); line-height: 1.4; }
    #project-member-close { width: 2rem; height: 2rem; display: grid; place-items: center; border: 1px solid #c7d2df; border-radius: 5px; background: #fff; color: #435064; font-size: var(--type-title); cursor: pointer; }
    .project-member-fields { display: grid; gap: 0.85rem; }
    .project-member-field { display: grid; gap: 0.3rem; }
    .project-member-field label { color: var(--muted); font-size: var(--type-label); font-weight: var(--weight-semibold); }
    .project-member-picker { min-width: 0; display: grid; gap: 0.34rem; }
    #project-member-user-search { width: 100%; min-height: 2.5rem; padding: 0.45rem 0.58rem; border: 1px solid #cbd5e1; border-radius: 5px; background: #fff; color: #263244; font-size: var(--type-small); outline: none; }
    #project-member-user-search:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,224,0.1); }
    #project-member-user-search:disabled { background: #f3f5f8; color: var(--muted); }
    #project-member-options { max-height: 13rem; overflow-x: hidden; overflow-y: auto; border: 1px solid #d5dde8; border-radius: 6px; background: #fff; scrollbar-color: #c8d0da transparent; scrollbar-width: thin; }
    #project-member-options[hidden] { display: none; }
    .project-member-option { width: 100%; min-width: 0; display: grid; gap: 0.12rem; padding: 0.58rem 0.65rem; border: 0; border-radius: 0; background: #fff; color: #263244; text-align: left; cursor: pointer; }
    .project-member-option + .project-member-option { border-top: 1px solid #e7ebf2; }
    .project-member-option:hover, .project-member-option.is-active { background: #f1f6fc; }
    .project-member-option[aria-selected="true"] { background: #eaf3ff; box-shadow: inset 3px 0 0 var(--blue); }
    .project-member-option:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--blue); outline-offset: -2px; }
    .project-member-option strong, .project-member-option small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .project-member-option strong { font-size: var(--type-small); }
    .project-member-option small { color: var(--muted); font-size: var(--type-caption); }
    .project-member-option-empty { padding: 0.78rem 0.65rem; color: var(--muted); font-size: var(--type-small); text-align: center; }
    #project-member-status { min-height: 1rem; margin: 0; color: var(--muted); font-size: var(--type-caption); line-height: 1.4; }
    .project-member-role-field { min-width: 0; display: grid; gap: 0.42rem; margin: 0; padding: 0; border: 0; }
    .project-member-role-field legend { margin-bottom: 0.32rem; padding: 0; color: var(--muted); font-size: var(--type-label); font-weight: var(--weight-semibold); }
    .project-member-role-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
    .project-member-role-option { position: relative; min-width: 0; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0.55rem; align-items: start; padding: 0.65rem; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; cursor: pointer; transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease; }
    .project-member-role-option:hover { border-color: #a8bdd5; background: #f8fbff; }
    .project-member-role-option:has(input:checked) { border-color: var(--blue); background: #f3f8ff; box-shadow: 0 0 0 2px rgba(23,105,224,0.08); }
    .project-member-role-option:has(input:focus-visible) { outline: 3px solid rgba(23,105,224,0.16); outline-offset: 1px; }
    .project-member-role-option:has(input:disabled) { cursor: default; opacity: 0.58; }
    .project-member-role-option input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
    .project-member-role-mark { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: #e8eef5; color: #52647a; }
    .project-member-role-option.project-owner .project-member-role-mark { background: #e1efff; color: #1769aa; }
    .project-member-role-mark svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .project-member-role-option.project-owner .project-member-role-mark svg { fill: currentColor; stroke-width: 1.2; }
    .project-member-role-copy { min-width: 0; display: block; }
    .project-member-role-copy strong, .project-member-role-copy small { display: block; }
    .project-member-role-copy strong { color: #253347; font-size: var(--type-small); line-height: var(--leading-compact); }
    .project-member-role-copy small { margin-top: 0.18rem; color: var(--muted); font-size: var(--type-caption); line-height: 1.4; }
    .project-member-role-boundary { margin: 0.1rem 0 0; padding-left: 0.62rem; border-left: 2px solid #cbd5e1; color: var(--muted); font-size: var(--type-caption); line-height: 1.45; }
    #project-member-error { color: var(--danger); font-size: var(--type-label); }
    .project-member-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
    .project-member-actions button { min-height: 2.25rem; padding: 0.42rem 0.72rem; border: 1px solid #c7d2df; border-radius: 5px; background: #fff; color: #435064; font-size: var(--type-label); font-weight: var(--weight-semibold); cursor: pointer; }
    #project-member-submit { border-color: var(--blue); background: var(--blue); color: #fff; }
    .project-member-actions button:disabled { opacity: 0.5; cursor: default; }
    #knowledge-editor-dialog { width: min(92vw, 72rem); height: min(86vh, 52rem); padding: 0; border: 1px solid #cbd4df; border-radius: 7px; background: #fff; box-shadow: 0 24px 70px rgba(16,24,40,0.24); }
    #knowledge-editor-dialog::backdrop { background: rgba(18,25,35,0.48); }
    #knowledge-editor-form { width: 100%; height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
    .knowledge-editor-header { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--line); }
    .knowledge-editor-heading { min-width: 0; }
    #knowledge-editor-title, #knowledge-editor-path { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #knowledge-editor-title { font-size: var(--type-body); }
    #knowledge-editor-path { margin-top: 0.12rem; color: var(--muted); font-size: var(--type-caption); font-weight: var(--weight-regular); }
    .knowledge-editor-header-actions { display: flex; align-items: center; gap: 0.45rem; }
    .knowledge-editor-icon-action { position: relative; width: 2rem; height: 2rem; display: grid; place-items: center; padding: 0; border: 1px solid #b8cbe0; border-radius: 5px; background: #fff; color: #244f7d; cursor: pointer; }
    .knowledge-editor-icon-action svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
    .knowledge-editor-icon-action:hover, .knowledge-editor-icon-action:focus-visible { border-color: #8eafd3; background: #edf5ff; outline: none; }
    .knowledge-editor-icon-action:disabled { opacity: 0.45; cursor: default; }
    .knowledge-editor-icon-action::after { content: attr(data-tooltip); position: absolute; z-index: 30; top: calc(100% + 0.35rem); right: 0; width: max-content; padding: 0.3rem 0.42rem; border-radius: 4px; background: #202a38; color: #fff; font-size: var(--type-caption); font-weight: var(--weight-regular); line-height: 1.3; opacity: 0; pointer-events: none; }
    .knowledge-editor-icon-action:hover::after, .knowledge-editor-icon-action:focus-visible::after { opacity: 1; }
    #knowledge-editor-edit { min-height: 2rem; padding: 0.38rem 0.65rem; border: 1px solid #b8cbe0; border-radius: 5px; background: #fff; color: #244f7d; font-size: var(--type-label); font-weight: var(--weight-semibold); cursor: pointer; }
    #knowledge-editor-edit:hover { border-color: #8eafd3; background: #edf5ff; }
    #knowledge-editor-close { width: 2rem; height: 2rem; display: grid; place-items: center; border: 1px solid #c7d2df; border-radius: 5px; background: #fff; color: #435064; font-size: var(--type-title); cursor: pointer; }
    .knowledge-editor-body { min-width: 0; min-height: 0; overflow: auto; background: #fff; }
    #knowledge-editor-document { width: min(100%, 52rem); margin: 0 auto; padding: clamp(1.25rem, 3vw, 2.5rem); color: #273244; font-size: var(--type-body); line-height: 1.65; overflow-wrap: anywhere; }
    #knowledge-editor-document h1, #knowledge-editor-document h2, #knowledge-editor-document h3, #knowledge-editor-document h4, #knowledge-editor-document h5 { margin: 1.45em 0 0.55em; color: #17202c; line-height: 1.3; }
    #knowledge-editor-document h1:first-child, #knowledge-editor-document h2:first-child, #knowledge-editor-document h3:first-child { margin-top: 0; }
    #knowledge-editor-document h2 { font-size: var(--type-heading); }
    #knowledge-editor-document h3, #knowledge-editor-document h4, #knowledge-editor-document h5 { font-size: var(--type-title); }
    #knowledge-editor-document p { margin: 0 0 0.9em; }
    #knowledge-editor-document ul, #knowledge-editor-document ol { margin: 0 0 1em; padding-left: 1.45rem; }
    #knowledge-editor-document li { margin: 0.28em 0; }
    #knowledge-editor-document blockquote { margin: 1em 0; padding: 0.1rem 0 0.1rem 0.9rem; border-left: 3px solid #cbd8e6; color: #556476; }
    #knowledge-editor-document pre { margin: 1rem 0; padding: 0.9rem 1rem; overflow: auto; border: 1px solid #dce4ee; border-radius: 6px; background: #f5f7fa; }
    #knowledge-editor-document code { padding: 0.08em 0.3em; border-radius: 4px; background: #eef2f6; color: #24364b; font: var(--type-small)/1.55 var(--font-mono); }
    #knowledge-editor-document pre code { padding: 0; background: transparent; }
    #knowledge-editor-document a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
    #knowledge-editor-document .markdown-table { max-width: 100%; margin: 1rem 0 1.2rem; overflow-x: auto; border: 1px solid #d8e1eb; border-radius: 6px; }
    #knowledge-editor-document table { width: 100%; min-width: 32rem; border-collapse: collapse; font-size: var(--type-small); }
    #knowledge-editor-document th, #knowledge-editor-document td { padding: 0.62rem 0.72rem; border-bottom: 1px solid #e1e7ee; text-align: left; vertical-align: top; }
    #knowledge-editor-document th { background: #f3f6f9; color: #394a5d; font-size: var(--type-label); font-weight: var(--weight-bold); }
    #knowledge-editor-document tr:last-child td { border-bottom: 0; }
    #knowledge-editor-document[data-document="chronicle"] h3 { position: relative; margin-left: 0.85rem; padding-left: 1.15rem; }
    #knowledge-editor-document[data-document="chronicle"] h3::before { content: ''; position: absolute; top: 0.48em; left: -0.26rem; width: 0.58rem; height: 0.58rem; border: 2px solid #fff; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1px #9db9da; }
    #knowledge-editor-document[data-document="chronicle"] h3::after { content: ''; position: absolute; top: 1.15em; bottom: -1.7em; left: 0; width: 1px; background: #d5e0eb; }
    #knowledge-editor-document[data-document="chronicle"] h3:last-of-type::after { display: none; }
    #knowledge-editor-text { width: 100%; height: 100%; min-height: 20rem; padding: 1rem; resize: none; border: 0; outline: none; background: #fff; color: #202733; font: var(--type-small)/1.58 var(--font-mono); }
    #knowledge-editor-text:focus { box-shadow: inset 0 0 0 2px rgba(23,105,224,0.18); }
    #knowledge-editor-error { margin: 0.75rem; padding: 0.65rem 0.75rem; border: 1px solid #f2c5c1; border-radius: 5px; background: #fff5f4; color: var(--danger); font-size: var(--type-label); overflow-wrap: anywhere; }
    .knowledge-editor-footer { min-height: 3.3rem; display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; padding: 0.55rem 0.8rem; border-top: 1px solid var(--line); }
    #knowledge-editor-cancel, #knowledge-editor-save { min-height: 2.25rem; padding: 0.42rem 0.72rem; border: 1px solid #c7d2df; border-radius: 5px; background: #fff; color: #435064; font-size: var(--type-label); font-weight: var(--weight-semibold); cursor: pointer; }
    #knowledge-editor-save { border-color: var(--blue); background: var(--blue); color: #fff; }
    #knowledge-editor-cancel:disabled, #knowledge-editor-save:disabled { opacity: 0.5; cursor: default; }
    #add-dialog { width: min(calc(100vw - 2rem), 34rem); max-height: min(88vh, 42rem); padding: 0; overflow: hidden; border: 1px solid #cbd4df; border-radius: 8px; background: #fff; box-shadow: 0 24px 70px rgba(16,24,40,0.24); }
    #add-dialog::backdrop { background: rgba(18,25,35,0.48); }
    .add-shell { display: grid; grid-template-rows: auto minmax(0, 1fr); max-height: inherit; }
    .add-header { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.55rem; align-items: center; padding: 0.75rem 0.85rem; border-bottom: 1px solid var(--line); }
    #add-title { grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--type-title); }
    #add-back { grid-column: 1; }
    #add-close { grid-column: 3; }
    #add-back, #add-close { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; padding: 0; border: 1px solid #c7d2df; border-radius: 5px; background: #fff; color: #435064; font-size: var(--type-title); cursor: pointer; }
    #add-back:disabled, #add-close:disabled { opacity: 0.45; cursor: default; }
    #add-options { display: grid; padding: 0.45rem 0.85rem 0.85rem; }
    .add-option { min-width: 0; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.7rem; align-items: center; padding: 0.72rem 0.25rem; border: 0; border-bottom: 1px solid var(--line); background: #fff; color: var(--text); text-align: left; cursor: pointer; }
    .add-option:last-child { border-bottom: 0; }
    .add-option:hover { background: #f6f9fc; }
    .add-option-icon { width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border-radius: 6px; background: #eaf2fb; color: #2c639c; }
    #add-meeting-live .add-option-icon { background: #e7f2fb; color: #1769a8; }
    .add-option-icon svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
    .add-option-copy { min-width: 0; }
    .add-option-copy strong, .add-option-copy span { display: block; }
    .add-option-copy strong { font-size: var(--type-small); }
    .add-option-copy span { margin-top: 0.14rem; color: var(--muted); font-size: var(--type-label); line-height: 1.35; }
    #meeting-workflow { min-width: 0; display: grid; gap: 0.85rem; padding: 0.85rem; overflow-y: auto; }
    .meeting-field { display: grid; gap: 0.3rem; }
    .meeting-field label { color: var(--muted); font-size: var(--type-label); font-weight: var(--weight-semibold); }
    #meeting-title { width: 100%; min-height: 2.65rem; padding: 0.52rem 0.62rem; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #263244; font-size: var(--type-body); outline: none; }
    #meeting-title:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,224,0.1); }
    #meeting-source { overflow: hidden; color: var(--muted); font-size: var(--type-label); text-overflow: ellipsis; white-space: nowrap; }
    #meeting-status { min-height: 2.7rem; padding: 0.65rem 0.72rem; border: 1px solid #d8e0e9; border-radius: 6px; background: #f7f9fb; color: #506073; font-size: var(--type-label); line-height: 1.4; }
    #meeting-status.success { border-color: #b9ddc8; background: #f1faf5; color: #286446; }
    #meeting-status.error { border-color: #efc4bf; background: #fff5f4; color: #9d3028; }
    .meeting-actions { display: flex; justify-content: flex-end; gap: 0.5rem; flex-wrap: wrap; }
    .meeting-actions button { min-height: 2.5rem; padding: 0.46rem 0.75rem; border: 1px solid #c7d2df; border-radius: 6px; background: #fff; color: #405169; font-size: var(--type-label); font-weight: var(--weight-semibold); cursor: pointer; }
    #meeting-primary { border-color: var(--blue); background: var(--blue); color: #fff; }
    #meeting-primary.recording { border-color: #b42318; background: #b42318; }
    #meeting-open-materials { color: var(--blue); }
    .meeting-actions button:disabled { opacity: 0.48; cursor: default; }

    #live-meeting-dialog {
      width: min(90vw, 1180px); height: min(80dvh, 760px); max-width: none; max-height: none; margin: auto; padding: 0;
      overflow: hidden; border: 1px solid rgba(185, 199, 215, 0.82); border-radius: 18px; background: #f7f9fb;
      color: #1e2a3b; box-shadow: 0 30px 90px rgba(10, 24, 41, 0.32);
    }
    #live-meeting-dialog::backdrop { background: rgba(13, 25, 39, 0.76); backdrop-filter: blur(10px); }
    .live-meeting-shell { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); }
    .live-meeting-header {
      min-width: 0; min-height: 3.75rem; display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
      padding: 0.58rem 0.72rem; border-bottom: 1px solid #dfe6ee; background: rgba(255, 255, 255, 0.97);
    }
    .live-meeting-header-copy { min-width: 0; display: flex; align-items: center; gap: 0.82rem; }
    .live-meeting-brand { flex: 0 0 auto; display: grid; gap: 0.04rem; }
    .live-meeting-brand > strong { color: #18324a; font-size: 1rem; font-weight: var(--weight-bold); letter-spacing: -0.018em; line-height: 1.08; }
    .live-meeting-brand > span { color: #8290a0; font-size: 0.5rem; font-weight: var(--weight-semibold); letter-spacing: 0.045em; line-height: 1.25; white-space: nowrap; }
    .live-meeting-brand-divider { width: 1px; height: 2rem; flex: 0 0 auto; background: #dce4ec; }
    .live-meeting-heading { min-width: 0; display: grid; gap: 0.12rem; }
    .live-meeting-heading > span { overflow: hidden; color: #6c7e92; font-size: 0.7rem; font-weight: var(--weight-semibold); letter-spacing: 0.02em; text-overflow: ellipsis; white-space: nowrap; }
    .live-meeting-heading > strong { overflow: hidden; color: #1d2c40; font-size: clamp(1rem, 2vw, 1.22rem); letter-spacing: -0.012em; text-overflow: ellipsis; white-space: nowrap; }
    .live-meeting-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.48rem; }
    .live-meeting-header-actions button, .live-meeting-controls button, #live-meeting-secretary-send {
      min-height: 2.6rem; padding: 0.5rem 0.75rem; border: 1px solid #c9d5e1; border-radius: 11px; background: #fff;
      color: #34465e; font: inherit; font-size: 0.78rem; font-weight: var(--weight-semibold); cursor: pointer;
      transition: border-color 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
    }
    .live-meeting-header-actions button:hover:not(:disabled), .live-meeting-controls button:hover:not(:disabled), #live-meeting-secretary-send:hover:not(:disabled) { border-color: #9eb4c9; box-shadow: 0 4px 14px rgba(30, 58, 86, 0.09); transform: translateY(-1px); }
    .live-meeting-header-actions button:focus-visible, .live-meeting-controls button:focus-visible, .live-meeting-side-tabs button:focus-visible, #live-meeting-secretary-send:focus-visible { outline: 2px solid rgba(23, 105, 168, 0.52); outline-offset: 2px; }
    .live-meeting-icon-button { width: 2.6rem; display: grid; place-items: center; padding: 0 !important; }
    .live-meeting-header-actions svg, .live-meeting-leave svg, .live-meeting-end svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .live-meeting-invite { display: inline-flex; align-items: center; gap: 0.42rem; }
    .live-meeting-state { display: inline-flex; align-items: center; gap: 0.48rem; padding: 0.38rem 0.52rem; border-radius: 999px; background: #f3f6f9; color: #5d6d81; font-size: 0.7rem; font-weight: var(--weight-semibold); white-space: nowrap; }
    .live-meeting-state::before { width: 0.48rem; height: 0.48rem; flex: 0 0 auto; border-radius: 50%; background: #d39d36; content: ''; }
    .live-meeting-state.ready::before { background: #2d9b63; box-shadow: 0 0 0 4px rgba(45, 155, 99, 0.11); }
    .live-meeting-state.error::before { background: #b83b34; }
    .live-meeting-body { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(280px, 28vw, 360px); }
    .live-meeting-side-hidden .live-meeting-body { grid-template-columns: minmax(0, 1fr); }
    .live-meeting-side[hidden] { display: none; }
    .live-meeting-stage { position: relative; min-width: 0; min-height: 0; padding: 0.7rem 0.7rem 4.8rem; overflow: hidden; background: radial-gradient(circle at 50% 18%, #23374b 0, #182838 42%, #111e2c 100%); }
    .live-meeting-videos { height: 100%; min-height: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); grid-auto-rows: minmax(210px, 1fr); place-content: center; gap: 0.7rem; overflow: auto; }
    .live-meeting-videos:has(> .live-meeting-tile:only-child) { grid-template-columns: minmax(0, min(100%, 980px)); }
    .live-meeting-tile { position: relative; min-width: 0; min-height: 210px; overflow: hidden; border: 1px solid rgba(210, 224, 239, 0.16); border-radius: 16px; background: #213042; box-shadow: 0 14px 38px rgba(4, 14, 25, 0.2); }
    .live-meeting-tile video { width: 100%; height: 100%; display: block; object-fit: cover; background: #213042; }
    .live-meeting-tile.local video { transform: scaleX(-1); }
    .live-meeting-tile.screen video { transform: none; object-fit: contain; }
    .live-meeting-tile.is-speaking { border-color: rgba(91, 190, 142, 0.86); box-shadow: 0 0 0 3px rgba(91, 190, 142, 0.2), 0 14px 38px rgba(4, 14, 25, 0.2); }
    .live-meeting-placeholder-tile { display: grid; place-content: center; justify-items: center; gap: 0.72rem; background: radial-gradient(circle at 50% 42%, rgba(65, 119, 158, 0.5), transparent 35%), linear-gradient(145deg, #233a4f, #172838); }
    .live-meeting-avatar { width: clamp(4.5rem, 9vw, 6.6rem); height: clamp(4.5rem, 9vw, 6.6rem); display: grid; place-items: center; border: 1px solid rgba(190, 221, 242, 0.34); border-radius: 50%; background: linear-gradient(145deg, rgba(91, 162, 208, 0.72), rgba(45, 94, 132, 0.76)); color: #f4f9fd; box-shadow: 0 14px 34px rgba(3, 16, 29, 0.24); font-size: clamp(1.25rem, 3vw, 1.8rem); font-weight: var(--weight-bold); letter-spacing: 0.04em; }
    .live-meeting-camera-note { color: #a9bdce; font-size: 0.74rem; }
    .live-meeting-participant {
      position: absolute; right: 0.5rem; bottom: 0.5rem; left: 0.5rem; display: flex; align-items: center; justify-content: space-between; gap: 0.4rem;
      padding: 0.4rem 0.56rem; border: 1px solid rgba(220, 235, 247, 0.08); border-radius: 9px; background: rgba(9, 20, 31, 0.7); color: #fff; font-size: 0.72rem; backdrop-filter: blur(10px);
    }
    .live-meeting-tile.mic-muted .live-meeting-participant::after { padding: 0.12rem 0.34rem; border-radius: 999px; background: rgba(190, 59, 51, 0.88); color: #fff; content: 'Микрофон выключен'; font-size: 0.58rem; }
    .live-meeting-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 0.65rem; padding: 2rem; color: #d9e4ef; text-align: center; pointer-events: none; }
    .live-meeting-empty > span:last-child { max-width: 28rem; color: #98aabc; font-size: 0.82rem; }
    .live-meeting-orbit { width: 4.5rem; height: 4.5rem; border: 1px solid rgba(120, 190, 236, 0.52); border-radius: 50%; box-shadow: inset 0 0 28px rgba(50, 154, 219, 0.18), 0 0 38px rgba(50, 154, 219, 0.2); animation: live-meeting-breathe 2.4s ease-in-out infinite; }
    @keyframes live-meeting-breathe { 50% { opacity: 0.66; transform: scale(0.94); } }
    .live-meeting-error { position: absolute; z-index: 4; right: 1rem; bottom: 5.2rem; left: 1rem; padding: 0.72rem 0.82rem; border: 1px solid rgba(197, 88, 80, 0.62); border-radius: 11px; background: rgba(255, 245, 244, 0.97); color: #9b2d27; box-shadow: 0 10px 26px rgba(36, 20, 20, 0.18); font-size: 0.78rem; line-height: 1.4; }
    .live-meeting-resume-audio { position: absolute; z-index: 6; top: 0.8rem; left: 50%; min-height: 2.35rem; padding: 0.48rem 0.78rem; border: 1px solid rgba(168, 203, 229, 0.5); border-radius: 999px; background: rgba(255, 255, 255, 0.96); color: #245b83; font: inherit; font-size: 0.72rem; font-weight: var(--weight-semibold); box-shadow: 0 8px 24px rgba(4, 14, 25, 0.22); cursor: pointer; transform: translateX(-50%); }
    .live-meeting-resume-audio[hidden] { display: none; }
    .live-meeting-side { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); border-left: 1px solid #dfe6ee; background: #fbfcfd; }
    .live-meeting-side-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.2rem; margin: 0.62rem 0.72rem 0; padding: 0.2rem; border: 1px solid #d7e0e9; border-radius: 10px; background: #edf2f6; }
    .live-meeting-side-tabs button { min-height: 2.18rem; border: 0; border-radius: 7px; background: transparent; color: #69798b; font: inherit; font-size: 0.72rem; font-weight: var(--weight-semibold); cursor: pointer; }
    .live-meeting-side-tabs button[aria-selected="true"] { background: #fff; color: #29445e; box-shadow: 0 1px 4px rgba(25, 49, 72, 0.1); }
    .live-meeting-transcript, .live-meeting-secretary { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
    .live-meeting-transcript[hidden], .live-meeting-secretary[hidden] { display: none; }
    .live-meeting-transcript > header, .live-meeting-secretary > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; padding: 0.76rem 0.82rem; border-bottom: 1px solid #e7ecf2; }
    .live-meeting-transcript > header > div, .live-meeting-secretary > header { min-width: 0; }
    .live-meeting-transcript header div, .live-meeting-secretary > header { display: flex; flex-direction: column; }
    .live-meeting-transcript header span:not(.live-meeting-live-mark), .live-meeting-secretary header span { color: #758499; font-size: 0.68rem; line-height: 1.35; }
    .live-meeting-live-mark { display: inline-flex; align-items: center; gap: 0.28rem; color: #9e2e29; font-size: 0.64rem; font-weight: var(--weight-bold); letter-spacing: 0.08em; }
    .live-meeting-live-mark i { width: 0.42rem; height: 0.42rem; border-radius: 50%; background: #d74740; box-shadow: 0 0 0 3px rgba(215, 71, 64, 0.12); }
    #live-meeting-transcript, #live-meeting-secretary-messages { min-height: 0; overflow: auto; padding: 0.72rem 0.82rem; }
    .live-meeting-transcript-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.4rem 0.48rem; align-items: baseline; margin-bottom: 0.62rem; font-size: 0.78rem; line-height: 1.48; }
    .live-meeting-transcript-line strong { color: #2e6084; }
    .live-meeting-transcript-line time { color: #9aa5b3; font-size: 0.62rem; font-variant-numeric: tabular-nums; }
    #live-meeting-partial { padding: 0.5rem 0.82rem; border-top: 1px dashed #d9e1ea; color: #718096; font-size: 0.75rem; font-style: italic; }
    .live-meeting-placeholder { margin: 0; color: #8794a5; font-size: 0.76rem; line-height: 1.45; }
    .live-meeting-secretary-message { max-width: 94%; margin: 0 0 0.58rem auto; padding: 0.58rem 0.66rem; border: 1px solid #dfe6ed; border-radius: 12px 12px 4px 12px; background: #fff; font-size: 0.76rem; line-height: 1.45; white-space: pre-wrap; }
    .live-meeting-secretary-message.agent { margin-right: auto; margin-left: 0; border-color: #cbdfea; border-radius: 12px 12px 12px 4px; background: #eff7fb; }
    .live-meeting-secretary-message.pending { color: #65778a; }
    .live-meeting-secretary-message strong { display: block; margin-bottom: 0.14rem; color: #39516a; font-size: 0.68rem; }
    .live-meeting-typing { display: inline-block; margin-left: 0.3rem; color: #3f789c; letter-spacing: 0.08em; animation: live-meeting-typing 1.1s ease-in-out infinite; }
    @keyframes live-meeting-typing { 50% { opacity: 0.35; } }
    #live-meeting-secretary-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0.38rem; padding: 0.5rem 0.56rem; border-top: 1px solid #e3e9ef; }
    #live-meeting-secretary-input { min-width: 0; min-height: 2.5rem; max-height: 7rem; resize: none; padding: 0.58rem 0.68rem; border: 1px solid #ccd7e2; border-radius: 14px; background: #fff; color: #263649; font: inherit; font-size: 0.76rem; line-height: 1.35; outline: none; }
    #live-meeting-secretary-input:focus { border-color: #2877b5; box-shadow: 0 0 0 3px rgba(40, 119, 181, 0.1); }
    #live-meeting-secretary-send { width: 2.5rem; height: 2.5rem; min-height: 2.5rem; display: grid; place-items: center; align-self: end; padding: 0; border-color: #1769a8; border-radius: 50%; background: #1769a8; color: #fff; }
    #live-meeting-secretary-send svg { width: 1.08rem; height: 1.08rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .live-meeting-controls {
      position: absolute; z-index: 5; right: 50%; bottom: 0.82rem; display: flex; align-items: center; gap: 0.42rem;
      padding: 0.34rem; border: 1px solid rgba(223, 233, 242, 0.2); border-radius: 999px; background: rgba(20, 34, 48, 0.88);
      box-shadow: 0 12px 34px rgba(3, 12, 22, 0.32); backdrop-filter: blur(16px); transform: translateX(50%);
    }
    .live-meeting-control-group { display: flex; align-items: center; gap: 0.45rem; }
    .live-meeting-media-control { width: 2.65rem; height: 2.65rem; min-height: 2.65rem !important; display: grid; place-items: center; overflow: hidden; padding: 0 !important; border-color: rgba(221, 233, 242, 0.18) !important; border-radius: 50% !important; background: rgba(255, 255, 255, 0.1) !important; color: #f5f8fb !important; }
    .live-meeting-control-icon { width: 1.14rem; height: 1.14rem; display: grid; place-items: center; }
    .live-meeting-control-icon svg { grid-area: 1 / 1; width: 1.14rem; height: 1.14rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .live-meeting-media-control .icon-off { display: none; }
    .live-meeting-media-control[aria-pressed="false"] .icon-on { display: none; }
    .live-meeting-media-control[aria-pressed="false"] .icon-off { display: block; }
    #live-meeting-mic[aria-pressed="false"], #live-meeting-camera[aria-pressed="false"] { border-color: rgba(238, 111, 102, 0.28) !important; background: rgba(192, 59, 51, 0.9) !important; color: #fff !important; }
    #live-meeting-screen[aria-pressed="true"] { border-color: rgba(93, 173, 230, 0.34) !important; background: rgba(40, 119, 181, 0.92) !important; }
    .live-meeting-control-label, .live-meeting-end-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
    .live-meeting-controls .live-meeting-leave { width: 2.65rem; height: 2.65rem; min-height: 2.65rem; display: grid; place-items: center; overflow: hidden; padding: 0; border-color: rgba(221, 233, 242, 0.18); border-radius: 999px; background: rgba(255, 255, 255, 0.1); color: #f5f8fb; }
    .live-meeting-controls .live-meeting-leave:hover:not(:disabled) { border-color: rgba(221, 233, 242, 0.32); background: rgba(255, 255, 255, 0.17); }
    .live-meeting-controls .live-meeting-end { width: 2.88rem; height: 2.65rem; min-height: 2.65rem; display: grid; place-items: center; overflow: hidden; padding: 0; border-color: #b83b34; border-radius: 999px; background: #b83b34; color: #fff; }
    .live-meeting-controls .live-meeting-end[hidden] { display: none; }
    .live-meeting-controls .live-meeting-end:hover:not(:disabled) { border-color: #9f2f2a; background: #a8322d; box-shadow: 0 5px 16px rgba(146, 43, 37, 0.2); }
    .live-meeting-controls button:disabled, .live-meeting-header-actions button:disabled, #live-meeting-secretary-send:disabled { opacity: 0.48; cursor: default; }
    #knowledge-create-dialog { width: min(calc(100vw - 2rem), 36rem); padding: 0; border: 1px solid #cbd4df; border-radius: 8px; background: #fff; box-shadow: 0 24px 70px rgba(16,24,40,0.24); }
    #knowledge-create-dialog::backdrop { background: rgba(18,25,35,0.48); }
    #knowledge-create-form { display: grid; gap: 0.8rem; padding: 1rem; }
    .knowledge-create-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.7rem; align-items: start; }
    .knowledge-create-heading strong, .knowledge-create-heading span { display: block; }
    .knowledge-create-heading strong { font-size: var(--type-title); }
    .knowledge-create-heading span, .knowledge-create-note { margin-top: 0.18rem; color: var(--muted); font-size: var(--type-label); line-height: 1.4; }
    #knowledge-create-close { width: 2rem; height: 2rem; display: grid; place-items: center; border: 1px solid #c7d2df; border-radius: 5px; background: #fff; color: #435064; font-size: var(--type-title); cursor: pointer; }
    .knowledge-create-field { display: grid; gap: 0.3rem; }
    .knowledge-create-field label { color: var(--muted); font-size: var(--type-label); font-weight: var(--weight-semibold); }
    .knowledge-create-field input, .knowledge-create-field textarea { width: 100%; padding: 0.52rem 0.62rem; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #263244; font-size: var(--type-small); outline: none; resize: vertical; }
    .knowledge-create-field input:focus, .knowledge-create-field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,224,0.1); }
    #knowledge-create-error { color: var(--danger); font-size: var(--type-label); }
    .knowledge-create-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
    .knowledge-create-actions button { min-height: 2.35rem; padding: 0.44rem 0.72rem; border: 1px solid #c7d2df; border-radius: 6px; background: #fff; color: #435064; font-size: var(--type-label); font-weight: var(--weight-semibold); cursor: pointer; }
    #knowledge-create-submit { border-color: var(--blue); background: var(--blue); color: #fff; }
    .knowledge-create-actions button:disabled { opacity: 0.5; cursor: default; }
    .surface-error { color: #b42318; font-size: var(--type-label); }

    #admin-panel { min-width: 0; min-height: 100%; background: #fff; }
    .admin-shell { min-height: 100%; display: grid; grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr); border-top: 1px solid var(--line); }
    .admin-directory { min-width: 0; border-right: 1px solid var(--line); background: #f8fafc; }
    .admin-mode-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.15rem; margin: 0.75rem 0.8rem 0.15rem; padding: 0.2rem; border: 1px solid #d5dee8; border-radius: 8px; background: #edf1f5; }
    .admin-mode { min-height: 2.15rem; padding: 0.38rem 0.7rem; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: var(--type-small); font-weight: var(--weight-bold); cursor: pointer; transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease; }
    .admin-mode:hover:not(.active) { background: rgba(255, 255, 255, 0.55); color: #415166; }
    .admin-mode.active { background: #fff; color: var(--blue); box-shadow: 0 1px 3px rgba(36, 50, 70, 0.14); }
    .admin-mode:focus-visible, .admin-add:focus-visible { outline: 2px solid rgba(23, 105, 224, 0.42); outline-offset: 2px; }
    .admin-directory-search { position: relative; padding: 0.52rem 0.8rem 0.68rem; border-bottom: 1px solid var(--line); }
    .admin-directory-search input {
      width: 100%; min-height: 2.35rem; padding: 0.48rem 2.25rem 0.48rem 0.72rem; border: 1px solid #cbd6e2;
      border-radius: 8px; background: #fff; color: var(--text); font-size: var(--type-small); outline: none;
    }
    .admin-directory-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,224,0.1); }
    .admin-directory-search-clear {
      position: absolute; top: 50%; right: 1.1rem; width: 1.65rem; height: 1.65rem; display: grid; place-items: center;
      padding: 0; transform: translateY(-54%); border: 0; border-radius: 50%; background: #e7edf4; color: #607084;
      font-size: 1rem; line-height: 1; cursor: pointer;
    }
    .admin-directory-search-clear:hover { background: #d9e3ed; color: #31465d; }
    .admin-directory-search-empty { padding: 1.1rem 0.8rem; }
    .admin-toolbar { min-height: 3.35rem; display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; padding: 0.58rem 0.8rem; border-bottom: 1px solid var(--line); }
    .admin-toolbar strong { font-size: var(--type-body); }
    .admin-toolbar-meta { color: var(--muted); font-size: var(--type-label); }
    .admin-add, .admin-primary, .admin-secondary, .admin-danger {
      min-height: 2.35rem; padding: 0.48rem 0.72rem; border: 1px solid #bac7d5; border-radius: 6px;
      background: #fff; color: #31516f; font-size: var(--type-small); font-weight: var(--weight-semibold); cursor: pointer;
    }
    .admin-primary { border-color: var(--blue); background: var(--blue); color: #fff; }
    .admin-primary:hover { background: var(--blue-dark); }
    .admin-primary:disabled, .admin-secondary:disabled, .admin-danger:disabled { opacity: 0.5; cursor: default; }
    .admin-add { min-height: 2rem; padding: 0.34rem 0.62rem; border-color: #b8c9dc; background: #fff; color: var(--blue); font-size: var(--type-label); }
    .admin-add:hover { border-color: #91b4dc; background: #edf5ff; }
    .admin-danger { border-color: #e5b9b4; color: var(--danger); }
    .admin-user-list { display: grid; }
    .admin-user-item { min-width: 0; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.65rem; align-items: center; padding: 0.72rem 0.8rem; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit; text-align: left; cursor: pointer; }
    .admin-user-item:hover { background: #f3f6f9; }
    .admin-user-item.active { background: #eaf3ff; }
    .admin-user-item.archived { background: #f6f7f9; opacity: 0.72; }
    .admin-user-item.archived:hover { background: #eef1f4; opacity: 1; }
    .admin-user-item.archived.active { background: #e8edf3; opacity: 1; }
    .admin-user-group-title {
      padding: 0.75rem 0.8rem 0.42rem; border-bottom: 1px solid var(--line); background: #eef1f4;
      color: #6f7e90; font-size: var(--type-caption); font-weight: var(--weight-bold); letter-spacing: 0.055em; text-transform: uppercase;
    }
    .admin-user-avatar { width: 2.25rem; height: 2.25rem; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #dce5ef; color: #30445a; font-size: var(--type-label); font-weight: var(--weight-bold); }
    .admin-fleet-number { width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border-radius: 50%; background: #24384e; color: #fff; font-size: var(--type-small); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
    .admin-fleet-number.empty { border: 1px dashed #aeb9c7; background: transparent; color: var(--muted); }
    .admin-user-copy { min-width: 0; }
    .admin-user-copy strong, .admin-user-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .admin-user-copy strong { font-size: var(--type-body); }
    .admin-user-copy span { margin-top: 0.16rem; color: var(--muted); font-size: var(--type-label); }
    .admin-user-copy .admin-user-runtime { color: #48647e; }
    .admin-activity-list { display: grid; }
    .admin-company-group { display: grid; }
    .admin-company-heading {
      width: 100%; padding: 0.72rem 0.8rem 0.44rem; border: 0; border-bottom: 1px solid var(--line); background: #f8fafc;
      color: #718096; font-size: var(--type-caption); font-weight: var(--weight-bold);
      letter-spacing: 0.055em; text-align: left; text-transform: uppercase; cursor: pointer;
    }
    .admin-company-heading:hover:not(:disabled) { background: #f1f5f9; color: #4d627a; }
    .admin-company-heading:disabled { cursor: default; }
    .admin-activity-item { min-width: 0; display: grid; gap: 0.38rem; padding: 0.76rem 0.8rem; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit; text-align: left; cursor: pointer; }
    .admin-activity-item.admin-project-child {
      position: relative;
      padding-left: calc(0.8rem + (var(--project-depth) * 1.1rem));
    }
    .admin-activity-item.admin-project-child::before {
      position: absolute; top: 0; bottom: 0; left: calc(0.7rem + ((var(--project-depth) - 1) * 1.1rem));
      width: 1px; background: #d7e0ea; content: "";
    }
    .admin-activity-item:hover { background: #f3f6f9; }
    .admin-activity-item.active { background: #eaf3ff; }
    .admin-activity-item strong, .admin-activity-item > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .admin-activity-item strong { font-size: var(--type-body); }
    .admin-activity-item span { color: var(--muted); font-size: var(--type-label); }
    .admin-project-card-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
    .admin-project-card-count { flex: 0 0 auto; }
    .admin-project-card-team { display: flex; align-items: center; gap: 0.42rem; min-width: 0; }
    .admin-project-card-avatars { display: flex; flex: 0 0 auto; overflow: visible!important; }
    .admin-project-card-avatars > span {
      width: 1.35rem; height: 1.35rem; display: grid; place-items: center; margin-left: -0.28rem;
      overflow: visible; border: 2px solid #f8fafc; border-radius: 50%; background: #dce5ef;
      color: #30445a; font-size: 0.52rem; font-weight: var(--weight-bold); line-height: 1;
    }
    .admin-project-card-avatars > span:first-child { margin-left: 0; }
    .admin-activity-item:hover .admin-project-card-avatars > span { border-color: #f3f6f9; }
    .admin-activity-item.active .admin-project-card-avatars > span { border-color: #eaf3ff; }
    .admin-project-card-names { min-width: 0; color: #40536a!important; font-weight: var(--weight-semibold); }
    .admin-project-card-activity { color: var(--muted); }
    .admin-user-copy .admin-user-projects { display: flex; flex-wrap: wrap; gap: 0.22rem; margin-top: 0.32rem; overflow: visible; white-space: normal; }
    .admin-user-copy .admin-user-project-chip {
      display: inline-flex; width: fit-content; max-width: 100%; margin: 0; padding: 0.12rem 0.34rem;
      overflow: hidden; border: 1px solid #c9d7e6; border-radius: 0.7rem; background: #f4f8fc;
      color: #405c78; text-overflow: ellipsis; white-space: nowrap; line-height: 1.25;
    }
    .admin-user-copy .admin-user-project-chip.all { border-color: #a9c7e8; background: #eaf3ff; color: #245f9e; }
    .admin-user-copy .admin-user-project-chip.inherited { border-style: dashed; background: #f8fafc; color: #60758d; }
    .admin-user-copy .admin-user-project-chip.empty { border-style: dashed; background: transparent; color: var(--muted); }
    .project-participant-inherited { flex: 0 1 auto; color: #60758d!important; font-size: var(--type-caption); line-height: 1.45; overflow-wrap: anywhere; }
    .admin-detail { min-width: 0; padding: 0 clamp(1.1rem, 3vw, 2.5rem) 2rem; }
    .admin-detail > * { width: 100%; max-width: 66rem; margin-right: auto; margin-left: auto; }
    .admin-detail-header { min-height: 4rem; display: flex; align-items: center; gap: 0.65rem; border-bottom: 1px solid var(--line); }
    .admin-detail-header strong { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--type-title); }
    .admin-project-manage { margin-left: auto; }
    .admin-back { display: none; width: 2.2rem; height: 2.2rem; place-items: center; border: 1px solid #c7d2df; border-radius: 5px; background: #fff; color: #405065; cursor: pointer; }
    .admin-user-header { min-height: 4.8rem; display: flex; align-items: center; gap: 0.75rem; }
    .admin-user-heading { min-width: 0; display: flex; align-items: center; gap: 0.75rem; }
    .admin-user-avatar-large { width: 2.65rem; height: 2.65rem; font-size: var(--type-body); }
    .admin-user-title { min-width: 0; }
    .admin-user-title strong, .admin-user-title span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .admin-user-title strong { font-size: var(--type-title); }
    .admin-user-title span { margin-top: 0.18rem; color: var(--muted); font-size: var(--type-label); }
    .admin-user-nav { display: flex; gap: 1.25rem; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
    .admin-user-nav::-webkit-scrollbar { display: none; }
    .admin-user-nav-button { min-height: 2.9rem; flex: 0 0 auto; padding: 0 0.1rem; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: var(--type-small); font-weight: var(--weight-bold); cursor: pointer; }
    .admin-user-nav-button:hover { color: #314156; }
    .admin-user-nav-button.active { border-bottom-color: var(--blue); color: var(--blue); }
    .admin-section { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
    .admin-section:last-child { border-bottom: 0; }
    .admin-section-title { margin-bottom: 0.35rem; color: #344156; font-size: var(--type-title); font-weight: var(--weight-bold); }
    .admin-section-intro { max-width: 45rem; margin: 0 0 1rem; color: var(--muted); font-size: var(--type-small); line-height: 1.5; }
    .admin-user-lifecycle .admin-danger:not(:disabled):hover { border-color: #d48e87; background: #fff3f1; }
    .admin-fields { display: grid; grid-template-columns: repeat(2, minmax(12rem, 1fr)); gap: 0.8rem; }
    .admin-field { min-width: 0; display: grid; gap: 0.25rem; }
    .admin-field label { color: var(--muted); font-size: var(--type-label); font-weight: var(--weight-semibold); }
    .admin-field input, .admin-field select, .admin-field textarea, .admin-memory-editor {
      width: 100%; min-height: 2.65rem; padding: 0.58rem 0.68rem; border: 1px solid #c7d2df; border-radius: 6px; background: #fff; color: var(--text); font-size: var(--type-small); outline: none;
    }
    .admin-field textarea { min-height: 8rem; resize: vertical; line-height: 1.5; }
    .admin-field input:focus, .admin-field select:focus, .admin-field textarea:focus, .admin-memory-editor:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,224,0.1); }
    .admin-project-fields { grid-template-columns: minmax(0, 1fr); }
    .admin-quick-project {
      display: grid; gap: 0.8rem; margin-top: 1rem; padding: 0.9rem; border: 1px solid #c9d7e6;
      border-radius: 10px; background: linear-gradient(135deg, #f8fbff 0%, #f2f7fd 100%);
    }
    .admin-quick-project-toggle { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.65rem; align-items: start; cursor: pointer; }
    .admin-quick-project-toggle > input { width: 1.08rem; height: 1.08rem; margin-top: 0.12rem; accent-color: var(--blue); }
    .admin-quick-project-toggle-copy { min-width: 0; display: grid; gap: 0.15rem; }
    .admin-quick-project-toggle-copy strong { color: #2e4359; font-size: var(--type-small); }
    .admin-quick-project-toggle-copy span { color: var(--muted); font-size: var(--type-label); line-height: 1.4; }
    .admin-quick-project-fields[hidden] { display: none; }
    .admin-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.85rem; }
    .admin-project-list { display: grid; border-top: 1px solid var(--line); }
    .admin-project-row { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) 10rem; gap: 0.65rem; align-items: center; min-height: 3.1rem; border-bottom: 1px solid var(--line); font-size: var(--type-small); }
    .admin-project-row.is-child { padding-left: calc(var(--project-depth) * 0.9rem); }
    .admin-project-row input { width: 1rem; height: 1rem; }
    .admin-project-row select { min-width: 0; min-height: 2.25rem; border: 1px solid #c7d2df; border-radius: 6px; background: #fff; font-size: var(--type-small); }
    .admin-project-multiselect { position: relative; width: min(100%, 45rem); }
    .admin-project-multiselect > summary { list-style: none; }
    .admin-project-multiselect > summary::-webkit-details-marker { display: none; }
    .admin-project-multiselect-trigger {
      min-width: 0; min-height: 3.35rem; display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
      padding: 0.62rem 0.75rem; border: 1px solid #c7d2df; border-radius: 10px; background: #fff;
      color: var(--text); cursor: pointer; transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
    }
    .admin-project-multiselect-trigger:hover { border-color: #9fb4ca; background: #fbfdff; }
    .admin-project-multiselect-trigger:focus-visible {
      outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,224,0.1);
    }
    .admin-project-multiselect-copy { min-width: 0; display: grid; gap: 0.12rem; }
    .admin-project-multiselect-copy strong, .admin-project-multiselect-copy span {
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .admin-project-multiselect-copy strong { font-size: var(--type-small); }
    .admin-project-multiselect-copy span { color: var(--muted); font-size: var(--type-label); }
    .admin-project-multiselect-chevron {
      flex: 0 0 auto; color: #60758d; font-size: 1.35rem; line-height: 1;
      transform: translateY(-0.1rem); transition: transform 120ms ease;
    }
    .admin-project-multiselect[open] .admin-project-multiselect-chevron { transform: rotate(180deg) translateY(0.1rem); }
    .admin-project-multiselect-panel {
      position: absolute; z-index: 20; top: calc(100% + 0.4rem); right: 0; left: 0;
      display: grid; gap: 0.55rem; padding: 0.65rem; border: 1px solid #c7d2df; border-radius: 12px;
      background: #fff; box-shadow: 0 18px 48px rgba(31,47,66,0.18);
    }
    .admin-project-multiselect-search {
      width: 100%; min-height: 2.55rem; padding: 0.5rem 0.65rem; border: 1px solid #c7d2df; border-radius: 8px;
      background: #f8fafc; color: var(--text); font-size: var(--type-small); outline: none;
    }
    .admin-project-multiselect-search:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(23,105,224,0.1); }
    .admin-project-multiselect-options {
      max-height: min(19rem, 42vh); overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 9px;
    }
    .admin-project-multiselect-option {
      min-width: 0; min-height: 2.85rem; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.65rem;
      align-items: center; padding: 0.55rem 0.65rem; border-bottom: 1px solid var(--line); background: #fff;
      font-size: var(--type-small); cursor: pointer;
    }
    .admin-project-multiselect-option:last-child { border-bottom: 0; }
    .admin-project-multiselect-option[hidden] { display: none; }
    .admin-project-multiselect-option:hover { background: #f4f8fc; }
    .admin-project-multiselect-option:has(input:checked) { background: #edf5ff; color: #214f82; font-weight: var(--weight-semibold); }
    .admin-project-multiselect-option input { width: 1.05rem; height: 1.05rem; accent-color: var(--blue); }
    .admin-project-multiselect-option span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .admin-project-multiselect-empty { padding: 0.8rem; color: var(--muted); font-size: var(--type-label); text-align: center; }
    .admin-project-multiselect-done {
      min-height: 2.35rem; justify-self: end; padding: 0.45rem 0.8rem; border: 1px solid var(--blue); border-radius: 8px;
      background: var(--blue); color: #fff; font-size: var(--type-label); font-weight: var(--weight-semibold); cursor: pointer;
    }
    .admin-project-multiselect-done:hover { background: var(--blue-dark); }
    .admin-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
    .admin-metric { min-width: 0; padding: 0.7rem; border-right: 1px solid var(--line); }
    .admin-metric:last-child { border-right: 0; }
    .admin-metric strong, .admin-metric span { display: block; }
    .admin-metric strong { font-size: var(--type-heading); font-variant-numeric: tabular-nums; }
    .admin-metric span { margin-top: 0.18rem; color: var(--muted); font-size: var(--type-label); }
    .admin-activity-meta { margin-top: 0.65rem; color: var(--muted); font-size: var(--type-label); }
    .admin-project-purpose { margin-bottom: 0.75rem; font-weight: var(--weight-semibold); }
    .admin-project-context-loading { padding: 1rem 0; color: var(--muted); font-size: var(--type-small); }
    .admin-project-context {
      max-height: 22rem; padding: 0.9rem 1rem; overflow: auto; border: 1px solid var(--line);
      border-radius: 7px; background: #fbfcfe; color: #273244; font-size: var(--type-small); line-height: 1.5;
    }
    .admin-project-context > :first-child { margin-top: 0; }
    .admin-project-context > :last-child { margin-bottom: 0; }
    .admin-project-context h2, .admin-project-context h3, .admin-project-context h4, .admin-project-context h5 { margin: 1rem 0 0.45rem; }
    .admin-project-context p, .admin-project-context ul, .admin-project-context ol, .admin-project-context blockquote { margin: 0.55rem 0; }
    .admin-project-context table { width: 100%; border-collapse: collapse; }
    .admin-project-context th, .admin-project-context td { padding: 0.42rem 0.5rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
    .admin-project-people { display: grid; border-top: 1px solid var(--line); }
    .admin-project-person {
      min-width: 0; min-height: 3.9rem; display: grid; grid-template-columns: minmax(12rem, 1fr) auto minmax(9rem, auto);
      gap: 1rem; align-items: center; border-bottom: 1px solid var(--line);
    }
    .admin-project-person-identity { min-width: 0; display: flex; align-items: center; gap: 0.65rem; }
    .admin-project-person-copy { min-width: 0; }
    .admin-project-person-copy strong, .admin-project-person-copy > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .admin-project-person-copy > span { margin-top: 0.15rem; color: var(--muted); font-size: var(--type-label); }
    .admin-project-person-crown { display: inline-block; margin-right: 0.35rem; color: #b47a11; font-size: 1rem; line-height: 1; }
    .admin-project-person-stats { display: grid; grid-template-columns: auto auto auto auto; gap: 0.25rem 0.4rem; align-items: baseline; font-size: var(--type-label); font-variant-numeric: tabular-nums; }
    .admin-project-person-stats span { color: var(--muted); }
    .admin-project-person-last { color: #40536a; font-size: var(--type-label); text-align: right; }
    .admin-project-person-last.empty { color: var(--muted); }
    .admin-contributor-list { display: grid; border-top: 1px solid var(--line); }
    .admin-contributor { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; min-height: 2.7rem; border-bottom: 1px solid var(--line); font-size: var(--type-label); }
    .admin-contributor span { color: var(--muted); text-align: right; }
    .admin-memory-editor { min-height: 17rem; resize: vertical; font-family: var(--font-mono); line-height: 1.55; }
    .admin-memory-list { display: grid; margin-top: 0.65rem; border-top: 1px solid var(--line); }
    .admin-memory-file { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); font-size: var(--type-label); }
    .admin-memory-file span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .admin-memory-file a { color: var(--blue); text-decoration: none; }
    .admin-conversation-controls { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.9rem; }
    .admin-conversation-controls select { min-width: 14rem; min-height: 2.5rem; padding: 0.48rem 0.6rem; border: 1px solid #c7d2df; border-radius: 6px; background: #fff; color: var(--text); font-size: var(--type-small); }
    .admin-conversation-list { display: grid; gap: 0.6rem; }
    .admin-conversation-message { width: fit-content; max-width: min(88%, 48rem); padding: 0.65rem 0.75rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
    .admin-conversation-message.user { justify-self: end; border-color: #bdd3ed; background: #edf5ff; }
    .admin-conversation-message.assistant { justify-self: start; }
    .admin-conversation-text { color: #273244; font-size: var(--type-small); line-height: 1.52; white-space: pre-wrap; overflow-wrap: anywhere; }
    .admin-conversation-meta { margin-top: 0.35rem; color: var(--muted); font-size: var(--type-caption); font-variant-numeric: tabular-nums; text-align: right; }
    .admin-conversation-more { margin-top: 0.9rem; }
    .admin-notice { margin-top: 0.8rem; padding: 0.65rem 0.75rem; border: 1px solid #b8d2ef; border-radius: 6px; background: #edf6ff; color: #244f7e; font-size: var(--type-small); line-height: 1.45; overflow-wrap: anywhere; }
    .admin-notice.error { border-color: #e6b9b4; background: #fff3f1; color: var(--danger); }
    .admin-access-card { margin-top: 0.85rem; padding: 0.9rem; border: 1px solid #afd8c2; border-radius: 7px; background: #f4fbf7; }
    .admin-access-card h3 { margin: 0; color: #1f5138; font-size: var(--type-title); }
    .admin-access-card > p { margin: 0.3rem 0 0; color: #4d685b; font-size: var(--type-label); line-height: 1.45; }
    .admin-access-data { display: grid; grid-template-columns: 8rem minmax(0, 1fr); margin: 0.8rem 0 0; border-top: 1px solid #cfe5d8; }
    .admin-access-data dt, .admin-access-data dd { min-width: 0; margin: 0; padding: 0.48rem 0; border-bottom: 1px solid #cfe5d8; font-size: var(--type-label); overflow-wrap: anywhere; }
    .admin-access-data dt { color: #577065; }
    .admin-access-data dd { color: #1e382c; font-weight: var(--weight-semibold); }
    .admin-access-secret { font-family: var(--font-mono); user-select: all; }
    .admin-access-warning { margin-top: 0.7rem; color: #76551a; font-size: var(--type-label); line-height: 1.45; }
    .admin-empty { padding: 1.75rem 0.8rem; color: var(--muted); font-size: var(--type-small); text-align: center; }

    #conversation-space {
      min-width: 0; min-height: 0; position: relative; grid-row: 2; display: grid; grid-template-columns: minmax(0, 1fr);
      overflow: hidden; background:
        radial-gradient(circle at 50% -12rem, rgba(255,255,255,0.94) 0, rgba(255,255,255,0) 32rem),
        #f6f7f8;
    }
    #conversation-space[hidden] { display: none; }
    #conversation-space.with-artifacts { grid-template-columns: minmax(0, 1fr) minmax(16rem, 19rem); gap: 0.9rem; padding: 0.9rem 0.9rem 0; }
    #chat-drop-zone {
      position: absolute; inset: 0.75rem; z-index: 8; display: grid; place-items: center;
      border: 2px dashed #78a5d4; border-radius: 12px; background: rgba(235, 245, 255, 0.94);
      opacity: 0; visibility: hidden; pointer-events: none;
      transition: opacity 120ms ease, visibility 120ms ease;
    }
    #conversation-space.file-drag-active #chat-drop-zone { opacity: 1; visibility: visible; }
    .chat-drop-card { display: grid; justify-items: center; gap: 0.42rem; padding: 1.2rem; color: #31587f; text-align: center; }
    .chat-drop-card svg { width: 2rem; height: 2rem; fill: none; stroke: #2d6eaf; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .chat-drop-card strong { color: #214b75; font-size: var(--type-title); }
    .chat-drop-card span { color: #607993; font-size: var(--type-label); }
    #messages {
      min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
      padding: 2rem max(1rem, calc((100% - var(--chat-width)) / 2)) 1.4rem; scroll-padding-block: 1.2rem;
      display: flex; flex-direction: column; gap: 0.32rem; background: transparent; -webkit-overflow-scrolling: touch;
      scrollbar-color: #c8d0da transparent; scrollbar-width: thin;
    }
    #chat-viewport {
      min-width: 0; min-height: 0; position: relative; grid-column: 1; grid-row: 1; overflow: hidden;
    }
    #chat-viewport #messages { width: 100%; height: 100%; }
    #chat-scroll-bottom {
      position: absolute; right: max(1rem, calc((100% - var(--chat-width)) / 2)); bottom: 0.85rem; z-index: 6;
      width: 2.6rem; height: 2.6rem; display: grid; place-items: center; padding: 0;
      border: 1px solid rgba(184,195,207,0.88); border-radius: 50%; background: rgba(255,255,255,0.92); color: #315f8e;
      box-shadow: 0 8px 24px rgba(25,43,64,0.16); cursor: pointer; backdrop-filter: blur(12px);
      transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease, transform 120ms ease;
    }
    #chat-scroll-bottom[hidden] { display: none; }
    #chat-scroll-bottom:hover { border-color: #8caaca; background: #f6faff; box-shadow: 0 7px 22px rgba(25,43,64,0.22); transform: translateY(-1px); }
    #chat-scroll-bottom:focus-visible { outline: 2px solid #3676b9; outline-offset: 2px; }
    #chat-scroll-bottom svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    #conversation-artifacts {
      min-width: 0; min-height: 0; max-height: min(40rem, calc(100% - 0.35rem)); align-self: start;
      display: grid; grid-template-rows: auto minmax(0, 1fr);
      overflow: hidden; border: 1px solid rgba(214,221,230,0.92); border-radius: 18px;
      background: rgba(255,255,255,0.9); box-shadow: 0 12px 36px rgba(30,43,59,0.08); backdrop-filter: blur(14px);
    }
    #conversation-artifacts[hidden] { display: none; }
    .conversation-artifacts-header {
      min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
      padding: 0.82rem 0.8rem 0.65rem; border-bottom: 1px solid #e8edf3;
    }
    #conversation-artifacts-collapse {
      min-width: 0; display: flex; align-items: center; gap: 0.42rem; padding: 0.16rem 0.2rem;
      border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
      transition: background 120ms ease, color 120ms ease;
    }
    #conversation-artifacts-collapse:hover { background: #f1f5f9; }
    #conversation-artifacts-collapse:disabled { cursor: default; }
    #conversation-artifacts-collapse:disabled:hover { background: transparent; }
    #conversation-artifacts-collapse:disabled svg { display: none; }
    #conversation-artifacts-collapse:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
    #conversation-artifacts-collapse svg {
      width: 1rem; height: 1rem; flex: 0 0 auto; fill: none; stroke: #6f7e90; stroke-width: 2;
      stroke-linecap: round; stroke-linejoin: round; transition: transform 160ms ease;
    }
    #conversation-artifacts.is-expanded #conversation-artifacts-collapse svg { transform: rotate(180deg); }
    .conversation-artifacts-heading { min-width: 0; display: grid; gap: 0.1rem; }
    .conversation-artifacts-header strong { color: #2d3a4d; font-size: var(--type-small); }
    #conversation-artifacts-count { color: var(--muted); font-size: var(--type-caption); }
    #conversation-artifacts-all {
      flex: 0 0 auto; padding: 0.2rem 0; border: 0; background: transparent; color: var(--blue);
      font: inherit; font-size: var(--type-caption); font-weight: var(--weight-semibold); cursor: pointer;
    }
    #conversation-artifacts-all:hover { text-decoration: underline; }
    #conversation-artifacts-list {
      min-height: 0; display: grid; align-content: start; gap: 0.5rem; overflow-y: auto;
      padding: 0.68rem 0.72rem 1rem; scrollbar-color: #c8d0da transparent; scrollbar-width: thin;
    }
    .conversation-artifact {
      min-width: 0; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.58rem; align-items: center;
      padding: 0.58rem; border: 1px solid #e0e5eb; border-radius: 11px; background: rgba(249,250,251,0.9);
      color: inherit; font: inherit; text-align: left; cursor: pointer;
      transition: border-color 120ms ease, background 120ms ease, transform 120ms ease, box-shadow 120ms ease;
    }
    .conversation-artifact:hover { border-color: #a9bfd8; background: #fff; box-shadow: 0 5px 16px rgba(29,50,73,0.08); transform: translateY(-1px); }
    .conversation-artifact:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
    .conversation-artifact-preview {
      width: 2.25rem; height: 2.25rem; display: grid; place-items: center; overflow: hidden;
      border-radius: 5px; background: #e5edf6; color: #4a6179; font-size: var(--type-caption); font-weight: var(--weight-bold);
    }
    .conversation-artifact-preview img { width: 100%; height: 100%; object-fit: cover; }
    .conversation-artifact-copy { min-width: 0; display: grid; gap: 0.12rem; }
    .conversation-artifact-copy strong { overflow: hidden; color: #273548; font-size: var(--type-label); text-overflow: ellipsis; white-space: nowrap; }
    .conversation-artifact-copy span { overflow: hidden; color: var(--muted); font-size: var(--type-caption); text-overflow: ellipsis; white-space: nowrap; }
    .empty-state { max-width: 22rem; margin: auto; color: var(--muted); text-align: center; font-size: var(--type-body); line-height: 1.55; }
    .empty-state::before { content: 'Л'; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; margin: 0 auto 0.72rem; border: 1px solid #d8e0e9; border-radius: 7px; background: #fff; color: #3b526d; font-weight: var(--weight-bold); box-shadow: 0 2px 8px rgba(26,38,54,0.06); }
    #messages[data-mode="team"] .empty-state::before { content: '•••'; color: #517190; letter-spacing: 0.08rem; }
    .empty-state strong { display: block; margin-bottom: 0.22rem; color: #334154; font-size: var(--type-title); font-weight: var(--weight-semibold); }
    .message-date-separator {
      align-self: center; margin: 1.05rem 0 0.72rem; padding: 0.24rem 0.58rem;
      border: 1px solid rgba(211,218,226,0.72); border-radius: 999px; background: rgba(255,255,255,0.72);
      color: #7b8796; font-size: var(--type-caption); font-weight: var(--weight-semibold); letter-spacing: 0;
    }
    .team-history-control { align-self: center; margin: 0 0 0.65rem; }
    .team-history-control button {
      min-height: 2rem; padding: 0.35rem 0.72rem; border: 1px solid #c8d5e2; border-radius: 999px;
      background: #fff; color: #45627f; font: inherit; font-size: var(--type-caption); font-weight: var(--weight-semibold); cursor: pointer;
    }
    .team-history-control button:hover { border-color: #98b2cd; background: #f4f8fc; }
    .team-history-control button:disabled { cursor: wait; opacity: 0.65; }
    .msg { position: relative; width: fit-content; max-width: min(72%, 34rem); flex: 0 0 auto; padding: 0.7rem 0.9rem 0.52rem; border-radius: 18px; font-size: 0.9375rem; line-height: 1.62; overflow-wrap: anywhere; word-break: normal; }
    .msg.user {
      align-self: flex-end; border: 1px solid rgba(207,214,222,0.7); border-bottom-right-radius: 7px;
      background: #e9edf1; color: #222d3b; box-shadow: 0 1px 2px rgba(26,38,54,0.04);
    }
    .msg.assistant {
      --team-author-color: #24766d; --team-author-soft: #e5f7f3;
      align-self: flex-start; width: fit-content; max-width: min(calc(100% - 2.35rem), 42rem); margin: 0.72rem 0 0 2.35rem;
      padding: 0.62rem 0.82rem 0.58rem; border: 1px solid rgba(45, 177, 161, 0.28); border-radius: 17px;
      border-bottom-left-radius: 7px; background: rgba(224, 248, 244, 0.82); color: #1d302e;
      box-shadow: 0 1px 2px rgba(24, 57, 52, 0.05);
    }
    .msg-avatar {
      position: absolute; top: -0.02rem; left: -2.35rem; width: 1.7rem; height: 1.7rem; display: grid; place-items: center;
      border: 1px solid color-mix(in srgb, var(--team-author-color, #d7dfe8) 58%, #fff); border-radius: 50%;
      background: var(--team-author-soft, #fff); color: var(--team-author-color, #36536f);
      box-shadow: 0 2px 8px rgba(27,39,53,0.08); font-size: var(--type-label); font-weight: var(--weight-bold); user-select: none;
    }
    .msg-author { min-height: 1.75rem; display: flex; align-items: center; margin: 0; padding-right: 7.4rem; color: #344a61; font-size: var(--type-label); font-weight: var(--weight-semibold); }
    .msg.assistant .msg-text { margin-top: 0.34rem; }
    .msg.assistant .msg-dttm { position: absolute; top: 0.72rem; right: 0.82rem; margin: 0; }
    .answer-collapsible { cursor: pointer; }
    .answer-expander {
      width: fit-content; min-height: 1.8rem; margin: 0.3rem 0 0; padding: 0.22rem 0.56rem;
      border: 1px solid #c9d6e4; border-radius: 999px; background: rgba(255,255,255,0.76);
      color: #45627f; font: inherit; font-size: var(--type-caption); font-weight: var(--weight-semibold);
      line-height: 1.2; cursor: pointer;
    }
    .answer-expander:hover { border-color: #9eb6cf; background: #f4f8fc; }
    .answer-expander:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
    .msg.team-message.agent > .answer-expander { margin-top: 0.42rem; }
    .personal-chat-message > .answer-expander { margin-top: 0.38rem; }
    .msg.team-message { min-width: 0; color: var(--text); }
    .msg.team-message.own {
      align-self: flex-end; max-width: min(72%, 34rem); padding: 0.62rem 0.82rem 0.48rem;
      border: 1px solid color-mix(in srgb, var(--team-author-color, #7e9ab5) 12%, transparent);
      border-bottom-right-radius: 7px; background: color-mix(in srgb, var(--team-author-soft, #e7eff7) 70%, #fff);
      box-shadow: 0 1px 2px rgba(24,36,52,0.04);
    }
    .msg.team-message.other {
      align-self: flex-start; max-width: min(calc(100% - 2.35rem), 36rem); display: grid; grid-template-columns: auto auto;
      justify-content: start; column-gap: 0.55rem; row-gap: 0.18rem; margin: 0.62rem 0 0 2.35rem;
      padding: 0.6rem 0.78rem 0.64rem; border: 1px solid color-mix(in srgb, var(--team-author-color, #7e9ab5) 12%, transparent);
      border-radius: 17px; border-bottom-left-radius: 7px; background: color-mix(in srgb, var(--team-author-soft, #f3f6f9) 52%, #fff);
      box-shadow: 0 1px 2px rgba(24,36,52,0.04);
    }
    .msg.team-message.agent {
      width: fit-content; max-width: min(calc(100% - 2.35rem), 42rem); margin: 0.72rem 0 0 2.35rem;
      padding: 0.62rem 0.82rem 0.64rem; border-color: rgba(45, 177, 161, 0.28); border-radius: 17px;
      border-bottom-left-radius: 7px; background: rgba(224, 248, 244, 0.82); box-shadow: 0 1px 2px rgba(24, 57, 52, 0.05);
    }
    .msg.team-message.agent .msg-avatar { display: grid; }
    .msg.team-message.agent.pending { min-width: 0; color: var(--muted); }
    .msg.team-message.agent.pending.queued .msg-text { color: #667487; font-size: var(--type-small); font-weight: var(--weight-semibold); }
    .team-message-author { grid-column: 1; margin: 0; color: var(--team-author-color, #456784); font-size: var(--type-label); font-weight: var(--weight-semibold); }
    .msg.team-message.other .msg-text, .msg.team-message.other .team-attachments { grid-column: 1 / -1; }
    .msg.team-message.other .msg-text { min-width: 0; width: 100%; }
    .msg.team-message.other .team-message-meta { grid-column: 2; grid-row: 1; align-self: center; margin: 0; text-align: left; }
    .team-message-meta { margin-top: 0.3rem; color: rgba(94,105,120,0.72); font-size: var(--type-caption); line-height: 1; font-variant-numeric: tabular-nums; text-align: right; user-select: none; }
    .message-actions {
      position: absolute; z-index: 2; display: flex; align-items: center; gap: 0.18rem; width: fit-content; margin: 0;
      opacity: 0; pointer-events: none; transform: translateY(2px); transition: opacity 120ms ease, transform 120ms ease;
    }
    .msg:hover > .message-actions, .msg:focus-within > .message-actions { opacity: 1; pointer-events: auto; transform: translateY(0); }
    .msg.assistant > .message-actions, .msg.team-message.agent > .message-actions { top: 0.42rem; right: 3.35rem; }
    .msg.user > .message-actions, .msg.team-message.own > .message-actions { bottom: 0.28rem; left: 0.58rem; }
    .msg.team-message.other > .message-actions { top: 0.38rem; right: 0.52rem; grid-column: auto; }
    .msg.team-message.other .team-message-meta { margin-right: 3.35rem; }
    .message-action {
      width: 1.72rem; height: 1.72rem; display: grid; place-items: center; padding: 0;
      border: 1px solid transparent; border-radius: 7px; background: transparent; color: #647386; cursor: pointer;
    }
    .message-action:hover { border-color: rgba(118, 137, 158, 0.24); background: rgba(255,255,255,0.72); color: #36556f; }
    .message-action:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; opacity: 1; }
    .message-action.done { color: #24766d; background: rgba(255,255,255,0.8); }
    .message-action svg { width: 0.92rem; height: 0.92rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .team-mention { padding: 0.04em 0.16em; border-radius: 3px; background: #e7f0fb; color: #245f9f; font-weight: var(--weight-semibold); }
    .team-mention.self { background: #e5f4eb; color: #256543; }
    .team-mention.all { background: #fff0d7; color: #865615; }
    .msg.team-message.mentions-me .msg-text { width: fit-content; padding: 0.18rem 0.34rem; border-radius: 4px; background: #eef8f2; }
    .msg.team-message.mention-focus { animation: mention-focus 1.8s ease-out; }
    @keyframes mention-focus {
      0%, 30% { filter: drop-shadow(0 0 0.45rem rgba(182,109,23,0.38)); transform: translateY(-1px); }
      100% { filter: none; transform: none; }
    }
    .team-attachments { display: grid; gap: 0.36rem; margin-top: 0.35rem; }
    .team-attachment { width: min(22rem, 100%); min-width: 0; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0.48rem; align-items: center; padding: 0.4rem; border: 1px solid #c9d6e4; border-radius: 6px; background: rgba(255,255,255,0.72); color: inherit; text-align: left; cursor: pointer; }
    .team-attachment:hover { border-color: #9eb8d5; background: #fff; }
    .team-attachment-type { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 4px; background: #e4edf6; color: #4f6277; font-size: var(--type-caption); font-weight: var(--weight-bold); }
    .team-attachment-copy { min-width: 0; }
    .team-attachment-copy strong, .team-attachment-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .team-attachment-copy strong { font-size: var(--type-label); }
    .team-attachment-copy span { margin-top: 0.08rem; color: var(--muted); font-size: var(--type-caption); }
    .team-voice { width: min(24rem, 100%); display: grid; gap: 0.38rem; }
    .team-audio { width: min(20rem, 100%); height: 2.4rem; }
    .team-voice-transcript {
      padding: 0.38rem 0.52rem 0.44rem; border: 1px solid rgba(118,137,158,0.18); border-radius: 8px;
      background: rgba(255,255,255,0.54); color: #33465a;
    }
    .team-voice-transcript summary { color: #667487; font-size: var(--type-caption); font-weight: var(--weight-semibold); cursor: pointer; }
    .team-voice-transcript-text { margin-top: 0.3rem; font-size: var(--type-small); line-height: 1.48; white-space: pre-wrap; overflow-wrap: anywhere; }
    .team-voice-transcript-status { color: #778395; font-size: var(--type-caption); line-height: 1.35; }
    .msg.assistant.pending { min-width: 6.4rem; padding: 0.72rem 0.82rem; border: 1px solid #e0e5eb; border-radius: 14px; background: rgba(255,255,255,0.64); color: var(--muted); }
    .msg.assistant.pending .msg-dttm { display: none; }
    .assistant-progress { width: min(100%, 42rem); display: grid; gap: 0.52rem; }
    .assistant-progress-main { min-height: 1.35rem; display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
    .assistant-progress-line { min-width: 0; color: #526175; font-size: var(--type-small); font-weight: var(--weight-semibold); line-height: 1.4; }
    .assistant-progress-meta { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.42rem; color: #69778c; }
    .assistant-progress-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
    .assistant-progress-chips[hidden] { display: none; }
    .assistant-progress-chip {
      max-width: min(18rem, 100%); overflow: hidden; padding: 0.13rem 0.48rem;
      border: 1px solid #d3dfed; border-radius: 999px; background: #fff; color: #526070;
      font-size: var(--type-caption); font-weight: var(--weight-semibold); line-height: 1.35;
      text-overflow: ellipsis; white-space: nowrap;
    }
    .assistant-progress-chip.context { border-color: #e1d2f2; background: #faf6ff; color: #674391; }
    .assistant-progress-chip.tool { border-color: #cce4d5; background: #f4faf6; color: #286a49; }
    .assistant-progress-chip.skill { border-color: #cbdaf1; background: #f4f7fc; color: #315b8a; }
    .assistant-progress-chip.plan { border-color: #efd9b6; background: #fff9ef; color: #805a22; }
    .assistant-activity-elapsed { min-width: 2.4rem; color: #69778c; font-variant-numeric: tabular-nums; font-weight: var(--weight-regular); }
    .assistant-activity-dots { display: inline-flex; gap: 0.18rem; width: 1.22rem; }
    .assistant-activity-dots span { width: 0.24rem; height: 0.24rem; border-radius: 50%; background: currentColor; opacity: 0.28; animation: thinking-pulse 1.2s ease-in-out infinite; }
    .assistant-activity-dots span:nth-child(2) { animation-delay: 0.16s; }
    .assistant-activity-dots span:nth-child(3) { animation-delay: 0.32s; }
    .msg.assistant.streaming:not(.pending) .msg-text::after { content: ''; display: inline-block; width: 0.3rem; height: 0.3rem; margin-left: 0.34rem; border-radius: 50%; background: var(--blue); vertical-align: 0.08rem; animation: stream-pulse 1.2s ease-in-out infinite; }
    .msg-text { white-space: pre-wrap; }
    .msg-text a,
    .personal-chat-message-body a {
      color: var(--blue); font-weight: var(--weight-semibold);
      text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.16em;
      overflow-wrap: anywhere;
    }
    .msg-text a:hover,
    .personal-chat-message-body a:hover { color: var(--blue-dark); }
    .msg-text a:focus-visible,
    .personal-chat-message-body a:focus-visible {
      border-radius: 2px; outline: 2px solid color-mix(in srgb, var(--blue) 55%, transparent); outline-offset: 2px;
    }
    .msg-file-list { display: flex; flex-wrap: wrap; gap: 0.28rem; margin-top: 0.32rem; }
    .msg-file { max-width: 14rem; overflow: hidden; padding: 0.2rem 0.34rem; border: 1px solid #bdcad8; border-radius: 4px; font-size: var(--type-caption); text-overflow: ellipsis; white-space: nowrap; }
    .msg-dttm { margin-top: 0.3rem; color: rgba(94,105,120,0.68); font-size: var(--type-caption); line-height: 1; font-variant-numeric: tabular-nums; text-align: right; user-select: none; }
    .msg.user .msg-dttm, .msg.team-message.own .team-message-meta { min-height: 1.72rem; display: flex; align-items: center; justify-content: flex-end; margin-top: 0.18rem; color: #718094; }
    #messages[data-mode="chat"] .msg.assistant:not(.pending) {
      width: fit-content; max-width: min(calc(100% - 2.35rem), 42rem); margin: 0.72rem 0 0 2.35rem;
      padding: 0.62rem 0.82rem 0.58rem; font-size: 0.9375rem; line-height: 1.62;
    }
    #messages[data-mode="chat"] .msg.assistant .msg-avatar { display: grid; }
    #messages[data-mode="chat"] .msg.assistant .msg-author { display: flex; }
    #messages[data-mode="chat"] .msg.assistant .msg-text { margin-top: 0.34rem; }
    #messages[data-mode="chat"] .msg.assistant .msg-dttm {
      position: absolute; top: 0.72rem; right: 0.82rem; margin: 0; color: rgba(94,105,120,0.62); text-align: right;
    }
    #messages[data-mode="chat"] .msg.assistant.pending {
      width: fit-content; max-width: min(calc(100% - 2.35rem), 42rem); margin-left: 2.35rem;
    }
    @media (hover: none), (pointer: coarse) {
      .message-actions { opacity: 0.72; pointer-events: auto; transform: none; }
    }
    #messages[data-mode="chat"] .msg.user { max-width: min(72%, 31rem); }
    @keyframes thinking-pulse { 0%, 65%, 100% { opacity: 0.28; } 30% { opacity: 0.82; } }
    @keyframes stream-pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.75; } }
    @media (prefers-reduced-motion: reduce) {
      .assistant-activity-dots span, .msg.assistant.streaming:not(.pending) .msg-text::after { animation: none; opacity: 0.55; }
      .boot-workspace-visual, .boot-stage, .boot-brand-core, .boot-result-core, .boot-result-check, .boot-flow, .boot-flow-node, .boot-copy span::before, #workspace-progress::after { animation: none; }
      #chat-drop-zone { transition: none; }
      #chat-scroll-bottom { transition: none; }
    }
    @media (max-width: 620px) {
      .boot-workspace { width: min(18rem, calc(100vw - 1.5rem)); }
      .boot-scene { gap: 1rem; }
    }
    @media (max-width: 620px) {
      .assistant-progress-main { align-items: flex-start; gap: 0.55rem; }
      .assistant-progress-line { font-size: var(--type-label); }
      .assistant-progress-chip { max-width: 100%; }
    }
    .markdown-message > :first-child { margin-top: 0; }
    .markdown-message > :last-child { margin-bottom: 0; }
    .markdown-message p { margin: 0.48em 0; }
    .markdown-message h2, .markdown-message h3, .markdown-message h4, .markdown-message h5 { margin: 0.78em 0 0.3em; font-size: 1.04em; line-height: 1.38; }
    .markdown-message ul, .markdown-message ol { margin: 0.48em 0; padding-left: 1.4em; }
    .markdown-message li { margin: 0.2em 0; }
    .markdown-message code { padding: 0.12em 0.34em; border-radius: 5px; background: #e9edf1; font-family: var(--font-mono); font-size: 0.88em; }
    .markdown-message pre { max-width: 100%; overflow-x: auto; margin: 0.62em 0; padding: 0.78em 0.9em; border: 1px solid #e0e4e9; border-radius: 10px; background: #edf0f3; }
    .markdown-message pre code { padding: 0; background: none; }
    .markdown-message a { color: var(--blue); }
    .markdown-message blockquote { margin: 0.55em 0; padding-left: 0.82em; border-left: 3px solid #c8d1db; color: #556171; }
    .msg .markdown-table {
      width: 100%; max-width: 100%; overflow-x: auto; margin: 0.7rem 0;
      border: 1px solid #d8e1ea; border-radius: 7px; background: #fff;
      overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch;
    }
    .msg .markdown-table table { width: 100%; min-width: 36rem; border-collapse: collapse; table-layout: auto; }
    .msg .markdown-table th, .msg .markdown-table td {
      padding: 0.52rem 0.62rem; border-bottom: 1px solid #e2e8ef;
      overflow-wrap: normal; word-break: normal; text-align: left; vertical-align: top;
    }
    .msg .markdown-table th { background: #f2f6fa; color: #34475b; font-weight: var(--weight-semibold); white-space: nowrap; }
    .msg .markdown-table th + th, .msg .markdown-table td + td { border-left: 1px solid #e2e8ef; }
    .msg .markdown-table tbody tr:last-child td { border-bottom: 0; }
    .artifact-card { max-width: min(74%, 46rem); align-self: flex-start; margin-left: 2.55rem; display: grid; gap: 0.34rem; padding: 0.68rem 0.78rem; border: 1px solid #bcd2ec; border-radius: 8px; background: #edf5ff; font-size: var(--type-body); box-shadow: 0 1px 2px rgba(25,36,51,0.06); }
    .artifact-kicker { color: #55708f; font-size: var(--type-label); text-transform: uppercase; }
    .artifact-title { font-weight: var(--weight-semibold); }
    .artifact-meta { color: #5d6b7c; font-size: var(--type-label); }
    .artifact-link { width: fit-content; padding: 0.34rem 0.58rem; border: 0; border-radius: 5px; background: var(--blue); color: #fff; font: inherit; text-decoration: none; font-size: var(--type-label); cursor: pointer; }
    .artifact-link:hover { background: var(--blue-dark); }

    #composer {
      min-width: 0; grid-row: 3; position: relative; z-index: 5;
      padding: 0.75rem 0 calc(0.78rem + var(--safe-bottom));
      background: linear-gradient(to bottom, rgba(246,247,248,0), #f6f7f8 35%);
    }
    @media (min-width: 1181px) {
      #conversation-space.with-artifacts + #composer {
        display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 19rem); column-gap: 0.9rem;
        padding-right: 0.9rem; padding-left: 0.9rem;
      }
      #conversation-space.with-artifacts + #composer > * { grid-column: 1; }
    }
    #chat-message-queue {
      width: min(calc(100% - 2rem), var(--chat-width)); max-height: 10.5rem; overflow: hidden;
      margin: 0 auto 0.42rem; border: 1px solid #c6d8eb; border-radius: 8px; background: #f2f7fc;
      box-shadow: 0 1px 3px rgba(31, 69, 106, 0.06);
    }
    #chat-message-queue[hidden] { display: none; }
    .chat-message-queue-header { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; padding: 0.42rem 0.55rem 0.36rem; color: #31597f; }
    .chat-message-queue-header > div { display: flex; align-items: baseline; gap: 0.32rem; }
    .chat-message-queue-header strong { font-size: var(--type-label); font-weight: var(--weight-bold); }
    .chat-message-queue-header span, .chat-message-queue-header small { color: #647b91; font-size: var(--type-caption); }
    #chat-message-queue-list { max-height: 7.8rem; overflow-y: auto; border-top: 1px solid #d8e4ef; }
    .chat-message-queue-item { min-width: 0; display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) 1.8rem; gap: 0.45rem; align-items: center; padding: 0.42rem 0.48rem; }
    .chat-message-queue-item + .chat-message-queue-item { border-top: 1px solid #dce6ef; }
    .chat-message-queue-position { width: 1.5rem; height: 1.5rem; display: grid; place-items: center; border-radius: 50%; background: #dceafb; color: #2a5f93; font-size: var(--type-caption); font-weight: var(--weight-bold); }
    .chat-message-queue-copy { min-width: 0; }
    .chat-message-queue-text { overflow: hidden; color: #26384b; font-size: var(--type-label); font-weight: var(--weight-semibold); text-overflow: ellipsis; white-space: nowrap; }
    .chat-message-queue-meta { margin-top: 0.08rem; color: #6c7d8f; font-size: var(--type-caption); }
    .chat-message-queue-remove { width: 1.8rem; height: 1.8rem; display: grid; place-items: center; border: 0; border-radius: 5px; background: transparent; color: #64768a; font-size: var(--type-title); cursor: pointer; }
    .chat-message-queue-remove:hover { background: #dfeaf5; color: #274d72; }
    #pending-attachments { width: min(calc(100% - 2rem), var(--chat-width)); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.55rem; align-items: center; margin: 0 auto 0.42rem; }
    #pending-attachments[hidden] { display: none; }
    #pending-attachment-list { min-width: 0; display: flex; gap: 0.38rem; overflow-x: auto; }
    .pending-attachment { min-width: 0; max-width: 14rem; flex: 0 0 auto; display: grid; grid-template-columns: 2rem minmax(0, 1fr) 1.65rem; gap: 0.36rem; align-items: center; padding: 0.3rem; border: 1px solid #cbd6e2; border-radius: 6px; background: #f8fafc; }
    .pending-attachment-preview { width: 2rem; height: 2rem; display: grid; place-items: center; overflow: hidden; border-radius: 4px; background: #e7edf4; color: #536274; font-size: var(--type-caption); font-weight: var(--weight-bold); }
    .pending-attachment-preview img { width: 100%; height: 100%; object-fit: cover; }
    .project-file-type,
    .conversation-artifact-preview,
    .team-attachment-type,
    .pending-attachment-preview {
      overflow: hidden;
      font-size: 0.5625rem;
      line-height: 1;
      letter-spacing: -0.01em;
      text-align: center;
      white-space: nowrap;
    }
    .pending-attachment-copy { min-width: 0; }
    .pending-attachment-name { overflow: hidden; color: #263244; font-size: var(--type-label); font-weight: var(--weight-semibold); text-overflow: ellipsis; white-space: nowrap; }
    .pending-attachment-size { margin-top: 0.08rem; color: var(--muted); font-size: var(--type-caption); }
    .pending-attachment-remove { width: 1.65rem; height: 1.65rem; display: grid; place-items: center; border: 0; border-radius: 4px; background: transparent; color: #697587; font-size: var(--type-title); cursor: pointer; }
    .pending-attachment-remove:hover { background: #e7edf4; color: #253143; }
    .team-attachment-visibility { min-height: 1.9rem; display: inline-flex; align-items: center; padding: 0.28rem 0.48rem; border: 1px solid #b9d5c5; border-radius: 5px; background: #f0f8f3; color: #2f704c; font-size: var(--type-label); font-weight: var(--weight-semibold); white-space: nowrap; }
    #team-chat-options {
      width: min(calc(100% - 2rem), var(--chat-width)); display: flex; align-items: center;
      justify-content: space-between; gap: 0.75rem; margin: 0 auto 0.42rem;
    }
    #team-chat-options[hidden] { display: none; }
    #chat-utility-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 0.4rem; margin-left: auto; }
    #team-agent-option label { width: fit-content; display: inline-flex; gap: 0.48rem; align-items: center; padding: 0.32rem 0.52rem; border: 1px solid rgba(207,216,225,0.8); border-radius: 999px; background: rgba(255,255,255,0.72); color: #4f5e70; cursor: pointer; user-select: none; }
    #team-agent-request { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .team-agent-check { width: 2rem; height: 1.12rem; position: relative; flex: 0 0 auto; border: 1px solid #aebbc9; border-radius: 999px; background: #dbe2e9; transition: background 120ms ease, border-color 120ms ease; }
    .team-agent-check::after { content: ''; position: absolute; top: 0.13rem; left: 0.14rem; width: 0.72rem; height: 0.72rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(23,35,49,0.24); transition: transform 120ms ease; }
    #team-agent-request:checked + .team-agent-check { border-color: #245f9f; background: #245f9f; }
    #team-agent-request:checked + .team-agent-check::after { transform: translateX(0.84rem); }
    #team-agent-request:focus-visible + .team-agent-check { outline: 2px solid #7aa8d8; outline-offset: 2px; }
    #team-agent-request:disabled + .team-agent-check { opacity: 0.5; }
    #team-agent-option strong, #team-agent-option small { display: block; }
    #team-agent-option strong { color: #33465a; font-size: var(--type-label); font-weight: var(--weight-semibold); }
    #team-agent-option small { margin-top: 0.04rem; color: var(--muted); font-size: var(--type-caption); }
    #conversation-artifacts-toggle {
      flex: 0 0 auto; min-height: 1.9rem; padding: 0.28rem 0.5rem; border: 1px solid #b8c8d8;
      border-radius: 5px; background: #fff; color: #45627f; font: inherit; font-size: var(--type-caption);
      font-weight: var(--weight-semibold); cursor: pointer;
    }
    #conversation-artifacts-toggle { display: none; }
    #conversation-artifacts-toggle:hover { border-color: #8faaca; background: #f3f7fb; }
    .team-turn-retry {
      justify-self: start; margin-top: 8px; padding: 7px 11px;
      border: 1px solid #bfd0e1; border-radius: 999px;
      background: #f7fafc; color: #315b82; font: inherit; font-size: var(--type-small);
      font-weight: var(--weight-semibold); cursor: pointer;
    }
    .team-turn-retry:hover { background: #edf4fa; }
    .team-turn-retry:disabled { cursor: wait; opacity: .65; }
    #team-mention-menu { width: min(calc(100% - 2rem), var(--chat-width)); max-height: 13rem; overflow-y: auto; margin: 0 auto 0.38rem; padding: 0.28rem; border: 1px solid #c8d5e2; border-radius: 7px; background: #fff; box-shadow: 0 10px 28px rgba(24,36,52,0.14); }
    #team-mention-menu[hidden] { display: none; }
    .team-mention-option { width: 100%; display: grid; grid-template-columns: 1.8rem minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; min-height: 2.5rem; padding: 0.3rem 0.42rem; border: 0; border-radius: 5px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
    .team-mention-option:hover, .team-mention-option.active { background: #edf4fb; }
    .team-mention-avatar { width: 1.8rem; height: 1.8rem; display: grid; place-items: center; border-radius: 50%; background: #dce8f2; color: #2f506c; font-size: var(--type-caption); font-weight: var(--weight-bold); }
    .team-mention-option.all .team-mention-avatar { background: #fff0d7; color: #865615; font-size: 0.58rem; }
    .team-mention-name { min-width: 0; overflow: hidden; font-size: var(--type-label); font-weight: var(--weight-semibold); text-overflow: ellipsis; white-space: nowrap; }
    .team-mention-id { color: var(--muted); font-size: var(--type-caption); }
    #form {
      width: min(calc(100% - 2rem), var(--chat-width)); min-height: 5.45rem; display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-rows: minmax(2.45rem, auto) auto;
      align-items: end; column-gap: 0.2rem; row-gap: 0.12rem; margin: 0 auto; padding: 0.5rem;
      border: 1px solid rgba(193,202,212,0.9); border-radius: 19px; background: rgba(255,255,255,0.94);
      box-shadow: 0 12px 34px rgba(26,38,54,0.11), 0 2px 6px rgba(26,38,54,0.05);
      backdrop-filter: blur(18px); transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
    }
    #form:focus-within { border-color: #8aaed7; box-shadow: 0 0 0 3px rgba(35,99,166,0.09), 0 14px 38px rgba(24,36,52,0.13); }
    .composer-tool, #send { width: 2.35rem; height: 2.35rem; display: grid; place-items: center; padding: 0; border-radius: 50%; cursor: pointer; }
    .composer-tool { border: 0; background: transparent; color: #586779; }
    .composer-tool:hover { background: #edf3f8; color: var(--blue); }
    .composer-tool.recording { border-color: #d92d20; background: #fff1f0; color: #b42318; }
    .composer-tool svg, #send svg { width: 1.08rem; height: 1.08rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    #input {
      grid-column: 1 / -1; grid-row: 1; width: 100%; min-width: 0; height: 2.55rem; min-height: 2.55rem; max-height: 10rem;
      overflow-x: hidden; overflow-y: auto; padding: 0.58rem 0.62rem 0.35rem; border: 0; border-radius: 10px;
      background: transparent; color: var(--text); font-size: 0.9375rem; line-height: 1.5; overflow-wrap: anywhere;
      resize: none; white-space: pre-wrap; outline: none;
    }
    #attach-file { grid-column: 1; grid-row: 2; }
    #record-voice { grid-column: 3; grid-row: 2; }
    #send { grid-column: 4; grid-row: 2; }
    #input::placeholder { color: #929ca9; }
    #input:focus { box-shadow: none; }
    #send { border: 0; background: #1d5f9f; color: #fff; box-shadow: 0 3px 9px rgba(29,95,159,0.22); }
    #send:hover { background: #194f89; }
    #send .stop-icon { display: none; }
    #send.stopping { background: #d92d20; }
    #send.stopping:hover { background: #b42318; }
    #send.stopping .send-icon { display: none; }
    #send.stopping .stop-icon { display: block; }
    #send .stop-icon rect { fill: currentColor; stroke: none; }
    #composer-status { width: min(calc(100% - 2rem), var(--chat-width)); min-height: 1.15rem; margin: 0.35rem auto -0.1rem; color: var(--muted); font-size: var(--type-label); }
    #composer-status[hidden] { display: none; }
    #composer-status.error { color: #b42318; }
    #send:disabled, #input:disabled, .composer-tool:disabled { opacity: 0.48; cursor: default; }
    #sidebar-backdrop { display: none; }

    @media (max-width: 1180px) {
      #conversation-space.with-artifacts { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 0.55rem; padding: 0.55rem 0.55rem 0; }
      #conversation-artifacts { min-height: 0; max-height: 8.5rem; align-self: stretch; grid-template-rows: auto auto; border: 1px solid var(--line); border-radius: 14px; }
      .conversation-artifacts-header { padding: 0.48rem max(0.8rem, var(--safe-right)) 0.38rem max(0.8rem, var(--safe-left)); border-bottom: 0; }
      .conversation-artifacts-heading { display: flex; align-items: baseline; gap: 0.38rem; }
      #conversation-artifacts-list { display: flex; gap: 0.48rem; overflow-x: auto; overflow-y: hidden; padding: 0 0.8rem 0.62rem; }
      .conversation-artifact { width: min(17rem, 72vw); flex: 0 0 auto; padding: 0.46rem; }
    }

    @media (max-width: 900px) {
      body { font-family: var(--font-system); }
      .project-participant-remove { opacity: 1; }
      #app { grid-template-columns: minmax(0, 1fr); }
      #app.sidebar-collapsed { grid-template-columns: minmax(0, 1fr); }
      html.sidebar-open, body.sidebar-open { background: var(--sidebar); }
      #sidebar {
        position: fixed; inset: 0 auto auto 0; z-index: 20; width: min(86vw, 18rem); height: 100vh; height: 100dvh;
        margin: 0; border-width: 0 1px 0 0; border-radius: 0 1rem 1rem 0;
        transform: translateX(-102%); transition: transform 160ms ease; box-shadow: 16px 0 40px rgba(15,20,28,0.24);
      }
      .sidebar-search { min-height: 2.75rem; }
      .project-company-heading { min-height: 2.75rem; }
      .project-item {
        min-height: 2.75rem; grid-template-columns: 1.65rem minmax(0, 1fr); gap: 0.52rem;
        padding: 0.34rem 0.46rem;
      }
      .project-pin { width: 2.5rem; height: 2.5rem; opacity: 1; }
      .project-pin svg { width: 1.02rem; height: 1.02rem; }
      .project-badge,
      .project-item.project-child .project-badge { width: 1.65rem; height: 1.65rem; }
      .project-copy strong { font-size: 0.8rem; }
      #user-menu-toggle { min-height: 2.75rem; }
      #sidebar-resizer { display: none; }
      body.sidebar-open #sidebar { transform: translateX(0); }
      #sidebar-backdrop {
        position: fixed; inset: 0 auto auto 0; z-index: 15; display: block; width: 100vw; height: 100vh; height: 100dvh;
        border: 0; background: rgba(15,20,28,0.42); opacity: 0; pointer-events: none; transition: opacity 160ms ease;
      }
      body.sidebar-open #sidebar-backdrop { opacity: 1; pointer-events: auto; }
      #sidebar-toggle {
        width: 2.75rem; height: 2.75rem; display: grid; place-items: center;
        padding: 0; border: 1px solid #ccd6e2; border-radius: 6px; background: #fff; color: #334155; cursor: pointer;
      }
      #sidebar-toggle svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
      #workspace-header {
        min-height: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; gap: 0; padding: 0;
      }
      #workspace-bar {
        grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.62rem;
        padding: calc(0.55rem + var(--safe-top)) max(0.72rem, var(--safe-right)) 0.55rem max(0.72rem, var(--safe-left));
      }
      #project-header-identity { gap: 0.52rem; }
      #project-header-icon { width: 2.2rem; height: 2.2rem; }
      #project-description { max-width: 100%; }
      #model-control { min-width: 0; }
      #model-select { min-height: 2.75rem; }
      #project-navigation {
        width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.38rem;
        padding: 0.42rem max(0.46rem, var(--safe-right)) 0.42rem max(0.46rem, var(--safe-left));
        overflow-x: auto; border-top: 1px solid #edf0f3; scrollbar-width: none; -webkit-overflow-scrolling: touch;
      }
      #project-navigation::-webkit-scrollbar { display: none; }
      #project-subviews { width: auto; min-width: max-content; padding: 0; overflow: visible; border: 0; }
      .project-subview-group { width: auto; justify-content: flex-start; }
      .project-subview-tab { min-height: 2.3rem; flex: 1 0 auto; padding: 0.45rem 0.62rem; white-space: nowrap; }
      #chat-subviews { justify-content: flex-start; gap: 0.32rem; }
      #chat-mode-switch .project-subview-tab { min-height: 1.9rem; flex: 0 0 auto; padding: 0.32rem 0.56rem; }
      #passport-subviews {
        min-height: 3.15rem; justify-content: flex-start;
        padding: 0.32rem max(0.72rem, var(--safe-right)) 0.28rem max(0.72rem, var(--safe-left));
      }
      #project-inspector { padding: 0.7rem 0.75rem; }
      #project-inspector.with-project-tabs { padding-top: calc(3.15rem + 0.7rem); }
      .passport-columns { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
      .project-document-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .project-document-link { border-bottom: 1px solid var(--line); }
      .project-document-link:nth-child(2n) { border-right: 0; }
      .project-document-link:last-child { border-bottom: 0; }
      .project-context-editor textarea { min-height: 12rem; font-size: var(--type-title); }
      #preview-dialog {
        position: fixed; inset: 0; width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none;
        margin: 0; overflow: hidden; border: 0; border-radius: 0; box-shadow: none;
      }
      #knowledge-editor-dialog {
        position: fixed; inset: 0; width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none;
        margin: 0; overflow: hidden; border: 0; border-radius: 0; box-shadow: none;
      }
      #add-dialog {
        position: fixed; inset: auto 0 0; width: 100vw; max-width: none; max-height: calc(100dvh - var(--safe-top));
        margin: 0; border-width: 1px 0 0; border-radius: 8px 8px 0 0; box-shadow: 0 -18px 46px rgba(16,24,40,0.2);
      }
      .add-header { padding: 0.65rem max(0.75rem, var(--safe-right)) 0.65rem max(0.75rem, var(--safe-left)); }
      #add-options, #meeting-workflow { padding-right: max(0.85rem, var(--safe-right)); padding-bottom: calc(0.85rem + var(--safe-bottom)); padding-left: max(0.85rem, var(--safe-left)); }
      #add-back, #add-close { width: 2.75rem; height: 2.75rem; }
      .add-option { min-height: 4.25rem; }
      #meeting-title { font-size: var(--type-title); }
      .meeting-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .meeting-actions button { min-height: 2.75rem; }
      #meeting-primary, #meeting-open-materials { grid-column: 1 / -1; }
      .knowledge-editor-header {
        padding-top: calc(0.55rem + var(--safe-top));
        padding-right: max(0.65rem, var(--safe-right));
        padding-bottom: 0.55rem;
        padding-left: max(0.8rem, var(--safe-left));
      }
      .knowledge-editor-footer {
        padding-right: max(0.8rem, var(--safe-right));
        padding-bottom: calc(0.55rem + var(--safe-bottom));
        padding-left: max(0.8rem, var(--safe-left));
      }
      #knowledge-editor-document { padding: 1.15rem max(1rem, var(--safe-right)) 2rem max(1rem, var(--safe-left)); }
      #knowledge-editor-text { padding: 0.8rem max(0.8rem, var(--safe-right)) 0.8rem max(0.8rem, var(--safe-left)); font-size: var(--type-title); }
      .preview-header {
        padding-top: calc(0.55rem + var(--safe-top));
        padding-right: max(0.65rem, var(--safe-right));
        padding-bottom: 0.55rem;
        padding-left: max(0.8rem, var(--safe-left));
      }
      #preview-close { width: 2.75rem; height: 2.75rem; font-size: var(--type-metric); }
      #messages { padding: 1.15rem max(0.8rem, var(--safe-right)) 1rem max(0.8rem, var(--safe-left)); gap: 0.24rem; }
      #chat-scroll-bottom { right: max(0.8rem, var(--safe-right)); bottom: 0.7rem; width: 2.75rem; height: 2.75rem; }
      #conversation-artifacts { max-height: 8rem; }
      .message-date-separator { margin-top: 0.65rem; }
      .msg { max-width: 88%; padding: 0.62rem 0.76rem 0.46rem; font-size: var(--type-title); line-height: 1.55; }
      .msg.assistant { width: fit-content; max-width: calc(100% - 2.3rem); margin-left: 2.3rem; padding: 0.62rem 0.76rem 0.54rem; }
      .msg.team-message.other { max-width: calc(100% - 2.3rem); margin-left: 2.3rem; }
      .msg-avatar { left: -2.3rem; width: 1.72rem; height: 1.72rem; border-radius: 50%; }
      .artifact-card { max-width: calc(100% - 2.3rem); margin-left: 2.3rem; }
      #composer { padding-top: 0.42rem; padding-bottom: calc(0.55rem + var(--safe-bottom)); }
      #chat-message-queue { width: calc(100% - 1rem - var(--safe-left) - var(--safe-right)); }
      .chat-message-queue-header { align-items: flex-start; flex-direction: column; gap: 0.08rem; }
      #pending-attachments { width: calc(100% - 1rem - var(--safe-left) - var(--safe-right)); grid-template-columns: minmax(0, 1fr); gap: 0.35rem; margin-bottom: 0.38rem; }
      #team-chat-options { width: calc(100% - 1rem - var(--safe-left) - var(--safe-right)); align-items: flex-start; }
      #pending-visibility { justify-self: end; }
      #form { width: calc(100% - 1rem - var(--safe-left) - var(--safe-right)); min-height: 5.35rem; gap: 0.14rem 0.2rem; margin: 0 auto; padding: 0.42rem; border-radius: 17px; }
      #input, .field input { font-size: var(--type-title); }
      .composer-tool, #send { width: 2.75rem; height: 2.75rem; }
      #input { height: 2.6rem; min-height: 2.6rem; max-height: 8rem; padding: 0.55rem 0.52rem 0.3rem; }
      #composer-status { width: calc(100% - 1rem - var(--safe-left) - var(--safe-right)); }
      .project-file-row { grid-template-columns: 2.25rem minmax(0, 1fr) auto; gap: 0.5rem; padding: 0.62rem 0.55rem; }
      .project-file-row.knowledge-row { grid-template-columns: minmax(0, 1fr) auto; }
      .project-files-summary { flex-wrap: wrap; align-items: flex-start; }
      .project-files-summary > span { flex: 1 0 100%; }
      .project-files-controls { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
      .project-file-rename-inline { opacity: 0.65; }
      .material-primary-action { min-height: 2.5rem; padding: 0.46rem 0.62rem; }
      .material-menu > summary { width: 2.5rem; height: 2.5rem; }
      .material-menu-popover { position: fixed; top: auto; right: max(0.7rem, var(--safe-right)); bottom: calc(0.7rem + var(--safe-bottom)); left: max(0.7rem, var(--safe-left)); width: auto; max-width: none; }
      .material-menu-action { min-height: 2.75rem; font-size: var(--type-small); }
      .file-upload { min-height: 2.5rem; }
      .materials-surface { gap: 1.1rem; }
      .materials-toolbar { align-items: stretch; flex-direction: column; }
      .materials-search { width: 100%; }
      #materials-search-input, .knowledge-create-field input, .knowledge-create-field textarea { font-size: var(--type-title); }
      .material-section + .material-section { padding-top: 1rem; }
      #admin-toggle, #owner-activity-toggle, #personal-chat-toggle, #memory-toggle, #pwa-install, #logout { min-height: 2.75rem; }
      #owner-activity-panel { padding-top: 0.2rem; }
      .owner-activity-header { align-items: center; }
      .owner-activity-header p { max-width: 13rem; }
      .owner-activity-item { grid-template-columns: 2.2rem minmax(0, 1fr); gap: 0.65rem; padding: 0.75rem 0.2rem; border-radius: 0.75rem; }
      .owner-activity-avatar { width: 2.2rem; height: 2.2rem; }
      .owner-activity-meta { align-items: flex-start; flex-direction: column; gap: 0.05rem; }
      .owner-activity-body { -webkit-line-clamp: 2; }
      .admin-shell { grid-template-columns: minmax(0, 1fr); border-top: 0; }
      .admin-directory { border-right: 0; }
      .admin-detail { display: none; padding: 0 max(0.8rem, var(--safe-right)) 1rem max(0.8rem, var(--safe-left)); }
      #admin-panel.detail-open .admin-directory { display: none; }
      #admin-panel.detail-open .admin-detail { display: block; }
      .admin-back { display: grid; }
      .admin-fields { grid-template-columns: minmax(0, 1fr); }
      .admin-access-data { grid-template-columns: minmax(0, 1fr); }
      .admin-access-data dt { padding-bottom: 0.12rem; border-bottom: 0; }
      .admin-access-data dd { padding-top: 0; }
      .admin-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .admin-metric:nth-child(2) { border-right: 0; }
      .admin-metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
      .admin-project-context { max-height: 18rem; padding: 0.75rem; }
      .admin-project-person {
        grid-template-columns: minmax(0, 1fr) auto; gap: 0.35rem 0.75rem; padding: 0.65rem 0;
      }
      .admin-project-person-stats { grid-column: 2; grid-row: 1; }
      .admin-project-person-last { grid-column: 1 / -1; text-align: left; }
      .admin-project-row { grid-template-columns: auto minmax(0, 1fr); padding: 0.45rem 0; }
      .admin-project-row select { grid-column: 2; width: 100%; }
      .admin-project-multiselect { width: 100%; }
      .admin-project-multiselect-trigger { min-height: 3.65rem; }
      .admin-project-multiselect-panel { position: static; margin-top: 0.45rem; box-shadow: 0 10px 30px rgba(31,47,66,0.12); }
      .admin-project-multiselect-search { min-height: 2.8rem; font-size: var(--type-title); }
      .admin-project-multiselect-option { min-height: 3rem; font-size: var(--type-title); }
      .admin-project-multiselect-done { min-height: 2.7rem; }
      .admin-directory-search input { min-height: 2.75rem; font-size: var(--type-title); }
      .admin-quick-project { padding: 0.82rem; }
      .admin-field input, .admin-field select, .admin-memory-editor { font-size: var(--type-title); }
      .admin-conversation-controls { align-items: stretch; flex-direction: column; }
      .admin-conversation-controls select { width: 100%; min-height: 2.75rem; font-size: var(--type-title); }
      .admin-conversation-message { max-width: 94%; }
    }
    @media (max-width: 420px) {
      #project-description { display: none; }
      #model-select { padding-left: 0.48rem; }
      .project-view-tab { padding-inline: 0.64rem; }
      .project-context-heading { align-items: flex-start; }
      .project-context-edit { min-height: 2.5rem; }
      .project-company-summary { min-height: 2.75rem; grid-template-columns: 2rem minmax(0, 1fr) auto; padding: 0.36rem 0.5rem 0.36rem 0.4rem; }
      .project-company-overview-icon { width: 2rem; height: 2rem; }
      .project-company-open, .project-company-change, .project-company-attach { min-height: 2.5rem; }
      .project-participants-heading { align-items: flex-start; flex-wrap: wrap; }
      .project-participant-actions { margin-left: auto; }
      .project-access-trigger { min-height: 2.5rem; }
      #project-member-user-search { min-height: 2.75rem; font-size: var(--type-title); }
      .project-member-role-options { grid-template-columns: minmax(0, 1fr); }
      .project-files-summary { align-items: flex-start; }
      .project-files-controls { align-items: flex-end; flex-wrap: wrap; justify-content: flex-end; }
      .visibility-segment { display: grid; grid-template-columns: repeat(2, auto); }
      #form { gap: 0.36rem; }
      .composer-tool, #send { width: 2.75rem; height: 2.75rem; }
    }

    /* Project space: cinematic identity above a calm, structured workspace. */
    #workspace.project-mode {
      --project-ink: #0a182a;
      --project-copper: #d89a62;
      --project-paper: #f3f1ec;
      background: var(--project-paper);
    }
    #workspace.project-mode #workspace-header {
      min-height: 11.75rem;
      align-content: start;
      align-items: start;
      padding: calc(1.35rem + var(--safe-top)) calc(1.55rem + var(--safe-right)) 4.2rem calc(1.55rem + var(--safe-left));
      overflow: visible;
      border-bottom: 0;
      background:
        linear-gradient(90deg, rgba(5, 18, 34, 0.96) 0%, rgba(7, 22, 42, 0.86) 46%, rgba(7, 20, 37, 0.38) 100%),
        url("/art/project-atmosphere-v1.jpg") center / cover no-repeat;
      color: #f8fbff;
      isolation: isolate;
      box-shadow: 0 18px 48px rgba(13, 28, 46, 0.14);
    }
    #workspace.project-mode #workspace-header::before {
      position: absolute;
      z-index: -1;
      inset: 0;
      background:
        radial-gradient(circle at 73% 84%, rgba(220, 151, 88, 0.16), transparent 24%),
        linear-gradient(180deg, transparent 54%, rgba(4, 14, 27, 0.45));
      content: "";
      pointer-events: none;
    }
    #workspace.project-mode #workspace-header::after {
      position: absolute;
      z-index: -1;
      top: calc(0.72rem + var(--safe-top));
      right: calc(0.85rem + var(--safe-right));
      bottom: 3.72rem;
      left: calc(0.85rem + var(--safe-left));
      border: 1px solid rgba(231, 239, 248, 0.16);
      border-radius: 1.05rem;
      box-shadow: inset 0 0 0 1px rgba(7, 17, 31, 0.14);
      content: "";
      pointer-events: none;
    }
    #workspace.project-mode #workspace-bar {
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: start;
      gap: 1rem;
    }
    #workspace.project-mode #project-header-identity {
      align-items: center;
      gap: 1rem;
      padding: 0.2rem;
    }
    #workspace.project-mode #project-header-icon {
      width: 4.1rem;
      height: 4.1rem;
      border: 1px solid rgba(255, 255, 255, 0.26);
      border-radius: 1rem;
      background: rgba(227, 237, 247, 0.12);
      color: #fff;
      font-size: 1.35rem;
      box-shadow: 0 16px 34px rgba(2, 10, 22, 0.24), inset 0 1px rgba(255, 255, 255, 0.13);
      backdrop-filter: blur(14px);
    }
    #workspace.project-mode #project-header-icon:hover:not(:disabled),
    #workspace.project-mode #project-header-icon:focus-visible:not(:disabled) {
      border-color: rgba(255, 255, 255, 0.58);
      background: rgba(236, 244, 252, 0.2);
      box-shadow: 0 18px 36px rgba(2, 10, 22, 0.28), 0 0 0 3px rgba(255, 255, 255, 0.1);
    }
    #workspace.project-mode #project-meta::before {
      display: block;
      margin-bottom: 0.3rem;
      color: rgba(218, 230, 242, 0.66);
      font-size: 0.64rem;
      font-weight: var(--weight-bold);
      letter-spacing: 0.14em;
      text-transform: uppercase;
      content: "Проектное пространство";
    }
    #workspace.project-mode #project-title {
      color: #fff;
      font-size: clamp(1.45rem, 2.4vw, 2.05rem);
      font-weight: var(--weight-bold);
      letter-spacing: -0.025em;
      line-height: 1.08;
      text-shadow: 0 2px 18px rgba(1, 8, 18, 0.26);
    }
    #workspace.project-mode #project-title-row {
      align-items: center;
      gap: 0.75rem;
    }
    #workspace.project-mode #project-primary-result {
      border-color: rgba(224, 235, 246, 0.24);
      background: rgba(240, 246, 252, 0.11);
      color: rgba(250, 252, 255, 0.92);
      box-shadow: 0 4px 16px rgba(1, 8, 18, 0.13), inset 0 1px rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(12px);
    }
    #workspace.project-mode #project-primary-result .project-primary-result-icon {
      background:
        radial-gradient(circle at 70% 22%, rgba(146, 246, 228, 0.92), transparent 30%),
        linear-gradient(145deg, #33457f 4%, #3f82ac 52%, #3c9985 100%);
      box-shadow: 0 4px 12px rgba(1, 10, 21, 0.22), inset 0 1px rgba(255, 255, 255, 0.24);
    }
    #workspace.project-mode #project-primary-result:hover,
    #workspace.project-mode #project-primary-result:focus-visible {
      border-color: rgba(255, 255, 255, 0.46);
      background: linear-gradient(135deg, rgba(231, 240, 249, 0.25), rgba(231, 240, 249, 0.13));
      color: #fff;
    }
    #workspace.project-mode #project-description-wrap {
      max-width: 48rem;
      display: flex;
      align-items: flex-end;
      gap: 0.42rem;
    }
    #workspace.project-mode #project-description {
      min-width: 0;
      flex: 1 1 auto;
      margin-top: 0.5rem;
      display: -webkit-box;
      overflow: hidden;
      color: rgba(231, 239, 247, 0.76);
      font-size: 0.9rem;
      line-height: 1.48;
      white-space: normal;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }
    #workspace.project-mode #project-description.is-expanded {
      display: block;
      overflow: visible;
      -webkit-line-clamp: unset;
    }
    #workspace.project-mode #project-overview-actions {
      display: flex;
      align-items: center;
      gap: 0.55rem;
      flex-wrap: wrap;
      margin-top: 0.85rem;
    }
    #workspace.project-mode #project-overview-actions .pc-shell-overview {
      order: -1;
      display: inline-flex;
      margin: 0;
    }
    #workspace.project-mode .pc-project-actions {
      gap: 0.48rem;
    }
    #workspace.project-mode .pc-project-edit,
    #workspace.project-mode .pc-site-link {
      min-height: 2.35rem;
      border-color: rgba(224, 235, 246, 0.24);
      background: rgba(231, 240, 249, 0.1);
      color: rgba(250, 252, 255, 0.92);
      box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
      backdrop-filter: blur(12px);
    }
    #workspace.project-mode .pc-project-edit:hover,
    #workspace.project-mode .pc-project-edit:focus-visible,
    #workspace.project-mode .pc-site-link:hover,
    #workspace.project-mode .pc-site-link:focus-visible {
      border-color: rgba(255, 255, 255, 0.52);
      background: rgba(240, 246, 252, 0.18);
      color: #fff;
      box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
    }
    #workspace.project-mode #project-navigation {
      align-self: start;
      padding-top: 0.35rem;
      overflow: visible;
    }
    #workspace.project-mode #chat-mode-switch {
      position: relative;
      z-index: 2;
    }
    #workspace.project-mode #agent-passport-toggle { border-color: rgba(225, 235, 246, 0.28); color: rgba(226, 235, 245, 0.76); }
    #workspace.project-mode #agent-passport-toggle:hover { border-color: rgba(239, 246, 253, 0.5); background: rgba(236, 243, 250, 0.1); color: #fff; }
    #workspace.project-mode #agent-passport-toggle[aria-expanded="true"] { border-color: rgba(151, 197, 242, 0.82); background: transparent; color: #fff; box-shadow: none; }
    #workspace.project-mode #passport-subviews {
      top: auto;
      bottom: 0;
      min-height: 3.45rem;
      gap: 0.35rem;
      padding: 0.48rem max(1.4rem, var(--safe-right)) 0.5rem max(1.4rem, var(--safe-left));
      border-top: 1px solid rgba(225, 235, 246, 0.16);
      border-bottom: 0;
      background: rgba(5, 16, 29, 0.5);
      box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
      backdrop-filter: blur(18px);
    }
    #workspace.project-mode #passport-subviews .project-subview-tab {
      min-height: 2.25rem;
      padding: 0.42rem 0.76rem;
      border: 1px solid transparent;
      border-radius: 0.68rem;
      color: rgba(225, 235, 245, 0.68);
      transition: color 120ms ease, background 120ms ease, border-color 120ms ease, transform 120ms ease;
    }
    #workspace.project-mode #passport-subviews .project-subview-tab:hover {
      background: rgba(231, 239, 247, 0.08);
      color: #fff;
    }
    #workspace.project-mode #passport-subviews .project-subview-tab.active {
      border-color: rgba(220, 235, 249, 0.16);
      background: rgba(242, 247, 252, 0.14);
      color: #fff;
      box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
      transform: translateY(-1px);
    }
    #workspace.project-mode #project-inspector {
      padding: 1.4rem 1.4rem 2.4rem;
      background:
        radial-gradient(circle at 12% 2%, rgba(255, 255, 255, 0.92), transparent 28rem),
        var(--project-paper);
    }
    #workspace.project-mode #project-inspector.with-project-tabs {
      padding-top: 1.4rem;
    }
    #workspace.project-mode #agent-passport-details {
      width: min(100%, 82rem);
      grid-template-columns: repeat(12, minmax(0, 1fr));
      gap: 1.05rem;
    }
    #workspace.project-mode #agent-passport-details > .passport-section {
      min-width: 0;
      margin: 0;
      padding: 1.25rem;
      overflow: hidden;
      border: 1px solid rgba(109, 124, 141, 0.18);
      border-radius: 1rem;
      background: rgba(255, 255, 255, 0.88);
      box-shadow: 0 10px 28px rgba(24, 35, 48, 0.055), inset 0 1px #fff;
    }
    #workspace.project-mode .project-context-section {
      grid-column: 1 / -1;
      border-top: 3px solid #315f8d !important;
    }
    #workspace.project-mode .project-plan-panel {
      width: 100%;
      grid-column: 1 / -1;
    }
    #workspace.project-mode .project-document-index,
    #workspace.project-mode .project-participants-section {
      grid-column: 1 / -1;
    }
    #workspace.project-mode .agent-detail-title {
      color: #728093;
      font-size: 0.67rem;
      letter-spacing: 0.095em;
    }
    #workspace.project-mode .project-context-heading {
      margin-bottom: 0.8rem;
    }
    #workspace.project-mode .project-context-value {
      max-width: none;
      color: #283445;
      font-size: 0.92rem;
      line-height: 1.68;
    }
    #workspace.project-mode .project-context-value h1,
    #workspace.project-mode .project-context-value h2,
    #workspace.project-mode .project-context-value h3 {
      color: #172335;
      font-size: 1.02rem;
      letter-spacing: -0.012em;
    }
    #workspace.project-mode .project-context-edit,
    #workspace.project-mode .project-context-cancel {
      border-color: #d6dee7;
      border-radius: 0.55rem;
      background: #f8fafc;
    }
    #workspace.project-mode .project-company-overview {
      display: inline-flex;
      align-items: center;
      gap: 0.42rem;
      min-width: 0;
    }
    #workspace.project-mode .project-company-summary {
      min-width: 0;
      min-height: 2.35rem;
      display: inline-flex;
      align-items: center;
      gap: 0.52rem;
      padding: 0.28rem 0.62rem 0.28rem 0.36rem;
      border: 1px solid rgba(225, 235, 246, 0.22);
      border-radius: 0.68rem;
      background: rgba(231, 240, 249, 0.09);
      color: #fff;
      font: inherit;
      text-align: left;
      box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
      backdrop-filter: blur(12px);
    }
    #workspace.project-mode button.project-company-summary {
      cursor: pointer;
      transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
    }
    #workspace.project-mode button.project-company-summary:hover,
    #workspace.project-mode button.project-company-summary:focus-visible {
      border-color: rgba(255, 255, 255, 0.5);
      background: rgba(240, 246, 252, 0.17);
      box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
      outline: none;
    }
    #workspace.project-mode .project-company-overview-icon {
      width: 1.72rem;
      height: 1.72rem;
      flex: 0 0 auto;
      overflow: hidden;
      border: 1px solid rgba(229, 179, 129, 0.32);
      border-radius: 0.52rem;
      background: rgba(218, 154, 98, 0.16);
      color: #f0c69e;
      font-size: 0.66rem;
      line-height: 1;
      white-space: nowrap;
      box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
    }
    #workspace.project-mode .project-company-overview-copy strong {
      color: #fff;
      font-size: 0.76rem;
      line-height: 1.1;
      white-space: nowrap;
    }
    #workspace.project-mode .project-company-overview-copy .project-company-overview-kicker {
      margin: 0 0 0.09rem;
      color: rgba(220, 231, 242, 0.6);
      font-size: 0.55rem;
      font-weight: var(--weight-bold);
      letter-spacing: 0.09em;
      line-height: 1;
      text-transform: uppercase;
      white-space: nowrap;
    }
    #workspace.project-mode .project-company-arrow {
      color: rgba(232, 239, 247, 0.58);
      font-size: 0.78rem;
    }
    #workspace.project-mode .project-company-overview-actions {
      justify-content: flex-start;
    }
    #workspace.project-mode .project-company-change,
    #workspace.project-mode .project-company-attach,
    #workspace.project-mode .project-access-trigger {
      border-radius: 0.58rem;
    }
    #workspace.project-mode .project-company-change,
    #workspace.project-mode .project-company-attach {
      min-height: 2.35rem;
      border-color: rgba(229, 179, 129, 0.34);
      background: rgba(218, 154, 98, 0.11);
      color: #f0c69e;
      backdrop-filter: blur(12px);
    }
    #workspace.project-mode .project-company-change:hover,
    #workspace.project-mode .project-company-attach:hover {
      border-color: rgba(239, 199, 158, 0.62);
      background: rgba(218, 154, 98, 0.2);
      color: #ffe1c3;
    }
    #workspace.project-mode .project-document-list {
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 0.62rem;
      border: 0;
    }
    #workspace.project-mode .project-document-link {
      min-height: 5.35rem;
      padding: 0.8rem;
      border: 1px solid #e2e7ed;
      border-radius: 0.75rem;
      background: linear-gradient(155deg, #fff, #f8fafc);
      transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
    }
    #workspace.project-mode .project-document-link:hover {
      border-color: #b9c9db;
      background: #fff;
      box-shadow: 0 8px 18px rgba(32, 55, 79, 0.08);
      transform: translateY(-2px);
    }
    #workspace.project-mode .project-document-link strong {
      color: #1e2d40;
    }
    #workspace.project-mode .project-document-link span {
      color: #7a8796;
    }
    #workspace.project-mode .project-participant-list {
      grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
      gap: 0.68rem;
    }
    #workspace.project-mode .project-participant {
      min-height: 4.5rem;
      padding: 0.78rem;
      border-color: #e0e6ec;
      border-radius: 0.8rem;
      background: linear-gradient(155deg, #fff, #f8fafc);
      box-shadow: inset 0 1px #fff;
    }
    #workspace.project-mode .project-participant-avatar {
      width: 2.35rem;
      height: 2.35rem;
      background: linear-gradient(145deg, #dce9f3, #cbddeb);
      color: #244864;
      box-shadow: inset 0 1px rgba(255, 255, 255, 0.7);
    }
    #workspace.project-mode .project-participant.is-project-owner {
      border-color: #c9d9e9;
      background: linear-gradient(155deg, #fbfdff, #eef5fb);
    }

    @media (max-width: 900px) {
      #workspace.project-mode #workspace-header {
        min-height: 11.2rem;
        padding-right: max(1rem, var(--safe-right));
        padding-left: max(1rem, var(--safe-left));
      }
      #workspace.project-mode #workspace-header::after {
        right: max(0.55rem, var(--safe-right));
        left: max(0.55rem, var(--safe-left));
      }
      #workspace.project-mode #project-navigation {
        width: auto;
        padding: 0.35rem 0 0;
        border-top: 0;
      }
      #workspace.project-mode #project-header-icon {
        width: 3.55rem;
        height: 3.55rem;
      }
      #workspace.project-mode .project-context-section { grid-column: 1 / -1; }
    }
    @media (max-width: 760px) {
      #workspace.project-mode #workspace-header {
        min-height: 12.6rem;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto;
        gap: 0.5rem;
        padding-top: calc(0.75rem + var(--safe-top));
        padding-bottom: 3.75rem;
      }
      #workspace.project-mode #workspace-header::after {
        top: calc(0.45rem + var(--safe-top));
        bottom: 3.55rem;
      }
      #workspace.project-mode #workspace-bar {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 0;
      }
      #workspace.project-mode #project-header-identity {
        gap: 0.65rem;
      }
      #workspace.project-mode #project-title-row {
        align-items: flex-start;
        flex-wrap: wrap;
      }
      #workspace.project-mode #project-title {
        font-size: 1.25rem;
      }
      #workspace.project-mode #project-meta::before {
        margin-bottom: 0.18rem;
        font-size: 0.58rem;
      }
      #workspace.project-mode #project-description {
        margin-top: 0.28rem;
        font-size: 0.76rem;
        line-height: 1.35;
      }
      #workspace.project-mode #project-overview-actions {
        gap: 0.4rem;
        margin: 0.62rem 0 0;
      }
      #workspace.project-mode #project-navigation {
        grid-row: 2;
        justify-self: end;
      }
      #workspace.project-mode #passport-subviews {
        justify-content: flex-start;
        padding-right: max(0.7rem, var(--safe-right));
        padding-left: max(0.7rem, var(--safe-left));
      }
      #workspace.project-mode #project-inspector,
      #workspace.project-mode #project-inspector.with-project-tabs {
        padding: 0.8rem 0.7rem 1.5rem;
      }
      #workspace.project-mode #agent-passport-details {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75rem;
      }
      #workspace.project-mode #agent-passport-details > .passport-section,
      #workspace.project-mode .project-context-section,
      #workspace.project-mode .project-document-index,
      #workspace.project-mode .project-participants-section {
        grid-column: 1;
        padding: 1rem;
        border-radius: 0.85rem;
      }
      #workspace.project-mode .project-document-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      #workspace.project-mode .project-document-link {
        min-height: 4.7rem;
        border-right: 1px solid #e2e7ed;
        border-bottom: 1px solid #e2e7ed;
      }
    }
    @media (max-width: 420px) {
      #workspace.project-mode #workspace-header {
        min-height: 11.6rem;
      }
      #workspace.project-mode #project-header-icon {
        width: 3.1rem;
        height: 3.1rem;
        border-radius: 0.82rem;
      }
      #workspace.project-mode #project-description {
        display: -webkit-box;
      }
      #workspace.project-mode .project-document-list {
        grid-template-columns: minmax(0, 1fr);
      }
    }

    /* Mobile chat: immersive reading with compact floating controls. */
    @media (max-width: 620px) {
      #workspace.project-mode #project-title-row { flex-wrap: nowrap; }
      #project-primary-result {
        width: 2rem;
        height: 2rem;
        min-height: 2rem;
        justify-content: center;
        padding: 0.2rem;
        border-radius: 0.68rem;
      }
      #project-primary-result-label { display: none; }
      #project-primary-result[data-kind="site"] {
        width: auto;
        padding-inline: 0.42rem 0.55rem;
      }
      #project-primary-result[data-kind="site"] #project-primary-result-label { display: inline; }
      #project-primary-result .project-primary-result-arrow { display: none; }
      #workspace:not(.project-mode) #workspace-header {
        position: relative;
        z-index: 7;
        min-height: 0;
        border-bottom: 1px solid rgba(221, 226, 232, 0.78);
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 3px 18px rgba(24, 36, 52, 0.035);
        backdrop-filter: blur(18px);
      }
      #workspace:not(.project-mode) #workspace-bar {
        min-height: 3.35rem;
        gap: 0.52rem;
        padding: calc(0.38rem + var(--safe-top)) calc(9.65rem + var(--safe-right)) 0.34rem max(0.72rem, var(--safe-left));
      }
      #workspace:not(.project-mode) #sidebar-toggle {
        width: 2.5rem;
        height: 2.5rem;
        border: 1px solid rgba(205, 213, 222, 0.82);
        border-radius: 50%;
        background: rgba(247, 248, 250, 0.94);
        box-shadow: 0 3px 12px rgba(26, 38, 54, 0.07);
      }
      #workspace:not(.project-mode) #project-header-identity { gap: 0.48rem; }
      #workspace:not(.project-mode) #project-header-icon {
        width: 2.25rem;
        height: 2.25rem;
        border-radius: 0.72rem;
      }
      #workspace:not(.project-mode) #project-title {
        overflow: hidden;
        font-size: 0.98rem;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #workspace:not(.project-mode) #project-description { display: none; }
      #workspace:not(.project-mode) #project-navigation {
        position: absolute;
        top: calc(0.48rem + var(--safe-top));
        right: max(0.62rem, var(--safe-right));
        width: auto;
        min-height: 0;
        padding: 0;
        border-top: 0;
        background: transparent;
        overflow: visible;
      }
      #workspace:not(.project-mode) #chat-mode-switch .chat-mode-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
      }
      #workspace:not(.project-mode) #chat-mode-switch .chat-mode-icon {
        width: 1rem;
        height: 1rem;
      }
      #workspace:not(.project-mode) #agent-passport-toggle {
        width: 2.75rem;
        height: 2.75rem;
        min-height: 2.75rem;
        padding: 0;
        border-radius: 50%;
      }
      #workspace:not(.project-mode) #chat-mode-switch .project-subview-tab {
        position: relative;
      }

      #workspace.project-mode #project-navigation {
        position: static;
        display: contents;
        padding: 0;
      }
      #workspace.project-mode #project-subviews {
        min-width: 0;
        display: contents;
      }
      #workspace.project-mode #chat-subviews {
        position: absolute;
        top: calc(0.7rem + var(--safe-top));
        right: max(0.8rem, var(--safe-right));
        z-index: 3;
        width: auto;
      }
      #workspace.project-mode #passport-subviews {
        position: absolute;
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        min-width: 0;
      }
      #workspace.project-mode #workspace-bar {
        padding-right: 9.75rem;
      }
      #workspace.project-mode #chat-mode-switch {
        gap: 0.28rem;
      }
      #workspace.project-mode #chat-mode-switch .chat-mode-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
      }
      #workspace.project-mode #chat-mode-switch .chat-mode-icon {
        width: 0.96rem;
        height: 0.96rem;
      }
      #workspace.project-mode #agent-passport-toggle {
        width: 2.75rem;
        height: 2.75rem;
        min-height: 2.75rem;
        padding: 0;
        border-radius: 50%;
      }
      #workspace.project-mode #workspace-header {
        min-height: 0;
        display: block;
        padding: calc(3.65rem + var(--safe-top)) max(0.78rem, var(--safe-right)) 3.85rem max(0.78rem, var(--safe-left));
      }
      #workspace.project-mode #workspace-header::after {
        top: calc(3.25rem + var(--safe-top));
        right: max(0.48rem, var(--safe-right));
        bottom: 3.45rem;
        left: max(0.48rem, var(--safe-left));
      }
      #workspace.project-mode #workspace-bar {
        display: block;
        padding: 0;
      }
      #workspace.project-mode #sidebar-toggle {
        position: absolute;
        top: calc(0.56rem + var(--safe-top));
        left: max(0.7rem, var(--safe-left));
      }
      #workspace.project-mode #project-header-identity {
        width: 100%;
        display: grid;
        grid-template-columns: 3.15rem minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        gap: 0.18rem 0.68rem;
        align-items: center;
        padding: 0.72rem 0.12rem 0.18rem;
      }
      #workspace.project-mode #project-header-icon {
        grid-column: 1;
        grid-row: 1 / 3;
        width: 3.15rem;
        height: 3.15rem;
        border-radius: 0.86rem;
        align-self: center;
      }
      #workspace.project-mode #project-meta {
        display: contents;
      }
      #workspace.project-mode #project-meta::before {
        display: none;
      }
      #workspace.project-mode #project-title-row {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        align-self: end;
      }
      #workspace.project-mode #project-title {
        font-size: 1.22rem;
        line-height: 1.16;
      }
      #workspace.project-mode #project-description-wrap {
        grid-column: 2;
        grid-row: 2;
        min-width: 0;
        max-width: none;
        display: block;
        margin: 0;
        align-self: start;
      }
      #workspace.project-mode #project-description {
        margin: 0;
        font-size: 0.76rem;
        line-height: 1.34;
        -webkit-line-clamp: 2;
      }
      #workspace.project-mode #project-description.is-expanded {
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
      }
      #workspace.project-mode #project-description-toggle { display: none; }
      #workspace.project-mode #project-overview-actions {
        grid-column: 1 / -1;
        grid-row: 3;
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.48rem;
        align-items: center;
        margin: 0.7rem 0 0;
      }
      #workspace.project-mode #project-overview-actions .pc-shell-overview {
        grid-column: 1;
        min-width: 0;
      }
      #workspace.project-mode .pc-project-actions {
        display: flex;
        flex-wrap: nowrap;
      }
      #workspace.project-mode .project-company-overview {
        grid-column: 2;
        min-width: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.38rem;
        align-items: center;
      }
      #workspace.project-mode #project-overview-actions > .project-company-overview:only-child {
        grid-column: 1 / -1;
      }
      #workspace.project-mode .project-company-summary {
        width: 100%;
        min-width: 0;
        overflow: hidden;
      }
      #workspace.project-mode .project-company-overview-copy {
        min-width: 0;
        overflow: hidden;
      }
      #workspace.project-mode .project-company-overview-copy strong {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      #workspace.project-mode .project-company-overview-actions {
        flex-wrap: nowrap;
      }
      #workspace.project-mode .project-company-change,
      #workspace.project-mode .project-company-attach {
        white-space: nowrap;
      }

      #conversation-space.with-artifacts {
        gap: 0.34rem;
        padding: 0.28rem 0.35rem 0;
      }
      #messages {
        padding: 1.2rem max(1.3rem, var(--safe-right)) 1.15rem max(1.3rem, var(--safe-left));
        gap: 0.36rem;
      }
      #messages[data-mode="chat"] .msg.assistant {
        width: fit-content;
        max-width: calc(100% - 2.3rem);
        margin: 0.7rem 0 0 2.3rem;
        padding: 0.62rem 0.76rem 0.54rem;
        font-size: 1rem;
        line-height: 1.56;
      }
      #messages[data-mode="chat"] .msg.assistant .msg-avatar { display: grid; }
      #messages[data-mode="chat"] .msg.assistant .msg-author { display: flex; }
      #messages[data-mode="chat"] .msg.assistant .msg-text { margin-top: 0.34rem; }
      #messages[data-mode="chat"] .msg.assistant .msg-dttm {
        position: absolute;
        top: 0.7rem;
        right: 0.76rem;
        margin: 0;
        text-align: right;
      }
      #messages[data-mode="chat"] .msg.user {
        max-width: 88%;
        padding: 0.7rem 0.86rem 0.54rem;
        border-radius: 18px 18px 7px 18px;
        font-size: 1rem;
        line-height: 1.52;
      }
      #messages[data-mode="team"] .msg {
        font-size: 1rem;
        line-height: 1.56;
      }
      #messages[data-mode="team"] .msg.team-message.other {
        max-width: calc(100% - 2.3rem);
        margin-left: 2.3rem;
      }
      #messages[data-mode="team"] .msg.team-message.agent {
        width: fit-content;
        max-width: calc(100% - 2.3rem);
        margin-left: 2.3rem;
      }
      .message-date-separator {
        margin: 0.3rem 0 0.62rem;
        background: rgba(255, 255, 255, 0.62);
      }
      .msg.assistant h2,
      .msg.assistant h3,
      .msg.assistant h4,
      .msg.assistant h5 {
        margin-top: 1em;
      }
      .msg.assistant p { margin: 0.62em 0; }
      .msg.assistant li { margin: 0.3em 0; }

      #conversation-artifacts {
        display: none;
        max-height: 7.15rem;
        border-radius: 13px;
        box-shadow: 0 8px 24px rgba(30, 43, 59, 0.065);
      }
      #conversation-space.with-artifacts {
        grid-template-rows: minmax(0, 1fr);
        gap: 0;
        padding: 0;
      }
      #conversation-space.with-artifacts.artifacts-open {
        grid-template-rows: minmax(0, 1fr) auto;
        gap: 0.34rem;
        padding: 0.28rem 0.35rem 0;
      }
      #conversation-space.artifacts-open #conversation-artifacts { display: grid; }
      .conversation-artifacts-header {
        padding-top: 0.42rem;
        padding-bottom: 0.28rem;
      }
      #conversation-artifacts-list { padding-bottom: 0.5rem; }
      .conversation-artifact { width: min(15.5rem, 72vw); }

      #personal-chat-messages {
        padding: 1rem calc(0.75rem + var(--safe-right)) 1rem calc(0.75rem + var(--safe-left));
        scrollbar-gutter: auto;
      }
      #personal-chat-context-bar {
        align-items: flex-start; padding: 0.52rem calc(0.75rem + var(--safe-right)) 0.52rem calc(0.75rem + var(--safe-left));
      }
      #personal-chat-context-bar > div:first-child span { display: none; }
      #personal-chat-context-picker summary > span { display: none; }
      #personal-chat-context-options {
        position: fixed; top: auto; right: calc(0.5rem + var(--safe-right)); bottom: calc(5.1rem + var(--safe-bottom));
        left: calc(0.5rem + var(--safe-left)); width: auto; max-height: 46vh;
      }
      .personal-chat-message { margin-bottom: 1rem; }
      .personal-chat-message-body { max-width: 92%; font-size: 1rem; }
      #personal-chat-dock {
        padding: 0.28rem 0 calc(0.45rem + var(--safe-bottom));
      }
      #personal-chat-form {
        width: calc(100% - 1rem - var(--safe-left) - var(--safe-right));
        min-height: 3.65rem; border-radius: 999px; padding: 0.35rem;
      }
      #personal-chat-voice,
      #personal-chat-send { width: 2.7rem; height: 2.7rem; }
      #personal-chat-status {
        max-width: calc(100% - 1rem - var(--safe-left) - var(--safe-right));
        margin-bottom: 0.24rem;
      }

      #composer {
        padding-top: 0.42rem;
        padding-bottom: calc(0.5rem + var(--safe-bottom));
        background: linear-gradient(to bottom, rgba(246,247,248,0), #f6f7f8 28%);
      }
      #team-chat-options {
        width: calc(100% - 1rem - var(--safe-left) - var(--safe-right));
        min-height: 2rem;
        align-items: center;
        margin-bottom: 0.3rem;
      }
      #team-agent-option label {
        min-height: 2rem;
        padding: 0.24rem 0.48rem;
      }
      #team-agent-option small { display: none; }
      #conversation-artifacts-toggle {
        display: block;
        min-height: 2rem;
        max-width: 9rem;
        overflow: hidden;
        border-radius: 999px;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      #form {
        width: calc(100% - 1rem - var(--safe-left) - var(--safe-right));
        min-height: 3.65rem;
        grid-template-columns: auto minmax(0, 1fr) auto auto;
        grid-template-rows: auto;
        align-items: end;
        gap: 0.16rem;
        padding: 0.36rem;
        border-radius: 999px;
      }
      #input {
        grid-column: 2;
        grid-row: 1;
        height: 2.85rem;
        min-height: 2.85rem;
        max-height: 8rem;
        padding: 0.72rem 0.34rem 0.46rem;
        font-size: 1rem;
      }
      #attach-file { grid-column: 1; grid-row: 1; }
      #record-voice { grid-column: 3; grid-row: 1; }
      #send { grid-column: 4; grid-row: 1; }
      .composer-tool,
      #send {
        width: 2.85rem;
        height: 2.85rem;
      }
      #composer-status {
        width: calc(100% - 1.4rem - var(--safe-left) - var(--safe-right));
        margin-top: 0.28rem;
      }
    }
    @media (max-width: 360px) {
      #workspace.project-mode #project-overview-actions {
        grid-template-columns: minmax(0, 1fr);
      }
      #workspace.project-mode #project-overview-actions .pc-shell-overview,
      #workspace.project-mode .project-company-overview {
        grid-column: 1;
      }
    }

    /* One conversation plus one contextual project workspace. */
    #conversation-space {
      grid-template-columns: minmax(0, 1fr) 42px;
    }
    #project-panel-rail,
    #project-chat-rail {
      min-width: 42px; min-height: 0; display: grid; place-items: center; align-content: center; gap: 0.52rem;
      padding: 0.8rem 0; border: 0; background: rgba(238, 241, 244, 0.82); color: #748194; cursor: pointer;
      box-shadow: inset 1px 0 rgba(201, 209, 219, 0.72); backdrop-filter: blur(16px);
      transition: background 130ms ease, color 130ms ease;
    }
    #project-panel-rail[hidden], #project-chat-rail[hidden] { display: none; }
    @media (min-width: 1181px) {
      #agent-passport-toggle { display: none !important; }
    }
    #project-panel-rail { grid-column: 2; grid-row: 1; }
    #project-chat-rail { grid-column: 1; grid-row: 1; box-shadow: inset -1px 0 rgba(201, 209, 219, 0.72); }
    #project-panel-rail:hover, #project-panel-rail:focus-visible,
    #project-chat-rail:hover, #project-chat-rail:focus-visible { background: rgba(227, 234, 241, 0.96); color: #2f6fab; outline: none; }
    #project-panel-rail span, #project-chat-rail span { width: 0.44rem; height: 0.44rem; border-radius: 50%; background: #7ca2c7; box-shadow: 0 0 0 4px rgba(124, 162, 199, 0.12); }
    #project-panel-rail strong, #project-chat-rail strong {
      writing-mode: vertical-rl; transform: rotate(180deg); color: currentColor; font-size: 0.58rem;
      font-weight: var(--weight-bold); letter-spacing: 0.12em; text-transform: uppercase;
    }
    #project-panel-rail strong {
      display: block; letter-spacing: 0.05em; line-height: 1; text-transform: none; white-space: nowrap;
    }
    #conversation-space.project-panel-open {
      grid-template-columns: minmax(360px, 1fr) 10px minmax(19rem, var(--project-panel-width));
    }
    #conversation-space.project-panel-full {
      grid-template-columns: 42px minmax(0, 1fr);
    }
    #conversation-space.project-panel-full #chat-viewport { display: none; }
    #conversation-space.project-panel-full #project-side-panel { grid-column: 2; }
    #project-panel-resizer {
      min-width: 10px; min-height: 0; position: relative; z-index: 7; grid-column: 2; grid-row: 1;
      padding: 0; border: 0; background: transparent; cursor: col-resize; touch-action: none;
    }
    #project-panel-resizer span {
      position: absolute; inset: 0 auto 0 4px; width: 2px; background: rgba(204, 212, 222, 0.82);
      transition: width 120ms ease, background 120ms ease;
    }
    #project-panel-resizer:hover span,
    #project-panel-resizer:focus-visible span,
    body.project-panel-resizing #project-panel-resizer span { width: 3px; background: #6ea6ed; }
    #project-panel-resizer:focus-visible { outline: none; }
    body.project-panel-resizing { cursor: col-resize; user-select: none; }
    #project-side-panel {
      min-width: 0; min-height: 0; grid-column: 3; grid-row: 1; display: grid;
      grid-template-rows: auto minmax(0, 1fr); overflow: hidden;
      border-left: 1px solid rgba(204, 212, 222, 0.82); background: rgba(250, 251, 252, 0.94);
      box-shadow: -12px 0 32px rgba(31, 45, 61, 0.055); backdrop-filter: blur(20px);
    }
    #project-side-panel[hidden] { display: none; }
    .project-side-panel-header {
      min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center;
      border-bottom: 1px solid #e2e7ed; background: rgba(255, 255, 255, 0.76);
    }
    .project-panel-identity {
      min-width: 0; display: grid; grid-template-columns: 2.7rem minmax(0, 1fr) auto; gap: 0.64rem; align-items: center;
      padding: 0.72rem 0.72rem 0.58rem; border-bottom: 1px solid rgba(226, 231, 237, 0.78);
    }
    #project-panel-icon {
      width: 2.7rem; height: 2.7rem; display: grid; place-items: center; padding: 0; border: 1px solid rgba(50, 91, 128, 0.14); border-radius: 0.76rem;
      background: linear-gradient(145deg, #397aa3, #2e668b); color: #fff; font-size: 0.82rem; font-weight: var(--weight-bold); box-shadow: 0 5px 14px rgba(37, 76, 108, 0.15); cursor: pointer;
    }
    #project-panel-icon:hover:not(:disabled), #project-panel-icon:focus-visible:not(:disabled) { border-color: #9bc4e8; box-shadow: 0 0 0 3px rgba(72, 136, 194, 0.13), 0 6px 16px rgba(37, 76, 108, 0.17); transform: translateY(-1px); }
    #project-panel-icon:disabled { cursor: default; }
    .project-panel-identity-copy { min-width: 0; display: grid; gap: 0.08rem; }
    #project-panel-company, #project-panel-title, #project-panel-summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #project-panel-company { color: #748194; font-size: 0.58rem; font-weight: var(--weight-semibold); letter-spacing: 0.07em; text-transform: uppercase; }
    #project-panel-title { color: #263547; font-size: 0.92rem; line-height: 1.22; }
    #project-panel-summary { color: #718093; font-size: 0.64rem; line-height: 1.35; }
    .project-panel-identity #project-primary-result { align-self: center; }
    .project-side-panel-navigation {
      min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.45rem;
      min-height: 3.35rem; padding: 0.36rem 0.55rem 0.3rem 0.72rem;
    }
    .project-side-panel-tabs { min-width: 0; display: flex; align-self: stretch; gap: 0.12rem; overflow-x: auto; scrollbar-width: none; }
    .project-side-panel-tabs::-webkit-scrollbar { display: none; }
    .project-side-panel-tabs button {
      min-height: 2.25rem; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.38rem 0.48rem;
      border: 0; border-bottom: 2px solid transparent; background: transparent; color: #788394;
      font: inherit; font-size: 0.69rem; font-weight: var(--weight-semibold); cursor: pointer;
    }
    .project-side-panel-tabs button:hover { color: #33465a; }
    .project-side-panel-tabs button.active { border-bottom-color: #2879d1; color: #1769c2; }
    #project-panel-files-count {
      min-width: 1.12rem; height: 1.12rem; display: inline-grid; place-items: center; padding: 0 0.24rem;
      border-radius: 999px; background: #e6eef8; color: #41698f; font-size: 0.58rem; line-height: 1;
    }
    #project-panel-files-count[hidden] { display: none; }
    .project-side-panel-actions { display: flex; gap: 0.14rem; }
    .project-side-panel-actions button {
      width: 2.1rem; height: 2.1rem; display: grid; place-items: center; padding: 0; border: 0; border-radius: 0.55rem;
      background: transparent; color: #778496; cursor: pointer;
    }
    .project-side-panel-actions button:hover { background: #edf2f7; color: #315f8e; }
    .project-side-panel-actions svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .project-side-panel-body { min-width: 0; min-height: 0; overflow-y: auto; padding: 1rem; scrollbar-color: #c8d0da transparent; scrollbar-width: thin; }
    .project-side-panel-body[hidden] { display: none; }
    #project-panel-plan { padding: 0.62rem 0.68rem 0.8rem; }
    #project-panel-plan .pc-project-plan { gap: 0.72rem; padding: 0; border-top: 0; }
    #project-panel-plan .pc-plan-section-head { align-items: flex-start; flex-wrap: wrap; }
    #project-panel-plan .pc-plan-head-actions { display: flex; justify-content: flex-end; gap: 0.52rem; }
    #project-panel-plan .pc-plan-head-actions button { width: auto; min-width: 0; }
    #project-panel-plan .pc-plan-item { padding: 0.7rem; }
    #project-panel-plan .pc-plan-copy > p { font-size: 0.7rem; line-height: 1.45; }
    #project-panel-plan .pc-plan-title { display: grid; gap: 0.35rem; }
    #project-panel-plan .pc-plan-status { justify-self: start; }
    #conversation-space.project-panel-full #project-panel-plan .pc-project-plan { width: min(100%, 61rem); margin: 0 auto; }
    #conversation-space.project-panel-full #project-panel-plan .pc-roadmap-stage-result { display: block; overflow: visible; }
    .project-panel-summary { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.65rem; align-items: center; padding-bottom: 0.68rem; border-bottom: 1px solid #e4e9ef; }
    .project-panel-summary-copy { min-width: 0; }
    .project-panel-eyebrow { color: #7d8998; font-size: 0.64rem; font-weight: var(--weight-semibold); letter-spacing: 0.05em; text-transform: uppercase; }
    .project-panel-summary h2, .project-panel-section-heading h2 { margin: 0.28rem 0 0; color: #263547; font-size: 1rem; line-height: 1.25; }
    .project-panel-summary p { display: -webkit-box; overflow: hidden; margin: 0.26rem 0 0; color: #687689; font-size: 0.68rem; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
    .project-panel-summary-actions { display: flex; gap: 0.45rem; margin: 0; }
    .project-panel-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.48rem; margin-top: 0.85rem; }
    .project-panel-facts > div { min-width: 0; padding: 0.66rem; border: 1px solid #e0e6ed; border-radius: 0.72rem; background: #fff; }
    .project-panel-facts span, .project-panel-facts strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .project-panel-facts span { color: #8893a1; font-size: 0.62rem; }
    .project-panel-facts strong { margin-top: 0.18rem; color: #33465a; font-size: 0.76rem; }
    .project-panel-primary {
      min-width: 0; display: grid; grid-template-columns: 2.15rem minmax(0, 1fr); gap: 0.62rem; align-items: center;
      margin-top: 0.75rem; padding: 0.64rem; border: 1px solid #dce4ec; border-radius: 0.78rem;
      background: linear-gradient(145deg, #fff, #f5f8fb); color: inherit; text-decoration: none;
    }
    .project-panel-primary.is-link:hover { border-color: #9ebbd8; box-shadow: 0 7px 20px rgba(39, 69, 99, 0.08); }
    .project-panel-primary-mark { width: 2.15rem; height: 2.15rem; display: grid; place-items: center; border-radius: 0.62rem; background: linear-gradient(145deg, #476d9a, #4f9a8a); color: #fff; font-size: 0.72rem; font-weight: var(--weight-bold); }
    .project-panel-primary-copy { min-width: 0; }
    .project-panel-primary-copy small, .project-panel-primary-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .project-panel-primary-copy small { color: #7c8998; font-size: 0.6rem; }
    .project-panel-primary-copy strong { margin-top: 0.15rem; color: #2f4053; font-size: 0.72rem; }
    .project-panel-inline-actions { display: flex; gap: 0.42rem; margin-top: 0.72rem; }
    .project-panel-inline-actions button, .project-panel-add { min-height: 2.2rem; padding: 0.38rem 0.62rem; border: 1px solid #cbd7e3; border-radius: 0.58rem; background: #fff; color: #45627f; font: inherit; font-size: 0.68rem; font-weight: var(--weight-semibold); cursor: pointer; }
    .project-panel-inline-actions .project-panel-primary-action { border-color: #2f70b5; background: #2f70b5; color: #fff; }
    .project-panel-section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.65rem; padding-bottom: 0.78rem; border-bottom: 1px solid #e4e9ef; }
    .project-panel-section-heading p { margin: 0.18rem 0 0; color: #8190a0; font-size: 0.66rem; }
    .project-panel-team-list { display: grid; margin-top: 0.62rem; }
    .project-panel-person { min-width: 0; display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: 0.55rem; align-items: center; min-height: 3.25rem; padding: 0.4rem 0; border-bottom: 1px solid #e9edf2; }
    .project-panel-person-avatar { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: #e1e7ed; color: #5e6c7d; font-size: 0.64rem; font-weight: var(--weight-bold); }
    .project-panel-person-copy { min-width: 0; }
    .project-panel-person-copy strong, .project-panel-person-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .project-panel-person-copy strong { color: #2e3d4f; font-size: 0.75rem; }
    .project-panel-person-copy small { margin-top: 0.12rem; color: #8a95a3; font-size: 0.62rem; }
    .project-panel-person-badge { padding: 0.2rem 0.36rem; border-radius: 999px; background: #eaf4ef; color: #3f795c; font-size: 0.56rem; font-weight: var(--weight-semibold); }
    .project-clarifications { display: grid; gap: 0.55rem; margin: 0.48rem 0 0.58rem; padding-bottom: 0.58rem; border-bottom: 1px solid #e4e9ef; }
    .project-clarifications > header { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 0.65rem; }
    .project-clarifications > header > span:first-child { min-width: 0; display: flex; align-items: baseline; gap: 0.42rem; }
    .project-clarifications > header small, .project-clarifications > header strong { display: block; }
    .project-clarifications > header small { color: #8591a0; font-size: 0.59rem; font-weight: var(--weight-semibold); letter-spacing: 0.05em; text-transform: uppercase; }
    .project-clarifications > header strong { overflow: hidden; color: #34475b; font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }
    .project-clarifications > header > span:last-child { display: flex; flex: 0 0 auto; gap: 0.32rem; }
    .project-clarification-refresh, .project-clarification-create,
    .project-clarification-card-actions button, .project-clarification-form button,
    .project-clarification-answer-form button {
      min-height: 2rem; padding: 0.34rem 0.52rem; border: 1px solid #ccd7e2; border-radius: 0.55rem;
      background: #fff; color: #49637e; font: inherit; font-size: 0.64rem; font-weight: var(--weight-semibold); cursor: pointer;
    }
    .project-clarification-refresh { width: 2rem; padding-inline: 0; color: #788696; font-size: 0.92rem; }
    .project-clarification-create, .project-clarification-form button[type="submit"],
    .project-clarification-answer-form button[type="submit"], .project-clarification-card-actions button.primary {
      border-color: #3176bb; background: #3176bb; color: #fff;
    }
    .project-clarification-card-actions button.quiet { border-color: transparent; background: transparent; color: #87919d; }
    .project-clarification-refresh:hover, .project-clarification-card-actions button:hover,
    .project-clarification-form button:hover, .project-clarification-answer-form button:hover { border-color: #8eacca; }
    .project-clarification-form, .project-clarification-answer-form { display: grid; gap: 0.5rem; padding: 0.68rem; border: 1px solid #d5e1ed; border-radius: 0.72rem; background: #f7fafc; }
    .project-clarification-form select, .project-clarification-form textarea, .project-clarification-form input,
    .project-clarification-answer-form textarea {
      width: 100%; min-width: 0; padding: 0.56rem 0.62rem; border: 1px solid #cfd9e4; border-radius: 0.55rem;
      background: #fff; color: #304257; font: inherit; font-size: 0.7rem; line-height: 1.45; box-sizing: border-box;
    }
    .project-clarification-form textarea, .project-clarification-answer-form textarea { resize: vertical; }
    .project-clarification-form select:focus, .project-clarification-form textarea:focus, .project-clarification-form input:focus,
    .project-clarification-answer-form textarea:focus { outline: 2px solid rgba(47, 118, 187, 0.22); border-color: #6d9ccc; }
    .project-clarification-form > div, .project-clarification-answer-form > div,
    .project-clarification-card-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.38rem; flex-wrap: wrap; }
    .project-clarification-error { margin: 0; color: #a14945; font-size: 0.64rem; }
    .project-clarification-list { display: grid; gap: 0.5rem; }
    .project-clarification-card { min-width: 0; display: grid; gap: 0.52rem; padding: 0.7rem; border: 1px solid #dce4ec; border-radius: 0.72rem; background: #fff; }
    .project-clarification-card.is-waiting { border-left: 3px solid #d39b36; background: linear-gradient(135deg, #fffdf8, #fff); }
    .project-clarification-card.is-answered { border-left: 3px solid #4d9470; background: linear-gradient(135deg, #f8fcfa, #fff); }
    .project-clarification-meta { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 0.55rem; }
    .project-clarification-meta strong { overflow: hidden; color: #44566a; font-size: 0.65rem; text-overflow: ellipsis; white-space: nowrap; }
    .project-clarification-meta span { flex: 0 0 auto; color: #8b96a3; font-size: 0.58rem; }
    .project-clarification-question, .project-clarification-answer p { margin: 0; color: #35485d; font-size: 0.7rem; line-height: 1.48; white-space: pre-wrap; overflow-wrap: anywhere; }
    .project-clarification-answer { display: grid; gap: 0.22rem; padding: 0.5rem 0.56rem; border-radius: 0.56rem; background: #edf6f1; }
    .project-clarification-answer small { color: #53806a; font-size: 0.58rem; font-weight: var(--weight-semibold); text-transform: uppercase; }
    .project-clarification-card-actions { justify-content: flex-start; }
    .project-clarification-card-actions button { min-height: 1.86rem; }
    .project-clarification-state { padding: 0.65rem; border-radius: 0.62rem; background: #f3f6f9; color: #778596; font-size: 0.66rem; line-height: 1.45; text-align: center; }
    .project-clarification-state.is-error { background: #fff1ef; color: #9b4c47; }
    #conversation-space.project-panel-full .project-clarification-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-panel-empty { display: grid; gap: 0.22rem; padding: 1.25rem 0.55rem; color: #7c8998; font-size: 0.72rem; line-height: 1.45; text-align: center; }
    .project-panel-empty strong { color: #435266; }
    #project-panel-team .project-participants-section { gap: 0.32rem; padding-bottom: 0; border-bottom: 0; }
    #project-panel-team .project-participants-heading { align-items: center; gap: 0.55rem; }
    #project-panel-team .project-participants-caption { max-width: 15rem; margin-top: 0.08rem; overflow: hidden; font-size: 0.62rem; text-overflow: ellipsis; white-space: nowrap; }
    #project-panel-team .project-access-trigger { min-height: 2.05rem; padding: 0.3rem 0.52rem; }
    #workspace.project-mode #project-panel-team .project-participant-list { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 0.28rem; border-top: 1px solid #e4e9ef; }
    #workspace.project-mode #project-panel-team .project-participant { min-height: 3.15rem; grid-template-columns: 1.9rem minmax(0, 1fr) auto; gap: 0.48rem; padding: 0.38rem 0.12rem; border: 0; border-bottom: 1px solid #e8edf2; border-radius: 0; background: transparent; box-shadow: none; }
    #workspace.project-mode #project-panel-team .project-participant:last-child { border-bottom: 0; }
    #workspace.project-mode #project-panel-team .project-participant.is-profile-link:hover { border-color: #dce6ef; background: #f4f8fc; box-shadow: none; transform: none; }
    #workspace.project-mode #project-panel-team .project-participant.is-project-owner { background: linear-gradient(90deg, #f1f7fd, transparent 88%); }
    #workspace.project-mode #project-panel-team .project-participant-avatar { width: 1.9rem; height: 1.9rem; box-shadow: none; }
    #project-panel-team .project-participant-copy { gap: 0.1rem; }
    #project-panel-team .project-participant-badges { gap: 0.18rem 0.28rem; }
    #project-panel-team .project-participant-result-owner,
    #project-panel-team .project-participant-role.project-owner { padding: 0.04rem 0.28rem; }
    #project-panel-team .project-owner-crown,
    #project-panel-team .project-result-owner { width: 1.7rem; height: 1.7rem; }
    .project-context-map { display: grid; gap: 0.52rem; margin-top: 0.62rem; }
    .project-context-index {
      min-width: 0; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 0.65rem; align-items: center;
      padding: 0.68rem; border: 1px solid #b9cce0; border-radius: 0.78rem; background: linear-gradient(145deg, #f9fbff, #eef5fb);
      color: inherit; font: inherit; text-align: left; cursor: pointer;
    }
    .project-context-index:disabled, .project-context-node:disabled { opacity: 0.58; cursor: default; }
    .project-context-index-mark { width: 3rem; height: 2.35rem; display: grid; place-items: center; border-radius: 0.58rem; background: #3f678f; color: #fff; font-size: 0.58rem; font-weight: var(--weight-bold); letter-spacing: 0.08em; }
    .project-context-index small, .project-context-index strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .project-context-index small { color: #718398; font-size: 0.58rem; }
    .project-context-index strong { margin-top: 0.12rem; color: #294158; font-size: 0.74rem; }
    .project-context-branches { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.42rem; padding-top: 0.55rem; }
    .project-context-branches::before { position: absolute; top: 0; left: 1rem; width: calc(100% - 2rem); height: 1px; background: #cfdbe7; content: ""; }
    .project-context-node {
      min-width: 0; position: relative; display: grid; gap: 0.14rem; padding: 0.58rem; border: 1px solid #dce4ec; border-radius: 0.68rem;
      background: #fff; color: inherit; font: inherit; text-align: left; cursor: pointer;
    }
    .project-context-node::before { position: absolute; top: -0.56rem; left: 50%; width: 1px; height: 0.56rem; background: #cfdbe7; content: ""; }
    .project-context-node strong { overflow: hidden; color: #33485f; font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }
    .project-context-node span { color: #8190a0; font-size: 0.58rem; line-height: 1.35; }
    .project-context-index:not(:disabled):hover, .project-context-node:not(:disabled):hover { border-color: #91afd0; box-shadow: 0 5px 16px rgba(41, 70, 99, 0.07); }
    .project-context-note { margin: 0.5rem 0 0; color: #748396; font-size: 0.63rem; line-height: 1.42; }
    .project-panel-disclosure { min-width: 0; margin-top: 0.52rem; border-top: 1px solid #e4e9ef; }
    .project-panel-disclosure + .project-panel-disclosure { margin-top: 0; }
    .project-panel-disclosure > summary { min-height: 3.15rem; display: flex; align-items: center; gap: 0.65rem; padding: 0.48rem 0.12rem; color: #33475d; list-style: none; cursor: pointer; }
    .project-panel-disclosure > summary::-webkit-details-marker { display: none; }
    .project-panel-disclosure-copy { min-width: 0; display: grid; gap: 0.08rem; flex: 1 1 auto; }
    .project-panel-disclosure-copy strong { font-size: 0.72rem; }
    .project-panel-disclosure-copy small { overflow: hidden; color: #8491a0; font-size: 0.59rem; font-weight: var(--weight-regular); text-overflow: ellipsis; white-space: nowrap; }
    .project-panel-disclosure-chevron { width: 0.45rem; height: 0.45rem; margin: 0 0.45rem 0.2rem 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform 140ms ease; }
    .project-panel-disclosure[open] > summary .project-panel-disclosure-chevron { margin-bottom: -0.18rem; transform: rotate(225deg); }
    .project-panel-disclosure > summary:hover { color: #1769c2; }
    .project-panel-disclosure > summary:focus-visible { border-radius: 0.48rem; outline: 2px solid rgba(40, 121, 209, 0.3); outline-offset: 1px; }
    .project-panel-disclosure-body { padding: 0 0 0.68rem; }
    #project-panel-context .project-panel-disclosure-body .project-context-section { margin: 0; padding: 0.58rem 0 0; border: 0; }
    #project-panel-context .project-context-heading { margin-bottom: 0.65rem; }
    #project-panel-context .project-context-value { font-size: 0.75rem; line-height: 1.55; }
    #project-panel-context .project-context-editor textarea { min-height: 10rem; }
    .project-panel-disclosure-body .project-panel-activity { margin: 0; padding: 0.48rem 0 0; border: 0; }
    .project-panel-activity .pc-recent { width: 100%; }
    .project-panel-activity .pc-history-head { gap: 0.65rem; padding-bottom: 0.8rem; }
    .project-panel-activity .pc-history-day { grid-template-columns: 1fr; gap: 0.55rem; }
    .project-panel-activity .pc-history-day > h4 { position: static; }
    .project-panel-settings-meta { padding-bottom: 1rem; border-bottom: 1px solid #e4e9ef; }
    .project-panel-settings-meta .project-company-overview { width: 100%; margin-top: 0.72rem; }
    .project-panel-notification-settings { display: grid; gap: 0.72rem; padding: 1rem 0; border-bottom: 1px solid #e4e9ef; }
    .project-notification-heading strong, .project-notification-heading span { display: block; }
    .project-notification-heading strong { color: #2f4053; font-size: 0.8rem; }
    .project-notification-heading span { margin-top: 0.18rem; color: #7c8999; font-size: 0.68rem; line-height: 1.4; }
    #project-panel-overview-actions { min-height: 2.1rem; display: flex; align-items: center; justify-content: flex-end; }
    #project-panel-settings > .pc-shell-settings { margin-top: 1rem; }
    #project-side-panel #conversation-artifacts { max-height: none; align-self: stretch; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
    #project-side-panel #conversation-artifacts.materials-surface { display: grid; grid-template-rows: auto auto auto; align-content: start; gap: 0.55rem; overflow-y: auto; padding: 0.68rem; }
    #project-side-panel #conversation-artifacts .materials-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.48rem; align-items: center; padding-bottom: 0.6rem; }
    #project-side-panel #conversation-artifacts .materials-toolbar-copy { min-width: 0; }
    #project-side-panel #conversation-artifacts .materials-toolbar-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #project-side-panel #conversation-artifacts .materials-search { width: 100%; min-width: 0; grid-column: 1 / -1; }
    #project-side-panel #conversation-artifacts .materials-toolbar .project-panel-add { grid-column: 2; grid-row: 1; }
    #project-side-panel #conversation-artifacts[hidden] { display: none; }
    #project-side-panel .conversation-artifacts-header { padding: 0.82rem 0.85rem 0.64rem; background: rgba(255,255,255,0.72); }
    #project-side-panel #conversation-artifacts-list { display: grid; gap: 0.72rem; padding: 0.7rem 0.78rem 1rem; overflow-x: hidden; overflow-y: auto; }
    #project-side-panel .conversation-artifact { width: 100%; }
    .project-panel-file-group { min-width: 0; display: grid; gap: 0.38rem; padding: 0.68rem; border: 1px solid #e0e6ed; border-radius: 0.78rem; background: rgba(255,255,255,0.72); }
    .project-panel-file-group > header { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 0.55rem; }
    .project-panel-file-group > header > span:first-child { min-width: 0; }
    .project-panel-file-group > header strong, .project-panel-file-group > header small { display: block; }
    .project-panel-file-group > header strong { color: #314356; font-size: 0.72rem; }
    .project-panel-file-group > header small { margin-top: 0.1rem; color: #8491a0; font-size: 0.58rem; line-height: 1.35; }
    .project-panel-file-count { min-width: 1.28rem; height: 1.28rem; display: grid; place-items: center; flex: 0 0 auto; border-radius: 999px; background: #edf2f7; color: #64768a; font-size: 0.58rem; font-weight: var(--weight-bold); }
    .project-panel-main-artifact { min-width: 0; display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: 0.52rem; align-items: center; padding: 0.52rem; border: 1px solid #cfe0dc; border-radius: 0.65rem; background: #f2f8f6; color: inherit; text-decoration: none; }
    .project-panel-main-artifact > span:first-child { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 0.55rem; background: #438271; color: #fff; font-size: 0.7rem; }
    .project-panel-main-artifact small, .project-panel-main-artifact strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .project-panel-main-artifact small { color: #6d8a82; font-size: 0.56rem; }
    .project-panel-main-artifact strong { margin-top: 0.1rem; color: #31574e; font-size: 0.68rem; }
    .project-panel-main-artifact.is-link:hover { border-color: #8ebbae; box-shadow: 0 5px 15px rgba(40, 93, 77, 0.08); }
    .project-panel-file-empty { margin: 0; padding: 0.35rem 0.2rem 0.1rem; color: #8a96a4; font-size: 0.62rem; line-height: 1.42; }

    /* Files are one dedicated surface with two explicit sources. */
    .materials-lenses { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.28rem; padding: 0.2rem; border: 1px solid #dce3eb; border-radius: 0.68rem; background: #eef2f6; }
    .materials-lens {
      min-width: 0; display: grid; grid-template-columns: 1.55rem minmax(0, 1fr) auto; gap: 0.3rem; align-items: center;
      min-height: 2.5rem; padding: 0.3rem 0.36rem; border: 1px solid transparent; border-radius: 0.52rem;
      background: transparent; color: inherit; text-align: left; cursor: pointer;
      transition: border-color 130ms ease, background 130ms ease, box-shadow 130ms ease;
    }
    .materials-lens:hover { border-color: #c4d2e0; background: rgba(255,255,255,0.72); }
    .materials-lens.active { border-color: #bfd0e1; background: #fff; box-shadow: 0 2px 7px rgba(38, 68, 99, 0.08); }
    .materials-lens-mark { width: 1.55rem; height: 1.55rem; display: grid; place-items: center; border-radius: 0.43rem; background: #e7edf4; color: #587087; font-size: 0.66rem; font-weight: var(--weight-bold); }
    .materials-lens-mark.is-artifacts { background: #e6f3ef; color: #41806a; }
    .materials-lens-mark.is-knowledge { background: #eeeaf6; color: #745c94; }
    .materials-lens-copy { min-width: 0; }
    .materials-lens-copy strong, .materials-lens-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .materials-lens-copy strong { color: #2c3c4f; font-size: 0.65rem; }
    .materials-lens-copy small { display: none; }
    .materials-lens-count { min-width: 1.18rem; height: 1.18rem; display: grid; place-items: center; padding: 0 0.22rem; border-radius: 999px; background: #e4ebf2; color: #63758a; font-size: 0.56rem; font-weight: var(--weight-bold); }
    .active-material-section { min-height: 0; }
    #project-side-panel .active-material-section .project-files-summary { min-height: 1.65rem; align-items: center; flex-wrap: nowrap; margin: 0; }
    #project-side-panel .active-material-section .project-files-summary > span { min-width: 0; flex: 1 1 auto; }
    #project-side-panel .active-material-section .project-files-controls { width: auto; flex: 0 0 auto; flex-wrap: nowrap; }
    #project-side-panel .active-material-section .project-files-empty { padding: 0.72rem 0.25rem; border-radius: 0.55rem; background: #f5f7f9; font-size: 0.66rem; }
    .material-section-marker.is-files { background: #7995ae; }
    .material-section-marker.is-artifacts { background: #58a084; }
    .material-section-marker.is-knowledge { background: #8a72a8; }
    .material-primary-result {
      min-width: 0; display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 0.75rem; align-items: center;
      margin-bottom: 0.8rem; padding: 0.78rem; border: 1px solid #d7e0e9; border-radius: 0.82rem;
      background: linear-gradient(135deg, #fff, #f4f8fb); color: inherit; text-decoration: none;
    }
    .material-primary-result.is-link:hover { border-color: #97b6d5; box-shadow: 0 8px 22px rgba(35, 66, 98, 0.09); }
    .material-primary-result-mark { width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 0.78rem; background: linear-gradient(145deg, #375e8c, #4a9a85); color: #fff; font-size: 0.82rem; font-weight: var(--weight-bold); }
    .material-primary-result-copy { min-width: 0; }
    .material-primary-result-copy small, .material-primary-result-copy strong, .material-primary-result-copy > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .material-primary-result-copy small { color: #7b8999; font-size: 0.64rem; }
    .material-primary-result-copy strong { margin-top: 0.14rem; color: #293b4f; font-size: 0.83rem; }
    .material-primary-result-copy > span { margin-top: 0.16rem; color: #6e7d8d; font-size: 0.67rem; }
    .material-primary-result-arrow { color: #4b789f; font-size: 1rem; }

    /* Quiet iMessage-like composer; queue and attachment ownership stay unchanged. */
    @media (min-width: 621px) {
      #form {
        min-height: 3.7rem; grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-rows: auto;
        align-items: end; gap: 0.18rem; padding: 0.38rem; border-radius: 999px;
        box-shadow: 0 8px 26px rgba(26,38,54,0.085), 0 1px 4px rgba(26,38,54,0.045);
      }
      #input { grid-column: 2; grid-row: 1; height: 2.85rem; min-height: 2.85rem; max-height: 8rem; padding: 0.7rem 0.4rem 0.46rem; }
      #attach-file { grid-column: 1; grid-row: 1; }
      #record-voice { grid-column: 3; grid-row: 1; }
      #send { grid-column: 4; grid-row: 1; }
      .composer-tool, #send { width: 2.85rem; height: 2.85rem; }
    }
    @media (min-width: 1181px) {
      #conversation-space.project-panel-open {
        grid-column: 1;
        grid-row: 2 / 4;
        grid-template-rows: subgrid;
      }
      #conversation-space.project-panel-open + #composer { grid-column: 1; }
      #conversation-space.project-panel-open #chat-viewport { grid-row: 1; }
      #conversation-space.project-panel-open #project-side-panel {
        position: relative;
        z-index: 6;
        grid-row: 1 / 3;
      }
      #conversation-space.project-panel-open #project-panel-resizer { grid-row: 1 / 3; }
      #conversation-space.project-panel-full #project-chat-rail { grid-row: 1 / 3; }
      #conversation-space:not(.project-panel-open) + #composer {
        display: grid; grid-template-columns: minmax(0, 1fr) 42px;
      }
      #conversation-space:not(.project-panel-open) + #composer > * { grid-column: 1; }
      #conversation-space.project-panel-open:not(.project-panel-full) + #composer {
        display: grid; grid-template-columns: minmax(360px, 1fr) 10px minmax(19rem, var(--project-panel-width)); column-gap: 0;
        padding-right: 0; padding-left: 0;
      }
      #conversation-space.project-panel-open:not(.project-panel-full) + #composer > * { grid-column: 1; }
    }
    @media (max-width: 1180px) {
      #workspace.project-chat-active #workspace-header {
        position: absolute; z-index: 10; top: 0; right: 0; left: 0; min-height: 3.65rem; display: grid;
        grid-template-columns: minmax(0, 1fr) auto; padding: 0; border: 0; background: linear-gradient(180deg, rgba(246, 247, 248, 0.98), rgba(246, 247, 248, 0)); box-shadow: none; pointer-events: none;
      }
      #workspace.project-chat-active #workspace-bar {
        min-height: 3.55rem; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.55rem;
        padding: calc(0.48rem + var(--safe-top)) calc(3.8rem + var(--safe-right)) 0.36rem max(0.62rem, var(--safe-left)); pointer-events: none;
      }
      #workspace.project-chat-active #sidebar-toggle { border-radius: 50%; background: rgba(255, 255, 255, 0.92); box-shadow: 0 3px 12px rgba(27, 43, 62, 0.08); pointer-events: auto; }
      #workspace.project-chat-active #project-header-identity { display: block; min-width: 0; pointer-events: none; }
      #workspace.project-chat-active #project-header-icon,
      #workspace.project-chat-active #project-description-wrap { display: none; }
      #workspace.project-chat-active #project-title-row { min-height: 2.75rem; justify-content: center; }
      #workspace.project-chat-active #project-title {
        max-width: min(18rem, 48vw); padding: 0.42rem 0.72rem; border: 1px solid rgba(205, 214, 224, 0.72); border-radius: 999px;
        background: rgba(255, 255, 255, 0.88); color: #405268; font-size: 0.72rem; font-weight: var(--weight-semibold); box-shadow: 0 3px 12px rgba(27, 43, 62, 0.05);
      }
      #workspace.project-chat-active #project-navigation {
        position: absolute; top: calc(0.48rem + var(--safe-top)); right: max(0.62rem, var(--safe-right)); width: auto; display: block; padding: 0; overflow: visible; border: 0; pointer-events: auto;
      }
      #workspace.project-chat-active #project-subviews,
      #workspace.project-chat-active #chat-subviews,
      #workspace.project-chat-active #chat-mode-switch { min-width: 0; display: block; padding: 0; }
      #workspace.project-chat-active #agent-passport-toggle { width: 2.75rem; height: 2.75rem; min-height: 2.75rem; padding: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.92); box-shadow: 0 3px 12px rgba(27, 43, 62, 0.08); }
      #workspace.project-chat-active #messages { padding-top: calc(4rem + var(--safe-top)); }
      #conversation-space, #conversation-space.project-panel-open, #conversation-space.project-panel-full { grid-template-columns: minmax(0, 1fr); }
      #project-panel-rail, #project-chat-rail, #project-panel-resizer { display: none; }
      #conversation-space.project-panel-open #chat-viewport { visibility: hidden; }
      #conversation-space.project-panel-open #project-side-panel {
        position: absolute; z-index: 11; inset: 0; display: grid; grid-column: 1; width: 100%; height: 100%;
        border-left: 0; background: #f8fafb; box-shadow: none;
      }
      #project-side-panel[hidden] { display: none !important; }
      .project-side-panel-header { min-height: 0; padding: 0; }
      .project-panel-identity { padding-top: calc(0.72rem + var(--safe-top)); padding-right: calc(0.72rem + var(--safe-right)); padding-left: calc(0.72rem + var(--safe-left)); }
      .project-side-panel-navigation { padding-right: calc(0.48rem + var(--safe-right)); padding-left: calc(0.65rem + var(--safe-left)); }
      .project-side-panel-tabs button, .project-side-panel-actions button { min-height: 2.75rem; }
      .project-side-panel-actions button { width: 2.75rem; height: 2.75rem; }
      .project-side-panel-body { padding-right: calc(0.82rem + var(--safe-right)); padding-bottom: calc(1rem + var(--safe-bottom)); padding-left: calc(0.82rem + var(--safe-left)); }
      #conversation-space.project-panel-full .project-clarification-list { grid-template-columns: 1fr; }
    }
    @media (max-width: 760px) {
      #live-meeting-dialog { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
      .live-meeting-header { min-height: 3.85rem; padding: calc(0.5rem + var(--safe-top)) max(0.62rem, var(--safe-right)) 0.5rem max(0.62rem, var(--safe-left)); }
      .live-meeting-header-copy { gap: 0.52rem; }
      .live-meeting-brand > strong { font-size: 0.84rem; }
      .live-meeting-brand > span { font-size: 0.42rem; letter-spacing: 0.025em; }
      .live-meeting-brand-divider { height: 1.65rem; }
      .live-meeting-heading > span { display: none; }
      .live-meeting-heading > strong { max-width: min(37vw, 9rem); font-size: 0.8rem; }
      .live-meeting-header-actions { gap: 0.3rem; }
      #live-meeting-copy-link { width: 2.6rem; display: grid; place-items: center; overflow: hidden; padding: 0; }
      #live-meeting-copy-link span { display: none; }
      .live-meeting-state { width: 0.62rem; height: 0.62rem; display: block; overflow: hidden; padding: 0; background: transparent; color: transparent; }
      .live-meeting-state::before { width: 0.48rem; height: 0.48rem; display: block; }
      .live-meeting-body { grid-template-columns: 1fr; grid-template-rows: minmax(12rem, 42dvh) minmax(0, 1fr); }
      .live-meeting-side-hidden .live-meeting-body { grid-template-rows: minmax(0, 1fr); }
      .live-meeting-stage { padding: 0.45rem 0.45rem 4.35rem; }
      .live-meeting-videos { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); grid-auto-rows: minmax(120px, 1fr); gap: 0.4rem; }
      .live-meeting-tile { min-height: 120px; border-radius: 10px; }
      .live-meeting-avatar { width: 4.25rem; height: 4.25rem; font-size: 1.2rem; }
      .live-meeting-camera-note { font-size: 0.66rem; }
      .live-meeting-side { border-top: 1px solid #dfe6ee; border-left: 0; }
      .live-meeting-side-tabs { margin: 0.4rem 0.55rem 0; }
      .live-meeting-secretary > header { padding: 0.55rem 0.68rem; }
      #live-meeting-secretary-messages { padding: 0.58rem 0.68rem; }
      #live-meeting-secretary-form { padding: 0.48rem max(0.55rem, var(--safe-right)) 0.48rem max(0.55rem, var(--safe-left)); }
      .live-meeting-controls { bottom: calc(0.52rem + var(--safe-bottom)); max-width: calc(100% - 0.9rem); padding: 0.28rem; }
      .live-meeting-control-group { gap: 0.3rem; }
      .live-meeting-controls button { min-width: 2.72rem; min-height: 2.72rem; overflow: hidden; padding: 0; font-size: 0; }
      .live-meeting-control-icon, .live-meeting-control-icon svg { width: 1.12rem; height: 1.12rem; }
      .live-meeting-controls .live-meeting-end { width: 2.72rem; display: grid; place-items: center; padding: 0; }
      .live-meeting-controls .live-meeting-end svg { width: 1.2rem; height: 1.2rem; }
      .live-meeting-transcript-line { grid-template-columns: auto minmax(0, 1fr); }
      .live-meeting-transcript-line time { display: none; }
      #project-side-panel .materials-lenses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; padding: 0.2rem; }
      #project-side-panel .materials-lens { width: auto; min-height: 2.5rem; padding-inline: 0.3rem; }
      #project-side-panel .materials-lens-mark { display: none; }
      #project-side-panel .materials-lens { grid-template-columns: minmax(0, 1fr) auto; }
      .material-primary-result { grid-template-columns: 2.55rem minmax(0, 1fr) auto; padding: 0.68rem; }
      .material-primary-result-mark { width: 2.55rem; height: 2.55rem; }
      .material-primary-result-copy > span { white-space: normal; }
    }

    @media (prefers-reduced-motion: reduce) {
      .live-meeting-orbit, .live-meeting-typing { animation: none; }
      .live-meeting-header-actions button, .live-meeting-controls button, #live-meeting-secretary-send { transition: none; }
    }
    @media (max-width: 620px) {
      #project-side-panel #conversation-artifacts .materials-search { width: 100%; min-height: 2.75rem; grid-column: 1 / -1; }
      #user-settings-dialog { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); }
      .user-settings-shell { max-height: calc(100dvh - 1rem); overflow-y: auto; padding: 0.82rem; }
      #user-settings-close, #notification-device-action, .project-notification-device, .project-notification-general, .notification-mode-field select { min-height: 2.75rem; }
    }

    .msg.team-message.redacted { opacity: 0.72; }
    .msg.team-message.redacted .msg-text { color: #738093; font-style: italic; }
    .msg.team-message.search-focus { animation: project-search-focus 1.8s ease-out; }
    @keyframes project-search-focus {
      0%, 35% { filter: drop-shadow(0 0 0.5rem rgba(35, 111, 190, 0.35)); transform: translateY(-1px); }
      100% { filter: none; transform: none; }
    }
    .team-message-editor { width: min(34rem, 100%); min-height: 6.5rem; resize: vertical; padding: 0.62rem 0.7rem; border: 1px solid #a9c4df; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; line-height: 1.45; }
    .team-message-editor:focus { outline: 2px solid rgba(35, 111, 190, 0.2); outline-offset: 1px; }
    .team-message-editor-actions { display: flex; justify-content: flex-end; gap: 0.42rem; margin-top: 0.48rem; }
    .team-message-editor-actions button { min-height: 2rem; padding: 0.32rem 0.7rem; border: 1px solid #c8d5e2; border-radius: 8px; background: #fff; color: #42556b; font: inherit; font-size: var(--type-small); font-weight: var(--weight-semibold); }
    .team-message-editor-actions button:last-child { border-color: #236fbe; background: #236fbe; color: #fff; }
    .message-action.delete:hover { color: #a54239; }

    #project-search-dialog, #message-fixation-dialog { width: min(42rem, calc(100vw - 2rem)); max-height: min(46rem, calc(100dvh - 2rem)); padding: 0; border: 1px solid #cbd8e5; border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 24px 70px rgba(20, 37, 56, 0.24); }
    #project-search-dialog::backdrop, #message-fixation-dialog::backdrop { background: rgba(24, 34, 46, 0.42); backdrop-filter: blur(3px); }
    .project-search-shell, .message-fixation-shell { display: grid; gap: 0; max-height: min(46rem, calc(100dvh - 2rem)); }
    .project-search-shell > header, .message-fixation-shell > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.15rem 0.9rem; border-bottom: 1px solid #e0e7ee; }
    .project-search-shell > header > div, .message-fixation-shell > header > div { display: grid; gap: 0.2rem; }
    .project-search-shell > header strong, .message-fixation-shell > header strong { font-size: 1.12rem; }
    .project-search-shell > header span, .message-fixation-shell > header span { color: #6d7b8e; font-size: var(--type-small); }
    #project-search-close, #message-fixation-close { width: 2.35rem; height: 2.35rem; border: 0; border-radius: 9px; background: transparent; color: #5c6c80; font: inherit; font-size: 1.5rem; }
    #project-search-close:hover, #message-fixation-close:hover { background: #edf2f7; }
    #project-search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem; padding: 0.9rem 1.15rem 0.65rem; }
    #project-search-input { min-width: 0; height: 2.75rem; padding: 0 0.82rem; border: 1px solid #c8d5e2; border-radius: 10px; background: #f8fafc; color: var(--ink); font: inherit; }
    #project-search-form button, #project-export { min-height: 2.75rem; padding: 0 0.9rem; border: 1px solid #bcd0e4; border-radius: 10px; background: #fff; color: #285f96; font: inherit; font-weight: var(--weight-semibold); }
    #project-search-form button { border-color: #236fbe; background: #236fbe; color: #fff; }
    .project-search-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; padding: 0 1.15rem 0.72rem; color: #708094; font-size: var(--type-small); }
    #project-search-results { min-height: 8rem; overflow-y: auto; padding: 0 0.65rem 0.8rem; }
    .project-search-result { width: 100%; display: grid; gap: 0.22rem; padding: 0.72rem 0.62rem; border: 0; border-top: 1px solid #e8edf2; background: transparent; color: var(--ink); text-align: left; font: inherit; }
    .project-search-result:hover { border-radius: 9px; background: #f3f7fa; }
    .project-search-result > span { color: #3470a8; font-size: var(--type-caption); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: 0.04em; }
    .project-search-result > p { margin: 0; color: #67778a; font-size: var(--type-small); line-height: 1.45; }

    .message-fixation-shell { padding-bottom: 1rem; }
    .message-fixation-shell fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; margin: 0; padding: 0.95rem 1.15rem 0.55rem; border: 0; }
    .message-fixation-shell legend { padding: 0 0 0.5rem; color: #5f6f82; font-size: var(--type-small); font-weight: var(--weight-semibold); }
    .message-fixation-shell fieldset label { display: flex; align-items: flex-start; gap: 0.52rem; padding: 0.68rem; border: 1px solid #d4dee8; border-radius: 11px; background: #f9fbfc; }
    .message-fixation-shell fieldset label:has(input:checked) { border-color: #78a9d8; background: #eef6fd; }
    .message-fixation-shell fieldset label.disabled { opacity: 0.52; }
    .message-fixation-shell fieldset span { display: grid; gap: 0.12rem; }
    .message-fixation-shell fieldset small { color: #6c7b8d; line-height: 1.3; }
    .message-fixation-shell > label { display: grid; gap: 0.32rem; padding: 0.42rem 1.15rem; color: #526478; font-size: var(--type-small); font-weight: var(--weight-semibold); }
    .message-fixation-shell input[type="text"], #message-fixation-name, #message-fixation-text { width: 100%; box-sizing: border-box; padding: 0.68rem 0.72rem; border: 1px solid #c8d5e2; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; }
    #message-fixation-text { resize: vertical; line-height: 1.45; }
    #message-fixation-error { margin: 0.35rem 1.15rem 0; color: #a54239; font-size: var(--type-small); }
    .message-fixation-shell > footer { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.75rem 1.15rem 0; }
    .message-fixation-shell > footer button { min-height: 2.55rem; padding: 0 0.9rem; border: 1px solid #c8d5e2; border-radius: 10px; background: #fff; color: #42556b; font: inherit; font-weight: var(--weight-semibold); }
    #message-fixation-submit { border-color: #236fbe; background: #236fbe; color: #fff; }
    @media (max-width: 620px) {
      #project-search-dialog, #message-fixation-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; }
      .project-search-shell, .message-fixation-shell { min-height: 100dvh; max-height: 100dvh; padding-top: var(--safe-top); padding-bottom: var(--safe-bottom); }
      #project-search-form { grid-template-columns: 1fr; }
      .project-search-toolbar { align-items: flex-start; }
      .message-fixation-shell fieldset { grid-template-columns: 1fr; }
      #project-search-results { min-height: 0; }
    }

    /* Quiet institutional workspace selected in the 2026-08-20 product review. */
    #app { --quiet-navy: #111d2f; --quiet-navy-soft: #1a2940; --quiet-blue: #2f6fb5; --quiet-line: #e4e8ed; }
    #sidebar {
      margin: 0; padding-left: var(--safe-left); border: 0; border-radius: 0;
      grid-template-rows: auto auto minmax(0,1fr) auto;
      background: linear-gradient(180deg, #111d2f 0%, #17263a 100%); color: #f5f7fa;
      box-shadow: inset -1px 0 rgba(255,255,255,.06); backdrop-filter: none;
    }
    .sidebar-brand { min-height: 4.25rem; display: grid; align-items: center; padding: .78rem 3.35rem .7rem 1rem; border-bottom: 0; }
    .sidebar-brand-row { grid-template-columns: minmax(0,1fr) auto; gap: .4rem; }
    #sidebar-collapse {
      position: absolute; left: .44rem; width: 2rem; height: 2rem; opacity: 0;
    }
    .sidebar-brand:hover #sidebar-collapse, #sidebar-collapse:focus-visible { opacity: 1; }
    .sidebar-brand-copy strong { color: #fff; font-size: 1.08rem; letter-spacing: -.025em; }
    .sidebar-brand-copy span { display: none; }
    .sidebar-search {
      position: absolute; z-index: 12; top: .86rem; right: .72rem; width: 2.35rem; height: 2.35rem;
      grid-template-columns: 1rem 0fr; gap: 0; margin: 0; padding: .65rem;
      overflow: hidden; border-color: transparent; border-radius: .58rem;
      background: rgba(255,255,255,.07); color: #b8c3d0;
      transition: width 160ms ease, grid-template-columns 160ms ease, background 160ms ease, border-color 160ms ease;
    }
    .sidebar-search:hover { background: rgba(255,255,255,.12); color: #fff; }
    .sidebar-search:focus-within {
      width: calc(100% - 1.44rem); grid-template-columns: 1rem minmax(0,1fr); gap: .46rem;
      border-color: rgba(255,255,255,.16); background: #223249; box-shadow: 0 12px 28px rgba(2,9,20,.28);
    }
    .sidebar-search svg { width: 1rem; height: 1rem; }
    #sidebar-project-search { min-width: 0; color: #fff; font-size: .78rem; opacity: 0; pointer-events: none; }
    .sidebar-search:focus-within #sidebar-project-search { opacity: 1; pointer-events: auto; }
    #sidebar-project-search::placeholder { color: #95a5b7; }
    #addressed-messages {
      margin: 0 .72rem .3rem; border-color: rgba(241,175,164,.18); background: rgba(174,70,57,.16); color: #f5cbc4;
    }
    .addressed-messages-icon { background: #b45e52; }
    #personal-chat-toggle {
      width: calc(100% - 1.44rem); min-height: 2.45rem; grid-template-columns: 1.45rem minmax(0,1fr); gap: .48rem;
      margin: .12rem .72rem .42rem; padding: .36rem .44rem; border: 0; border-radius: .45rem;
      background: transparent; color: #dbe3ec; box-shadow: none;
    }
    #personal-chat-toggle:hover, #personal-chat-toggle.active, #personal-chat-toggle[aria-pressed="true"] {
      border: 0; background: rgba(255,255,255,.085); color: #fff; box-shadow: none; transform: none;
    }
    .personal-chat-toggle-icon { width: 1.45rem; height: 1.45rem; border-radius: .38rem; background: transparent; color: #aebdcd; box-shadow: none; }
    .personal-chat-toggle-icon svg { width: 1rem; height: 1rem; }
    #personal-chat-toggle strong { font-size: .78rem; font-weight: 560; }
    #personal-chat-toggle small { display: none; }
    .sidebar-section-title { display: none; }
    #project-list { padding: .12rem .56rem .5rem; scrollbar-color: rgba(255,255,255,.14) transparent; }
    .project-company-group, .project-company-group:not(.is-collapsed), .project-pinned-group {
      padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
    }
    .project-company-group + .project-company-group { margin-top: .22rem; }
    .project-lifecycle-group { margin-top: .28rem; border-top: 1px solid rgba(255,255,255,.07); }
    .project-pinned-heading, .project-navigation-divider {
      margin: 0; padding: .42rem .46rem .22rem; color: #7f91a6; font-size: .64rem; font-weight: var(--weight-semibold);
      letter-spacing: .02em; text-transform: none;
    }
    .project-pinned-heading svg { display: none; }
    .project-company-heading { grid-template-columns: .65rem minmax(0,1fr); gap: .3rem; padding: .36rem .42rem .2rem; color: #8293a7; font-size: .68rem; }
    .project-company-heading:hover { background: transparent; color: #a9b7c6; }
    .project-company-chevron { width: .65rem; height: .65rem; color: #718399; }
    .project-company-copy { gap: 0; }
    .project-company-responsible, .project-company-unread { display: none; }
    .project-company-manage { color: #718399; }
    .project-company-projects { gap: .03rem; }
    .project-row { grid-template-columns: minmax(0,1fr) 1.5rem; }
    .project-item {
      min-height: 2rem; grid-template-columns: minmax(0,1fr); gap: 0; margin: 0; padding: .3rem .46rem;
      border: 0; border-radius: .42rem; color: #d3dce6;
    }
    .project-item:hover { background: rgba(255,255,255,.055); color: #fff; }
    .project-item.active { border: 0; background: rgba(255,255,255,.11); color: #fff; box-shadow: inset 2px 0 #70a5e0; }
    .project-item.project-inactive { color: #95a3b4; }
    .project-badge { display: none; }
    #app.sidebar-collapsed #sidebar-collapse { position: static; display: grid; opacity: 1; }
    #app.sidebar-collapsed .project-badge { display: grid; }
    .project-copy strong { color: inherit; font-size: .78rem; font-weight: 480; }
    .project-copy .project-card-company { display: none; }
    .project-row { position: relative; grid-template-columns: minmax(0,1fr); }
    .project-pin {
      position: absolute; z-index: 2; top: 50%; right: .12rem; width: 1.45rem; height: 1.45rem;
      color: #73869d; opacity: 0; pointer-events: none; transform: translateY(-50%);
    }
    .project-row:hover .project-pin, .project-row:focus-within .project-pin {
      opacity: 1; pointer-events: auto;
    }
    .project-row:hover .project-unread-stack, .project-row:focus-within .project-unread-stack { opacity: 0; }
    .project-pin:hover, .project-pin:focus-visible { border-color: transparent; background: rgba(255,255,255,.08); color: #b8d5f5; }
    .project-pin.is-pinned { color: #8bb8e9; }
    .project-unread-stack { right: .4rem; }
    .project-unread {
      min-width: 1.12rem; height: 1.12rem; padding: 0 .3rem; border: 0; background: #596c82; color: #f8fafc;
      font-size: .58rem; box-shadow: none;
    }
    .project-unread.team { background: #4d7d70; }
    .project-unread.mention { background: #a95f58; }
    .project-unread.overflow { min-width: .4rem; width: .4rem; height: .4rem; padding: 0; }
    #user-panel { align-self: end; padding: .55rem .7rem .7rem; border-top-color: rgba(255,255,255,.08); }
    #user-menu-toggle { grid-template-columns: 1.72rem minmax(0,1fr) 1.7rem; color: #e6ebf1; }
    #user-menu-toggle:hover, #user-menu-toggle[aria-expanded="true"] { border-color: transparent; background: rgba(255,255,255,.07); }
    #user-avatar { background: #31445d; color: #dce6f1; box-shadow: none; }
    #user-login { display: none; }
    #user-status { display: block; margin-top: .04rem; color: #76bd8b; font-size: .64rem; }
    .user-menu-settings { width: 1.05rem; height: 1.05rem; justify-self: center; fill: none; stroke: #91a2b6; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
    #user-menu-toggle:hover .user-menu-settings, #user-menu-toggle[aria-expanded="true"] .user-menu-settings { stroke: #dce8f4; }
    #user-menu { border-color: #dce2e9; background: #fff; }

    #conversation-space { background: #fff; }
    #project-chat-header {
      position: relative; z-index: 5; grid-column: 1; grid-row: 1; align-self: start; min-width: 0; min-height: 4.4rem; display: flex; align-items: center; justify-content: space-between;
      gap: 1rem; padding: .82rem 1.5rem .72rem; border-bottom: 1px solid var(--quiet-line); background: rgba(255,255,255,.96);
    }
    #project-chat-header[hidden] { display: none; }
    .project-chat-heading { min-width: 0; display: grid; gap: .16rem; padding: 0; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; }
    .project-chat-heading:focus-visible { outline: 2px solid #8db2da; outline-offset: 4px; border-radius: .2rem; }
    .project-chat-title-row { min-width: 0; display: flex; align-items: center; gap: .3rem; color: #172338; }
    .project-chat-title-row strong { overflow: hidden; color: inherit; font-size: 1rem; font-weight: var(--weight-semibold); letter-spacing: -.015em; text-overflow: ellipsis; white-space: nowrap; }
    .project-chat-title-row svg { width: .78rem; height: .78rem; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; transition: transform 140ms ease; }
    .project-chat-heading[aria-expanded="true"] .project-chat-title-row svg { transform: rotate(180deg); }
    #project-chat-members { color: #8994a3; font-size: .68rem; }
    .project-chat-actions { display: flex; align-items: center; gap: .3rem; }
    .project-chat-actions a {
      width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border-radius: 50%; color: #586779; text-decoration: none;
    }
    .project-chat-actions a:hover { background: #f0f4f8; color: #235f9f; }
    .project-chat-actions a[hidden] { display: none; }
    .project-chat-actions svg { width: 1.08rem; height: 1.08rem; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
    #project-live-meeting {
      position: absolute; z-index: 4; top: 4.8rem; left: 50%; width: min(calc(100% - 2rem), 46rem); min-width: 0;
      display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .62rem; padding: .55rem .62rem .55rem .72rem;
      border: 1px solid #d5e4f0; border-radius: .82rem; background: rgba(247, 251, 254, .97); color: #24364a;
      box-shadow: 0 8px 24px rgba(30, 58, 86, .09); transform: translateX(-50%); backdrop-filter: blur(12px);
    }
    #project-live-meeting[hidden] { display: none; }
    .project-live-meeting-mark { width: .58rem; height: .58rem; border-radius: 50%; background: #d6453d; box-shadow: 0 0 0 4px rgba(214, 69, 61, .1); }
    .project-live-meeting-copy { min-width: 0; display: flex; align-items: baseline; gap: .42rem; overflow: hidden; }
    .project-live-meeting-copy strong { flex: 0 0 auto; font-size: .76rem; }
    #project-live-meeting-meta { overflow: hidden; color: #748397; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
    #project-live-meeting-join { min-height: 2.1rem; padding: .38rem .72rem; border: 1px solid #b9d3e8; border-radius: .62rem; background: #fff; color: #2167a5; font: inherit; font-size: .7rem; font-weight: var(--weight-semibold); cursor: pointer; }
    #project-live-meeting-join:hover { border-color: #88b2d5; background: #f3f9fd; }
    #project-live-meeting-join:disabled { cursor: default; opacity: .62; }
    #project-live-meeting-join:focus-visible { outline: 2px solid rgba(35, 105, 168, .48); outline-offset: 2px; }
    #chat-viewport { grid-column: 1; grid-row: 1; }
    #conversation-space:not(.project-panel-open) #project-panel-rail { grid-column: 2; grid-row: 1 / 3; }
    #conversation-space.project-panel-open #project-side-panel,
    #conversation-space.project-panel-open #project-panel-resizer,
    #conversation-space.project-panel-full #project-chat-rail { grid-row: 1 / 3; }
    #messages { padding-top: 5.8rem; background: #fff; }
    #conversation-space.project-live-meeting-active #messages { padding-top: 9.4rem; }
    #messages[data-mode="team"] .msg.team-message {
      width: min(100%, 46rem); max-width: min(100%, 46rem); margin: .1rem auto .9rem; padding: 0 0 0 2.75rem;
      border: 0; border-radius: 0; background: transparent; box-shadow: none; color: #253247;
    }
    #messages[data-mode="team"] .msg.team-message.own,
    #messages[data-mode="team"] .msg.team-message.other,
    #messages[data-mode="team"] .msg.team-message.agent { width: min(100%, 46rem); max-width: min(100%, 46rem); margin-left: auto; margin-right: auto; background: transparent; box-shadow: none; }
    .msg.team-message .msg-avatar { left: 0; top: .08rem; width: 2rem; height: 2rem; }
    .team-message-author { color: #2f68aa; font-size: .76rem; }
    .msg.team-message .msg-text { padding: .14rem 0 0; background: transparent !important; }
    .msg.team-message.mentions-me .msg-text { padding: .14rem .28rem; border-radius: .3rem; background: #fff3f1 !important; }
    .team-message-meta { margin-top: .22rem; color: #9aa3af; }
    .team-thread { width: min(calc(100% - 2.75rem), 43.25rem); margin: -.55rem auto .9rem; }
    .team-thread-toggle { width: 100%; display: flex; align-items: center; gap: .42rem; padding: .25rem 0; border: 0; background: transparent; color: #7c8999; font: inherit; font-size: .68rem; cursor: pointer; text-align: left; }
    .team-thread-toggle strong { color: #326cae; }
    .team-thread-line { width: 1.7rem; height: 1px; background: #d7dfe8; }
    .team-thread-avatars { display: inline-flex; align-items: center; padding-left: .28rem; }
    .team-thread-avatar {
      width: 1.2rem; height: 1.2rem; display: grid; place-items: center; margin-left: -.28rem;
      border: 1.5px solid #fff; border-radius: 50%; background: var(--thread-soft, #edf2f7); color: var(--thread-color, #52677f);
      font-size: .47rem; font-weight: var(--weight-bold); line-height: 1;
    }
    .team-thread-last { color: #9aa4af; font-variant-numeric: tabular-nums; }
    .team-thread-toggle-label { margin-left: auto; color: #8794a3; }
    .team-thread.is-unread .team-thread-toggle strong { color: #b95f5f; }
    .team-thread.is-unread .team-thread-line { background: #e7c5c5; }
    .team-thread-replies { margin-top: .3rem; padding-left: .85rem; border-left: 1px solid #dde4eb; }
    #messages[data-mode="team"] .msg.team-message.thread-child { width: 100%; max-width: 100%; margin: .25rem 0 .75rem; padding-left: 2.45rem; }
    .msg.team-message.thread-child .msg-avatar { width: 1.72rem; height: 1.72rem; }
    .team-new-messages-divider {
      width: min(100%, 46rem); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .7rem;
      margin: .28rem auto 1rem; color: #3d73ad; font-size: .66rem; font-weight: var(--weight-semibold);
    }
    .team-new-messages-divider span { height: 1px; background: #d9e5f1; }
    .team-reactions { display: flex; flex-wrap: wrap; gap: .28rem; margin-top: .34rem; }
    .team-reaction {
      min-width: 2.15rem; height: 1.55rem; display: inline-flex; align-items: center; justify-content: center; gap: .25rem;
      padding: 0 .42rem; border: 1px solid #dce3ea; border-radius: 999px; background: #f7f9fb; color: #68788a;
      font: inherit; font-size: .75rem; cursor: pointer;
    }
    .team-reaction strong { color: inherit; font-size: .64rem; font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; }
    .team-reaction:hover { border-color: #b9c9da; background: #f2f6fa; }
    .team-reaction.active { border-color: #b9d2ec; background: #edf5fd; color: #316fae; }
    .team-reaction:focus-visible, .team-reaction-picker button:focus-visible { outline: 2px solid #7fa7d0; outline-offset: 1px; }
    .team-reaction-picker {
      position: absolute; top: 1.95rem; right: .25rem; z-index: 8; display: flex; align-items: center; gap: .12rem;
      padding: .28rem; border: 1px solid #dce3ea; border-radius: .7rem; background: rgba(255,255,255,.98);
      box-shadow: 0 8px 24px rgba(30,45,63,.13);
    }
    .team-reaction-picker button {
      width: 2rem; height: 2rem; display: grid; place-items: center; padding: 0; border: 0; border-radius: .48rem;
      background: transparent; font: inherit; font-size: .92rem; cursor: pointer;
    }
    .team-reaction-picker button:hover, .team-reaction-picker button.active { background: #edf3f9; }

    .project-side-panel-header { min-height: 3.7rem; padding: 0; border-bottom: 1px solid var(--quiet-line); background: #fff; }
    .project-panel-identity { display: none !important; }
    .project-side-panel-navigation { min-height: 3.7rem; padding: 0 .7rem 0 .95rem; border-top: 0; }
    .project-side-panel-tabs { width: 100%; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; }
    .project-side-panel-tabs button { min-height: 3.7rem; padding: 0 .25rem; border-bottom: 2px solid transparent; border-radius: 0; color: #657184; font-size: .72rem; }
    .project-side-panel-tabs button.active { border-bottom-color: #2f6fb5; background: transparent; color: #245d9d; }
    .project-side-panel-actions { margin-left: .2rem; }
    #project-panel-close { width: 2.25rem; height: 2.25rem; border-radius: 50%; }
    .project-side-panel-body { padding: 1.15rem 1.35rem 1.8rem; background: #fff; }
    #project-panel-context .project-panel-summary { border: 0; background: transparent; box-shadow: none; }
    .project-panel-project-settings { padding: 0; }

    #composer { padding: .55rem 0 .85rem; background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 28%); }
    #team-chat-options { display: none !important; }
    #form {
      min-height: 3.5rem; grid-template-columns: auto auto auto minmax(0,1fr) auto auto; grid-template-rows: 1fr;
      align-items: center; gap: .16rem; padding: .32rem .38rem; border-color: #dce2e8; border-radius: 1rem;
      background: #fff; box-shadow: 0 6px 20px rgba(26,38,54,.07);
    }
    #form:focus-within { border-color: #9fb9d6; box-shadow: 0 0 0 3px rgba(47,111,181,.07), 0 8px 24px rgba(26,38,54,.08); }
    #team-agent-option { grid-column: 1; grid-row: 1; }
    #attach-file { grid-column: 2; grid-row: 1; }
    #team-reply-context { grid-column: 3; grid-row: 1; }
    #input { grid-column: 4; grid-row: 1; height: 2.65rem; min-height: 2.65rem; max-height: 7.5rem; padding: .66rem .38rem .42rem; }
    #record-voice { grid-column: 5; grid-row: 1; }
    #send { grid-column: 6; grid-row: 1; }
    #team-agent-option[hidden], #team-reply-context[hidden] { display: none; }
    #team-agent-option label, #team-reply-context {
      min-height: 2rem; display: inline-flex; align-items: center; gap: .28rem; padding: .25rem .42rem;
      border: 0; border-radius: .52rem; background: #edf3fa; color: #316ba9; font-size: .7rem; white-space: nowrap;
    }
    #team-agent-request { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    #team-agent-option strong { font-size: .7rem; font-weight: var(--weight-semibold); }
    .team-agent-remove { color: #8294a8; font-size: .9rem; line-height: 1; }
    #team-agent-option:not(.is-active) label { width: 2rem; justify-content: center; padding: .25rem; background: transparent; color: #8492a2; }
    #team-agent-option:not(.is-active) strong, #team-agent-option:not(.is-active) .team-agent-remove { display: none; }
    #team-agent-option:not(.is-active) label::before {
      content: "@"; font-size: .82rem; font-weight: var(--weight-semibold); line-height: 1;
    }
    #team-agent-option:not(.is-active) label:hover { background: #f1f4f7; color: #4773a3; }
    #team-reply-context { background: #f2f4f7; color: #647386; }
    #team-reply-context strong { max-width: 8rem; overflow: hidden; font-size: .68rem; text-overflow: ellipsis; }
    #team-reply-cancel { padding: 0; border: 0; background: transparent; color: #8995a3; font: inherit; font-size: .9rem; cursor: pointer; }
    .composer-tool, #send { width: 2.65rem; height: 2.65rem; }
    #send { background: #2769ad; }

    @media (max-width: 1180px) {
      #project-chat-header {
        z-index: 11; padding-top: calc(.78rem + var(--safe-top)); padding-left: calc(4rem + var(--safe-left));
        background: transparent; pointer-events: none;
      }
      .project-chat-heading, .project-chat-actions a { pointer-events: auto; }
      #workspace.project-chat-active #workspace-header { background: transparent; }
      #workspace.project-chat-active #project-title-row, #workspace.project-chat-active #project-navigation { display: none; }
      #workspace.project-chat-active #messages { padding-top: calc(4.8rem + var(--safe-top)); }
      #project-live-meeting { top: calc(4.55rem + var(--safe-top)); }
      #conversation-space.project-live-meeting-active #messages { padding-top: calc(8.9rem + var(--safe-top)); }
      #conversation-space.project-panel-open #project-chat-header { visibility: hidden; }
      .project-side-panel-tabs button { min-height: 3.35rem; }
      #form { width: calc(100% - 1rem - var(--safe-left) - var(--safe-right)); grid-template-columns: auto auto auto minmax(0,1fr) auto auto; }
    }
    @media (max-width: 900px) {
      #sidebar {
        inset: 0 auto 0 0; width: min(86vw, 18rem); height: 100dvh; max-height: 100dvh;
        grid-template-rows: auto auto minmax(0,1fr) auto; border-radius: 0;
      }
      #sidebar-collapse { display: none; }
      .sidebar-brand { min-height: 3.85rem; padding-top: .65rem; padding-bottom: .55rem; }
      .project-company-heading { min-height: 2rem; }
      .project-item { min-height: 2.15rem; }
      .project-pin { width: 1.85rem; height: 1.85rem; opacity: 0; pointer-events: none; }
      .project-item.active + .project-pin { opacity: 1; pointer-events: auto; }
      #user-menu-toggle { min-height: 2.65rem; }
      #sidebar-resizer { position: absolute; }
    }
    @media (max-width: 620px) {
      #project-chat-header { min-height: 3.85rem; padding-right: .65rem; }
      #project-live-meeting { top: calc(4.15rem + var(--safe-top)); width: calc(100% - 1rem); gap: .5rem; }
      .project-live-meeting-copy { display: grid; gap: .08rem; }
      #conversation-space.project-live-meeting-active #messages { padding-top: calc(8.55rem + var(--safe-top)); }
      .project-chat-heading strong { font-size: .9rem; }
      #messages[data-mode="team"] .msg.team-message { padding-left: 2.35rem; }
      .team-thread { width: calc(100% - 2.35rem); }
      #form { min-height: 3.25rem; padding: .24rem; border-radius: .9rem; }
      #team-agent-option strong { display: block; }
      #team-agent-option label { width: auto; justify-content: center; padding: .2rem .38rem; }
      #team-reply-context strong { max-width: 4.5rem; }
      .composer-tool, #send { width: 2.65rem; height: 2.65rem; }
      #input { min-width: 3rem; padding-inline: .22rem; }
    }
