













:root {



color-scheme: dark;
--bg: #0e0e16;
--bg2: #181822;
--bg3: #22222e;
--border: #36364c;
--accent: #ff7a3c;
--accent2: #8b5cf6;
--text: #f3f3fb;
--text2: #c0c0da;
--text3: #9a9ab6;
--green: #34d36b;
--red: #f4565a;
--yellow: #f0c020;
--font: 'Be Vietnam Pro', 'Segoe UI', Arial, sans-serif;
--font-chat: var(--font);
--mono: 'SF Mono', 'Fira Code', 'Consolas', ui-monospace, monospace;




--text-hi: #ffffff;
--accent-ink: #ffab81;
--accent2-ink: #d5b5ff;




--accent-solid: #ff7a3c;


--surface-1: rgba(255, 255, 255, 0.025);
--surface-2: rgba(255, 255, 255, 0.052);
--surface-3: rgba(255, 255, 255, 0.085);
--hairline: rgba(255, 255, 255, 0.08);
--sunken: rgba(0, 0, 0, 0.25);


--shadow-1: 0 4px 14px rgba(0, 0, 0, 0.28);
--shadow-2: 0 8px 30px rgba(0, 0, 0, 0.45);
--shadow-3: 0 24px 70px rgba(0, 0, 0, 0.62);
--shadow-veil: rgba(0, 0, 0, 0.5);



--accent-wash: rgba(255, 101, 45, 0.07);
--accent-wash-2: rgba(255, 105, 45, 0.12);
--accent-line: rgba(255, 130, 67, 0.30);
--accent-ring: 0 0 18px rgba(255, 107, 43, 0.20);
--accent2-wash: rgba(159, 104, 255, 0.12);
--accent2-wash-2: rgba(124, 58, 237, 0.22);
--accent2-line: rgba(124, 58, 237, 0.4);




--field-bg: rgba(20, 20, 30, 0.8);
--panel-bg: rgba(15, 16, 25, 0.78);
--panel-solid: rgba(10, 14, 26, 0.97);
--scrim: rgba(3, 3, 8, 0.8);


--info-ink: #cfe0ff;
--info-wash: rgba(15, 22, 40, 0.85);
--info-line: rgba(120, 180, 255, 0.35);


--link-ink: #7fb0ff;
--on-accent: #1a1400;



--warn-ink: #e0a04a;
--warn-wash: rgba(210, 160, 60, 0.14);
--warn-line: rgba(210, 160, 60, 0.5);
--danger-wash: rgba(210, 70, 70, 0.14);
--danger-line: rgba(210, 70, 70, 0.5);
--ok-wash: rgba(44, 122, 75, 0.16);
--ok-line: rgba(44, 122, 75, 0.5);


--code-bg: #0c0c16;
--code-ink: #d6c9ff;
--tok-c: #6b7a8f;
--tok-s: #7ee787;
--tok-n: #f0883e;
--tok-k: #c792ea;
--tok-t: #79c0ff;
--tok-a: #ffa657;


--brain-bg: radial-gradient(ellipse 55% 55% at 50% 48%,
rgba(124, 58, 237, 0.20) 0%, rgba(70, 40, 140, 0.10) 32%,
rgba(20, 12, 40, 0.04) 55%, #03030a 78%);
--brain-vignette: radial-gradient(ellipse 70% 70% at 50% 46%,
transparent 45%, rgba(3, 3, 10, 0.55) 100%);
--brain-glass: rgba(16, 14, 28, 0.55);
--brain-glass-brd: rgba(185, 140, 255, 0.36);
--brain-glass-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
--brain-halo: 0 0 12px rgba(0, 0, 0, 0.9);
--brain-ink: #d9c9ff;
--brain-ink2: #8a7ab8;
--brain-ink-hot: #ff9d6b;
}






:root[data-theme="light"] {
color-scheme: light;
--bg: #fbf9f7;
--bg2: #ffffff;
--bg3: #f7f4ef;
--border: #e7e1da;
--accent: #e85d1f;
--accent2: #7c3aed;
--text: #1c1a24;
--text2: #55505f;
--text3: #6e6878;
--green: #15803d;
--red: #d11f1f;
--yellow: #96590a;

--text-hi: #08060e;
--accent-ink: #b4430d;
--accent2-ink: #6d28d9;
--accent-solid: #c2410c;



--surface-1: rgba(60, 42, 24, 0.035);
--surface-2: rgba(60, 42, 24, 0.062);
--surface-3: rgba(60, 42, 24, 0.095);
--hairline: rgba(60, 42, 24, 0.11);
--sunken: rgba(60, 42, 24, 0.045);

--shadow-1: 0 2px 8px rgba(76, 58, 38, 0.07);
--shadow-2: 0 8px 24px rgba(76, 58, 38, 0.10);
--shadow-3: 0 22px 58px rgba(76, 58, 38, 0.16);
--shadow-veil: rgba(76, 58, 38, 0.16);

--accent-wash: rgba(232, 93, 31, 0.075);
--accent-wash-2: rgba(232, 93, 31, 0.14);
--accent-line: rgba(232, 93, 31, 0.34);

--accent-ring: 0 0 0 3px rgba(232, 93, 31, 0.13);
--accent2-wash: rgba(124, 58, 237, 0.10);
--accent2-wash-2: rgba(124, 58, 237, 0.17);
--accent2-line: rgba(124, 58, 237, 0.34);



--field-bg: #ffffff;
--panel-bg: rgba(255, 255, 255, 0.9);
--panel-solid: #ffffff;
--scrim: rgba(46, 34, 22, 0.34);

--info-ink: #1e40af;
--info-wash: rgba(59, 130, 246, 0.09);
--info-line: rgba(59, 130, 246, 0.36);

--link-ink: #1d4ed8;
--on-accent: #ffffff;



--warn-ink: #96590a;
--warn-wash: rgba(180, 120, 20, 0.10);
--warn-line: rgba(161, 98, 7, 0.38);
--danger-wash: rgba(220, 38, 38, 0.08);
--danger-line: rgba(220, 38, 38, 0.34);
--ok-wash: rgba(21, 128, 61, 0.09);
--ok-line: rgba(21, 128, 61, 0.34);



--code-bg: #f6f2ec;
--code-ink: #2c2438;
--tok-c: #6f6880;
--tok-s: #0a7d3f;
--tok-n: #b4430d;
--tok-k: #7c3aed;
--tok-t: #0b5fa5;
--tok-a: #9a5b00;



--brain-bg: radial-gradient(ellipse 58% 54% at 50% 43%,
rgba(124, 58, 237, 0.13) 0%, rgba(124, 58, 237, 0.06) 30%,
rgba(232, 93, 31, 0.05) 52%, rgba(255, 255, 255, 0) 72%),
linear-gradient(176deg, #fffdfc 0%, #faf6f1 46%, #f2ebe2 100%);
--brain-vignette: radial-gradient(ellipse 74% 74% at 50% 43%,
transparent 40%, rgba(226, 215, 201, 0.5) 100%);
--brain-glass: rgba(255, 255, 255, 0.86);
--brain-glass-brd: rgba(60, 42, 24, 0.13);
--brain-glass-shadow: 0 6px 20px rgba(76, 58, 38, 0.11);

--brain-halo: 0 1px 2px rgba(255, 255, 255, 0.95), 0 0 9px rgba(255, 255, 255, 0.92);
--brain-ink: #4a3568;
--brain-ink2: #6f6486;
--brain-ink-hot: #c2410c;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html {





touch-action: pan-x pan-y;
}
body {
background: var(--bg);
color: var(--text);
font-family: var(--font);
font-size: var(--mm-fs-16);
line-height: 1.5;
height: 100vh;
overflow: hidden;
touch-action: pan-x pan-y;
}
button, input, select, textarea { font-family: inherit; }


.hud {
display: grid;






grid-template-rows: 52px 1fr auto auto auto;
height: 100vh;
min-width: 0;
max-width: 100%;
overflow: hidden;
}
.hud > * { min-width: 0; }


.hud-top {
display: grid;
grid-template-columns: auto minmax(0, 1fr) auto;
align-items: center;
padding: 0 20px;
border-bottom: 1px solid var(--border);
background: var(--bg2);
}


.hud-top-left { display: flex; align-items: center; gap: 14px; justify-self: start; }
.hud-top-right { display: flex; align-items: center; gap: 8px; justify-self: end; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand-icon { color: var(--accent); font-size: var(--mm-fs-20); }
.brand-text { font-family: 'Montserrat', var(--font); font-size: var(--mm-fs-16); font-weight: 700; letter-spacing: 3px; }
.hud-center-title {
min-width: 0; display: flex; align-items: center; justify-content: center; gap: 10px;
white-space: nowrap; overflow: visible;
}
.ws-name { font-weight: 600; font-size: var(--mm-fs-16); }
.ws-date { margin-left: 10px; font-size: var(--mm-fs-13); color: var(--text2); font-family: var(--font); }
.notification-trigger {
position: relative; min-width: 38px; height: 34px; padding: 0 11px;
display: inline-flex; align-items: center; justify-content: center; gap: 7px;
border: 1px solid var(--accent-line); border-radius: var(--mm-r-btn);
color: var(--text2); background: var(--bg3);
font-family: var(--font); font-size: var(--mm-fs-12); font-weight: 600;
cursor: pointer; transition: border-color .2s, background .2s, color .2s, box-shadow .2s, transform .2s;
}
.notification-trigger:hover,
.notification-trigger[aria-expanded="true"] {
color: var(--text-hi); border-color: var(--accent); background: var(--accent-wash-2);
box-shadow: 0 0 0 3px var(--accent-wash), var(--shadow-1);
}
.notification-trigger:active { transform: scale(.96); }
.notification-trigger svg {
width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8;
stroke-linecap: round; stroke-linejoin: round;
}
.notification-trigger.has-unread {
color: var(--text-hi); border-color: var(--accent);
background: var(--accent-wash-2);
box-shadow: var(--accent-ring);
}
.notification-trigger.has-unread::before {
content: ""; position: absolute; inset: -2px; border: 1px solid var(--accent-line);
border-radius: var(--mm-r-btn); pointer-events: none;
animation: notiPulse 2.2s ease-out infinite;
}
@keyframes notiPulse {
0%, 45% { opacity: 0; transform: scale(1); }
65% { opacity: .7; }
100% { opacity: 0; transform: scale(1.10); }
}
.notification-badge {
min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--mm-r-btn);
display: inline-flex; align-items: center; justify-content: center;
color: var(--on-accent); background: var(--accent-solid); box-shadow: 0 0 10px rgba(255,99,47,.55);
font-size: var(--mm-fs-badge); font-weight: 700; line-height: 1;
}
.notification-badge[hidden] { display: none; }
.notification-shade { position: fixed; inset: 0; z-index: 169; background: transparent; }
.notification-shade[hidden], .notification-panel[hidden] { display: none; }
.notification-panel {
position: fixed; top: 60px; right: 18px; z-index: 170;
width: min(410px, calc(100vw - 28px)); max-height: min(620px, calc(100dvh - 90px));
display: flex; flex-direction: column; overflow: hidden;
color: var(--text); background: var(--bg2);
border: 1px solid var(--accent-line); border-radius: var(--mm-r-field);
box-shadow: var(--shadow-3), 0 0 0 1px var(--surface-1);
backdrop-filter: blur(22px) saturate(1.25);
animation: notiIn .18s ease-out;
}
@keyframes notiIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.noti-head {
flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
padding: 16px 16px 13px; border-bottom: 1px solid var(--hairline);
}
.noti-title { font-family: var(--font); font-size: var(--mm-fs-20); font-weight: 700; }
.noti-sub { margin-top: 3px; color: var(--text3); font-size: var(--mm-fs-12); }
.noti-head-actions { display: flex; align-items: center; gap: 5px; }
.noti-text-btn, .noti-close {
border: 0; color: var(--text2); background: transparent; cursor: pointer;
font: inherit; transition: color .15s, background .15s;
}
.noti-text-btn { padding: 6px 8px; border-radius: var(--mm-r-chip); font-size: var(--mm-fs-12); }
.noti-text-btn:hover { color: var(--text-hi); background: var(--surface-2); }
.noti-text-btn.primary { color: var(--accent-ink); font-weight: 600; }
.noti-close {
width: 30px; height: 30px; border-radius: var(--mm-r-chip); font-size: var(--mm-fs-24); line-height: 1;
}
.noti-close:hover { color: var(--text-hi); background: var(--surface-3); }
.noti-list { flex: 1 1 auto; min-height: 90px; overflow-y: auto; padding: 8px; }
.noti-list::-webkit-scrollbar { width: 5px; }
.noti-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.noti-card {
position: relative; display: block; width: 100%; margin: 0 0 6px; padding: 12px 12px 11px 15px;
color: inherit; text-align: left; background: var(--surface-1);
border: 1px solid transparent; border-radius: var(--mm-r-btn);
cursor: pointer; transition: border-color .16s, background .16s, transform .16s;
}
.noti-card:hover { background: var(--surface-2); border-color: var(--hairline); transform: translateY(-1px); }
.noti-card.unread { background: var(--accent-wash); border-color: var(--accent-line); }
.noti-card.unread::before {
content: ""; position: absolute; left: 6px; top: 17px; width: 5px; height: 5px;
border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(255,114,61,.75);
}
.noti-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.noti-kind {
padding: 3px 7px; border-radius: var(--mm-r-chip); color: var(--accent-ink); background: var(--accent-wash);
font-size: 9px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase;
}
.noti-kind.marketing { color: var(--accent2-ink); background: var(--accent2-wash); }
.noti-kind.community { color: var(--info-ink); background: var(--info-wash); }
.noti-time { color: var(--text3); font-size: var(--mm-fs-badge); }
.noti-card h4 { margin: 8px 0 4px; color: var(--text); font-size: var(--mm-fs-14); line-height: 1.35; }
.noti-card p { margin: 0; color: var(--text2); font-size: var(--mm-fs-12); line-height: 1.5; }
.noti-card-summary,
.noti-card-body {
display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden;
}
.noti-card-summary { -webkit-line-clamp: 2; line-clamp: 2; }
.noti-card-body {
margin-top: 7px !important; white-space: pre-line; color: var(--text3) !important;
-webkit-line-clamp: 3; line-clamp: 3;
}
.noti-cta { display: inline-block; margin-top: 9px; color: var(--accent-ink); font-size: var(--mm-fs-12); font-weight: 600; }
.noti-loading, .noti-empty { padding: 30px 18px; color: var(--text3); text-align: center; font-size: var(--mm-fs-13); line-height: 1.6; }
.noti-load-more {
display: block; width: calc(100% - 8px); margin: 10px 4px 4px; padding: 10px 12px;
border: 1px dashed var(--accent-line); border-radius: var(--mm-r-btn);
color: var(--accent-ink); background: var(--accent-wash);
font: 600 12px var(--font); cursor: pointer;
transition: color .15s, border-color .15s, background .15s;
}
.noti-load-more:hover {
color: var(--accent-ink); border-color: var(--accent); background: var(--accent-wash-2);
}
.noti-foot {
flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
padding: 10px 12px; border-top: 1px solid var(--hairline);
}

.noti-kind.answer { color: var(--accent-ink); background: var(--accent-wash); }
.noti-kind.report { color: var(--info-ink); background: var(--info-wash); }
.noti-kind.system { color: var(--text3); background: var(--surface-2); }
.noti-tabs {
flex: 0 0 auto; display: flex; gap: 4px; padding: 8px 10px 0;
border-bottom: 1px solid var(--hairline);
}
.noti-tab {
display: flex; align-items: center; gap: 6px; padding: 8px 12px;
border: none; border-bottom: 2px solid transparent; background: none;
color: var(--text3); font: 600 12.5px var(--font); cursor: pointer;
}
.noti-tab:hover { color: var(--text2); }
.noti-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.noti-tab-count {
min-width: 17px; height: 17px; padding: 0 5px; border-radius: var(--mm-r-btn);
display: inline-flex; align-items: center; justify-content: center;
background: var(--accent); color: #fff; font-size: var(--mm-fs-badge); font-weight: 700;
}

.noti-card-top .noti-time { margin-left: auto; }
.noti-x {
flex: 0 0 auto; width: 28px; height: 28px; margin: -6px -6px -6px 0; border: 0; border-radius: var(--mm-r-chip);
color: var(--text3); background: transparent; font-size: var(--mm-fs-20); line-height: 1; cursor: pointer;
}
.noti-x:hover { color: var(--text-hi); background: var(--surface-3); }
.noti-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.noti-mini {
margin-top: 9px; padding: 4px 9px; border: 1px solid var(--hairline); border-radius: var(--mm-r-chip);
color: var(--text2); background: transparent; font: 600 var(--mm-fs-12) var(--font); cursor: pointer;
}
.noti-mini:hover { color: var(--text-hi); border-color: var(--accent-line); }
.noti-card.urgent .noti-kind { color: var(--danger); background: var(--danger-wash); }
.noti-learned {
margin: 0 0 8px; padding: 9px 12px; border-radius: var(--mm-r-btn);
color: var(--text2); background: var(--surface-2); font-size: var(--mm-fs-12); line-height: 1.5;
}
.noti-filtered { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--hairline); }
.noti-filtered-note { margin: 0 4px 8px; color: var(--text3); font-size: var(--mm-fs-12); line-height: 1.5; }
.noti-policy-h { margin: 12px 4px 6px; color: var(--text3); font-size: var(--mm-fs-12); font-weight: 700; }
.noti-policy-row {
display: flex; align-items: center; justify-content: space-between; gap: 8px;
padding: 6px 4px; color: var(--text2); font-size: var(--mm-fs-13);
}
.noti-policy-row .noti-mini { margin-top: 0; }
.noti-policy-row select {
max-width: 55%; padding: 6px 8px; border: 1px solid var(--hairline); border-radius: var(--mm-r-chip);
color: var(--text); background: var(--surface-1); font: var(--mm-fs-16) var(--font);
}

.noti-push {
flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
padding: 10px 12px; border-top: 1px solid var(--hairline); background: var(--surface-1);
}
.noti-push-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.noti-push-title { color: var(--text); font-size: var(--mm-fs-13); font-weight: 600; }
.noti-push-note { color: var(--text3); font-size: var(--mm-fs-12); line-height: 1.4; }
.noti-push-note.loi { color: var(--warn-ink); }
@media (min-width: 861px) and (max-width: 1180px) {
.ws-date, .notification-trigger-label { display: none; }
.notification-trigger { width: 34px; min-width: 34px; padding: 0; }


.notification-badge {
position: absolute; top: -4px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px;
}
}
.hud-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.hud-icon-btn {
background: var(--bg3); border: 1px solid var(--border); color: var(--text2);
width: 34px; height: 34px; border-radius: var(--mm-r-chip); cursor: pointer;
display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.hud-icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.hud-icon-btn.muted { opacity: 0.4; }


.install-app-btn {
background: var(--bg3); border: 1px solid var(--border); color: var(--text2);
height: 34px; padding: 0 10px; border-radius: var(--mm-r-chip); cursor: pointer;
display: flex; align-items: center; gap: 6px;
font: 600 11.5px var(--font); white-space: nowrap; transition: all 0.2s;
}
.install-app-btn:hover { color: var(--accent); border-color: var(--accent); }
.install-app-btn[hidden] { display: none; }
@media (max-width: 1180px) {
.install-app-label { display: none; }
.install-app-btn { width: 34px; padding: 0; justify-content: center; }
}


.theme-toggle .ic-sun { display: none; }
:root[data-theme="light"] .theme-toggle .ic-moon { display: none; }
:root[data-theme="light"] .theme-toggle .ic-sun { display: block; }


.hud-body {
display: grid;


grid-template-columns: 260px minmax(0, 1fr) 320px;
min-width: 0;
overflow: hidden;
}
.hud-left, .hud-right {
background: var(--bg2);
padding: 16px;
overflow-y: auto;
display: flex;
flex-direction: column;
min-width: 0;
}
.hud-center { min-width: 0; }
.hud-left { border-right: 1px solid var(--border); }
.hud-right { border-left: 1px solid var(--border); }




.vault-expand { display: none; }
body.vault-thu .hud-body { grid-template-columns: 44px minmax(0, 1fr) 320px; }
body.vault-thu .hud-body > .hud-left { padding: 12px 6px; align-items: center; overflow: hidden; }
body.vault-thu .hud-body > .hud-left > :not(.vault-expand) { display: none; }
body.vault-thu .hud-body > .hud-left > .vault-expand {
display: flex; align-items: center; justify-content: center;
width: 30px; height: 30px; flex: none; border-radius: var(--mm-r-chip);
border: 1px solid var(--border); background: none; color: var(--text2); cursor: pointer;
}
body.vault-thu .hud-body > .hud-left > .vault-expand:hover { color: var(--accent); border-color: var(--accent); }


.cside-pane .vault-tools #vtCollapse, .cside-pane > .hud-left > .vault-expand { display: none; }






.chatcol-expand { display: none; }
.chatcol-thu-btn svg, .chatcol-expand svg { transform: scaleX(-1); }
@media (max-width: 860px) { .chatcol-thu-btn { display: none; } }
@media (min-width: 861px) {
body.chatcol-thu .hud-body { grid-template-columns: 260px minmax(0, 1fr) 44px; }
body.vault-thu.chatcol-thu .hud-body { grid-template-columns: 44px minmax(0, 1fr) 44px; }
body.chatcol-thu .hud-body > .hud-right { padding: 12px 6px; align-items: center; overflow: hidden; }
body.chatcol-thu .hud-body > .hud-right > :not(.chatcol-expand) { display: none; }
body.chatcol-thu .hud-body > .hud-right > .chatcol-expand {
display: flex; align-items: center; justify-content: center;
width: 30px; height: 30px; flex: none; border-radius: var(--mm-r-chip);
border: 1px solid var(--border); background: none; color: var(--text2); cursor: pointer;
}
body.chatcol-thu .hud-body > .hud-right > .chatcol-expand:hover { color: var(--accent); border-color: var(--accent); }
}

.hud-left::-webkit-scrollbar, .hud-right::-webkit-scrollbar, .transcript::-webkit-scrollbar { width: 4px; }
.hud-left::-webkit-scrollbar-thumb, .hud-right::-webkit-scrollbar-thumb, .transcript::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.panel-label {
font-family: var(--font); font-size: var(--mm-fs-12); letter-spacing: 2px;
color: var(--text3); margin-bottom: 10px;
display: flex; align-items: center; justify-content: space-between;
flex-wrap: wrap; row-gap: 8px;
}


.panel-label > span:first-child { flex: none; white-space: nowrap; }





.panel-label .proj-chip-host { flex: 1 1 auto; min-width: 0; justify-content: flex-start; }
.panel-label .proj-chip-host:empty { display: none; }
.panel-label .proj-chip { max-width: 100%; }
.panel-label .panel-acts { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
.mini-btn {
background: none; border: 1px solid var(--border); color: var(--text2);
width: 22px; height: 22px; border-radius: var(--mm-r-chip); cursor: pointer; font-size: var(--mm-fs-14);
}
.mini-btn:hover { color: var(--accent); border-color: var(--accent); }


.hud-center {
position: relative; overflow: hidden;
background: var(--brain-bg);
}
#starfield { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
#graph2d { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; cursor: grab; display: none; }
.concept-label.cl-active .cl-name { color: var(--accent-ink); text-shadow: var(--brain-halo); }

#graph2d canvas { display: block; background: transparent !important; }


.hud-center::after {
content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
background: var(--brain-vignette);
}


.concept-labels { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.concept-label {
position: absolute; transform: translate(-50%, -50%);
font-family: var(--font); text-align: center; white-space: nowrap;
text-shadow: var(--brain-halo);
opacity: 0; transition: opacity 0.6s ease;
}


.concept-label.show { opacity: 0.9; }
:root[data-theme="light"] .concept-label.show { opacity: 1; }
.concept-label .cl-name {
font-size: var(--mm-fs-13); letter-spacing: 2px; color: var(--brain-ink); font-weight: 600;
}
.concept-label .cl-meta {
font-size: var(--mm-fs-12); letter-spacing: 1px; color: var(--brain-ink2); margin-top: 2px;
}
.concept-label .cl-fire { color: var(--brain-ink-hot); }
.brain-overlay-toggle {
position: absolute; top: 14px; right: 14px; z-index: 6;
width: 36px; height: 36px; padding: 8px;
display: grid; place-items: center;
border: 1px solid var(--brain-glass-brd); border-radius: var(--mm-r-btn);
color: var(--brain-ink); background: var(--brain-glass);
box-shadow: var(--brain-glass-shadow);
backdrop-filter: blur(8px);
cursor: pointer; transition: color .2s, border-color .2s, background .2s, transform .2s;
}
.brain-overlay-toggle:hover {
color: var(--text-hi); border-color: var(--accent); background: var(--accent2-wash);
}
:root[data-theme="light"] .brain-overlay-toggle:hover {
color: var(--accent-ink); background: #fff;
}
.brain-overlay-toggle:active { transform: scale(.94); }
.brain-overlay-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.brain-overlay-toggle svg {
width: 19px; height: 19px; fill: none; stroke: currentColor;
stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.brain-eye-off { display: none; }


.brain-max-btn { display: none; }

.graph-timelapse-btn { top: 58px; }
.graph-timelapse-btn .tl-stop { display: none; }
.graph-timelapse-btn.playing .tl-play { display: none; }
.graph-timelapse-btn.playing .tl-stop { display: block; }
.graph-timelapse-btn.playing {
color: var(--text-hi); border-color: var(--accent); background: var(--accent2-wash);
animation: tlPulse 1.6s ease-in-out infinite;
}
@keyframes tlPulse {
0%, 100% { box-shadow: var(--brain-glass-shadow); }
50% { box-shadow: 0 5px 22px rgba(185,140,255,.5); }
}

:root[data-theme="light"] .graph-timelapse-btn.playing {
color: var(--accent-ink); background: var(--accent-wash-2);
}
:root[data-theme="light"] .graph-timelapse-btn.playing { animation-name: tlPulseLight; }
@keyframes tlPulseLight {
0%, 100% { box-shadow: var(--brain-glass-shadow), 0 0 0 0 rgba(232,93,31,.30); }
50% { box-shadow: var(--brain-glass-shadow), 0 0 0 4px rgba(232,93,31,.20); }
}
.hud-center .concept-labels,
.hud-center .brain-stats {
transition: opacity .24s ease, visibility .24s ease, transform .24s ease;
}
.hud-center.brain-overlays-hidden .concept-labels,
.hud-center.brain-overlays-hidden .brain-stats {
opacity: 0; visibility: hidden; pointer-events: none;
}
.hud-center.brain-overlays-hidden .brain-eye-on { display: none; }
.hud-center.brain-overlays-hidden .brain-eye-off { display: block; }
.orb-overlay {
position: absolute; bottom: 92px; left: 0; right: 0;
text-align: center; pointer-events: none; z-index: 5;
}
.orb-state {
font-family: var(--font); font-size: var(--mm-fs-14); letter-spacing: 3px;
color: var(--text2); transition: color 0.3s;
}
.orb-state.listening { color: var(--accent); }
.orb-state.speaking { color: var(--accent2); }
.orb-state.thinking { color: var(--yellow); }

.orb-state.waiting { color: var(--accent2); }
.orb-state.paused { color: var(--yellow); }
.orb-state.reconnecting { color: var(--red); animation: orb-blink 1.2s ease-in-out infinite; }
.orb-state.error { color: var(--red); }
@keyframes orb-blink { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.orb-interim {
font-size: var(--mm-fs-16); color: var(--text); margin-top: 8px;
max-width: 600px; margin-left: auto; margin-right: auto; min-height: 20px;
text-shadow: var(--brain-halo);
}
.orb-graph-ctl {
position: absolute; top: 14px; right: 14px; z-index: 5;
display: flex; align-items: center; gap: 10px;
}
.graph-select {
background: var(--bg3); border: 1px solid var(--border);
color: var(--text); padding: 5px 8px; border-radius: var(--mm-r-chip); font-size: var(--mm-fs-14);
}
.graph-stats { font-size: var(--mm-fs-13); color: var(--text2); font-family: var(--font); white-space: nowrap; transition: color .25s, text-shadow .25s; }
.graph-stats.pulse { color: var(--accent2-ink); text-shadow: 0 0 10px rgba(160,120,255,.8); }

:root[data-theme="light"] .graph-stats.pulse { text-shadow: none; font-weight: 700; }
.graph-folder-btn {
background: var(--bg3); border: 1px solid var(--border); color: var(--text2);
width: 30px; height: 28px; border-radius: var(--mm-r-chip); cursor: pointer; font-size: var(--mm-fs-16);
}
.graph-folder-btn:hover { border-color: var(--accent); }


.brain-stats {
position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
z-index: 5; display: flex; align-items: stretch;
background: var(--brain-glass); border: 1px solid var(--border);
border-radius: var(--mm-r-btn); padding: 4px; backdrop-filter: blur(8px);
box-shadow: var(--brain-glass-shadow);
}
.bstat {
background: none; border: none; cursor: pointer;
display: flex; flex-direction: column; align-items: center;
padding: 8px 22px; border-radius: var(--mm-r-btn); transition: background 0.2s;
}
.bstat:hover { background: var(--accent2-wash); }
.bstat-num {
font-family: var(--font); font-size: var(--mm-fs-20); font-weight: 700;
color: var(--text); line-height: 1; transition: color 0.2s, text-shadow 0.2s;
}
.bstat:hover .bstat-num { color: var(--accent); text-shadow: 0 0 12px rgba(160,120,255,0.7); }
:root[data-theme="light"] .bstat:hover .bstat-num { color: var(--accent-ink); text-shadow: none; }
.bstat-lbl {
font-family: var(--font); font-size: var(--mm-fs-12); letter-spacing: 2px;
color: var(--text3); margin-top: 6px;
}
.bstat-num.bump { animation: bstatBump 0.6s ease; }
@keyframes bstatBump { 0% { transform: scale(1); } 40% { transform: scale(1.35); color: var(--accent); } 100% { transform: scale(1); } }
.bstat-sep { width: 1px; background: var(--border); margin: 9px 0; }


.beta-tag {
font-size: 8px; letter-spacing: 1px; background: linear-gradient(90deg,var(--accent),var(--accent2));
color: var(--on-accent); padding: 1px 6px; border-radius: var(--mm-r-chip); font-weight: 700; margin-left: 4px;
}
.loop-box {
background: var(--bg3); border: 1px solid var(--border); border-radius: var(--mm-r-btn);
padding: 12px; display: flex; flex-direction: column; gap: 9px;
}
.loop-desc { font-size: var(--mm-fs-13); color: var(--text3); line-height: 1.5; }
.loop-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--mm-fs-14); color: var(--text2); }
.loop-sel, .loop-num {
background: var(--field-bg); border: 1px solid var(--border); color: var(--text);
border-radius: var(--mm-r-chip); padding: 4px 6px; font-size: var(--mm-fs-14);
}
.loop-num { width: 64px; text-align: right; }
.loop-actions { display: flex; gap: 8px; }
.loop-btn {
flex: 1; background: var(--accent-solid); color: var(--on-accent); border: none; border-radius: var(--mm-r-chip);
padding: 7px; font-size: var(--mm-fs-14); cursor: pointer; font-weight: 600;
}
.loop-btn.ghost { background: none; border: 1px solid var(--border); color: var(--text2); }
.loop-btn:hover { filter: brightness(1.1); }
.loop-btn:disabled { opacity: .5; cursor: default; }
.loop-status { font-size: var(--mm-fs-13); color: var(--text3); font-family: var(--font); }
.loop-status.running { color: var(--yellow); }
.loop-status.on { color: var(--green); }
.loop-log { display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow-y: auto; }
.loop-log-item {
font-size: var(--mm-fs-13); color: var(--text2); background: var(--bg2); border: 1px solid var(--border);
border-radius: var(--mm-r-chip); padding: 7px 9px; line-height: 1.45; white-space: pre-wrap;
}
.loop-log-item .lli-time { color: var(--accent); font-family: var(--font); font-size: var(--mm-fs-12); }


.auto-hint { font-size: var(--mm-fs-13); color: var(--text3); line-height: 1.5; margin: 4px 0 12px; }


.loop-custom {
width: 100%; background: var(--field-bg); border: 1px solid var(--border); color: var(--text);
border-radius: var(--mm-r-chip); padding: 7px 9px; font-size: var(--mm-fs-14); resize: vertical; min-height: 48px; font-family: inherit;
}


.auth-modal { max-width: 360px; width: 90%; }
.auth-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.auth-body input {
background: var(--field-bg); border: 1px solid var(--border); color: var(--text);
border-radius: var(--mm-r-chip); padding: 10px 12px; font-size: var(--mm-fs-16);
}
.auth-pw { position: relative; display: flex; }
.auth-pw input { flex: 1; min-width: 0; padding-right: 44px; }
.auth-pw-eye {
position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
display: grid; place-items: center; width: 40px; height: 40px;
background: none; border: 0; border-radius: var(--mm-r-chip); color: var(--text3); cursor: pointer;
}
.auth-pw-eye:hover { color: var(--text); }
.auth-pw-eye[aria-pressed="true"] { color: var(--accent); }
.auth-pw-eye svg { width: 18px; height: 18px; }
.auth-err { color: var(--red); font-size: var(--mm-fs-14); min-height: 16px; }
.auth-help { font-size: var(--mm-fs-14); }
.auth-help span { color: var(--accent); cursor: pointer; text-decoration: underline; }
.auth-reset { font-size: var(--mm-fs-13); color: var(--text3); line-height: 1.6; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--mm-r-chip); padding: 8px 10px; }
.auth-reset-srv { margin-top: 6px; }
.auth-reset code { background: var(--surface-2); padding: 1px 4px; border-radius: 4px; }

.settings-modal {
background: var(--bg2); border: 1px solid var(--border); border-radius: var(--mm-r-field);
width: 92%; max-width: 520px; max-height: 86vh; display: flex; flex-direction: column; overflow: hidden;
}
.settings-body { padding: 14px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.set-sec { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--mm-r-btn); padding: 12px 14px; display: flex; flex-direction: column; gap: 7px; }
.set-sec h4 { margin: 0 0 4px; font-size: var(--mm-fs-16); color: var(--text); letter-spacing: .5px; }
.set-sec label { font-size: var(--mm-fs-13); color: var(--text2); }
.set-sec input, .set-sec select {
background: var(--field-bg); border: 1px solid var(--border); color: var(--text);
border-radius: var(--mm-r-chip); padding: 8px 10px; font-size: var(--mm-fs-16); width: 100%;
}
.set-note { font-size: var(--mm-fs-13); color: var(--text3); line-height: 1.5; }
.set-mini { background: none; border: 1px solid var(--border); color: var(--text2); border-radius: var(--mm-r-chip); font-size: var(--mm-fs-12); padding: 1px 7px; cursor: pointer; margin-left: 6px; }
.set-mini:hover { color: var(--accent); border-color: var(--accent); }
.set-actions { display: flex; gap: 8px; }
.settings-body .s-btn { align-self: flex-start; background: var(--accent-solid); color: var(--on-accent); border: none; border-radius: var(--mm-r-chip); padding: 7px 14px; font-size: var(--mm-fs-14); cursor: pointer; }
.settings-body .s-btn-ghost { background: none; border: 1px solid var(--border); color: var(--text2); border-radius: var(--mm-r-chip); padding: 7px 14px; font-size: var(--mm-fs-14); cursor: pointer; }


.md-table { border-collapse: collapse; margin: 6px 0; font-size: var(--mm-fs-14); width: 100%; }
.md-table th, .md-table td { border: 1px solid var(--border); padding: 4px 8px; text-align: left; }
.md-table th { background: var(--bg3); color: var(--text); }













.md-tablewrap, .jv-dataview .dv-tablewrap {
overflow-x: auto;
overscroll-behavior-x: contain;
-webkit-overflow-scrolling: touch;
max-width: 100%;
margin: 6px 0;
}
.md-tablewrap > .md-table, .jv-dataview .dv-tablewrap > .md-table {
margin: 0; width: max-content; min-width: 100%;
}
.md-tablewrap > .md-table :is(th, td), .jv-dataview .dv-tablewrap > .md-table :is(th, td) {
max-width: 34ch;
}




.md-tablewrap, .jv-dataview .dv-tablewrap { scrollbar-width: thin; }
.md-tablewrap::-webkit-scrollbar, .jv-dataview .dv-tablewrap::-webkit-scrollbar { height: 7px; }
.md-tablewrap::-webkit-scrollbar-thumb, .jv-dataview .dv-tablewrap::-webkit-scrollbar-thumb {
background: var(--border); border-radius: var(--mm-r-pill);
}





.code-block {
background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--mm-r-chip);
padding: 10px 12px; font-size: var(--mm-fs-14); overflow-x: auto; white-space: pre; margin: 6px 0;
font-family: ui-monospace, monospace; color: var(--code-ink);
}


input.md-cb { cursor: pointer; accent-color: var(--accent); margin-right: 6px; vertical-align: middle; }
li.task-item { list-style: none; margin-left: -16px; }
li.task-done > .dv-ttext, li.task-done { color: var(--text3); }
li.task-done > .dv-ttext { text-decoration: line-through; text-decoration-color: var(--text3); }


.jv-fm {
border: 1px solid var(--border); border-radius: var(--mm-r-btn); background: var(--bg2);
margin: 0 0 12px; overflow: hidden; user-select: none;
}
.jv-fm .jv-fm-head {
font-size: var(--mm-fs-12); letter-spacing: .4px; color: var(--text3); padding: 5px 12px 4px;
border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 6px;
}
.jv-fm .jv-fm-body {
margin: 0; padding: 8px 12px; font: 12.5px/1.6 ui-monospace, Menlo, Consolas, monospace;
color: var(--text2); white-space: pre-wrap; word-break: break-word; background: none;
}
.jv-dataview {
border: 1px solid var(--border); border-radius: var(--mm-r-btn); background: var(--bg2);
margin: 10px 0; overflow: hidden;
}
.jv-dataview .jv-dv-head {
display: flex; align-items: center; justify-content: space-between; gap: 8px;
font-size: var(--mm-fs-12); letter-spacing: .4px; color: var(--text3); padding: 5px 12px 4px;
border-bottom: 1px solid var(--border); user-select: none;
}
.jv-dataview .dv-add {
background: none; border: 1px solid var(--border); color: var(--text2);
border-radius: var(--mm-r-chip); font-size: var(--mm-fs-12); padding: 1px 8px; cursor: pointer; font-family: inherit;
}
.jv-dataview .dv-add:hover { color: var(--accent); border-color: var(--accent); }
.jv-dataview .dv-addform {
display: none; gap: 6px; align-items: center; padding: 7px 12px;
border-bottom: 1px solid var(--border); background: var(--bg3);
}
.jv-dataview .dv-addform.open { display: flex; }
.jv-dataview .dv-addform input {
background: var(--bg); border: 1px solid var(--border); color: var(--text);
border-radius: var(--mm-r-chip); padding: 4px 8px; font-size: var(--mm-fs-13); font-family: inherit;
}
.jv-dataview .dv-add-text { flex: 1; min-width: 0; }
.jv-dataview .dv-add-date { color-scheme: dark; }
.jv-dataview .dv-add-go {
background: var(--accent-solid); border: none; color: var(--on-accent); border-radius: var(--mm-r-chip);
padding: 4px 12px; font-size: var(--mm-fs-13); cursor: pointer; font-family: inherit;
}
.jv-dataview .jv-dv-body { padding: 8px 12px 10px; font-size: var(--mm-fs-14); }
.jv-dataview .jv-dv-wait { color: var(--text3); font-size: var(--mm-fs-13); }
.jv-dataview .dv-count { font-size: var(--mm-fs-12); color: var(--text3); margin-bottom: 6px; }
.jv-dataview .dv-warn { font-size: var(--mm-fs-12); color: var(--yellow); margin-bottom: 6px; }
.jv-dataview .dv-empty { color: var(--text3); font-size: var(--mm-fs-13); padding: 4px 0; }
.jv-dataview .dv-err { color: var(--red); font-size: var(--mm-fs-13); margin-bottom: 6px; }
.jv-dataview .dv-src { font-size: var(--mm-fs-13); color: var(--text3); background: var(--bg); border-radius: var(--mm-r-chip); padding: 8px 10px; overflow-x: auto; }
.jv-dataview .dv-group { margin: 6px 0 10px; }
.jv-dataview .dv-ghead { font-weight: 600; margin-bottom: 3px; }
.jv-dataview .dv-ghead a, .jv-dataview .dv-list a { color: var(--accent); text-decoration: none; }
.jv-dataview .dv-ghead a:hover, .jv-dataview .dv-list a:hover { text-decoration: underline; }
.jv-dataview ul.dv-tasks, .jv-dataview ul.dv-list { margin: 2px 0 2px 6px; padding-left: 12px; }
.jv-dataview li.dv-task { list-style: none; margin: 3px 0; line-height: 1.5; }
.jv-dataview li.dv-failed { outline: 1px solid var(--red); border-radius: var(--mm-r-chip); }
.jv-dataview .dv-badge { font-size: var(--mm-fs-12); color: var(--text3); background: var(--bg3); border-radius: var(--mm-r-chip); padding: 0 5px; margin-left: 4px; white-space: nowrap; }
.jv-dataview .dv-badge.dv-over { color: var(--on-accent); background: var(--red); }
.jv-dataview .dv-tablewrap { overflow-x: auto; }


.ts-pop {
position: fixed; z-index: 4000; min-width: 230px; max-width: 300px;
background: var(--bg2); border: 1px solid var(--border); border-radius: var(--mm-r-btn);
box-shadow: var(--shadow-3); padding: 4px; font-size: var(--mm-fs-14);
}
.ts-item {
display: flex; align-items: center; gap: 8px; padding: 6px 10px;
border-radius: var(--mm-r-chip); color: var(--text); cursor: pointer; user-select: none;
}
.ts-item.sel, .ts-item:hover { background: var(--bg3); }
.ts-ic { width: 20px; text-align: center; flex: none; }
.ts-date { margin-left: auto; color: var(--text3); font-size: var(--mm-fs-12); }


.ec-pop {
position: fixed; z-index: 4000; min-width: 250px; max-width: 320px;
max-height: 292px; overflow-y: auto;
background: var(--bg2); border: 1px solid var(--border); border-radius: var(--mm-r-btn);
box-shadow: var(--shadow-3); padding: 4px; font-size: var(--mm-fs-14);
}
.ec-item {
display: flex; align-items: center; gap: 9px; padding: 6px 10px;
border-radius: var(--mm-r-chip); color: var(--text); cursor: pointer; user-select: none;
}
.ec-item.sel, .ec-item:hover { background: var(--bg3); }

.ec-ic { width: 22px; flex: none; text-align: center; color: var(--text2); font-size: var(--mm-fs-12); }
.ec-lb { flex: 1 1 auto; min-width: 0; }
.ec-key {
flex: none; color: var(--text3); font-size: var(--mm-fs-12); letter-spacing: 0.4px;
border: 1px solid var(--border); border-radius: var(--mm-r-chip); padding: 1px 6px; white-space: nowrap;
}
.ts-pop .ts-datein {
width: 100%; box-sizing: border-box; background: var(--bg); border: 1px solid var(--border);
color: var(--text); border-radius: var(--mm-r-chip); padding: 6px 8px; font-size: var(--mm-fs-14);
font-family: inherit; color-scheme: dark;
}


.rs-verify { font-size: var(--mm-fs-13); color: var(--text3); margin-left: 6px; }
.rs-verify.ok { color: var(--green); }
.rs-verify.fail { color: var(--red); }
.rs-retry { font-size: var(--mm-fs-13); color: var(--yellow); margin: 4px 0; }
.rs-warn { font-size: var(--mm-fs-13); color: var(--red); margin-top: 4px; }




.modal-overlay {
position: fixed; inset: 0; background: var(--scrim); backdrop-filter: blur(6px);
z-index: 400; display: none; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }





#authOverlay { background: var(--bg); backdrop-filter: none; }
.folder-modal {
width: 560px; max-width: 90vw; max-height: 80vh; background: var(--bg2);
border: 1px solid var(--border); border-radius: var(--mm-r-field); display: flex; flex-direction: column;
box-shadow: var(--shadow-3);
}
.fm-head {
display: flex; align-items: center; justify-content: space-between;
padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: var(--mm-fs-16); font-weight: 600;
}
.fm-close { background: var(--bg3); border: 1px solid var(--border); color: var(--text2); width: 28px; height: 28px; border-radius: var(--mm-r-chip); cursor: pointer; }
.fm-close:hover { color: var(--accent); border-color: var(--accent); }
.fm-path {
padding: 8px 16px; font-family: var(--font); font-size: var(--mm-fs-13); color: var(--text2);
border-bottom: 1px solid var(--border); word-break: break-all; background: var(--bg);
}
.fm-list { flex: 1; overflow-y: auto; padding: 8px; min-height: 200px; }
.fm-list::-webkit-scrollbar { width: 5px; }
.fm-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.fm-row {
display: flex; align-items: center; justify-content: space-between; gap: 10px;
padding: 9px 12px; border-radius: var(--mm-r-chip); cursor: pointer; font-size: var(--mm-fs-16); transition: background 0.12s;
}
.fm-row:hover { background: var(--bg3); }
.fm-row .fm-name { display: flex; align-items: center; gap: 8px; color: var(--text); }
.fm-row .fm-md { font-size: var(--mm-fs-13); color: var(--text3); font-family: var(--font); }
.fm-row.up { color: var(--text2); font-style: italic; }
.fm-foot {
display: flex; align-items: center; justify-content: space-between; gap: 12px;
padding: 12px 16px; border-top: 1px solid var(--border);
}
.fm-hint { font-size: var(--mm-fs-14); color: var(--text2); }


.fm-hint-loi { color: var(--red); }



.fm-path .fp-go {
width: 100%; box-sizing: border-box; border: none; background: none; padding: 0;
color: var(--text); font-family: var(--font); font-size: var(--mm-fs-16); outline: none;
}
.fm-path .fp-go::placeholder { color: var(--text3); }
.fm-use {
background: var(--accent-solid); color: var(--on-accent); border: none; padding: 9px 18px;
border-radius: var(--mm-r-chip); font-size: var(--mm-fs-16); font-weight: 600; cursor: pointer;
}
.fm-use:hover { opacity: 0.88; }

.transcript {
flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;

min-height: clamp(280px, 46vh, 620px);
}
.transcript:empty::after {
content: "Nói hoặc gõ để bắt đầu hội thoại với MinMin.";
color: var(--text3); font-size: var(--mm-fs-14); font-style: italic;
}
.msg { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.msg-user { display: flex; flex-direction: column; align-items: flex-end; }
.msg-user .bubble {
background: var(--accent-wash-2); border: 1px solid var(--accent-line);
padding: 8px 12px; border-radius: var(--mm-r-btn) var(--mm-r-btn) 3px var(--mm-r-btn); max-width: 90%;
line-height: 1.55; font-size: var(--mm-fs-16); font-family: var(--font-chat);
}


.msg-javis .bubble {
background: var(--surface-1); border: 1px solid var(--hairline);
padding: 16px 18px; border-radius: 3px var(--mm-r-btn) var(--mm-r-btn) var(--mm-r-btn);
line-height: 1.75; font-size: var(--mm-fs-16); max-width: 72ch; font-family: var(--font-chat);
}
.msg-javis .bubble strong { color: var(--accent); font-weight: 600; }
.msg-javis .bubble code { font-family: var(--mono); font-size: var(--mm-fs-14); background: var(--surface-2); padding: 2px 5px; border-radius: 4px; color: var(--accent2-ink); }



.msg-javis .bubble, .msg-user .bubble { overflow-wrap: anywhere; }
.msg-javis .bubble a, .msg-user .bubble a { overflow-wrap: anywhere; word-break: break-word; }




.msg-javis .bubble code, .msg-user .bubble code { word-break: break-word; }
.msg-javis .bubble pre, .msg-javis .bubble .code-wrap { max-width: 100%; min-width: 0; }
.msg-javis .bubble { max-width: min(72ch, 100%); }




.msg-javis { display: block; }
.msg-javis .bubble { min-width: 0; }
.msg-acts { display: flex; align-items: center; gap: 2px; height: 22px; margin-top: 2px;
opacity: 0; transition: opacity 0.15s; }
.msg-user .msg-acts { justify-content: flex-end; }
.msg:hover .msg-acts, .msg.acts-on .msg-acts, .msg-acts:focus-within { opacity: 1; }
.msg-time { color: var(--text3); font-size: var(--mm-fs-12); margin-right: 4px; }
.msg-act { background: none; border: 1px solid transparent; color: var(--text3);
border-radius: var(--mm-r-chip); cursor: pointer; font-size: var(--mm-fs-13); line-height: 1; padding: 3px 6px; }
.msg-act:hover { color: var(--text-hi); border-color: var(--border); }

.transcript.busy .msg-act[data-act="rewind"] { opacity: 0.35; pointer-events: none; }


.code-wrap { position: relative; }
.code-copy { position: absolute; top: 6px; right: 6px; z-index: 2;
background: var(--field-bg); border: 1px solid var(--border); color: var(--text2);
border-radius: var(--mm-r-chip); padding: 2px 8px; font-size: var(--mm-fs-12); cursor: pointer;
opacity: 0; transition: opacity 0.15s; }
.code-wrap:hover .code-copy { opacity: 1; }
.code-copy:hover { color: var(--text-hi); border-color: var(--accent); }


.msg-user .bubble .utext { white-space: pre-wrap; word-break: break-word; }
.msg-user .bubble .utext.clamped { display: -webkit-box; -webkit-line-clamp: 10;
-webkit-box-orient: vertical; overflow: hidden; }
.clamp-more { display: block; margin-top: 5px; background: none; border: none;
color: var(--accent); font-size: var(--mm-fs-13); cursor: pointer; padding: 0; }
.clamp-more:hover { text-decoration: underline; }






#newMsgBtn { position: sticky; bottom: 6px; align-self: center; display: none; z-index: 3;
flex: none; align-items: center; justify-content: center; gap: 5px;
background: var(--panel-solid); border: 1px solid var(--text3); color: var(--text);
width: 32px; height: 32px; padding: 0; border-radius: 50%;

font-size: var(--mm-fs-13); cursor: pointer; box-shadow: var(--shadow-2);
transition: color 0.15s, border-color 0.15s, background 0.15s; }
#newMsgBtn.has-new { width: auto; height: auto; padding: 5px 14px; border-radius: var(--mm-r-field);
border-color: var(--accent); color: var(--accent); }
#newMsgBtn.show { display: inline-flex; }
#newMsgBtn:hover { background: var(--accent-wash-2); color: var(--accent); border-color: var(--accent); }




.older-seed { flex: none; display: flex; justify-content: center; padding: 6px 0 12px; }
.older-btn { background: none; border: 1px solid var(--hairline); color: var(--text3);
border-radius: var(--mm-r-field); padding: 4px 14px; font-size: var(--mm-fs-13); cursor: pointer;
transition: color 0.15s, border-color 0.15s; }
.older-btn:hover { color: var(--text); border-color: var(--text3); }
.older-btn:disabled { cursor: default; opacity: 0.7; }








#chatMarks { position: sticky; top: 0; height: 0; z-index: 4; flex: none;
align-self: flex-end; width: 0; overflow: visible; }





