:root {
  --blue: #0878f9;
  --blue-strong: #0067df;
  --blue-soft: #eaf3ff;
  --blue-pale: #f6f9ff;
  --ink: #171b23;
  --ink-2: #3f4959;
  --ink-3: #778191;
  --line: #e2e6ec;
  --line-strong: #d2d9e3;
  --surface: #fff;
  --surface-2: #f7f9fc;
  --surface-3: #f1f4f8;
  --sidebar: #f3f3f4;
  --green: #16825e;
  --green-soft: #eaf8f3;
  --amber: #a96b0d;
  --amber-soft: #fff6e4;
  --red: #c33e4c;
  --red-soft: #fff0f2;
  --purple: #7356d9;
  --shadow-sm: 0 1px 2px rgba(20, 31, 48, .05);
  --shadow-md: 0 12px 32px rgba(30, 48, 78, .10);
  --sidebar-width: 260px;
  --system-height: 42px;
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #fff; color: var(--ink); }
body { min-width: 1120px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(8, 120, 249, .22); outline-offset: 2px; }
.lucide { width: 18px; height: 18px; stroke-width: 1.8; }
.hidden { display: none !important; }
.desktop-shell { height: 100vh; display: grid; grid-template-rows: var(--system-height) minmax(0, 1fr); }

.system-bar { display: flex; align-items: center; gap: 16px; padding: 0 14px; background: #f6f6f7; border-bottom: 1px solid #dedfe2; user-select: none; }
.brand-wordmark { width: 78px; height: 22px; object-fit: contain; object-position: left center; }
.system-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: #f0f1f3; color: #263241; }
.system-menu { display: flex; align-items: center; gap: 7px; }
.system-menu button { min-width: 48px; height: 30px; border: 0; background: transparent; color: #626a77; font-size: 14px; border-radius: 6px; }
.system-menu button:hover { background: #e9eaed; color: #1f2937; }
.window-controls { margin-left: auto; display: flex; align-items: center; gap: 28px; color: #252c35; font-size: 16px; }
.workspace-shell { min-height: 0; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }

.sidebar { min-height: 0; display: flex; flex-direction: column; padding: 14px 9px 12px; background: var(--sidebar); border-right: 1px solid #e0e1e4; }
.new-thread { height: 44px; display: flex; align-items: center; gap: 13px; padding: 0 16px; border: 0; border-radius: 9px; background: #e4e4e6; color: #171a20; font-size: 15px; font-weight: 700; }
.new-thread:hover { background: #dcdde0; }
.new-thread .lucide { width: 17px; }
.side-nav { display: grid; gap: 4px; margin-top: 10px; }
.side-link { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 0 13px; border: 0; border-radius: 8px; background: transparent; color: #425064; text-align: left; font-size: 14px; font-weight: 650; }
.side-link:hover { background: #e7e8eb; }
.side-link.active { background: #e1e2e5; color: #141922; }
.side-link .side-count { margin-left: auto; color: #6e7786; font-size: 12px; font-weight: 600; }
.side-link.muted { color: #9aa2ad; }
.soon { margin-left: auto; padding: 3px 8px; border: 1px solid #dfe1e5; border-radius: 999px; font-size: 10px; font-weight: 600; color: #a0a6ae; }
.side-section-title { display: flex; align-items: center; gap: 8px; margin: 18px 11px 7px; color: #637085; font-size: 14px; font-weight: 650; }
.side-section-title .lucide { width: 14px; }
.side-section-title span:last-child { margin-left: auto; }
.workspace-group { display: grid; gap: 3px; }
.workspace-group.compact { margin-top: 7px; }
.workspace-title { min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 0; border-radius: 8px; background: #e5e5e7; color: #202630; text-align: left; }
.workspace-title strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.workspace-title span { margin-left: auto; color: #6d7684; font-size: 12px; }
.workspace-title .lucide { width: 17px; }
.thread-row { min-height: 35px; display: flex; align-items: center; gap: 8px; margin-left: 50px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #3f4855; font-size: 12px; text-align: left; }
.thread-row span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-row small { color: #6c7583; white-space: nowrap; }
.thread-row.active { background: #e0e0e2; color: #171b23; font-weight: 700; }
.sidebar-spacer { flex: 1; min-height: 18px; }
.mascot-stage { height: 178px; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.mascot-stage img { width: 170px; height: 170px; object-fit: cover; object-position: 50% 8%; border-radius: 0; mix-blend-mode: multiply; }
.settings-link { min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 13px; border: 0; background: transparent; color: #252b34; font-size: 13px; }
.settings-link:hover { background: #e7e8eb; border-radius: 8px; }
.settings-icon { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #dbe2ed; border-radius: 50%; background: #fff; color: var(--blue); }

.main-panel { min-width: 0; min-height: 0; overflow: hidden; background: #fff; }
.screen { height: 100%; min-height: 0; display: flex; flex-direction: column; background: #fff; }
.screen-scroll { min-height: 0; flex: 1; overflow: auto; scrollbar-width: thin; scrollbar-color: #cfd6df transparent; }
.screen-scroll::-webkit-scrollbar { width: 8px; }
.screen-scroll::-webkit-scrollbar-thumb { background: #cfd6df; border-radius: 8px; }

.hub-header { height: 64px; flex: none; display: flex; align-items: center; gap: 18px; padding: 0 30px; border-bottom: 1px solid var(--line); background: #fff; }
.hub-tabs { display: flex; align-items: center; gap: 5px; }
.hub-tab { height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: #566174; font-size: 13px; font-weight: 650; }
.hub-tab:hover { background: #f1f6fd; color: var(--blue); }
.hub-tab.active { background: var(--blue-soft); color: var(--blue); }
.hub-tab .lucide { width: 16px; height: 16px; }
.header-spacer { flex: 1; }
.search-box { width: min(330px, 28vw); height: 42px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: #748091; }
.search-box:focus-within { border-color: #8cbcff; box-shadow: 0 0 0 3px rgba(8, 120, 249, .1); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-box .lucide { width: 17px; }
.hub-content { min-height: 0; flex: 1; overflow: auto; padding: 22px 30px 40px; background: #f8fafc; }
.content-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.content-head h1 { margin: 0 0 5px; font-size: 25px; letter-spacing: 0; }
.content-head p { margin: 0; color: var(--ink-3); font-size: 13px; }
.result-count { color: var(--ink-3); font-size: 12px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(250px, 1fr)); gap: 16px; align-items: stretch; }
.catalog-card { min-height: 154px; position: relative; display: flex; flex-direction: column; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow-sm); text-align: left; color: var(--ink); overflow: hidden; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.catalog-card:hover { border-color: #b9d3f7; box-shadow: 0 9px 24px rgba(35, 71, 121, .09); transform: translateY(-1px); }
.catalog-card:active { transform: translateY(0); }
.card-top { display: flex; align-items: center; gap: 13px; }
.card-icon { width: 46px; height: 46px; display: grid; place-items: center; flex: none; border: 1px solid #cfe0f6; border-radius: 10px; background: #f6faff; color: var(--blue); }
.card-icon .lucide { width: 23px; height: 23px; }
.card-icon.purple { background: #f4f1ff; border-color: #ddd5ff; color: #7254dc; }
.card-icon.green { background: #effaf6; border-color: #cdece0; color: #168461; }
.card-icon.dark { background: #eef1f5; border-color: #d6dce5; color: #273345; }
.card-icon.ai { font-size: 13px; font-weight: 800; letter-spacing: 0; }
.card-copy { min-width: 0; flex: 1; }
.card-copy h2 { margin: 0 0 4px; font-size: 16px; line-height: 1.25; letter-spacing: 0; }
.card-copy small { color: var(--ink-3); font-size: 11px; }
.catalog-card > p { margin: 0; color: #667184; font-size: 13px; line-height: 1.65; }
.card-enter { position: absolute; right: 16px; bottom: 16px; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #d9e0e8; border-radius: 50%; background: #fff; color: #445064; }
.card-enter .lucide { width: 16px; }
.skill-card { padding-right: 62px; }
.skill-card .card-enter { background: var(--blue-soft); border-color: transparent; color: var(--blue); }
.connection-card { min-height: 148px; }
.connection-card.connected { border-color: #bde6d7; background: #fcfffe; }
.connect-action { position: absolute; right: 18px; top: 18px; min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 10px; border: 0; border-radius: 18px; background: #dce9ff; color: #35527c; font-weight: 700; font-size: 12px; }
.connect-action .lucide { width: 17px; }
.connection-card.connected .connect-action { background: var(--green-soft); color: var(--green); }
.connection-status { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #b4bdc8; }
.connected .status-dot { background: var(--green); }
.empty-filter { grid-column: 1 / -1; min-height: 250px; display: grid; place-items: center; color: var(--ink-3); }

.detail-screen { background: #f7f9fc; }
.detail-header { min-height: 64px; flex: none; display: flex; align-items: center; gap: 11px; padding: 0 22px; border-bottom: 1px solid var(--line); background: #fff; }
.back-button { width: 40px; min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #354154; }
.back-button:hover { border-color: #a9c9f5; color: var(--blue); background: #f8fbff; }
.detail-app-icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #cfe0f6; border-radius: 8px; background: #eef6ff; color: var(--blue); }
.detail-app-icon .lucide { width: 18px; height: 18px; }
.detail-title { min-width: 0; }
.detail-title h1 { margin: 0 0 2px; font-size: 16px; letter-spacing: 0; }
.detail-title p { margin: 0; color: var(--ink-3); font-size: 11px; }
.detail-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.detail-body { min-height: 0; flex: 1; overflow: auto; }
.detail-tabs { height: 60px; display: flex; align-items: stretch; gap: 12px; padding: 0 26px; border-bottom: 1px solid var(--line); background: #fff; }
.detail-tab { min-width: 72px; position: relative; padding: 0 18px; border: 0; background: transparent; color: #454f60; font-weight: 700; }
.detail-tab:hover { color: var(--blue); }
.detail-tab.active { color: var(--blue); background: #edf5ff; border-radius: 9px 9px 0 0; }
.detail-tab.active::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--blue); }
.primary-button, .secondary-button, .ghost-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; border-radius: 8px; font-weight: 700; }
.primary-button { border: 1px solid var(--blue); background: var(--blue); color: #fff; box-shadow: 0 5px 14px rgba(8, 120, 249, .17); }
.primary-button:hover { background: var(--blue-strong); border-color: var(--blue-strong); }
.secondary-button { border: 1px solid var(--line-strong); background: #fff; color: #354154; }
.secondary-button:hover { border-color: #a9c9f5; color: var(--blue); }
.ghost-button { border: 0; background: transparent; color: #566174; }
.ghost-button:hover { background: #f0f4f8; color: var(--blue); }
.primary-button.full { width: 100%; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #526072; }
.icon-button:hover { color: var(--blue); border-color: #aacbf6; }
.segmented { display: flex; align-items: center; padding: 3px; border-radius: 9px; background: #eef1f5; }
.segmented button { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border: 0; border-radius: 7px; background: transparent; color: #5f6979; font-weight: 650; }
.segmented button.active { background: #fff; color: var(--blue); box-shadow: var(--shadow-sm); }
.segmented.wide button { flex: 1; }

/* Home and composer */
.home-screen { background: #fff; }
.home-top { height: 62px; display: flex; align-items: center; padding: 0 24px; border-bottom: 1px solid var(--line); }
.home-top h1 { margin: 0; font-size: 16px; }
.home-top span { margin-left: 13px; padding-left: 13px; border-left: 1px solid var(--line); color: #9aa2af; font-size: 13px; }
.home-center { min-height: 0; flex: 1; display: flex; flex-direction: column; align-items: center; padding: 76px 40px 30px; overflow: auto; }
.home-center h2 { margin: 0 0 24px; color: var(--blue); font-size: 34px; letter-spacing: 0; }
.mode-toggle { display: flex; padding: 4px; border-radius: 24px; background: #eef0f3; }
.mode-toggle span { min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 18px; border-radius: 20px; color: #566174; }
.mode-toggle span.active { background: #1a1d21; color: #fff; }
.quick-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 72px; }
.quick-chip { min-height: 38px; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; border: 1px solid var(--line); border-radius: 20px; background: #fff; color: #4b5667; }
.quick-chip:hover { border-color: #acd0ff; color: var(--blue); }
.composer { width: min(920px, calc(100% - 48px)); min-height: 154px; margin-top: 18px; display: flex; flex-direction: column; padding: 18px 20px 16px; border: 1px solid #dfe3e9; border-radius: 24px; background: #fff; box-shadow: 0 18px 42px rgba(31, 49, 78, .09); }
.composer textarea { min-height: 70px; flex: 1; resize: none; border: 0; outline: 0; color: #283446; font-size: 15px; line-height: 1.6; }
.skill-citation { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; color: #20252d; font-size: 15px; }
.skill-citation strong { color: var(--blue); }
.skill-citation .lucide { color: var(--blue); }
.composer-foot { display: flex; align-items: center; }
.composer-add { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #384455; }
.composer-add:hover { background: #f2f5f8; }
.model-name { margin-left: auto; color: #6f7784; font-size: 13px; }
.send-button { width: 44px; height: 44px; display: grid; place-items: center; margin-left: 12px; border: 0; border-radius: 50%; background: var(--blue); color: #fff; }
.send-button:hover { background: var(--blue-strong); }

/* Calendar */
.calendar-top-status { min-height: 42px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #354154; font-size: 12px; }
.calendar-top-status .lucide { color: var(--green); }
.calendar-shell { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 316px; background: #f7f9fc; }
.calendar-main { min-width: 0; padding: 24px; border-right: 1px solid var(--line); }
.calendar-side { padding: 24px 20px; background: #fff; }
.section-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.section-heading-row h2 { margin: 0 0 5px; font-size: 21px; }
.section-heading-row p { margin: 0; color: var(--ink-3); font-size: 12px; }
.metric-row { display: flex; gap: 9px; }
.metric { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #586476; font-size: 12px; }
.warning-strip { min-height: 58px; display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 0 14px; border: 1px solid #f0cf8f; border-radius: 8px; background: var(--amber-soft); color: #5d4c29; }
.warning-strip strong { display: block; font-size: 13px; }
.warning-strip span { color: #8a7751; font-size: 11px; }
.warning-strip button { margin-left: auto; }
.empty-calendar { min-height: 240px; display: grid; place-items: center; margin-top: 18px; border: 1px dashed #d6dde7; border-radius: 8px; background: #fff; text-align: center; color: #536075; }
.empty-calendar .lucide { width: 38px; height: 38px; margin-bottom: 10px; color: var(--blue); }
.empty-calendar h3 { margin: 0 0 6px; font-size: 16px; }
.empty-calendar p { margin: 0; color: var(--ink-3); font-size: 12px; }
.calendar-side-head { display: flex; align-items: center; justify-content: space-between; }
.calendar-side h2 { margin: 0; font-size: 18px; }
.calendar-side-head span { font-size: 11px; font-weight: 700; }
.calendar-side > p { margin: 6px 0 22px; color: var(--ink-3); font-size: 12px; }
.plan-label { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; font-size: 12px; font-weight: 700; }
.plan-list { display: grid; gap: 9px; }
.plan-item { min-height: 62px; display: flex; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.plan-item > div { min-width: 0; flex: 1; }
.plan-item strong { display: block; margin-bottom: 4px; font-size: 13px; }
.plan-item span { color: var(--ink-3); font-size: 11px; }
.remind { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #f0cb7a; border-radius: 8px; color: #b4730b; background: #fffaf0; }
.week-legend { display: flex; gap: 9px; margin-top: 18px; }
.legend-pill { min-height: 30px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #687487; font-size: 11px; }
.legend-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.legend-pill.green i { background: var(--green); }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(110px, 1fr)); gap: 10px; margin-top: 16px; overflow: auto; }
.day-card { min-height: 116px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.day-card.active { border-color: #68aaff; background: #eaf4ff; }
.day-card strong { font-size: 13px; }
.day-card time { float: right; color: var(--ink-3); font-size: 11px; }
.day-card p { margin: 20px 0 0; color: #697487; font-size: 11px; }
.agenda { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 18px; }
.agenda h3 { margin: 0 0 12px; font-size: 17px; }
.agenda-row { min-height: 62px; display: grid; grid-template-columns: 68px 100px minmax(0, 1fr) 40px; align-items: center; gap: 10px; margin-bottom: 9px; padding: 0 12px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 8px; background: #fff; }
.agenda-row time { color: #7a8493; font-size: 11px; }
.source-badge { padding: 6px 9px; border-radius: 7px; background: #edf5ff; color: #32679f; font-size: 11px; font-weight: 650; }
.agenda-row strong { font-size: 13px; }
.todo-toolbar { display: flex; justify-content: flex-end; gap: 10px; margin: 16px 0; }
.todo-toolbar .search-box { width: 310px; }
.todo-row { min-height: 68px; display: flex; align-items: center; gap: 12px; padding: 0 13px; border-top: 1px solid var(--line); }
.todo-check { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.todo-row div { flex: 1; }
.todo-row strong { display: block; font-size: 13px; }
.todo-row span { color: var(--ink-3); font-size: 11px; }

/* Meeting */
.meeting-layout { height: 100%; min-height: 620px; display: grid; grid-template-columns: 42% minmax(0, 1fr); gap: 14px; padding: 18px; }
.panel { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.meeting-left { min-height: 0; display: flex; flex-direction: column; gap: 14px; }
.settings-panel { padding: 18px; }
.form-label { display: block; margin: 0 0 7px; color: #4d596c; font-size: 12px; font-weight: 650; }
.select-control, .text-control { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: #2b3442; }
.check-row { min-height: 36px; display: flex; align-items: center; gap: 9px; color: #424d5e; font-size: 13px; }
.check-row input { width: 18px; height: 18px; accent-color: var(--blue); }
.recorder-panel { min-height: 280px; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; }
.record-button { width: 78px; height: 78px; display: grid; place-items: center; border: 1px solid #cfe0f7; border-radius: 50%; background: #fff; color: var(--blue); }
.record-button.recording { background: var(--red-soft); border-color: #f2c3ca; color: var(--red); }
.record-button .lucide { width: 30px; height: 30px; }
.record-timer { margin-top: 16px; font-size: 18px; font-variant-numeric: tabular-nums; }
.waveform { width: 66%; height: 44px; display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 18px; }
.waveform i { width: 3px; height: 10px; border-radius: 2px; background: #b7c6d9; transition: height .18s ease; }
.recording + .record-timer + .waveform i { animation: wave .8s ease-in-out infinite alternate; background: var(--blue); }
.waveform i:nth-child(2n) { animation-delay: .16s !important; }
.waveform i:nth-child(3n) { animation-delay: .31s !important; }
@keyframes wave { from { height: 8px; } to { height: 38px; } }
.recorder-hint { color: var(--ink-3); font-size: 12px; }
.meeting-right { min-height: 0; display: grid; grid-template-rows: minmax(250px, 1fr) minmax(190px, .7fr) 62px; gap: 14px; }
.panel-head { min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 17px; }
.panel-head span { color: var(--ink-3); font-size: 11px; }
.transcript-body { height: calc(100% - 56px); overflow: auto; padding: 14px 18px; }
.transcript-line { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; margin-bottom: 14px; color: #475466; font-size: 12px; line-height: 1.7; }
.transcript-line time { color: #8a94a3; font-variant-numeric: tabular-nums; }
.library-body { max-height: 220px; overflow: auto; padding: 8px; }
.recording-row { width: 100%; min-height: 58px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: #344052; text-align: left; }
.recording-row:hover, .recording-row.active { background: #f1f6fc; }
.recording-row strong { display: block; font-size: 12px; }
.recording-row small { color: var(--ink-3); font-size: 10px; }
.player { display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.player button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.player time { color: #7b8492; font-size: 12px; font-variant-numeric: tabular-nums; }
.player-track { flex: 1; height: 5px; border-radius: 5px; background: #e6e9ee; overflow: hidden; }
.player-track span { display: block; width: 0; height: 100%; background: var(--blue); transition: width .2s linear; }

/* Media */
.media-body { padding: 24px; }
.notice-strip { min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #536075; font-size: 12px; }
.notice-strip .lucide { color: #51627a; }
.media-search { display: grid; grid-template-columns: minmax(280px, 1fr) 210px 150px auto; align-items: center; gap: 0; margin-top: 16px; padding: 5px; border: 1px solid var(--line-strong); border-radius: 28px; background: #fff; box-shadow: var(--shadow-md); }
.media-search input, .media-search select { height: 46px; padding: 0 16px; border: 0; border-right: 1px solid var(--line); background: transparent; outline: 0; }
.media-search button { border-radius: 23px; }
.media-head-row { display: flex; align-items: center; margin: 28px 0 12px; }
.media-head-row h2 { margin: 0; font-size: 18px; }
.media-head-row .segmented { margin-left: auto; }
.media-results { display: grid; gap: 10px; }
.result-card { display: grid; grid-template-columns: 180px minmax(0, 1fr) 120px; gap: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.result-thumb { min-height: 102px; position: relative; border-radius: 6px; overflow: hidden; background: #161b24; }
.result-thumb img { width: 100%; height: 100%; object-fit: cover; }
.source-chip { position: absolute; left: 8px; top: 8px; padding: 4px 7px; border-radius: 5px; background: rgba(0,0,0,.66); color: #fff; font-size: 10px; }
.result-copy h3 { margin: 3px 0 8px; font-size: 14px; }
.result-copy p { margin: 0 0 10px; color: #657184; font-size: 12px; line-height: 1.65; }
.result-copy span { color: #9098a5; font-size: 10px; }
.result-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.skeleton-list { display: grid; gap: 10px; }
.skeleton { height: 126px; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(90deg, #f2f4f7 25%, #fafbfc 50%, #f2f4f7 75%); background-size: 200% 100%; animation: shimmer 1.1s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Prompt Teammate */
.prompt-toolbar { min-height: 58px; display: flex; align-items: center; justify-content: center; padding: 0 22px; border-bottom: 1px solid var(--line); background: #fff; }
.prompt-toolbar .segmented { margin: 0 auto; }
.prompt-search { width: 260px; margin-left: auto; }
.inspiration { padding: 18px; }
.promo-banner { min-height: 128px; position: relative; display: flex; align-items: flex-end; padding: 22px; border-radius: 8px; overflow: hidden; background: #202a38; color: #fff; }
.promo-banner::after { content: ""; position: absolute; inset: 0 0 0 52%; background: url('https://images.unsplash.com/photo-1485846234645-a62644f84728?auto=format&fit=crop&w=1100&q=80') center/cover; opacity: .66; }
.promo-banner > div { position: relative; z-index: 1; }
.promo-banner small { font-size: 11px; opacity: .8; }
.promo-banner h2 { margin: 6px 0 0; font-size: 23px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 9px; margin: 16px 0; }
.filter-row select { min-width: 132px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #4e596b; }
.masonry-grid { columns: 4 220px; column-gap: 12px; }
.inspiration-card { break-inside: avoid; margin-bottom: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.inspiration-card .visual { height: 145px; position: relative; overflow: hidden; background: #e9edf3; }
.inspiration-card.tall .visual { height: 260px; }
.inspiration-card img { width: 100%; height: 100%; object-fit: cover; }
.floating-play { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.6); border-radius: 50%; background: rgba(22, 28, 38, .64); color: #fff; backdrop-filter: blur(5px); }
.inspiration-card h3 { margin: 10px 11px 5px; font-size: 12px; }
.inspiration-card p { margin: 0 11px 11px; color: var(--ink-3); font-size: 10px; }
.creation-layout { height: 100%; min-height: 650px; display: grid; grid-template-columns: 300px minmax(360px, .9fr) minmax(430px, 1.35fr); gap: 10px; padding: 10px; }
.creation-column { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.column-kicker { color: var(--green); font-size: 11px; font-weight: 800; }
.creation-column h2 { margin: 5px 0 14px; font-size: 17px; }
.ratio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; padding: 9px; border-radius: 8px; background: #f0f3f6; }
.ratio-button { min-height: 54px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #596779; font-size: 11px; font-weight: 700; }
.ratio-button.active { border-color: #cdd8e7; background: #fff; color: #283446; box-shadow: var(--shadow-sm); }
.ratio-shape { display: block; border: 2px solid #7e8b9c; }
.ratio-shape.square { width: 26px; height: 26px; }
.ratio-shape.land { width: 34px; height: 22px; }
.ratio-shape.portrait { width: 22px; height: 32px; }
.upload-box { min-height: 90px; display: grid; place-items: center; margin-top: 12px; border: 1px dashed #9eb8d9; border-radius: 8px; color: #65809f; text-align: center; font-size: 11px; }
.prompt-card { min-height: 420px; display: flex; flex-direction: column; border: 2px solid #8dbefd; border-radius: 8px; overflow: hidden; }
.prompt-card textarea { flex: 1; min-height: 270px; padding: 15px; border: 0; resize: none; outline: 0; }
.prompt-adjust { padding: 10px; border-top: 1px solid var(--line); background: #fbfcfd; }
.prompt-adjust .chip-row { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.tiny-chip { min-height: 28px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #687386; font-size: 10px; }
.creation-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.result-empty { min-height: 300px; display: grid; place-items: center; border: 1px dashed #cbd5e1; border-radius: 8px; color: #8390a2; text-align: center; }
.generated-art { min-height: 420px; display: grid; place-items: center; padding: 16px; border-radius: 8px; background: #f1f4f8; }
.generated-art img { max-width: 100%; max-height: 520px; object-fit: contain; border-radius: 6px; box-shadow: var(--shadow-md); }
.video-output { width: 100%; aspect-ratio: 16 / 9; position: relative; overflow: hidden; border-radius: 8px; background: #111722; }
.video-output img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }

/* Game UI */
.game-layout { height: 100%; min-height: 620px; display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 16px; padding: 18px; }
.game-params { padding: 18px; background: #f4f8ff; box-shadow: 0 14px 34px rgba(38, 85, 143, .12); }
.game-form { display: grid; gap: 9px; }
.game-form textarea { min-height: 132px; padding: 12px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.game-result { padding: 18px; }
.reference-box { min-height: 124px; display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px dashed #aebed2; border-radius: 8px; }
.reference-box img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; }
.reference-box strong { display: block; margin-bottom: 7px; font-size: 13px; }
.reference-box p { margin: 0; color: var(--ink-3); font-size: 11px; }
.game-output { margin-top: 14px; }
.game-output .generated-art { min-height: 360px; }

/* Clip */
.clip-layout { height: 100%; min-height: 660px; display: grid; grid-template-columns: 220px minmax(0, 1fr); padding: 18px 18px 88px; }
.clip-filters { padding: 0 18px 0 0; border-right: 1px solid var(--line); }
.clip-filters h3 { margin: 0 0 12px; font-size: 14px; }
.clip-filter { width: 100%; min-height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: #617083; font-size: 12px; }
.clip-filter:hover, .clip-filter.active { background: #eaf3ff; color: var(--blue); font-weight: 700; }
.clip-grid { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(230px, 1fr)); gap: 12px; padding-left: 16px; align-content: start; }
.clip-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; transition: border-color .18s ease, box-shadow .18s ease; }
.clip-card.selected { border-color: #65a6f7; box-shadow: 0 0 0 2px rgba(8,120,249,.12); }
.clip-visual { height: 164px; position: relative; overflow: hidden; background: #141820; }
.clip-visual img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.clip-card-copy { min-height: 105px; padding: 11px; }
.clip-card h3 { margin: 0 0 6px; font-size: 13px; }
.clip-card p { margin: 0; color: #738094; font-size: 10px; line-height: 1.55; }
.clip-select { position: absolute; right: 11px; bottom: 11px; min-width: 48px; height: 32px; border: 0; border-radius: 7px; background: #fff; color: #303b4c; font-weight: 700; }
.clip-select:hover, .selected .clip-select { background: var(--blue); color: #fff; }
.preview-float { position: absolute; right: 10px; bottom: 10px; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.48); border-radius: 50%; background: rgba(15, 22, 32, .58); color: #fff; backdrop-filter: blur(6px); }
.preview-float:hover { background: rgba(8, 120, 249, .86); }
.clip-footer { position: absolute; left: 18px; right: 18px; bottom: 14px; min-height: 62px; display: flex; align-items: center; padding: 0 18px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.95); box-shadow: var(--shadow-md); backdrop-filter: blur(10px); }
.clip-footer span { color: #627084; font-size: 12px; }
.clip-footer button { margin-left: auto; }

/* HTML Studio */
.studio-shell { height: 100%; min-height: 620px; display: flex; flex-direction: column; padding: 14px; background: #eaf0f7; }
.studio-toolbar { min-height: 54px; display: flex; align-items: center; gap: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 8px 8px 0 0; background: #fff; }
.toolbar-button { min-height: 40px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; border: 0; border-right: 1px solid var(--line); background: #fff; color: #344053; font-weight: 650; }
.toolbar-button.active { border: 0; border-radius: 7px; background: #eaf3ff; color: var(--blue); }
.file-state { margin-left: auto; min-height: 38px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; color: #687386; font-size: 11px; }
.studio-stage { min-height: 0; flex: 1; position: relative; display: grid; place-items: center; border: 1px solid var(--line); border-top: 0; background: #fff; }
.studio-empty { text-align: center; color: #6c788b; }
.studio-empty .studio-logo { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 12px; background: #eaf3ff; color: var(--blue); }
.studio-empty .lucide { width: 28px; height: 28px; }
.studio-empty h2 { margin: 0 0 7px; color: #232c38; font-size: 19px; }
.studio-empty p { width: 340px; margin: 0 auto 14px; font-size: 12px; line-height: 1.6; }
.studio-frame { width: 100%; height: 100%; border: 0; background: #fff; }
.studio-code { width: 100%; height: 100%; padding: 18px; resize: none; border: 0; outline: 0; background: #151b25; color: #dbe6f5; font: 13px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; }
.studio-status { min-height: 32px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; color: #7d8796; font-size: 10px; background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; }

/* Cloudflare */
.cloud-body { padding: 18px; }
.cloud-tabs { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #f2f5f8; }
.cloud-tabs button { min-height: 46px; border: 0; border-radius: 7px; background: transparent; color: #5f6b7e; font-weight: 700; }
.cloud-tabs button.active { background: #fff; color: var(--blue); box-shadow: var(--shadow-sm); }
.auth-strip { min-height: 62px; display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.auth-strip > div { flex: 1; }
.auth-strip strong { display: block; font-size: 13px; }
.auth-strip span { color: var(--ink-3); font-size: 11px; }
.workflow-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.workflow-step { min-height: 68px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #f8f9fb; color: #778191; }
.workflow-step.active { border-color: var(--blue); background: #f4f9ff; color: #2f3a4a; }
.workflow-step strong { display: block; margin-bottom: 5px; font-size: 12px; }
.workflow-step span { font-size: 10px; }
.cloud-workspace { display: grid; grid-template-columns: 340px minmax(0, 1fr); margin-top: 14px; border-top: 1px solid var(--line); }
.cloud-source, .cloud-result { min-height: 280px; padding: 18px; }
.cloud-source { border-right: 1px solid var(--line); }
.cloud-source h2, .cloud-result h2 { margin: 0 0 5px; font-size: 17px; }
.cloud-source p, .cloud-result p { margin: 0 0 15px; color: var(--ink-3); font-size: 11px; }
.source-picker { min-height: 62px; display: flex; align-items: center; gap: 11px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.source-picker .lucide { color: var(--blue); }
.source-picker div { flex: 1; }
.source-picker strong { display: block; font-size: 12px; }
.source-picker small { color: var(--ink-3); font-size: 10px; }
.publish-empty { min-height: 110px; display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid #d5e2f3; border-radius: 8px; background: #fff; color: #6a7688; }
.publish-empty .lucide { color: #9aabc1; }
.publish-success { padding: 18px; border: 1px solid #bde4d6; border-radius: 8px; background: var(--green-soft); }
.publish-success strong { color: #126e50; }
.publish-success a { display: block; margin-top: 8px; color: var(--blue); font-weight: 700; text-decoration: none; }
.config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.config-card { min-height: 132px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.config-card h3 { margin: 0 0 7px; font-size: 14px; }
.config-card p { margin: 0 0 14px; color: var(--ink-3); font-size: 11px; line-height: 1.6; }

/* Connection detail */
.connection-detail { padding: 28px; }
.account-hero { display: flex; align-items: center; gap: 16px; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.account-logo { width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid #d5e2f3; border-radius: 12px; background: #f6f9ff; color: var(--blue); font-size: 18px; font-weight: 800; }
.account-hero h2 { margin: 0 0 5px; font-size: 18px; }
.account-hero p { margin: 0; color: var(--ink-3); font-size: 12px; }
.success-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 7px; background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 700; }
.account-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.meta-card { padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.meta-card span { display: block; margin-bottom: 7px; color: var(--ink-3); font-size: 10px; }
.meta-card strong { font-size: 13px; }
.permission-panel { margin-top: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.permission-panel h3 { margin: 0; padding: 16px 18px; border-bottom: 1px solid var(--line); font-size: 15px; }
.permission-row { min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid #edf0f4; }
.permission-row:last-child { border-bottom: 0; }
.permission-row .lucide { color: var(--blue); }
.permission-row div { flex: 1; }
.permission-row strong { display: block; font-size: 12px; }
.permission-row span { color: var(--ink-3); font-size: 10px; }
.enabled-label { color: var(--green) !important; font-weight: 700; }
.danger-button { min-height: 40px; padding: 0 14px; border: 1px solid #ecc5cb; border-radius: 8px; background: #fff; color: var(--red); font-weight: 700; }

/* Drawer, modal, toast */
.drawer-layer, .modal-layer { position: fixed; inset: var(--system-height) 0 0 0; z-index: 80; }
.drawer-scrim, .modal-scrim { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(32, 40, 52, .26); backdrop-filter: blur(3px); }
.task-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 460px; display: flex; flex-direction: column; background: #fff; box-shadow: -16px 0 38px rgba(26, 37, 53, .13); animation: slideIn .24s ease-out; }
@keyframes slideIn { from { transform: translateX(26px); opacity: .4; } to { transform: translateX(0); opacity: 1; } }
.drawer-head { min-height: 74px; display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.drawer-head > div { flex: 1; }
.drawer-head h2 { margin: 0 0 4px; font-size: 15px; }
.drawer-head p { margin: 0; color: var(--ink-3); font-size: 10px; }
.drawer-form { min-height: 0; flex: 1; display: flex; flex-direction: column; padding: 20px 18px 18px; }
.drawer-form label { margin: 0 0 7px; color: #4f5a6c; font-size: 11px; font-weight: 700; }
.drawer-form input { height: 42px; margin-bottom: 15px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 8px; outline: 0; }
.drawer-form input:focus { border-color: var(--blue); }
.drawer-form .segmented { margin-bottom: 15px; }
.field-pair { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.drawer-grow { flex: 1; }
.preview-modal { position: absolute; left: 50%; top: 50%; width: min(960px, calc(100vw - 100px)); transform: translate(-50%, -50%); overflow: hidden; border-radius: 10px; background: #fff; box-shadow: 0 28px 80px rgba(15, 25, 40, .3); animation: popIn .22s ease-out; }
@keyframes popIn { from { transform: translate(-50%, -48%) scale(.98); opacity: .3; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.preview-head { min-height: 62px; display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--line); }
.preview-head > div { flex: 1; }
.preview-head strong { display: block; font-size: 14px; }
.preview-head span { color: var(--ink-3); font-size: 10px; }
.video-stage { aspect-ratio: 16 / 9; position: relative; display: grid; place-items: center; overflow: hidden; background: #111722; }
.video-stage img { width: 100%; height: 100%; object-fit: cover; opacity: .78; }
.video-play { position: absolute; width: 74px; height: 74px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.75); border-radius: 50%; background: rgba(19,26,36,.58); color: #fff; backdrop-filter: blur(8px); }
.video-play .lucide { width: 28px; height: 28px; }
.video-progress { position: absolute; left: 24px; right: 24px; bottom: 18px; height: 5px; border-radius: 5px; background: rgba(255,255,255,.3); overflow: hidden; }
.video-progress span { display: block; width: 22%; height: 100%; background: var(--blue); }
.toast-region { position: fixed; top: 62px; right: 22px; z-index: 120; display: grid; gap: 9px; pointer-events: none; }
.toast { min-width: 280px; max-width: 380px; display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow-md); color: #354154; animation: toastIn .22s ease-out; }
.toast.success { border-color: #bae1d3; }
.toast.error { border-color: #efc4ca; }
.toast .lucide { flex: none; color: var(--blue); }
.toast.success .lucide { color: var(--green); }
.toast.error .lucide { color: var(--red); }
.toast strong { display: block; margin-bottom: 3px; font-size: 12px; }
.toast span { color: var(--ink-3); font-size: 10px; line-height: 1.45; }
@keyframes toastIn { from { transform: translateY(-8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (max-width: 1320px) {
  :root { --sidebar-width: 232px; }
  .card-grid { grid-template-columns: repeat(2, minmax(250px, 1fr)); }
  .creation-layout { grid-template-columns: 270px minmax(330px, .85fr) minmax(380px, 1.15fr); }
  .clip-grid { grid-template-columns: repeat(2, minmax(230px, 1fr)); }
  .calendar-shell { grid-template-columns: minmax(0, 1fr) 280px; }
}

@media (max-height: 760px) {
  .mascot-stage { height: 122px; }
  .mascot-stage img { width: 124px; height: 124px; }
  .hub-header { height: 64px; }
  .hub-content { padding-top: 20px; }
  .catalog-card { min-height: 138px; padding: 16px; gap: 12px; }
  .home-center { padding-top: 46px; }
  .quick-chips { margin-top: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
