/* [project]/src/app/globals.css [app-client] (css) */
:root {
  --bg: #eef1f6;
  --card: #f7f9fc;
  --border: #c8d2e0;
  --border-light: #dde3ec;
  --text: #1a1d29;
  --text-sec: #6b7280;
  --text-ter: #9ca3af;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-dim: #6366f114;
  --green: #10b981;
  --yellow: #f59e0b;
  --red: #ef4444;
  --accent-dark: #4f46e5;
  --accent-2: #a855f7;
  --accent-2-dark: #7c3aed;
  --accent-soft: #ede9fe;
  --accent-soft-2: #f5f3ff;
  --accent-line: #ddd6fe;
  --accent-line-2: #c7d2fe;
  --accent-glow: #6366f159;
  --sidebar-bg: #fff;
  --sidebar-hover: #f5f7fa;
  --sidebar-active-bg: var(--accent-dim);
  --sidebar-text: var(--text-sec);
  --sidebar-text-hover: var(--text);
  --sidebar-text-active: var(--accent);
  --sidebar-text-dim: var(--text-ter);
  --sidebar-logo-text: var(--text);
  --sidebar-border: var(--border-light);
  --topbar-bg: #fffffff2;
  --sidebar-w: 154px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(#f2f5fa 0%, #e9edf5 100%) fixed;
  font-family: -apple-system, BlinkMacSystemFont, SF Pro Display, Segoe UI, Roboto, PingFang SC, Microsoft YaHei, sans-serif;
  font-size: 14px;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: none;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border);
}

.app-shell {
  min-height: 100vh;
  display: flex;
}

.app-main-wrap {
  min-width: 0;
  margin-left: var(--sidebar-w);
  flex-direction: column;
  flex: 1;
  display: flex;
}

.app-main {
  flex: 1;
  padding: 24px 16px 16px;
}

.sidebar {
  width: var(--sidebar-w);
  z-index: 50;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  flex-direction: column;
  flex-shrink: 0;
  height: 100vh;
  display: flex;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  box-shadow: 2px 0 12px #1018280a;
}

.sidebar-logo {
  border-bottom: 1px solid var(--border-light);
  align-items: center;
  gap: 8px;
  height: 56px;
  padding: 0 8px;
  display: flex;
}

.sidebar-logo-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  letter-spacing: -.3px;
  width: 28px;
  height: 28px;
  box-shadow: 0 4px 10px var(--accent-glow);
  border-radius: 9px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  display: flex;
}

.sidebar-logo-text {
  letter-spacing: -.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
  color: var(--sidebar-logo-text);
  font-size: 11.5px;
  font-weight: 700;
  overflow: hidden;
}

.sidebar-nav {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
}

.sidebar-item {
  color: var(--sidebar-text);
  border-radius: 10px;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  padding: 9px 8px;
  font-size: 13px;
  text-decoration: none;
  transition: all .15s;
  display: flex;
}

.sidebar-item:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-hover);
}

.sidebar-item.active {
  background: var(--sidebar-active-bg, var(--accent-dim));
  color: var(--sidebar-text-active);
  font-weight: 600;
}

.sidebar-item-label {
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1;
  overflow: hidden;
}

.sidebar-footer {
  border-top: 1px solid var(--sidebar-border);
  padding: 8px;
}

.sidebar-status {
  background: var(--sidebar-hover);
  color: var(--text-sec);
  border-radius: 10px;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  font-size: 11.5px;
  display: flex;
}

.status-dot {
  background: var(--green);
  border-radius: 50%;
  width: 8px;
  height: 8px;
  animation: 2s infinite pulse;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: .35;
  }
}

.topbar {
  background: var(--topbar-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-light);
  z-index: 10;
  flex-shrink: 0;
  align-items: center;
  gap: 16px;
  height: 64px;
  padding: 0 24px;
  display: flex;
  position: sticky;
  top: 0;
  box-shadow: 0 1px 8px #1018280a;
}

.topbar-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}

.topbar-search input {
  background: var(--bg);
  border: 1px solid #0000;
  border-radius: 10px;
  outline: none;
  width: 100%;
  height: 36px;
  padding: 0 16px 0 36px;
  font-size: 13px;
  transition: all .15s;
}

.topbar-search input:focus {
  border-color: var(--accent);
  background: #fff;
}

.topbar-search-icon {
  color: var(--text-ter);
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
}

.topbar-spacer {
  flex: 1;
}

.topbar-btn {
  width: 36px;
  height: 36px;
  color: var(--text-sec);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 10px;
  justify-content: center;
  align-items: center;
  transition: background .15s;
  display: flex;
}

.topbar-btn:hover {
  background: var(--sidebar-hover);
}

.topbar-user {
  border-left: 1px solid var(--border-light);
  align-items: center;
  gap: 8px;
  margin-left: 4px;
  padding-left: 12px;
  display: flex;
}

.topbar-avatar {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
}

.topbar-username {
  font-size: 13px;
  font-weight: 500;
}

.card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-bottom-color: var(--accent-line);
  border-radius: 14px;
  transition: box-shadow .2s, border-color .2s;
  box-shadow: inset 0 2px 4px #1018280f, inset 0 1px 2px #1018280a, 0 1px #ffffffe6;
}

.card:hover {
  border-color: var(--border);
}

.card-head, .card-head-accent {
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--accent-soft-2) 100%);
  border-bottom: 1px solid var(--accent-line);
  height: 40px;
  box-shadow: inset 0 1px 2px var(--accent-glow);
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  display: flex;
}

.card-title, .card-title-accent {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.card-foot, .card-foot-accent {
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--accent-soft-2) 100%);
  border-top: 1px solid var(--accent-line);
  height: 32px;
  box-shadow: inset 0 1px 2px var(--accent-glow);
  color: var(--accent);
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  font-size: 11.5px;
  display: flex;
}

.card-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.gaigao-wrap {
  flex-direction: column;
  gap: 8px;
  width: 90%;
  height: calc(100vh - 6.5rem);
  margin: 0 auto;
  display: flex;
}

.gaigao-topspacer {
  flex-shrink: 0;
  height: 3px;
}

.toolbar {
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  display: flex;
}

.toolbar-icon {
  color: var(--accent);
}

.toolbar-sep {
  color: var(--text-ter);
  font-size: 12px;
}

.toolbar-spacer {
  flex: 1;
}

.toolbar-gap {
  width: 12px;
}

.ctl-btn {
  background: var(--bg);
  border: 1px solid var(--border-light);
  height: 28px;
  color: var(--text-sec);
  cursor: pointer;
  border-radius: 8px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  font-size: 11.5px;
  transition: all .15s;
  display: inline-flex;
}

.ctl-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.ctl-select {
  background: var(--bg);
  border: 1px solid var(--border-light);
  cursor: pointer;
  border-radius: 8px;
  outline: none;
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
}

.ctl-select:focus {
  border-color: var(--accent);
}

.ctl-search {
  position: relative;
}

.ctl-search input {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  outline: none;
  width: 176px;
  height: 28px;
  padding: 0 8px 0 28px;
  font-size: 12px;
}

.ctl-search input:focus {
  border-color: var(--accent);
}

.ctl-search-icon {
  color: var(--text-ter);
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
}

.mid-row {
  flex-shrink: 0;
  gap: 8px;
  height: 26%;
  min-height: 0;
  display: flex;
}