.cm-ray { position: absolute; top: 0; right: 0; width: 20px;
display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
gap: calc(var(--cm-cach, 11px) - 2px); pointer-events: auto; }



.transcript.cm-co-thanh { padding-right: 22px; }



.transcript.cm-dang-chon .cm-ray, .transcript.cm-dang-chon .cm-hop { pointer-events: none; }
.cm-vach { flex: none; width: 13px; height: 2px; padding: 0; border: 0; border-radius: 2px;
background: var(--text3); opacity: .38; cursor: pointer;
transition: width .14s, opacity .14s, background .14s; }
.cm-vach:hover { width: 20px; opacity: .85; }


.cm-vach.active { width: 20px; opacity: 1; background: var(--accent); }
#chatMarks:hover .cm-vach { opacity: .62; }
#chatMarks:hover .cm-vach.active { opacity: 1; }








.cm-hop { position: absolute; top: 50%; right: 100%; transform: translateY(-50%); z-index: 5;
display: flex; flex-direction: column; gap: 1px; padding: 6px;
width: min(320px, 52vw); max-height: min(420px, calc(100% - 16px)); overflow-y: auto;
background: var(--panel-solid); border: 1px solid var(--border); border-radius: var(--mm-r-btn);
box-shadow: var(--shadow-2); }
.cm-hop[hidden] { display: none; }








