/* viberoom - Copyright (c) 2026 Todor Rusev - AGPL-3.0-or-later; see LICENSE */
:root {
  --rail-w: 60px;
  --rail-w-open: 212px;
  --side-w: 292px;
  --details-w: 600px;
  --gap: 6px;
  --chat-head-h: 46px;
  --composer-gap: 6px;
  --composer-min-h: 56px;
}
.shell {
  height: 100%; display: grid; gap: var(--gap); padding: var(--gap);
  grid-template-columns: var(--rail-w) var(--side-w) minmax(0, 1fr) auto;
  grid-template-areas: "rail side main details";
}
.side.arrive { animation: slide-in-left var(--t-slow) var(--ease-out); }
.shell.glide { transition: grid-template-columns var(--t-slow) var(--ease-out); }
.shell.rail-open { grid-template-columns: var(--rail-w-open) var(--side-w) minmax(0, 1fr) auto; }
.shell.resizing { user-select: none; cursor: col-resize; }
.no-key { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: var(--gap); background: var(--grad-canvas); animation: fade-in var(--t-base) var(--ease-out); }
.no-key .nk-card { max-width: 520px; padding: 32px 36px; text-align: center; background: var(--panel); border-radius: calc(24px * var(--r-scale)); box-shadow: var(--shadow-dialog); }
.no-key .nk-mark { width: 60px; height: 60px; margin-bottom: 12px; }
.no-key h1 { font-size: calc(22px * var(--fs-scale)); line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 12px; }
.no-key p { margin: 0 0 12px; font-size: calc(14px * var(--fs-scale)); font-weight: 600; line-height: 1.6; color: var(--ink-2); }
.no-key .nk-quiet { margin: 0; color: var(--muted); font-size: calc(13px * var(--fs-scale)); }
.no-key .nk-quiet b { color: var(--ink); font-weight: 800; }
body.keyless #app, body.keyless .toasts { display: none; }
.rail { grid-area: rail; position: relative; display: flex; flex-direction: column; align-items: stretch; padding: 8px 0 4px; min-height: 0; }
.rail-head { display: flex; align-items: center; margin-bottom: 14px; padding: 0 calc((var(--rail-w) - 44px) / 2); }
.shell.rail-open .rail-head { padding-inline: 14px; }
.rail-logo { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; margin: 0; color: var(--ink); font-weight: 800; font-size: calc(18px * var(--fs-scale)); white-space: nowrap; border-radius: calc(14px * var(--r-scale)); }
.rail-logo .mark { width: 44px; height: 44px; border-radius: calc(14px * var(--r-scale)); flex: none; display: block; box-shadow: var(--rail-logo-shadow); }
.rail-logo .word, .rail-item .label, .rail .conn-label { opacity: 0; width: 0; overflow: hidden; transition: opacity var(--t-base) var(--ease-out), width var(--t-base) var(--ease-out); white-space: nowrap; }
.shell.rail-open .rail-logo .word, .shell.rail-open .rail-item .label, .shell.rail-open .rail .conn-label { opacity: 1; width: auto; }
.rail-items { display: flex; flex-direction: column; gap: 10px; align-items: center; flex: 1 1 auto; min-height: 0; }
.rail-rooms-wrap { display: flex; flex-direction: column; align-items: stretch; flex: 0 1 auto; min-height: 0; align-self: stretch; margin: 2px 0; }
.rail-hr { flex: none; height: 1px; width: 44px; margin: 0 auto; background: linear-gradient(90deg, transparent, var(--lav-2) 25%, var(--lav-2) 75%, transparent); }
.shell.rail-open .rail-hr { width: auto; margin: 0 4px; }
.rail-rooms { display: flex; flex-direction: column; gap: 10px; align-items: center; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable both-edges; padding: 10px 0; }
.rail-rooms::-webkit-scrollbar { width: 4px; }
.rail-rooms::-webkit-scrollbar-track { margin: 10px 0; }
@supports not selector(::-webkit-scrollbar) { .rail-rooms { scrollbar-width: thin; } }
.shell.rail-open .rail-rooms { align-items: stretch; }
.rail-room { flex: none; }
.rail-room [data-ui="room-mark"] { width: 40px; height: 40px; border-radius: var(--room-mark-radius-rail); font-size: 16px; opacity: 0.72; transition: opacity var(--t-fast), transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast); }
.rail-room [data-ui="room-mark"][data-kind="emoji"] { font-size: 21px; }
.rail-room:hover [data-ui="room-mark"] { opacity: 1; transform: translateY(-2px) scale(1.06) rotate(-2deg); }
.rail-room:active [data-ui="room-mark"] { transform: scale(0.94); }
.rail-room.active, .rail-room.active:hover { background: transparent; box-shadow: none; }
.rail-room.active [data-ui="room-mark"] { opacity: 1; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary); }
.rail-room .rail-count { background: var(--unread-grad); min-width: 18px; text-align: center; z-index: 2; }
.rail-room .rail-count.bump { animation: badge-pop 360ms var(--ease-pop); }
@keyframes badge-pop { 0% { transform: scale(0.6); } 55% { transform: scale(1.3); } 100% { transform: scale(1); } }
.shell.rail-open .rail-items { align-items: stretch; padding: 0 14px; }
.shell:not(.rail-open) .rail-item, .shell:not(.rail-open) .rail-logo { gap: 0; }
.rail-item.new:hover { background: var(--rail-active-bg); color: var(--primary); box-shadow: var(--shadow-tile); }
.rail-toggle { width: 44px; height: 24px; margin-top: 8px; border-radius: calc(8px * var(--r-scale)); border: 0; background: transparent; color: var(--faint); display: grid; place-content: center; padding: 0; align-self: center; transition: background var(--t-fast), color var(--t-fast); }
.rail-toggle .i { width: 16px; height: 16px; }
.rail-toggle:hover { background: var(--rail-active-bg); color: var(--primary); }
.rail-foot { position: relative; margin-top: auto; display: flex; flex-direction: column; gap: 0; align-items: center; }
.rail-pops { position: absolute; left: 12px; bottom: calc(100% - 2px); z-index: 30; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.rail-pops .update-pop::after { display: none; }
.rail-pops .update-pop:last-child::after { display: block; }
.update-pop { position: relative; display: flex; gap: 6px; align-items: flex-start; width: 250px; padding: 10px 8px 10px 14px; background: var(--pop-bg); border-radius: calc(18px * var(--r-scale)) calc(18px * var(--r-scale)) calc(18px * var(--r-scale)) calc(6px * var(--r-scale)); box-shadow: var(--pop-shadow), var(--shadow-tile); font-size: calc(12.5px * var(--fs-scale)); font-weight: 600; color: var(--ink-2); animation: bubble-in 0.45s var(--ease-out); }
.update-pop::after { content: ""; position: absolute; left: 14px; bottom: -6px; width: 12px; height: 12px; background: var(--pop-bg); border-radius: 0 0 calc(3px * var(--r-scale)) 0; transform: rotate(45deg); box-shadow: var(--pop-arrow-shadow); }
.update-pop .up-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.update-pop .up-text { line-height: 1.4; }
.update-pop .up-text b { color: var(--ink); }
.update-pop .up-go { align-self: flex-start; }
.update-pop .up-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.update-pop .up-side { flex: none; display: flex; flex-direction: column; gap: 2px; }
.update-pop [data-ui="icon-button"] { width: 26px; height: 26px; }
.shell.rail-open .rail-foot { align-items: stretch; padding: 0 14px; }
.rail-item { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; border-radius: calc(14px * var(--r-scale)); color: var(--muted); font-weight: 800; font-size: calc(13px * var(--fs-scale)); white-space: nowrap; transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); }
.shell.rail-open .rail-item { width: auto; justify-content: flex-start; padding: 0 12px 0 0; }
.rail-item .ico { width: 44px; height: 44px; display: grid; place-content: center; flex: none; }
.rail-item .ico .i { width: 22px; height: 22px; }
.rail-item:hover { color: var(--primary); }
.rail-item.active { background: var(--rail-active-bg); color: var(--primary); box-shadow: var(--shadow-tile); }
.rail-item.me { background: var(--rail-active-bg); box-shadow: var(--shadow-tile); }
.rail-item.me .ico .avatar { display: block; }
.rail-item .ico .i, .rail-item .ico .avatar, .rail-logo .mark, .rail-toggle .i { transition: transform var(--t-base) var(--ease-pop); }
.rail-item.new:hover .ico .i { transform: rotate(90deg) scale(1.1); }
.rail-item[data-nav="rooms"]:hover .ico .i { animation: rail-tiles 480ms var(--ease-pop); }
.rail-item[data-nav="skills"]:hover .ico .i { transform: rotate(-8deg) translateY(-1px) scale(1.08); }
.rail-item[data-nav="settings"]:hover .ico .i { transform: rotate(60deg); }
.rail-item.me:hover .ico .avatar { transform: scale(1.08) rotate(-3deg); }
.rail-item:active .ico :is(.i, .avatar) { transform: scale(0.9); transition-duration: var(--t-fast); }
.rail-logo:hover .mark { animation: rail-bob 600ms var(--ease-pop); }
.rail-toggle:hover .i { transform: translateX(2px); }
@keyframes rail-tiles { 0% { transform: scale(1); } 40% { transform: scale(0.84) rotate(-6deg); } 100% { transform: scale(1); } }
@keyframes rail-bob { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-4px) rotate(-4deg); } 70% { transform: translateY(1px); } }
@media (prefers-reduced-motion: reduce) {
  .rail :is(.rail-item .ico .i, .rail-item .ico .avatar, .rail-logo .mark, .rail-toggle .i, .rail-room [data-ui="room-mark"]) { transition: none; animation: none; transform: none; }
}
.rail-count { position: absolute; top: -4px; right: -4px; background: var(--primary); color: var(--tile-count-ink); border-radius: var(--r-pill); font-size: calc(10px * var(--fs-scale)); padding: 0 6px; font-weight: 800; line-height: calc(16px * var(--fs-scale)); box-shadow: 0 0 0 2px var(--bg); }
.shell.rail-open .rail-count { position: static; margin-left: auto; box-shadow: none; }
.rail-status { position: relative; height: 0; width: 44px; align-self: center; }
.shell.rail-open .rail-status { width: auto; height: auto; display: flex; align-items: center; gap: 8px; padding: 8px 0 0 14px; color: var(--muted); font-size: calc(11px * var(--fs-scale)); font-weight: 700; }
.rail .conn { position: absolute; right: -3px; top: -11px; width: 14px; height: 14px; border-radius: calc(50% * var(--r-scale)); background: var(--faint); border: 3px solid var(--bg); transition: background var(--t-base); }
.shell.rail-open .rail .conn { position: static; width: 9px; height: 9px; border: 0; }
.rail .conn.ok { background: var(--green); }
.side { grid-area: side; background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--edge); display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.side-rooms, .side-room { display: flex; flex-direction: column; min-height: 0; flex: 1; animation: fade-in var(--t-base) var(--ease-out); }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 20px 20px 8px; }
.side-head h2 { font-size: calc(21px * var(--fs-scale)); letter-spacing: -0.01em; }
.side-head.room { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; padding: 10px 14px 6px; gap: 6px; }
.side-head.room #back-to-rooms { grid-column: 1; grid-row: 1; }
.side-head.room #room-settings-btn { grid-column: 3; grid-row: 1; }
.side-head.room #side-toggle { grid-column: 4; grid-row: 1; }
.side-room-title { grid-column: 1 / -1; grid-row: 2; min-width: 0; padding: 0 6px 4px; text-align: center; }
.side-room-title h2 { font-size: calc(21px * var(--fs-scale)); line-height: 1.2; white-space: normal; overflow-wrap: anywhere; text-wrap: pretty; }
.side-head.room [data-ui="icon-button"] { flex: none; }
.side-head.room [data-ui="icon-button"] .i { transition: transform var(--t-base) var(--ease-pop); }
.side-head.room #back-to-rooms:hover .i { transform: translateX(-2px) scale(1.1); }
.side-head.room #room-settings-btn:hover .i { transform: rotate(60deg); }
.side-head.room #side-toggle:hover .i { transform: translateX(-2px) scale(1.08); }
.shell.side-collapsed .side-head.room #side-toggle:hover .i { transform: translateX(2px) scale(1.08); }
.side-head.room [data-ui="icon-button"]:active .i { transform: scale(0.88); transition-duration: var(--t-fast); }
@media (prefers-reduced-motion: reduce) { .side-head.room [data-ui="icon-button"] .i { transition: none; transform: none; } }
.search { display: flex; align-items: center; gap: 8px; background: var(--softer); border: 0; border-radius: var(--r-pill); padding: 0 14px; height: 38px; margin: 4px 14px 10px; min-width: 0; cursor: text; transition: background var(--t-fast), box-shadow var(--t-fast); }
.search:hover { background: var(--lav); }
.search:focus-within { background: var(--lav); box-shadow: 0 0 0 2px var(--primary); }
.search input { border: 0; background: transparent; outline: none; flex: 1; min-width: 0; font-size: calc(13px * var(--fs-scale)); font-weight: 700; height: 100%; }
.search input::placeholder { color: var(--placeholder); font-weight: 600; }
.search input::-webkit-search-cancel-button { appearance: none; }
.search-icon { color: var(--placeholder); }
.search-icon .i { width: 16px; height: 16px; }
.side-actions { padding: 8px 14px 16px; }
.side-label { padding: 12px 20px 6px; font-size: calc(11px * var(--fs-scale)); text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); font-weight: 800; }
.side-list { list-style: none; margin: 0; padding: 4px 14px 10px; overflow-y: auto; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.side-list li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: calc(14px * var(--r-scale)); cursor: pointer; transition: background var(--t-fast); animation: slide-in-left var(--t-base) var(--ease-out); }
.participants { padding-inline: 8px; }
#roster { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
#roster .side-list { flex: none; overflow: visible; }
#participants-me { padding-bottom: 0; }
#side-room-count { text-align: center; }
.participants .avatar.has-life { cursor: pointer; }
.participants li { position: relative; flex-shrink: 0; } 
.rc-table .rc-stuck .i { width: 14px; height: 14px; vertical-align: -3px; margin-right: 4px; }
.participants [data-ui="row-button"] { position: absolute; right: 6px; opacity: 0; }
.participants [data-ui="row-button"][data-act="panel"] { top: 4px; }
.participants [data-ui="row-button"][data-act="last-reply"] { top: 32px; }
.participants .p-actions { position: absolute; top: 60px; right: 6px; }
.participants .p-actions [data-ui="row-button"] { position: static; }
.participants li:hover [data-ui="row-button"], .participants li.selected [data-ui="row-button"] { opacity: 1; }
.participants li.offline { min-height: 90px; align-items: flex-start; padding-top: 12px; }
.participants li.offline .p-body { padding-right: 24px; }
.shell.side-collapsed .participants [data-ui="row-button"][data-act="panel"] { right: auto; left: 0; }
.shell.side-collapsed .participants [data-ui="row-button"][data-act="last-reply"] { top: 4px; right: 0; }
.shell.side-collapsed .participants li.offline { min-height: 0; align-items: center; padding-top: 8px; }
.participants .life-q { position: absolute; top: -5px; right: -5px; width: 15px; height: 15px; border-radius: calc(50% * var(--r-scale)); background: var(--tile-badge-bg); color: var(--muted); font-size: 10px; font-weight: 800; display: grid; place-items: center; box-shadow: var(--shadow-tile); }
.participants .avatar { isolation: isolate; }
.participants li:hover .avatar .glyph { transform: scale(1.12) rotate(-4deg); }
.participants li:active .avatar .glyph { transform: scale(0.92); transition-duration: var(--t-fast); }
@media (prefers-reduced-motion: reduce) { .participants .avatar .glyph { transition: none; transform: none; } }
.participants .avatar .life { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); pointer-events: none; overflow: visible; z-index: 1; }
.life path { fill: none; stroke-width: 3; }
.life .life-track { stroke: var(--softer); }
.life-unknown .life-track { stroke: var(--softer); stroke-width: 2; stroke-dasharray: 1 4; stroke-linecap: round; }
.life .life-arc { stroke-linecap: round; transition: stroke-dasharray var(--t-base) var(--ease-out), stroke var(--t-fast); }
.life-ok .life-arc, .life-fresh .life-arc { stroke: var(--st-ready-dot); }
.life-warm .life-arc { stroke: var(--st-thinking-dot); }
.life-hot .life-arc { stroke: var(--st-error-dot); }
@keyframes life-breathe { 50% { stroke-opacity: 0.3; } }
.participants .avatar.life-attn .life-track { stroke: var(--attention); animation: life-breathe 1.2s ease-in-out infinite; }
.lp-event { display: flex; align-items: center; gap: 6px; font-size: calc(12px * var(--fs-scale)); font-weight: 700; color: var(--muted); }
.lp-event.fresh { color: var(--attention-ink); }
.lp-event .i { width: 14px; height: 14px; flex: none; }
.life-pop { position: fixed; z-index: 60; display: flex; gap: 6px; align-items: flex-start; width: calc(330px * var(--fs-scale)); max-width: calc(94 * var(--layout-vw)); padding: 12px 8px 12px 14px; background: var(--pop-bg); border-radius: calc(6px * var(--r-scale)) calc(18px * var(--r-scale)) calc(18px * var(--r-scale)) calc(18px * var(--r-scale)); box-shadow: var(--shadow-pop); font-size: calc(13px * var(--fs-scale)); animation: bubble-in var(--t-base) var(--ease-out); }
.life-pop::before { content: ""; position: absolute; left: -6px; top: 18px; width: 12px; height: 12px; background: var(--pop-bg); border-radius: 0 0 0 calc(3px * var(--r-scale)); transform: rotate(45deg); }
.life-pop .lp-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.life-pop .lp-side { flex: none; display: flex; flex-direction: column; gap: 2px; }
.life-pop [data-ui="icon-button"] { width: 26px; height: 26px; }
.lp-head { display: flex; align-items: center; gap: 10px; }
.lp-head b { font-size: calc(14px * var(--fs-scale)); }
.lp-sub { color: var(--muted); font-size: calc(12px * var(--fs-scale)); font-weight: 600; margin-top: 2px; }
.lp-sub b { color: var(--ink); }
.life-bar { height: 6px; border-radius: calc(3px * var(--r-scale)); background: var(--softer); overflow: hidden; }
.life-bar i { display: block; height: 100%; border-radius: calc(3px * var(--r-scale)); transition: width var(--t-base) var(--ease-out); }
.life-bar.life-ok i, .life-bar.life-fresh i { background: var(--st-ready-dot); }
.life-bar.life-warm i { background: var(--st-thinking-dot); }
.life-bar.life-hot i { background: var(--st-error-dot); }
.life-bar.life-unknown { background: repeating-linear-gradient(90deg, var(--softer) 0 4px, transparent 4px 7px); }
.lp-kv { font-size: calc(12.5px * var(--fs-scale)); grid-template-columns: max-content minmax(0, 1fr); }
.lp-kv .i { width: 12px; height: 12px; vertical-align: -2px; }
.lp-kv .link-btn { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--primary); cursor: pointer; }
.lp-kv .link-btn:disabled { color: var(--muted); cursor: default; }
.lp-kv .taking { color: var(--primary); font-weight: 700; }
.lp-kv .taking i { display: inline-block; width: 4px; height: 4px; margin-left: 3px; border-radius: calc(50% * var(--r-scale)); background: var(--primary); opacity: 0.25; animation: think 1.4s ease-in-out infinite; }
.lp-kv .taking i:nth-child(2) { animation-delay: 0.2s; }
.lp-kv .taking i:nth-child(3) { animation-delay: 0.4s; }
.slow-scroll { max-height: 260px; overflow: auto; margin-bottom: 8px; }
.slow-table { width: 100%; border-collapse: collapse; font-size: calc(12px * var(--fs-scale)); table-layout: fixed; }
.slow-table td { padding: 2px 8px 2px 0; vertical-align: top; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slow-table td:first-child { width: 7em; }
.slow-table td.ms { width: 5em; text-align: right; }
.slow-table td:last-child { width: 40%; }
.lp-editor { display: flex; flex-direction: column; gap: 6px; }
.lp-editor textarea { width: 100%; box-sizing: border-box; font: 600 calc(12px * var(--fs-scale))/1.45 var(--font); }
.lp-notes { margin: 0; padding: 8px 10px; background: var(--soft); border-radius: calc(10px * var(--r-scale)); font: 600 calc(12px * var(--fs-scale))/1.45 var(--font); white-space: pre-wrap; max-height: 140px; overflow: auto; color: var(--ink-2); }
.lp-respawn { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.lp-with { display: inline-flex; align-items: center; gap: 6px; font-size: calc(12.5px * var(--fs-scale)); font-weight: 600; color: var(--muted); }
.lp-with input { width: 58px; padding: 4px 6px; margin: 0; }
.side-list li:hover { background: var(--soft); }
:is(.side-list li, .done-note, .tl-row, .tpl-item, .cast-card, .room-card) :is(.avatar .glyph, [data-ui="room-mark"]) { transition: transform var(--t-base) var(--ease-pop); }
:is(.side-list li, .done-note, .tl-row, .tpl-item, .cast-card, .room-card):hover :is(.avatar .glyph, [data-ui="room-mark"]) { transform: scale(1.12) rotate(-4deg); }
.side-list li.selected { background: var(--lav); }
.side-list .p-body { flex: 1; min-width: 0; }
.side-list .p-name { font-weight: 800; display: flex; align-items: center; gap: 6px; font-size: calc(14px * var(--fs-scale)); min-width: 0; }
.side-list .p-name > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-list .p-sub { color: var(--muted); font-size: calc(12px * var(--fs-scale)); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.side-list .p-warn { color: var(--rose-ink); font-size: calc(11px * var(--fs-scale)); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-list .p-warn.muted-start { color: var(--warm-ink); }
.side-list .p-trouble { display: grid; gap: 3px; margin-top: 4px; padding: 6px 8px; border-radius: var(--r-sm); background: var(--warm); color: var(--warm-ink); font-size: calc(11px * var(--fs-scale)); font-weight: 600; line-height: 1.4; white-space: normal; min-width: 0; overflow-wrap: anywhere; }
.side-list .p-trouble b { font-weight: 800; }
.side-list .p-trouble .fix, .trouble .fix { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.side-list .p-fix { margin-top: 5px; display: flex; justify-content: flex-end; } 
.details-inner .pp-login { margin: 0 4px 12px; text-align: center; }
.details-inner .pp-login .row-btns { justify-content: center; }
.details-inner .pp-login .hint { margin: 6px 0 0; }
.side-list .p-actions { display: flex; gap: 4px; align-items: center; }
.side-list .p-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: calc(11px * var(--fs-scale)); font-weight: 700; color: var(--faint); flex: none; }
.side-list li.me { background: transparent; }
.side-list li.me.selected { background: var(--lav); }
.side-list .p-preview { color: var(--muted); font-size: calc(12px * var(--fs-scale)); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.side-foot { padding: 8px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.side-foot [data-ui="button"] .i { width: 16px; height: 16px; }
.side-foot [data-ui="button"].wake { height: 42px; background: var(--lav); color: var(--primary); }
.side-foot [data-ui="button"].hush { height: 38px; background: transparent; color: var(--muted); font-weight: 700; }
.side-foot [data-ui="button"].hush:hover:not(:disabled) { background: var(--soft); color: var(--primary); }
.side-foot [data-ui="button"].hush.busy { background: var(--lav); color: var(--primary); }
.side-foot [data-ui="button"].hush.busy .hush-face { animation: pulse 0.9s ease-in-out infinite; }
.side-foot [data-ui="button"].hush.on { background: var(--warm); color: var(--warm-ink); cursor: default; }
.side-foot [data-ui="button"].hush.on:hover { background: var(--warm); color: var(--warm-ink); }
.focused-pill { color: var(--primary); font-weight: 800; }
.shell.view-settings { grid-template-columns: var(--rail-w) minmax(0, 1fr) auto; grid-template-areas: "rail main details"; }
.shell.view-settings.rail-open { grid-template-columns: var(--rail-w-open) minmax(0, 1fr) auto; }
.shell.view-settings .side { display: none; }
.shell.side-collapsed.view-room { grid-template-columns: var(--rail-w) 72px minmax(0, 1fr) auto; }
.shell.side-collapsed.view-room.rail-open { grid-template-columns: var(--rail-w-open) 72px minmax(0, 1fr) auto; }
.shell.side-collapsed .side-room .side-room-title, .shell.side-collapsed .side-room #back-to-rooms, .shell.side-collapsed .side-room #room-settings-btn, .shell.side-collapsed .side-label, .shell.side-collapsed .participants .p-body, .shell.side-collapsed .participants .p-actions, .shell.side-collapsed .side-room .label { display: none; }
.shell.side-collapsed .side-head.room { display: flex; justify-content: center; padding: 12px 6px 4px; }
.shell.side-collapsed .side-actions { padding: 4px 0 6px; display: flex; justify-content: center; }
.shell.side-collapsed .side-room [data-ui="button"] { padding: 0; width: 44px; height: 44px; margin: 0 auto; justify-content: center; gap: 0; }
.shell.side-collapsed .participants { padding: 4px 8px; }
.shell.side-collapsed .participants li { justify-content: center; padding: 6px 0; gap: 0; }
.shell.side-collapsed .side-foot { padding: 8px 8px 12px; align-items: center; }
.main { grid-area: main; background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--edge); display: flex; flex-direction: column; min-height: 0; min-width: 0; position: relative; overflow: hidden; }
.main-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 22px; min-height: 64px; }
.main-head h1 { font-size: calc(18px * var(--fs-scale)); letter-spacing: -0.01em; }
.rooms-view, .chat, .page { display: flex; flex-direction: column; min-height: 0; flex: 1; animation: fade-in var(--t-base) var(--ease-out); }
.rooms-grid { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 22px 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); grid-auto-rows: minmax(150px, auto); gap: 12px; align-content: start; }
.room-card { display: flex; flex-direction: column; gap: 8px; animation: pop var(--t-slow) var(--ease-out); }
.room-card .rc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.room-card .rc-head .rc-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.room-card h3 { font-size: calc(16px * var(--fs-scale)); overflow-wrap: anywhere; }
.room-card .rc-topic { color: var(--muted); font-size: calc(12.5px * var(--fs-scale)); font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.room-card .rc-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: calc(11px * var(--fs-scale)); font-weight: 700; color: var(--faint); }
.room-card.current { box-shadow: 0 0 0 2px var(--primary); }
.room-card .rc-dir { font-family: var(--mono); font-size: calc(10.5px * var(--fs-scale)); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 22px 28px; animation: fade-in var(--t-base) var(--ease-out); }
.home-inner { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 26px; }
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr); gap: 24px; align-items: center; padding: 34px 36px; border-radius: calc(24px * var(--r-scale)); color: var(--hero-ink); background: var(--hero-bg); box-shadow: var(--hero-shadow); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: calc(50% * var(--r-scale)); background: var(--hero-blob-a); pointer-events: none; }
.hero::before { width: 320px; height: 320px; right: -80px; top: -140px; }
.hero::after { width: 220px; height: 220px; left: 40%; bottom: -150px; background: var(--hero-blob-b); }
.hero-text { position: relative; z-index: 1; min-width: 0; }
.hero-eyebrow { font-size: calc(11px * var(--fs-scale)); font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.8; margin-bottom: 10px; }
.hero h1 { font-size: calc(32px * var(--fs-scale)); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 12px; }
.hero p { font-size: calc(15px * var(--fs-scale)); font-weight: 600; line-height: 1.55; opacity: 0.92; margin: 0 0 20px; max-width: 520px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-cta { background: var(--hero-cta-bg); color: var(--primary); box-shadow: var(--hero-cta-shadow); }
.hero-cta:hover:not(:disabled) { background: var(--hero-cta-bg); color: var(--primary); transform: translateY(-1px); }
.hero-ghost { height: 46px; padding: 0 18px; border-radius: calc(14px * var(--r-scale)); background: var(--hero-ghost-bg); color: var(--hero-ink); }
.hero-ghost:hover:not(:disabled) { background: var(--hero-ghost-hover-bg); color: var(--hero-ink); }
.hero-art { position: relative; z-index: 1; min-height: 190px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.ha-bubble { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: calc(18px * var(--r-scale)); font-size: calc(13px * var(--fs-scale)); font-weight: 700; width: fit-content; max-width: 100%; box-shadow: var(--hero-bubble-shadow); animation: pop var(--t-slow) var(--ease-out) both; }
.ha-face { width: 30px; height: 30px; border-radius: calc(10px * var(--r-scale)); display: grid; place-content: center; font-size: 17px; background: var(--hero-face-bg); flex: none; }
.ha-a { background: var(--hero-bubble-1-bg); color: var(--ink); align-self: flex-end; border-bottom-right-radius: calc(6px * var(--r-scale)); }
.ha-b { background: var(--hero-bubble-2-bg); color: var(--hero-bubble-2-ink); border-bottom-left-radius: calc(6px * var(--r-scale)); animation-delay: 0.12s; }
.ha-c { background: var(--hero-bubble-3-bg); color: var(--hero-bubble-3-ink); align-self: flex-end; border-bottom-right-radius: calc(6px * var(--r-scale)); animation-delay: 0.24s; }
.ha-spark { position: absolute; right: 6px; top: -6px; color: var(--hero-spark); font-size: calc(26px * var(--fs-scale)); animation: pulse 2s ease-in-out infinite; }
.home-section { display: flex; flex-direction: column; gap: 12px; }
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.home-head h2 { font-size: calc(19px * var(--fs-scale)); letter-spacing: -0.01em; }
.home-head .linklike { display: inline-flex; align-items: center; gap: 4px; }
.home-head .linklike .i { width: 14px; height: 14px; }
.home-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.home-room { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; border-radius: calc(16px * var(--r-scale)); background: var(--soft); text-align: left; min-width: 0; box-shadow: var(--edge); transition: transform var(--t-fast) var(--ease-out), background var(--t-fast); }
.home-room:not(.empty-room):hover { background: var(--lav); transform: translateY(-1px); }
.home-room .hr-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.home-room .hr-name { font-weight: 800; font-size: calc(14px * var(--fs-scale)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-room .hr-sub { color: var(--muted); font-size: calc(12px * var(--fs-scale)); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-room .hr-time { color: var(--faint); font-size: calc(11px * var(--fs-scale)); font-weight: 700; flex: none; }
.home-room.empty-room { cursor: default; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.feature { border-radius: calc(18px * var(--r-scale)); padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--feature-shadow); background-image: var(--bevel); transition: transform var(--t-fast) var(--ease-out); }
.feature:hover { transform: translateY(-2px); }
.feature .f-emoji { width: 46px; height: 46px; border-radius: calc(14px * var(--r-scale)); background: var(--feature-emoji-bg); display: grid; place-content: center; font-size: 24px; box-shadow: var(--shadow-tile); }
.feature h3 { font-size: calc(15px * var(--fs-scale)); margin-top: 4px; }
.feature p { margin: 0; font-size: calc(13px * var(--fs-scale)); font-weight: 600; line-height: 1.5; color: var(--ink-2); }
.feature.lav { background-color: var(--lav); }
.feature.mint { background-color: var(--mint); }
.feature.warm { background-color: var(--warm); }
.feature.peach { background-color: var(--feature-peach-bg); }
.feature.rose { background-color: var(--rose); }
.feature.sky { background-color: var(--sky); }
.feature.orchid { background-color: var(--orchid); }
.home-vendors { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.step { display: flex; gap: 14px; align-items: flex-start; background: var(--step-bg); border-radius: calc(18px * var(--r-scale)); padding: 16px 18px; box-shadow: var(--edge); }
.step-n { width: 40px; height: 40px; border-radius: calc(13px * var(--r-scale)); background: var(--grad-primary); color: var(--step-num-ink); font-weight: 800; font-size: 17px; display: grid; place-content: center; flex: none; box-shadow: var(--shadow-primary); }
.step h3 { font-size: calc(15px * var(--fs-scale)); margin-bottom: 4px; }
.step p { margin: 0; font-size: calc(13px * var(--fs-scale)); font-weight: 600; line-height: 1.5; color: var(--ink-2); }
.tips { display: flex; flex-wrap: wrap; gap: 8px; }
.tip { background: var(--soft); border-radius: var(--r-pill); padding: 7px 14px; font-size: calc(12.5px * var(--fs-scale)); font-weight: 600; color: var(--ink-2); box-shadow: var(--edge); }
.tip b { color: var(--primary); font-weight: 800; }
@media (max-width: 880px) { .hero { grid-template-columns: 1fr; } .hero-art { min-height: 0; } }
.chat { container: room-chat / inline-size; }
.chat-toolbar { --toolbar-ink: var(--muted); --focus-ring: var(--muted); display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 3px; overflow-x: auto; scrollbar-width: thin; }
.chat-sub { flex: 1 1 auto; min-width: min-content; color: var(--muted); font-size: calc(12px * var(--fs-scale)); font-weight: 600; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.chat-sub .dir-chip { min-width: 32px; max-width: 130px; padding-inline: 8px; height: 32px; gap: 7px; color: var(--toolbar-ink); font-size: var(--fs-sm); }
.chat-sub .dir-chip.open-link { text-decoration: none; }
.chat-sub .dir-chip:hover { background-color: var(--softer); color: var(--toolbar-ink); }
.chat-sub .dir-chip .i { width: 18px; height: 18px; flex: none; }
.dir-label { overflow: hidden; text-overflow: ellipsis; }
.chat-actions { display: flex; flex: none; align-items: center; gap: 12px; margin-inline-start: auto; }
.chat-actions :is([data-ui="icon-button"], #pins-btn) { position: relative; isolation: isolate; background: none; box-shadow: none; }
.chat-actions :is([data-ui="icon-button"], #pins-btn)::before { content: ""; position: absolute; inset: 3px; z-index: -1; pointer-events: none; border-radius: var(--toolbar-pad-radius, max(calc(9px * var(--r-scale)), var(--r-ctl-min))); background: var(--softer); box-shadow: 0 1px 1px color-mix(in srgb, var(--ink) 8%, transparent); transition: background var(--t-fast), box-shadow var(--t-fast); }
.chat-actions [data-ui="icon-button"] { width: 38px; height: 38px; color: var(--toolbar-ink); border-radius: max(calc(9px * var(--r-scale)), var(--r-ctl-min)); }
.chat-actions [data-ui="icon-button"] .i { width: 22px; height: 22px; }
.chat-toolbar :is([data-ui="icon-button"], #pins-btn, .search-icon, .dir-chip) .i { transition: transform var(--t-base) var(--ease-pop); }
.chat-actions .search:is(:hover, :focus-within) .search-icon .i { transform: rotate(-14deg) scale(1.12); }
.chat-actions #pins-btn:hover .i { transform: rotate(-20deg) translateY(-1px) scale(1.1); }
.chat-actions #automations-btn:hover .i { animation: tb-tick 520ms var(--ease-pop); }
.chat-actions #carry-btn:hover .i { animation: tb-swap 520ms var(--ease-pop); }
.chat-actions #chat-info-btn:hover .i { transform: rotate(60deg); }
.chat-sub .dir-chip:hover .i { transform: translateY(-1px) rotate(-6deg) scale(1.08); }
.chat-toolbar :is([data-ui="icon-button"], #pins-btn, .dir-chip):active .i { transform: scale(0.88); animation: none; transition-duration: var(--t-fast); }
@keyframes tb-tick { 30% { transform: rotate(-12deg) scale(1.1); } 65% { transform: rotate(14deg) scale(1.1); } 100% { transform: none; } }
@keyframes tb-swap { 35% { transform: translateY(-2.5px) scale(1.08); } 70% { transform: translateY(2px) scale(1.08); } 100% { transform: none; } }
.chat-actions #automations-btn .i { width: 24px; height: 24px; }
.chat-actions :is([data-ui="icon-button"], #pins-btn):hover { color: var(--toolbar-ink); background: none; box-shadow: none; }
.chat-actions :is([data-ui="icon-button"], #pins-btn):hover::before { background: color-mix(in srgb, var(--softer) 92%, var(--muted)); }
.chat-actions [data-ui="icon-button"]:hover { transform: translateY(-1px); }
.chat-actions :is([data-ui="icon-button"], #pins-btn):active { transform: translateY(1px); background: none; box-shadow: none; }
.chat-actions :is([data-ui="icon-button"], #pins-btn):active::before { box-shadow: inset 0 1px 2px color-mix(in srgb, var(--ink) 12%, transparent); }
.chat-actions #pins-btn { --toolbar-pad-radius: var(--r-pill); height: 36px; gap: 8px; padding: 0 12px; font-size: var(--fs-sm); color: var(--toolbar-ink); }
.chat-actions #pins-btn .i { width: 20px; height: 20px; }
.chat-actions .search { margin: 0; width: clamp(90px, 16cqi, 140px); height: 36px; padding-inline: 12px; }
.chat-actions .search:hover, .chat-actions .search:focus-within { background: color-mix(in srgb, var(--softer) 92%, var(--muted)); }
.chat-actions .search:focus-within { box-shadow: 0 0 0 2px var(--toolbar-ink); }
.chat-actions .search:focus-within, .chat-actions .search:has(input:not(:placeholder-shown)) { width: clamp(140px, 30cqi, 260px); }
.chat-actions .search input { font-size: calc(12.5px * var(--fs-scale)); }
.chat-actions .search-icon { display: flex; flex: none; color: var(--toolbar-ink); }
.chat-actions .search-icon .i { width: 18px; height: 18px; }
#automations-btn { position: relative; }
.automation-count { position: absolute; top: -2px; right: -3px; min-width: 14px; padding: 0 3px; border-radius: var(--r-pill); background: var(--toolbar-ink); color: var(--panel); font-size: 10px; font-weight: 800; line-height: 16px; }
@container room-chat (max-width: 520px) {
  .chat-toolbar, .chat-sub { gap: 6px; }
  .chat-sub .dir-label { display: none; }
  .chat-actions { gap: 8px; }
  .chat-actions .search { width: 36px; padding-inline: 9px; gap: 0; }
  .chat-actions .search:focus-within, .chat-actions .search:has(input:not(:placeholder-shown)) { width: clamp(100px, 30cqi, 160px); gap: 6px; }
  .chat-actions .search input { width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-actions [data-ui="icon-button"], .chat-toolbar :is([data-ui="icon-button"], #pins-btn, .search-icon, .dir-chip) .i { transition: none; animation: none; transform: none; }
  .chat-actions :is([data-ui="icon-button"], #pins-btn)::before { transition: none; }
  .chat-actions [data-ui="icon-button"]:hover { transform: none; }
}
.messages, .composer { --fs-scale: var(--chat-fs, 1); }
.messages { position: relative; flex: 1; overflow-y: auto; scrollbar-gutter: stable; padding: 12px 22px; display: flex; flex-direction: column; gap: 14px; background: var(--canvas-pattern) content-box, var(--grad-canvas); background-size: var(--canvas-pattern-size), auto; }
.messages .history-placeholder { box-sizing: border-box; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: var(--muted); padding: 8px; }
.conversation-selection { padding: 8px 22px; display: flex; align-items: center; gap: 12px; font-size: 13px; }
.conversation-selection[hidden] { display: none; }
.day { align-self: center; color: var(--faint); font-size: calc(11px * var(--fs-scale)); font-weight: 800; padding: 3px 12px; margin: 2px 0; }
.msg { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; max-width: 100%; }
.msg.landing { animation: bubble-in var(--t-base) var(--ease-out); }
.messages .msg { content-visibility: auto; contain-intrinsic-size: auto 120px; flex-shrink: 0; padding: 0 var(--shadow-room) var(--shadow-room); margin: 0 calc(-1 * var(--shadow-room)) calc(-1 * var(--shadow-room)); max-width: calc(100% + 2 * var(--shadow-room)); }
.messages .msgs-page { display: flex; flex-direction: column; gap: 14px; flex-shrink: 0; content-visibility: auto; contain-intrinsic-size: auto 6000px; padding: 0 var(--shadow-room) var(--shadow-room); margin: 0 calc(-1 * var(--shadow-room)) calc(-1 * var(--shadow-room)); }
.messages.windowed .msgs-page, .messages.windowed .msg { content-visibility: visible; contain-intrinsic-size: none; }
.msg.agent { padding-right: calc(40px + var(--shadow-room)); }
.msg.mine { align-items: flex-end; padding-left: calc(40px + var(--shadow-room)); }
.head-av { display: inline-flex; width: 32px; height: 32px; padding: 4px; box-sizing: content-box; flex: none; }
.msg.agent .bubble, .msg.agent .shots { margin-left: 16px; }
.msg.agent .meta { margin-left: 16px; padding-left: 0; }
.msg.agent .meta .stats { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; max-width: 0; opacity: 0; overflow: hidden; margin-right: -4px; transition: max-width var(--t-base) var(--ease-out), margin var(--t-base) var(--ease-out), opacity var(--t-fast); }
.msg.agent:hover .meta .stats { max-width: 600px; opacity: 1; margin-right: 0; }
.msg.agent .meta .seen-by { margin-left: 0; }
.msg.mine .bubble, .msg.mine .shots { margin-right: 16px; }
.bubble { position: relative; }
.msg.mine .head { flex-direction: row-reverse; }
.msg.system { justify-content: center; }
.msg.hidden-by-search { display: none; }
.messages.searching .msgs-page { content-visibility: visible; }
.msg.system, .msg.hidden { padding-left: calc(4px + var(--shadow-room)); }
.bubble-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; width: 100%; max-width: min(1400px, 100%); }
.msg.mine .bubble-col { align-items: flex-end; }
.timeline { --tl-pin: 10.5px; --tl-pin-many: 11.6px; --tl-pin-out: calc(var(--tl-pin) * -0.8536); --tl-pin-many-out: calc(var(--tl-pin-many) * -0.8536); position: absolute; right: 6px; top: 14px; bottom: 14px; width: 18px; z-index: 4; }
.tl-ticks { position: absolute; inset: 0; }
.tl-view { position: absolute; left: 1px; right: 1px; z-index: 1; border-radius: calc(6px * var(--r-scale)); background: var(--timeline-view-bg); box-shadow: inset 0 0 0 1px var(--timeline-view-edge); pointer-events: none; transition: top 80ms linear, height 80ms linear; }
.tl-tick { position: absolute; left: 3px; width: 12px; height: 5px; border-radius: calc(3px * var(--r-scale)); background: var(--tick-mine); cursor: pointer; transition: background var(--t-fast), transform var(--t-fast); }
.tl-tick:hover, .tl-tick.active { background: var(--primary); transform: scaleX(1.25); }
.tl-tick.in-view { background: var(--tick-mine-view); }
.tl-row.current.pinned { background: var(--lav-2); }
.tl-row.pinned { opacity: 1; color: var(--ink); }
.tl-row .tl-pin { flex: none; margin-left: auto; align-self: center; color: var(--primary); }
.tl-row .tl-pin .i { width: 14px; height: 14px; }
.timeline.left { left: 6px; right: auto; }
.timeline.left .tl-tick { background: color-mix(in srgb, var(--tick, var(--tick-fallback)) 25%, var(--timeline-tick-blend)); }
.tl-at { position: absolute; left: 1px; right: 1px; height: 2px; border-radius: 1px; background: var(--at, var(--primary)); box-shadow: 0 0 0 1px var(--timeline-pin-halo); pointer-events: none; z-index: 2; }
.tl-slot { position: absolute; left: 3px; width: 12px; cursor: pointer; background: var(--tick-mine); transition: background var(--t-fast); }
.tl-slot.in-view { background: var(--tick-mine-view); }
.tl-slot:hover, .tl-slot.active { background: var(--primary); }
.timeline.left .tl-slot { position: absolute; left: 3px; width: 12px; cursor: pointer; background: color-mix(in srgb, var(--tick, var(--tick-fallback)) var(--mix, 25%), var(--timeline-tick-blend)); transition: background var(--t-fast); }
.timeline.left .tl-slot.in-view { background: color-mix(in srgb, var(--tick, var(--tick-fallback)) calc(var(--mix, 25%) * 1.7), var(--timeline-tick-blend)); }
.timeline.left .tl-slot:hover, .timeline.left .tl-slot.active { background: var(--tick, var(--tick-fallback)); }
.timeline.left .tl-tick.in-view { background: color-mix(in srgb, var(--tick, var(--tick-fallback)) 42%, var(--timeline-tick-blend)); }
.timeline.left .tl-tick:hover, .timeline.left .tl-tick.active { background: var(--tick, var(--tick-fallback)); }
.timeline.left .tl-pop { left: 26px; right: auto; }
.tl-pop::before { content: ""; position: absolute; top: -6px; bottom: -6px; right: -6px; width: 6px; }
.timeline.left .tl-pop::before { right: auto; left: -6px; }
.tl-av { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.chat-head { position: relative; flex: none; min-height: var(--chat-head-h); padding: 3px 12px; }
.chat-conversation { position: relative; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.working-now { position: absolute; left: 18px; bottom: -13px; display: flex; align-items: flex-end; gap: 6px; margin: 0; z-index: 6; }
.wn-av { --wn-face: 22px; border: 0; padding: 2px; background: var(--face-card-bg); border-radius: calc(var(--wn-face) * var(--face-corner) * var(--r-scale) + 2px); box-shadow: var(--face-card-shadow); cursor: pointer; line-height: 0; animation: wn-bob 1.6s ease-in-out infinite; }
.wn-av[hidden] { display: none; }
@keyframes wn-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.wn-av > * { display: block; }
.wn-av.joining > * { animation: wn-join 260ms var(--ease-out) both; }
.wn-av.leaving { pointer-events: none; animation: wn-bob 1.6s ease-in-out infinite, wn-leave 220ms var(--ease-out) forwards; }
@keyframes wn-join { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
@keyframes wn-leave { to { opacity: 0; width: 0; padding: 0; margin-left: -6px; } }
.timeline :is(.tl-tick, .tl-slot).pinned.i { -webkit-mask: none; mask: none; overflow: visible; }
.timeline .tl-tick.pinned.i { width: 12px; height: 5px; left: 3px; border-radius: calc(3px * var(--r-scale)); }
.timeline :is(.tl-tick, .tl-slot).pinned > .tl-pin-glyph { position: absolute; width: var(--tl-pin); height: var(--tl-pin); top: var(--tl-pin-out); background: var(--tick, var(--primary)); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; filter: drop-shadow(0 0 1px var(--timeline-pin-halo)) drop-shadow(0 0 1px var(--timeline-pin-halo)); cursor: pointer; }
.timeline.left :is(.tl-tick, .tl-slot).pinned > .tl-pin-glyph { left: var(--tl-pin-out); transform: rotate(-45deg); }
.timeline:not(.left) :is(.tl-tick, .tl-slot).pinned > .tl-pin-glyph { right: var(--tl-pin-out); transform: rotate(45deg); }
.timeline :is(.tl-tick, .tl-slot).pinned > .tl-pin-glyph[data-many] { width: var(--tl-pin-many); height: var(--tl-pin-many); top: var(--tl-pin-many-out); }
.timeline.left :is(.tl-tick, .tl-slot).pinned > .tl-pin-glyph[data-many] { left: var(--tl-pin-many-out); }
.timeline:not(.left) :is(.tl-tick, .tl-slot).pinned > .tl-pin-glyph[data-many] { right: var(--tl-pin-many-out); }
.timeline .tl-tick.pinned:hover, .timeline .tl-tick.pinned.active { transform: none; filter: brightness(0.85); }
.pins-panel { position: absolute; right: 18px; top: 0; width: 380px; max-height: 60%; overflow: auto; background: var(--card); border-radius: calc(14px * var(--r-scale)); box-shadow: var(--shadow-pop); padding: 6px; z-index: 30; animation: rise var(--t-base) var(--ease-out); }
.pin-row { align-items: center; }
.pin-row .tl-text { flex: 1; order: 1; }
.pin-row .pin-time { order: 2; }
.pin-row .pin-x { order: 4; }
.pin-row.mine .tl-av { order: 3; }
.pin-time { color: var(--faint); font-size: calc(11px * var(--fs-scale)); font-weight: 600; white-space: nowrap; }
.pin-x { border: 0; background: transparent; color: var(--muted); font-size: calc(16px * var(--fs-scale)); line-height: 1; padding: 0 4px; cursor: pointer; border-radius: calc(6px * var(--r-scale)); }
.pin-x:hover { color: var(--danger); background: var(--soft); }
.search-panel { position: absolute; right: 18px; top: 0; width: 480px; max-width: calc(100% - 44px); max-height: 65%; overflow: auto; background: var(--card); border-radius: calc(14px * var(--r-scale)); box-shadow: var(--shadow-pop); padding: 6px; z-index: 30; animation: rise var(--t-base) var(--ease-out); }
.search-head { display: flex; align-items: center; gap: 8px; padding: 4px 10px 8px; color: var(--muted); font-size: calc(12px * var(--fs-scale)); font-weight: 600; }
.search-head .spacer { flex: 1; }
.search-toggle { border: 0; background: var(--soft); color: var(--ink-2); border-radius: var(--r-pill); padding: 3px 10px; font: inherit; font-size: calc(11.5px * var(--fs-scale)); font-weight: 700; cursor: pointer; }
.search-toggle.on { background: var(--lav); color: var(--primary); }
.search-row { flex-wrap: wrap; row-gap: 2px; }
.search-row .search-meta { display: flex; gap: 8px; align-items: baseline; width: 100%; color: var(--muted); font-size: calc(11px * var(--fs-scale)); }
.search-row .search-room { color: var(--primary); }
.search-row .search-snippet { width: 100%; font-weight: 500; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.search-row mark { background: var(--timeline-flash); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-empty { padding: 10px 12px; color: var(--muted); font-size: calc(12.5px * var(--fs-scale)); }
.tl-pop { position: absolute; right: 26px; width: 340px; background: var(--card); border-radius: calc(14px * var(--r-scale)); box-shadow: var(--shadow-pop); padding: 6px; z-index: 30; animation: rise var(--t-base) var(--ease-out); }
.tl-row { padding: 6px 10px; border-radius: calc(9px * var(--r-scale)); font-size: calc(12.5px * var(--fs-scale)); font-weight: 600; line-height: 1.4; color: var(--ink-2); display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.tl-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-width: 0; }
.tl-row.faded { color: var(--muted); opacity: 0.8; }
.tl-row.far { opacity: 0.5; }
.tl-row.current { background: var(--lav); color: var(--primary); font-weight: 800; }
.tl-row:hover { background: var(--lav-2); }
.msg.flash :is(.bubble, [data-ui="hub-row"], .hidden-turn) { animation: tl-flash 1.4s var(--ease-out); }
.msg.flash > :is([data-ui="hub-row"], .hidden-turn) { border-radius: var(--r-sm); }
.msg.aimed .bubble { box-shadow: inset 0 0 0 1px var(--bubble-border), 0 0 0 2px var(--timeline-flash), var(--bubble-shadow); }
.msg.mine.aimed .bubble { box-shadow: inset 0 0 0 1px var(--bubble-border), 0 0 0 2px var(--timeline-flash), var(--bubble-mine-shadow); }
@keyframes tl-flash { 0% { box-shadow: 0 0 0 0 var(--timeline-flash); } 100% { box-shadow: 0 0 0 14px var(--timeline-flash-out); } }
.jump-latest { position: absolute; right: 33px; bottom: 4px; z-index: 5; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 26px; padding: 0; border: 0; border-radius: var(--r-pill); background: var(--card); color: var(--primary); box-shadow: var(--shadow-pop); cursor: pointer; animation: fade-in var(--t-base) var(--ease-out); }
.scroll-hint { position: absolute; left: 50%; transform: translateX(-50%); z-index: 6; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 24px; padding: 0; border: 0; border-radius: var(--r-pill); background: var(--card); color: var(--primary); box-shadow: var(--shadow-pop); cursor: pointer; opacity: 0.94; }
.scroll-hint:hover { background: var(--soft); opacity: 1; }
.scroll-hint[hidden] { display: none; }
.scroll-hint.up { top: 12px; }
.scroll-hint.down { bottom: 12px; }
.scroll-hint, .jump-latest { animation: fade-in var(--t-base) var(--ease-out); }
.scroll-hint .i, .jump-latest .i { width: 18px; height: 18px; animation: sign-bob 1.15s cubic-bezier(0.37, 0, 0.63, 1) infinite; }
.scroll-hint.up .i { animation-name: sign-bob-up; }
@keyframes sign-bob { 0%, 100% { transform: translateY(-1.5px); } 50% { transform: translateY(2.5px); } }
@keyframes sign-bob-up { 0%, 100% { transform: translateY(1.5px); } 50% { transform: translateY(-2.5px); } }
.jump-latest:hover { background: var(--soft); }
.done-notes { position: absolute; left: 30px; bottom: 16px; z-index: 5; display: flex; flex-direction: column-reverse; gap: 6px; }
.done-note { display: inline-flex; align-items: center; gap: 8px; max-width: 230px; padding: 6px 12px 6px 8px; border: 0; border-radius: calc(14px * var(--r-scale)); background: var(--done); color: var(--done-ink); font: inherit; text-align: left; cursor: pointer; box-shadow: var(--shadow-pop); animation: rise var(--t-base) var(--ease-out); overflow: hidden; }
.done-note:hover { background: var(--done-hover); }
.done-note .avatar { flex: none; }
.done-go { display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 4px 6px 8px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.done-go:hover { background: var(--done-hover); }
.done-go .avatar { flex: none; }
.done-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.done-text b { font-size: calc(12px * var(--fs-scale)); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.done-text small { font-size: calc(11px * var(--fs-scale)); font-weight: 600; opacity: 0.8; white-space: nowrap; }
.done-x { border: 0; background: transparent; color: inherit; opacity: 0.6; font-size: calc(15px * var(--fs-scale)); line-height: 1; padding: 0 9px; cursor: pointer; }
.done-x:hover { opacity: 1; background: var(--done-hover); }
.look-preview { display: flex; flex-direction: column; gap: 10px; margin: 0 0 14px; padding: 14px; background: var(--grad-canvas); border: 2px solid var(--lav-2); border-radius: var(--r-md); }
.look-preview .msg { animation: none; }
.look-preview .sample-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.look-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.look-cards [data-ui="look-card"] { width: auto; }
#look-dialog .look-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 6px 0 14px; }
.look-own { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 8px 0 2px; }
.look-own .own-only { display: inline-flex; gap: 6px; }
.prop-window { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; font-size: calc(12px * var(--fs-scale)); font-weight: 600; }
.prop-window .note { display: flex; align-items: center; gap: 6px; }
.prop-window .note > .i { width: 14px; height: 14px; flex: none; }
.prop-look { display: flex; align-items: center; gap: 10px; }
.prop-look [data-ui="look-card"] { width: 150px; cursor: default; }
.look-adjust { margin-top: 4px; }
.look-adjust .adjust-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.look-adjust .adjust-head .label { font-size: calc(12px * var(--fs-scale)); font-weight: 800; color: var(--ink-3); }
.look-adjust > .hint { margin: 2px 0 6px; }
.adjust-group { padding: 2px 0; }
.adjust-group h5 { margin: 10px 0 2px; font-size: calc(10.5px * var(--fs-scale)); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.adjust-group.text .field.row { margin-bottom: 8px; }
.adjust-group.text .field.row .label .hint { display: block; margin: 2px 0 0; font-weight: 600; }
.adjust-group.text .field.row [data-ui="number-field"] { width: 104px; flex: none; }
.adjust-group.text .field.row select { flex: 0 1 58%; }
.adjust-group.text #sp-chat-sample { margin-top: 4px; }
.bubble { max-width: 100%; background-color: var(--bubble-bg); background-image: var(--bevel); border-radius: calc(6px * var(--r-scale)) calc(18px * var(--r-scale)) calc(18px * var(--r-scale)) calc(18px * var(--r-scale)); padding: 12px 16px; min-width: 0; font-size: calc(14.5px * var(--fs-scale)); font-weight: 600; line-height: 1.55; color: var(--bubble-ink); box-shadow: inset 0 0 0 1px var(--bubble-border), var(--bubble-shadow); }
.msg.mine .bubble { background-color: transparent; background-image: var(--bevel), var(--bubble-mine-bg); color: var(--bubble-mine-ink); border-radius: calc(18px * var(--r-scale)) calc(6px * var(--r-scale)) calc(18px * var(--r-scale)) calc(18px * var(--r-scale)); box-shadow: inset 0 0 0 1px var(--bubble-border), var(--bubble-mine-shadow); padding: 11px 16px; }
.msg.mine .bubble .text { color: var(--bubble-mine-ink); }
.msg.mine.waiting .bubble { background: var(--attention-grad); box-shadow: var(--attention-shadow); }
.bubble .waiting { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--bubble-mine-rule); font-size: calc(13px * var(--fs-scale)); font-weight: 600; color: var(--bubble-mine-waiting-ink); }
.bubble .waiting .i { width: 14px; height: 14px; vertical-align: -2px; }
.bubble .waiting-text { flex: 1; min-width: 160px; }
.msg.mine .mention { background: var(--bubble-mine-chip-bg); color: var(--bubble-mine-ink) !important; padding: 1px 7px; border-radius: calc(6px * var(--r-scale)); font-weight: 800; }
.msg.mine .bubble code { background: var(--bubble-mine-code-bg); color: var(--bubble-mine-ink); }
.msg.mine .open-link { color: var(--bubble-mine-ink); text-decoration-color: var(--bubble-mine-link-underline); }
.bubble .head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 2px; }
.head { display: flex; gap: 8px; align-items: center; padding: 0 4px; }
.head .name { font-weight: 800; font-size: calc(14px * var(--fs-scale)); }
.head .time { color: var(--faint); font-size: calc(11px * var(--fs-scale)); font-weight: 600; cursor: default; white-space: nowrap; }
.msg.mine .head { justify-content: flex-end; }
.msg.mine .head .name { display: none; }
.bubble .text { word-break: break-word; line-height: 1.55; }
.text > .words > :first-child, .file-view > :first-child { margin-top: 0; }
.text > .words > :last-child, .file-view > :last-child { margin-bottom: 0; }
.text p, .file-view p { margin: 0 0 8px; }
.text ul, .text ol, .file-view ul, .file-view ol { margin: 4px 0 8px; padding-left: 22px; }
.text li, .file-view li { margin: 2px 0; }
.text h1, .text h2, .text h3, .text h4, .file-view h1, .file-view h2, .file-view h3, .file-view h4 { margin: 10px 0 6px; line-height: 1.3; font-weight: 800; }
.text h1, .file-view h1 { font-size: 1.25em; }
.text h2, .file-view h2 { font-size: 1.15em; }
.text h3, .text h4, .file-view h3, .file-view h4 { font-size: 1.05em; }
.text blockquote, .file-view blockquote { margin: 6px 0 8px; padding: 2px 12px; border-left: 3px solid var(--lav); color: var(--muted); }
.text hr, .file-view hr { border: 0; border-top: 1px solid var(--border); margin: 10px 0; }
.text pre, .file-view pre { margin: 6px 0 8px; }
.text table, .file-view table { border-collapse: collapse; margin: 6px 0 8px; font-size: calc(13px * var(--fs-scale)); max-width: 100%; display: block; overflow-x: auto; }
.text th, .text td, .file-view th, .file-view td { border: 1px solid var(--border); padding: 4px 10px; text-align: left; vertical-align: top; }
.text th, .file-view th { background: var(--lav); font-weight: 800; }
.msg.mine .bubble .text th { background: var(--bubble-mine-th-bg); }
.msg.mine .bubble .text th, .msg.mine .bubble .text td { border-color: var(--bubble-mine-border); }
.msg.mine .bubble .text blockquote { border-color: var(--bubble-mine-quote-border); color: var(--bubble-mine-soft-ink); }
.dir-row { display: flex; gap: 8px; align-items: stretch; }
.dir-row input, .dir-row textarea { flex: 1; min-width: 0; }
.roots-list { display: flex; flex-direction: column; gap: 6px; }
.roots-row { display: flex; gap: 8px; align-items: center; }
.roots-row .roots-path, .roots-row #sp-tg-roots-new { flex: 1; min-width: 0; }
.roots-row .check-row { display: flex; align-items: center; gap: 4px; white-space: nowrap; font-size: var(--fs-xs); }
.ch-card { background: var(--soft); border-radius: var(--r-lg); padding: 14px 16px; }
.ch-head { display: flex; align-items: center; gap: 10px; }
.ch-head .ch-mark { width: 22px; height: 22px; color: var(--primary); }
.ch-title { flex: 1; min-width: 0; font-weight: 800; font-size: var(--fs-lg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-title small { display: block; font-weight: 700; color: var(--muted); font-size: var(--fs-xs); }
.ch-line { margin: 8px 0 0; font-size: var(--fs-sm); color: var(--ink-2); }
.ch-intro { margin: 0 0 10px; font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.5; }
.ch-intro [data-ui="button"] { vertical-align: baseline; }
.ch-group { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--lav-2); }
.ch-group-title { font-size: var(--fs-xs); font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 6px; }
.ch-row { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--ink-2); }
.ch-row .grow { flex: 1; min-width: 0; }
.ch-row .i { color: var(--muted); flex: none; }
.ch-group .ch-acts { margin-top: 8px; }
.ch-facts { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ch-facts li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--ink-2); }
.ch-facts li .i { color: var(--muted); flex: none; }
.ch-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.ch-rename { margin-top: 12px; }
.ch-geek { margin-top: 8px; }
.ch-more { margin-top: 12px; }
.ch-more > summary { cursor: pointer; font-weight: 800; font-size: var(--fs-sm); color: var(--ink-3); list-style: none; }
.ch-more > summary::-webkit-details-marker { display: none; }
.ch-more > summary::before { content: "▸ "; color: var(--muted); }
.ch-more[open] > summary::before { content: "▾ "; }
.ch-more > summary { transition: color var(--t-fast), transform var(--t-base) var(--ease-pop); }
.ch-more > summary:hover { color: var(--primary); transform: translateX(2px); }
.ch-more .field { margin-top: 12px; }
.roots-depth { justify-content: flex-start; gap: 12px; }
.roots-depth .hint { flex: 1; min-width: 0; }
.guide-view { position: fixed; inset: var(--gap); z-index: 40; display: flex; flex-direction: column; background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--shadow-dialog); overflow: hidden; }
.guide-view .gv-bar { display: flex; justify-content: flex-end; padding: 8px 10px; flex: none; }
.guide-view .gv-frame { flex: 1; width: 100%; border: 0; min-height: 0; }
.su-steps { list-style: none; margin: 0 0 14px; padding: 0; display: flex; align-items: center; gap: 4px; }
.su-steps li { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 800; color: var(--muted); }
.su-steps li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--lav-2); box-sizing: border-box; }
.su-steps li.on { color: var(--primary); }
.su-steps li.on::before { border-color: var(--primary); background: var(--primary); animation: su-ring 1.8s ease-out infinite; }
.su-steps li.done { color: var(--ink-3); }
.su-steps li.done::before { border-color: var(--green); background: var(--green); }
.su-steps li:not(:last-child)::after { content: ""; width: 22px; height: 2px; background: var(--lav-2); margin: 0 4px; }
.su-steps li.done:not(:last-child)::after { background: var(--green); }
@keyframes su-ring { 0% { box-shadow: 0 0 0 0 var(--primary-ghost); } 100% { box-shadow: 0 0 0 8px transparent; } }
.su-stage { display: grid; place-items: center; padding: 14px 24px; border-radius: calc(16px * var(--r-scale)); background: var(--login-dialog-scene-bg); color: var(--login-dialog-scene-ink); margin: 0 0 14px; }
.su-stage svg { width: 240px; height: 160px; }
.su-stage.wide { grid-template-columns: 1fr auto 1fr auto 1fr; gap: 6px; padding: 10px 18px; }
.su-stage.wide svg { width: 120px; height: 80px; }
.su-stage.wide .su-arrow { color: var(--login-dialog-scene-muted); font-size: 26px; font-weight: 800; }
.su-stage .su-cap { font-size: var(--fs-xs); font-weight: 800; color: var(--ink-3); text-align: center; margin-top: -6px; }
.su-stage .paper { fill: var(--login-dialog-scene-paper); stroke: var(--login-dialog-scene-ink); }
.su-stage .paper-fill { fill: var(--login-dialog-scene-paper); stroke: none; }
.su-stage .outline { fill: none; stroke: var(--login-dialog-scene-ink); }
.su-stage .chrome { stroke: var(--login-dialog-scene-muted); fill: var(--login-dialog-scene-muted); }
.su-stage .paper-line { stroke: var(--login-dialog-scene-paper); }
.su-stage .stroke { stroke: var(--login-dialog-scene-ink); fill: none; }
.su-stage .accent { stroke: var(--login-dialog-scene-accent); fill: none; }
.su-stage .accent-fill { fill: var(--login-dialog-scene-accent); stroke: none; }
.su-stage .accent-soft { fill: var(--login-dialog-scene-accent); stroke: none; opacity: 0.13; }
.su-stage .dark { fill: var(--login-dialog-scene-dark); stroke: none; }
.su-stage .ok-fill { fill: var(--login-dialog-ok-ink); stroke: none; }
.su-stage .on-ok { stroke: var(--login-dialog-scene-paper); }
.su-stage text { font-family: var(--mono); font-weight: 700; stroke: none; }
.su-stage .txt { fill: var(--login-dialog-scene-ink); }
.su-stage .txt-on-accent { fill: var(--login-dialog-scene-paper); }
.su-stage .scan { stroke-dasharray: 3 3; animation: su-scan 1.2s linear infinite; }
@keyframes su-scan { to { stroke-dashoffset: -12; } }
.su-stage .key-row { animation: su-glow 2.4s ease-in-out infinite; }
@keyframes su-glow { 50% { opacity: 0.28; } }
.su-paths { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 12px; }
.su-path { border-radius: var(--r-md); background: var(--soft); padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.su-path b { font-size: var(--fs-xs); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em; }
.su-qr { width: 120px; height: 120px; border-radius: 8px; overflow: hidden; } 
.su-qr svg { display: block; width: 100%; height: 100%; }
.su-qr.big { width: 184px; height: 184px; flex: none; }
.su-pair { display: flex; gap: 16px; align-items: center; margin: 4px 0 10px; }
.su-pair .su-words { min-width: 0; font-size: var(--fs-sm); color: var(--ink-2); overflow-wrap: anywhere; }
.su-pair .su-words p { margin: 0 0 6px; }
.su-field { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.su-field input { flex: 1; min-width: 0; }
.su-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.su-sign { display: flex; align-items: center; gap: 8px; font-weight: 800; margin: 10px 0 0; color: var(--ink-2); }
.su-sign .su-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); animation: su-pulse 1.1s ease-in-out infinite; flex: none; }
@keyframes su-pulse { 50% { opacity: 0.25; transform: scale(0.8); } }
.su-sign.ok { color: var(--ink); }
.su-sign.ok .su-check { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: var(--panel); animation: su-pop 0.35s var(--ease-pop); flex: none; }
.su-sign.ok .su-check .i { width: 14px; height: 14px; }
.su-sign.bad { color: var(--rose-ink); }
@keyframes su-pop { from { transform: scale(0.4); opacity: 0; } }
.su-note { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-xs); color: var(--ink-3); margin: 6px 0 0; }
.su-note .i { flex: none; margin-top: 2px; color: var(--muted); }
.su-geek { margin-top: 8px; }
.su-sign + .field-note, .su-note + .field-note { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .su-steps li.on::before, .su-stage .scan, .su-stage .key-row, .su-sign .su-dot, .su-sign.ok .su-check { animation: none; } }
.dir-row .browse-btn { flex: 0 0 auto; white-space: nowrap; }
.folder-dialog { width: 760px; height: min(calc(80 * var(--layout-vh)), 720px); flex-direction: column; }
.folder-dialog[open] { display: flex; }
.folder-dialog .file-head { flex: 0 0 auto; }
.fp-bar { display: flex; gap: 8px; align-items: stretch; margin: 6px 0 8px; }
.fp-bar input { flex: 1; min-width: 0; font-family: var(--mono); font-size: calc(12.5px * var(--fs-scale)); }
.fp-bar [data-ui="button"] { white-space: nowrap; }
.fp-recent { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; margin-bottom: 8px; }
.fp-recent:empty { display: none; }
.fp-recent [data-ui="choice"] { max-width: 260px; }
.fp-body { flex: 1; min-height: 0; overflow: auto; border: 2px solid var(--lav); border-radius: var(--r-sm); background: var(--soft); padding: 6px 4px; }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { padding-left: 18px; }
.tree li { margin: 0; }
.tn { display: flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px 0 2px; border-radius: calc(8px * var(--r-scale)); cursor: pointer; font-size: calc(13.5px * var(--fs-scale)); font-weight: 700; color: var(--ink-2); white-space: nowrap; user-select: none; }
.tn:hover { background: var(--lav); }
.tn.selected { background: var(--lav-2); color: var(--primary); }
.tn.hidden-dir { color: var(--muted); font-weight: 600; }
.tn-tw { flex: 0 0 18px; width: 18px; height: 18px; border: 0; background: transparent; color: var(--muted); padding: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: calc(5px * var(--r-scale)); transition: transform var(--t-fast); }
.tn-tw .i { width: 14px; height: 14px; }
.tn-tw:hover { background: var(--card); color: var(--primary); }
.tn.open .tn-tw { transform: rotate(90deg); }
.tn.leaf .tn-tw { visibility: hidden; }
.tn-tw { transition: transform var(--t-base) var(--ease-pop), background var(--t-fast), color var(--t-fast); }
.tn:not(.open):hover .tn-tw { transform: rotate(30deg); }
.tn.open:hover .tn-tw { transform: rotate(70deg); }
.tn-ico { transition: transform var(--t-base) var(--ease-pop); }
.tn:hover .tn-ico { transform: translateY(-1px) scale(1.15) rotate(-6deg); }
.tn-ico { flex: 0 0 auto; font-size: calc(15px * var(--fs-scale)); line-height: 1; }
.tn-name { overflow: hidden; text-overflow: ellipsis; }
.tn-more { color: var(--faint); font-size: calc(12px * var(--fs-scale)); font-weight: 700; padding: 4px 26px; }
.tn-new { display: flex; gap: 6px; align-items: center; padding: 2px 0 4px 26px; }
.tn-new input { height: 28px; font-size: calc(13px * var(--fs-scale)); padding: 0 10px; }
.fp-selected { flex: 1; min-width: 0; font-family: var(--mono); font-size: calc(12px * var(--fs-scale)); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; align-self: center; }
.file-dialog { width: 900px; flex-direction: column; padding: 14px 14px 12px; }
.file-dialog .file-head h3 { margin-bottom: 2px; }
.file-dialog .actions { margin-top: 10px; }
.file-dialog[open] { display: flex; }
.file-dialog .file-head { flex: 0 0 auto; }
.file-dialog .file-head .lead { margin-bottom: 10px; overflow-wrap: anywhere; font-family: var(--mono); font-size: calc(12px * var(--fs-scale)); }
.file-dialog .actions { flex: 0 0 auto; margin-top: 14px; }
.file-view { flex: 1 1 auto; min-height: 120px; max-height: calc(62 * var(--layout-vh)); overflow: auto; padding: 14px 16px; border-radius: calc(14px * var(--r-scale)); background: var(--bg); font-size: calc(14px * var(--fs-scale)); font-weight: 600; line-height: 1.55; color: var(--ink-2); }
.file-view.csv { padding: 0; background: transparent; }
.csv-wrap { overflow: auto; max-height: calc(58 * var(--layout-vh)); border-radius: calc(14px * var(--r-scale)); box-shadow: var(--edge); background: var(--card); }
table.csv { border-collapse: separate; border-spacing: 0; font-size: calc(13px * var(--fs-scale)); min-width: 100%; }
table.csv th, table.csv td { padding: 6px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; max-width: 420px; overflow: hidden; text-overflow: ellipsis; }
table.csv th { position: sticky; top: 0; background: var(--lav); font-weight: 800; z-index: 1; }
table.csv tbody tr:nth-child(even) td { background: var(--table-stripe); }
.csv-count { margin: 8px 2px 0; font-size: calc(12px * var(--fs-scale)); color: var(--muted); font-weight: 700; }
.bubble .text.clamped { max-height: 9.2em; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.bubble [data-act="more"] { font-size: calc(13px * var(--fs-scale)); }
.msg.mine .bubble [data-act="more"] { color: var(--bubble-mine-ink); }
.bubble .pending { display: inline-flex; align-items: center; gap: 4px; height: 1.55em; vertical-align: text-bottom; }
.bubble .pending i { width: 5px; height: 5px; border-radius: calc(50% * var(--r-scale)); background: var(--muted); opacity: 0.25; animation: think 1.4s ease-in-out infinite; }
.bubble .pending i:nth-child(2) { animation-delay: 0.2s; }
.bubble .pending i:nth-child(3) { animation-delay: 0.4s; }
@keyframes think { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
.mention { font-weight: 800; }
.mention { border-radius: 3px; transition: color var(--t-fast), box-shadow var(--t-fast); }
.mention:hover { color: var(--primary); box-shadow: inset 0 -1.5px 0 currentColor; }
.working-box { position: relative; display: inline-block; width: 19px; height: 15px; margin-left: 5px; vertical-align: -3px; color: var(--faint); contain: layout size; }
.working { position: absolute; inset: 0; width: 19px; height: 15px; overflow: visible; }
.working.arm.near { animation: type 0.14s ease-in-out infinite alternate; transform-origin: 9.93px 11.57px; will-change: transform; }
.working.arm.far { animation: type-far 0.14s ease-in-out infinite alternate-reverse; transform-origin: 9.5px 10.97px; will-change: transform; }
.working.body { animation: bob 0.28s ease-in-out infinite alternate; will-change: transform; }
@keyframes type { from { transform: rotate(-16deg); } to { transform: rotate(4deg); } }
@keyframes type-far { from { transform: rotate(-45deg); } to { transform: rotate(18deg); } }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-0.34px); } }
.thought { margin: 2px 0 6px; font-size: calc(12px * var(--fs-scale)); font-weight: 600; color: var(--muted); }
.thought summary { cursor: pointer; }
.thought-text { white-space: pre-wrap; padding: 4px 0 0 8px; border-left: 2px solid var(--lav-2); margin-top: 4px; }
.agent-notices:empty, .tools:empty, .meta:empty, .perms:empty, .stop-note:empty, .bubble .text:empty { display: none; }
.agent-notices > [data-ui="reply-note"] { margin: 2px 0 8px; }
.bubble > .stop-note { margin: 8px 0 2px; }
.tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.plan { margin: 4px 0 8px; font-size: calc(12px * var(--fs-scale)); font-weight: 600; background: var(--bubble-inset-bg); border-radius: calc(10px * var(--r-scale)); padding: 8px 10px; }
.plan-entry.completed { text-decoration: line-through; color: var(--muted); }
.plan-entry.in_progress { font-weight: 800; }
.meta { color: var(--faint); font-size: calc(11px * var(--fs-scale)); font-weight: 700; padding: 0 4px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.live-tail { display: inline-flex; align-items: center; gap: 8px; margin-left: 5px; vertical-align: -3px; white-space: nowrap; }
.live-tail .working-box { margin-left: 0; vertical-align: 0; }
.live-tail.no-figure .working-box { display: none; }
.live-tail .pending { width: 19px; height: 15px; justify-content: center; gap: 3px; vertical-align: 0; }
.live-tail:not(.no-figure) .pending { display: none; }
html[data-calm] .bubble .live-tail { position: absolute; right: 12px; bottom: 8px; margin: 0; }
html[data-calm] .bubble .text.streamed { padding-bottom: 30px; }
.meta .i { width: 12px; height: 12px; }
.meta .stats > span { display: inline-flex; align-items: center; gap: 4px; }
.msg.mine .meta { justify-content: flex-end; }
.head .edited { font-size: calc(10.5px * var(--fs-scale)); color: var(--faint); font-style: italic; margin-left: 6px; cursor: help; }
.head [data-ui="icon-button"] { opacity: 0; width: 0; height: auto; padding: 0; margin-left: -8px; overflow: hidden; line-height: 0; transition: width var(--t-base) var(--ease-out), padding var(--t-base) var(--ease-out), margin var(--t-base) var(--ease-out), opacity var(--t-fast); }
.head [data-ui="icon-button"] .i { width: 18px; height: 18px; flex: none; }
.head [data-ui="icon-button"][hidden] { display: none; }
.msg:hover .head [data-ui="icon-button"], .head [data-ui="icon-button"]:focus-visible, .msg.pinned .head [data-act="pin"] { opacity: 1; width: 28px; padding: 0 5px; margin-left: 0; }
.head [data-act="pin"]:hover { color: var(--attention); background: none; }
.msg.pinned .head [data-act="pin"] { color: var(--attention); }
.head [data-act="pin"] .i { transition: transform var(--t-base) var(--ease-out); }
.msg.pinned .head [data-act="pin"] .i { transform: rotate(-40deg); }
.msg.mine.pinned .head [data-act="pin"] .i { transform: rotate(40deg); }
.msg:not(.pinned) .head [data-act="pin"]:hover .i { transform: rotate(-20deg) scale(1.15); }
.msg.pinned .head [data-act="pin"]:hover .i { transform: rotate(-40deg) scale(1.15); }
.msg.mine.pinned .head [data-act="pin"]:hover .i { transform: rotate(40deg) scale(1.15); }
.edit-box { margin: 4px 0 6px; }
.msg .bubble-col:has(> .bubble > .edit-box:not([hidden])) { width: 100%; }
.msg .bubble:has(> .edit-box:not([hidden])) { width: min(760px, 100%); }
.msg.mine .edit-box [data-ui="button"][data-kind="ghost"] { color: var(--bubble-mine-soft-ink); }
.msg.mine .edit-box [data-ui="button"][data-kind="ghost"]:hover:not(:disabled) { background: var(--bubble-mine-ghost-hover-bg); color: var(--bubble-mine-ink); }
.msg.mine .edit-box [data-ui="button"][data-kind="primary"] { background: var(--bubble-mine-cta-bg); color: var(--bubble-mine-cta-ink); box-shadow: none; }
.msg.mine .edit-box [data-ui="button"][data-kind="primary"]:hover:not(:disabled) { background: var(--bubble-mine-cta-bg); color: var(--bubble-mine-cta-ink); }
.edit-area { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 2px solid var(--input-focus-border); border-radius: calc(12px * var(--r-scale)); background: var(--input-bg); color: var(--ink); font: inherit; font-weight: 600; resize: vertical; }
.edit-box .row-btns { margin-top: 6px; }
.skill-invoke { font-size: calc(11px * var(--fs-scale)); font-weight: 800; color: var(--primary); background: var(--lav); border-radius: var(--r-pill); padding: 2px 10px; display: inline-block; margin-bottom: 6px; }
.msg.mine .skill-invoke { background: var(--bubble-mine-chip-bg); color: var(--bubble-mine-ink); }
.messages [data-ui="ask-card"] { margin: 6px 0; max-width: 720px; animation: pop var(--t-base) var(--ease-out); }
.messages [data-ui="ask-card"][data-kind="proposal"] { max-width: 760px; }
.prop-why { font-weight: 500; margin: 4px 0 6px; }
.prop-diff { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; font-size: calc(12px * var(--fs-scale)); font-weight: 500; }
.prop-row { background: var(--bubble-prop-row-bg); border-radius: calc(8px * var(--r-scale)); padding: 6px 8px; }
.prop-row > b { font-weight: 800; margin-right: 6px; }
.prop-line { margin-top: 2px; white-space: pre-wrap; }
.prop-line.add { color: var(--mint-ink); }
.prop-line.del { color: var(--rose-ink); text-decoration: line-through; opacity: 0.8; }
.prop-from { color: var(--muted); }
.prop-to { font-weight: 800; }
.prop-warn { margin: 6px 0 0 16px; padding: 0; font-size: calc(12px * var(--fs-scale)); font-weight: 500; color: var(--warm-ink, inherit); }
.prop-own { display: flex; gap: 6px; align-items: center; font-size: calc(12px * var(--fs-scale)); font-weight: 600; margin-top: 6px; }
.msg.hidden { justify-content: center; }
.hidden-turn { max-width: 720px; width: 100%; background: var(--soft); border-radius: calc(12px * var(--r-scale)); padding: 6px 12px; font-size: calc(12px * var(--fs-scale)); font-weight: 600; color: var(--muted); }
.hidden-turn summary { cursor: pointer; list-style: none; }
.hidden-turn summary::-webkit-details-marker { display: none; }
.hidden-turn[open] summary { color: var(--ink); }
.hidden-body { padding: 6px 0 4px; }
.hidden-label { text-transform: uppercase; letter-spacing: 0.08em; font-size: calc(10px * var(--fs-scale)); font-weight: 800; color: var(--faint); margin: 6px 0 2px; }
.hidden-text { white-space: pre-wrap; background: var(--bubble-inset-bg); border-radius: calc(10px * var(--r-scale)); padding: 8px 10px; color: var(--ink-2); }
.hidden-body ul { margin: 2px 0 0; padding-left: 18px; }
.side-foot [data-ui="button"].hush .hush-face { font-size: 22px; line-height: 1; }
.meta .sep { color: var(--faint); margin: 0 4px; }
.meta.seen { color: var(--primary); font-weight: 800; }
.meta .ticks { letter-spacing: -0.15em; margin-right: 4px; }
.side-list li.offline .p-name, .side-list li.offline .p-sub { color: var(--muted); }
.composer { position: relative; display: flex; gap: 10px; padding: 6px 8px 6px 18px; margin: var(--composer-gap) 16px; background: var(--softer); border-radius: calc(20px * var(--r-scale)); align-items: center; min-height: var(--composer-min-h); transition: box-shadow var(--t-fast); }
.composer-grip { position: absolute; left: 24px; right: 24px; top: -6px; height: 12px; cursor: ns-resize; z-index: 3; touch-action: none; }
.composer-grip::after { content: ""; position: absolute; left: 50%; top: 4px; width: 44px; height: 4px; margin-left: -22px; border-radius: calc(2px * var(--r-scale)); background: var(--lav-2); opacity: 0; transition: opacity var(--t-fast), background var(--t-fast); }
.composer-grip:hover::after, .composer.resizing .composer-grip::after { opacity: 1; background: var(--primary); }
.composer.resizing { user-select: none; }
.composer:focus-within { box-shadow: 0 0 0 2px var(--primary); }
.composer .smile-btn { border: 0; background: transparent; color: var(--placeholder); padding: 0; display: grid; place-content: center; width: 28px; height: 28px; border-radius: calc(8px * var(--r-scale)); flex: none; }
.composer .smile-btn .i { width: 20px; height: 20px; }
.composer .smile-btn:hover { color: var(--primary); }
.composer.uploading .attach-btn { pointer-events: none; }
.composer.uploading .attach-btn .i { animation: pulse 900ms var(--ease-out) infinite; }
.composer-box { flex: 1; min-width: 0; display: flex; align-items: center; box-shadow: var(--composer-shadow); background: var(--composer-bg); border-radius: var(--composer-radius); padding: 0 var(--composer-pad-x); }
.composer-box:has(.shots-tray:not([hidden])) { flex-direction: column; align-items: stretch; }
.composer-box:has(.shots-tray:not([hidden])) textarea { flex: none; }
.composer.drop-target { box-shadow: 0 0 0 2px var(--primary); }
.shots-tray { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0 2px; }
.shot-chip { position: relative; display: block; width: 56px; height: 56px; border-radius: calc(10px * var(--r-scale)); overflow: hidden; background: var(--attach-thumb-bg); box-shadow: var(--attach-thumb-shadow); }
.shot-chip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-drop { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border: 0; border-radius: calc(50% * var(--r-scale)); background: var(--attach-overlay-bg); color: var(--attach-overlay-ink); font-size: calc(13px * var(--fs-scale)); line-height: 1; padding: 0; cursor: pointer; }
.shot-drop:hover { background: var(--primary); }
.shot-n { position: absolute; top: 3px; left: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: calc(6px * var(--r-scale)); background: var(--attach-overlay-bg); color: var(--attach-overlay-ink); font-size: 11px; font-weight: 800; line-height: calc(18px * var(--fs-scale)); text-align: center; pointer-events: none; }
.bubble .shots { display: flex; flex-wrap: wrap; gap: 8px; }
.bubble .shots:not([hidden]) { margin-top: 8px; }
.bubble .shot { position: relative; display: block; width: 72px; height: 72px; padding: 0; border: 0; border-radius: calc(12px * var(--r-scale)); overflow: hidden; line-height: 0; background: var(--attach-thumb-bg); box-shadow: var(--attach-thumb-shadow); cursor: zoom-in; transition: transform var(--t-fast) var(--ease-out); }
.bubble .shot:hover { transform: translateY(-1px) scale(1.03); }
.bubble .shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-ref { display: inline-flex; align-items: center; gap: 3px; vertical-align: -3px; height: 20px; padding: 0 6px 0 4px; margin: 0 1px; border: 0; border-radius: calc(6px * var(--r-scale)); background: var(--attach-ref-bg); color: inherit; font: inherit; font-size: calc(11px * var(--fs-scale)); font-weight: 800; line-height: calc(20px * var(--fs-scale)); cursor: zoom-in; }
.msg.mine .img-ref { background: var(--attach-mine-ref-bg); }
.img-ref svg { width: 14px; height: 14px; }
.img-ref:hover { background: var(--primary); color: var(--btn-on-primary); }
.quote { display: block; margin: 8px 0; padding: 6px 10px; border-left: 3px solid var(--lav); border-radius: 0 calc(8px * var(--r-scale)) calc(8px * var(--r-scale)) 0; background: var(--soft); cursor: pointer; transition: background var(--t-fast), border-color var(--t-fast); }
.quote:hover { background: var(--lav); border-color: var(--primary); }
.quote .q-head { display: flex; align-items: center; gap: 4px; font-size: calc(11px * var(--fs-scale)); font-weight: 800; color: var(--muted); margin-bottom: 2px; }
.quote .q-head .i { width: 13px; height: 13px; }
.quote .q-when { font-weight: 700; color: var(--faint); }
.quote .q-text { display: block; white-space: pre-wrap; font-size: calc(13.5px * var(--fs-scale)); font-weight: 600; color: var(--ink-2); }
.msg.mine .bubble .quote { background: var(--quote-mine-bg); border-color: var(--quote-mine-border); }
.msg.mine .bubble .quote:hover { background: var(--quote-mine-hover-bg); border-color: var(--quote-mine-hover-border); }
.msg.mine .bubble .quote .q-head, .msg.mine .bubble .quote .q-when { color: var(--quote-mine-head-ink); }
.msg.mine .bubble .quote .q-text { color: var(--quote-mine-text-ink); }
.quotes-tray { display: flex; flex-direction: column; gap: 4px; padding: 6px 0 2px; }
.quote-chip { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: calc(10px * var(--r-scale)); background: var(--soft); font-size: calc(12px * var(--fs-scale)); font-weight: 700; color: var(--ink-2); }
.quote-chip .qc-n { min-width: 16px; height: 16px; border-radius: calc(5px * var(--r-scale)); background: var(--lav-2); color: var(--ink-2); font-size: 10px; line-height: calc(16px * var(--fs-scale)); text-align: center; flex: none; }
.quote-chip .qc-text { color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-chip .qc-drop { margin-left: auto; border: 0; background: none; color: var(--faint); font-size: calc(14px * var(--fs-scale)); line-height: 1; padding: 0 2px; cursor: pointer; flex: none; }
.pin-x, .done-x, .composer-clear, .quote-chip .qc-drop { display: inline-grid; place-items: center; transition: transform var(--t-base) var(--ease-pop), color var(--t-fast), background var(--t-fast), opacity var(--t-fast); }
:is(.pin-x, .done-x, .composer-clear, .quote-chip .qc-drop):hover { transform: rotate(90deg) scale(1.15); opacity: 1; color: var(--primary); }
.quote-chip .qc-drop:hover { color: var(--primary); }
.composer-box:has(.quotes-tray:not([hidden])) { flex-direction: column; align-items: stretch; }
.composer-box:has(.quotes-tray:not([hidden])) textarea { flex: none; }
.quote-pop { position: fixed; z-index: 150; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border: 0; border-radius: calc(8px * var(--r-scale)); background: var(--pop-dark-bg); color: var(--pop-dark-ink); font: 800 calc(12px * var(--fs-scale))/1 var(--font); cursor: pointer; box-shadow: var(--pop-dark-shadow); }
.quote-pop .i { width: 14px; height: 14px; }
.quote-pop:hover { background: var(--primary); }
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-content: center; padding: 24px; background: var(--scrim-bg); cursor: zoom-out; animation: fade-in var(--t-base) var(--ease-out); }
.lightbox img { max-width: calc(100 * var(--layout-vw) - 48px); max-height: calc(100 * var(--layout-vh) - 48px); border-radius: calc(12px * var(--r-scale)); box-shadow: var(--scrim-shadow); background: var(--scrim-image-bg); }
.dialog {
  resize: both;
  min-width: 320px;
  min-height: 220px;
  background-image: linear-gradient(135deg, transparent 42%, var(--faint) 42%, var(--faint) 55%, transparent 55%, transparent 68%, var(--faint) 68%, var(--faint) 81%, transparent 81%);
  background-repeat: no-repeat;
  background-position: right 7px bottom 7px;
  background-size: 11px 11px;
}
.dialog.closing { resize: none; }
.dialog::-webkit-resizer { display: none; }
.scroll-hint-slot { position: sticky; height: 0; overflow: visible; z-index: 6; pointer-events: none; }
.scroll-hint-slot.up { top: 0; }
.scroll-hint-slot.down { bottom: 0; }
.scroll-hint-slot .scroll-hint { pointer-events: auto; }
.scroll-hint-slot.up .scroll-hint { top: 0; }
.scroll-hint-slot.down .scroll-hint { bottom: 0; }
.token.comment, .token.prolog, .token.cdata { color: var(--syntax-comment); font-style: italic; }
.token.punctuation, .token.operator { color: var(--syntax-punctuation); }
.token.keyword, .token.rule, .token.important, .token.atrule { color: var(--syntax-keyword); font-weight: 700; }
.token.string, .token.char, .token.attr-value, .token.regex { color: var(--syntax-string); }
.token.number, .token.boolean, .token.constant, .token.symbol { color: var(--syntax-number); }
.token.function, .token.class-name, .token.title { color: var(--syntax-function); }
.token.tag, .token.selector, .token.deleted { color: var(--syntax-tag); }
.token.attr-name, .token.property, .token.variable, .token.parameter { color: var(--syntax-attr); }
.token.inserted { color: var(--syntax-string); }
.token.namespace { opacity: 0.75; }
.code-view { display: flex; align-items: flex-start; gap: 0; background: var(--code-bg); border-radius: var(--r-sm); overflow: auto; }
.code-view .gutter { position: sticky; left: 0; z-index: 1; flex: none; align-self: stretch; display: flex; flex-direction: column; padding: 10px 8px 10px 10px; background: var(--code-gutter-bg); color: var(--code-gutter-ink); font: 500 var(--fs-code, calc(12px * var(--fs-scale))) / 1.55 var(--mono); text-align: right; user-select: none; }
.code-view .gutter span { display: block; }
.code-view .gutter span.line-mark { color: var(--code-line-mark-ink); font-weight: 800; background: var(--code-line-mark-bg); border-radius: calc(4px * var(--r-scale)); }
.code-view .code-body { margin: 0; flex: 1 0 auto; min-width: 0; padding: 10px 12px; background: transparent; border-radius: 0; overflow: visible; white-space: pre; line-height: 1.55; }
.code-view::-webkit-scrollbar { width: 12px; height: 12px; }
.code-view::-webkit-scrollbar-track { background: var(--code-sb-track); margin: 0; }
.code-view::-webkit-scrollbar-thumb { background: var(--code-sb-thumb); border: 3px solid transparent; background-clip: padding-box; border-radius: calc(8px * var(--r-scale)); }
.code-view::-webkit-scrollbar-thumb:hover { background: var(--code-sb-thumb-hover); background-clip: padding-box; }
.code-view::-webkit-scrollbar-corner { background: var(--code-sb-track); }
@supports not selector(::-webkit-scrollbar) { .code-view { scrollbar-width: auto; scrollbar-color: var(--code-sb-firefox) var(--code-sb-track); } }
.code-view code, .msg.mine .bubble .code-view code, .file-view .code-view code { background: transparent; padding: 0; border-radius: 0; color: var(--code-ink); }
.file-view.text { padding: 0; overflow: hidden; }
.file-view.text .code-view { border-radius: calc(12px * var(--r-scale)); height: 100%; }
#file-dialog[open] { display: flex; flex-direction: column; }
#file-dialog .file-view { min-height: 0; }
.dialog.sized .file-view { max-height: none; }
.file-view.wrap .code-body { white-space: pre-wrap; word-break: break-word; }
.find-hit { background: var(--code-find-hit-bg); color: var(--code-find-hit-ink); border-radius: calc(3px * var(--r-scale)); padding: 0 1px; }
.fv-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.fv-tools .search { flex: 1 1 200px; min-width: 160px; margin: 0; height: 34px; }
#fv-tools label.search > input:not([type="checkbox"]) { flex: 1 1 auto; margin-top: 0; width: auto; height: 100%; padding: 0; border: 0; background: transparent; }
.fv-tools .fv-hits, .fv-tools .fv-count { color: var(--faint); font-size: var(--fs-xs); font-weight: 700; }
.fv-tools .fv-goto, .fv-tools .fv-wrap { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: var(--fs-xs); font-weight: 700; }
#fv-tools .fv-goto, #fv-tools .fv-wrap { margin: 0; }
#fv-tools .fv-goto > input[type="number"] { flex: 0 0 76px; margin-top: 0; width: 76px; height: 30px; padding: 0 8px; }
.fv-tools .fv-wrap input { accent-color: var(--primary); }
.history-load { display: flex; flex-direction: column; align-items: center; gap: 12px; flex: 0 1 auto; max-width: 76%; padding: 10px 0; }
.history-rule { display: block; flex: 1; min-width: 18px; border-top: 2px dotted var(--muted); opacity: 0.65; }
.conversation-start { display: flex; align-items: center; gap: 16px; color: var(--ink-3); padding: 16px 0; font-size: .85em; }
.conversation-start::before, .conversation-start::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.conversation-loading { text-align: center; color: var(--ink-3); padding: 16px; }
.history-pins > .history-rule { flex: none; align-self: stretch; margin: 10px 0; }
.history-next { display: inline-flex; align-items: center; justify-content: center; gap: 10px; color: var(--primary); color: color-mix(in srgb, var(--primary) 50%, var(--ink)); font: 800 var(--fs-sm) / 1.4 var(--font); text-align: center; }
.history-scroll-icon { display: inline-flex; flex-shrink: 0; animation: history-scroll 1.6s ease-in-out infinite; animation-play-state: paused; }
.history-scroll-icon .i { width: 22px; height: 22px; }
.history-load.in-view:not([aria-busy="true"]) .history-scroll-icon { animation-play-state: running; }
.history-load[aria-busy="true"] .fc-hint { opacity: 0.7; }
@keyframes history-scroll { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-3px); } }
.history-pins { display: flex; flex-direction: column; gap: 14px; flex-shrink: 0; padding: 0; }
.history-pins-rows { display: flex; flex-direction: column; gap: 14px; }
.history-pins-label { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--ink-2); font-size: var(--fs-xs); font-weight: 700; }
.history-pins-label .i { width: 14px; height: 14px; }
.history-pins .day { color: var(--ink-3); }
.fold-ceiling { display: flex; align-items: center; gap: 16px; margin: 8px 0 14px; width: 100%; }
.fold-ceiling .fc-label { display: flex; flex-direction: column; gap: 5px; text-align: center; color: var(--ink-2); font-size: var(--fs-xs); }
.fold-ceiling strong { font-size: var(--fs-sm); font-weight: 800; }
.fold-ceiling .fc-what { color: var(--ink-2); font-weight: 700; }
.fold-ceiling .fc-pins { color: var(--ink-3); font-weight: 600; }
.msg.history-arrived { animation: history-appear 240ms var(--ease-out); }
@keyframes history-appear { from { transform: translateY(10px) scale(0.985); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .history-scroll-icon, .msg.history-arrived { animation: none; }
  .msg.history-arriving { opacity: 1; }
}
@media (max-width: 520px) {
  .fold-ceiling { gap: 8px; }
}
.text [data-ui="file-card"] { margin: 8px 0 4px; }
.msg.mine [data-act="preview"] { background: var(--attach-mine-ref-bg); color: var(--bubble-mine-ink); }
.msg.mine [data-act="preview"][data-state="on"] { background: var(--attach-mine-chip-open-bg); color: var(--attach-mine-chip-open-ink); }
.diagram-view { position: fixed; inset: 0; z-index: 210; overflow: hidden; background: var(--scrim-bg); cursor: grab; animation: fade-in var(--t-base) var(--ease-out); touch-action: none; }
.diagram-view.dragging { cursor: grabbing; }
.dv-stage { position: absolute; top: 0; left: 0; transform-origin: 0 0; will-change: transform; }
.dv-stage svg { display: block; background: var(--card); border-radius: calc(14px * var(--r-scale)); box-shadow: var(--scrim-shadow); padding: 12px; box-sizing: content-box; }
.dv-bar { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: calc(14px * var(--r-scale)); background: var(--diagram-bar-bg); box-shadow: var(--diagram-bar-shadow); cursor: default; }
.dv-btn { width: 30px; height: 30px; border: 0; border-radius: calc(9px * var(--r-scale)); background: transparent; color: var(--ink-3); display: grid; place-content: center; cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.dv-btn .i { width: 17px; height: 17px; }
.dv-btn:hover { background: var(--soft); color: var(--primary); }
.dv-level { min-width: 58px; height: 30px; padding: 0 8px; border: 0; border-radius: calc(9px * var(--r-scale)); background: var(--soft); color: var(--ink-2); font: 800 var(--fs-xs) / 30px var(--font); cursor: pointer; }
.dv-level:hover { color: var(--primary); }
.dv-hint { margin: 0 4px 0 8px; color: var(--faint); font-size: var(--fs-xs); font-weight: 700; }
.mermaid-block .mm-expand { display: none; border: 0; background: transparent; color: var(--faint); padding: 2px 4px; border-radius: calc(8px * var(--r-scale)); cursor: pointer; line-height: 0; transition: background var(--t-fast), color var(--t-fast); }
.mermaid-block .mm-expand .i { width: 15px; height: 15px; transition: transform var(--t-fast) var(--ease-out); }
.mermaid-block.ok .mm-expand { display: inline-flex; }
.mermaid-block .mm-expand:hover { background: var(--soft); color: var(--primary); }
.mermaid-block .mm-expand:hover .i { transform: scale(1.12); }
.composer textarea { flex: 1; display: block; box-sizing: border-box; resize: none; padding: 8px 0; margin: 0; border: 0; border-radius: 0; background: transparent; height: 36px; min-height: 36px; line-height: calc(20px * var(--fs-scale)); font-size: calc(14px * var(--fs-scale)); font-weight: 600; outline: none; color: var(--ink); overflow-y: auto; }
.composer textarea::placeholder { color: var(--placeholder); font-weight: 600; }
@supports (field-sizing: content) { .composer textarea { field-sizing: content; height: auto; } }
.send-btn { width: 44px; height: 44px; border-radius: calc(14px * var(--r-scale)); border: 0; background: var(--grad-primary); color: var(--btn-on-primary); display: grid; place-content: center; box-shadow: var(--shadow-primary); flex: none; transition: transform var(--t-fast) var(--ease-out), filter var(--t-fast); }
.send-btn .i { width: 18px; height: 18px; display: block; }
.composer-clear { width: 28px; height: 28px; border-radius: calc(50% * var(--r-scale)); border: 0; background: transparent; color: var(--placeholder); font-size: 20px; line-height: 1; cursor: pointer; flex: none; margin-right: 2px; transition: background var(--t-fast), color var(--t-fast); }
.composer-clear:hover { background: var(--soft); color: var(--danger); }
.send-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.send-btn:active { transform: translateY(1px); }
.chat .mention-menu { left: 24px; bottom: calc(var(--composer-h, var(--composer-min-h)) + var(--composer-gap) + 8px); }
.chat .emoji-menu { left: 24px; bottom: calc(var(--composer-h, var(--composer-min-h)) + var(--composer-gap) + 8px); }
.page-inner { flex: 1; overflow-y: auto; padding: 8px 22px 22px; }
.page-inner > .page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; min-height: 48px; }
.page-inner h1 { font-size: calc(20px * var(--fs-scale)); letter-spacing: -0.01em; }
.page-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.app-settings-head { flex-wrap: wrap; }
.app-settings-title { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 240px; }
.app-settings-title > div { min-width: 0; }
.app-settings-title .hint { font-size: var(--fs-xs); overflow-wrap: anywhere; }
.app-settings-heading-icon { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: var(--r-sm); background: var(--softer); color: var(--muted); }
.app-settings-heading-icon .i { width: 25px; height: 25px; }
.app-settings-head .settings-fold-actions { margin: 0; }
#sp-form .page-cols { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 18px; }
#sp-form [data-ui="settings-group"] { margin-bottom: 16px; }
#sp-form [data-ui="settings-group"] > summary h4 { font-size: var(--fs-sm); text-transform: none; letter-spacing: 0; }
#sp-form [data-ui="settings-group"][data-tone="plain"] > summary { color: var(--ink-2); }
#sp-form [data-ui="settings-group"] > summary .chev { color: var(--muted); }
#sp-form [data-ui="settings-group"] > .group-body { padding-top: 4px; }
.details { grid-area: details; position: relative; width: min(var(--details-w), calc(100 * var(--layout-vw) - 2 * var(--gap))); min-width: 0; min-height: 0; background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--edge); animation: slide-in-right var(--t-slow) var(--ease-out); display: flex; flex-direction: column; overflow: hidden; }
.details.closing { animation: fade-out var(--t-base) var(--ease-out) forwards; }
.details-inner { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 20px; overflow-wrap: anywhere; }
.details-inner .field input, .details-inner .field select, .details-inner .field textarea, .details-inner .section input, .details-inner .section select, .details-inner .section textarea { max-width: 100%; }
.details-inner .section:not([data-ui="settings-group"]) { background: transparent; padding: 0; margin-bottom: 8px; }
.details-inner [data-ui="settings-group"] { margin-bottom: 14px; }
.settings-fold-actions { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; --focus-ring: var(--muted); }
.settings-fold-actions [data-ui="icon-button"] { width: 32px; height: 32px; background: var(--softer); color: var(--muted); box-shadow: none; }
.settings-fold-actions [data-ui="icon-button"]:hover { background: color-mix(in srgb, var(--softer) 92%, var(--muted)); color: var(--ink-2); box-shadow: none; }
.settings-fold-actions [data-ui="icon-button"] .i { width: 20px; height: 20px; }
.details-inner .section.danger { background: var(--rose); padding: 16px; }
.details-inner .geek-body > .section:not([data-ui="settings-group"]) { background: var(--soft); padding: 14px 16px 10px; margin-bottom: 10px; }
.trouble { display: grid; gap: 4px; background: var(--warm); color: var(--warm-ink); border-radius: var(--r-sm); padding: 10px 12px; margin: 0 4px 10px; font-size: var(--fs-sm); font-weight: 600; line-height: 1.45; min-width: 0; overflow-wrap: anywhere; }
.trouble b { font-weight: 800; }
.trouble code { font-family: var(--mono); font-size: var(--fs-xs); }
.resizer { position: absolute; left: -14px; top: 0; bottom: 0; width: 20px; cursor: col-resize; z-index: 3; }
.resizer::after { content: ""; position: absolute; left: 8.5px; top: 44%; height: 12%; width: 3px; border-radius: calc(3px * var(--r-scale)); background: var(--lav-2); opacity: 0; transition: opacity var(--t-fast); }
.resizer:hover::after, .shell.resizing .resizer::after { opacity: 1; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.panel-title h3 { font-size: calc(11px * var(--fs-scale)); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-title .hint { display: none; }
.profile { text-align: center; padding: 22px 16px 18px; background: var(--profile-bg); border-radius: calc(18px * var(--r-scale)); margin-bottom: 12px; }
.profile .avatar { margin: 0 auto 10px; display: block; width: 84px; height: 84px; }
.profile h3 { font-size: calc(22px * var(--fs-scale)); overflow-wrap: anywhere; letter-spacing: -0.01em; }
.profile .tagline { color: var(--muted); font-size: calc(13px * var(--fs-scale)); font-weight: 700; margin-top: 2px; }
.profile .badges { display: flex; gap: 6px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.profile .badges [data-ui="badge"] { background: var(--profile-badge-bg); }
.profile .badges [data-ui="badge"]:is([data-tone="asleep"], [data-tone="muted"]) { color: var(--muted); }
.section label:not(.check-row):not(.switch):not(.toggle):not(.choice) { display: flex; flex-direction: column; gap: 6px; font-size: calc(12px * var(--fs-scale)); font-weight: 800; color: var(--ink-3); margin-bottom: 12px; min-width: 0; }
.section label.row { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
.section label.row select { flex: 0 1 60%; }
.section input:not([type="checkbox"]):not([type="radio"]), .section select, .section textarea { width: 100%; min-width: 0; height: 42px; padding: 0 14px; border: 2px solid var(--lav); border-radius: var(--r-sm); background: var(--soft); box-shadow: var(--input-shadow); font-size: calc(14px * var(--fs-scale)); font-weight: 700; color: var(--ink); transition: border-color var(--t-fast), background var(--t-fast); }
.details-inner .section input:not([type="checkbox"]):not([type="radio"]), .details-inner .section select, .details-inner .section textarea { background: var(--soft); }
.details-inner .geek-body .section input:not([type="checkbox"]):not([type="radio"]), .details-inner .geek-body .section select, .details-inner .geek-body .section textarea { background: var(--input-bg); }
.section input:hover, .section select:hover, .section textarea:hover { border-color: var(--lav-2); }
.section input:focus, .section select:focus, .section textarea:focus { outline: none; border-color: var(--input-focus-border); background: var(--input-bg); }
.section select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%238f8fb0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px; }
.section select:disabled { opacity: 0.55; }
.section textarea { resize: vertical; min-height: 76px; height: auto; padding: 10px 14px; line-height: 1.5; }
.section input::placeholder, .section textarea::placeholder { color: var(--placeholder); font-weight: 600; }
.section .hint { margin: -4px 0 10px; }
.agent-grid .agent-cell { display: flex; flex-direction: column; align-items: stretch; gap: 5px; min-width: 0; }
.agent-grid .agent-cell .agent-tile { width: 100%; }
.agent-grid .agent-cell > [data-ui="button"] { align-self: center; }
#inv-login { margin: 6px 0 10px; }
#inv-login .inv-warn { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 12px; border-radius: var(--r-sm); background: var(--warm); color: var(--warm-ink); font-size: var(--fs-sm); font-weight: 600; line-height: 1.4; }
#inv-login .inv-warn .i { width: 16px; height: 16px; flex: none; }
.life-pop .lp-login { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.agent-tile .at-sub .i { width: 12px; height: 12px; vertical-align: -2px; margin-right: 3px; }
.login-host .login-start { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.login-host .login-start .hint { flex: 1; min-width: 200px; margin: 0; }
.agent-tile .at-sub[data-state="missing"] { color: var(--rose-ink); font-weight: 800; }
.agent-tile .at-sub[data-state="checking"] { opacity: 0.7; }
.agent-tile .at-sub[data-state="ok"] { color: var(--mint-ink, var(--green)); }
.field .count { font-variant-numeric: tabular-nums; color: var(--muted); }
.field .count::before { content: " · "; }
.field .count.over { color: var(--danger); font-weight: 800; }
.three-inline { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.three-inline label { margin-bottom: 4px; }
.rc-num { width: 76px; display: inline-flex; }
.rc-num > input { height: 30px !important; padding: 0 8px !important; }
.fv-num { width: 84px; }
.lp-n { width: 84px; margin: 0 4px; }
.rc-table { width: 100%; border-collapse: collapse; font-size: calc(13px * var(--fs-scale)); font-weight: 600; margin-bottom: 8px; }
.rc-table td { padding: 6px 4px; border-top: 2px solid var(--lav); vertical-align: middle; }
.rc-table td:first-child { display: flex; align-items: center; gap: 8px; }
.choice .rc-is-default { margin-left: 8px; padding: 1px 8px; border-radius: var(--r-pill); background: var(--soft); color: var(--muted); font-size: calc(11px * var(--fs-scale)); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.choice .rc-default { margin-left: 8px; border: 0; background: none; padding: 0; font: inherit; font-size: calc(11.5px * var(--fs-scale)); font-weight: 800; color: var(--primary); cursor: pointer; }
.choice .rc-default:hover { text-decoration: underline; }
.choice .geek-tip { float: right; margin-left: 14px; }
.rc-table select { height: 32px !important; padding: 0 28px 0 10px !important; font-size: calc(12px * var(--fs-scale)) !important; width: auto !important; }
.rc-table .rc-note { color: var(--muted); font-size: calc(11px * var(--fs-scale)); }
.skill-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.skill-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; background: var(--soft); border-radius: var(--r-md); padding: 12px 14px; min-width: 0; }
.skill-list li > div { min-width: 0; }
.skill-list .sk-main { flex: 1; }
.skill-list .sk-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-bottom: 2px; font-weight: 800; }
.skill-list .sk-holders { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--primary); }
.skill-list .sk-holders .i { width: 13px; height: 13px; }
.skill-list li { transition: background var(--t-fast); }
.skill-list li:hover { background: var(--lav); }
.skill-list li:hover .sk-holders .i { animation: g-pop 480ms var(--ease-pop); }
.sk-about { margin-top: 12px; max-width: 760px; line-height: 1.5; font-size: calc(12px * var(--fs-scale)); }
.skill-editor { margin-top: 0; }
.skill-actions { display: flex; gap: 6px; align-items: center; flex: none; }
.dialog .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 1000px) { .dialog .two-col { grid-template-columns: 1fr; } }
@media (max-width: 1184px) {
  .details { position: fixed; right: var(--gap); top: var(--gap); bottom: var(--gap); z-index: 20; }
}
@media (max-width: 944px) {
  .shell, .shell.rail-open { grid-template-columns: var(--rail-w) 250px minmax(0, 1fr) auto; }
}
#template-dialog[open] { display: flex; flex-direction: column; overflow: hidden; max-height: min(calc(90 * var(--layout-vh)), 860px); }
#template-dialog > form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.tpl-layout { display: grid; grid-template-columns: 200px 1fr; gap: 14px; margin: 6px 0 12px; flex: 1; min-height: 160px; }
.tpl-pane { position: relative; min-height: 0; min-width: 0; display: flex; }
.tpl-pane > * { flex: 1; min-width: 0; }
.tpl-list { display: flex; flex-direction: column; gap: 8px; overflow: auto; padding-right: 4px; }
.tpl-list::before { content: "Templates"; font-size: calc(11px * var(--fs-scale)); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); padding: 0 4px; }
.tpl-item { display: grid; grid-template-columns: 34px 1fr 18px; align-items: center; gap: 10px; text-align: left; border: 2px solid transparent; border-radius: calc(14px * var(--r-scale)); padding: 10px 10px 10px 12px; background: var(--card); color: var(--ink); font: inherit; cursor: pointer; box-shadow: var(--tpl-shadow); transition: border-color var(--t-fast), transform var(--t-fast); }
.tpl-item:hover { border-color: var(--lav-2); transform: translateY(-1px); }
.tpl-item.on { border-color: var(--primary); background: var(--lav); }
.tpl-emoji { font-size: 22px; line-height: 1; text-align: center; }
.tpl-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tpl-body b { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: calc(14px * var(--fs-scale)); }
.tpl-meta { color: var(--muted); font-size: calc(12px * var(--fs-scale)); font-weight: 600; }
.tpl-item .avatar-stack { margin-top: 2px; }
.tpl-runs { display: flex; flex-wrap: wrap; gap: 6px; }
.stp-preview { display: flex; flex-direction: column; gap: 10px; max-height: calc(48 * var(--layout-vh)); overflow: auto; padding-right: 4px; margin: 4px 0 10px; }
.stp-section { background: var(--soft); border-radius: calc(14px * var(--r-scale)); padding: 10px 12px; }
.stp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.stp-grid .field { margin-bottom: 8px; }
.stp-grid .field.wide { grid-column: 1 / -1; }
.stp-grid .switch { margin: 2px 0 8px; }
.stp-vm { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: start; padding: 10px 0 4px; border-top: 1px solid var(--lav-2); }
.stp-vm-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.stp-vm-fields .field { margin-bottom: 8px; }
.stp-vm-fields .field.wide { grid-column: 1 / -1; }
.stp-vm-fields .field textarea { min-height: 54px; }
.stp-vm-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.stp-vm-top b { flex: 1; }
.stp-section h5 { margin: 0 0 6px; font-size: calc(11px * var(--fs-scale)); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.stp-section .kv { font-size: calc(12.5px * var(--fs-scale)); }
.stp-section ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: calc(13px * var(--fs-scale)); font-weight: 600; }
.stp-vm { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: start; padding: 8px 0; border-top: 1px solid var(--lav-2); }
.stp-vm:first-of-type { border-top: 0; padding-top: 2px; }
.stp-vm-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.stp-vm-role { color: var(--muted); font-size: calc(12.5px * var(--fs-scale)); font-weight: 600; line-height: 1.45; margin-top: 3px; }
.stp-vm .chips { margin-top: 5px; }
.tpl-check { display: grid; place-items: center; width: 18px; height: 18px; border-radius: calc(50% * var(--r-scale)); background: var(--primary); color: var(--tpl-check-ink); opacity: 0; transition: opacity var(--t-fast); }
.tpl-check .i { width: 12px; height: 12px; }
.tpl-item.on .tpl-check { opacity: 1; }
.tpl-item.on:hover .tpl-check .i { animation: g-pop 480ms var(--ease-pop); } 
.tpl-detail { min-width: 0; display: flex; flex-direction: column; gap: 10px; overflow: auto; padding-right: 4px; }
.tpl-desc { margin: 0; color: var(--ink-2); font-weight: 600; }
.tpl-rules ul { margin: 4px 0 0; padding-left: 18px; color: var(--ink-2); font-size: calc(13px * var(--fs-scale)); font-weight: 600; }
.tpl-vm { border-radius: calc(14px * var(--r-scale)); background: var(--soft); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.tpl-vm-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.tpl-vm-role { color: var(--muted); font-size: calc(12.5px * var(--fs-scale)); font-weight: 600; line-height: 1.45; }
.mm-all { width: 24px; height: 24px; border-radius: calc(8px * var(--r-scale)); background: var(--lav); color: var(--primary); display: grid; place-content: center; flex: none; }
.mm-all .i { width: 14px; height: 14px; }
.mention.all { color: var(--primary); }
.side-list li.unstaffed .p-name > span:first-child { color: var(--muted); }
.participants [data-ui="badge"][data-tone="attention"] { cursor: pointer; }
.cast-banner { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 22px 14px; background: var(--grad-canvas); border-bottom: 1px solid var(--lav); text-align: center; }
.cast-lead { max-width: 720px; color: var(--ink-2); font-weight: 600; font-size: calc(14px * var(--fs-scale)); }
.cast-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 12px; }
.cast-card { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 200px; padding: 16px 12px; border: 2px dashed var(--lav-2); border-radius: calc(16px * var(--r-scale)); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; transition: border-color var(--t-fast), transform var(--t-fast); }
.cast-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.cast-card b { font-size: calc(15px * var(--fs-scale)); }
.cast-card span { color: var(--muted); font-size: calc(12px * var(--fs-scale)); font-weight: 600; }
.cast-card em { margin-top: 4px; font-style: normal; font-size: calc(12px * var(--fs-scale)); font-weight: 800; color: var(--primary); }
.wedge-banner { display: flex; flex-direction: column; gap: 8px; padding: 10px 16px 0; }
.wedge { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-left: 3px solid var(--attention); border-radius: calc(12px * var(--r-scale)); background: var(--st-thinking); color: var(--st-thinking-ink); animation: fade-in var(--t-base) var(--ease-out); }
.wedge .avatar { flex: none; }
.wedge-body { flex: 1; min-width: 0; font-size: calc(13px * var(--fs-scale)); font-weight: 600; line-height: 1.45; }
.wedge-body b { font-weight: 800; }
.wedge-acts { display: flex; flex: none; gap: 6px; }
.details .wedge { margin: 0 4px 12px; }
.composer.gated { opacity: 0.7; }
.composer.gated textarea { cursor: not-allowed; }
.check-list.locked { pointer-events: none; opacity: 0.6; }
.done-notes { flex-direction: column; }
.done-note.new { background: var(--card); color: var(--ink-2); }
.done-note.new:hover { background: var(--soft); }
.meta .seen-by { color: var(--primary); font-weight: 800; margin-left: 6px; }
.stp-row { justify-content: center; margin: 6px 0 0; }
.carry-parts { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.carry-dialog { width: min(840px, calc(94 * var(--layout-vw))); max-height: calc(90 * var(--layout-vh)); padding: 24px; }
.memory-dialog { width: min(820px, calc(94 * var(--layout-vw))); max-height: calc(90 * var(--layout-vh)); overflow: auto; padding: 24px; text-align: left; }
.memory-notes { display: grid; gap: 12px; }
.memory-note { padding: 12px; border: 1px solid var(--border); border-radius: 10px; }
.memory-note textarea { width: 100%; box-sizing: border-box; }
.memory-note-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.memory-note small, .memory-count { color: var(--ink-3); }
.memory-history { margin-top: 18px; }
.memory-feedback { white-space: pre-wrap; }
.carry-heading, .carry-modes { display: flex; align-items: center; gap: 8px; }
.carry-heading { justify-content: space-between; }
.carry-heading h3 { margin: 0; }
.carry-modes { margin: 16px 0; flex-wrap: wrap; }
.carry-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.carry-choices section { display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--border); border-radius: 10px; }
.carry-choices h4 { margin: 0; }
.carry-choices p { flex: 1; }
@media (max-width: 480px) { .carry-choices { grid-template-columns: 1fr; } }
.carry-content { max-height: calc(68 * var(--layout-vh)); overflow: auto; padding: 2px 6px 6px 2px; text-align: left; }
.carry-content fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin: 12px 0; min-width: 0; }
.carry-content legend { font-weight: 700; padding: 0 5px; }
.carry-field { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; font-weight: 600; }
.carry-field input, .carry-field select { width: 100%; box-sizing: border-box; }
.carry-room-list, .carry-part-list { display: flex; flex-direction: column; gap: 9px; }
.carry-room-list { max-height: 170px; overflow: auto; }
.carry-room-list label, .carry-part-list label, .carry-inline-parts label, .carry-check { display: flex; align-items: center; gap: 8px; }
.carry-part-list label small { margin-left: auto; white-space: nowrap; color: var(--ink-3); }
.carry-inline-parts { display: flex; flex-wrap: wrap; gap: 14px; margin: 12px 0; }
.carry-content .actions { justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.carry-review-room { padding: 14px 0; border-bottom: 1px solid var(--border); }
.carry-review-room h4 { margin: 0 0 10px; }
.carry-review-room details { margin: 10px 0; }
.carry-comparison { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; margin: 10px 0; }
.carry-comparison pre, .carry-record-text { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 300px; overflow: auto; padding: 10px; font: inherit; background: var(--soft); border-radius: 8px; }
.carry-record-text { max-height: none; }
.carry-record-image { max-width: 100%; max-height: 500px; object-fit: contain; }
.carry-removed-list { list-style: none; margin: 0; padding: 0; }
.carry-removed-list li { border-bottom: 1px solid var(--border); }
.carry-removed-list button { background: transparent; color: inherit; border: 0; text-align: left; padding: 12px 0; width: 100%; cursor: pointer; }
.carry-removed-list span { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.carry-branch { font-size: .8em; color: var(--ink-3); margin-left: 6px; }
@media (max-width: 480px) { .carry-comparison { grid-template-columns: 1fr; } .carry-dialog { padding: 16px; } }
.carry-parts label { display: flex; align-items: flex-start; gap: 8px; font-size: calc(13px * var(--fs-scale)); font-weight: 600; color: var(--ink-2); line-height: 1.45; }
.carry-parts label.off { color: var(--ink-3); }
.carry-parts input { margin: 2px 0 0; flex: 0 0 auto; }
.carry-parts .hint { margin: 2px 0 0; }
.carry-preview { text-align: left; }
.carry-preview .carry-room { margin: 0 0 10px; font-size: calc(13px * var(--fs-scale)); font-weight: 700; color: var(--ink-2); line-height: 1.45; }
.carry-preview dl { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.carry-preview dl > div { display: flex; align-items: baseline; gap: 10px; }
.carry-preview dt { flex: 0 0 auto; min-width: 3.4em; text-align: right; font-size: calc(14px * var(--fs-scale)); font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.carry-preview dd { margin: 0; font-size: calc(13px * var(--fs-scale)); font-weight: 600; color: var(--ink-2); line-height: 1.45; }
.agent-updates-dialog { width: min(800px, calc(100 * var(--layout-vw) - 32px)); max-height: calc(90 * var(--layout-vh)); overflow: hidden; }
.agent-updates-dialog[open] { display: flex; flex-direction: column; }
.agent-update-body { min-height: 0; overflow: auto; scrollbar-gutter: stable; }
.agent-update-footer { flex: none; }
.agent-update-list { display: grid; gap: 12px; margin-block: 16px; }
.agent-update-row { padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--panel); }
.agent-update-top { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.agent-update-top > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.agent-update-path { overflow-wrap: anywhere; }
.agent-update-detail { margin-block: 8px; }
.agent-update-error { color: var(--danger); overflow-wrap: anywhere; }
.agent-update-activity { display: inline-flex; align-items: center; gap: 6px; }
.agent-update-top strong + .agent-update-activity { margin-inline-start: 10px; font-size: var(--fs-xs); }
.agent-update-spinner { display: inline-block; flex: none; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .agent-update-spinner { animation: none; } }
.agent-update-footer > .agent-update-error { max-height: calc(20 * var(--layout-vh)); overflow: auto; }
.agent-tile-update-status { font-size: calc(11px * var(--fs-scale)); text-align: center; overflow-wrap: anywhere; }
.agent-grid-update-all { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; font-size: calc(12px * var(--fs-scale)); }
.agent-grid-update-all > [role="status"]:empty { display: none; }
.agent-update-row pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 180px; overflow: auto; }
.agent-update-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 12px; }
.agent-update-actions > span { flex: 1; }
