/* Spaces extends the existing Cosmic workspace and uses its actual room renderer. */
body[data-mode=spaces] .workspace{grid-template-columns:204px minmax(0,1fr)}
body[data-mode=spaces] .main{grid-column:2;grid-row:1}
body[data-mode=spaces] .sidebar,body[data-mode=spaces] .context-rail{display:none!important}
body[data-mode=spaces] .chat-header{display:none}body[data-mode=spaces] .panel{padding:0 32px 32px}
.spaces-home{max-width:1500px;margin:auto}.spaces-hero{padding:36px 22px 24px;margin:0 -12px 24px;min-height:220px;background:linear-gradient(90deg,#050a14 2%,#050a14b0 48%,#050a1440),url('/assets/cosmic-horizon.png') center/cover;border-radius:0 0 24px 24px}
.spaces-hero h1{font-size:clamp(2rem,4vw,3.4rem);letter-spacing:-.035em;line-height:1.08;margin:8px 0 12px;font-weight:650}.spaces-hero h1 span{color:#aa94ff}.spaces-hero p{max-width:570px;margin:0 0 24px;color:#c2cdef;font-size:1rem;line-height:1.5}.spaces-eyebrow{letter-spacing:.23em;text-transform:uppercase;font-size:.8rem;color:#b2c6ff}.spaces-searchbar{display:flex;gap:14px;align-items:center;max-width:920px}.spaces-searchbar input{flex:1;min-width:100px;margin:0!important;background:#091326db!important}.spaces-searchbar button{min-height:46px;white-space:nowrap}.spaces-section{margin:28px 0}.spaces-section-head{display:flex;align-items:center;gap:16px;justify-content:space-between;margin-bottom:15px;flex-wrap:wrap}.spaces-section h2{margin:0;font-size:1.35rem;font-weight:600}.spaces-filters{display:flex;gap:7px;flex-wrap:wrap}.spaces-filters button{padding:8px 13px;font-size:.875rem;background:#0c1830}.spaces-filters button[aria-pressed=true]{border-color:#8b84ff;background:#272555;color:#fff}.spaces-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(265px,100%),1fr));gap:18px}
.space-card{min-width:0;border:1px solid #405781;border-radius:16px;background:linear-gradient(145deg,#0e1d34,#071020);overflow:hidden;display:flex;flex-direction:column;transition:transform .18s,border-color .18s}.space-card:hover{transform:translateY(-3px);border-color:#7c8dff}.space-cover{position:relative;height:136px;background:linear-gradient(0deg,#09122418,#09122460),url('/assets/cosmic-horizon.png') center/cover;overflow:hidden}.space-card[data-space-type=PERSONAL] .space-cover{background-position:28% 40%}.space-card[data-space-type=COMMUNITY] .space-cover{background-position:70% 55%}.space-card[data-space-type=PROJECT] .space-cover{background-position:82% 70%}.space-cover img{height:100%;width:100%;object-fit:cover}.space-cover .space-badges{position:absolute;inset:12px 12px auto;display:flex;justify-content:space-between;gap:6px;flex-wrap:wrap}.space-badge{display:inline-flex;align-items:center;border:1px solid #667baf80;background:#091329dd;border-radius:8px;padding:5px 9px;color:#dce5ff;font-size:.8rem;line-height:1.3;overflow-wrap:anywhere}.space-card-body{padding:17px 17px 15px;display:flex;flex-direction:column;gap:9px;flex:1}.space-card h3{margin:0;font-size:1.15rem;line-height:1.35;font-weight:600;overflow-wrap:anywhere}.space-card-body p{font-size:.9rem!important;line-height:1.55!important;margin:0!important;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}.space-card-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:auto;padding-top:14px}.space-card-foot span{font-size:.875rem;color:#abbde7}.space-card-foot button{padding:8px 15px;min-height:42px}.space-empty{border:1px dashed #35496f;border-radius:14px;padding:24px;line-height:1.6;background:#0b142440;color:var(--muted)}.space-invites{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(360px,100%),1fr));gap:14px}.space-invite{padding:20px;border:1px solid #405985;border-radius:14px;background:#0a1528}.space-invite h3{margin:0 0 6px;overflow-wrap:anywhere}.space-invite p{margin:4px 0;font-size:.9rem}.space-invite .row{margin-top:14px}.space-more{margin-top:15px;padding:10px 20px}
.space-create-layout{max-width:1140px;margin:28px auto;display:grid;grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr);gap:24px;align-items:start}.space-form,.space-preview{padding:24px;border:1px solid #354d7a;border-radius:17px;background:linear-gradient(135deg,#111c34,#060e1c)}.space-preview{position:sticky;top:20px}.space-form h2,.space-preview h2{margin-top:0;font-size:1.3rem}.space-form form{display:grid;gap:14px}.space-field{display:grid;gap:7px;font-size:.925rem}.space-field input,.space-field textarea,.space-field select{width:100%;max-width:none;margin:0!important;font:inherit;background:#060e1d;border:1px solid #344970;border-radius:9px;padding:11px;color:inherit}.space-field textarea{min-height:90px;resize:vertical}.space-form-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:10px}.space-form-actions button{padding:11px 20px}.space-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.space-options button{display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:14px;background:#0a152a;text-align:start;font-size:.95rem}.space-options button[aria-pressed=true]{border-color:#8986ff;background:linear-gradient(130deg,#272762,#121a39);box-shadow:0 0 16px #615cff25}.space-switch{display:flex!important;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid #283d61;padding-top:14px;line-height:1.5}.space-switch input[type=checkbox]{appearance:none;position:relative;flex-shrink:0;width:46px!important;height:26px;min-height:26px;padding:0!important;margin:0!important;border-radius:20px!important;background:#35405b!important;border:1px solid #7f8aa4!important;cursor:pointer}.space-switch input:before{content:'';position:absolute;inset-block-start:3px;inset-inline-start:3px;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .15s}.space-switch input:checked{background:linear-gradient(90deg,#7152ff,#4076ff)!important;border-color:#aaa0ff!important}.space-switch input:checked:before{transform:translateX(20px)}[dir=rtl] .space-switch input:checked:before{transform:translateX(-20px)}.space-field-error{color:#ffbbc7!important;margin:0!important;white-space:pre-wrap}.space-help{font-size:.875rem;color:#aebde0;line-height:1.55;margin:0}
.space-bar{padding:0 24px;flex-shrink:0;border-bottom:1px solid #263b62;background:#081223}.space-back{border:0;padding:8px 0;color:#b5c5f4;font-size:.875rem}.space-meta{display:flex;gap:7px;flex-wrap:wrap;margin:8px 0 12px}.space-tabs{display:flex;gap:20px;overflow-x:auto}.space-tabs button{border:0;border-bottom:3px solid transparent;border-radius:0;padding:13px 2px;color:#b5c5e9;white-space:nowrap;min-height:44px}.space-tabs button[aria-selected=true]{border-bottom-color:#8c75ff;color:#fff}.space-subpanel{max-width:950px;margin:0 auto}.space-subpanel header{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:20px}.space-subpanel h2{margin:0;font-size:1.4rem}.space-subpanel header button{padding:10px 16px}.space-resource{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px;margin:10px 0;border:1px solid #314872;border-radius:12px;background:#0b172a;flex-wrap:wrap}.space-resource-main{flex:1;min-width:150px;overflow-wrap:anywhere}.space-resource-main strong{display:block;font-size:1rem;line-height:1.5}.space-resource-main small{display:block;color:var(--muted);line-height:1.5;margin-top:4px}.space-resource-actions{display:flex;gap:6px;flex-wrap:wrap}.space-resource-actions button{padding:8px 12px;font-size:.875rem;min-height:40px}.space-memory-preview{white-space:pre-wrap;overflow-wrap:anywhere;padding:18px;border:1px solid #354972;border-radius:13px;background:#0a1426;font-size:1rem;line-height:1.65}.space-permissions{display:grid;gap:6px;margin-top:12px}.space-permissions .space-switch{font-size:.9rem;padding-top:10px}.space-danger{margin-top:28px;border-top:1px solid #493441;padding-top:20px}.space-danger button{padding:10px 15px;border-color:#8a576b;color:#ffbbc9}.space-ai-hint{font-size:.875rem;padding:8px 14px;margin:0;color:#b3c4ea;line-height:1.5}.space-room .chat-header{min-height:100px}.space-room .chat-toolbar{display:none!important}.space-room .context-card .space-memory-preview{font-size:.875rem;max-height:190px;overflow:auto;padding:10px}.space-room .context-card .context-item{white-space:normal}.space-room #room-ai{white-space:nowrap}.spaces-home button,.space-form button,.space-bar button{touch-action:manipulation}
@media(max-width:1100px){body[data-mode=spaces] .workspace{grid-template-columns:90px minmax(0,1fr)}.space-create-layout{grid-template-columns:minmax(0,1fr) 280px;gap:16px}.space-form,.space-preview{padding:18px}}
@media(max-width:760px){body[data-mode=spaces] .workspace{grid-template-columns:76px minmax(0,1fr)}body[data-mode=spaces] .panel{padding:0 16px 24px}.spaces-hero{padding:28px 12px 20px;min-height:195px}.spaces-searchbar{align-items:stretch;flex-direction:column;gap:9px}.spaces-searchbar button{align-self:flex-start}.space-create-layout{grid-template-columns:minmax(0,1fr);margin:16px auto}.space-preview{position:static}.space-preview .space-cover{height:100px}.space-bar{padding:0 14px}.space-tabs{gap:17px}.space-resource{gap:10px}.space-room .chat-header{min-height:84px}}
@media(max-width:540px){body[data-mode=spaces] .workspace{display:block}.spaces-grid{grid-template-columns:1fr}.spaces-hero h1{font-size:2.1rem}.spaces-section{margin:24px 0}.space-cover{height:145px}.space-tabs{gap:14px}.space-tabs button{font-size:.875rem}.space-form,.space-preview{padding:16px}.space-options{gap:7px}.space-options button{padding:12px;font-size:.875rem}.space-room .header-controls{max-width:none;flex-wrap:nowrap}.space-room .header-controls #model{display:none}.space-room .chat-heading h1{max-width:none}.space-meta .space-badge{font-size:.75rem}.space-room .composer-options{gap:5px}}
@media(prefers-reduced-motion:reduce){.space-card,.space-switch input:before{transition:none}.space-card:hover{transform:none}}
@media(min-width:541px) and (max-width:1100px){.app-nav{padding-inline:5px}.app-nav .nav-item{padding:10px 3px}.app-nav .nav-item span{font-size:.8rem;overflow-wrap:normal}}
.spaces-hero h1 span{margin-inline-start:.12em}

.space-panel-toggle{font-size:1.55rem;line-height:1;min-width:44px;min-height:44px;flex-shrink:0}.space-panel-toggle:hover{border-color:#8c75ff;background:#1c2350}.space-panel-collapsed .chat-header{border-bottom:1px solid #263b62}

/* Shared Spaces use a light canvas while the navigation retains its dark identity. */
body[data-mode=spaces] .main,body.space-room .main{--bg:#f6f8fb;--panel:#fff;--raised:#edf2f9;--border:#d8e0ec;--muted:#596b84;--ink:#172941;--text:#172941;--accent:#3868d6;color:#172941;background:#f6f8fb;color-scheme:light}
body[data-mode=spaces] .main button,body.space-room .main button{color:#254267;background:#fff;border-color:#d5deec;box-shadow:none}
body[data-mode=spaces] .main button:hover,body.space-room .main button:hover{background:#eef4ff;border-color:#b3c6e6}
body[data-mode=spaces] .main button.primary,body.space-room .main button.primary,body.space-room .main .send{color:#fff;border-color:#3c73d5;background:linear-gradient(130deg,#4285e9,#466cdd);box-shadow:0 4px 12px #356ed322}
body[data-mode=spaces] .main button:focus-visible,body.space-room .main button:focus-visible,body.space-room .main input:focus-visible,body.space-room .main textarea:focus-visible{outline-color:#346acb}
.spaces-hero{padding:40px 30px 28px;min-height:230px;background:linear-gradient(90deg,#10233de8,#10233d80 60%,#10233d15),url('/assets/cosmic-horizon.png') center/cover;color:#fff}
.spaces-hero h1 span{color:#bfc5ff}.spaces-hero p{color:#e2e9fa}.spaces-eyebrow{color:#d4def8}
.spaces-searchbar input{background:#fff!important;color:#243854!important;border-color:#d8e2f2!important;padding:13px 16px;border-radius:12px}.spaces-searchbar input::placeholder{color:#637691}
.spaces-searchbar button{min-height:48px}.spaces-filters button{min-height:44px}
.spaces-filters button[aria-pressed=true]{border-color:#9cb8e4!important;background:#e5efff!important;color:#285cc0!important}
.space-card{border-color:#d7dfeb;background:#fff;transition:transform .18s,border-color .18s,box-shadow .18s}.space-card:hover{border-color:#a2bade;box-shadow:0 8px 20px #1b386412}
.space-cover{height:148px}.space-card-body{padding:18px}.space-card h3{font-weight:650}.space-card-body p{color:#5c6d85;line-height:1.6!important}.space-card-foot span{font-size:.8rem;color:#5a6e8c}.space-card-foot button{min-height:44px}
.space-empty{border-color:#c7d4e6;padding:28px;background:#f8faff;color:#596b84}.space-invite{padding:22px;border-color:#d8e1ee;background:#fff}.space-invite p{color:#5a6d88}.space-more{min-height:44px}
.space-form,.space-preview{border-color:#d8e0ec;background:#fff;color:#20334e}.space-form form,.space-work-form{display:grid;gap:16px}
.space-field input,.space-field textarea,.space-field select{background:#f9fbfe!important;border-color:#cbd7e7!important;color:#21344f!important;color-scheme:light}.space-field textarea{min-height:100px}
.space-form-actions button{min-height:44px}.space-options button[aria-pressed=true]{border-color:#83a8e2!important;background:#eaf2ff!important;box-shadow:inset 0 0 0 1px #abc5ec!important;color:#285ebc!important}
.space-switch{border-color:#e0e6ef}.space-switch input[type=checkbox]{background:#c3cddd!important;border-color:#9caec8!important}.space-switch input:checked{background:#3d73d9!important;border-color:#396ac6!important}
.space-field-error{color:#ae2841!important;line-height:1.5}.space-help{color:#5b6f8b;line-height:1.6}
.space-bar{padding:0 24px 18px;border-color:#dce4ef;background:#f6f8fb}
.space-topline{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:60px;margin-bottom:10px}
.space-tabs{gap:5px;min-width:0;scrollbar-width:thin;scroll-padding-inline:4px}
.space-tabs button{border:0!important;border-bottom:3px solid transparent!important;background:transparent!important;border-radius:0!important;padding:14px 12px;min-height:48px;font-size:.9rem;font-weight:550}
.space-tabs button[aria-selected=true]{border-bottom-color:#4c7ee0!important;color:#265fbe!important}
.space-top-actions{display:flex;gap:8px;align-items:center;flex-shrink:0}.space-member-link{font-size:.8rem;min-height:44px;padding:8px 12px}.space-overflow{min-width:44px;min-height:44px;font-size:1.45rem}
.space-banner{position:relative;isolation:isolate;display:flex;align-items:flex-end;justify-content:space-between;gap:16px;min-height:170px;padding:22px 25px;border-radius:16px;overflow:hidden;background:#243d67 url('/assets/cosmic-horizon.png') center 52%/cover;color:#fff}
.space-banner:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#071b39c9,#10254057);z-index:-1}[dir=rtl] .space-banner:after{background:linear-gradient(270deg,#071b39c9,#10254057)}
.space-banner>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2}.space-banner-copy{min-width:0;max-width:760px}
.space-banner h2{margin:7px 0;font-size:clamp(1.3rem,2.2vw,1.8rem);font-weight:650;line-height:1.2;overflow-wrap:anywhere;letter-spacing:-.025em}
.space-banner p{margin:0;font-size:.9rem;line-height:1.6;color:#f0f4fc;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.space-banner .space-banner-eyebrow{font-size:.7rem;text-transform:uppercase;letter-spacing:.14em;color:#d5e5ff}
.space-banner .space-edit{min-height:44px;background:#f8fbfff0!important;border-color:#e2e9f5!important;color:#284264!important;padding:10px 16px;flex-shrink:0}
.space-secondary-heading{display:flex;align-items:center;gap:15px;margin-top:14px}.space-secondary-heading button,.space-back{padding:8px 0;background:transparent!important;border:0!important;color:#315c9b!important;font-size:.875rem;min-height:44px}
.space-menu-actions{display:grid;gap:8px}.space-menu-actions button{text-align:start;min-height:48px;padding:10px 16px}
.space-subpanel{max-width:1020px}.space-subpanel>header{margin-bottom:22px}.space-subpanel h2{margin:0 0 5px;font-size:1.35rem;letter-spacing:-.02em}.space-subpanel header button{min-height:44px}
.space-resource{padding:18px;border-color:#d9e1ed;background:#fff}.space-resource-main small{color:#60738f}.space-resource-actions button{padding:10px 12px;min-height:44px}
.space-memory-preview{padding:20px;border-color:#d7e0ed;background:#fff;line-height:1.7;color:#2c405e}.space-danger{border-color:#e7dce1}
.space-danger button,body.space-room .main button.danger{border-color:#e5bec9;color:#a9324a}
.space-ai-hint{font-size:.8rem;padding:8px 24px;color:#61738b;background:#f6f8fb}
.space-room .chat-header{min-height:78px;padding:16px 24px;background:#fff;border-color:#dce4ef;color:#203751}.space-room .chat-heading h1{font-size:1.15rem;font-weight:650}.space-room .chat-heading>span{margin-top:5px;color:#657b97;font-size:.78rem}
.space-room .header-controls select{background:#f4f7fc;color:#385475;border-color:#d5dfed}.space-room .header-controls .icon{background:#fff;border-color:#d5dfed;color:#425f83}
.space-panel-toggle[hidden]{display:none!important}.space-panel-collapsed .chat-header{border-color:#dce4ef}
.space-room .messages{padding:8px 24px 22px;background:#f6f8fb}.space-room .message,.space-room .message.user{padding-inline-start:48px;margin-block:20px 26px;color:#293e59}
.space-room .message .by{color:#254a7b;font-size:.83rem;min-height:29px}.space-room .message .by:before{border-radius:10px;color:#2d66bc;background:#e8f1ff;border-color:#c1d4ee;width:34px;height:34px;box-shadow:none}.space-room .message.user .by:before{background:#dcebf1;border-color:#bfd3df;color:#416b84}
.space-room .message .content{font-size:.95rem;line-height:1.75;color:#2b3e57}.space-room .message.assistant .content{background:#fff;border-color:#d8e2ef;border-radius:13px;padding:17px 19px;box-shadow:0 2px 6px #31508004}
.space-room .message-footer button{background:transparent;border-color:transparent;color:#637c9a}.space-room .source{background:#eef4fc;border-color:#ccd9ea;color:#33598a}.space-room .empty{background:none;color:#203a5c}.space-room .empty p{color:#637590}.space-room .empty img{width:62px;height:62px;filter:none}
.space-room .composer-wrap{padding:0 24px 14px;background:linear-gradient(0deg,#f6f8fb 85%,#f6f8fb00)}.space-room .composer{background:#fff;border-color:#bed0e8;border-radius:14px;box-shadow:0 3px 12px #315b9110;color:#263f60;padding:11px 14px}.space-room .composer textarea{color:#263f60;background:transparent}.space-room .composer textarea::placeholder{color:#73869f}
.space-room .composer-options>.icon,.space-room .main .internet,.space-room .main .room-ai{background:#f3f7fd;color:#476488;border-color:#d4dfed}.space-room .main .room-ai[aria-pressed=true]{background:#e6efff;color:#295dae;border-color:#90b1e1}.space-room .main .internet[aria-pressed=true]{color:#1d765a!important;background:#e4f5ed!important;border-color:#8dc7ae!important;box-shadow:none}.space-room .composer-note,.space-room .keyboard-hint{color:#657b97}
.space-chat-insights{padding:0 24px 16px;background:#f6f8fb;flex-shrink:0;max-height:min(38vh,400px);overflow:auto}.space-chat-insights:empty{display:none}.space-chat-insights[hidden]{display:none!important}
.space-work-list{display:grid;gap:12px}.space-work-item{display:flex;align-items:flex-start;gap:15px;padding:20px;border:1px solid #d8e2ef;background:#fff;border-radius:13px;min-width:0}
.space-work-item>input[type=checkbox]{appearance:auto;accent-color:#3f79da;width:24px;height:24px;min-width:24px;padding:0;margin:2px 0;cursor:pointer}
.space-work-content{min-width:0;flex:1}.space-work-content h3{font-size:1rem;line-height:1.5;margin:0 0 7px;overflow-wrap:anywhere}.space-work-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.9rem;line-height:1.65;margin:0 0 10px;color:#4e6685;max-height:220px;overflow:auto}
.space-task[data-status=done] h3{color:#6f7f95;text-decoration:line-through}.space-work-meta{display:flex;flex-wrap:wrap;gap:8px;font-size:.75rem;color:#59728f}.space-task-status{background:#edf3fc;padding:3px 8px;border-radius:6px}.space-task[data-status=done] .space-task-status{background:#e5f3eb;color:#397657}
.space-work-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.space-work-fields label:last-child{grid-column:1/-1}
.space-media-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(220px,100%),1fr));gap:18px}.space-media-card{border:1px solid #d7e1ef;border-radius:14px;background:#fff;overflow:hidden;min-width:0}.space-media-preview{height:175px;background:linear-gradient(135deg,#edf2fc,#e2eaf8);position:relative;display:grid;place-items:center;overflow:hidden}.space-media-preview img{width:100%;height:100%;object-fit:cover}.space-media-kind{position:absolute;inset-block-start:10px;inset-inline-start:10px;z-index:1;border-radius:7px;background:#fffffff0;padding:5px 9px;font-size:.75rem;color:#3b5f8b}.space-media-info{display:grid;gap:8px;padding:16px}.space-media-info strong{font-size:.9rem;overflow-wrap:anywhere}.space-media-info small{color:#6a7d97}.space-media-info button{justify-self:start;padding:9px 15px;min-height:44px}.space-media-create{margin-bottom:20px;padding:11px 16px}.space-media-viewer{display:block;max-width:100%;max-height:65vh;object-fit:contain;margin:10px auto}
body.space-room dialog,body[data-mode=spaces] dialog{color:#243a58;background:#f8fafd;border-color:#c6d5e9;color-scheme:light}body.space-room dialog button,body[data-mode=spaces] dialog button{color:#355882;background:#fff;border-color:#cddbec;min-height:44px}body.space-room dialog button.primary,body[data-mode=spaces] dialog button.primary{color:#fff;background:#4078d9;border-color:#3169c8}body.space-room dialog .dialog-actions a{background:#eef4fd;color:#365982;border-color:#cddbec}
.space-work-item button{touch-action:manipulation}
@media(max-width:1100px){.space-top-actions .space-member-link{display:none}.space-banner{min-height:155px}.space-work-item{flex-wrap:wrap}.space-work-item>.space-resource-actions{margin-inline-start:auto}}
@media(max-width:760px){.spaces-hero{padding:28px 20px 22px;min-height:195px}.space-bar{padding:0 14px 14px}.space-tabs{gap:2px}.space-tabs button{padding-inline:10px}.space-topline{gap:4px;min-height:54px;margin-bottom:8px}.space-room .chat-header{min-height:72px;padding:12px 14px}.space-room .messages{padding:8px 14px 18px}.space-room .composer-wrap{padding:0 14px 12px}.space-chat-insights{padding-inline:14px}.space-ai-hint{padding-inline:14px}.space-banner{min-height:130px;padding:18px;gap:10px}.space-banner h2{font-size:1.25rem}.space-banner .space-edit{font-size:.8rem;padding:9px 11px}}
@media(max-width:540px){.space-topline{align-items:stretch}.space-tabs{gap:0}.space-tabs button{font-size:.85rem;padding-inline:10px}.space-overflow{min-width:40px;padding:7px}.space-banner{min-height:114px;padding:15px;align-items:flex-start}.space-banner p:not(.space-banner-eyebrow){font-size:.8rem;-webkit-line-clamp:2}.space-banner .space-edit{min-width:42px;max-width:94px;min-height:44px;align-self:flex-end;line-height:1.3}.space-banner-eyebrow{display:none!important}.space-room .message,.space-room .message.user{padding-inline:0;margin-block:16px 20px}.space-room .message .by:before{width:28px;height:28px}.space-room .message.assistant .content{padding:13px 15px}.space-room .composer-wrap{padding:0 9px 9px}.space-work-fields{grid-template-columns:minmax(0,1fr)}.space-work-item{padding:16px;gap:10px}.space-media-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.space-media-preview{height:130px}.space-media-info{padding:12px}.space-chat-insights{max-height:30vh}}
@media(max-width:360px){.space-tabs button{padding-inline:8px;font-size:.8rem}.space-media-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.space-card,.space-switch input:before{transition:none}.space-card:hover{transform:none}}

/* The inline summary participates in the conversation’s single scroll area. */
.space-room .messages .space-chat-insights{padding:0;margin:22px 0 0;background:transparent;max-height:none;overflow:visible;flex-shrink:1}