.cm-muc { flex: none; text-align: left; padding: 6px 9px; border: 0; border-radius: var(--mm-r-chip);
cursor: pointer;
background: transparent; color: var(--text2); font-family: var(--font); font-size: var(--mm-fs-13);
line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-muc:hover { background: var(--surface-2); color: var(--text); }
.cm-muc.active { background: var(--accent-wash-2); color: var(--text); font-weight: 600; }



.msg-user.cm-vua-nhay .bubble { animation: cmNhay 1.2s ease; }
@keyframes cmNhay {
0%, 100% { box-shadow: 0 0 0 0 transparent; }
22% { box-shadow: 0 0 0 3px var(--accent-line); }
}





.cm-nut { position: absolute; top: 8px; right: 8px; display: none;
align-items: center; gap: 5px; padding: 5px 10px 5px 8px; border-radius: var(--mm-r-field);
background: var(--panel-solid); border: 1px solid var(--border); color: var(--text2);
font-family: var(--font); font-size: var(--mm-fs-12); line-height: 1; cursor: pointer;
box-shadow: var(--shadow-1); opacity: .9; }


.cm-nut-ic { width: 12px; height: 9px; flex: none;
border-top: 2px solid currentColor; border-bottom: 2px solid currentColor;
position: relative; }
.cm-nut-ic::after { content: ""; position: absolute; left: 0; right: 0; top: 3px;
border-top: 2px solid currentColor; }
.cm-nut-so { font-variant-numeric: tabular-nums; }
.cm-nut:active { background: var(--surface-2); }


.cm-tam-lop { position: fixed; inset: 0; z-index: 120; background: var(--scrim);
display: flex; align-items: flex-end; }
.cm-tam { width: 100%; max-height: 68vh; display: flex; flex-direction: column;
background: var(--panel-solid); border-top-left-radius: var(--mm-r-card); border-top-right-radius: var(--mm-r-card);
box-shadow: 0 -8px 40px var(--shadow-veil); animation: cmTruot .18s ease-out; }
@keyframes cmTruot { from { transform: translateY(18px); opacity: .6; } to { transform: none; opacity: 1; } }
.cm-tam-dau { display: flex; align-items: center; justify-content: space-between;
padding: 14px 16px 10px; font-family: var(--font); font-size: var(--mm-fs-16); color: var(--text);
border-bottom: 1px solid var(--border); flex: none; }
.cm-tam-dong { background: none; border: 0; color: var(--text3); font-size: var(--mm-fs-16);
padding: 4px 8px; cursor: pointer; }

.cm-tam-ds { overflow-y: auto; padding: 6px 8px calc(10px + env(safe-area-inset-bottom, 0px)); }


.cm-tam .cm-muc { width: 100%; min-height: 44px; padding: 11px 12px; border-radius: var(--mm-r-btn);
font-size: var(--mm-fs-14); white-space: normal; text-overflow: clip;
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cm-so { color: var(--text3); font-variant-numeric: tabular-nums; margin-right: 8px; }
.cm-tam .cm-muc.active .cm-so { color: var(--accent); }

#chatMarks .cm-so { display: none; }




.panel-acts > #chatMarks, .chatpage-bar > #chatMarks {
position: static; height: auto; width: auto; align-self: auto; display: inline-flex; }
.panel-acts > #chatMarks .cm-nut, .chatpage-bar > #chatMarks .cm-nut {
position: static; box-shadow: none; opacity: 1; padding: 3px 8px 3px 7px; font-size: var(--mm-fs-12); }

@media (max-width: 860px) {
.cm-ray { display: none; }
.cm-nut { display: inline-flex; }
}
@media (min-width: 861px) { .cm-tam-lop { display: none; } }
@media (prefers-reduced-motion: reduce) {
.msg-user.cm-vua-nhay .bubble { animation: none; }
}



.msg-activity .act-bubble {
display: inline-flex; align-items: center; gap: 9px;
background: var(--accent2-wash); border: 1px solid var(--accent2-line);
border-radius: 3px var(--mm-r-btn) var(--mm-r-btn) var(--mm-r-btn); padding: 8px 12px;
font-size: var(--mm-fs-13); color: var(--accent2-ink); font-family: var(--font);
animation: actGlow 2.2s ease-in-out infinite;
}
.act-dots { display: inline-flex; gap: 3px; align-items: center; }
.act-dots i {
width: 5px; height: 5px; border-radius: 50%; background: var(--accent2); opacity: 0.35;
animation: actDot 1.2s ease-in-out infinite;
}
.act-dots i:nth-child(2) { animation-delay: 0.18s; }
.act-dots i:nth-child(3) { animation-delay: 0.36s; }
@keyframes actDot { 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes actGlow { 50% { border-color: var(--accent2); box-shadow: 0 0 14px var(--accent2-wash); } }
.act-time { color: var(--text3); font-size: var(--mm-fs-12); font-variant-numeric: tabular-nums; }


.msg-steps {
font-family: var(--font); font-size: var(--mm-fs-13); color: var(--text3);
margin: 2px 0 4px; max-width: 100%;
}
.steps-sum {
display: inline-flex; align-items: center; gap: 6px;
background: none; border: 0; padding: 3px 2px; cursor: pointer;
color: var(--text3); font: inherit; text-align: left;
}
.steps-sum:hover { color: var(--text2); }
.steps-sum svg { width: 13px; height: 13px; transition: transform 0.15s ease; }
.msg-steps.steps-fold .steps-sum svg { transform: rotate(-90deg); }
.msg-steps.steps-fold .steps-list { display: none; }
.steps-list {
border-left: 2px solid var(--line); margin-left: 7px; padding: 2px 0 2px 11px;
display: flex; flex-direction: column; gap: 3px;
}
.steps-list .step {
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}


.steps-sum { max-width: 100%; min-width: 0; }
.steps-sum-text { flex-shrink: 0; }
.steps-sum-now {
min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; opacity: 0.85;
}
.steps-sum-now:not(:empty)::before { content: "· "; }

.steps-list .step-live { color: var(--text2); }



.msg-ghichu {
text-align: center; color: var(--text3); font-size: var(--mm-fs-12); font-family: var(--font);
padding: 2px 12px; opacity: 0.85;
}

.msg-ghichu.msg-doiduong { font-size: var(--mm-fs-14); color: var(--mm-muted); opacity: 1; padding: var(--mm-sp-1) var(--mm-sp-3); }
@keyframes spin { to { transform: rotate(360deg); } }

.mem-count {
background: var(--accent2-wash-2); color: var(--accent2-ink); border: 1px solid var(--accent2-line);
border-radius: var(--mm-r-btn); padding: 1px 8px; font-size: var(--mm-fs-12); font-weight: 700;
}
.mem-box { display: flex; flex-direction: column; gap: 8px; }
.mem-desc { font-size: var(--mm-fs-13); color: var(--text3); line-height: 1.5; }
.learn-btn {
background: var(--accent2-wash); border: 1px solid var(--accent2-line); color: var(--accent2-ink);
padding: 8px 10px; border-radius: var(--mm-r-chip); font-size: var(--mm-fs-14); font-weight: 600; cursor: pointer;
transition: all 0.2s;
}
.learn-btn:hover { background: var(--accent2-wash-2); }
.learn-btn:disabled { opacity: 0.6; cursor: wait; }
.mem-result { font-size: var(--mm-fs-13); color: var(--text2); line-height: 1.5; white-space: pre-wrap; }
.auto-learn { display: flex; align-items: center; gap: 7px; font-size: var(--mm-fs-13); color: var(--text2); cursor: pointer; }
.auto-learn input { accent-color: var(--accent2); }




.voice-focus-resume {
position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
max-width: calc(100% - 16px); padding: 7px 12px; border-radius: var(--mm-r-field);
border: 1px solid var(--accent-line); background: var(--bg2); color: var(--text);
font: inherit; font-size: var(--mm-fs-12); cursor: pointer; z-index: 2;
}
.voice-focus-resume[hidden] { display: none; }
.hud-voice {
position: relative;


display: flex; align-items: flex-end; gap: 12px;
margin: 4px 16px 16px; padding: 8px 12px;
border: 1px solid var(--border); border-radius: var(--mm-r-card); background: var(--bg2);
}
.mic-big {
background: var(--bg3); border: 1px solid var(--border); color: var(--text2);
width: 46px; height: 46px; border-radius: 50%; cursor: pointer; flex-shrink: 0;
display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.mic-big:hover { border-color: var(--accent); color: var(--accent); }
.mic-big.recording {
border-color: var(--red); color: var(--red);
box-shadow: 0 0 0 4px var(--danger-wash); animation: micpulse 1.2s ease-in-out infinite;
}
@keyframes micpulse { 50% { box-shadow: 0 0 0 10px rgba(239,68,68,0); } }
.mic-big.focus-waiting { animation: none; opacity: .65; }

.mic-big.handsfree {
border-color: var(--accent); color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-line), 0 0 18px rgba(255,107,43,0.35);
}
.mic-big.handsfree.recording {
border-color: var(--accent); color: var(--accent);
box-shadow: 0 0 0 4px var(--accent-line);
animation: micpulse-hf 1.2s ease-in-out infinite;
}
@keyframes micpulse-hf { 50% { box-shadow: 0 0 0 11px rgba(255,107,43,0); } }
.voice-input {
flex: 1; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--mm-r-btn);
color: var(--text); font-size: var(--mm-fs-16); padding: 11px 14px; resize: none; outline: none;



line-height: 1.4; max-height: 45vh; font-family: var(--font-chat);
}
.voice-input:focus { border-color: var(--accent-line); }
.voice-input::placeholder { color: var(--text3); }
.send-btn {
background: var(--accent-solid); border: none; color: var(--on-accent); width: 44px; height: 44px;
border-radius: var(--mm-r-btn); cursor: pointer; flex-shrink: 0;
display: flex; align-items: center; justify-content: center; transition: opacity 0.2s;
}
.send-btn:hover { opacity: 0.85; }
.send-btn:disabled { opacity: 0.4; cursor: not-allowed; }


@media (max-width: 860px) {
.hud-voice {
margin: 6px 10px 8px; padding: 5px 6px 5px 8px; gap: 4px;
border: 1px solid var(--border); border-radius: var(--mm-r-card); background: var(--bg2);
align-items: flex-end;
}
.hud-voice .attach-btn { order: 1; width: 34px; height: 34px; border: none; background: transparent; }
.hud-voice .voice-input {
order: 2; border: none; background: transparent; border-radius: 0;
min-height: 36px; max-height: 40vh; padding: 8px 4px; font-size: var(--mm-fs-16);
}
.hud-voice .voice-input:focus { border: none; }
.hud-voice .mic-big { order: 3; width: 34px; height: 34px; border: none; background: transparent; }
.hud-voice .stop-btn, .hud-voice .send-btn { order: 4; width: 36px; height: 36px; border-radius: 50%; }
}

.stop-btn {
background: var(--red); border: none; color: white; width: 44px; height: 44px;
border-radius: var(--mm-r-btn); cursor: pointer; flex-shrink: 0;
display: flex; align-items: center; justify-content: center; transition: opacity 0.2s;
animation: stoppulse 1.3s ease-in-out infinite;
}
.stop-btn:hover { opacity: 0.85; }
@keyframes stoppulse { 50% { box-shadow: 0 0 0 5px var(--danger-wash); } }