.mid-col {
  flex-direction: column;
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.article-grid {
  flex-direction: column;
  flex: 1;
  gap: 3px;
  min-height: 0;
  padding: 10px 10px 10px 24px;
  display: flex;
  overflow-y: auto;
}

.article-item {
  border: 1px solid var(--border-light);
  background: var(--bg);
  cursor: pointer;
  text-align: left;
  border-radius: 6px;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-family: inherit;
  font-size: 11px;
  line-height: 1.4;
  transition: all .15s;
  display: flex;
}

.article-item:hover {
  border-color: var(--accent);
}

.article-item.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.article-item-icon {
  flex-shrink: 0;
  align-items: center;
  display: flex;
}

.article-item-main {
  flex: 1;
  min-width: 0;
}

.article-item-title {
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.article-item-time {
  color: var(--text-ter);
  flex-shrink: 0;
  margin-left: 8px;
  font-size: 9.5px;
}

.notes-body {
  white-space: pre-wrap;
  flex: 1;
  min-height: 0;
  padding: 16px 16px 16px 32px;
  font-size: 13px;
  line-height: 1.8;
  overflow-y: auto;
}

.notes-line {
  min-height: 1em;
}

.notes-error {
  color: var(--red);
}

.notes-error-title {
  color: var(--red);
  font-weight: 600;
}

.compare-row {
  flex-shrink: 0;
  gap: 8px;
  height: 37%;
  min-height: 0;
  display: flex;
}

.compare-col {
  flex-direction: column;
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.compare-body {
  flex: 1;
  min-height: 0;
  padding: 16px 16px 16px 32px;
  font-size: 13.5px;
  line-height: 1.9;
  overflow-y: auto;
}

.compare-para {
  white-space: pre-wrap;
  cursor: default;
  border-radius: 4px;
  margin: 0 -4px;
  padding: 0 4px;
  transition: background .15s;
}

.compare-para:hover {
  background: var(--sidebar-hover);
}

.compare-para.hl {
  color: var(--red);
  background: #fef2f2;
}

.compare-empty {
  color: var(--text-ter);
}

.input-row {
  flex-direction: column;
  flex-shrink: 0;
  height: 21%;
  display: flex;
  overflow: hidden;
}

.input-area {
  resize: none;
  min-height: 0;
  color: var(--text);
  background: none;
  border: none;
  outline: none;
  flex: 1;
  padding: 16px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.8;
}

.input-foot {
  border-top: 1px solid var(--accent-line);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--accent-soft-2) 100%);
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 16px;
  display: flex;
}

.input-stat {
  color: var(--text-sec);
  font-size: 12px;
}

.input-stat b {
  color: var(--text);
}

.ctx-stat {
  color: var(--text-sec);
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  display: flex;
}

.ctx-stat b {
  color: var(--text);
}

.ctx-warn {
  color: var(--yellow) !important;
}

.ctx-danger {
  color: var(--red) !important;
}

.input-spacer {
  flex: 1;
}

.input-error {
  color: var(--red);
  font-size: 12px;
}

.mini-btn {
  cursor: pointer;
  background: linear-gradient(180deg, #fff, var(--accent-soft-2));
  height: 22px;
  color: var(--text-sec);
  border: 1px solid var(--border);
  box-shadow: 0 2px 0 var(--border), 0 3px 6px #10182814;
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  transition: all .1s;
  display: inline-flex;
}

.mini-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.mini-btn:active {
  box-shadow: 0 1px 0 var(--border);
  transform: translateY(1px);
}

.mini-btn.done {
  color: #047857;
  background: linear-gradient(#d1fae5, #a7f3d0);
  border-color: #6ee7b7;
  box-shadow: 0 2px #34d399, 0 3px 6px #10b98140;
}

.mini-btn-icon {
  width: 24px;
  padding: 0;
}

.submit-btn {
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, var(--accent-light), var(--accent-dark));
  width: 76px;
  height: 26px;
  box-shadow: 0 4px 0 var(--accent-2-dark), 0 6px 12px var(--accent-glow);
  border: none;
  border-radius: 7px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  transition: all .1s;
  display: flex;
}

.submit-btn:active {
  box-shadow: 0 2px 0 var(--accent-2-dark);
  transform: translateY(2px);
}

.submit-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  background: linear-gradient(180deg, var(--accent-light), var(--accent-light));
  box-shadow: 0 2px 0 var(--accent);
}

.running-mask {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  background: #ffffffd9;
  justify-content: center;
  align-items: center;
  display: flex;
  position: absolute;
  inset: 0;
}

.running-inner {
  align-items: center;
  gap: 16px;
  display: flex;
}

.running-text {
  color: var(--accent);
  font-size: 30px;
  font-weight: 700;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.toggle {
  color: var(--text-sec);
  cursor: pointer;
  background: none;
  border: none;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 11px;
  display: flex;
}

.toggle:hover {
  color: var(--text);
}

.toggle-track {
  background: var(--border);
  border-radius: 8px;
  width: 28px;
  height: 16px;
  transition: background .15s;
  position: relative;
}

.toggle-track.on {
  background: var(--accent);
}

.toggle-knob {
  background: #fff;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  transition: left .15s;
  position: absolute;
  top: 2px;
  left: 2px;
}

.toggle-track.on .toggle-knob {
  left: 14px;
}

.cal-wrap {
  position: relative;
}

.cal-panel {
  z-index: 50;
  border: 1px solid var(--border-light);
  background: #fff;
  border-radius: 12px;
  width: 260px;
  padding: 12px;
  position: absolute;
  top: 36px;
  left: 0;
  box-shadow: 0 12px 32px #10182829;
}

.cal-mask {
  z-index: 40;
  position: fixed;
  inset: 0;
}

.cal-head {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  display: flex;
}

.cal-nav {
  cursor: pointer;
  width: 28px;
  height: 28px;
  color: var(--text-sec);
  background: none;
  border: none;
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  display: flex;
}

.cal-nav:hover {
  background: var(--accent-soft-2);
}

.cal-month {
  font-size: 13px;
  font-weight: 600;
}

.cal-grid {
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  display: grid;
}

.cal-weekday {
  height: 28px;
  color: var(--text-ter);
  justify-content: center;
  align-items: center;
  font-size: 11px;
  display: flex;
}

.cal-day {
  cursor: pointer;
  height: 32px;
  color: var(--text);
  background: none;
  border: none;
  border-radius: 8px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: inherit;
  font-size: 12px;
  transition: background .12s;
  display: flex;
  position: relative;
}

.cal-day:hover {
  background: var(--accent-soft-2);
}

.cal-day.today {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

.cal-day.selected {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.cal-dot {
  background: var(--accent);
  border-radius: 50%;
  width: 4px;
  height: 4px;
  position: absolute;
  bottom: 3px;
}

.cal-day.selected .cal-dot {
  background: #fff;
}

.cal-legend {
  border-top: 1px solid var(--border-light);
  color: var(--text-ter);
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  font-size: 10.5px;
  display: flex;
}

.cal-legend-dot {
  background: var(--accent);
  border-radius: 50%;
  width: 6px;
  height: 6px;
}

.modal-mask {
  z-index: 50;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  background: #10182859;
  justify-content: center;
  align-items: center;
  display: flex;
  position: fixed;
  inset: 0;
}

.modal-box {
  background: #fff;
  border-radius: 18px;
  width: 460px;
  animation: .18s ease-out modal-in;
  overflow: hidden;
  box-shadow: 0 24px 60px #10182847, 0 0 0 1px #1018280f;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px)scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0)scale(1);
  }
}

.modal-stripe {
  background: linear-gradient(90deg, #fbbf24, #f59e0b, #fbbf24);
  height: 6px;
}

.modal-body {
  padding: 28px 32px 30px;
}

.modal-head {
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  display: flex;
}

.modal-icon {
  background: linear-gradient(#fef3c7, #fde68a);
  border-radius: 14px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 52px;
  height: 52px;
  display: flex;
  box-shadow: inset 0 1px 2px #ffffffe6;
}

.modal-title {
  color: #1a1d29;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.modal-sub {
  color: var(--text-ter);
  margin-top: 4px;
  font-size: 13px;
}

.modal-desc {
  color: var(--text-sec);
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.7;
}

.modal-list {
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  display: flex;
}

.modal-item {
  background: var(--sidebar-hover);
  border-radius: 10px;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 16px;
  display: flex;
}

.modal-dot {
  background: #f59e0b;
  border-radius: 50%;
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 8px;
}

.modal-item-text {
  color: var(--text-sec);
  font-size: 13.5px;
  line-height: 1.6;
}

.modal-actions {
  gap: 14px;
  display: flex;
}

.modal-btn {
  cursor: pointer;
  border: none;
  border-radius: 12px;
  flex: 1;
  height: 46px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  transition: transform .1s, box-shadow .15s;
}

.modal-btn:active {
  transform: translateY(2px);
}

.modal-btn-cancel {
  background: linear-gradient(180deg, #fff, var(--accent-soft-2));
  color: var(--text-sec);
  border: 1px solid var(--accent-line);
  box-shadow: 0 3px 0 var(--accent-line);
}

.modal-btn-cancel:active {
  box-shadow: 0 1px 0 var(--accent-line);
}

.modal-btn-danger {
  color: #fff;
  background: linear-gradient(#f87171, #dc2626);
  font-weight: 700;
  box-shadow: 0 4px #b91c1c, 0 6px 16px #dc26264d;
}

.modal-btn-danger:active {
  box-shadow: 0 2px #b91c1c;
}

.home-wrap {
  gap: 24px;
  display: flex;
}

.home-main {
  flex: 1;
  min-width: 0;
}

.home-title {
  margin-bottom: 4px;
  font-size: 22px;
  font-weight: 700;
}

.home-sub {
  color: var(--text-sec);
  margin-bottom: 24px;
  font-size: 13px;
}

.home-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  display: grid;
}

.home-card {
  border: 1px solid var(--border-light);
  color: inherit;
  text-align: center;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  text-decoration: none;
  transition: all .2s;
}

.home-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.home-card-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  width: 44px;
  height: 44px;
  box-shadow: 0 4px 10px var(--accent-glow);
  border-radius: 12px;
  justify-content: center;
  align-items: center;
  margin: 0 auto 14px;
  display: flex;
}

.home-card-name {
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 700;
}

.home-card-desc {
  color: var(--text-sec);
  font-size: 12px;
  line-height: 1.6;
}

.home-rail {
  flex-direction: column;
  flex-shrink: 0;
  gap: 16px;
  width: 288px;
  display: flex;
}

.placeholder {
  text-align: center;
  justify-content: center;
  align-items: center;
  height: 60vh;
  display: flex;
}

.placeholder-title {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 700;
}

.placeholder-sub {
  color: var(--text-sec);
  font-size: 13px;
}

.article-retry {
  cursor: pointer;
  color: #dc2626;
  background: linear-gradient(#fef2f2, #fee2e2);
  border: 1px solid #fca5a5;
  border-radius: 5px;
  flex-shrink: 0;
  height: 18px;
  margin-left: 6px;
  padding: 0 8px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  transition: all .12s;
}

.article-retry:hover {
  background: linear-gradient(#fee2e2, #fecaca);
  border-color: #f87171;
}

.article-retry:active {
  transform: translateY(1px);
}

.notes-pending {
  color: #2563eb;
}

.notes-pending-title {
  color: #2563eb;
  font-weight: 600;
}

.voice-wrap {
  flex-direction: column;
  gap: 8px;
  width: 90%;
  height: calc(100vh - 6rem);
  margin: 0 auto;
  display: flex;
}

.voice-menu {
  flex-direction: column;
  flex-shrink: 0;
  height: 30%;
  display: flex;
  overflow: hidden;
}

.voice-hint {
  color: var(--text-ter);
  margin-left: 8px;
  font-size: 11px;
}

.voice-count {
  color: var(--text-ter);
  font-size: 11px;
}

.voice-grid {
  flex-direction: row;
  flex: 1;
  align-items: flex-start;
  gap: 10px;
  min-height: 0;
  padding: 12px 12px 12px 20px;
  display: flex;
  overflow: auto hidden;
}

.voice-item {
  border: 1.5px solid var(--border-light);
  background: var(--bg);
  cursor: pointer;
  border-radius: 10px;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 12px;
  transition: all .15s;
  display: flex;
  position: relative;
}

.voice-item:hover {
  border-color: var(--accent);
}

.voice-item.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.voice-avatar {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-radius: 50%;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  display: flex;
  overflow: hidden;
}

.voice-avatar img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.voice-info {
  flex: 1;
  min-width: 0;
}

.voice-name {
  color: var(--text);
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
}

.voice-gender {
  color: var(--text-ter);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 400;
}

.voice-desc {
  color: var(--text-ter);
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
  font-size: 11px;
  overflow: hidden;
}

.voice-check {
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  width: 18px;
  height: 18px;
  display: flex;
  position: absolute;
  top: 6px;
  right: 6px;
}

.voice-del {
  width: 22px;
  height: 22px;
  color: var(--text-ter);
  cursor: pointer;
  background: none;
  border: 1px solid #0000;
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  display: none;
  position: absolute;
  bottom: 6px;
  right: 6px;
}

.voice-item:hover .voice-del {
  display: flex;
}

.voice-del:hover {
  color: var(--red);
  background: #fef2f2;
  border-color: #fca5a5;
}

.voice-add {
  color: var(--text-ter);
  border-style: dashed;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  font-size: 12px;
  display: flex;
}

.voice-add:hover {
  color: var(--accent);
}

.voice-add-form {
  cursor: default;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.voice-input {
  border: 1px solid var(--border-light);
  background: #fff;
  border-radius: 6px;
  outline: none;
  height: 26px;
  padding: 0 8px;
  font-family: inherit;
  font-size: 12px;
}

.voice-input:focus {
  border-color: var(--accent);
}

.voice-add-actions {
  justify-content: flex-end;
  gap: 6px;
  display: flex;
}

.mini-btn-primary {
  background: linear-gradient(180deg, var(--accent-light), var(--accent-dark));
  color: #fff;
  border-color: var(--accent-2-dark);
  box-shadow: 0 2px 0 var(--accent-2-dark);
}

.mini-btn-primary:hover {
  color: #fff;
  border-color: var(--accent-2-dark);
}

.voice-main {
  flex-direction: column;
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.voice-main-body {
  flex: 1;
  justify-content: center;
  align-items: center;
  min-height: 0;
  padding: 16px;
  display: flex;
  overflow-y: auto;
}

.voice-play {
  border: 1px solid var(--border-light);
  width: 22px;
  height: 22px;
  color: var(--accent);
  cursor: pointer;
  background: #fff;
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  font-size: 9px;
  line-height: 1;
  display: none;
  position: absolute;
  bottom: 6px;
  right: 30px;
}

.voice-item:hover .voice-play {
  display: flex;
}

.voice-play:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.voice-play.playing {
  color: var(--red);
  background: #fef2f2;
  border-color: #fca5a5;
}

.voice-photo {
  aspect-ratio: 35 / 49;
  border: 1.5px solid var(--border-light);
  cursor: pointer;
  background: #eef1f6;
  border-radius: 8px;
  flex-shrink: 0;
  width: 86px;
  transition: border-color .15s, transform .15s;
  position: relative;
  overflow: hidden;
}

.voice-photo:hover {
  border-color: var(--accent);
}

.voice-photo.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.voice-photo-img {
  width: 100%;
  height: 100%;
}

.voice-photo-img img {
  object-fit: cover;
  object-position: top center;
  width: 100%;
  height: 100%;
  display: block;
}

.voice-photo-name {
  color: #fff;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  background: linear-gradient(#0000, #000000c7);
  padding: 14px 4px 4px;
  font-size: 14px;
  font-weight: 700;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  overflow: hidden;
}

.voice-photo-gender {
  opacity: .85;
  margin-left: 3px;
  font-size: 9px;
  font-weight: 400;
}

.voice-photo-check {
  color: #fff;
  z-index: 3;
  background: linear-gradient(#fbbf24, #f59e0b);
  border: 2px solid #fff;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  width: 26px;
  height: 26px;
  display: flex;
  position: absolute;
  top: 5px;
  right: 5px;
  box-shadow: 0 2px 8px #f59e0b8c;
}

.voice-photo-play {
  width: 20px;
  height: 20px;
  color: var(--accent);
  cursor: pointer;
  background: #ffffffe6;
  border: none;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  padding: 0;
  font-size: 8px;
  line-height: 1;
  display: none;
  position: absolute;
  top: 4px;
  left: 4px;
}

.voice-photo:hover .voice-photo-play {
  display: flex;
}

.voice-photo-play.playing {
  color: var(--red);
  background: #fef2f2;
  display: flex;
}

.voice-photo-add {
  color: var(--text-ter);
  border-style: dashed;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  font-size: 11px;
  display: flex;
}

.voice-photo-add:hover {
  color: var(--accent);
}

.voice-preview {
  aspect-ratio: 35 / 49;
  z-index: 100;
  pointer-events: none;
  border: 3px solid #fff;
  border-radius: 12px;
  width: 240px;
  height: 336px;
  position: fixed;
  top: 50%;
  right: 24px;
  overflow: hidden;
  transform: translateY(-50%);
  box-shadow: 0 16px 48px #10182859;
}

.voice-preview img {
  object-fit: cover;
  object-position: top center;
  width: 100%;
  height: 100%;
  display: block;
}

.voice-preview-name {
  color: #fff;
  text-align: center;
  background: linear-gradient(#0000, #000c);
  padding: 18px 8px 8px;
  font-size: 14px;
  font-weight: 600;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.voice-menu-head {
  position: relative;
}

.voice-warning {
  color: #dc2626;
  letter-spacing: .5px;
  white-space: nowrap;
  pointer-events: none;
  font-size: 14px;
  font-weight: 700;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.voice-controls {
  flex-shrink: 0;
  padding: 0;
}

.voice-controls-body {
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 18px;
  padding: 10px 18px;
  display: grid;
}

.ctl-row {
  align-items: center;
  gap: 7px;
  min-width: 0;
  display: flex;
}

.ctl-label {
  color: var(--text);
  flex-shrink: 0;
  min-width: 46px;
  font-size: 12px;
  font-weight: 600;
}

.ctl-side {
  color: var(--text-ter);
  flex-shrink: 0;
  font-size: 10px;
}

.ctl-range {
  appearance: none;
  background: linear-gradient(90deg, var(--accent-light), var(--accent));
  cursor: pointer;
  border-radius: 2px;
  outline: none;
  flex: 1;
  min-width: 40px;
  height: 4px;
}

.ctl-range::-webkit-slider-thumb {
  appearance: none;
  background: linear-gradient(180deg, #fff, var(--accent-soft-2));
  border: 2px solid var(--accent);
  width: 14px;
  height: 14px;
  box-shadow: 0 2px 6px var(--accent-glow);
  cursor: pointer;
  border-radius: 50%;
}

.ctl-range::-moz-range-thumb {
  background: linear-gradient(180deg, #fff, var(--accent-soft-2));
  border: 2px solid var(--accent);
  width: 14px;
  height: 14px;
  box-shadow: 0 2px 6px var(--accent-glow);
  cursor: pointer;
  border-radius: 50%;
}

.ctl-value {
  color: var(--accent);
  text-align: right;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 46px;
  font-size: 12px;
  font-weight: 700;
}

.ctl-input {
  border: 1px solid var(--border-light);
  background: var(--bg);
  text-align: center;
  border-radius: 8px;
  outline: none;
  flex: 1;
  min-width: 56px;
  height: 24px;
  padding: 0 8px;
  font-family: inherit;
  font-size: 12px;
}

.ctl-input:focus {
  border-color: var(--accent);
}

.ctl-block {
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  display: flex;
}

.ctl-block .mini-btn {
  flex-shrink: 0;
  margin-left: 4px;
}

.ctl-note {
  color: var(--text-ter);
  white-space: nowrap;
  text-overflow: ellipsis;
  padding-left: 2px;
  font-size: 9.5px;
  line-height: 1.3;
  overflow: hidden;
}

.voice-main-row {
  flex: 1;
  gap: 8px;
  min-height: 0;
  display: flex;
}

.voice-pane {
  flex-direction: column;
  flex: 1;
  min-width: 0;
  display: flex;
  overflow: hidden;
}

.voice-textarea {
  resize: none;
  min-height: 0;
  color: var(--text);
  background: none;
  border: none;
  outline: none;
  flex: 1;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.9;
  overflow-y: auto;
}

.voice-pane-foot {
  border-top: 1px solid var(--accent-line);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--accent-soft-2) 100%);
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 16px;
  display: flex;
}

.voice-submit {
  width: 76px;
  margin-right: 0;
}

.voice-audio {
  flex: 1;
  justify-content: center;
  align-items: center;
  min-height: 0;
  padding: 20px;
  display: flex;
}

.voice-audio-el {
  width: 100%;
  max-width: 420px;
}

.mini-btn.disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
  text-decoration: none;
}

.dub-progress {
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  display: flex;
}

.dub-progress-bar {
  background: #e5e9f0;
  border-radius: 6px;
  width: 100%;
  height: 12px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px #1018281a;
}

.dub-progress-fill {
  background: linear-gradient(90deg, var(--accent-light), var(--accent));
  height: 100%;
  box-shadow: 0 0 8px var(--accent-glow);
  border-radius: 6px;
  transition: width .3s;
}

.dub-progress-text {
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
}

.ctl-select-wide {
  border: 1px solid var(--border-light);
  background: var(--bg);
  cursor: pointer;
  border-radius: 8px;
  outline: none;
  flex: 1;
  min-width: 0;
  height: 24px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 12px;
}

.ctl-select-wide:focus {
  border-color: var(--accent);
}

.ctl-select-wide option:disabled {
  color: #c0c6d0;
}

.ctl-block .toggle {
  cursor: pointer;
  background: none;
  border: none;
  align-items: center;
  gap: 6px;
  padding: 0;
  font-family: inherit;
  display: flex;
}

.ctl-block .toggle-track {
  background: var(--border);
  border-radius: 8px;
  flex-shrink: 0;
  width: 32px;
  height: 16px;
  transition: background .15s;
  position: relative;
}

.ctl-block .toggle.on .toggle-track {
  background: var(--accent);
}

.ctl-block .toggle-knob {
  background: #fff;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  transition: left .15s;
  position: absolute;
  top: 2px;
  left: 2px;
}

.ctl-block .toggle.on .toggle-knob {
  left: 18px;
}

.ctl-block .toggle-text {
  color: var(--text-sec);
  min-width: 14px;
  font-size: 11px;
}

.dub-history {
  flex-direction: column;
  flex: 1;
  gap: 6px;
  min-height: 0;
  padding: 8px 10px;
  display: flex;
  overflow-y: auto;
}

.dub-item {
  border: 1px solid var(--border-light);
  background: var(--bg);
  border-radius: 8px;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  transition: border-color .15s;
  display: flex;
}

.dub-item:hover {
  border-color: var(--accent);
}

.dub-play {
  border: 1px solid var(--border-light);
  width: 24px;
  height: 24px;
  color: var(--accent);
  cursor: pointer;
  background: #fff;
  border-radius: 50%;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  padding: 0;
  font-size: 9px;
  display: flex;
}

.dub-play:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.dub-play.playing {
  color: var(--red);
  background: #fef2f2;
  border-color: #fca5a5;
}

.dub-info {
  flex: 1;
  min-width: 0;
}

.dub-name {
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
}

.dub-time {
  color: var(--text-ter);
  margin-top: 1px;
  font-size: 10px;
}

.dub-device {
  vertical-align: middle;
  border-radius: 4px;
  margin-left: 6px;
  padding: 0 5px;
  font-size: 9px;
  font-weight: 600;
  line-height: 14px;
  display: inline-block;
}

.dub-device.m4 {
  background: var(--accent-soft);
  color: var(--accent-2-dark);
  border: 1px solid var(--accent-line);
}

.dub-device.gpu {
  color: #15803d;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

.voice-sampled {
  color: #dc2626;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
}

.voice-sampled b {
  color: #dc2626;
  font-size: 13px;
  font-weight: 700;
}

.dub-filename {
  color: var(--text-sec);
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 62%;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 500;
  overflow: hidden;
}

.emo-section-title {
  color: var(--text);
  margin: 12px 0 8px;
  font-size: 12.5px;
  font-weight: 600;
}

.emo-textarea {
  border: 1px solid var(--border-light);
  background: var(--bg);
  resize: vertical;
  border-radius: 10px;
  outline: none;
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.6;
}

.emo-textarea:focus {
  border-color: var(--accent);
}

.emo-vec-grid {
  grid-template-columns: 1fr 1fr;
  gap: 6px 18px;
  display: grid;
}

.modal-btn-primary {
  background: linear-gradient(180deg, var(--accent-light), var(--accent-dark));
  color: #fff;
  box-shadow: 0 4px 0 var(--accent-2-dark), 0 6px 16px var(--accent-glow);
  font-weight: 700;
}

.mini-btn.emo-btn {
  color: #b45309;
  background: linear-gradient(#fef3c7, #fde68a);
  border-color: #fcd34d;
  font-weight: 600;
  box-shadow: 0 2px #fbbf24, 0 3px 8px #f59e0b40;
}

.mini-btn.emo-btn:hover {
  color: #92400e;
  background: linear-gradient(#fde68a, #fcd34d);
  border-color: #f59e0b;
}

.mini-btn.preset-btn {
  background: linear-gradient(180deg, var(--accent-line-2), var(--accent-line-2));
  color: var(--accent-2-dark);
  border-color: var(--accent-light);
  box-shadow: 0 2px 0 var(--accent-light), 0 3px 8px var(--accent-glow);
  font-weight: 600;
}

.mini-btn.preset-btn:hover {
  background: linear-gradient(180deg, var(--accent-line-2), var(--accent-light));
  border-color: var(--accent-light);
  color: var(--accent-2-dark);
}

.preset-save {
  align-items: center;
  gap: 8px;
  display: flex;
}

.preset-name {
  text-align: left;
  flex: 1;
  min-width: 0;
}

.preset-list {
  flex-direction: column;
  gap: 6px;
  max-height: 122px;
  display: flex;
  overflow-y: auto;
}

.preset-item {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  display: flex;
}

.preset-item-name {
  font-size: 13px;
  font-weight: 600;
}

.mini-btn.preset-del {
  color: var(--red);
  border-color: #fca5a5;
}

.mini-btn.preset-del:hover {
  color: var(--red);
  background: #fef2f2;
  border-color: #f87171;
}

.kb-wrap {
  flex-direction: column;
  gap: 8px;
  width: 92%;
  height: calc(100vh - 6rem);
  margin: 0 auto;
  display: flex;
}

.kb-toolbar {
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  display: flex;
}

.kb-title {
  font-size: 15px;
  font-weight: 700;
}

.kb-sub {
  color: var(--text-ter);
  font-size: 11.5px;
}

.kb-create {
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  display: flex;
}

.kb-input {
  text-align: left;
  flex: 1;
  min-width: 0;
}

.kb-grid {
  flex: 1;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  align-content: start;
  gap: 12px;
  min-height: 0;
  padding-bottom: 8px;
  display: grid;
  overflow-y: auto;
}

.kb-card {
  padding: 0;
  transition: border-color .15s, box-shadow .15s;
  position: relative;
  overflow: hidden;
}

.kb-card.pinned {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.kb-card:hover {
  box-shadow: 0 6px 18px #1018281a;
}

.kb-card-main {
  color: inherit;
  padding: 14px 16px 12px;
  text-decoration: none;
  display: block;
}

.kb-card-head {
  color: var(--accent);
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  display: flex;
}

.kb-card-name {
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
}

.kb-pin-badge {
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 9.5px;
  font-weight: 600;
}

.kb-card-desc {
  color: var(--text-sec);
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 18px;
  margin-bottom: 8px;
  font-size: 12px;
  overflow: hidden;
}

.kb-card-meta {
  color: var(--text-ter);
  align-items: center;
  gap: 12px;
  font-size: 11px;
  display: flex;
}

.kb-card-meta span {
  align-items: center;
  gap: 3px;
  display: inline-flex;
}

.kb-card-time {
  margin-left: auto;
}

.kb-card-actions {
  gap: 4px;
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
}

.kb-card:hover .kb-card-actions {
  display: flex;
}

.mini-btn.kb-pinned {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}

.kbd-wrap {
  flex-direction: column;
  gap: 8px;
  width: 96%;
  height: calc(100vh - 6rem);
  margin: 0 auto;
  display: flex;
}

.kbd-row {
  flex: 1;
  grid-template-rows: 1fr 1fr;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-height: 0;
  display: grid;
}

.kbd-pane {
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.kbd-pane:first-child {
  grid-area: 1 / 2;
}

.kbd-pane:nth-child(2) {
  grid-area: 2 / 2;
}

.kbd-pane:nth-child(3) {
  grid-area: 1 / 1 / 3;
}

.kbd-tools {
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  display: flex;
}

.kbd-list {
  flex-direction: column;
  flex: 1;
  gap: 6px;
  min-height: 0;
  padding: 8px 10px;
  display: flex;
  overflow-y: auto;
}

.kbd-file {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 7px;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  display: flex;
}

.kbd-file-icon {
  color: var(--accent);
  flex-shrink: 0;
  display: flex;
}

.kbd-file-name {
  min-width: 0;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
  flex: 1;
  padding: 0;
  font-family: inherit;
  font-size: 12px;
  text-decoration: none;
  overflow: hidden;
}

.kbd-file-name:hover {
  color: var(--accent);
  text-decoration: underline;
}

.kbd-file-size {
  color: var(--text-ter);
  flex-shrink: 0;
  font-size: 10px;
}

.kbd-note {
  background: var(--bg);
  border: 1px solid var(--border-light);
  cursor: pointer;
  border-radius: 8px;
  padding: 8px 10px;
  transition: border-color .15s;
  position: relative;
}

.kbd-note:hover {
  border-color: var(--accent);
}

.kbd-note-head {
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  display: flex;
}

.kbd-note-title {
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
}

.kbd-remind {
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 4px;
  flex-shrink: 0;
  align-items: center;
  gap: 2px;
  padding: 0 5px;
  font-size: 9.5px;
  display: inline-flex;
}

.kbd-note-body {
  color: var(--text-sec);
  max-height: 34px;
  font-size: 11.5px;
  line-height: 1.5;
  overflow: hidden;
}

.kbd-note-del {
  display: none;
  position: absolute;
  top: 6px;
  right: 6px;
}

.kbd-note:hover .kbd-note-del {
  display: flex;
}

.kb-ctx {
  color: var(--accent);
  opacity: .75;
  margin-right: 6px;
  font-size: 10.5px;
}

.kbd-chat {
  flex-direction: column;
  flex: 1;
  gap: 10px;
  min-height: 0;
  padding: 12px;
  display: flex;
  overflow-y: auto;
}

.kbd-msg {
  max-width: 92%;
}

.kbd-msg.user {
  align-self: flex-end;
}

.kbd-msg-role {
  color: var(--text-ter);
  margin-bottom: 3px;
  font-size: 10px;
}

.kbd-msg.user .kbd-msg-role {
  text-align: right;
}

.kbd-msg-body {
  background: var(--bg);
  border: 1px solid var(--border-light);
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 12.5px;
  line-height: 1.65;
}

.kbd-msg.user .kbd-msg-body {
  background: var(--accent-dim);
  border-color: var(--accent-line);
}

.kbd-chat-foot {
  border-top: 1px solid var(--accent-line);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--accent-soft-2) 100%);
  flex-shrink: 0;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 10px;
  display: flex;
}

.kbd-chat-input {
  border: 1px solid var(--border-light);
  resize: none;
  background: #fff;
  border-radius: 8px;
  outline: none;
  flex: 1;
  min-height: 34px;
  max-height: 100px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.5;
}

.kbd-chat-input:focus {
  border-color: var(--accent);
}

.kbd-remind-row {
  color: var(--text-sec);
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  display: flex;
}

.kbd-remind-row .kb-input {
  flex: 0 0 200px;
}

.kbd-file-badge {
  border-radius: 50%;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 15px;
  height: 15px;
  display: flex;
}

.kbd-file-badge.ok {
  color: #15803d;
  background: #dcfce7;
}

.kbd-file-badge.parsing {
  color: #b45309;
  background: #fef3c7;
}

.kb-preview-text {
  background: var(--bg);
  border: 1px solid var(--border-light);
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 0;
  color: var(--text);
  border-radius: 10px;
  flex: 1;
  margin-top: 12px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.85;
  overflow-y: auto;
}

.kb-preview-frame {
  background: #fff;
  border: none;
  border-radius: 0 0 12px 12px;
  width: 100%;
  height: 100%;
  min-height: 460px;
}

.kb-preview-head {
  position: relative;
}

.kb-dl-center {
  z-index: 2;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.kbd-file-act {
  display: none;
}

.kbd-file:hover .kbd-file-act {
  display: flex;
}

.apps-wrap {
  width: 92%;
  margin: 0 auto;
}

.apps-head {
  margin-bottom: 20px;
}

.apps-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  display: grid;
}

.apps-card {
  color: inherit;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  display: flex;
}

.apps-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 22px var(--accent-glow);
  transform: translateY(-2px);
}

.apps-icon {
  border-radius: 12px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 46px;
  height: 46px;
  font-size: 22px;
  display: flex;
  box-shadow: 0 4px 10px #10182826;
}

.apps-info {
  flex: 1;
  min-width: 0;
}

.apps-name {
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 700;
  display: flex;
}

.apps-ext {
  color: var(--text-ter);
}

.apps-desc {
  color: var(--text-sec);
  margin-top: 3px;
  font-size: 12px;
}

.apps-url {
  color: var(--text-ter);
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  overflow: hidden;
}

.kb-card {
  cursor: grab;
}

.kb-card:active {
  cursor: grabbing;
}

.kb-card.dragging {
  opacity: .45;
}

.kb-card.drag-over {
  transform: scale(1.02);
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-dim) !important;
}

.apps-card {
  cursor: grab;
  position: relative;
}

.apps-card:active {
  cursor: grabbing;
}

.apps-card.dragging {
  opacity: .45;
}

.apps-card.drag-over {
  transform: scale(1.02);
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-dim) !important;
}

.apps-del {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
}

.apps-card:hover .apps-del {
  display: flex;
}

.apps-add {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 16px;
  display: flex;
}

.apps-add-card {
  color: var(--text-ter);
  background: none;
  border-style: dashed;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 78px;
  font-family: inherit;
  font-size: 12px;
  display: flex;
}

.apps-add-card:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.vid-wrap {
  gap: 8px;
  width: 94%;
  height: calc(100vh - 6rem);
  margin: 0 auto;
  display: flex;
}

.vid-models {
  flex-direction: column;
  flex-shrink: 0;
  width: 200px;
  display: flex;
  overflow: hidden;
}

.vid-model-list {
  flex-direction: column;
  flex: 1;
  gap: 6px;
  padding: 8px;
  display: flex;
  overflow-y: auto;
}

.vid-model {
  border: 1.5px solid var(--border-light);
  background: var(--bg);
  cursor: pointer;
  text-align: left;
  border-radius: 10px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  font-family: inherit;
  transition: all .15s;
  display: flex;
}

.vid-model:hover {
  border-color: var(--accent);
}

.vid-model.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.vid-model-icon {
  color: #fff;
  border-radius: 9px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 34px;
  height: 34px;
  display: flex;
}

.vid-model-info {
  flex: 1;
  min-width: 0;
}

.vid-model-name {
  font-size: 13px;
  font-weight: 700;
  display: block;
}

.vid-model-desc {
  color: var(--text-ter);
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
  font-size: 10.5px;
  display: block;
  overflow: hidden;
}

.vid-main {
  flex-direction: column;
  flex: 1;
  min-width: 0;
  display: flex;
  overflow: hidden;
}

.vid-modes {
  gap: 6px;
  display: flex;
}

.vid-mode-tab {
  border: 1px solid var(--border-light);
  height: 26px;
  color: var(--text-sec);
  cursor: pointer;
  background: #fff;
  border-radius: 7px;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 12px;
  transition: all .15s;
  display: flex;
}

.vid-mode-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.vid-mode-tab.active {
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
  border-color: var(--accent-dark);
  color: #fff;
  font-weight: 600;
}

.vid-body {
  flex: 1;
  gap: 10px;
  min-height: 0;
  padding: 12px;
  display: flex;
}

.vid-input-col, .vid-param-col {
  flex-direction: column;
  flex: 1;
  gap: 8px;
  min-width: 0;
  display: flex;
}

.vid-section-title {
  color: var(--text);
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
}

.vid-textarea {
  border: 1px solid var(--border-light);
  background: var(--bg);
  resize: none;
  border-radius: 10px;
  outline: none;
  flex: 1;
  min-height: 120px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.8;
}

.vid-textarea:focus {
  border-color: var(--accent);
}

.vid-upload {
  border: 1.5px dashed var(--border);
  background: var(--bg);
  min-height: 78px;
  color: var(--text-ter);
  cursor: pointer;
  border-radius: 10px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  transition: all .15s;
  display: flex;
}

.vid-upload:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.vid-param-placeholder {
  border: 1px dashed var(--border);
  background: var(--bg);
  color: var(--text-ter);
  text-align: center;
  border-radius: 10px;
  flex: 1;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  line-height: 1.7;
  display: flex;
}

.vid-actions {
  justify-content: flex-end;
  gap: 8px;
  display: flex;
}

.vid-wrap {
  flex-direction: column;
  gap: 8px;
  width: 94%;
  height: calc(100vh - 6rem);
  margin: 0 auto;
  display: flex;
  position: relative;
}

.vid-status {
  border: 1.5px solid var(--border-light);
  background: #fff;
  border-radius: 10px;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 12.5px;
  display: flex;
}

.vid-status.on {
  background: linear-gradient(#f0fdf9, #ecfdf5);
  border-color: #34d399;
}

.vid-status.off {
  color: #b91c1c;
  background: linear-gradient(#fef2f2, #fff1f2);
  border-color: #f87171;
}

.vid-status-dot {
  background: #10b981;
  border-radius: 50%;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  box-shadow: 0 0 0 3px #10b9812e;
}

.vid-status.off .vid-status-dot {
  background: #ef4444;
  box-shadow: 0 0 0 3px #ef44442e;
}

.vid-status-sub {
  color: var(--text-ter);
  font-size: 11.5px;
}

.vid-status.off .vid-status-sub {
  color: #dc2626;
  opacity: .8;
}

.vid-status-warn {
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  display: inline-flex;
}

.vid-grid {
  flex: 1;
  gap: 8px;
  min-height: 0;
  display: flex;
}

.vid-field {
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  display: flex;
}

.vid-label {
  color: var(--text-sec);
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
}

.vid-note {
  color: var(--text-ter);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 400;
}

.vid-hint {
  color: var(--text-ter);
  font-size: 10.5px;
  line-height: 1.6;
}

.vid-hint.center {
  text-align: center;
  margin-top: 2px;
}

.vid-input {
  border: 1px solid var(--border-light);
  background: var(--bg);
  height: 32px;
  color: var(--text);
  border-radius: 8px;
  outline: none;
  width: 100%;
  padding: 0 10px;
  font-family: inherit;
  font-size: 12.5px;
}

.vid-input:focus {
  border-color: var(--accent);
}

.vid-param-grid {
  flex: 1;
  grid-template-columns: 1fr 1fr;
  align-content: start;
  gap: 9px 12px;
  min-height: 0;
  padding-right: 4px;
  display: grid;
  overflow-y: auto;
}

.vid-switch {
  border: 1px solid var(--border-light);
  background: var(--bg);
  width: 74px;
  height: 32px;
  color: var(--text-sec);
  cursor: pointer;
  border-radius: 8px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  font-family: inherit;
  font-size: 12px;
  transition: all .15s;
  display: inline-flex;
}

.vid-switch-knob {
  background: var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  transition: all .15s;
}

.vid-switch.on {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

.vid-switch.on .vid-switch-knob {
  background: var(--accent);
}

.vid-uploads {
  gap: 8px;
  display: grid;
}

.vid-uploads.n2 {
  grid-template-columns: 1fr 1fr;
}

.vid-uploads.n3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.vid-wf {
  color: var(--text-ter);
  background: var(--bg);
  border: 1px dashed var(--border-light);
  word-break: break-all;
  border-radius: 7px;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  font-size: 10.5px;
  display: flex;
}

.vid-offline-mask {
  z-index: 40;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  background: #f8fafcb8;
  border-radius: 12px;
  justify-content: center;
  align-items: center;
  display: flex;
  position: absolute;
  inset: 0;
}

.vid-offline-card {
  color: var(--text-sec);
  text-align: center;
  background: #fff;
  border: 1.5px solid #fecaca;
  border-radius: 16px;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 34px 44px;
  display: flex;
  box-shadow: 0 18px 40px -18px #00000047;
}

.vid-offline-card svg {
  color: #f87171;
}

.vid-offline-card h2 {
  color: var(--text);
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.vid-offline-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.9;
}

.vid-wrap button:disabled, .vid-wrap textarea:disabled, .vid-wrap select:disabled, .vid-wrap input:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.vid-status.wait {
  border-color: var(--border-light);
  background: var(--bg);
  color: var(--text-sec);
}

.vid-status.wait .vid-status-dot {
  background: #94a3b8;
  animation: 1.2s ease-in-out infinite pulse;
  box-shadow: 0 0 0 3px #94a3b82e;
}

.mini-btn.launch {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.mini-btn.launch:hover:not(:disabled) {
  background: var(--accent-dim);
}

.vid-launch-msg {
  color: var(--text-ter);
  white-space: nowrap;
  margin-right: 4px;
  font-size: 11.5px;
}

.vid-offline-actions {
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
  display: flex;
}

.vid-offline-msg {
  color: #b45309;
  max-width: 320px;
  font-size: 11.5px;
  line-height: 1.7;
}

.set-wrap {
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
}

.set-head {
  margin-bottom: 2px;
}

.set-title {
  font-size: 20px;
  font-weight: 700;
}

.set-sub {
  color: var(--text-sec);
  margin-top: 4px;
  font-size: 12.5px;
}

.set-card {
  flex-direction: column;
  display: flex;
}

.set-spacer {
  flex: 1;
}

.set-dot {
  background: #94a3b8;
  border-radius: 50%;
  width: 8px;
  height: 8px;
  box-shadow: 0 0 0 3px #94a3b82e;
}

.set-dot.on {
  background: var(--green);
  box-shadow: 0 0 0 3px #10b9812e;
}

.set-dot.off {
  background: var(--red);
  box-shadow: 0 0 0 3px #ef44442e;
}

.set-dot-label {
  color: var(--text-sec);
  font-size: 11.5px;
}

.set-list {
  flex-direction: column;
  display: flex;
}

.set-row {
  border-bottom: 1px solid var(--border-light);
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  display: flex;
}

.set-row:last-child {
  border-bottom: none;
}

.set-row-ico {
  width: 34px;
  height: 34px;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  display: flex;
}

.set-row-main {
  flex: 1;
  min-width: 0;
}

.set-row-label {
  font-size: 13.5px;
  font-weight: 600;
}

.set-row-desc {
  color: var(--text-ter);
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.6;
}

.set-btn {
  cursor: pointer;
  background: linear-gradient(180deg, #fff, var(--accent-soft-2));
  height: 30px;
  color: var(--text-sec);
  border: 1px solid var(--border);
  box-shadow: 0 2px 0 var(--border);
  border-radius: 8px;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  transition: all .12s;
  display: inline-flex;
}

.set-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.set-btn:active:not(:disabled) {
  box-shadow: 0 1px 0 var(--border);
  transform: translateY(1px);
}

.set-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.set-btn.primary {
  background: linear-gradient(180deg, var(--accent-soft-2), var(--accent-line-2));
  border-color: var(--accent);
  color: var(--accent);
}

.set-btn.danger {
  color: #dc2626;
  background: linear-gradient(#fef2f2, #fee2e2);
  border-color: #fca5a5;
  box-shadow: 0 2px #fca5a5;
}

.set-btn.danger:hover:not(:disabled) {
  color: #b91c1c;
  border-color: #ef4444;
}

.set-btn.ghost {
  border-color: var(--border-light);
  box-shadow: none;
  color: var(--text-sec);
  background: none;
}

.set-confirm {
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  max-width: 62%;
  display: flex;
}

.set-confirm-text {
  color: #b45309;
  text-align: right;
  font-size: 11.5px;
  line-height: 1.6;
}

.set-msg {
  align-items: center;
  gap: 6px;
  display: inline-flex;
}

.set-msg.ok {
  color: #047857;
}

.set-msg.err {
  color: #b91c1c;
}

.set-hint {
  color: var(--text-ter);
}

.set-kv {
  padding: 6px 16px 12px;
}

.set-kv-row {
  border-bottom: 1px dashed var(--border-light);
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  font-size: 12.5px;
  display: flex;
}

.set-kv-row:last-child {
  border-bottom: none;
}

.set-kv-row span {
  color: var(--text-sec);
}

.vid-upload.has {
  border-style: solid;
  border-color: var(--accent);
  background-color: #0f172a0a;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  position: relative;
  overflow: hidden;
}

.vid-uploads.n1 .vid-upload, .vid-uploads.n2 .vid-upload, .vid-uploads.n3 .vid-upload {
  min-height: 132px;
}

.vid-uploads.n3 .vid-upload {
  min-height: 104px;
}

.vid-upload-name {
  color: #fff;
  text-align: center;
  background: #0f172a9e;
  padding: 3px 6px;
  font-size: 10.5px;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.vid-gen-msg {
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11.5px;
  line-height: 1.6;
}

.vid-gen-msg.submitting, .vid-gen-msg.running {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.vid-gen-msg.done {
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.vid-gen-msg.error {
  color: #b91c1c;
  word-break: break-all;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.vid-result {
  background: #000;
  border-radius: 10px;
  flex: 1;
  justify-content: center;
  align-items: center;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.vid-player {
  border-radius: 10px;
  max-width: 100%;
  max-height: 100%;
}

.img-dev-switch {
  background: #94a3b824;
  border-radius: 8px;
  flex-shrink: 0;
  gap: 4px;
  padding: 2px;
  display: flex;
}

.img-dev {
  height: 26px;
  color: var(--text-sec);
  cursor: pointer;
  background: none;
  border: 1px solid #0000;
  border-radius: 6px;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 12px;
  transition: all .15s;
  display: inline-flex;
}

.img-dev:hover {
  color: var(--accent);
}

.img-dev.active {
  border-color: var(--accent);
  color: var(--accent);
  background: #fff;
  font-weight: 600;
  box-shadow: 0 1px 3px #00000014;
}

.img-dev-dot {
  background: var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  width: 6px;
  height: 6px;
}

.img-dev-dot.on {
  background: #10b981;
  box-shadow: 0 0 0 2px #10b98133;
}

.vid-uploads.n1 {
  grid-template-columns: 1fr;
}

.sys-wrap {
  flex-direction: column;
  gap: 10px;
  width: 94%;
  height: calc(100vh - 6rem);
  margin: 0 auto;
  display: flex;
  overflow-y: auto;
}

.sys-head {
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  display: flex;
}

.sys-updated {
  color: var(--text-ter);
  font-size: 11.5px;
}

.sys-grid {
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 10px;
  display: grid;
}

@media (max-width: 1200px) {
  .sys-grid {
    grid-template-columns: 1fr;
  }
}

.sys-card {
  flex-direction: column;
  padding: 0;
  display: flex;
  overflow: hidden;
}

.sys-card-head {
  border-bottom: 1.5px solid var(--accent-line);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--accent-soft-2) 100%);
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  display: flex;
}

.sys-icon {
  color: #fff;
  border-radius: 9px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  display: flex;
}

.sys-icon.pc {
  background: linear-gradient(135deg, #059669, #10b981);
}

.sys-icon.mac {
  background: linear-gradient(135deg, #0891b2, #22d3ee);
}

.sys-name {
  font-size: 14px;
  font-weight: 700;
}

.sys-sub {
  color: var(--text-ter);
  margin-top: 1px;
  font-size: 11px;
}

.sys-badge {
  border: 1px solid;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
}

.sys-badge.on {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.sys-badge.off {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

.sys-block {
  border-bottom: 1px dashed var(--border-light);
  padding: 11px 14px;
}

.sys-block:last-child {
  border-bottom: none;
}

.sys-block-title {
  color: var(--text-sec);
  letter-spacing: .3px;
  align-items: center;
  gap: 5px;
  margin-bottom: 7px;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
}

.sys-row {
  align-items: baseline;
  gap: 8px;
  padding: 3px 0;
  font-size: 12px;
  display: flex;
}

.sys-row-label {
  color: var(--text-ter);
  flex-shrink: 0;
  min-width: 68px;
}

.sys-row-value {
  color: var(--text);
  word-break: break-all;
}

.sys-metric {
  margin-bottom: 9px;
}

.sys-metric-top {
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 11.5px;
  display: flex;
}

.sys-metric-top > span {
  color: var(--text-sec);
  align-items: center;
  gap: 4px;
  display: inline-flex;
}

.sys-metric-top b {
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
}

.sys-bar {
  background: #94a3b833;
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
}

.sys-bar-fill {
  border-radius: 999px;
  height: 100%;
  transition: width .4s;
}

.sys-chips {
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  display: flex;
}

.sys-chip {
  color: var(--text-sec);
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  display: inline-flex;
}

.sys-offline {
  color: var(--text-ter);
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 30px 14px;
  font-size: 12.5px;
  display: flex;
}

.sys-offline.small {
  justify-content: flex-start;
  padding: 12px;
}

.sys-foot {
  text-align: center;
  color: var(--text-ter);
  padding: 6px 0 14px;
  font-size: 11px;
}

.sys-badge:empty, .sys-badge {
  text-align: center;
  min-width: 44px;
}

.sys-icon.ctrl {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent-2-dark));
}

.sys-icon.small {
  border-radius: 8px;
  width: 26px;
  height: 26px;
}

.sys-ctrl-grid {
  grid-template-columns: 1fr 1fr;
  gap: 0;
  display: grid;
}

@media (max-width: 900px) {
  .sys-ctrl-grid {
    grid-template-columns: 1fr;
  }
}

.sys-ctrl-block {
  border-right: 1px dashed var(--border-light);
  padding: 12px 14px;
}

.sys-ctrl-block:last-child {
  border-right: none;
}

@media (max-width: 900px) {
  .sys-ctrl-block {
    border-right: none;
    border-bottom: 1px dashed var(--border-light);
  }

  .sys-ctrl-block:last-child {
    border-bottom: none;
  }
}

.sys-ctrl-head {
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  display: flex;
}

.sys-ctrl-title {
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
}

.sys-ctrl-sub {
  color: var(--text-ter);
  font-size: 10.5px;
  font-weight: 400;
}

.sys-ctrl-status {
  color: var(--text-sec);
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 7px;
  align-items: center;
  gap: 5px;
  margin-bottom: 9px;
  padding: 5px 9px;
  font-size: 11.5px;
  display: flex;
}

.sys-ctrl-actions {
  flex-wrap: wrap;
  gap: 6px;
  display: flex;
}

.sys-ctrl-msg {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  margin-top: 7px;
  padding: 4px 8px;
  font-size: 11px;
}

.sys-ctrl-actions.power {
  border-top: 1px dashed var(--border-light);
  margin-top: 6px;
  padding-top: 7px;
}

.mini-btn.power {
  color: #c2410c;
  border-color: #fdba74;
}

.mini-btn.power:hover:not(:disabled) {
  background: #fff7ed;
}

.mini-btn.power.danger {
  color: #b91c1c;
  border-color: #fca5a5;
}

.mini-btn.power.danger:hover:not(:disabled) {
  background: #fef2f2;
}

.submit-btn.voice-submit.danger {
  background: linear-gradient(#f87171, #dc2626) !important;
  border-color: #b91c1c !important;
}

.sys-modal-mask {
  z-index: 200;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  background: #0f172a73;
  justify-content: center;
  align-items: center;
  display: flex;
  position: fixed;
  inset: 0;
}

.sys-modal {
  border: 1.5px solid var(--border-light);
  background: #fff;
  border-radius: 14px;
  width: min(420px, 92vw);
  overflow: hidden;
  box-shadow: 0 24px 60px -20px #00000073;
}

.sys-modal-head {
  color: #b45309;
  background: linear-gradient(#fffbeb, #fef3c7);
  border-bottom: 1.5px solid #fde68a;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
}

.sys-modal-head.danger {
  color: #b91c1c;
  background: linear-gradient(#fef2f2, #fee2e2);
  border-bottom-color: #fecaca;
}

.sys-modal-body {
  color: var(--text-sec);
  padding: 14px 16px;
  font-size: 12.5px;
  line-height: 1.85;
}

.sys-modal-body p {
  margin: 0 0 8px;
}

.sys-modal-target b {
  color: var(--text);
}

.sys-modal-warn {
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
}

.sys-modal-actions {
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px 16px;
  display: flex;
}

.sys-wrap > .sys-card, .sys-grid > .sys-card, .sys-ctrl-grid, .sys-grid {
  flex-shrink: 0;
}

.img-dev-fixed {
  border: 1px solid var(--accent);
  background: var(--accent-dim);
  height: 24px;
  color: var(--accent);
  border-radius: 7px;
  flex-shrink: 0;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
}

.sys-ctrl-grid.one {
  grid-template-columns: 1fr;
}

.sys-ctrl-grid.one .sys-ctrl-block {
  border-right: none;
}

.vid-upload.has-audio {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
  border-style: solid;
}

.vid-seed-row {
  align-items: center;
  gap: 6px;
  display: flex;
}

.vid-seed-row .vid-input {
  flex: 1;
  min-width: 0;
}

.vid-seed-row .mini-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.vid-adv-toggle {
  border: 1px dashed var(--border-light);
  color: var(--text-ter);
  cursor: pointer;
  background: none;
  border-radius: 6px;
  align-self: flex-start;
  margin: 4px 0 2px;
  padding: 3px 8px;
  font-family: inherit;
  font-size: 11px;
}

.vid-adv-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.mini-btn.help {
  flex-shrink: 0;
  padding: 2px 9px;
  font-size: 11px;
}

.sys-modal.help {
  flex-direction: column;
  width: min(560px, 94vw);
  max-height: 80vh;
  display: flex;
}

.sys-modal-head.help {
  color: #1d4ed8;
  background: linear-gradient(#eff6ff, #dbeafe);
  border-bottom-color: #bfdbfe;
}

.sys-modal.help .sys-modal-body {
  flex: 1;
  overflow-y: auto;
}

.help-model {
  color: var(--text);
  background: var(--accent-soft-2);
  border: 1px solid var(--border-light);
  white-space: pre-wrap;
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 9px 11px;
  font-size: 12.5px;
  line-height: 1.9;
}

.help-sec-title {
  color: var(--text-ter);
  margin: 0 0 7px;
  font-size: 11.5px;
  font-weight: 700;
}

.help-mode {
  border-left: 3px solid var(--border-light);
  margin-bottom: 12px;
  padding: 2px 0 2px 10px;
}

.help-mode.active {
  border-left-color: var(--accent);
  background: var(--accent-dim);
  border-radius: 0 8px 8px 0;
  margin-left: -4px;
  padding: 8px 10px;
}

.help-mode-name {
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
}

.help-cur {
  color: #fff;
  background: var(--accent);
  border-radius: 4px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 600;
}

.help-mode-desc {
  color: var(--text-ter);
  margin-top: 2px;
  font-size: 11.5px;
}

.help-mode-usage {
  color: var(--text-sec);
  white-space: pre-wrap;
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.85;
}

.help-mode-warn {
  color: #b45309;
  margin-top: 4px;
  font-size: 11.5px;
}

.vid-grid.one {
  display: block;
}

.vid-pick-label {
  color: var(--text-ter);
  flex-shrink: 0;
  font-size: 11.5px;
}

.vid-input.vid-pick {
  flex-shrink: 0;
  width: auto;
  min-width: 132px;
}

.vid-input.vid-pick.wide {
  min-width: 190px;
}

.wf-strip {
  border-bottom: 1.5px solid var(--border-light);
  background: var(--bg);
  flex-shrink: 0;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
  max-height: 268px;
  padding: 10px 14px;
  display: grid;
  overflow-y: auto;
}

.wf-card {
  border: 1.5px solid var(--border-light);
  cursor: pointer;
  text-align: left;
  background: #fff;
  border-radius: 10px;
  flex-direction: column;
  gap: 4px;
  padding: 0 0 6px;
  font-family: inherit;
  transition: all .15s;
  display: flex;
  overflow: hidden;
}

.wf-card:hover:not(:disabled) {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -8px #00000040;
}

.wf-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.wf-card:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.wf-cover {
  color: #fff;
  background-position: center;
  background-size: cover;
  justify-content: center;
  align-items: center;
  height: 76px;
  display: flex;
  position: relative;
}

.wf-badge {
  color: #fff;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  background: #0f172a8c;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 600;
  position: absolute;
  bottom: 4px;
  left: 5px;
}

.wf-off {
  color: #fff;
  background: #dc2626d9;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 9.5px;
  font-style: normal;
  position: absolute;
  top: 4px;
  right: 5px;
}

.wf-name {
  color: var(--text);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  padding: 0 7px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  overflow: hidden;
}

.wf-meta {
  color: var(--text-ter);
  padding: 0 7px;
  font-size: 10px;
}

.vid-cur {
  color: var(--text-ter);
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 260px;
  font-size: 11.5px;
  overflow: hidden;
}

.sys-modal.pick {
  flex-direction: column;
  width: min(880px, 94vw);
  max-height: 86vh;
  display: flex;
}

.sys-modal-head.pick {
  color: #7c2d12;
  background: linear-gradient(#fff7ed, #ffedd5);
  border-bottom-color: #fed7aa;
}

.pick-count {
  color: var(--text-ter);
  font-size: 11.5px;
  font-weight: 400;
}

.pick-grid {
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  flex: 1;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: min-content;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 14px 16px;
  display: grid;
  overflow: hidden auto;
}

.pick-grid::-webkit-scrollbar {
  width: 10px;
}

.pick-grid::-webkit-scrollbar-track {
  background: #94a3b81a;
  border-radius: 6px;
}

.pick-grid::-webkit-scrollbar-thumb {
  background: var(--border);
  background-clip: content-box;
  border: 2px solid #0000;
  border-radius: 6px;
}

.pick-grid::-webkit-scrollbar-thumb:hover {
  background: #94a3b8 padding-box content-box;
}

@media (max-width: 780px) {
  .pick-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pick-card {
  border: 1.5px solid var(--border-light);
  cursor: pointer;
  text-align: left;
  background: #fff;
  border-radius: 10px;
  flex-direction: column;
  gap: 5px;
  height: max-content;
  padding: 0 0 8px;
  font-family: inherit;
  transition: all .15s;
  display: flex;
  overflow: hidden;
}

.pick-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -10px #0000004d;
}

.pick-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2.5px var(--accent-dim);
}

.pick-cover {
  aspect-ratio: 1;
  color: #fff;
  background-color: #94a3b81f;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: auto;
  display: flex;
  position: relative;
}

.pick-type {
  color: #fff;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  background: #0f172a8c;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  position: absolute;
  top: 5px;
  left: 6px;
}

.pick-custom {
  color: #fff;
  background: #7c3aedcc;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  position: absolute;
  top: 5px;
  right: 6px;
}

.pick-name {
  color: var(--text);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  padding: 0 9px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
}

.pick-meta {
  color: var(--text-ter);
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 9px;
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  overflow: hidden;
}

.pick-empty {
  text-align: center;
  color: var(--text-ter);
  grid-column: 1 / -1;
  padding: 40px 0;
  font-size: 12.5px;
}

.pick-guide {
  color: var(--text-ter);
  text-align: center;
  flex-direction: column;
  flex: 1;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 36px 20px;
  display: flex;
}

.pick-guide svg {
  color: var(--accent);
  opacity: .55;
}

.pick-guide h3 {
  color: var(--text-sec);
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.pick-guide p {
  margin: 0;
  font-size: 12.5px;
  line-height: 2;
}

.pick-guide b {
  color: var(--accent);
}

.pick-guide-sub {
  color: var(--text-ter);
  font-size: 11.5px !important;
}

.help-cur-wf {
  color: var(--text);
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 700;
}

.vid-curline {
  border-bottom: 1.5px solid var(--border-light);
  background: linear-gradient(180deg, var(--accent-soft-2), var(--accent-soft-2));
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12.5px;
  display: flex;
}

.cl-model {
  color: var(--accent-dark);
  font-weight: 600;
}

.cl-type {
  color: #0891b2;
  font-weight: 600;
}

.cl-name {
  color: var(--text);
  font-weight: 700;
}

.cl-sep {
  color: var(--text-ter);
  opacity: .6;
}

.mini-btn.locked {
  color: #b45309;
  background: #fffbeb;
  border-color: #f59e0b;
  font-weight: 600;
}

.vid-seed-row .mini-btn {
  justify-content: center;
  min-width: 62px;
}

.help-rh {
  border: 1px solid var(--border-light);
  background: #fff;
  border-radius: 8px;
  margin-top: 12px;
  padding: 10px 12px;
}

.help-rh-title {
  color: var(--text-ter);
  margin-bottom: 3px;
  font-size: 10.5px;
}

.help-rh-name {
  color: var(--text);
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

.help-rh-tags {
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 6px;
  display: flex;
}

.help-rh-tag {
  color: #7c2d12;
  background: #ffedd5;
  border: 1px solid #fed7aa;
  border-radius: 5px;
  padding: 1px 7px;
  font-size: 11px;
}

.help-rh-meta {
  color: var(--text-ter);
  margin-bottom: 6px;
  font-size: 11px;
}

.help-rh-link {
  color: var(--accent);
  font-size: 11.5px;
  text-decoration: none;
}

.help-rh-link:hover {
  text-decoration: underline;
}

.pick-cover-video {
  object-fit: cover;
  pointer-events: none;
  border-radius: inherit;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.pick-cover > svg, .pick-cover > em {
  z-index: 2;
  position: relative;
}

.gen-tabs {
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 8px 12px;
  display: flex;
}

.gen-tab {
  border: 1px solid var(--border-light);
  background: var(--bg);
  height: 30px;
  color: var(--text-sec);
  cursor: pointer;
  border-radius: 9px;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  font-size: 12px;
  transition: all .15s;
  display: inline-flex;
}

.gen-tab:hover {
  color: var(--text);
}

.gen-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.gen-tab-count {
  color: inherit;
  text-align: center;
  background: #00000012;
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  min-width: 18px;
  padding: 0 5px;
  font-size: 10.5px;
  font-style: normal;
  display: inline-flex;
}

.gen-tab.active .gen-tab-count {
  background: #ffffff40;
}

.gen-summary {
  color: var(--text-ter);
  margin-left: auto;
  padding-right: 4px;
  font-size: 11.5px;
}

.gen-summary b {
  color: var(--text-sec);
}

.gen-empty {
  text-align: center;
  color: var(--text-ter);
  padding: 60px 0;
  font-size: 13px;
}

.gen-list {
  flex-direction: column;
  gap: 8px;
  display: flex;
}

.gen-row {
  border-radius: 12px;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  display: flex;
}

.gen-row.pinned {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.gen-row.busy {
  opacity: .55;
  pointer-events: none;
}

.gen-thumb {
  cursor: pointer;
  background: #e5e9f0;
  border-radius: 9px;
  flex: none;
  justify-content: center;
  align-items: center;
  width: 76px;
  height: 76px;
  display: flex;
  position: relative;
  overflow: hidden;
}

.gen-thumb img, .gen-thumb video {
  object-fit: contain;
  background: #0f1117;
  width: 100%;
  height: 100%;
  display: block;
}

.gen-thumb-audio {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  display: flex;
}

.gen-badge-type, .gen-badge-pin, .gen-badge-lock {
  color: #fff;
  background: #111827b8;
  border-radius: 5px;
  align-items: center;
  padding: 3px 5px;
  font-size: 10px;
  line-height: 1;
  display: inline-flex;
  position: absolute;
}

.gen-badge-type {
  bottom: 4px;
  left: 4px;
}

.gen-badge-pin {
  background: var(--accent);
  top: 4px;
  right: 4px;
}

.gen-badge-lock {
  background: var(--yellow);
  top: 4px;
  right: 4px;
}

.gen-badge-pin + .gen-badge-lock {
  top: 26px;
}

.gen-info {
  flex: auto;
  min-width: 0;
}

.gen-name {
  color: var(--text);
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
}

.gen-file {
  color: var(--text-ter);
  white-space: nowrap;
  text-overflow: ellipsis;
  margin-top: 1px;
  font-size: 11px;
  overflow: hidden;
}

.gen-meta {
  color: var(--text-sec);
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  display: flex;
}

.gen-dot {
  color: var(--border);
}

.gen-acts {
  flex: none;
  gap: 5px;
  display: flex;
}

.gen-act {
  border: 1px solid var(--border-light);
  background: var(--bg);
  height: 28px;
  color: var(--text-sec);
  cursor: pointer;
  border-radius: 8px;
  align-items: center;
  gap: 4px;
  padding: 0 9px;
  font-size: 11.5px;
  text-decoration: none;
  transition: all .15s;
  display: inline-flex;
}

.gen-act:hover {
  color: var(--text);
  border-color: var(--border);
}

.gen-act.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.gen-act.danger:hover:not(:disabled) {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.gen-act:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.gen-modal-mask {
  z-index: 80;
  background: #11182773;
  justify-content: center;
  align-items: center;
  padding: 24px;
  display: flex;
  position: fixed;
  inset: 0;
}

.gen-modal {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  flex-direction: column;
  width: min(860px, 92vw);
  max-height: 88vh;
  display: flex;
  overflow: hidden;
}

.gen-modal.small {
  width: min(420px, 92vw);
}

.gen-modal-head {
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
}

.gen-modal-x {
  cursor: pointer;
  color: var(--text-ter);
  background: none;
  border: none;
  display: inline-flex;
}

.gen-modal-x:hover {
  color: var(--text);
}

.gen-modal-body {
  background: #0f1117;
  flex: auto;
  justify-content: center;
  align-items: center;
  min-height: 180px;
  display: flex;
  overflow: auto;
}

.gen-modal-body img, .gen-modal-body video {
  max-width: 100%;
  max-height: 68vh;
  display: block;
}

.gen-modal-foot {
  border-top: 1px solid var(--border-light);
  color: var(--text-ter);
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 11.5px;
  display: flex;
}

.gen-modal-foot.end {
  justify-content: flex-end;
}

.gen-modal-foot .ctl-btn {
  align-items: center;
  gap: 4px;
  text-decoration: none;
  display: inline-flex;
}

.ctl-btn.danger {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.gen-confirm {
  padding: 14px;
  font-size: 12.5px;
}

.gen-confirm-name {
  color: var(--text);
  word-break: break-all;
  margin: 0 0 6px;
  font-weight: 600;
}

.gen-confirm-note {
  color: var(--text-sec);
  margin: 0;
}

.spin {
  animation: .9s linear infinite spin;
}

@media (max-width: 900px) {
  .gen-acts .gen-act span {
    display: none;
  }

  .gen-thumb {
    width: 60px;
    height: 60px;
  }
}

.gen-chip {
  color: #fff;
  border-radius: 5px;
  align-items: center;
  height: 16px;
  padding: 0 6px;
  font-size: 10.5px;
  font-weight: 600;
  display: inline-flex;
}

.gen-chip.video {
  background: var(--accent);
}

.gen-chip.image {
  background: #10b981;
}

.gen-chip.audio {
  background: var(--accent-2);
}

.gen-cb {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
  flex: none;
}

.gen-cb:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.gen-cb-wrap {
  color: var(--text-sec);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  display: inline-flex;
}

.gen-row.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.gen-batch {
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 7px 12px;
  display: flex;
}

.gen-batch-text {
  color: var(--text-sec);
  font-size: 12px;
}

.gen-batch-text b {
  color: var(--accent);
}

.gen-batch-msg {
  color: var(--text-sec);
  border-color: var(--yellow);
  background: #fffbeb;
  margin-bottom: 10px;
  padding: 8px 12px;
  font-size: 11.5px;
}

.gen-confirm-list {
  color: var(--text-sec);
  max-height: 160px;
  margin: 6px 0 8px;
  padding-left: 18px;
  font-size: 11.5px;
  overflow: auto;
}

.gen-confirm-list li {
  word-break: break-all;
  margin: 1px 0;
}

.voice-devbar {
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 14px;
  display: flex;
}

.voice-devbar-label {
  color: var(--text-sec);
  flex-shrink: 0;
  font-size: 12px;
}

.voice-devbar-note {
  color: var(--text-ter);
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11.5px;
  overflow: hidden;
}

.img-dev.off {
  opacity: .45;
  cursor: not-allowed;
}

.img-dev.off:hover {
  color: var(--text-sec);
}

.new-article-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  cursor: pointer;
  height: 26px;
  box-shadow: 0 2px 8px var(--accent-glow);
  border: none;
  border-radius: 8px;
  align-items: center;
  gap: 5px;
  margin-left: 4px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  transition: all .15s;
  display: inline-flex;
}

.new-article-btn:hover {
  box-shadow: 0 4px 14px var(--accent-glow);
  transform: translateY(-1px);
}

.new-article-btn:active {
  transform: translateY(0);
}

.trail-btn {
  border: 1px solid var(--accent-2);
  height: 26px;
  color: var(--accent-2-dark);
  cursor: pointer;
  background: #fff;
  border-radius: 8px;
  align-items: center;
  gap: 5px;
  padding: 0 11px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  transition: all .15s;
  display: inline-flex;
}

.trail-btn:hover {
  background: var(--accent-soft-2);
}

.trail-btn em {
  background: var(--accent-2-dark);
  color: #fff;
  text-align: center;
  border-radius: 9px;
  min-width: 17px;
  height: 17px;
  margin-left: 1px;
  padding: 0 4px;
  font-size: 10.5px;
  font-style: normal;
  line-height: 17px;
}

.input-row-empty {
  justify-content: center;
  align-items: center;
  min-height: 78px;
  display: flex;
}

.modal-box.wide {
  width: min(920px, 92vw);
}

.modal-box.wide .modal-body {
  padding: 20px 24px 22px;
}

.modal-x {
  color: var(--text-ter);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 8px;
  padding: 4px;
  display: inline-flex;
}

.modal-x:hover {
  color: #4b5563;
  background: #f3f4f6;
}

.modal-input {
  min-height: 220px;
}

.trail-list {
  flex-direction: column;
  gap: 8px;
  max-height: 60vh;
  display: flex;
  overflow: auto;
}

.trail-item {
  border: 1px solid #e5e7eb;
  border-left: 3px solid var(--accent-2);
  background: #fafafa;
  border-radius: 10px;
  padding: 10px 12px;
}

.trail-time {
  color: var(--text-ter);
  font-size: 11px;
}

.trail-fb {
  color: #1f2937;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 4px 0 3px;
  font-size: 13px;
  line-height: 1.6;
}

.trail-meta {
  color: var(--text-ter);
  font-size: 11px;
}

.submit-btn, .new-article-btn {
  white-space: nowrap;
}

[data-theme="cctv-grey"] {
  --accent-glow: #5b9bd559;
  --sidebar-active-bg: #454e5e;
  --bg: #eef1f5;
  --card: #fff;
  --border: #ccd4de;
  --border-light: #dfe5ec;
  --text: #1a1d29;
  --text-sec: var(--text-sec);
  --text-ter: var(--text-ter);
  --accent: #5b9bd5;
  --accent-light: #7cb0e0;
  --accent-dark: #3f7fb8;
  --accent-2: #3f7fb8;
  --accent-2-dark: #2f6fa8;
  --accent-dim: #5b9bd51a;
  --accent-soft: #e3eef8;
  --accent-soft-2: #f0f6fc;
  --accent-line: #cfe2f3;
  --accent-line-2: #b6d4ec;
  --sidebar-bg: #2b2f36;
  --sidebar-hover: #363b44;
  --sidebar-text: #c8ccd4;
  --sidebar-text-hover: #fff;
  --sidebar-text-active: #7cb0e0;
  --sidebar-text-dim: #8b9099;
  --sidebar-logo-text: #eef1f5;
  --sidebar-border: #22262c;
  --topbar-bg: #fffffff2;
}

[data-theme="cctv-red"] {
  --accent-glow: #c8102e4d;
  --sidebar-active-bg: #b83030;
  --bg: #f7f3f3;
  --card: #fff;
  --border: #e0cfd0;
  --border-light: #ecdedf;
  --text: #1f1a1a;
  --text-sec: #6b5f60;
  --text-ter: #9c9091;
  --accent: #c8102e;
  --accent-light: #e0455f;
  --accent-dark: #9d0c24;
  --accent-2: #8f1d1d;
  --accent-2-dark: #6e1414;
  --accent-dim: #c8102e14;
  --accent-soft: #fbe4e8;
  --accent-soft-2: #fdf1f3;
  --accent-line: #f2c9d1;
  --accent-line-2: #e8a8b5;
  --sidebar-bg: #8f1d1d;
  --sidebar-hover: #a32424;
  --sidebar-text: #f0dada;
  --sidebar-text-hover: #fff;
  --sidebar-text-active: #ffd9a0;
  --sidebar-text-dim: #cf9f9f;
  --sidebar-logo-text: #fff;
  --sidebar-border: #751717;
  --topbar-bg: #fffffff2;
}

[data-theme="cctv-navy"] {
  --accent-glow: #2f6fb559;
  --sidebar-active-bg: #b6cee6;
  --bg: var(--accent-soft-2);
  --card: #fff;
  --border: #c9d6e6;
  --border-light: #dde6f0;
  --text: #16233a;
  --text-sec: #5b6b82;
  --text-ter: #8d9aab;
  --accent: #2f6fb5;
  --accent-light: #5590d0;
  --accent-dark: #1f5590;
  --accent-2: #1f3a6b;
  --accent-2-dark: #16294d;
  --accent-dim: #2f6fb517;
  --accent-soft: #e2ecf7;
  --accent-soft-2: #f1f6fc;
  --accent-line: #c9def2;
  --accent-line-2: #a9cbe9;
  --sidebar-bg: #dce6f1;
  --sidebar-hover: #e5e0d0;
  --sidebar-text: #2a3a52;
  --sidebar-text-hover: #16233a;
  --sidebar-text-active: #1f5590;
  --sidebar-text-dim: #6b7c93;
  --sidebar-logo-text: #16233a;
  --sidebar-border: #c3d2e0;
  --topbar-bg: #fffffff2;
}

[data-theme="coolblue"] {
  --accent-glow: #3a7bc859;
  --sidebar-active-bg: #b6cee6;
  --bg: #f7f9fc;
  --card: #fff;
  --border: #d3dde8;
  --border-light: #e3eaf2;
  --text: #1a2734;
  --text-sec: #5d6b7a;
  --text-ter: #93a1b0;
  --accent: #3a7bc8;
  --accent-light: #5f9ada;
  --accent-dark: #2a5f9e;
  --accent-2: #1e3a5f;
  --accent-2-dark: #162c48;
  --accent-dim: #3a7bc817;
  --accent-soft: #e4eefa;
  --accent-soft-2: #f2f7fd;
  --accent-line: #cfe1f5;
  --accent-line-2: #b0cdec;
  --sidebar-bg: #d9e4f0;
  --sidebar-hover: #e8eef5;
  --sidebar-text: #27394f;
  --sidebar-text-hover: #132234;
  --sidebar-text-active: #2a5f9e;
  --sidebar-text-dim: #6a7b8f;
  --sidebar-logo-text: #132234;
  --sidebar-border: #c2d2e2;
  --topbar-bg: #fffffff2;
}

.theme-switch {
  display: inline-flex;
  position: relative;
}

.theme-menu {
  background: var(--card);
  border: 1px solid var(--border-light);
  z-index: 60;
  border-radius: 14px;
  width: 268px;
  padding: 6px;
  position: absolute;
  top: 44px;
  right: 0;
  box-shadow: 0 12px 32px #10182829, 0 0 0 1px #10182808;
}

.theme-menu-head {
  color: var(--text-ter);
  padding: 6px 8px 8px;
  font-size: 11.5px;
}

.theme-item {
  cursor: pointer;
  text-align: left;
  background: none;
  border: none;
  border-radius: 10px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  font-family: inherit;
  transition: background .15s;
  display: flex;
}

.theme-item:hover, .theme-item.active {
  background: var(--accent-dim);
}

.theme-swatch {
  border: 1px solid var(--border-light);
  border-radius: 6px;
  flex: none;
  width: 38px;
  height: 22px;
  display: inline-flex;
  overflow: hidden;
}

.theme-swatch i {
  flex: 1;
  display: block;
}

.theme-meta {
  flex-direction: column;
  flex: 1;
  gap: 1px;
  min-width: 0;
  display: flex;
}

.theme-meta b {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}

.theme-meta em {
  color: var(--text-ter);
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 10.5px;
  font-style: normal;
  overflow: hidden;
}

.theme-check {
  color: var(--accent);
  flex: none;
}

.gen-pager {
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 12px;
  display: flex;
}

.gen-pager-info {
  color: var(--text-ter);
  font-size: 11.5px;
}

.gen-pager-info b {
  color: var(--text-sec);
}

.gen-page-btn {
  border: 1px solid var(--border-light);
  background: var(--card);
  min-width: 28px;
  height: 26px;
  color: var(--text-sec);
  cursor: pointer;
  border-radius: 7px;
  padding: 0 8px;
  font-family: inherit;
  font-size: 12px;
  transition: all .15s;
}

.gen-page-btn:hover {
  color: var(--text);
  border-color: var(--border);
}

.gen-page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

.gen-page-dots {
  color: var(--text-ter);
  padding: 0 2px;
  font-size: 12px;
}

.card-bottom-bar:after {
  content: "";
  background: linear-gradient(0deg, var(--accent-soft) 0%, var(--accent-soft-2) 100%);
  border-top: 1px solid var(--accent-line);
  flex-shrink: 0;
  height: 8px;
  display: block;
}

.agent-wrap {
  flex-direction: column;
  gap: 10px;
  height: calc(100vh - 7rem);
  min-height: 0;
  display: flex;
}

.agent-bar {
  border-radius: 12px;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  display: flex;
}

.agent-bar-label {
  color: var(--text-sec);
  font-size: 12px;
}

.agent-tabs {
  gap: 6px;
  display: flex;
}

.agent-tab {
  border: 1px solid var(--border-light);
  background: var(--card);
  height: 28px;
  color: var(--text-sec);
  cursor: pointer;
  border-radius: 9px;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 12px;
  transition: all .15s;
  display: inline-flex;
}

.agent-tab:hover {
  color: var(--text);
}

.agent-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.agent-sid {
  color: var(--text-ter);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
}

.agent-chat {
  flex-direction: column;
  flex: auto;
  min-height: 0;
  padding: 0;
  display: flex;
  overflow: hidden;
}

.agent-msgs {
  flex-direction: column;
  flex: auto;
  gap: 14px;
  padding: 16px;
  display: flex;
  overflow-y: auto;
}

.agent-empty {
  text-align: center;
  max-width: 460px;
  color: var(--text-ter);
  margin: auto;
  font-size: 12.5px;
  line-height: 1.8;
}

.agent-msg {
  align-items: flex-start;
  gap: 10px;
  display: flex;
}

.agent-msg.user {
  flex-direction: row-reverse;
}

.agent-avatar {
  background: var(--accent-dim);
  width: 28px;
  height: 28px;
  color: var(--accent);
  border-radius: 9px;
  flex: none;
  justify-content: center;
  align-items: center;
  display: flex;
}

.agent-msg.user .agent-avatar {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.agent-bubble {
  background: var(--accent-soft-2);
  border: 1px solid var(--accent-line);
  max-width: min(760px, 78%);
  color: var(--text);
  word-break: break-word;
  white-space: pre-wrap;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.75;
}

.agent-msg.user .agent-bubble {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.agent-typing {
  color: var(--text-ter);
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  display: inline-flex;
}

.agent-input-row {
  border-top: 1px solid var(--accent-line);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--accent-soft-2) 100%);
  flex-shrink: 0;
}

.agent-input {
  resize: vertical;
  width: 100%;
  min-height: 78px;
  max-height: 220px;
  color: var(--text);
  background: none;
  border: none;
  outline: none;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.7;
}

.agent-input::placeholder {
  color: var(--text-ter);
}

.agent-input-foot {
  align-items: center;
  gap: 10px;
  padding: 6px 16px 12px;
  display: flex;
}

.agent-error {
  color: var(--red);
  align-items: center;
  gap: 5px;
  font-size: 12px;
  display: inline-flex;
}

.ag-wrap {
  grid-template-columns: 250px minmax(0, 1fr) 220px;
  gap: 10px;
  height: calc(100vh - 7rem);
  min-height: 0;
  display: grid;
}

.ag-left {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-bottom-color: var(--accent-line);
  border-radius: 14px;
  min-height: 0;
  overflow-y: auto;
}

.ag-left-inner {
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  display: flex;
}

.ag-field {
  flex-direction: column;
  gap: 5px;
  display: flex;
}

.ag-label {
  color: var(--text-ter);
  font-size: 11.5px;
}

.ag-select {
  border: 1px solid var(--accent-line);
  background: var(--accent-soft-2);
  width: 100%;
  height: 32px;
  color: var(--text);
  cursor: pointer;
  border-radius: 9px;
  padding: 0 8px;
  font-family: inherit;
  font-size: 12.5px;
}

.ag-select:focus {
  outline: 2px solid var(--accent-dim);
}

.ag-left-acts {
  gap: 6px;
  display: flex;
}

.ag-info {
  background: var(--accent-soft-2);
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding: 10px;
  display: flex;
}

.ag-info-row {
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  display: flex;
}

.ag-info-row span {
  color: var(--text-ter);
}

.ag-info-row b {
  color: var(--text);
  text-align: right;
  word-break: break-all;
  font-weight: 600;
}

.ag-info-note {
  color: var(--yellow);
  font-size: 11px;
  line-height: 1.6;
}

.ag-mid {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-bottom-color: var(--accent-line);
  border-radius: 14px;
  flex-direction: column;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.ag-hist-wrap {
  flex: auto;
  min-height: 0;
  display: flex;
  position: relative;
}

.ag-history {
  scroll-behavior: smooth;
  flex-direction: column;
  flex: auto;
  gap: 12px;
  padding: 14px;
  display: flex;
  overflow-y: auto;
}

.ag-empty {
  text-align: center;
  max-width: 420px;
  color: var(--text-ter);
  margin: auto;
  font-size: 12.5px;
  line-height: 1.8;
}

.ag-msg {
  align-items: flex-start;
  gap: 9px;
  display: flex;
}

.ag-msg.user {
  flex-direction: row-reverse;
}

.ag-avatar {
  background: var(--accent-dim);
  width: 26px;
  height: 26px;
  color: var(--accent);
  border-radius: 8px;
  flex: none;
  justify-content: center;
  align-items: center;
  display: flex;
}

.ag-msg.user .ag-avatar {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.ag-bubble {
  background: var(--accent-soft-2);
  border: 1px solid var(--accent-line);
  max-width: min(720px, 80%);
  color: var(--text);
  word-break: break-word;
  white-space: pre-wrap;
  border-radius: 11px;
  padding: 9px 13px;
  font-size: 13px;
  line-height: 1.75;
}

.ag-msg.user .ag-bubble {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.ag-typing {
  color: var(--text-ter);
  align-items: center;
  gap: 6px;
  font-size: 12px;
  display: inline-flex;
}

.ag-input-box {
  border-top: 1px solid var(--accent-line);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--accent-soft-2) 100%);
  flex-direction: column;
  flex-shrink: 0;
  gap: 8px;
  padding: 10px 12px 9px;
  display: flex;
}

.ag-input {
  border: 1.5px solid var(--accent-line);
  resize: vertical;
  background: var(--card);
  width: 100%;
  min-height: 76px;
  max-height: 220px;
  color: var(--text);
  border-radius: 10px;
  outline: none;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.7;
  transition: border-color .15s, box-shadow .15s;
  box-shadow: inset 0 1px 2px #1018280d;
}

.ag-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.ag-input::placeholder {
  color: var(--text-ter);
}

.ag-input-foot {
  align-items: center;
  gap: 10px;
  padding: 0 2px;
  display: flex;
}

.ag-error {
  color: var(--red);
  align-items: center;
  gap: 5px;
  font-size: 12px;
  display: inline-flex;
}

.ag-model-bar {
  border: 1px solid var(--accent-line);
  background: var(--accent-soft-2);
  color: var(--text-sec);
  border-radius: 10px;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  font-size: 11.5px;
  display: flex;
}

.ag-mb-sel {
  width: 240px;
}

.ag-mb-lab {
  color: var(--text-ter);
  white-space: nowrap;
  align-items: center;
  gap: 4px;
  display: inline-flex;
}

.ag-temp {
  width: 110px;
  accent-color: var(--accent);
  cursor: pointer;
}

.ag-temp-val {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  min-width: 34px;
  font-weight: 700;
}

.ag-scope {
  color: var(--text-ter);
  white-space: nowrap;
  font-size: 10.5px;
}

.ag-ctx {
  color: var(--text-ter);
  white-space: nowrap;
}

.ag-lock {
  z-index: 20;
  border: 1px solid var(--accent-line);
  background: var(--card);
  color: var(--text-ter);
  cursor: pointer;
  opacity: .75;
  border-radius: 999px;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  font-family: inherit;
  font-size: 11px;
  display: flex;
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  box-shadow: 0 2px 8px #1018281f;
}

.ag-lock:hover {
  opacity: 1;
}

.ag-lock.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  opacity: 1;
}

.ag-nav {
  z-index: 20;
  flex-direction: column;
  gap: 4px;
  display: flex;
  position: absolute;
  bottom: 12px;
  right: 12px;
}

.ag-nav-btn {
  border: 1px solid var(--accent-line);
  background: var(--card);
  width: 28px;
  height: 28px;
  color: var(--text-sec);
  cursor: pointer;
  border-radius: 9px;
  justify-content: center;
  align-items: center;
  display: flex;
  box-shadow: 0 2px 8px #1018281f;
}

.ag-nav-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.ag-newmsg {
  z-index: 20;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--accent-glow);
  border: none;
  border-radius: 999px;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.ag-newmsg:hover {
  filter: brightness(1.06);
}

.ag-right {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-bottom-color: var(--accent-line);
  border-radius: 14px;
  flex-direction: column;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.ag-right-head {
  height: 40px;
  color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--accent-soft-2) 100%);
  border-bottom: 1px solid var(--accent-line);
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
}

.ag-count {
  color: var(--text-ter);
  font-size: 11px;
}

.ag-mem-list {
  flex: auto;
  padding: 6px;
  overflow-y: auto;
}

.ag-mem-group {
  color: var(--text-ter);
  padding: 7px 8px 4px;
  font-size: 10.5px;
}

.ag-mem-item {
  width: 100%;
  color: var(--text-sec);
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 8px;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 12px;
  display: flex;
}

.ag-mem-item:hover {
  background: var(--accent-dim);
  color: var(--text);
}

.ag-mem-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

.ag-mem-name {
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.ag-mem-time {
  color: var(--text-ter);
  flex: none;
  font-size: 10px;
}

.ag-mem-empty {
  text-align: center;
  color: var(--text-ter);
  padding: 20px;
  font-size: 12px;
}

.ag-mem-preview {
  border-top: 1px solid var(--accent-line);
  background: var(--accent-soft-2);
  flex-direction: column;
  flex: 0 0 46%;
  min-height: 0;
  display: flex;
}

.ag-mem-preview-head {
  color: var(--text-sec);
  border-bottom: 1px solid var(--accent-line);
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 11.5px;
  display: flex;
}

.ag-mem-preview-head span {
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  overflow: hidden;
}

.ag-close {
  color: var(--text-ter);
  cursor: pointer;
  background: none;
  border: none;
}

.ag-mem-body {
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  flex: auto;
  margin: 0;
  padding: 10px 12px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11.5px;
  line-height: 1.7;
  overflow: auto;
}

.ag-mem-foot {
  color: var(--text-ter);
  border-top: 1px solid var(--accent-line);
  flex-shrink: 0;
  padding: 5px 10px;
  font-size: 10.5px;
}

@media (max-width: 1200px) {
  .ag-wrap {
    grid-template-columns: 210px minmax(0, 1fr) 180px;
  }
}

.ss {
  width: 100%;
  position: relative;
}

.ss-trigger {
  border: 1px solid var(--accent-line);
  background: var(--accent-soft-2);
  width: 100%;
  height: 32px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  border-radius: 9px;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 10px;
  font-family: inherit;
  font-size: 12.5px;
  display: flex;
}

.ss-trigger.open {
  border-color: var(--accent);
}

.ss-value {
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.ss-arrow {
  color: var(--text-ter);
  flex: none;
}

.ss-menu {
  z-index: 70;
  background: var(--card);
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  padding: 4px;
  position: absolute;
  top: 36px;
  left: 0;
  right: 0;
  overflow: auto;
  box-shadow: 0 12px 28px #1018282e, 0 0 0 1px #10182808;
}

.ss-item {
  width: max-content;
  min-width: 100%;
  height: 28px;
  color: var(--text-sec);
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border: none;
  border-radius: 7px;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  font-family: inherit;
  font-size: 12.5px;
  display: flex;
}

.ss-item:hover {
  background: var(--accent-dim);
  color: var(--text);
}

.ss-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

.ss-text {
  flex: 1;
}

.ss-check {
  color: var(--accent);
  flex: none;
}

.ss-empty {
  text-align: center;
  color: var(--text-ter);
  padding: 10px;
  font-size: 12px;
}

.ag-mem-ov {
  border-bottom: 1px solid var(--accent-line);
  flex: none;
  max-height: 44%;
  padding: 8px;
  overflow-y: auto;
}

.ag-mem-stats {
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  display: grid;
}

.ag-stat {
  background: var(--accent-soft-2);
  border: 1px solid var(--accent-line);
  text-align: center;
  border-radius: 9px;
  padding: 6px 4px;
}

.ag-stat b {
  color: var(--accent);
  font-size: 14px;
  line-height: 1.3;
  display: block;
}

.ag-stat span {
  color: var(--text-ter);
  font-size: 10px;
}

.ag-mem-meta {
  color: var(--text-ter);
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  font-size: 11px;
  display: flex;
}

.ag-mem-meta b {
  color: var(--text-sec);
}

.ag-mem-recent {
  margin-top: 10px;
}

.ag-mini-title {
  color: var(--text-ter);
  margin-bottom: 4px;
  font-size: 10.5px;
}

.ag-recent-row {
  color: var(--text-sec);
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  font-size: 11.5px;
  display: flex;
}

.ag-recent-name {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.ag-recent-time {
  color: var(--text-ter);
  flex: none;
  font-size: 10.5px;
}

.ag-mem-toggle {
  border: none;
  border-top: 1px solid var(--accent-line);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--accent-soft-2) 100%);
  width: 100%;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
}

.ag-rot {
  margin-left: auto;
  transition: transform .2s;
}

.ag-rot.open {
  transform: rotate(180deg);
}

.ss-menu.up {
  top: auto;
  bottom: 36px;
}

.ag-core-size {
  color: var(--text-ter);
  font-size: 10.5px;
  font-weight: 400;
}

.ag-search {
  border: 1px solid var(--border-light);
  background: var(--card);
  width: 100%;
  height: 28px;
  color: var(--text);
  border-radius: 8px;
  margin-bottom: 5px;
  padding: 0 9px;
  font-family: inherit;
  font-size: 12px;
}

.ag-search::placeholder {
  color: var(--text-ter);
}

.ag-search:focus {
  border-color: var(--accent);
  outline: none;
}

.ag-search-wrap {
  position: relative;
}

.ag-search-wrap .ag-search {
  margin-bottom: 5px;
  padding-right: 26px;
}

.ag-search-ico {
  color: var(--text-ter);
  pointer-events: none;
  position: absolute;
  top: 14px;
  right: 8px;
  transform: translateY(-50%);
}

.ag-sess-list {
  border: 1px solid var(--border-light);
  background: var(--card);
  border-radius: 10px;
  flex-direction: column;
  gap: 2px;
  max-height: clamp(240px, 42vh, 520px);
  padding: 3px;
  display: flex;
  overflow-y: auto;
}

.ag-sess-empty {
  text-align: center;
  color: var(--text-ter);
  padding: 14px;
  font-size: 11.5px;
}

.ag-sess-item {
  text-align: left;
  width: 100%;
  color: var(--text);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 8px;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  font-family: inherit;
  display: flex;
}

.ag-sess-item:hover {
  background: var(--accent-dim);
}

.ag-sess-item.active {
  background: var(--accent-dim);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.ag-sess-name {
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
}

.ag-sess-meta {
  min-width: 0;
  color: var(--text-ter);
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  display: flex;
}

.ag-sess-model {
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}

.ag-sess-time, .ag-sess-dot {
  flex: none;
}

.ag-sess-src {
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 5px;
  flex: none;
  margin-left: auto;
  padding: 0 5px;
  font-size: 10px;
}

.ag-sess-foot {
  color: var(--text-ter);
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 3px 2px 0;
  font-size: 10.5px;
  display: flex;
}

.ag-sess-count {
  font-variant-numeric: tabular-nums;
}

.ag-sess-more {
  color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 6px;
  padding: 2px 5px;
  font-family: inherit;
  font-size: 10.5px;
}

.ag-sess-more:hover {
  background: var(--accent-dim);
}

.ag-mb-think {
  width: 150px;
}

.ag-atts {
  flex-wrap: wrap;
  gap: 6px;
  display: flex;
}

.ag-att {
  border: 1px solid var(--accent-line);
  background: var(--card);
  max-width: 100%;
  color: var(--text-sec);
  border-radius: 9px;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  font-size: 11.5px;
  display: inline-flex;
}

.ag-att-thumb {
  object-fit: cover;
  border: 1px solid var(--accent-line);
  border-radius: 6px;
  width: 26px;
  height: 26px;
}

.ag-att-ico {
  background: var(--accent-dim);
  width: 26px;
  height: 26px;
  color: var(--accent);
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  display: inline-flex;
}

.ag-att-name {
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
  color: var(--text);
  overflow: hidden;
}

.ag-att-size {
  color: var(--text-ter);
  flex: none;
}

.ag-att-x {
  width: 16px;
  height: 16px;
  color: var(--text-ter);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 5px;
  flex: none;
  justify-content: center;
  align-items: center;
  display: inline-flex;
}

.ag-att-x:hover {
  background: var(--accent-dim);
  color: var(--red, #e5484d);
}

.ag-bubble-atts {
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
  display: flex;
}

.ag-bubble-att {
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 20px;
  align-items: center;
  gap: 4px;
  max-width: 220px;
  padding: 2px 7px;
  font-size: 10.5px;
  display: inline-flex;
  overflow: hidden;
}

.ag-icon-btn {
  border: 1px solid var(--accent-line);
  background: var(--card);
  width: 28px;
  height: 28px;
  color: var(--text-sec);
  cursor: pointer;
  border-radius: 8px;
  flex: none;
  justify-content: center;
  align-items: center;
  transition: all .12s;
  display: inline-flex;
}

.ag-icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.ag-icon-btn:disabled {
  opacity: .5;
  cursor: default;
}

.ag-icon-btn.ag-mic.rec {
  background: var(--red, #e5484d);
  border-color: var(--red, #e5484d);
  color: #fff;
  animation: 1.1s ease-in-out infinite ag-rec-pulse;
}

@keyframes ag-rec-pulse {
  0%, 100% {
    box-shadow: 0 0 #e5484d80;
  }

  50% {
    box-shadow: 0 0 0 6px #e5484d00;
  }
}

.ag-rec-hint {
  color: var(--red, #e5484d);
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
}

/*# sourceMappingURL=src_app_globals_162hn9o.css.map*/