.attach-btn {
background: var(--bg3); border: 1px solid var(--border); color: var(--text2);
width: 40px; height: 40px; border-radius: var(--mm-r-btn); cursor: pointer; flex-shrink: 0;
display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.attach-btn:hover { border-color: var(--accent); color: var(--accent); }









.bg-strip {
margin: 0 20px 8px; padding: 8px 12px; border-radius: var(--mm-r-btn);
border: 1px solid var(--border); background: var(--bg3);
font-size: var(--mm-fs-16); color: var(--text2); max-height: 150px; overflow-y: auto;



flex: none;
}
.bg-strip[hidden] { display: none; }
.bg-run { border-color: var(--ok-line); background: var(--ok-wash); }
.bg-stall { border-color: var(--warn-line); background: var(--warn-wash); }
.bg-head { display: flex; align-items: center; gap: 8px; }
.bg-title { font-weight: 600; color: var(--text); flex: 1 1 auto; min-width: 0; }
.bg-open {
flex: none; background: none; border: 1px solid var(--border); color: var(--text2);
border-radius: var(--mm-r-chip); padding: 5px 10px; font-size: var(--mm-fs-16); cursor: pointer; font-family: inherit;
min-height: 34px;
}
.bg-open:hover { color: var(--accent); border-color: var(--accent); }
.bg-dot {
flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--text2);
}
.bg-run .bg-dot { background: var(--green, #3fb27f); animation: bgPulse 1.4s ease-in-out infinite; }
.bg-stall .bg-dot { background: var(--warn-ink); }
@keyframes bgPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.bg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.bg-chip {
display: inline-flex; align-items: baseline; gap: 5px; max-width: 320px;
padding: 3px 8px; border-radius: var(--mm-r-pill); border: 1px solid var(--border);
background: var(--bg); font-size: var(--mm-fs-16);
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bg-chip b { font-weight: 600; color: var(--text2); font-size: var(--mm-fs-14); }
.bg-chip i { font-style: normal; color: var(--text2); opacity: 0.8; font-size: var(--mm-fs-14); }
.bg-chip.mine { border-color: var(--accent); }
.bg-chip.on b { color: var(--green, #3fb27f); }
.bg-warn { margin-top: 7px; color: var(--warn-ink); line-height: 1.45; }
@media (max-width: 860px) {
.bg-strip { margin: 0 12px 6px; max-height: 128px; }
}



.bg-strip { padding: 4px 10px; font-size: var(--mm-fs-13); border-radius: var(--mm-r-btn); margin-bottom: 6px; max-height: 84px; }
.bg-strip.bg-run, .bg-strip.bg-stall { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.bg-strip.bg-stall { flex-wrap: wrap; }
.bg-strip[hidden] { display: none; }
.bg-strip .bg-head { display: contents; }
.bg-strip .bg-title { flex: none; font-size: var(--mm-fs-13); }
.bg-strip .bg-chips { order: 2; flex: 1 1 0; min-width: 0; margin-top: 0; flex-wrap: nowrap; overflow: hidden; gap: 5px; }
.bg-strip .bg-chip { font-size: var(--mm-fs-12); padding: 1px 7px; max-width: 240px; flex: 0 1 auto; min-width: 0; }
.bg-strip .bg-chip b, .bg-strip .bg-chip i { font-size: var(--mm-fs-12); }
.bg-strip .bg-open { order: 3; padding: 2px 9px; font-size: var(--mm-fs-12); min-height: 24px; }
.bg-strip .bg-warn { order: 4; flex-basis: 100%; margin-top: 2px; font-size: var(--mm-fs-13); }
@media (max-width: 860px) { .bg-strip { margin: 0 12px 6px; max-height: 84px; } }



.attach-bar {
display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px;
max-height: 0; overflow: hidden; transition: max-height 0.2s, padding 0.2s;
}




.attach-bar.has-items {
max-height: 140px; padding: 8px 20px;
overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
}
.attach-chip {
display: flex; align-items: center; gap: 8px; background: var(--bg3);
border: 1px solid var(--border); border-radius: var(--mm-r-btn); padding: 6px 8px 6px 6px;
font-size: var(--mm-fs-14); max-width: 240px;
}
.attach-chip img {
width: 34px; height: 34px; object-fit: cover; border-radius: var(--mm-r-chip); flex-shrink: 0;
}
.attach-chip .chip-ico {
width: 34px; height: 34px; border-radius: var(--mm-r-chip); background: var(--bg);
display: flex; align-items: center; justify-content: center; font-size: var(--mm-fs-16); flex-shrink: 0;
}
.attach-chip .chip-info { display: flex; flex-direction: column; min-width: 0; }
.attach-chip .chip-name { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach-chip .chip-meta { color: var(--text3); font-size: var(--mm-fs-12); font-family: var(--font); }
.attach-chip .chip-x {
background: none; border: none; color: var(--text3); cursor: pointer; font-size: var(--mm-fs-16);
padding: 0 2px; flex-shrink: 0;
}
.attach-chip .chip-x:hover { color: var(--red); }
.attach-chip.uploading { opacity: 0.6; }

.attach-chip.loi { border-color: var(--red); }
.attach-chip.loi .chip-meta { color: var(--red); }
.attach-chip .chip-retry {
background: none; border: none; color: var(--accent, var(--text2)); cursor: pointer;
font-size: var(--mm-fs-16); padding: 4px; flex-shrink: 0; min-width: 32px; min-height: 32px;
}
.attach-chip .chip-retry:hover { color: var(--text); }

.attach-bar .attach-note { flex-basis: 100%; font-size: var(--mm-fs-13); color: var(--warn-ink, #b45309); }


.attach-chip.pinned {
background: var(--accent-wash-2); border-color: var(--accent-line); max-width: 300px;
}
.attach-chip.pinned .chip-ico { background: var(--bg2); color: var(--accent); }
.attach-chip.pinned .chip-name { font-weight: 600; }
.attach-chip.pinned .chip-meta { color: var(--accent-ink); }


.attach-chip.pinned { cursor: pointer; }
.attach-chip.pinned:hover { border-color: var(--accent); }
.attach-chip.pinned:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.attach-chip.pinned .chip-edit {
display: flex; align-items: center; color: var(--text3); flex-shrink: 0; font-size: var(--mm-fs-14);
}
.attach-chip.pinned:hover .chip-edit { color: var(--accent); }


.vault-banner {
position: fixed; top: 62px; left: 50%; transform: translateX(-50%);
display: none; align-items: center; gap: 12px; z-index: 350;
background: var(--bg2); border: 1px solid var(--yellow); border-radius: var(--mm-r-btn);
padding: 10px 14px; box-shadow: var(--shadow-2); max-width: 90vw;
}
.vault-banner.show { display: flex; animation: fadeIn 0.25s ease; }
.vb-icon { color: var(--yellow); font-size: var(--mm-fs-16); }
.vb-text { font-size: var(--mm-fs-16); color: var(--text); }
.vb-init {
background: var(--yellow); color: var(--on-accent); border: none; padding: 6px 14px;
border-radius: var(--mm-r-chip); font-size: var(--mm-fs-14); font-weight: 700; cursor: pointer; white-space: nowrap;
}
.vb-init:hover { opacity: 0.88; }
.vb-init:disabled { opacity: 0.6; cursor: wait; }
.vb-close { background: none; border: none; color: var(--text3); cursor: pointer; font-size: var(--mm-fs-16); }
.vb-close:hover { color: var(--text); }


.drop-overlay {
position: fixed; inset: 0; z-index: 500; display: none;
align-items: center; justify-content: center;
background: var(--accent-wash); backdrop-filter: blur(3px);
border: 3px dashed var(--accent); border-radius: var(--mm-r-btn);
}
.drop-overlay.show { display: flex; }
.drop-overlay .drop-msg {
font-size: var(--mm-fs-20); color: var(--accent); font-weight: 600;
background: var(--bg2); padding: 20px 32px; border-radius: var(--mm-r-btn); border: 1px solid var(--accent);
}


.msg-attach { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.msg-attach img { max-width: 160px; max-height: 120px; border-radius: var(--mm-r-chip); border: 1px solid var(--border); }
.msg-attach .att-img { display: block; line-height: 0; cursor: zoom-in; }
.msg-attach .file-tag {
font-size: var(--mm-fs-13); background: var(--bg); border: 1px solid var(--border);
border-radius: var(--mm-r-chip); padding: 4px 8px; font-family: var(--font); color: var(--text2);
}


.msg-attach .att-mat {
display: inline-flex; align-items: center; gap: 6px; max-width: 260px;
padding: 8px 10px; border-radius: var(--mm-r-chip); border: 1px dashed var(--border);
background: var(--bg); color: var(--text2); font-size: var(--mm-fs-12); line-height: 1.35;
}
.msg-attach .att-mat svg { width: 18px; height: 18px; flex: none; opacity: .5; }
.msg-attach .att-mat-ten {
font-family: var(--font); max-width: 120px; overflow: hidden;
text-overflow: ellipsis; white-space: nowrap;
}
.msg-attach .att-mat-note { opacity: .75; }
.attach-chip .chip-thumb { display: block; line-height: 0; cursor: zoom-in; }




.popover-label { font-family: var(--font); font-size: var(--mm-fs-12); letter-spacing: 2px; color: var(--text3); margin-bottom: 8px; }


.studio-open-btn {
background: var(--accent2-wash); border: 1px solid var(--accent2-line); color: var(--accent2-ink);
padding: 6px 14px; border-radius: var(--mm-r-chip); font-size: var(--mm-fs-14); font-weight: 700; cursor: pointer; margin-right: 8px;
}
.studio-open-btn:hover { background: var(--accent2-wash-2); }
.studio {
position: fixed; inset: 0; z-index: 420; background: var(--bg); display: none; flex-direction: column;
}
.studio.open { display: flex; animation: fadeIn 0.2s ease; }
.studio-head {
display: flex; align-items: center; gap: 20px; padding: 0 20px; height: 54px;
border-bottom: 1px solid var(--border); background: var(--bg2);
}
.studio-title { font-family: var(--font); font-weight: 700; letter-spacing: 2px; color: var(--accent2); }
.studio-tabs { display: flex; gap: 6px; flex: 1; }
.stab {
background: none; border: 1px solid transparent; color: var(--text2); padding: 7px 16px;
border-radius: var(--mm-r-chip); cursor: pointer; font-size: var(--mm-fs-16); font-weight: 600;
}
.stab:hover { color: var(--text); }
.stab.active { background: var(--bg3); border-color: var(--border); color: var(--accent2); }
.studio-close { background: var(--bg3); border: 1px solid var(--border); color: var(--text2); width: 32px; height: 32px; border-radius: var(--mm-r-chip); cursor: pointer; }
.studio-close:hover { color: var(--accent); border-color: var(--accent); }
.studio-body { flex: 1; overflow-y: auto; padding: 20px; }
.stab-panel { max-width: 1000px; margin: 0 auto; }
.panel-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-bar h3 { font-size: var(--mm-fs-16); color: var(--text); }
.pb-actions { display: flex; gap: 8px; }
.s-btn { background: var(--accent2); color: var(--on-accent); border: none; padding: 8px 16px; border-radius: var(--mm-r-chip); font-size: var(--mm-fs-16); font-weight: 600; cursor: pointer; }
.s-btn:hover { opacity: 0.88; }
.s-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.s-btn-ghost { background: var(--bg3); color: var(--text2); border: 1px solid var(--border); padding: 7px 14px; border-radius: var(--mm-r-chip); font-size: var(--mm-fs-14); cursor: pointer; }
.s-btn-ghost:hover { color: var(--text); border-color: var(--accent2); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.empty { color: var(--text3); font-size: var(--mm-fs-16); padding: 30px; text-align: center; grid-column: 1/-1; line-height: 1.7; }
.dim { color: var(--text3); font-size: var(--mm-fs-13); }



.wf-list { display: flex; flex-direction: column; gap: 14px; }
.wf-row { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--mm-r-btn); padding: 14px; transition: border-color 0.3s; }
.wf-row.archived { opacity: 0.5; }
.wf-row.running { border-color: var(--accent); }


.wf-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--mm-r-btn); padding: 14px; transition: border-color 0.3s; }
.wf-card.archived { opacity: 0.5; }



.rm-mq { color: var(--text3); }
.rm-mq.on {
color: var(--red); font-weight: 600;
border: 1px solid rgba(224, 102, 74, .45); border-radius: var(--mm-r-pill); padding: 0 6px;
}
.wf-card.running { border-color: var(--accent); }
.wf-header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.wf-spacer { flex: 1; min-width: 8px; }
.wf-count { font-size: var(--mm-fs-12); color: var(--text3); font-family: var(--font); white-space: nowrap; }
.wf-name { font-size: var(--mm-fs-16); font-weight: 600; color: var(--text); }
.wf-badge { font-size: var(--mm-fs-12); padding: 3px 9px; border-radius: var(--mm-r-card); font-family: var(--font); white-space: nowrap; }
.wf-badge.ready { background: var(--ok-wash); color: var(--green); }
.wf-badge.off { background: var(--bg3); color: var(--text3); }
.wf-badge.running { background: var(--accent2-wash); color: var(--accent); }
.wf-desc { font-size: var(--mm-fs-14); color: var(--text2); margin-bottom: 10px; line-height: 1.5; }




.wf-pipeline { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin: 10px 0 0; }
.wf-pstep { min-width: 0; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--mm-r-chip); padding: 8px; text-align: left; transition: border-color 0.3s, background 0.3s; }
.wf-pstep.active { border-color: var(--accent); background: var(--accent2-wash); animation: wf-pulse 1.3s ease-in-out infinite; }
.wf-pstep.done { border-color: var(--green); background: var(--ok-wash); }
.wps-num { font-size: var(--mm-fs-12); color: var(--text3); font-family: var(--font); margin-bottom: 3px; letter-spacing: 0.05em; }
.wf-pstep.done .wps-num { color: var(--green); }
.wf-pstep.done .wps-num::before {
content: ""; display: inline-block; width: 1em; height: 1em; margin-right: .2em;
vertical-align: -0.14em; background-color: currentColor;
-webkit-mask: var(--ic-check) center/contain no-repeat;
mask: var(--ic-check) center/contain no-repeat;
}
.wf-pstep.active .wps-num { color: var(--accent); }



.wps-task { font-size: var(--mm-fs-13); color: var(--text); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.wps-name { font-size: var(--mm-fs-12); color: var(--text3); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.s-btn.run { background: var(--accent-solid); padding: 6px 12px; font-size: var(--mm-fs-14); }
@keyframes wf-pulse {
0%, 100% { box-shadow: 0 0 0 0 rgba(168,139,250,0); }
50% { box-shadow: 0 0 0 5px var(--accent2-wash-2); }
}


.toggle { position: relative; display: inline-block; width: 38px; height: 21px; cursor: pointer; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--mm-r-card); transition: 0.2s; }
.toggle span::before { content: ""; position: absolute; width: 15px; height: 15px; left: 2px; top: 2px; background: var(--text3); border-radius: 50%; transition: 0.2s; }
.toggle input:checked + span { background: var(--ok-line); border-color: var(--green); }
.toggle input:checked + span::before { transform: translateX(17px); background: var(--green); }


.ag-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--mm-r-btn); padding: 14px; }
.ag-name { font-size: var(--mm-fs-16); font-weight: 600; color: var(--text); }
.ag-model { font-size: var(--mm-fs-12); color: var(--text3); font-family: var(--font); border: 1px solid var(--border); padding: 1px 5px; border-radius: var(--mm-r-chip); }
.ag-role { font-size: var(--mm-fs-14); color: var(--text2); margin: 6px 0 8px; line-height: 1.5; }
.ag-skills { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.chip-skill { font-size: var(--mm-fs-12); background: var(--accent2-wash); border: 1px solid var(--accent2-line); color: var(--accent2-ink); padding: 2px 7px; border-radius: var(--mm-r-chip); font-family: var(--font); }


.sk-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--mm-r-btn); padding: 14px; }
.sk-name { font-size: var(--mm-fs-16); font-weight: 600; color: var(--text); }
.sk-desc { font-size: var(--mm-fs-14); color: var(--text2); margin: 6px 0; line-height: 1.5; }
.sk-src { font-size: var(--mm-fs-12); color: var(--text3); font-family: var(--font); }


.run-drawer {
position: absolute; top: 54px; right: 0; bottom: 0; width: 460px; max-width: 90vw;
background: var(--bg2); border-left: 1px solid var(--border); display: none; flex-direction: column;
box-shadow: -12px 0 30px var(--shadow-veil);
}
.run-drawer.open { display: flex; animation: fadeIn 0.2s ease; }
.run-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: var(--mm-fs-16); }
.run-close { background: var(--bg3); border: 1px solid var(--border); color: var(--text2); width: 28px; height: 28px; border-radius: var(--mm-r-chip); cursor: pointer; }
.run-steps { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.run-info { font-size: var(--mm-fs-14); color: var(--text3); font-family: var(--font); text-align: center; }
.run-info.done { color: var(--green); }
.run-step { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--mm-r-btn); padding: 10px 12px; }
.run-step.done { border-color: var(--ok-line); }
.rs-head { display: flex; align-items: center; gap: 8px; font-size: var(--mm-fs-14); }
.rs-num { background: var(--accent2); color: var(--on-accent); width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: var(--mm-fs-12); font-weight: 700; }
.rs-agent { font-weight: 600; color: var(--text); }
.rs-tool { font-size: var(--mm-fs-12); color: var(--accent2-ink); font-family: var(--font); }
.rs-ok { color: var(--green); }

.rs-fail { color: var(--red); display: inline-flex; align-items: center; }
.rs-spin { width: 10px; height: 10px; border: 1.5px solid var(--accent2-line); border-top-color: var(--accent2); border-radius: 50%; animation: spin 0.7s linear infinite; }
.rs-task { font-size: var(--mm-fs-13); color: var(--text2); margin: 6px 0; font-style: italic; }
.rs-out { font-size: var(--mm-fs-14); color: var(--text); line-height: 1.55; white-space: pre-wrap; max-height: 240px; overflow-y: auto; }
.rs-err { color: var(--red); font-size: var(--mm-fs-13); }


.studio-editor { position: fixed; inset: 0; z-index: 440; background: var(--scrim); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; }
.studio-editor.open { display: flex; animation: fadeIn 0.15s ease; }
.editor-box { width: 560px; max-width: 92vw; max-height: 86vh; overflow-y: auto; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--mm-r-field); padding: 20px; }
.editor-box h3 { font-size: var(--mm-fs-16); margin-bottom: 14px; color: var(--text); }
.editor-box label { display: block; font-size: var(--mm-fs-13); color: var(--text2); margin: 12px 0 5px; font-weight: 600; }
.editor-box input, .editor-box textarea, .editor-box select {
width: 100%; background: var(--bg3); border: 1px solid var(--border); color: var(--text);
padding: 9px 11px; border-radius: var(--mm-r-chip); font-size: var(--mm-fs-16); font-family: inherit; outline: none;
}
.editor-box input:focus, .editor-box textarea:focus { border-color: var(--accent2); }
.editor-box textarea { resize: vertical; }


.step-row { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--mm-r-btn); padding: 12px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 8px; }
.step-row:not(.open) { padding: 8px 10px; }
.step-row.open { border-color: var(--accent2); background: var(--accent2-wash); }
.step-row:not(.open) .step-header { cursor: pointer; }
.step-row:not(.open) .step-header:hover .step-sum { color: var(--text); }
.step-row:not(.open) .st-agent, .step-row:not(.open) .step-body { display: none; }
.step-row.open .step-sum { display: none; }
.step-body { display: flex; flex-direction: column; gap: 8px; }
.step-sum { flex: 1; min-width: 0; font-size: var(--mm-fs-13); color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-move { background: none; border: 1px solid var(--border); color: var(--text3); border-radius: var(--mm-r-chip); cursor: pointer; height: 28px; width: 24px; flex-shrink: 0; font-size: var(--mm-fs-12); line-height: 1; }
.st-move:hover:not(:disabled) { border-color: var(--accent2); color: var(--accent2); }
.st-move:disabled { opacity: 0.3; cursor: default; }
.step-header { display: flex; align-items: center; gap: 8px; }
.step-num { background: var(--accent2); color: var(--on-accent); width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: var(--mm-fs-13); font-weight: 700; flex-shrink: 0; }
.st-agent { flex: 1; }
.st-del { background: none; border: 1px solid var(--border); color: var(--text3); border-radius: var(--mm-r-chip); cursor: pointer; height: 28px; width: 28px; flex-shrink: 0; font-size: var(--mm-fs-14); }
.st-del:hover { border-color: var(--red); color: var(--red); }
.st-task { width: 100%; min-height: 64px; resize: vertical; box-sizing: border-box; }
.st-verify { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--surface-2); }
.st-verify .stv-lbl { font-size: var(--mm-fs-13); color: var(--text3); }
.st-verify-agent { flex: 1; min-width: 120px; background: var(--field-bg); border: 1px solid var(--border); color: var(--text2); border-radius: var(--mm-r-chip); padding: 3px 5px; font-size: var(--mm-fs-13); }



.editor-box .st-retries { width: 48px; flex: 0 0 48px; background: var(--field-bg); border: 1px solid var(--border); color: var(--text); border-radius: var(--mm-r-chip); padding: 3px; font-size: var(--mm-fs-13); text-align: center; }
.st-del:hover { color: var(--red); border-color: var(--red); }


.jv-pager { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.jv-pager-n { font-size: var(--mm-fs-13); color: var(--text3); }
.jv-pager button[disabled] { opacity: .45; cursor: default; }


.sp-box { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--mm-r-chip); }
.sp-bar { display: flex; align-items: center; gap: 8px; padding: 8px; border-bottom: 1px solid var(--border); }
.sp-bar input { flex: 1 1 auto; min-width: 0; padding: 6px 9px; border-radius: var(--mm-r-chip);
border: 1px solid var(--border); background: var(--field-bg); color: var(--text);
font-size: var(--mm-fs-14); outline: none; }
.sp-bar input:focus { border-color: var(--info-line); }
.sp-count { flex: none; font-size: var(--mm-fs-12); color: var(--text3); white-space: nowrap; }
.sp-clear { flex: none; font-size: var(--mm-fs-12); padding: 5px 9px; }
.sp-groups { max-height: 320px; overflow-y: auto; padding: 6px; }
.sp-empty { padding: 14px 8px; text-align: center; font-size: var(--mm-fs-13); }
.sp-g + .sp-g { margin-top: 2px; }
.sp-g-head { display: flex; align-items: center; gap: 7px; width: 100%; padding: 6px 8px;
border: 0; border-radius: var(--mm-r-chip); background: transparent; cursor: pointer;
color: var(--text2); font-size: var(--mm-fs-13); font-weight: 600; font-family: inherit; text-align: left; }
.sp-g-head:hover { background: var(--info-wash); color: var(--text); }
.sp-g-caret { flex: none; display: inline-flex; transition: transform .15s; }
.sp-g.open .sp-g-caret { transform: rotate(90deg); }
.sp-g-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-g-n { flex: none; font-size: var(--mm-fs-12); font-weight: 400; color: var(--text3); }
.sp-g-body { display: none; padding: 2px 8px 8px 26px; }
.sp-g.open .sp-g-body { display: flex; flex-direction: column; gap: 5px; }
.sp-g-body .sp { display: flex; align-items: center; gap: 7px; font-size: var(--mm-fs-14);
color: var(--text); cursor: pointer; }
.sp-g-body .sp span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-g-body input { width: auto; flex: none; accent-color: var(--accent2); }

.skill-pick { display: flex; flex-wrap: wrap; gap: 8px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--mm-r-chip); padding: 10px; }
.skill-pick .sp { display: flex; align-items: center; gap: 5px; font-size: var(--mm-fs-14); color: var(--text); width: auto; background: none; border: none; padding: 0; cursor: pointer; }
.skill-pick input { width: auto; accent-color: var(--accent2); }
.editor-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }


.quick-set { display: none; }
#cviewBody .quick-set { display: block; }
#cviewBody .quick-set > summary { display: none; }
.quick-set > summary::-webkit-details-marker { display: none; }
.quick-set .qs-caret { display: inline-block; transition: transform 0.2s; }
.quick-set[open] .qs-caret { transform: rotate(90deg); }





.quick-set-body { display: flex; flex-direction: column; gap: 12px; padding: 12px 0 4px; }
.settings-page .quick-set-body { padding: 16px 0 0; }
.settings-page .quick-set-body > * { min-width: 0; }
.qs-block { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--mm-r-btn); padding: 12px 14px; }
.qs-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: var(--mm-fs-14); color: var(--text2);
background: var(--bg3); border: 1px solid var(--border); border-radius: var(--mm-r-btn); padding: 10px 12px; }



.qs-field { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 10px 0; }
.qs-field .qs-lbl { flex: 1 1 auto; font-size: var(--mm-fs-14); color: var(--text2); }


.qs-field > select, .qs-field > input { flex: 0 1 400px; min-width: 0; margin: 0; }
.qs-field > .toggle { flex: none; }
.qs-hint { font-size: var(--mm-fs-13); line-height: 1.5; color: var(--text3); margin: -2px 0 10px; }


.qs-sub { font-family: var(--font); font-size: var(--mm-fs-12); letter-spacing: 2px; color: var(--text3);
margin: 14px 0 4px; padding-top: 12px; border-top: 1px solid var(--border); }
.qs-block .opt-sub { font-size: var(--mm-fs-13); line-height: 1.5; color: var(--text3); }



.quick-set-body .js-actions.qs-foot { justify-content: flex-end; margin-top: 12px; }
.quick-set-body .qs-file { cursor: pointer; }
.qs-avatar { display: flex; align-items: center; gap: 12px; margin: 10px 0; flex-wrap: wrap; }
.qs-avatar img { width: 48px; height: 48px; border-radius: var(--mm-r-btn); object-fit: cover; border: 1px solid var(--border); }



.quick-set-body .qs-avatar .js-actions { flex: 1 1 auto; margin-top: 0; justify-content: flex-start; }

@media (max-width: 700px) {
.qs-field { flex-direction: column; align-items: stretch; gap: 6px; }
.qs-field > select, .qs-field > input { flex: 1 1 auto; }
.qs-field > .toggle { align-self: flex-end; }
}




.msg-ctx { font-size: var(--mm-fs-badge); color: var(--text3); margin: 3px 0 0 2px; cursor: pointer;
font-variant-numeric: tabular-nums; opacity: .65; transition: opacity .15s; }
.msg-ctx:hover { opacity: 1; }
.msg-ctx.saved { color: var(--accent); }










.cside-tabs { display: flex; gap: 4px; flex: none; }
.cside-tab { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center;
gap: 6px; padding: 7px 8px; border-radius: var(--mm-r-chip); cursor: pointer;
border: 1px solid transparent; background: transparent; color: var(--text3);
font-size: var(--mm-fs-13); font-weight: 600; }
.cside-tab:hover { color: var(--text); }
.cside-tab.active { background: var(--accent-wash-2); border-color: var(--accent-line);
color: var(--accent); }


.cside-pane { display: none; flex-direction: column; gap: 10px; flex: 1 1 auto; min-height: 0; }
.cside-pane.on { display: flex; }











.cside-pane > .hud-left { display: flex; width: auto; max-width: none; min-width: 0; flex: 1 1 auto;
min-height: 0; padding: 0; border: 0; background: transparent; }


.vr-name { display: flex; align-items: center; gap: 6px; }
.vr-loc { margin-left: auto; flex: none; padding: 2px 7px; border-radius: var(--mm-r-chip); cursor: pointer;
border: 1px solid var(--border); background: transparent; color: var(--text3);
font-size: var(--mm-fs-12); opacity: .55; transition: opacity .15s; }
.vr-item:hover .vr-loc { opacity: 1; }
.vr-loc:hover { border-color: var(--accent-line); color: var(--accent); }

.cside-new { background: var(--accent-wash-2); border: 1px solid var(--accent-line);
color: var(--accent); border-radius: var(--mm-r-btn); padding: 9px 10px; cursor: pointer;
font-size: var(--mm-fs-14); font-weight: 600; text-align: left; }
.cside-new:hover { background: var(--accent-wash-2); }
.cside-search { padding: 8px 10px; border-radius: var(--mm-r-chip); border: 1px solid var(--border);
background: var(--field-bg); color: var(--text); font-size: var(--mm-fs-14); outline: none; }
.cside-search:focus { border-color: var(--info-line); }


.cside-proj { display: flex; align-items: center; gap: 4px; flex: none; }
.cs-proj-cur { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px;
padding: 7px 9px; border-radius: var(--mm-r-chip); cursor: pointer; text-align: left;
border: 1px solid var(--border); background: transparent; color: var(--text2);
font-size: var(--mm-fs-13); font-family: inherit; }
.cs-proj-cur:hover { border-color: var(--info-line); color: var(--text); }
.cs-proj-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-proj-caret { flex: none; opacity: .6; display: inline-flex; }
.cs-proj-x, .cs-proj-add { flex: none; width: 30px; height: 30px; border-radius: var(--mm-r-chip);
display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
border: 1px solid var(--border); background: transparent; color: var(--text3); }
.cs-proj-x:hover, .cs-proj-add:hover { border-color: var(--accent-line); color: var(--accent); }




.cs-menu { position: fixed; z-index: 4000; min-width: 240px; max-width: 340px;
max-height: 60vh; overflow-y: auto; padding: 5px;
background: var(--bg2); border: 1px solid var(--border); border-radius: var(--mm-r-btn);
box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
.cs-menu-sep { height: 1px; background: var(--border); margin: 5px 3px; }
@media (max-width: 900px) { .cs-menu-main { font-size: var(--mm-fs-16); } .ci-meta { font-size: var(--mm-fs-13); } }
.cs-menu-row { display: flex; align-items: center; gap: 2px; border-radius: var(--mm-r-chip); }
.cs-menu-row:hover { background: var(--info-wash); }
.cs-menu-row.on .cs-menu-lbl { color: var(--accent); font-weight: 600; }
.cs-menu-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px;
padding: 7px 8px; border: 0; background: transparent; cursor: pointer;
color: var(--text); font-size: var(--mm-fs-14); font-family: inherit; text-align: left; }
.cs-menu-lbl { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


.cs-menu-lbl.nhieu-dong { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
.cs-menu-right { flex: none; color: var(--text3); font-size: var(--mm-fs-12); }


.cs-menu-pin { flex: none; display: inline-flex; color: var(--accent); }


.cs-menu-acts { flex: none; display: flex; gap: 1px; opacity: .55; transition: opacity .15s; }
.cs-menu-row:hover .cs-menu-acts { opacity: 1; }
.cs-menu-act { width: 24px; height: 24px; border-radius: var(--mm-r-chip); cursor: pointer;
display: inline-flex; align-items: center; justify-content: center;
border: 0; background: transparent; color: var(--text3); }
.cs-menu-act:hover { color: var(--text-hi); background: var(--bg3); }


.cs-ico { min-width: 280px; }
.cs-ico-head { position: sticky; top: -5px; z-index: 1; display: flex; gap: 5px;
padding: 3px 0 6px; margin-bottom: 4px; background: var(--bg2);
border-bottom: 1px solid var(--border); }
.cs-ico-in { flex: 1 1 auto; min-width: 0; padding: 5px 8px; border-radius: var(--mm-r-chip);
border: 1px solid var(--border); background: var(--field-bg); color: var(--text);
font-size: var(--mm-fs-13); outline: none; }
.cs-ico-in:focus { border-color: var(--info-line); }
.cs-ico-clear { flex: none; padding: 5px 9px; border-radius: var(--mm-r-chip); cursor: pointer;
border: 1px solid var(--border); background: transparent; color: var(--text3); font-size: var(--mm-fs-12); }
.cs-ico-clear:hover { border-color: var(--red); color: var(--red); }
.cs-ico-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cs-ico-b { display: inline-flex; align-items: center; justify-content: center;
height: 32px; border-radius: var(--mm-r-chip); cursor: pointer; font-size: var(--mm-fs-16); color: var(--text2);
border: 1px solid transparent; background: transparent; }
.cs-ico-b:hover { background: var(--info-wash); color: var(--text-hi); }
.cs-ico-b.on { border-color: var(--accent-line); background: var(--accent-wash-2); color: var(--accent); }
.cs-ico-empty { grid-column: 1 / -1; padding: 14px 6px; text-align: center;
color: var(--text3); font-size: var(--mm-fs-13); }



.cs-menu-ico, .cs-proj-name .ic { display: inline-flex; flex: none; color: var(--text2); }
.cs-menu-row.on .cs-menu-ico, .cs-proj-name .ic { color: inherit; }
.ci-meta .act .pin.on { color: var(--accent); }
.cside-list { flex: 1 1 auto; overflow-y: auto; min-height: 0; padding-right: 2px; }
.cside-list::-webkit-scrollbar { width: 4px; }
.cside-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.cside-group { font-size: var(--mm-fs-12); letter-spacing: 0.12em; text-transform: uppercase;
color: var(--text3); padding: 10px 6px 4px; }
.cside-item { padding: 8px 10px; border-radius: var(--mm-r-btn); cursor: pointer;
border: 1px solid transparent; margin-bottom: 2px; }
.cside-item:hover { background: var(--info-wash); border-color: var(--info-line); }
.cside-item.active { background: var(--accent-wash-2); border-color: var(--accent-line); }






.cside-item.ghim { border-left: 3px solid var(--accent); }
.cside-item.ghim .act { opacity: 1; }
.cside-item.ghim .act > :not(.pin) { opacity: 0; transition: opacity .15s; }
.cside-item.ghim:hover .act > :not(.pin) { opacity: 1; }
.ci-title { color: var(--text); font-size: var(--mm-fs-14); font-weight: 600;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-meta { display: flex; gap: 8px; align-items: center; font-size: var(--mm-fs-12);
color: var(--text3); margin-top: 3px;



flex-wrap: wrap; row-gap: 3px; }
.ci-meta > span { white-space: nowrap; }
.ci-badge { border: 1px solid var(--border); border-radius: var(--mm-r-chip); padding: 0 6px; font-size: var(--mm-fs-12);
max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
.ci-meta .act { margin-left: auto; display: flex; gap: 7px; opacity: 0; transition: opacity 0.15s; flex: none; }
.cside-item:hover .act { opacity: 1; }
.ci-meta .act span { cursor: pointer; }


@media (hover: none) {
.ci-meta .act, .cside-item.ghim .act > :not(.pin), .code-wrap .code-copy { opacity: .75; }
}
.ci-meta .act span:hover { color: var(--text-hi); }


.ci-meta .act span .ic { pointer-events: none; }
.ci-snip { font-size: var(--mm-fs-13); color: var(--text2); margin-top: 2px; }
.ci-snip b { color: var(--warn-ink); }
.cside-empty { color: var(--text3); text-align: center; padding: 26px 8px; font-size: var(--mm-fs-14); }
.cside-more { display: block; width: 100%; margin: 8px 0 4px; padding: 8px 10px;
border: 1px solid var(--border); border-radius: var(--mm-r-btn); background: transparent;
color: var(--text2); font-size: var(--mm-fs-13); cursor: pointer; }
.cside-more:hover { background: var(--info-wash); border-color: var(--info-line);
color: var(--text); }



#jv-sess-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px;
border-radius: var(--mm-r-card); white-space: nowrap; flex-shrink: 0;
border: 1px solid var(--info-line); background: var(--info-wash); color: var(--info-ink);
font: 600 12px/1 var(--font, system-ui); cursor: pointer; }
#jv-sess-btn:hover { border-color: var(--info-line); color: var(--text-hi); }






.model-bar {
position: relative; display: flex; align-items: center; gap: 8px 16px;
width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box;
padding: 8px 18px 6px;
}
.mb-chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--mm-fs-12); color: var(--text2);
background: var(--bg3); border: 1px solid var(--border); border-radius: var(--mm-r-pill); padding: 4px 11px;
cursor: pointer; font-family: var(--font); transition: border-color .15s, color .15s;

flex: 0 1 auto; min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; }
.mb-chip:hover { color: var(--text); border-color: var(--accent); }
.mb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; }
.mb-sep { opacity: .4; }
.mb-eff { color: var(--accent2); }
.mb-caret { opacity: .6; font-size: var(--mm-fs-badge); }
.mb-pop { position: absolute; bottom: calc(100% + 6px); left: 12px; z-index: 60; width: 340px;
max-height: 62vh; overflow: auto; background: var(--bg2); border: 1px solid var(--border);
border-radius: var(--mm-r-btn); box-shadow: var(--shadow-3); padding: 8px; }
.mb-pop[hidden] { display: none; }
.mb-search { width: 100%; box-sizing: border-box; background: var(--bg); border: 1px solid var(--border);
color: var(--text); border-radius: var(--mm-r-chip); padding: 7px 9px; font-size: var(--mm-fs-13); margin-bottom: 6px;
font-family: var(--font); }
.mb-search:focus { outline: none; border-color: var(--accent); }
.mb-prov { font-size: var(--mm-fs-12); text-transform: uppercase; letter-spacing: .4px; color: var(--text3);
padding: 8px 8px 3px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.mb-prov:hover { color: var(--text2); }
.mb-prov.off { opacity: .55; cursor: default; }
.mb-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--mm-r-chip);
font-size: var(--mm-fs-13); color: var(--text); cursor: pointer; }
.mb-item:hover { background: var(--bg3); }
.mb-item.cur { background: var(--accent-wash-2); color: var(--accent); }
.mb-item .tick { width: 14px; color: var(--green); flex: none; }
.mb-empty { font-size: var(--mm-fs-12); color: var(--text3); padding: 4px 10px 8px; }
.mb-link { font-size: var(--mm-fs-12); color: var(--accent2); padding: 4px 10px 8px; cursor: pointer; }
.mb-link:hover { text-decoration: underline; }
.mb-eff-row { display: flex; gap: 6px; border-top: 1px solid var(--border); margin-top: 6px; padding: 8px 4px 4px; }
.mb-eff-row .lbl { font-size: var(--mm-fs-12); color: var(--text3); align-self: center; margin-right: 2px; }
.mb-eff-btn { flex: 1; font-size: var(--mm-fs-12); color: var(--text2); background: var(--bg3);
border: 1px solid var(--border); border-radius: var(--mm-r-chip); padding: 5px; cursor: pointer; text-align: center;
font-family: var(--font); }
.mb-eff-btn:hover { color: var(--text); }
.mb-eff-btn.cur { background: var(--accent2-wash-2); color: var(--accent2); border-color: var(--accent2); }






.msg-javis .bubble h1 { font-size: var(--mm-fs-20); }
.msg-javis .bubble h2 { font-size: var(--mm-fs-20); }
.msg-javis .bubble h3 { font-size: var(--mm-fs-16); }
.msg-javis .bubble h4, .msg-javis .bubble h5, .msg-javis .bubble h6 { font-size: var(--mm-fs-16); }
.msg-javis .bubble h1, .msg-javis .bubble h2, .msg-javis .bubble h3,
.msg-javis .bubble h4, .msg-javis .bubble h5, .msg-javis .bubble h6 {
color: var(--text); font-weight: 600; margin: 22px 0 8px; line-height: 1.4; }
.msg-javis .bubble h1:first-child, .msg-javis .bubble h2:first-child,
.msg-javis .bubble h3:first-child, .msg-javis .bubble h4:first-child,
.msg-javis .bubble h5:first-child, .msg-javis .bubble h6:first-child { margin-top: 0; }
.msg-javis .bubble > :first-child { margin-top: 0; }
.msg-javis .bubble > :last-child { margin-bottom: 0; }
.msg-javis .bubble p { margin: 14px 0; }
.msg-javis .bubble p:first-child { margin-top: 0; }
.msg-javis .bubble p:last-child { margin-bottom: 0; }
.msg-javis .bubble ul { padding-left: 22px; margin: 10px 0 16px; }
.msg-javis .bubble ol { padding-left: 22px; margin: 10px 0 16px; }
.msg-javis .bubble li { margin: 7px 0; line-height: 1.55; }

.msg-javis .bubble ul ul, .msg-javis .bubble ul ol,
.msg-javis .bubble ol ol, .msg-javis .bubble ol ul { margin: 4px 0; }
.msg-javis .bubble li > p { margin: 4px 0; }
.msg-javis .bubble blockquote { margin: 14px 0; padding: 8px 14px; color: var(--text2);
border-left: 3px solid var(--accent); background: var(--surface-1); border-radius: 0 var(--mm-r-chip) var(--mm-r-chip) 0; }
.msg-javis .bubble blockquote p:last-child { margin-bottom: 0; }
.msg-javis .bubble hr { border: none; border-top: 1px solid var(--border); margin: 10px 0; }
.msg-javis .bubble del { opacity: .65; }
.msg-javis .bubble em { font-style: italic; }
.msg-javis .bubble a { color: var(--link-ink); text-decoration: none; }
.msg-javis .bubble a:hover { text-decoration: underline; }
.msg-javis .bubble .task-item { list-style: none; margin-left: -16px; }
.msg-javis .bubble .task-item input { margin-right: 6px; vertical-align: middle; }
.chat-img { max-width: min(100%, 440px); border-radius: var(--mm-r-chip); display: block; margin: 6px 0; cursor: zoom-in; }


.chat-img-gone { display: inline-block; margin: 6px 0; padding: 10px 14px; border-radius: var(--mm-r-chip);
border: 1px dashed var(--border); background: var(--bg3); color: var(--text3); font-size: var(--mm-fs-13); }




.jv-lb { position: fixed; inset: 0; z-index: 5000; display: flex; flex-direction: column;
background: rgba(0, 0, 0, 0.86); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);





padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px)
env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
body.jv-lb-open { overflow: hidden; }
.jv-lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
padding: 10px 14px; color: #fff; flex: none; }
.jv-lb-ten { font-size: var(--mm-fs-13); opacity: 0.75; overflow: hidden; text-overflow: ellipsis;
white-space: nowrap; min-width: 0; }
.jv-lb-nut { display: flex; align-items: center; gap: 8px; flex: none; }
.jv-lb-nut button { display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.22);
color: #fff; border-radius: var(--mm-r-chip); padding: 6px 12px; font: inherit; font-size: var(--mm-fs-13); }
.jv-lb-nut button:hover { background: rgba(255, 255, 255, 0.2); }

.jv-lb-khung { flex: 1 1 auto; min-height: 0; display: flex; align-items: center;
justify-content: center; padding: 0 14px 14px; overflow: auto; touch-action: none; }
.jv-lb-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--mm-r-chip);
cursor: zoom-in; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.jv-lb.pinch .jv-lb-khung { overflow: hidden; }
.jv-lb.pinch .jv-lb-img { cursor: grab; }

.jv-lb.that .jv-lb-khung { align-items: flex-start; justify-content: flex-start; }
.jv-lb.that .jv-lb-img { max-width: none; max-height: none; cursor: zoom-out; }
@media (max-width: 700px) {
.jv-lb-bar { padding: 8px 10px; }
.jv-lb-nut button { padding: 6px 9px; }
}


.code-wrap { position: relative; margin: 8px 0; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px;
padding: 5px 10px; background: var(--code-bg); border: 1px solid var(--border); border-bottom: none;
border-radius: var(--mm-r-chip) var(--mm-r-chip) 0 0; }
.code-lang { font-family: var(--font); font-size: var(--mm-fs-12); letter-spacing: .06em; text-transform: uppercase;
color: var(--text3); }
.code-wrap .code-copy { position: static; top: auto; right: auto; opacity: 0;
background: var(--bg3); border: 1px solid var(--border); color: var(--text2);
border-radius: var(--mm-r-chip); padding: 2px 8px; font-size: var(--mm-fs-12); cursor: pointer; }
.code-wrap:hover .code-copy { opacity: 1; }
.code-wrap .code-block { margin: 0; border-radius: 0 0 var(--mm-r-chip) var(--mm-r-chip); border-top: none; }
.code-wrap.code-live { outline: 1px solid var(--accent-line); }
.code-wrap.code-live .code-lang::after { content: " · dang go"; color: var(--accent); }
.code-block .tok-c { color: var(--tok-c); font-style: italic; }
.code-block .tok-s { color: var(--tok-s); }
.code-block .tok-n { color: var(--tok-n); }
.code-block .tok-k { color: var(--tok-k); font-weight: 600; }






.jvhl { position: relative; width: 100%; height: 100%; min-height: 0; overflow: hidden; }
.jvhl-view, .jvhl .jvhl-ta {
margin: 0; border: 0; box-sizing: border-box; padding: 14px;
font: 13.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
letter-spacing: normal; tab-size: 2;
white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word;




scrollbar-gutter: stable;
}
.jvhl-view { position: absolute; inset: 0; overflow: hidden; pointer-events: none;
background: none; color: var(--text); }
.jvhl .jvhl-ta { position: absolute; inset: 0; width: 100%; height: 100%; resize: none;
outline: none; overflow: auto; background: transparent; color: transparent;
caret-color: var(--text); }


.jvhl .jvhl-ta::selection { background: var(--accent-line); color: transparent; }
.jvhl-view .tok-c { color: var(--tok-c); font-style: italic; }
.jvhl-view .tok-s { color: var(--tok-s); }
.jvhl-view .tok-n { color: var(--tok-n); }
.jvhl-view .tok-k { color: var(--tok-k); font-weight: 600; }
.jvhl-view .tok-t { color: var(--tok-t); }
.jvhl-view .tok-a { color: var(--tok-a); }

.jvfe-body > .jvhl { flex: 1; min-height: 52vh; height: auto; }


a.jv-wikilink { color: var(--accent); text-decoration: none; cursor: pointer;
border-bottom: 1px dashed var(--accent-line); }
a.jv-wikilink:hover { border-bottom-style: solid; filter: brightness(1.12); }
a.jv-wikilink.jv-wl-busy { opacity: .55; cursor: progress; }
a.jv-wikilink.jv-wl-miss { color: var(--red); border-bottom-color: var(--red); }
a.jv-fcode { text-decoration: none; }
a.jv-fcode code { cursor: pointer; transition: color .12s; }
a.jv-fcode:hover code { color: var(--accent); text-decoration: underline; }


.jv-art { display: flex; align-items: center; gap: 10px; margin: 8px 0; padding: 10px 12px;
max-width: 420px; border: 1px solid var(--border); border-radius: var(--mm-r-btn); cursor: pointer;
background: linear-gradient(180deg, var(--surface-1), rgba(255,255,255,0));
transition: border-color .15s, background .15s; }
.jv-art:hover { border-color: var(--accent); background: var(--accent-wash); }
.jv-art:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.jv-art-ic { font-size: var(--mm-fs-20); flex: none; }
.jv-art-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.jv-art-title { color: var(--text); font-size: var(--mm-fs-14); font-weight: 600;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jv-art-sub { color: var(--text3); font-size: var(--mm-fs-12); }
.jv-art-open { color: var(--accent); font-size: var(--mm-fs-13); font-weight: 600; flex: none; }













.jv-artpanel { position: fixed; inset: 0; z-index: 390; display: none; align-items: center;
justify-content: center; padding: 28px; background: var(--scrim); backdrop-filter: blur(6px); }


body.jv-artpanel-open { overflow: hidden; }
.jv-artpanel.open { display: flex; animation: artIn .16s ease; }
.jv-ap-box { display: flex; flex-direction: column; width: min(980px, 100%);
max-height: min(86vh, 100%); background: var(--bg2); border: 1px solid var(--border);
border-radius: var(--mm-r-field); overflow: hidden; box-shadow: 0 24px 70px var(--shadow-veil); }




.jv-artpanel:not(.jv-ap-oncode) .jv-ap-box { height: min(86vh, 100%); }
@keyframes artIn { from { opacity: 0; } to { opacity: 1; } }
.jv-ap-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px;
border-bottom: 1px solid var(--border); background: var(--bg2); }
.jv-ap-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.jv-ap-title { font-weight: 700; font-size: var(--mm-fs-16); color: var(--text);
overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jv-ap-sub { font-size: var(--mm-fs-12); color: var(--text3); margin-top: 2px; }
.jv-ap-tabs { display: flex; gap: 4px; flex: none; }
.jv-ap-tab { background: var(--bg3); border: 1px solid var(--border); color: var(--text2);
border-radius: var(--mm-r-chip); padding: 5px 13px; font-size: var(--mm-fs-13); cursor: pointer; }
.jv-ap-tab.active { color: var(--accent); border-color: var(--accent); }
.jv-artpanel.no-preview .jv-ap-tabs { display: none; }
.jv-ap-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.jv-ap-btn { display: inline-flex; align-items: center; justify-content: center;
background: var(--bg3); border: 1px solid var(--border); color: var(--text2);
width: 32px; height: 32px; border-radius: var(--mm-r-chip); cursor: pointer; font-size: var(--mm-fs-14); }
.jv-ap-btn:hover { color: var(--text-hi); border-color: var(--accent); }
.jv-ap-btn svg { width: 16px; height: 16px; }
.jv-ap-body { flex: 1; min-height: 0; overflow: auto; background: var(--bg); }
.jv-ap-frame { width: 100%; height: 100%; border: 0; background: #fff; display: block; }
.jv-ap-mermaid { min-height: 100%; display: flex; align-items: center; justify-content: center;
padding: 16px; background: var(--bg); color: var(--text2); }
.jv-ap-mermaid svg { max-width: 100%; height: auto; }

.jv-ap-zoom { height: 100%; min-height: 240px; padding: 0; background: var(--mm-panel); }
.jv-ap-mermaid.jv-ap-zoom { display: block; }



.jv-ap-code { margin: 0; border: 0; border-radius: 0; min-height: 100%; box-sizing: border-box;
padding: 16px 18px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere;
tab-size: 2; }
.jv-ap-code { outline: none; cursor: text; }

.jv-ap-foot { display: none; flex: none; padding: 7px 14px; font-size: var(--mm-fs-12); color: var(--text3);
border-top: 1px solid var(--border); background: var(--bg2); }
.jv-artpanel.jv-ap-oncode .jv-ap-foot { display: block; }
.jv-ap-note { color: var(--text3); font-size: var(--mm-fs-13); padding: 10px 12px; }


@media (max-width: 760px) {
.jv-artpanel { padding: 0; }
.jv-ap-box { width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; }
.jv-ap-head { flex-wrap: wrap; gap: 8px; }
.jv-ap-meta { flex: 1 1 100%; order: -1; }
.jv-ap-code { padding: 13px 14px; font-size: var(--mm-fs-13); }
}




.hud-left { padding: 12px 0 0; overflow: hidden; }
.vault-head { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 8px; }
.vault-title { font-family: var(--font); font-size: var(--mm-fs-12); letter-spacing: 2px; color: var(--text3); }
.vault-tools { display: flex; gap: 6px; }
.vault-search { display: flex; align-items: center; gap: 6px; margin: 0 12px 6px; background: var(--bg3);
border: 1px solid var(--border); border-radius: var(--mm-r-chip); padding: 6px 8px; }
.vault-search:focus-within { border-color: var(--accent); }
.vault-search .vs-ico { font-size: var(--mm-fs-12); opacity: .55; }
.vault-search input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--text);
font-size: var(--mm-fs-13); font-family: inherit; }
.vault-search input::placeholder { color: var(--text3); }
.vs-clear { background: none; border: none; color: var(--text3); cursor: pointer; font-size: var(--mm-fs-12); padding: 0 2px; }
.vs-clear:hover { color: var(--accent); }
.vault-modes { display: flex; gap: 6px; margin: 0 12px 8px; }
.vs-chip { font-size: var(--mm-fs-12); padding: 3px 11px; border-radius: var(--mm-r-card); background: var(--bg3);
border: 1px solid var(--border); color: var(--text3); cursor: pointer; }
.vs-chip.active { background: var(--accent-wash-2); border-color: var(--accent-line); color: var(--accent); }
.vault-tree, .vault-results { flex: 1; overflow-y: auto; padding: 2px 8px 14px; }
.vault-tree::-webkit-scrollbar, .vault-results::-webkit-scrollbar { width: 4px; }
.vault-tree::-webkit-scrollbar-thumb, .vault-results::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.vt-info { color: var(--text3); font-size: var(--mm-fs-13); padding: 8px 6px; }
.vt-node { display: flex; align-items: center; gap: 5px; padding: 4px 6px; border-radius: var(--mm-r-chip); cursor: pointer;
font-size: var(--mm-fs-14); color: var(--text2); white-space: nowrap; overflow: hidden; }
.vt-node:hover { background: var(--info-wash); color: var(--text); }
.vt-node.active { background: var(--info-wash); box-shadow: inset 3px 0 0 var(--accent); color: var(--text); }
.vt-chev { flex: none; width: 13px; text-align: center; font-size: var(--mm-fs-badge); color: var(--text3); transition: transform .12s; }
.vt-chev.open { transform: rotate(90deg); }
.vt-chev.leaf { visibility: hidden; }
.vt-ico { flex: none; font-size: var(--mm-fs-13); }
.vt-name { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.vt-act { display: none; gap: 1px; flex: none; padding-left: 4px; }
.vt-node:hover .vt-act, .vt-node:focus-within .vt-act { display: flex; }

@media (hover: none) { .vt-act { display: flex; opacity: .75; } }
.vt-act button { background: none; border: none; color: var(--text3); cursor: pointer; font-size: var(--mm-fs-12); padding: 0 3px; line-height: 1; }
.vt-act button:hover { color: var(--accent); }
.vt-hidden { display: none !important; }
.vr-item { padding: 7px 8px; border-radius: var(--mm-r-chip); cursor: pointer; display: flex; flex-direction: column; align-items: stretch; min-width: 0; gap: 2px; }
.vr-item:hover { background: var(--info-wash); }
.vr-main { min-width: 0; flex: 1; }
.vr-name { font-size: var(--mm-fs-13); color: var(--text); display: flex; align-items: center; gap: 6px; min-width: 0; }
.vr-label { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vr-name > .vt-ico, .vr-loc { flex-shrink: 0; }
.vr-snip { font-size: var(--mm-fs-12); color: var(--text3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vr-dl { flex: none; border: 1px solid var(--border); background: var(--surface-1); color: var(--text2); border-radius: var(--mm-r-chip); padding: 3px 7px; cursor: pointer; }
.vr-dl:hover { color: var(--accent); border-color: var(--accent-line); }
.vr-empty { color: var(--text3); font-size: var(--mm-fs-13); padding: 10px 6px; }




.note-editor { position: absolute; inset: 0; z-index: 12; display: flex; flex-direction: column;
background: var(--panel-solid); }
.note-editor[hidden] { display: none; }
.note-editor.ne-full { position: fixed; inset: 0; z-index: 1000;




padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px)
env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }










body.ne-full-on .cview { z-index: 250; }





.ne-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px;
flex-wrap: wrap; border-bottom: 1px solid var(--border); background: var(--bg2); }
.ne-title { font-size: var(--mm-fs-14); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; }


.ne-nav { display: flex; gap: 3px; flex: none; align-items: center; }
.ne-nav button { background: var(--surface-1); border: 1px solid var(--border); color: var(--text2);
cursor: pointer; width: 28px; height: 26px; border-radius: var(--mm-r-chip); padding: 0;
display: flex; align-items: center; justify-content: center; }
.ne-nav button:hover:not(:disabled) { color: var(--accent); border-color: var(--accent-line); }
.ne-nav button:disabled { opacity: 0.35; cursor: default; }
.ne-actions { display: flex; gap: 5px; flex: 0 1 auto; min-width: 0; max-width: 100%; flex-wrap: wrap; align-items: center; }


@media (max-width: 700px) {
.ne-bar { flex-wrap: wrap; padding: 8px 10px; }
.ne-title { order: -1; flex: 1 0 100%; }
.ne-actions { flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
}
.ne-actions button { background: var(--surface-1); border: 1px solid var(--border); color: var(--text2);
cursor: pointer; font-size: var(--mm-fs-13); padding: 4px 10px; border-radius: var(--mm-r-chip); white-space: nowrap; }
.ne-actions button:hover { color: var(--text); border-color: var(--info-line); }
.ne-actions button.ne-saved { color: var(--green); border-color: var(--ok-line); }
.ne-seg { display: flex; }
.ne-seg button { border-radius: 0; border-right: none; }
.ne-seg button:first-child { border-radius: var(--mm-r-chip) 0 0 var(--mm-r-chip); }
.ne-seg button:last-child { border-radius: 0 var(--mm-r-chip) var(--mm-r-chip) 0; border-right: 1px solid var(--border); }
.ne-seg button.active { background: var(--accent-wash-2); border-color: var(--accent-line); color: var(--accent); }



.ne-share { flex: none; }
.ne-share[hidden] { display: none; }
.ne-body { flex: 1; display: flex; min-height: 0; overflow: hidden; }
.ne-body.ne-md { flex-direction: column; }
.ne-fmt { display: flex; flex-wrap: wrap; gap: 3px; padding: 6px 8px; border-bottom: 1px solid var(--border); background: var(--bg2); flex: none; }
.ne-fmt button { background: var(--surface-1); border: 1px solid var(--border); color: var(--text2); cursor: pointer;
font-size: var(--mm-fs-13); min-width: 28px; height: 26px; border-radius: var(--mm-r-chip); padding: 0 6px; }
.ne-fmt button:hover { color: var(--text); border-color: var(--info-line); }


.ne-count { margin-left: auto; align-self: center; padding: 0 4px; font-size: var(--mm-fs-12);
color: var(--text3); white-space: nowrap; font-variant-numeric: tabular-nums; cursor: default; }
.ne-panes { flex: 1; display: flex; min-height: 0; overflow: hidden; }
.ne-wys { outline: none; border-left: none; }
.ne-wys:focus { outline: none; }
.ne-body.ne-md.mode-wys .ne-src { display: none; }
.ne-body.ne-md.mode-source .ne-wys { display: none; }
.ne-src, .ne-prev { flex: 1; min-width: 0; overflow: auto; }
.ne-src { background: var(--field-bg); }
.ne-src textarea { width: 100%; height: 100%; background: none; color: var(--text); border: none; outline: none;
padding: 14px; font: 14px/1.6 var(--font); resize: none; }
.ne-prev { padding: 14px 20px; color: var(--text); background: var(--bg); border-left: 1px solid var(--border); line-height: 1.7; }
.ne-body.mode-source .ne-prev { display: none; }
.ne-body.mode-source .ne-src { border-right: none; }
.ne-body.mode-preview .ne-src { display: none; }
.ne-body.mode-preview .ne-prev { border-left: none; }
.ne-img { flex: 1; display: flex; align-items: center; justify-content: center; overflow: auto; padding: 16px; }
.ne-img img { max-width: 100%; max-height: 100%; border-radius: var(--mm-r-chip); }

.ne-frame { flex: 1; width: 100%; min-height: 0; border: 0; background: #fff; }
.ne-dl { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
color: var(--text2); padding: 24px; text-align: center; }
.ne-dl .ne-dl-ico { font-size: 46px; }
.ne-dl a { color: var(--text); }

.ne-hits { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; max-width: 620px; }
.ne-hits .dim { width: 100%; color: var(--text3); font-size: var(--mm-fs-13); }
.ne-hits button { background: var(--surface-1); border: 1px solid var(--border); color: var(--text2);
cursor: pointer; font-size: var(--mm-fs-13); padding: 4px 10px; border-radius: var(--mm-r-chip); }
.ne-hits button:hover { color: var(--text); border-color: var(--accent-line); }

.ne-prev h1, .ne-prev h2, .ne-prev h3, .ne-prev h4 { color: var(--text); margin: .6em 0 .3em; line-height: 1.3; }
.ne-prev h1 { font-size: 1.5em; } .ne-prev h2 { font-size: 1.28em; } .ne-prev h3 { font-size: 1.12em; }
.ne-prev p, .ne-prev li { margin: .4em 0; }
.ne-prev ul, .ne-prev ol { padding-left: 1.4em; margin: .4em 0; }
.ne-prev a { color: var(--link-ink); }



.ne-prev a:not(:has(img)), .jvfe-prev a:not(:has(img)) { cursor: pointer; }
.ne-prev a:not(:has(img)):hover, .jvfe-prev a:not(:has(img)):hover { text-decoration: underline; }
.ne-prev code { background: var(--surface-3); padding: 1px 5px; border-radius: 4px; font-family: var(--font); font-size: .92em; }
.ne-prev pre { background: var(--field-bg); border: 1px solid var(--border); border-radius: var(--mm-r-chip); padding: 12px; overflow: auto; margin: .5em 0; }
.ne-prev pre code { background: none; padding: 0; }
.ne-prev blockquote { border-left: 3px solid var(--border); margin: .5em 0; padding: .2em 0 .2em 12px; color: var(--text2); }
.ne-prev img { max-width: 100%; border-radius: var(--mm-r-chip); }
.ne-prev hr { border: none; border-top: 1px solid var(--border); margin: 1em 0; }
.ne-prev table { border-collapse: collapse; margin: .5em 0; }
.ne-prev th, .ne-prev td { border: 1px solid var(--border); padding: 5px 9px; }


.jv-ask { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border); }
.jv-ask-q { font-size: var(--mm-fs-13); color: var(--text2); margin-bottom: 7px; }
.jv-ask-tag {
display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: var(--mm-r-chip);
background: var(--bg3); border: 1px solid var(--border);
color: var(--text3); font-size: var(--mm-fs-12); text-transform: uppercase; letter-spacing: .4px;
}
.jv-ask-row { display: flex; flex-wrap: wrap; gap: 6px; }
.jv-ask-chip {
background: var(--bg3); border: 1px solid var(--border); color: var(--text);
border-radius: var(--mm-r-field); padding: 5px 12px; font-family: var(--font); font-size: var(--mm-fs-13);
cursor: pointer; transition: border-color .15s, color .15s, background .15s;
display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px;
text-align: left; max-width: 100%;
}
.jv-ask-chip-label { font-weight: 600; }
.jv-ask-chip-desc { font-size: var(--mm-fs-12); color: var(--text3); font-weight: 400; }
.jv-ask-chip:hover { border-color: var(--accent); color: var(--accent); }
.jv-ask-other { color: var(--text3); border-style: dashed; }


.jv-resume { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border); font-size: var(--mm-fs-16); line-height: 1.6; }
.jv-resume-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text); }
.jv-resume-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text3); flex: none; }
.jv-resume-dot.on { background: var(--accent); box-shadow: var(--accent-ring); }
.jv-resume-spin {
width: 12px; height: 12px; flex: none; border-radius: 50%;
border: 2px solid var(--border); border-top-color: var(--accent);
animation: jv-resume-spin .9s linear infinite;
}
@keyframes jv-resume-spin { to { transform: rotate(360deg); } }
.jv-resume-left { color: var(--text2); }
.jv-resume-auto { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--text2); cursor: pointer; user-select: none; }
.jv-resume-auto input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.jv-resume-row { display: flex; align-items: center; gap: 10px; margin-top: 9px; flex-wrap: wrap; }
.jv-resume-now {
background: var(--bg); border: 1px solid var(--border); color: var(--text);
border-radius: var(--mm-r-chip); padding: 7px 14px; font-family: var(--font); font-size: var(--mm-fs-14);
cursor: pointer; transition: border-color .15s, color .15s;
}
.jv-resume-now:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.jv-resume-now:disabled { opacity: .5; cursor: default; }
.jv-resume-eng { color: var(--text3); font-size: var(--mm-fs-13); }


.jv-ask-done .jv-ask-chip { cursor: default; opacity: .45; }
.jv-ask-done .jv-ask-chip:hover { border-color: var(--border); color: var(--text); }
.jv-ask-done .jv-ask-other { display: none; }
.jv-ask-done .jv-ask-chip.jv-ask-picked {
opacity: 1; border-color: var(--accent); color: var(--accent); background: var(--accent-wash-2);
}
.jv-ask-done .jv-ask-chip.jv-ask-picked::before {
content: ""; display: inline-block; width: 1em; height: 1em; margin-right: .2em;
vertical-align: -0.14em; background-color: currentColor;
-webkit-mask: var(--ic-check) center/contain no-repeat;
mask: var(--ic-check) center/contain no-repeat;
}



.slash-menu {
position: fixed;
z-index: 999;
max-height: min(320px, 50vh);
overflow-y: auto;
background: var(--mm-panel);
border: 1px solid var(--mm-line);
border-radius: var(--mm-r-btn);
box-shadow: var(--mm-out);
padding: var(--mm-sp-1);
font-size: var(--mm-fs-14);
--slash-cmdw: 9ch;
}
:root[data-theme="light"] .slash-menu { border: 0; }
.slash-head {
padding: var(--mm-sp-2) var(--mm-sp-3) 2px; font-size: var(--mm-fs-12); font-weight: 600;
color: var(--mm-dim); text-transform: uppercase; letter-spacing: .02em;
}
.slash-head:first-child { padding-top: var(--mm-sp-1); }
.slash-item {
display: flex; align-items: center; gap: var(--mm-sp-3);
min-height: 32px; padding: var(--mm-sp-1) var(--mm-sp-3);
border-radius: var(--mm-r-chip);
cursor: pointer;
}
.slash-item.active, .slash-item:hover { background: var(--mm-wash); }
.slash-cmd {
flex: none; width: var(--slash-cmdw); font-family: var(--mono); font-size: var(--mm-fs-13); font-weight: 600;
color: var(--mm-link); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.slash-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.35; }
.slash-name { font-size: var(--mm-fs-13); color: var(--mm-text); }
.slash-desc { font-size: var(--mm-fs-12); color: var(--mm-dim); margin-left: var(--mm-sp-2); }
.slash-kind {
flex: none; font-size: var(--mm-fs-12); color: var(--mm-muted); padding: 1px var(--mm-sp-2);
border-radius: var(--mm-r-pill); background: var(--mm-panel); box-shadow: var(--mm-out-xs);
}
@media (max-width: 520px) {

.slash-item { align-items: flex-start; }
.slash-cmd { padding-top: 1px; width: min(var(--slash-cmdw), 12ch); }
.slash-text { white-space: normal; }
.slash-name, .slash-desc { display: block; margin-left: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}




.ci-hl {
position: absolute; margin: 0; border: 0; box-sizing: border-box; overflow: hidden; pointer-events: none;
white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; color: var(--text);
}
.ci-hl[hidden] { display: none; }
.ci-hl .ci-cmd {
color: var(--mm-link); background: var(--mm-wash); box-shadow: 0 0 0 2px var(--mm-wash);
border-radius: 4px; font-weight: inherit;
}
.voice-input.has-cmd { position: relative; color: transparent; caret-color: var(--text); background: transparent; }
.voice-input.has-cmd::selection { color: transparent; background: var(--mm-wash); }




.goal-bar {
position: relative; flex: none; margin: 0 16px 6px; min-width: 0;
background: var(--mm-panel); color: var(--mm-muted);
border: 1px solid var(--mm-line); border-radius: var(--mm-r-btn); box-shadow: var(--mm-out-sm);
font-size: var(--mm-fs-13);
}
:root[data-theme="light"] .goal-bar { border: 0; }
.goal-bar[hidden] { display: none; }


.chatpage-main.edit-on > .chatpage-slot > .goal-bar { grid-row: 4; grid-column: 1 / -1; align-self: start; }
.gb-row { display: flex; align-items: center; gap: var(--mm-sp-1); min-height: 40px; padding: 2px var(--mm-sp-1) 2px var(--mm-sp-2); min-width: 0; }
.gb-ic { flex: none; display: inline-flex; color: var(--mm-brand); }
.gb-paused .gb-ic, .gb-waiting .gb-ic { color: var(--mm-dim); }
.gb-main {
flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: var(--mm-sp-2); padding: var(--mm-sp-1) 2px;
background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.gb-lbl { flex: none; color: var(--mm-dim); }
.gb-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mm-text); }
.gb-time { flex: none; font-variant-numeric: tabular-nums; color: var(--mm-dim); font-size: var(--mm-fs-12); padding: 0 var(--mm-sp-1); }
.gb-btn {
flex: none; width: 32px; height: 32px; border-radius: var(--mm-r-chip); padding: 0; cursor: pointer;
display: inline-flex; align-items: center; justify-content: center;
background: transparent; border: 0; color: var(--mm-muted);
}
.gb-btn:hover { background: var(--mm-row); color: var(--mm-link); }
.gb-del:hover { color: var(--mm-bad); }
.gb-exp svg { transform: rotate(180deg); transition: transform .15s; }
.gb-exp[aria-expanded="true"] svg { transform: none; }
.goal-bar :focus-visible { outline: 2px solid var(--mm-link); outline-offset: 1px; }
.gb-count {
flex: none; min-width: 26px; height: 26px; padding: 0 var(--mm-sp-2); border-radius: var(--mm-r-pill); cursor: pointer;
border: 0; background: var(--mm-wash); color: var(--mm-link);
font: inherit; font-size: var(--mm-fs-12); font-weight: 700; font-variant-numeric: tabular-nums;
}
.gb-count[aria-expanded="true"] { background: var(--mm-primary); color: var(--mm-on-brand); }
.gb-detail { padding: 2px var(--mm-sp-4) var(--mm-sp-3) 36px; display: flex; flex-direction: column; gap: var(--mm-sp-1); }
.gb-full { color: var(--mm-text); font-size: var(--mm-fs-14); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.gb-meta { color: var(--mm-muted); font-size: var(--mm-fs-13); line-height: 1.4; }
.gb-open {
align-self: flex-start; margin-top: var(--mm-sp-1); padding: var(--mm-sp-1) var(--mm-sp-3); min-height: 32px;
border-radius: var(--mm-r-btn); cursor: pointer; border: 1px solid var(--mm-line);
background: var(--mm-panel); box-shadow: var(--mm-out-sm); color: var(--mm-muted); font: inherit; font-size: var(--mm-fs-13);
}
:root[data-theme="light"] .gb-open { border: 0; }
.gb-open:hover { color: var(--mm-link); }

.gb-pop {
position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 60;
width: min(460px, calc(100vw - 32px)); max-height: min(55vh, 420px); overflow: auto;
background: var(--mm-panel); border: 1px solid var(--mm-line); border-radius: var(--mm-r-btn);
box-shadow: var(--mm-out); padding: var(--mm-sp-1);
}
:root[data-theme="light"] .gb-pop { border: 0; }
.gb-pop-head { padding: var(--mm-sp-2); font-weight: 600; color: var(--mm-text); font-size: var(--mm-fs-14); }
.gb-item { display: flex; align-items: center; gap: var(--mm-sp-1); padding: 2px var(--mm-sp-1) 2px var(--mm-sp-3); border-radius: var(--mm-r-chip); }
.gb-item:hover { background: var(--mm-row); }
.gb-item.gb-cur { background: var(--mm-wash); }
.gb-dot { flex: none; width: 8px; height: 8px; border-radius: var(--mm-r-pill); background: var(--mm-dim); }
.gb-item.gb-running .gb-dot { background: var(--mm-ok); }
.gb-item.gb-waiting .gb-dot { background: var(--mm-warn); }
.gb-item-main {
flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; padding: var(--mm-sp-1) 2px;
background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.gb-item-txt { color: var(--mm-text); font-size: var(--mm-fs-13); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gb-item-meta { color: var(--mm-dim); font-size: var(--mm-fs-12); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .gb-exp svg { transition: none; } }
@media (max-width: 860px) {
.goal-bar { margin: 0 10px 6px; }
.gb-btn { width: 36px; height: 36px; }

.gb-lbl { display: none; }
.gb-detail { padding-left: var(--mm-sp-4); }


body:has(.mm-shelf-launch) .goal-bar { margin-right: 88px; }
body:has(.mm-shelf-launch) .chatpage-slot > .goal-bar { width: auto; margin-left: 0; margin-right: 88px; }
.gb-exp { display: none; }
}











.ic {
display: inline-block;
width: 1em;
height: 1em;


vertical-align: -0.14em;
flex: none;
stroke-width: 2;
overflow: visible;
}


.ic-lg { width: 1.35em; height: 1.35em; stroke-width: 1.75; }
.ic-xl { width: 2em; height: 2em; stroke-width: 1.5; }
.ic-sm { width: .85em; height: .85em; stroke-width: 2.25; }


.ic-fill { fill: currentColor; }


.ic-ok { color: var(--green); }
.ic-warn { color: var(--warn-ink); }
.ic-err { color: var(--red); }
.ic-dim { color: var(--text3); }
.ic-accent { color: var(--accent-ink); }


.ic-spin { animation: ic-spin 1.1s linear infinite; }
@keyframes ic-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ic-spin { animation: none; } }


.ic-btn {
display: inline-flex;
align-items: center;
justify-content: center;
}














.cb-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.cb-search { flex: 1 1 auto; min-width: 0; padding: 8px 11px; border-radius: var(--mm-r-btn);
border: 1px solid var(--border); background: var(--field-bg); color: var(--text);
font-size: var(--mm-fs-14); outline: none; }
.cb-search:focus { border-color: var(--info-line); }
.cb-intro { color: var(--text3); font-size: var(--mm-fs-14); line-height: 1.6; max-width: 720px; margin: 0 0 16px; }
.cb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.cb-card { border: 1px solid var(--border); border-radius: var(--mm-r-btn); padding: 12px 14px;
background: var(--bg2); display: flex; flex-direction: column; gap: 8px; }
.cb-head { display: flex; align-items: center; gap: 8px; }
.cb-ico { display: inline-flex; color: var(--accent); position: relative; }







.kenh-logo { display: inline-block; vertical-align: -0.15em; flex: none; }

.cb-ico-kenh { position: absolute; right: -5px; bottom: -5px; display: inline-flex;
border-radius: 50%; background: var(--bg2); box-shadow: 0 0 0 2px var(--bg2); }
.cb-kenh-chip { display: inline-flex; align-items: center; gap: 4px; }



.cb-loc { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.cb-loc-o { display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
padding: 5px 11px; border-radius: var(--mm-r-pill); font-size: var(--mm-fs-13);
border: 1px solid var(--border); background: var(--bg2); color: var(--text2); }
.cb-loc-o:hover { border-color: var(--info-line); }
.cb-loc-o.on { background: var(--surface-3); color: var(--text); border-color: var(--info-line); }
.cb-loc-n { font-size: var(--mm-fs-12); color: var(--text3); }








.cb-kenh { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.cb-kenh-o { display: grid; grid-template-columns: auto 1fr; align-items: center;
column-gap: 11px; row-gap: 2px;
cursor: pointer; text-align: left; padding: 10px 12px; border-radius: var(--mm-r-btn);
border: 1px solid var(--border); background: var(--bg2); color: var(--text); }
.cb-kenh-o:hover { border-color: var(--info-line); }
.cb-kenh-o.on { border-color: var(--accent); background: var(--surface-3);
box-shadow: inset 0 0 0 1px var(--accent); }
.cb-kenh-o b { font-size: var(--mm-fs-16); }
.cb-kenh-o small { grid-column: 2; font-size: var(--mm-fs-13); color: var(--text3); line-height: 1.45; }
.cb-kenh-logo { display: inline-flex; grid-row: span 2; }
.cb-kenh-khoa { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
padding: 9px 12px; border-radius: var(--mm-r-btn); margin-top: 4px;
border: 1px solid var(--border); background: var(--surface-3); color: var(--text); }
.cb-kenh-khoa span { font-size: var(--mm-fs-13); color: var(--text3); }
.cb-khong-nhom { border-left: 2px solid var(--info-line); padding-left: 9px; }




.zl-cho { border: 1px solid var(--border); border-radius: var(--mm-r-btn); padding: 9px 11px;
margin-top: 8px; background: var(--surface-3); font-size: var(--mm-fs-13); }
.zl-cho .js-actions { margin-top: 7px; }
.cb-name { font-weight: 600; color: var(--text); flex: 1 1 auto; overflow: hidden;
text-overflow: ellipsis; white-space: nowrap; }


.cb-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.cb-dot.ok { background: var(--green); }
.cb-dot.wait { background: var(--warn-ink); }
.cb-dot.err { background: var(--red); }
.cb-dot.off { background: var(--text3); opacity: .5; }
.cb-state { font-size: var(--mm-fs-12); color: var(--text3); flex: none; }
.cb-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: var(--mm-fs-13); color: var(--text3); }
.cb-meta span { display: inline-flex; align-items: center; gap: 4px; }
.cb-warn { color: var(--warn-ink); }
.cb-err { font-size: var(--mm-fs-13); color: var(--red); line-height: 1.5;
background: var(--surface-3); border-radius: var(--mm-r-chip); padding: 6px 8px; }



.cb-quyen { display: flex; align-items: flex-start; gap: 6px; font-size: var(--mm-fs-13);
line-height: 1.5; border-radius: var(--mm-r-chip); padding: 6px 8px; }
.cb-quyen.doc { color: var(--text3); background: var(--surface-3);
border: 1px solid var(--border); }
.cb-quyen.ghi { color: var(--warn-ink); background: var(--warn-wash);
border: 1px solid var(--warn-line); }
.cb-quyen.full { color: var(--red); background: var(--danger-wash);
border: 1px solid var(--danger-line); }


.cb-nhomcho { border: 1px solid var(--info-line); background: var(--info-wash);
border-radius: var(--mm-r-chip); padding: 8px 10px; display: flex; flex-direction: column; gap: 5px; }
.cb-nhomcho-t { display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
font-size: var(--mm-fs-13); color: var(--text); }
.cb-nhomcho-id { font-family: var(--mono, monospace); font-size: var(--mm-fs-12); color: var(--text3); }
.cb-nhomcho-d { font-size: var(--mm-fs-13); line-height: 1.5; color: var(--text3); }
.cb-nhomcho-a { display: flex; gap: 6px; flex-wrap: wrap; }
.cb-acts { display: flex; gap: 6px; margin-top: 2px; }
.cb-empty { grid-column: 1 / -1; text-align: center; color: var(--text3); padding: 40px 16px;
font-size: var(--mm-fs-14); line-height: 1.7; }
.cb-empty b { color: var(--text); display: block; margin: 8px 0 4px; font-size: var(--mm-fs-16); }
.cb-empty-ico { color: var(--text3); opacity: .6; }


.cb-modal { position: fixed; inset: 0; z-index: 3200; display: flex; align-items: center;
justify-content: center; background: rgba(0, 0, 0, .55); padding: 24px; }
.cb-form { width: min(560px, 94vw); max-height: 88vh; overflow-y: auto; padding: 18px 20px;
background: var(--bg2); border: 1px solid var(--border); border-radius: var(--mm-r-field);
box-shadow: 0 24px 70px rgba(0, 0, 0, .6); }
.cb-form h3 { margin: 0 0 14px; color: var(--text); }
.cb-form label { display: block; margin: 12px 0 4px; font-size: var(--mm-fs-13); color: var(--text2); font-weight: 600; }
.cb-form input, .cb-form select, .cb-form textarea { width: 100%; box-sizing: border-box;
padding: 8px 10px; border-radius: var(--mm-r-chip); border: 1px solid var(--border);
background: var(--field-bg); color: var(--text); font-size: var(--mm-fs-14); font-family: inherit; outline: none; }
.cb-form input:focus, .cb-form select:focus, .cb-form textarea:focus { border-color: var(--info-line); }
.cb-row { display: flex; gap: 6px; align-items: center; }
.cb-row > :first-child { flex: 1 1 auto; min-width: 0; }
.cb-row > button { flex: 0 0 auto; white-space: nowrap; }




.cb-form select { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-hint { font-size: var(--mm-fs-13); color: var(--text3); line-height: 1.55; margin-top: 5px; }




.cb-canhbao { margin-top: 8px; border-radius: var(--mm-r-btn); padding: 10px 12px; font-size: var(--mm-fs-13);
line-height: 1.6; }
.cb-canhbao.ghi { color: var(--warn-ink); background: var(--warn-wash);
border: 1px solid var(--warn-line); }
.cb-canhbao.full { color: var(--red); background: var(--danger-wash);
border: 1px solid var(--danger-line); }
.cb-canhbao-h { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.cb-canhbao ul { margin: 7px 0 0; padding-left: 18px; }
.cb-canhbao li { margin: 3px 0; }
.cb-ack { display: flex; align-items: flex-start; gap: 7px; margin-top: 10px; font-weight: 600;
cursor: pointer; }
.cb-ack input { width: auto; flex: none; margin-top: 2px; }
.cb-form-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }





.cb-form-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.cb-form-h h3 { margin: 0; }
.cb-buoc { font-size: var(--mm-fs-13); color: var(--text3); font-weight: 600; white-space: nowrap; }
.cb-wizard .cb-form-acts { justify-content: space-between; }


.cb-tom { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: var(--mm-fs-13);
padding: 9px 11px; border-radius: var(--mm-r-btn); background: var(--surface-3);
border: 1px solid var(--border); }
.cb-tom-l { color: var(--text3); }
.cb-doi-tk { margin-left: auto; background: none; border: 0; cursor: pointer; padding: 0 2px;
font: inherit; font-weight: 600; color: var(--accent); text-decoration: underline; }
.cb-trong-tk { font-size: var(--mm-fs-14); color: var(--text2); padding: 12px; border-radius: var(--mm-r-btn);
border: 1px dashed var(--border); background: var(--surface-1); margin-top: 4px; }
.cb-noi-kenh { margin-top: 10px; width: 100%; display: inline-flex; align-items: center;
justify-content: center; gap: 6px; }


.cb-nangcao { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 4px; }
.cb-nangcao summary { cursor: pointer; font-size: var(--mm-fs-14); color: var(--text2); font-weight: 600;
display: flex; align-items: center; gap: 6px; list-style: none; padding: 8px 0; }
.cb-nangcao summary::-webkit-details-marker { display: none; }
.cb-nangcao[open] summary { color: var(--text); }


.cb-log-form { width: min(760px, 96vw); }
.cb-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.cb-tab { background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
padding: 8px 12px; font-size: var(--mm-fs-14); color: var(--text3); font-weight: 600; }
.cb-tab.on { color: var(--text); border-bottom-color: var(--info-line); }
.cb-thu-q { width: 100%; box-sizing: border-box; resize: vertical; }
.cb-thu-nhom { display: block; font-size: var(--mm-fs-13); color: var(--text3); margin: 6px 0; }
.cb-thu-kq { margin-top: 10px; min-height: 24px; font-size: var(--mm-fs-14); }
.cb-thu-tl { white-space: pre-wrap; line-height: 1.55; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--mm-r-chip); }
.cb-log-body { min-height: 120px; max-height: 58vh; overflow-y: auto; }
.cb-sum { font-size: var(--mm-fs-13); color: var(--text3); line-height: 1.55; margin-bottom: 10px; }
.cb-tbl { width: 100%; border-collapse: collapse; font-size: var(--mm-fs-13); }
.cb-tbl th { text-align: left; font-size: var(--mm-fs-12); color: var(--text3); font-weight: 600;
padding: 6px 8px; border-bottom: 1px solid var(--line); }
.cb-tbl td { padding: 7px 8px; border-bottom: 1px solid var(--line); color: var(--text2);
vertical-align: top; }
.cb-tbl .cb-num { text-align: right; width: 64px; color: var(--text); font-weight: 600; }
.cb-turn { border-left: 2px solid var(--line); padding: 6px 0 10px 10px; margin-bottom: 10px; }
.cb-turn.bi { border-left-color: var(--warn-ink); }
.cb-turn.loi { border-left-color: var(--red); }
.cb-turn-h { font-size: var(--mm-fs-12); color: var(--text3); margin-bottom: 4px; }
.cb-q { font-size: var(--mm-fs-14); color: var(--text); font-weight: 600; line-height: 1.5; }
.cb-a { font-size: var(--mm-fs-13); color: var(--text2); line-height: 1.55; margin-top: 3px;
white-space: pre-wrap; }
.cb-src { font-size: var(--mm-fs-12); color: var(--text3); margin-top: 5px;
display: inline-flex; align-items: center; gap: 4px; }




.inud-wrap { position: fixed; inset: 0; z-index: 3400; display: flex; align-items: flex-end; }
.inud-nen { position: absolute; inset: 0; background: var(--scrim); }
.inud-hop {
position: relative; width: 100%; max-width: 520px; margin: 0 auto;
background: var(--bg2); border: 1px solid var(--border);
border-radius: var(--mm-r-card) var(--mm-r-card) 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
box-shadow: var(--shadow-3); animation: inudLen .22s ease;
}
@keyframes inudLen { from { transform: translateY(18px); opacity: .4; } to { transform: none; opacity: 1; } }
.inud-dau { display: flex; gap: 12px; align-items: flex-start; }
.inud-icon { width: 44px; height: 44px; border-radius: var(--mm-r-btn); flex: none; }
.inud-tieude { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.inud-tieude b { color: var(--text); font-size: var(--mm-fs-16); }
.inud-tieude span { color: var(--text2); font-size: var(--mm-fs-13); line-height: 1.5; }
.inud-buoc { margin: 14px 0 4px; padding-left: 20px; color: var(--text2); font-size: var(--mm-fs-13); line-height: 1.8; }
.inud-buoc b { color: var(--text); }
.inud-mo { margin: 14px 0 4px; color: var(--text2); font-size: var(--mm-fs-13); line-height: 1.6; }
.inud-nut { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.inud-day { flex: 1 1 auto; }
.inud-nut button {
border-radius: var(--mm-r-btn); font: 600 13px var(--font); cursor: pointer; padding: 9px 14px;
border: 1px solid var(--border); background: none; color: var(--text2);
}
.inud-tat { font-weight: 500 !important; color: var(--text3) !important; border-color: transparent !important; padding-left: 0 !important; }
.inud-tat:hover { color: var(--text2) !important; }
.inud-sau:hover { color: var(--text); border-color: var(--info-line); }
.inud-cai { background: var(--accent) !important; border-color: var(--accent) !important; color: #fff !important; }
.inud-cai:disabled { opacity: .6; cursor: default; }





.proj-chip-host { display: inline-flex; min-width: 0; }
.proj-chip {
display: inline-flex; align-items: center; gap: 6px; max-width: 220px;
padding: 3px 9px; border-radius: var(--mm-r-pill); cursor: pointer;
border: 1px solid var(--accent-line); background: var(--accent-wash-2);
color: var(--accent); font-family: inherit; font-size: var(--mm-fs-12); letter-spacing: 0;
}
.proj-chip:hover { border-color: var(--accent); color: var(--accent); }
.proj-chip .pc-ico { flex: none; display: inline-flex; }
.pc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pc-meta { flex: none; display: inline-flex; gap: 7px; color: var(--text3); }
.pc-n { display: inline-flex; align-items: center; gap: 3px; }

.pc-dot { display: none; }




@media (max-width: 860px) {
.proj-chip { max-width: 45vw; }
.proj-chip .pc-meta { display: none; }
.proj-chip.co-gi .pc-dot {
display: block; flex: none; width: 6px; height: 6px;
border-radius: 50%; background: var(--accent);
}
}

.pd-wrap { display: none; position: fixed; inset: 0; z-index: 5000; }
.pd-wrap.on { display: block; }
.pd-scrim { position: absolute; inset: 0; background: var(--scrim); }
.pd-panel {
position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%);
display: flex; flex-direction: column; min-height: 0;
background: var(--bg2); border-left: 1px solid var(--border);
box-shadow: -18px 0 44px rgba(0, 0, 0, .38);
}
.pd-grip { display: none; }
.pd-head { flex: none; display: flex; align-items: center; gap: 8px;
padding: 13px 12px; border-bottom: 1px solid var(--border); }
.pd-ico { flex: none; display: inline-flex; color: var(--accent); }
.pd-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
white-space: nowrap; color: var(--text); font-size: var(--mm-fs-16); font-weight: 700; }
.pd-hbtn { flex: none; width: 28px; height: 28px; border-radius: var(--mm-r-chip); cursor: pointer;
display: inline-flex; align-items: center; justify-content: center;
border: 1px solid transparent; background: transparent; color: var(--text3); }
.pd-hbtn:hover { color: var(--text-hi); background: var(--bg3); }
.pd-hbtn.on { color: var(--accent); }




.pd-scope { flex: none; padding: 10px 12px 4px; }
.pd-scope[hidden] { display: none; }
.pd-sc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pd-sc { display: flex; align-items: flex-start; gap: 8px; min-width: 0; text-align: left;
padding: 10px; border-radius: var(--mm-r-btn); cursor: pointer; font-family: inherit;
border: 1px solid var(--border); background: var(--bg3); color: var(--text2); }
.pd-sc:hover:not(:disabled) { border-color: var(--accent-line); color: var(--text); }
.pd-sc.on { border-color: var(--accent); background: var(--accent-wash-2); color: var(--text-hi); }
.pd-sc:disabled { opacity: .55; cursor: not-allowed; }
.pd-sc-ico { flex: none; display: inline-flex; margin-top: 2px; color: var(--text3); }
.pd-sc.on .pd-sc-ico { color: var(--accent); }
.pd-sc-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pd-sc-txt b { font-size: var(--mm-fs-16); font-weight: 600; line-height: 1.3; }
.pd-sc-txt small { font-size: var(--mm-fs-14); color: var(--text3); line-height: 1.35; }
.pd-sc-n { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: var(--mm-r-pill);
font-size: var(--mm-fs-13); font-weight: 600; text-align: center; background: var(--bg2); color: var(--text2); }
.pd-sc.on .pd-sc-n { background: var(--accent); color: var(--bg2); }
.pd-sc-hint { margin-top: 8px; font-size: var(--mm-fs-14); line-height: 1.5; color: var(--text2); }

.pd-tabs { flex: none; display: flex; gap: 2px; padding: 8px 10px 0;
border-bottom: 1px solid var(--border); }
.pd-tab { flex: 1 1 0; padding: 8px 6px; cursor: pointer; font-family: inherit;
font-size: var(--mm-fs-13); color: var(--text3); background: transparent;
border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pd-tab:hover { color: var(--text); }
.pd-tab.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.pd-tab-n { color: var(--text3); font-weight: 400; }

.pd-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px; }
.pd-pane { display: flex; flex-direction: column; gap: 8px; }
.pd-empty { padding: 18px 8px; text-align: center; color: var(--text3); font-size: var(--mm-fs-13); }
.pd-group { font-size: var(--mm-fs-badge); letter-spacing: .1em; color: var(--text3);
padding: 8px 2px 2px; }

.pd-onboard { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px;
padding: 10px 11px; border-radius: var(--mm-r-btn); font-size: var(--mm-fs-13); line-height: 1.5;
border: 1px solid var(--accent-line); background: var(--accent-wash-2); color: var(--text2); }
.pd-onboard .ic { flex: none; color: var(--accent); margin-top: 2px; }
.pd-ob-x { flex: none; align-self: center; padding: 4px 9px; border-radius: var(--mm-r-chip); cursor: pointer;
border: 1px solid var(--accent-line); background: transparent; color: var(--accent);
font-family: inherit; font-size: var(--mm-fs-12); white-space: nowrap; }
.pd-ob-x:hover { background: var(--bg3); }



.pd-instr { min-height: 240px; resize: vertical; padding: 10px 11px; border-radius: var(--mm-r-btn);
border: 1px solid var(--border); background: var(--field-bg); color: var(--text);
font-family: inherit; font-size: var(--mm-fs-14); line-height: 1.6; outline: none; }
.pd-instr:focus { border-color: var(--info-line); }
.pd-instr-foot { display: flex; align-items: center; gap: 10px; font-size: var(--mm-fs-12); }
.pd-hint { flex: 1 1 auto; color: var(--text3); }
.pd-save { flex: none; color: var(--text3); }
.pd-save.saved { color: var(--green); }
.pd-save.err { color: var(--red); }
.pd-count { font-size: var(--mm-fs-12); color: var(--text3); text-align: right; }
.pd-count.day { color: var(--red); text-align: left; }

.pd-row { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: var(--mm-r-btn);
border: 1px solid var(--border); background: var(--bg); }
.pd-row-ico { flex: none; display: inline-flex; color: var(--text3); }
.pd-row-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column;
gap: 1px; padding: 0; border: 0; background: transparent;
font-family: inherit; text-align: left; }
.pd-row-body.mo-duoc { cursor: pointer; }
.pd-row-body.mo-duoc:hover .pd-row-name { color: var(--accent); }
.pd-row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
color: var(--text); font-size: var(--mm-fs-14); }
.pd-row-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
color: var(--text3); font-size: var(--mm-fs-12); }
.pd-row-sub a { color: var(--text3); text-decoration: none; }
.pd-row-sub a:hover { color: var(--accent); text-decoration: underline; }
.pd-row-act { flex: none; width: 26px; height: 26px; border-radius: var(--mm-r-chip); cursor: pointer;
display: inline-flex; align-items: center; justify-content: center;
border: 1px solid transparent; background: transparent; color: var(--text3); }
.pd-row-act:hover { color: var(--text-hi); background: var(--bg3); }
.pd-ghim.on { color: var(--accent); }
.pd-go:hover { color: var(--red); }
.pd-sao:hover { color: var(--accent); }


.pd-row-act.da-chep, .ne-actions button.da-chep { color: var(--green); }
.pd-row-act.chep-loi, .ne-actions button.chep-loi { color: var(--warn-ink); }
.pd-xoa:hover { color: var(--red); background: var(--bg3); }


.pd-tab .ic { vertical-align: -2px; margin-right: 2px; }

.pd-add { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
margin-top: 4px; padding: 7px 11px; border-radius: var(--mm-r-chip); cursor: pointer;
border: 1px dashed var(--border); background: transparent; color: var(--text2);
font-family: inherit; font-size: var(--mm-fs-13); }
.pd-add:hover { border-color: var(--accent-line); color: var(--accent); }

.pd-form { display: flex; flex-direction: column; gap: 8px; padding: 10px;
border-radius: var(--mm-r-btn); border: 1px solid var(--border); background: var(--bg); }
.pd-modes { display: flex; gap: 6px; }
.pd-mode { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center;
gap: 5px; padding: 6px 8px; border-radius: var(--mm-r-chip); cursor: pointer;
border: 1px solid var(--border); background: transparent; color: var(--text3);
font-family: inherit; font-size: var(--mm-fs-13); }
.pd-mode.on { border-color: var(--accent-line); background: var(--accent-wash-2); color: var(--accent); }
.pd-in { padding: 8px 10px; border-radius: var(--mm-r-chip); border: 1px solid var(--border);
background: var(--field-bg); color: var(--text); font-family: inherit;
font-size: var(--mm-fs-13); outline: none; }
.pd-in:focus { border-color: var(--info-line); }
.pd-results { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.pd-res { display: flex; align-items: center; gap: 8px; padding: 6px 7px; border-radius: var(--mm-r-chip); }
.pd-res:hover { background: var(--info-wash); }
.pd-res-ico { flex: none; display: inline-flex; color: var(--text3); }
.pd-res-n { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.pd-res-n b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
color: var(--text); font-size: var(--mm-fs-13); font-weight: 500; }
.pd-res-n i { overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
color: var(--text3); font-size: var(--mm-fs-12); font-style: normal; }
.pd-res-add { flex: none; padding: 4px 9px; border-radius: var(--mm-r-chip); cursor: pointer;
border: 1px solid var(--accent-line); background: transparent; color: var(--accent);
font-family: inherit; font-size: var(--mm-fs-12); }
.pd-res-add:disabled { border-color: var(--border); color: var(--text3); cursor: default; }


.pd-res-add.go { border-color: var(--border); color: var(--text3); }
.pd-res-add.go:hover { border-color: var(--red); color: var(--red); }
.pd-drop { display: flex; align-items: center; justify-content: center; gap: 8px;
padding: 22px 12px; border-radius: var(--mm-r-btn); cursor: pointer; text-align: center;
border: 1px dashed var(--border); background: transparent; color: var(--text3);
font-family: inherit; font-size: var(--mm-fs-13); }
.pd-drop:hover, .pd-drop.over { border-color: var(--accent-line); color: var(--accent); }


.pd-panel.tha-file { outline: 2px dashed var(--accent); outline-offset: -5px; }
.pd-panel.tha-file .pd-drop { border-color: var(--accent-line); color: var(--accent); }
.pd-frow { display: flex; gap: 7px; }
.pd-ok, .pd-huy { padding: 7px 13px; border-radius: var(--mm-r-chip); cursor: pointer;
font-family: inherit; font-size: var(--mm-fs-13); border: 1px solid var(--border); }
.pd-ok { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.pd-huy { background: transparent; color: var(--text3); }
.pd-huy:hover { color: var(--text); }

.pd-note { display: flex; align-items: flex-start; gap: 7px; margin-top: 6px;
color: var(--text3); font-size: var(--mm-fs-12); line-height: 1.55; }
.pd-note .ic { flex: none; margin-top: 2px; }
.pd-up-note { margin-top: 0; }



@media (max-width: 860px) {
.pd-panel { top: auto; left: 0; width: auto; max-height: 88vh;
border-left: 0; border-top: 1px solid var(--border);
border-radius: var(--mm-r-field) var(--mm-r-field) 0 0; box-shadow: 0 -18px 44px rgba(0, 0, 0, .38); }
.pd-grip { display: block; flex: none; width: 38px; height: 4px; border-radius: 2px;
margin: 8px auto 2px; background: var(--border); }
.pd-head { padding: 8px 12px 12px; }
.pd-instr { min-height: 160px; }
}



.proj-chip-host { gap: 6px; align-items: center; }
.cts-btn {
flex: none; width: 26px; height: 26px; border-radius: var(--mm-r-chip); cursor: pointer;
display: inline-flex; align-items: center; justify-content: center;
border: 1px solid var(--border); background: transparent; color: var(--text3);
}
.cts-btn:hover { color: var(--accent); border-color: var(--accent-line); }


.pd-row.mat { opacity: .55; }
.pd-row.mat .pd-row-name { text-decoration: line-through; }


.theo-loi-cho { opacity: .55; animation: theoLoiNhap 1.2s ease-in-out infinite; }
@keyframes theoLoiNhap { 0%, 100% { opacity: .25; } 50% { opacity: .8; } }


.msg-nhap-giong .bubble { opacity: .62; border-style: dashed; }
.msg-nhap-giong .bubble .utext::after { content: " …"; opacity: .6; }






.msg-viec .bubble { border-left: 3px solid var(--ok-line); }
.msg-viec.viec-blocked .bubble, .msg-viec.viec-timeout .bubble { border-left-color: var(--warn-line); }
.msg-viec.viec-failed .bubble { border-left-color: var(--red); }
.msg-viec.viec-cancelled .bubble { border-left-color: var(--hairline); }
.msg-viec.viec-hoi .bubble { border-left-color: var(--link-ink); }
.viec-hoi .viec-head .viec-ico { color: var(--link-ink); }

.ww-head { display: flex; align-items: center; gap: 8px; margin: 22px 0 8px; font-size: var(--mm-fs-16); color: var(--text);
font-weight: 600; border-bottom: 1px solid var(--hairline); padding-bottom: 6px; }
.ww-form { margin: 10px 0 18px; padding: 14px; border: 1px solid var(--hairline); border-radius: var(--mm-r-btn);
background: var(--surface-1); display: flex; flex-direction: column; gap: 10px; }
.ww-form input:not([type=checkbox]) { font-size: var(--mm-fs-16); padding: 9px 11px; border-radius: var(--mm-r-chip); border: 1px solid var(--hairline);
background: var(--bg2); color: var(--text); width: 100%; box-sizing: border-box; }
.ww-row { gap: 12px; flex-wrap: wrap; }
.ww-row .si-field { flex: 1 1 200px; }
.ww-check { display: flex; gap: 8px; align-items: center; font-size: var(--mm-fs-16); }
.ww-msg { font-size: var(--mm-fs-14); color: var(--warn-ink); margin-left: 10px; }
.ww-warn { margin: 6px 0 10px; padding: 10px 12px; border: 1px solid rgba(224,102,74,.5); border-radius: var(--mm-r-chip);
background: rgba(224,102,74,.08); font-size: var(--mm-fs-14); line-height: 1.5; }
.ww-card .ww-url { font-size: var(--mm-fs-14); margin-top: 4px; overflow-wrap: anywhere; }
.ww-card .ww-meta { font-size: var(--mm-fs-13); color: var(--text3); margin-top: 4px; }
.ww-card .ww-alert { font-size: var(--mm-fs-14); margin-top: 6px; white-space: pre-wrap; }
.ww-card .ww-err { font-size: var(--mm-fs-13); color: var(--warn-ink); margin-top: 4px; }
.ww-card .ww-actions { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.ww-card .ww-del { color: var(--red); }
.viec-tl { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 10px; }
.viec-tl-o { flex: 1 1 220px; min-width: 0; min-height: 44px; resize: vertical; padding: 9px 11px;
border-radius: var(--mm-r-btn); border: 1px solid var(--hairline); background: var(--surface-1); color: var(--text);
font: inherit; font-size: var(--mm-fs-16); line-height: 1.4; }
.viec-tl-gui { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: var(--mm-r-btn);
border: 1px solid var(--link-ink); background: rgba(127,176,255,.14); color: var(--text-hi); font-size: var(--mm-fs-16); cursor: pointer; }
.viec-tl-gui[disabled] { opacity: .5; cursor: default; }
.viec-tl-gui svg, .viec-tl-xong svg { width: 16px; height: 16px; }
.viec-tl-bao { flex-basis: 100%; color: var(--red); font-size: var(--mm-fs-14); }
.viec-tl-xong { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: var(--mm-fs-16); }
.viec-head {
display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px;
margin: -4px 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--hairline);
font-family: var(--font); font-size: var(--mm-fs-16); line-height: 1.4;
}
.viec-head .viec-ico { display: inline-flex; color: var(--green); }
.viec-blocked .viec-head .viec-ico, .viec-timeout .viec-head .viec-ico { color: var(--warn-ink); }
.viec-failed .viec-head .viec-ico { color: var(--red); }
.viec-cancelled .viec-head .viec-ico { color: var(--text3); }
.viec-head .viec-ico svg { width: 18px; height: 18px; }
.viec-head .viec-nhan { font-weight: 600; color: var(--text); }
.viec-head .viec-ten {
flex: 1 1 160px; min-width: 0; color: var(--text2);
overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.viec-head .viec-mo {
margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
background: none; border: 1px solid var(--hairline); border-radius: var(--mm-r-chip);
padding: 6px 10px; min-height: 36px; cursor: pointer;
color: var(--text2); font: inherit; font-size: var(--mm-fs-16);
}
.viec-head .viec-mo:hover { color: var(--text); border-color: var(--text3); }
.viec-head .viec-mo svg { width: 16px; height: 16px; }

.msg-javis .viec-giao {
display: flex; align-items: center; gap: 8px; margin: 6px 0 0 4px; max-width: 72ch;
font-family: var(--font); font-size: var(--mm-fs-16); color: var(--text2);
}
.msg-javis .viec-giao svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--accent); }
.msg-javis .viec-giao .viec-ten { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--text); }











.pet {
position: fixed; z-index: 390; width: var(--pet-size, 72px); height: var(--pet-size, 72px);
transform: translateY(-50%); pointer-events: none;
}


.pet[hidden], .pet-menu[hidden] { display: none; }
.pet-body {
flex: none; width: 100%; height: 100%; padding: 0; border: 0; background: none;
cursor: grab; pointer-events: auto; touch-action: none; -webkit-tap-highlight-color: transparent;
transition: transform .34s cubic-bezier(.2,.8,.2,1), filter .34s ease;
filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .28));
}
.pet[data-dragging] .pet-body { cursor: grabbing; transition: none; }


.pet[data-out="0"][data-side="right"] .pet-body { transform: translateX(48%); }
.pet[data-out="0"][data-side="left"] .pet-body { transform: translateX(-48%); }
.pet[data-out="1"] .pet-body { transform: none; }
.pet-body:focus-visible { outline: 2px solid var(--pet-face, var(--accent)); outline-offset: 4px; border-radius: 50%; }
.pet-body svg { width: 100%; height: 100%; overflow: visible; display: block; }
.pet-face { fill: var(--pet-face, #f28c28); }
.pet-eyes { fill: var(--pet-eye, #201e1e); }
.pet-line { fill: none; stroke: var(--pet-eye, #201e1e); stroke-width: 7; stroke-linecap: round; }


.pet-ring {




fill: none; stroke: var(--pet-ring, #f7c98f); stroke-width: 5; stroke-linecap: round;





transition: opacity .3s ease;




transform: scale(1.14); transform-origin: 160px 160px;
}







.pet[data-state]:not([data-state="idle"]):not([data-state="paused"]) .pet-ring {
stroke: var(--pet-face, #f28c28); stroke-width: 8;
filter: drop-shadow(0 0 5px var(--pet-face, #f28c28));
}
.pet-rig { transform-origin: 160px 160px; }






.pet[data-anim] .pet-body svg { transform-origin: 50% 80%; }
.pet[data-anim="squish"] .pet-body svg { animation: petSquish .5s cubic-bezier(.3, 1.6, .5, 1); }
.pet[data-anim="hop"] .pet-body svg { animation: petHop .75s cubic-bezier(.3, 1.4, .5, 1); }
.pet[data-anim="shake"] .pet-body svg { animation: petShake .7s ease-in-out; }
@keyframes petSquish { 0% { transform: scale(1, 1); } 30% { transform: scale(1.12, .84); } 65% { transform: scale(.94, 1.08); } 100% { transform: scale(1, 1); } }
@keyframes petHop { 0% { transform: translateY(0) scale(1, 1); } 20% { transform: translateY(0) scale(1.08, .9); }
50% { transform: translateY(-18%) scale(.95, 1.06); } 80% { transform: translateY(0) scale(1.05, .95); } 100% { transform: translateY(0) scale(1, 1); } }
@keyframes petShake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); }
60% { transform: rotate(-7deg); } 80% { transform: rotate(4deg); } }


.pet[data-mat="gang"]:not([data-anim]) .pet-body svg { animation: petRan .16s linear infinite; transform-origin: 50% 70%; }
@keyframes petRan { 0%, 100% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-1.2%) rotate(-1.2deg); }
75% { transform: translateX(1.2%) rotate(1.2deg); } }

.pet[data-ngu="1"] .pet-body svg { animation: petNgu 3.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes petNgu { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.03, .96); } }





.pet-menu {
pointer-events: auto; position: absolute; top: 50%; transform: translateY(-50%);
display: flex; flex-direction: column; gap: 1px; padding: 6px;
background: var(--bg2); border: 1px solid var(--hairline); border-radius: var(--mm-r-field);
box-shadow: 0 18px 44px rgba(0, 0, 0, .38), 0 2px 6px rgba(0, 0, 0, .18);
animation: petMenuVao .2s cubic-bezier(.2, .8, .2, 1);
}
.pet[data-side="right"] .pet-menu { right: calc(100% + 10px); transform-origin: right center; }
.pet[data-side="left"] .pet-menu { left: calc(100% + 10px); transform-origin: left center; }
.pet-menu button {
display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px;
padding: 8px 14px 8px 8px; border: 0; border-radius: var(--mm-r-btn); cursor: pointer;
background: transparent; color: var(--text2); font: inherit; font-size: var(--mm-fs-14); white-space: nowrap;
transition: background .12s ease, color .12s ease;
}
.pet-menu button:hover, .pet-menu button:focus-visible { background: var(--surface-2); color: var(--text); }


.pet-menu button span {
flex: none; width: 28px; height: 28px; display: inline-flex; align-items: center;
justify-content: center; border-radius: var(--mm-r-btn); background: var(--surface-1); color: var(--text3);
transition: background .12s ease, color .12s ease;
}
.pet-menu button:hover span { background: var(--accent-wash-2); color: var(--accent); }
.pet-menu button span svg { width: 16px; height: 16px; }
.pet-menu button b { font-weight: 500; }


@keyframes petMenuVao {
from { opacity: 0; transform: translateY(-50%) scale(.9); }
to { opacity: 1; transform: translateY(-50%) scale(1); }
}


.pet-picker { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.pet-pick {
display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
padding: 7px 4px 5px; width: 62px; border: 1px solid transparent; border-radius: var(--mm-r-btn);
background: transparent; color: var(--text3); font: inherit; font-size: var(--mm-fs-12);
}
.pet-pick svg { width: 32px; height: 32px; }
.pet-pick:hover { background: var(--surface-1); color: var(--text); }
.pet-pick[aria-pressed="true"] { border-color: var(--accent-line); background: var(--surface-2); color: var(--text); }
.pet-swatch { width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.pet-swatch i { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(128, 128, 128, .28); }
.pet-swatch[aria-pressed="true"] { border-color: var(--accent); }



.pet-ed-head { margin-top: 14px; }
.pet-editor > .pet-ed-head:first-child { margin-top: 0; }


.pet-swatch-custom { position: relative; display: inline-block; box-sizing: border-box; }
.pet-swatch-custom i { background: conic-gradient(#e5484d, #f5d014, #38b286, #1ea3c8, #4052c9, #ad55c3, #e5484d); }
.pet-swatch-custom input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0;
border: 0; opacity: 0; cursor: pointer; }
.pet-swatch-custom:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pet-hex { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; font-size: var(--mm-fs-16); color: var(--text2); font-weight: 400; }
.pet-hex input { width: 8.5em; margin: 0; padding: 6px 10px; font: 16px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
text-transform: uppercase; color: var(--text); background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--mm-r-chip); }
.pet-hex input[aria-invalid="true"] { border-color: #d83137; }

.pet-range-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: var(--mm-fs-16); color: var(--text3); }
.pet-range-row span { flex: none; }
.pet-range { flex: 1; min-width: 0; height: 32px; margin: 0; accent-color: var(--accent); cursor: pointer; }









@media (max-width: 700px) {
.pet { width: min(var(--pet-size, 72px), 100px); height: min(var(--pet-size, 72px), 100px); }
.pet-menu button { font-size: var(--mm-fs-13); }
}
@media (prefers-reduced-motion: reduce) {
.pet-body, .pet-menu, .pet-body svg { transition: none !important; animation: none !important; }
}




.brand-pet { filter: none !important; }
.brand-pet svg { display: block; width: 30px; height: 30px; overflow: visible; }
.brand .brand-pet svg { width: 22px; height: 22px; }


.pet-pick-size { justify-content: flex-end; min-height: 74px; }
.pet-pick-size i {
display: block; border-radius: 50%; background: var(--pet-face, var(--accent));
margin-bottom: 4px; flex: none;
}


.cb-tk-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.cb-tk { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border);
border-radius: var(--mm-r-btn); cursor: pointer; background: var(--surface-1); margin: 0; font-weight: 400; }
.cb-form .cb-tk input { width: auto; margin: 0; flex: none; }
.cb-tk-logo { display: inline-flex; flex: none; }
.cb-tk-text { display: flex; flex-direction: column; min-width: 0; }
.cb-tk-text b { font-size: var(--mm-fs-14); color: var(--text); }
.cb-tk-text small { font-size: var(--mm-fs-12); color: var(--text3); }
.cb-them-tk { margin-top: 10px; border: 1px dashed var(--border); border-radius: var(--mm-r-btn); padding: 6px 10px 10px; }
.cb-them-tk summary { cursor: pointer; font-size: var(--mm-fs-13); color: var(--text2); display: flex; align-items: center; gap: 6px;
list-style: none; }
.cb-them-tk summary::-webkit-details-marker { display: none; }
.cb-them-tk[open] summary { color: var(--text); margin-bottom: 4px; }


.qs-advanced { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 8px; }
.qs-advanced > summary { cursor: pointer; color: var(--text2); font-size: var(--mm-fs-13); font-weight: 600; padding: 10px 0; min-height: 44px; box-sizing: border-box; }
.qs-advanced > summary:focus-visible { outline: 2px solid var(--accent, #8b5cf6); outline-offset: 3px; border-radius: 4px; }
.qs-advanced[open] > summary { color: var(--text); margin-bottom: 4px; }
.qs-advanced .qs-field { flex-wrap: wrap; }
.qs-advanced .qs-field > .qs-hint, .qs-advanced .qs-field > .gcard-meta { flex-basis: 100%; margin-bottom: 0; }

.adaptive-draft-controls{display:flex;flex-wrap:wrap;gap:8px;padding:10px;align-items:center}.adaptive-draft-controls[hidden]{display:none}.adaptive-draft-controls [data-status]{flex:1 1 100%;font-size:var(--mm-fs-13)}.adaptive-draft-controls button{min-height:44px}

.qs-field > .v2-voice-row { flex: 0 1 400px; min-width: 0; }
@media (max-width: 600px) { .qs-field > .v2-voice-row { flex: 0 0 auto; } }

.call-bar { display: flex; align-items: center; gap: 10px; flex: none; margin: 0 0 8px; padding: 6px 8px 6px 12px;
border: 1px solid var(--border); border-radius: var(--mm-r-btn); background: var(--surface-1, rgba(127,127,127,.06)); font-size: var(--mm-fs-13); }
.call-bar[hidden] { display: none; }
.call-bar .call-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--text3); }
.call-bar[data-state="listening"] .call-dot { background: #22c55e; }
.call-bar[data-state="speaking"] .call-dot { background: var(--accent); animation: call-pulse 1.1s ease-in-out infinite; }
.call-bar[data-state="working"] .call-dot { background: #f59e0b; animation: call-pulse 1.4s ease-in-out infinite; }
.call-bar[data-state="connecting"] .call-dot, .call-bar[data-state="reconnecting"] .call-dot { background: #f59e0b; }
.call-bar[data-state="muted"] .call-dot { background: #ef4444; }
.call-bar .call-engine { font-weight: 600; color: var(--text1, inherit); flex: none; }
.call-bar .call-state { color: var(--text2); min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-bar .call-clock { color: var(--text3); font-variant-numeric: tabular-nums; flex: none; }
.call-bar .call-btn { flex: none; border: 1px solid var(--border); background: none; color: var(--text2); border-radius: var(--mm-r-chip);
padding: 4px 10px; cursor: pointer; font-size: var(--mm-fs-13); line-height: 1.3; }
.call-bar .call-btn:hover { color: var(--accent); border-color: var(--accent); }
.call-bar .call-mute[aria-pressed="true"] { color: #ef4444; border-color: #ef4444; }
.call-bar .call-hangup { background: #ef4444; border-color: #ef4444; color: #fff; }
.call-bar .call-hangup:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
@keyframes call-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (max-width: 600px) { .call-bar { gap: 8px; padding: 6px 6px 6px 10px; } .call-bar .call-engine { display: none; } }

.mic-big.in-call { background: #ef4444 !important; border-color: #ef4444 !important; color: #fff !important; }

.dictation-status { font-size: var(--mm-fs-12); color: var(--text2); padding: 4px 12px; }
#callBtn.in-call { color: #e04545; background: rgba(224,69,69,.12); }


.call-bar { padding: 12px 16px; gap: 14px; border-radius: var(--mm-r-card); box-shadow: 0 5px 18px #31204c18; border-color: #9274df55; }
.call-bar .call-btn { width: 68px; height: 68px; min-width: 68px; padding: 7px 2px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: var(--mm-fs-12); font-weight: 650; transition: transform .18s, box-shadow .18s; box-shadow: 3px 4px 10px #35245625, -3px -3px 8px #ffffff75; }
.call-bar .call-btn::before { content: ""; width: 23px; height: 23px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' d='M9 5a3 3 0 0 1 6 0v7a3 3 0 0 1-6 0V5zm-3 6v1a6 6 0 0 0 12 0v-1m-6 7v4m-4 0h8'/%3E%3C/svg%3E") center/contain no-repeat; }
.call-bar .call-hangup::before { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 16l3-3v-3c4-2 8-2 12 0v3l3 3 2-3c-5-8-17-8-22 0z'/%3E%3C/svg%3E"); }
.call-bar .call-hangup { background: #ef4444; border: 2px solid #ff8a8a; box-shadow: 0 5px 15px #ef444445; color: white; }
.call-bar .call-btn:hover { transform: translateY(-2px) scale(1.04); }
.call-bar .call-btn:active { transform: scale(.95); }
.call-bar .call-btn:focus-visible, .call-resume:focus-visible { outline: 3px solid #8460e8; outline-offset: 4px; }
.call-bar .call-state { white-space: normal; line-height: 1.4; }
.call-bar .call-dot { width: 14px; height: 14px; box-shadow: 0 0 0 6px #8460e815; }
.call-bar[data-state="listening"] .call-dot { animation: call-pulse 1.6s ease-in-out infinite; }
.call-resume { border-radius: var(--mm-r-card); padding: 10px 14px; border: 1px solid #8460e8; color: var(--accent); background: var(--bg); }
.call-resume[hidden] { display: none; }
#voiceBtn, #callBtn { border-radius: 50%; min-width: 48px; min-height: 48px; }
#voiceBtn.recording { animation: call-pulse 1.4s ease-in-out infinite; box-shadow: 0 0 0 5px #8460e828; }
@media (max-width: 600px) { .call-bar { flex-wrap: wrap; padding: 10px; gap: 10px; } .call-bar .call-btn { width: 58px; height: 58px; min-width: 58px; } .call-bar .call-clock { font-size: var(--mm-fs-12); } .call-resume { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .call-bar *, #voiceBtn.recording { animation: none !important; transition: none !important; } }

@media (max-width: 600px) {
.call-bar { display: grid; grid-template-columns: 14px minmax(0, 1fr) 58px 58px; }
.call-bar .call-dot { grid-column: 1; grid-row: 1; }
.call-bar .call-state { grid-column: 2 / -1; grid-row: 1; }
.call-bar .call-clock { grid-column: 1 / 3; grid-row: 2; }
.call-bar .call-mute { grid-column: 3; grid-row: 2; }
.call-bar .call-hangup { grid-column: 4; grid-row: 2; }
.call-bar .call-resume { grid-column: 1 / -1; grid-row: 3; }
}


.cb-form label.cb-chk { display: flex; align-items: center; gap: 10px; margin: 0; padding: 7px 4px; font-weight: 500; cursor: pointer; }
.cb-form label.cb-chk input { width: 18px; height: 18px; flex: none; margin: 0; }
.cb-form label.cb-chk em { margin-left: auto; font-style: normal; font-size: var(--mm-fs-12); color: var(--text3); }
.cb-agent-phu, .cb-db-ds { max-height: 220px; overflow-y: auto; border-radius: var(--mm-r-btn); padding: 4px 8px; }
.cb-db { margin-top: 8px; }
.cb-db-panel { margin-top: 8px; }
.cb-db-panel .cb-db-q { width: 100%; margin-bottom: 6px; }


.cb-nk-tieude { margin: 18px 0 4px; font-size: var(--mm-fs-14); font-weight: 700; color: var(--text); }
.cb-nk { margin: 10px 0; padding: 10px 12px 14px; border-radius: var(--mm-r-field); background: color-mix(in srgb, var(--text) 4%, transparent); }
.cb-nk-dau { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cb-nk-dau .nk-ten { flex: 1 1 160px; min-width: 0; }
.cb-nk textarea, .cb-nk input.nk-tukhoa, .cb-nk select { width: 100%; }
.cb-nk-dau select { width: auto; flex: 1 1 200px; }


.cb-tv { margin: 8px 0; max-height: 200px; overflow-y: auto; }
.cb-tv-dong { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 4px; font-size: var(--mm-fs-13); }
.cb-tv-dong em { font-style: normal; color: var(--text3); font-size: var(--mm-fs-12); margin-left: 6px; }
.cb-tv-up { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; margin-top: 4px; }


.cside-chon{display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding:4px 8px}
.cside-chon-n{font-size:var(--mm-fs-12);opacity:.8;margin-right:auto}
.cside-chon-btn{font-size:var(--mm-fs-12);padding:3px 8px;border-radius:var(--mm-r-chip);border:1px solid rgba(120,160,255,.3);background:transparent;color:inherit;cursor:pointer}
.cside-chon-btn:disabled{opacity:.4;cursor:default}
.ci-chon{vertical-align:middle;margin-right:4px}
