:root {
  --ink: #1c1913;
  --ink-soft: #3a342c;
  --paper: #efeae2;
  --paper-2: #e6dfd2;
  --card: #fffdf8;
  --cinnabar: #b54436;
  --cinnabar-deep: #8d2f24;
  --gold: #b08958;
  --gold-soft: #e4d2b0;
  --line: rgba(28, 25, 19, 0.08);
  --sidebar: #efeae2;
  --muted: #8a8074;
  --ok: #3d6b4f;
  --shadow: 0 10px 28px rgba(28, 25, 19, 0.05);
  --serif: "Noto Serif SC", "Songti SC", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}
body.login-body {
  overflow: auto;
}
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font-family: inherit; }
code { font-family: ui-monospace, Consolas, monospace; }

.shell {
  display: grid;
  grid-template-columns: 228px 1fr;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--paper);
}

.sidebar {
  background: transparent;
  color: var(--ink);
  padding: 20px 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 0;
  min-height: 0;
  height: 100%;
  overflow: auto;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 4px 8px 2px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--cinnabar);
  color: #fff8ee;
  font-family: var(--serif);
  font-size: 20px;
  border-radius: 12px;
}
.brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.1em;
  color: var(--ink);
}
.brand small {
  color: var(--muted);
  letter-spacing: 0.1em;
  font-size: 11px;
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav-disabled {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--ink-soft);
}
.nav a:hover { background: rgba(28, 25, 19, 0.05); color: var(--ink); }
.nav a.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(28, 25, 19, 0.05);
}
.nav-disabled { opacity: 0.45; cursor: not-allowed; }
.nav-disabled em {
  margin-left: auto;
  font-style: normal;
  font-size: 11px;
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 99px;
}
.nav-ico {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  font-family: var(--serif);
  color: var(--muted);
}
.nav a.active .nav-ico, .nav a:hover .nav-ico { color: var(--cinnabar); }
.sidebar-meta { margin-top: auto; display: grid; gap: 0; padding: 0 8px; }
.pill {
  display: flex;
  justify-content: space-between;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 7px 2px;
  border-radius: 0;
  color: var(--muted);
  font-size: 12px;
}
.pill:last-child { border-bottom: 0; }
.pill b { color: var(--ink-soft); font-weight: 600; }
.pill.warn { color: var(--cinnabar); }

.workspace {
  min-width: 0;
  min-height: 0;
  height: calc(100dvh - 20px);
  max-height: calc(100dvh - 20px);
  align-self: start;
  margin: 10px 10px 10px 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  background: #fffdf9;
  border-radius: 22px;
  box-shadow: 0 0 0 1px rgba(28, 25, 19, 0.05);
}
body[data-page="chat"] .workspace,
body[data-page="workflow-edit"] .workspace {
  overflow: hidden;
}
body[data-page="memos"] .workspace {
  margin: 0;
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}
.setup-banner {
  margin: 16px 24px 0;
  padding: 12px 16px;
  background: #fff4d8;
  border: 1px solid #e4c57a;
  border-radius: 12px;
  color: #6b4e12;
  font-size: 14px;
}

.page-head, .article-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  padding: 28px 32px 8px;
}
.eyebrow {
  margin: 0 0 6px;
  color: var(--cinnabar);
  letter-spacing: 0.28em;
  font-size: 12px;
}
h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 700;
}
.lede { color: var(--muted); margin: 8px 0 0; }
.head-actions { display: flex; gap: 8px; }

.btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
}
.btn.primary { background: var(--cinnabar); color: #fff8ee; }
.btn.primary:hover { background: var(--cinnabar-deep); }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.btn.ghost:hover { background: var(--paper-2); }
.sidebar-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 8px 4px;
  border-top: 1px solid var(--line);
}
.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 4px;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  color: inherit;
}
.sidebar-profile:hover { background: rgba(28, 25, 19, 0.05); }
.sidebar-profile span:last-child { min-width: 0; }
.sidebar-user b { display: block; font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--cinnabar);
  color: #fff8ee;
  font-family: var(--serif);
  font-size: 15px;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-card { width: min(420px, 100%); }
.profile-avatar-field {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.profile-avatar-field .avatar { width: 56px; height: 56px; font-size: 22px; }
.profile-avatar-field span:last-child { font-size: 13px; color: var(--cinnabar); cursor: pointer; }
.wf-modal-card input,
.wf-modal-card textarea,
.wf-modal-card input[type="file"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}
.wf-modal-card input[readonly] { background: #f7f1e6; color: var(--muted); }
.sidebar-logout {
  flex: none;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--ink-soft) !important;
  border-color: var(--line);
}
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: auto;
  background: var(--paper);
}
.login-card {
  width: min(420px, calc(100% - 32px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 32px 28px;
  display: grid;
  gap: 14px;
}
.login-card h1 {
  font-size: 28px;
}
.login-card label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.login-card input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--ink);
}
.login-error {
  margin: 0;
  color: var(--cinnabar);
  font-size: 14px;
}
.admin-page {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  padding: 0 24px 24px;
  gap: 12px;
}
.admin-page .page-head {
  padding: 20px 0 0;
  align-items: center;
}
.admin-page h1 { font-size: 28px; }
.admin-page .lede { margin-top: 4px; font-size: 13px; }
.admin-page .toolbar {
  padding: 0;
  align-items: center;
}
.admin-page .search {
  flex: 0 1 320px;
  padding: 10px 12px;
  border-radius: 12px;
}
.admin-form {
  margin: 0;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  max-width: 680px;
  box-shadow: var(--shadow);
  flex: 0 0 auto;
}
.admin-form[hidden] { display: none !important; }
.admin-form label[hidden] { display: none !important; }
.admin-form .span-2 { grid-column: 1 / -1; }
.admin-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.admin-form input:not([type="checkbox"]):not([type="hidden"]),
.admin-form select,
.admin-form textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  background-color: #fff;
  width: 100%;
}
.admin-form select {
  appearance: auto;
  min-height: 40px;
  line-height: 1.4;
}
.admin-form select option {
  color: var(--ink);
  background-color: #fff;
}
.admin-form textarea { resize: vertical; min-height: 72px; font-family: inherit; }
.admin-form input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: none;
}
.admin-form .check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}
.admin-form .form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-form .form-actions .check {
  margin-right: auto;
}
.perm-set {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.perm-set legend { padding: 0 6px; color: var(--muted); font-size: 12px; }
.admin-page .data-list {
  margin: 0;
  flex: 1;
  min-height: 180px;
  overflow: auto;
}
.data-row.admin-row {
  grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.8fr) 88px 148px;
  align-items: center;
  padding: 12px 16px;
}
.data-row.admin-row h3 { font-size: 16px; margin: 0; }
.admin-row .perm-tags { -webkit-line-clamp: unset; display: flex; }
.perm-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.perm-tag {
  font-size: 12px;
  background: #fbf6ea;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  padding: 2px 8px;
  color: #7a5a28;
  white-space: nowrap;
}
.badge {
  display: inline-flex;
  width: fit-content;
  font-size: 12px;
  border-radius: 999px;
  padding: 2px 8px;
}
.badge-on { background: #e8f3ea; color: var(--ok); }
.badge-off { background: #f3eee4; color: var(--muted); }
.badge-sys { background: #fbf6ea; color: #7a5a28; }
.admin-page .empty-note { margin: 40px 20px; }
.settings-form {
  max-width: 720px;
}
.admin-form .field-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.admin-form input[readonly] {
  background: #f7f1e6;
  color: var(--ink-soft);
}
.admin-page .page-head .badge {
  align-self: center;
}

.wf-page {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0 16px 12px;
  gap: 10px;
}
.wf-top {
  flex: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(28, 25, 19, 0.05);
  overflow: hidden;
}
.wf-page .page-head {
  padding: 10px 16px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(28, 25, 19, 0.06);
}
.wf-head-copy { min-width: 0; flex: 1; }
.wf-title-field {
  display: block;
  width: 100%;
  max-width: 28em;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.wf-title-field::placeholder { color: var(--muted); font-weight: 600; }
.wf-title-field:focus {
  outline: none;
  box-shadow: 0 1px 0 var(--gold);
}
.wf-page h1 { font-size: 22px; letter-spacing: 0.04em; }
.wf-page .lede {
  display: block;
  margin: 4px 0 0;
  max-width: none;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.wf-meta-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) 150px 150px auto;
  gap: 8px 12px;
  align-items: end;
  padding: 10px 16px 12px;
  background: linear-gradient(180deg, #fffdf8 0%, #fbf6ea 100%);
}
.wf-desc-field { min-width: 0; }
.wf-schedule-bar {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(140px, auto));
  gap: 8px 12px;
  align-items: end;
  padding: 0 16px 12px;
  background: #fbf6ea;
}
.wf-schedule-bar.is-open { display: grid; }
.wf-schedule-bar label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.wf-schedule-bar input, .wf-schedule-bar select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 11px;
  color: var(--ink);
  background: #fff;
  width: 100%;
}
.wf-schedule-bar input:focus, .wf-schedule-bar select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 137, 88, 0.15);
}
.wf-schedule-input { grid-column: 1 / -1; }
.wf-weekdays {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 6px;
}
.wf-weekdays > span { letter-spacing: 0.04em; }
.wf-weekdays label {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0;
}
.wf-weekdays input { width: auto !important; margin: 0; }
.wf-schedule-bar .wf-weekdays,
.wf-schedule-bar .wf-schedule-next { grid-column: 1 / -1; }
.wf-schedule-bar .is-hide { display: none !important; }
.wf-schedule-next {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.wf-meta-bar label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.wf-meta-bar input, .wf-meta-bar select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 11px;
  color: var(--ink);
  background: #fff;
  width: 100%;
}
.wf-meta-bar input:focus, .wf-meta-bar select:focus,
.wf-plugin-box input:focus, .wf-plugin-box textarea:focus,
.wf-node-form input:focus, .wf-node-form select:focus, .wf-node-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 137, 88, 0.15);
}
.wf-switch {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  min-height: 37px;
  padding-bottom: 0;
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}
.wf-switch input { display: none; }
.wf-switch i {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #ddd4c4;
  position: relative;
  transition: 0.2s;
}
.wf-switch i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(28,25,19,0.15);
  transition: 0.2s;
}
.wf-switch input:checked + i { background: var(--cinnabar); }
.wf-switch input:checked + i::after { left: 18px; }
.wf-board {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, 1.2fr) minmax(320px, 0.8fr);
  gap: 12px;
}
.wf-main, .wf-side {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.wf-main {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(251,246,234,0.55));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(28, 25, 19, 0.04);
}
.wf-side {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(28, 25, 19, 0.05);
}
.wf-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 10px;
  background: #fbf6ea;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.wf-tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 4px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 10px;
}
.wf-tabs button.is-on {
  color: var(--cinnabar);
  background: #fff;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(28, 25, 19, 0.06);
}
.wf-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 16px 16px 28px;
}
.wf-panel[hidden] { display: none !important; }
.wf-page .settings-form, .wf-node-form { max-width: none; }
.wf-node-form {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 16px 16px 32px;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  gap: 10px;
  align-content: start;
}
#node-empty[hidden],
#node-fields[hidden],
.wf-idle[hidden] {
  display: none !important;
}
.wf-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.wf-add {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-bottom: 1px dashed var(--gold-soft);
}
.wf-add-gap {
  width: 1px;
  height: 18px;
  margin: 0 4px;
  background: var(--gold-soft);
  flex: none;
}
.wf-add strong {
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.12em;
  font-weight: 600;
}
.wf-chip {
  border: 1px solid var(--gold-soft);
  background: #fff;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
}
.wf-chip:hover { border-color: var(--cinnabar); color: var(--cinnabar); }
.wf-timeline {
  list-style: none;
  margin: 0;
  padding: 18px 18px 22px 28px;
  border-left: 0;
  flex: 1;
  overflow: auto;
  background-image: linear-gradient(90deg, transparent 27px, var(--gold-soft) 27px, var(--gold-soft) 29px, transparent 29px);
}
.wf-timeline:has(.wf-empty-card) {
  background-image: none;
  display: grid;
  place-items: center;
  padding: 24px 18px;
}
.wf-empty-card {
  margin-left: 0;
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 6px;
  color: var(--muted);
}
.wf-empty-card h3 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
}
.wf-empty-card p { margin: 0 0 10px; font-size: 13px; max-width: 280px; }
.wf-empty-actions { display: flex; gap: 8px; }
.wf-idle, .wf-intro {
  display: grid;
  justify-items: start;
  gap: 6px;
  padding: 8px 2px 12px;
}
.wf-idle[hidden] { display: none !important; }
.wf-intro {
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 0 8px;
}
.wf-intro b, .wf-idle b { color: var(--ink); font-size: 15px; }
.wf-intro p, .wf-idle p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.wf-node-form .wf-idle {
  place-items: start;
  text-align: left;
  padding: 4px 0 8px;
}
.wf-guide {
  width: 100%;
  margin-top: 10px;
  text-align: left;
}
.wf-guide h3 {
  margin: 10px 0 4px;
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
}
.wf-guide ul {
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.wf-guide li + li { margin-top: 2px; }
.wf-callout {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fbf6ea;
  border: 1px solid var(--gold-soft);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}
.wf-guide-box {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fffdf8;
}
.wf-guide-box summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
  list-style: none;
}
.wf-guide-box summary::-webkit-details-marker { display: none; }
.wf-guide-box summary::after {
  content: "展开";
  float: right;
  font-weight: 500;
  color: var(--muted);
  font-size: 12px;
}
.wf-guide-box[open] summary::after { content: "收起"; }
.wf-guide-box ul {
  margin: 8px 0 0;
  padding-left: 1.2em;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
#owner-help {
  grid-column: 1 / -1;
}
.wf-idle {
  place-items: center;
  text-align: center;
  padding: 36px 12px;
}
.wf-idle-mark, .wf-seal {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--cinnabar);
  color: #fff8ee;
  font-family: var(--serif);
  font-size: 18px;
}
.wf-seal {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 22px;
  box-shadow: 0 8px 20px rgba(181, 68, 54, 0.25);
}
.wf-node {
  position: relative;
  margin: 0 0 10px 22px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(28, 25, 19, 0.04);
  transition: border-color 0.15s, transform 0.15s;
}
.wf-node:hover { border-color: var(--gold-soft); }
.wf-node::before {
  content: "";
  position: absolute;
  left: -26px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--cinnabar);
}
.wf-node.is-on {
  border-color: var(--cinnabar);
  background: linear-gradient(180deg, #fff 0%, #fff8f4 100%);
}
.wf-node.is-on::before { background: var(--cinnabar); }
.wf-idx {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fbf6ea;
  color: var(--cinnabar);
  font-size: 12px;
  font-weight: 700;
}
.wf-node b { display: block; font-size: 14px; }
.wf-node small { color: var(--muted); }
.wf-when {
  display: inline-block;
  margin-left: 6px;
  font-style: normal;
  font-size: 11px;
  border-radius: 999px;
  padding: 1px 7px;
  background: #f8ece9;
  color: var(--cinnabar);
  border: 1px solid #efd4ce;
}
.wf-node-wait {
  display: grid;
  gap: 8px;
  padding: 8px 0 2px;
  border-top: 1px dashed var(--gold-soft);
}
.wf-node-wait .is-hide { display: none !important; }
.wf-node-wait .field-hint { margin: 0; }
.wf-kind {
  display: inline-block;
  margin-right: 6px;
  font-style: normal;
  font-size: 11px;
  border-radius: 999px;
  padding: 1px 7px;
  background: #fbf6ea;
  color: #7a5a28;
  border: 1px solid var(--gold-soft);
}
.wf-kind-condition { background: #f4eee6; }
.wf-kind-feedback { background: #e8f3ea; color: var(--ok); border-color: #cfe0d4; }
.wf-owner {
  display: inline-block;
  margin-right: 6px;
  font-style: normal;
  font-size: 11px;
  border-radius: 999px;
  padding: 1px 7px;
  background: #eef3f8;
  color: #3a5a78;
  border: 1px solid #d5e2ee;
}
.wf-owner-python { background: #eef6ea; color: #2f6b3a; border-color: #cfe0d4; }
.wf-owner-both { background: #f8f0e8; color: #7a5a28; border-color: var(--gold-soft); }
.wf-layer-trigger { background: #eef3f8; color: #3a5a78; }
.wf-layer-validate, .wf-layer-compute, .wf-layer-output { background: #eef6ea; color: #2f6b3a; }
.wf-layer-decide { background: #f4eee6; color: #7a5a28; }
.wf-layer-safety { background: #f8ece9; color: var(--cinnabar); border-color: #efd4ce; }
.wf-layer-map { display: grid; gap: 8px; margin: 8px 0 12px; }
.wf-layer-card {
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}
.wf-layer-card em { display: block; font-size: 11px; color: var(--muted); font-style: normal; }
.wf-layer-card b { display: block; margin: 2px 0 4px; font-size: 14px; color: var(--ink); }
.wf-layer-card p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.wf-layer-card:hover { border-color: var(--cinnabar); }
.wf-map-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 0 0 12px;
}
.wf-map-table th, .wf-map-table td {
  border-bottom: 1px solid var(--line);
  padding: 6px 4px;
  text-align: left;
}
.wf-map-flow {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.wf-cap-group {
  display: grid;
  gap: 8px;
}
.wf-cap-group > header {
  display: grid;
  gap: 2px;
  padding: 2px 2px 0;
}
.wf-cap-group > header b {
  font-size: 13px;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.wf-cap-group > header p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.wf-cap-group > small {
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  font-size: 11px;
  padding: 0 0 6px;
  border-bottom: 1px solid var(--line);
}
.wf-cap-grid {
  display: grid;
  gap: 8px;
}
.wf-deploy-tune {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.wf-check {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}
.wf-check input { width: auto; margin: 0; }
.wf-template-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 10px;
  align-items: end;
  padding: 10px 12px;
  border: 1px solid var(--cinnabar);
  border-radius: 12px;
  background: #fff8f4;
}
.wf-template-row[hidden] { display: none !important; }
.wf-template-row > label { min-width: 0; }
.wf-template-row .field-hint { grid-column: 1 / -1; margin: 0; }
.wf-cap-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 4px 0 8px;
}
.wf-cap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}
.wf-cap span { display: grid; gap: 2px; min-width: 0; }
.wf-cap:has(input:checked) {
  background: #fff8f4;
  border-color: var(--cinnabar);
  box-shadow: 0 0 0 3px rgba(181, 68, 54, 0.08);
}
.wf-cap.is-off { opacity: 0.45; cursor: default; }
.wf-cap-title { color: var(--ink); font-weight: 650; }
.wf-cap small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
}
.wf-cap-badge {
  font-style: normal;
  font-size: 11px;
  line-height: 1.2;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  align-self: start;
}
.wf-cap-badge.is-on { background: #e8f3ea; color: #2f6b3a; }
.wf-cap-badge.is-off { background: #f3efe8; color: var(--muted); }
.wf-cap-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.wf-cap-note {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff4e8;
  color: #8a4b12;
  font-size: 12px;
  line-height: 1.5;
}
.wf-node-ops { display: flex; gap: 8px; align-items: center; }
.wf-node-ops button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  font-size: 12px;
}
.wf-node-ops button:hover { color: var(--cinnabar); }
.wf-time-btn {
  border: 1px solid var(--cinnabar) !important;
  background: #fff8f4 !important;
  color: var(--cinnabar) !important;
  border-radius: 999px !important;
  padding: 2px 10px !important;
  font-size: 12px !important;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.wf-time-btn:hover { background: var(--cinnabar) !important; color: #fff8ee !important; }
.wf-time-btn.is-set {
  background: var(--cinnabar) !important;
  color: #fff8ee !important;
}
.wf-time-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--cinnabar);
  background: #fff8f4;
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
}
.wf-time-open em {
  font-style: normal;
  font-weight: 700;
  color: var(--cinnabar);
  letter-spacing: 0.08em;
}
.wf-time-open span { color: var(--muted); font-size: 12px; }
.wf-time-open:hover { box-shadow: 0 0 0 3px rgba(181, 68, 54, 0.12); }
.wf-time-pop {
  position: fixed;
  z-index: 40;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px 16px;
  box-shadow: 0 18px 40px rgba(28, 25, 19, 0.16);
}
.wf-time-pop[hidden] { display: none !important; }
.wf-time-pop header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.wf-time-pop strong { display: block; font-size: 14px; }
.wf-time-pop header p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.wf-time-close {
  border: 0;
  background: #fbf6ea;
  color: var(--cinnabar);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 12px;
}
.wf-time-pop .wf-node-wait {
  border-top: 0;
  padding-top: 0;
}
.wf-time-pop label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.wf-time-pop input, .wf-time-pop select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 11px;
  color: var(--ink);
  background: #fff;
  width: 100%;
}
.wf-plugin-box .form-actions,
.wf-modal-card .form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.wf-plugin-box {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  box-shadow: none;
  align-content: start;
}
.wf-plugin-box label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.wf-plugin-box input:not([type="checkbox"]),
.wf-plugin-box textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  font-family: inherit;
}
.wf-plugin-box textarea.wf-code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  background: #1c1913;
  color: #f6efe3;
  min-height: 150px;
  line-height: 1.55;
  border-color: #2a241c;
}
.wf-cap input { width: auto; margin: 0; }
.wf-plugin-list { display: grid; gap: 8px; }
.wf-plugin-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.wf-plugin-item b { display: block; font-size: 14px; color: var(--ink); }
.wf-plugin-item small { color: var(--muted); }
.wf-plugin-item button {
  border: 0;
  background: transparent;
  color: var(--cinnabar);
  cursor: pointer;
  font-size: 12px;
}
.wf-modal {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 19, 0.35);
  display: grid;
  place-items: center;
  z-index: 40;
  padding: 24px;
}
.wf-modal[hidden] { display: none !important; }
.wf-modal-card {
  position: relative;
  width: min(520px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow);
}
.modal-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.modal-x:hover { background: #f3eee4; }
.modal-x:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.wf-modal-card .form-actions[hidden],
.import-progress[hidden] { display: none !important; }
.wf-modal-card h3 { margin: 0; padding-right: 36px; font-family: var(--serif); }
.wf-modal-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.wf-modal-card small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.wf-modal-card .attach-list { min-height: 0; }
.wf-preview-card {
  width: min(960px, 100%);
  max-height: 88vh;
  overflow: auto;
  align-content: start;
}
.wf-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.wf-preview-head .lede { margin: 4px 0 0; }
.wf-preview-head .head-actions { padding: 0; flex-shrink: 0; }
.wf-preview-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.15fr) minmax(240px, 0.9fr);
  gap: 16px;
  min-height: 0;
}
.wf-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 8px 4px 16px;
}
.wf-flow-start,
.wf-flow-end {
  min-width: 168px;
  text-align: center;
  border: 1px solid var(--gold-soft);
  background: #fbf6ea;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
}
.wf-flow-end { color: var(--muted); }
.wf-flow-line {
  width: 2px;
  height: 16px;
  background: #d9c9a6;
}
.wf-flow-card {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 10px 14px 12px;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 2px 10px;
  cursor: pointer;
  text-align: left;
}
.wf-flow-card:hover,
.wf-flow-card.is-on { border-color: var(--cinnabar); }
.wf-flow-card.is-if { border-radius: 4px 16px; }
.wf-flow-card .wf-idx {
  grid-row: span 3;
  align-self: center;
}
.wf-flow-card small {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.wf-flow-card b {
  grid-column: 2;
  font-family: var(--serif);
  font-size: 16px;
}
.wf-flow-card p {
  grid-column: 2;
  margin: 0;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.wf-flow-branch {
  width: min(420px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 2px;
}
.wf-flow-branch span {
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 12px;
  text-align: center;
}
.wf-flow-yes { background: #eef6ea; color: #2f6b3a; }
.wf-flow-no { background: #f8eeee; color: #8d2f24; }
.wf-review {
  background: #fbf6ea;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.wf-review-score {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.wf-review-score b {
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1;
  color: var(--cinnabar);
}
.wf-review-score span { color: var(--ink-soft); font-size: 14px; }
.wf-review-list,
.wf-review-tips {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
}
.wf-review-list li[data-level="error"] { color: var(--cinnabar-deep); }
.wf-review-list li[data-level="warn"] { color: #7a5a28; }
.wf-review h4 { margin: 6px 0 0; font-size: 13px; }
.wf-node-form .field-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.wf-log {
  margin: 0;
  max-height: 240px;
  overflow: auto;
  background: #1c1913;
  color: #f3eee4;
  border-radius: 12px;
  padding: 12px;
  font-size: 12px;
  white-space: pre-wrap;
}
.data-row.tpl-row {
  grid-template-columns: minmax(180px, 1.4fr) 72px 88px 140px 200px;
}
.tpl-fill-card { max-width: 640px; }
.tpl-preview {
  margin: 0;
  max-height: 140px;
  overflow: auto;
  background: #fbf6ea;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--ink-soft);
  white-space: pre-wrap;
}
.artifact-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.artifact-save {
  font-size: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
}
.artifact-save:hover { border-color: var(--cinnabar); color: var(--cinnabar); }

.chat-layout, .editor-layout, .article {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.library-layout {
  flex: 1 0 auto;
  min-height: auto;
  display: flex;
  flex-direction: column;
  overflow: visible;
}
.library-layout .data-list {
  flex: 0 0 auto;
}
.library-page .library-head {
  padding: 20px 32px 4px;
  align-items: center;
}
.library-page .library-head h1 { font-size: 28px; }
.library-page .library-head .lede {
  margin-top: 4px;
  font-size: 13px;
  max-width: 42em;
}
.library-tools {
  display: grid;
  gap: 10px;
  padding: 12px 32px 0;
}
.library-page .library-search {
  padding: 0;
  gap: 10px;
}
.library-page .library-search .search {
  min-width: 0;
  padding: 10px 14px;
}
.library-cats {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.library-page .cat-chips {
  flex: 1;
  min-width: 0;
  padding: 0;
}
.library-cats #manage-cat-btn { flex-shrink: 0; margin-top: 1px; }
.library-drop {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  text-align: left;
}
.library-drop-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.library-drop-copy b {
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
}
.library-drop-copy span {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.library-drop-actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}
.library-page .data-list { margin-top: 12px; }
.upload-btn { display: inline-flex; align-items: center; }
.import-progress { display: grid; gap: 8px; }
.import-progress p {
  margin: 0;
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
}
.import-bar {
  height: 10px;
  border-radius: 999px;
  background: #efe6d4;
  overflow: hidden;
}
.import-bar i {
  display: block;
  height: 100%;
  width: 0;
  min-width: 0;
  background: var(--cinnabar);
  border-radius: 999px;
  transition: width 0.16s linear;
}
.chat-layout { overflow: hidden; }
.editor-layout,
.article,
.workshop {
  overflow: auto;
}
.workshop {
  flex: 1;
  min-height: 0;
  padding-bottom: 48px;
}
.chat-layout .page-head {
  padding: 22px 28px 14px;
  border-bottom: 1px solid var(--line);
}
.chat-board {
  flex: 1;
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 0;
  padding: 8px 8px 16px 12px;
  gap: 0;
}
.session-rail {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 12px 8px 8px;
  overflow: auto;
}
.rail-label {
  margin: 0 8px 10px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.session-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  padding: 10px 10px;
  border-radius: 10px;
  cursor: pointer;
}
.session-item.active, .session-item:hover { background: rgba(28, 25, 19, 0.05); }
.session-item small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }

.chat-main {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}
.chat-stream {
  position: relative;
  flex: 1;
  min-height: 0;
}
.messages {
  height: 100%;
  overflow: auto;
  padding: 24px 56px 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
  scrollbar-width: none;
}
.messages::-webkit-scrollbar { width: 0; height: 0; }
.chat-jump {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(28, 25, 19, 0.12);
  overflow: hidden;
  z-index: 6;
}
.chat-jump[hidden] { display: none !important; }
.chat-jump button {
  width: 36px;
  height: 36px;
  border: 0;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.chat-jump button + button { border-top: 1px solid var(--line); }
.chat-jump button:hover:not(:disabled) { background: #f6f4ef; }
.chat-jump button:disabled { color: #c9c2b6; cursor: default; }
.chat-jump svg { width: 16px; height: 16px; }
.empty-hero {
  margin: auto;
  text-align: center;
  max-width: 520px;
  color: var(--ink-soft);
}
.seal {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border: 2px solid var(--cinnabar);
  color: var(--cinnabar);
  font-family: var(--serif);
  font-size: 28px;
  border-radius: 50%;
}
.hint-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  color: var(--ink-soft);
  display: inline-block;
}
a.chip { text-decoration: none; }

.stepper {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0 32px 8px;
  padding: 0;
}
.stepper li {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.stepper li.on {
  background: var(--ink);
  color: #f6efe3;
  border-color: var(--ink);
}
.sandbox-guide {
  margin: 14px 32px 0;
  background: #fbf6ea;
  border: 1px solid var(--gold-soft);
  border-radius: 16px;
  padding: 16px 18px;
}
.admin-page .sandbox-guide { margin: 0; }
.sandbox-guide h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 18px;
}
.sandbox-guide > p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.sandbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
}
.sandbox-guide h3 {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--cinnabar);
}
.sandbox-guide .sandbox-grid p {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.sandbox-guide code {
  font-size: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 5px;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .sandbox-grid { grid-template-columns: 1fr; }
  .sandbox-guide { margin-left: 16px; margin-right: 16px; }
}
.workshop-card {
  margin: 16px 32px 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.workshop-card h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 20px;
}
.workshop-card .hint { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.workshop-card .dropzone { margin: 0 0 12px; }
.workshop-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  resize: vertical;
  min-height: 140px;
  background: #fff;
  line-height: 1.7;
}
.material-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.material-list li {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
}
.material-list small { color: var(--muted); margin-left: auto; }
.material-list button {
  border: 0;
  background: transparent;
  color: var(--cinnabar);
  cursor: pointer;
}
.kb-pick { margin-top: 14px; }
.kb-pick #kb-list {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.kb-pick label { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.result-wrap { margin-top: 16px; }
@media (max-width: 960px) {
  .stepper, .workshop-card { margin-left: 16px; margin-right: 16px; }
}

.msg { max-width: 100%; }
.msg.user {
  align-self: flex-end;
  max-width: 78%;
}
.msg.user .bubble {
  background: #f1efe9;
  color: var(--ink);
  border-radius: 18px;
  padding: 10px 16px;
  line-height: 1.65;
  font-size: 15px;
}
.msg.assistant {
  align-self: stretch;
  max-width: 100%;
}
.bubble-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.bubble-card.is-pending {
  min-width: 148px;
  width: fit-content;
  padding: 12px 16px;
  background: #f4f1ea;
  border-radius: 16px;
}
.typing {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}
.typing[hidden] { display: none !important; }
.typing em {
  font-style: normal;
  letter-spacing: 0.04em;
}
.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 14px;
}
.typing-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cinnabar);
  opacity: 0.28;
  animation: typing-bounce 1.05s ease-in-out infinite;
}
.typing-dots i:nth-child(2) { animation-delay: 0.16s; }
.typing-dots i:nth-child(3) { animation-delay: 0.32s; }
@keyframes typing-bounce {
  0%, 70%, 100% { transform: translateY(0) scale(0.85); opacity: 0.28; }
  35% { transform: translateY(-5px) scale(1); opacity: 1; }
}
.think {
  background: transparent;
  border: 0;
  border-left: 2px solid #d9d2c6;
  padding: 2px 0 2px 12px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.think summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.think summary:hover { color: var(--ink-soft); }
.msg.assistant .prose {
  max-width: none;
  margin: 0;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ink);
}
.msg.assistant .prose > *:first-child { margin-top: 0; }
.msg.assistant .prose h1,
.msg.assistant .prose h2,
.msg.assistant .prose h3 {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.4;
  margin: 1.25em 0 0.45em;
}
.msg.assistant .prose h1 { font-size: 1.28em; }
.msg.assistant .prose h2 { font-size: 1.16em; }
.msg.assistant .prose h3 { font-size: 1.05em; }
.msg.assistant .prose p { margin: 0.7em 0; }
.msg.assistant .prose ul,
.msg.assistant .prose ol { margin: 0.55em 0 0.7em; padding-left: 1.35em; }
.msg.assistant .prose li { margin: 0.28em 0; }
.msg.assistant .prose pre {
  background: #f6f4ef;
  color: var(--ink);
  border-radius: 10px;
  padding: 14px 16px;
}
.msg.assistant .prose code {
  background: #f2efe8;
  color: var(--ink);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}
.msg.assistant .prose pre code { background: transparent; padding: 0; }
.msg.assistant .prose blockquote {
  margin: 0.8em 0;
  padding: 2px 0 2px 14px;
  border-left: 3px solid #d5d0c6;
  color: var(--ink-soft);
  background: transparent;
}
.sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.source.is-web::before {
  content: "网 · ";
}
.ingest-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.ingest-actions[hidden] { display: none; }
.kb-offer {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #ead9b8;
  background: #fff8ec;
  border-radius: 12px;
}
.kb-offer[hidden] { display: none; }
.kb-offer-text {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.kb-offer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.kb-offer-links:empty { display: none; }
.kb-offer-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kb-offer-actions[hidden] { display: none; }
.kb-offer-card textarea {
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
}
.export-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.export-actions[hidden] { display: none; }
.export-label { font-size: 12px; color: var(--muted); }
.export-actions button {
  font-size: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 3px 10px;
  cursor: pointer;
}
.export-actions button:hover { border-color: var(--cinnabar); color: var(--cinnabar); }
.source {
  font-size: 12px;
  border: 1px solid var(--gold-soft);
  background: #fbf6ea;
  color: #7a5a28;
  padding: 3px 8px;
  border-radius: 999px;
}
.composer {
  display: grid;
  gap: 8px;
  margin: 0 20px 18px;
  width: auto;
  padding: 12px 14px 10px;
  border: 1px solid rgba(28, 25, 19, 0.08);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(28, 25, 19, 0.05);
}
.composer-pins {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.composer-pin {
  border: 1px solid rgba(28, 25, 19, 0.12);
  background: #f7f3ea;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  cursor: pointer;
}
.composer-pin:hover {
  border-color: var(--cinnabar);
  color: var(--cinnabar);
}
.agent-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: calc(100vh - 48px);
}
.agent-board {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 14px;
}
.agent-rail {
  background: linear-gradient(180deg, rgba(255,255,255,0.9), #fbf6ea);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 10px 28px rgba(28, 25, 19, 0.04);
}
.agent-rail-label {
  margin: 0 8px 4px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.agent-node {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--ink);
}
.agent-node i {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  background: #efe8da;
  color: var(--ink-soft);
}
.agent-node span { display: grid; gap: 2px; min-width: 0; }
.agent-node b { font-size: 14px; font-weight: 650; }
.agent-node small { color: var(--muted); font-size: 12px; }
.agent-node:hover { background: rgba(255,255,255,0.7); border-color: var(--gold-soft); }
.agent-node.is-on {
  background: #fff;
  border-color: rgba(196, 92, 38, 0.28);
  box-shadow: 0 6px 16px rgba(28, 25, 19, 0.05);
}
.agent-node.is-on i {
  background: var(--cinnabar);
  color: #fff;
}
.agent-panels {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(28, 25, 19, 0.05);
  overflow: auto;
}
.agent-node-form {
  margin: 0;
  padding: 0;
  max-width: none;
  display: block;
}
.agent-panel {
  padding: 22px 24px 20px;
  display: grid;
  gap: 14px;
}
.agent-panel[hidden] { display: none !important; }
.agent-panel-head h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
}
.agent-panel-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}
.agent-panel label:not(.agent-tool-item):not(.check-row) {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.agent-panel input:not([type="checkbox"]),
.agent-panel textarea,
.agent-panel select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.agent-panel textarea { resize: vertical; min-height: 120px; }
.agent-panel .field-hint {
  margin: -4px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.agent-panel .check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}
.agent-panel .check-row input { margin-top: 3px; }
.agent-tools {
  margin: 0;
  padding: 0;
  border: 0;
}
.agent-tools legend {
  padding: 0;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
}
.agent-tools-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.agent-tools-head legend { margin: 0; }
.agent-tools-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.agent-tools-actions input[type="search"] {
  width: min(180px, 40vw);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
}
.agent-sel-count {
  margin-left: 6px;
  font-weight: 500;
  color: var(--muted);
  font-size: 12px;
}
.agent-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  margin: 0 0 10px;
}
.agent-tool-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  cursor: pointer;
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.agent-tool-item.is-on {
  border-color: rgba(196, 92, 38, 0.35);
  background: #fff8f2;
}
.agent-tool-item small {
  display: block;
  color: var(--ink-soft);
  margin-top: 2px;
  font-size: 12px;
}
.agent-tool-kind,
.agent-tool-warn {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}
.agent-tool-kind {
  background: #efe8da;
  color: var(--ink-soft);
}
.agent-tool-warn {
  background: #fde8e4;
  color: var(--cinnabar);
}
.agent-adapt-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fffdf8;
  display: grid;
  gap: 10px;
}
.agent-adapt-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.agent-adapt-head strong { font-size: 14px; }
.agent-adapt-head .field-hint { margin: 4px 0 0; }
.agent-adapt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.agent-adapt-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.agent-adapt-box textarea,
.agent-plugin-draft textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
  background: #fff;
  resize: vertical;
  min-height: 140px;
}
.agent-plugin-draft {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(28, 25, 19, 0.12);
}
.agent-plugin-draft[hidden] { display: none !important; }
.agent-plugin-draft textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  min-height: 180px;
}
.agent-steps {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  margin-top: 10px;
  background: #fbf8f2;
}
.agent-step-row {
  font-size: 12px;
  color: var(--ink-soft);
  padding: 4px 0;
  border-bottom: 1px dashed rgba(28, 25, 19, 0.08);
}
.agent-panel-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px dashed rgba(28, 25, 19, 0.1);
}
.agent-enable-row {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbf8f2;
}
.agent-summary {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: #fffdf8;
}
.agent-summary h3 { margin: 0 0 8px; font-size: 15px; }
.agent-summary ul { margin: 0; padding-left: 18px; color: var(--ink-soft); }
.agent-summary li { margin: 4px 0; }
.agent-memory-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.agent-memory-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #fbf6ea;
  border-bottom: 1px solid var(--line);
}
.agent-memory-list {
  max-height: 260px;
  overflow: auto;
  padding: 10px 12px;
}
.agent-memory-item {
  padding: 8px 0;
  border-bottom: 1px dashed rgba(28, 25, 19, 0.08);
}
.agent-memory-item:last-child { border-bottom: 0; }
.agent-memory-item small { color: var(--muted); font-size: 11px; }
.agent-memory-item p { margin: 4px 0 0; font-size: 13px; color: var(--ink); white-space: pre-wrap; }
@media (max-width: 900px) {
  .agent-board { grid-template-columns: 1fr; }
  .agent-rail {
    flex-direction: row;
    flex-wrap: wrap;
    overflow: auto;
  }
  .agent-rail-label { width: 100%; }
  .agent-node { flex: 1 1 140px; }
}
.composer.drop-on {
  outline: 2px dashed var(--cinnabar);
  outline-offset: 0;
  background: #fff8f4;
}
.attach-list { display: flex; flex-wrap: wrap; gap: 6px; }
.attach-chip {
  font-size: 12px;
  background: #fbf6ea;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--ink-soft);
}
.attach-chip.has-thumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 2px 2px;
  border-radius: 14px;
  max-width: 220px;
}
.attach-chip.has-thumb img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 10px;
  flex: 0 0 auto;
}
.attach-chip .attach-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attach-chip button { border: 0; background: none; color: var(--cinnabar); cursor: pointer; }
.artifacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.artifact {
  font-size: 13px;
  background: #f6f4ef;
  color: var(--ink-soft);
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
}
.artifact:hover { opacity: 0.9; }
.voice-settings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid var(--gold-soft);
  background: #fffdf9;
  border-radius: 14px;
  font-size: 13px;
  color: var(--ink-soft);
}
.voice-setting-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
}
.voice-setting-row select {
  min-width: 148px;
  border: 1px solid #e6d7c8;
  background: #fff;
  border-radius: 10px;
  padding: 4px 8px;
  color: var(--ink);
  font: inherit;
}
.voice-speaker input {
  width: 15px;
  height: 15px;
  accent-color: var(--cinnabar);
}
.voice-live {
  border: 1px solid var(--gold-soft);
  background: #fff8f2;
  border-radius: 16px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--ink-soft);
}
.voice-live-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.voice-live #voice-state { color: var(--cinnabar); font-weight: 600; }
.voice-live p { margin: 6px 0 0; line-height: 1.5; color: var(--ink); }
.voice-live #voice-stop {
  border: 0;
  background: #fff;
  color: var(--cinnabar);
  border-radius: 999px;
  padding: 2px 10px;
  cursor: pointer;
}
.meeting-live {
  border: 1px solid #d7ebe7;
  background: #f4fbfa;
  border-radius: 16px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.meeting-live-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
#meeting-state { color: var(--teal, #0f8f86); font-weight: 600; }
.meeting-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.meeting-actions button {
  border: 0;
  background: #fff;
  color: #0f8f86;
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 12px;
}
.meeting-actions button:disabled { opacity: 0.5; cursor: default; }
.meeting-segments {
  max-height: 180px;
  overflow: auto;
  margin-top: 8px;
  display: grid;
  gap: 6px;
}
.meeting-line {
  background: #fff;
  border-radius: 10px;
  padding: 6px 8px;
  color: var(--ink);
  line-height: 1.45;
}
.meeting-line span {
  display: inline-block;
  min-width: 54px;
  color: #7a8683;
  margin-right: 6px;
  font-variant-numeric: tabular-nums;
}
.meeting-partial {
  margin: 8px 0 0;
  color: #5b6b68;
  font-style: italic;
  min-height: 1.2em;
}
.voice-orb.is-on {
  background: #f4e6dc;
  color: var(--cinnabar);
}
.composer textarea {
  width: 100%;
  resize: none;
  border: 0;
  outline: none;
  padding: 6px 8px 2px;
  min-height: 44px;
  max-height: 160px;
  background: transparent;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}
.composer textarea::placeholder { color: #b3aaa0; }
.composer-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.composer-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.composer-tools::-webkit-scrollbar { display: none; }
.tool-plus, .tool-chip, .send-orb {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  flex: none;
}
.tool-plus {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--ink);
}
#attach-wrap .tool-plus.is-on,
.tool-plus:hover, .tool-chip:hover { background: #f4eee4; }
.tool-plus svg, .tool-chip svg, .send-orb svg { width: 16px; height: 16px; display: block; }
#attach-wrap .tool-more-menu {
  min-width: 132px;
}
.tool-split {
  width: 1px;
  height: 18px;
  background: var(--line);
  margin: 0 4px;
  flex: none;
}
.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
}
.tool-chip.is-on {
  background: #f6efe3;
  color: var(--cinnabar);
}
.voice-qa-panel {
  border: 1px solid #e8d5c4;
  background: #fff8f2;
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}
.voice-qa-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
#voice-qa-state { color: var(--cinnabar); font-weight: 600; }
#voice-qa-toggle {
  border: 0;
  background: #fff;
  color: var(--cinnabar);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 12px;
}
.voice-qa-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}
.voice-qa-row input[type="text"],
.voice-qa-row input:not([type]) {
  flex: 1;
  border: 1px solid #e6d7c8;
  border-radius: 10px;
  padding: 4px 8px;
  font: inherit;
}
.voice-qa-speaker input { width: 15px; height: 15px; accent-color: var(--cinnabar); }
.voice-qa-hint { margin: 6px 0 0; color: #8a7a6a; font-size: 12px; line-height: 1.45; }
.voice-qa-heard { margin: 6px 0 0; color: var(--ink); min-height: 1.2em; }

#think-btn.is-on,
#web-btn.is-on,
#skill-btn.is-on,
#answer-mode-btn.is-on {
  background: #f6efe3;
  color: var(--cinnabar);
}
#think-btn .chev,
#doc-edit-btn .chev,
#skill-btn .chev,
#answer-mode-btn .chev {
  width: 12px;
  height: 12px;
  opacity: 0.75;
}
.tool-more { position: relative; flex: none; }
.tool-more-menu {
  position: fixed;
  left: 0;
  bottom: auto;
  top: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 50;
  min-width: 188px;
  max-height: 280px;
  overflow: auto;
}
#skill-menu {
  min-width: 240px;
  max-width: 320px;
}
.tool-more-label {
  margin: 8px 10px 2px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.tool-more-empty,
.tool-more-link {
  display: block;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--muted);
}
.tool-more-link {
  color: var(--cinnabar);
  text-decoration: none;
}
.tool-more-link:hover { text-decoration: underline; }
.tool-more-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}
.tool-more-menu button:hover,
.tool-more-menu button.is-on {
  background: #f6efe3;
  color: var(--cinnabar);
}
.send-orb {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e8e2d6;
  color: #8a8378;
}
.send-orb:not(:disabled) {
  background: var(--cinnabar);
  color: #fff;
}
.send-orb:disabled { cursor: default; }
.send-orb.is-stop:not(:disabled) {
  background: #c45c4a;
  color: #fff;
}
.send-orb.is-stop svg { width: 14px; height: 14px; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 32px 0;
  align-items: center;
}
.search {
  flex: 1;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
}
.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 32px 0;
}
.cat-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}
.cat-chip.is-on {
  background: var(--cinnabar);
  color: #fff8ee;
  border-color: var(--cinnabar);
}
.doc-cat {
  display: inline-block;
  margin-right: 6px;
  border-radius: 999px;
  padding: 1px 8px;
  background: #fbf6ea;
  color: #7a5a28;
  border: 1px solid var(--gold-soft);
  font-size: 12px;
}
.cat-chip.is-stray { border-style: dashed; }
.import-cat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  min-width: 148px;
}
.wf-modal-card select,
.import-cat select,
.doc-cat-pick,
.meta-grid select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
}
.doc-cat-pick {
  display: block;
  margin-top: 8px;
  max-width: 180px;
  font-size: 12px;
}
.cat-manage-list {
  display: grid;
  gap: 8px;
  max-height: 40vh;
  overflow: auto;
}
.cat-manage-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}
.cat-manage-row input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
}
.cat-manage-row button {
  border: 0;
  background: transparent;
  color: var(--cinnabar);
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}
.import-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.dropzone {
  margin: 14px 32px 0;
  border: 1.5px dashed #cbb894;
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
  background: rgba(255,255,255,0.35);
}
.dropzone.drag { border-color: var(--cinnabar); background: rgba(196, 72, 54, 0.06); color: var(--ink); }
.admin-page .dropzone { margin: 0; }
.plugin-config {
  display: grid;
  gap: 10px;
  margin: 8px 0 12px;
}
.plugin-page .workshop-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.plugin-page .workshop-card input,
.plugin-page .workshop-card textarea,
.plugin-page .workshop-card select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  color: var(--ink);
}
.plugin-page .wf-log {
  max-height: 360px;
}
.sandbox-check {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}
.sandbox-check input {
  width: auto !important;
}
.plugin-page .form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 18px 32px 40px;
}
.doc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 190px;
}
.doc-card h3 { margin: 0; font-family: var(--serif); font-size: 20px; }
.doc-card p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.doc-card .tags { color: var(--gold); font-size: 12px; }
.card-actions { display: flex; gap: 8px; }
.card-actions a, .card-actions button {
  font-size: 13px;
  background: transparent;
  border: 0;
  color: var(--cinnabar);
  cursor: pointer;
  padding: 0;
}
.card-actions .muted { color: var(--muted); font-size: 12px; }
.list-count {
  align-self: center;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.data-list {
  margin: 16px 32px 40px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  overflow: clip;
}
.data-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(220px, 1.6fr) 140px 168px;
  gap: 16px;
  align-items: start;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}
.data-row.data-head {
  border-top: 0;
  background: #fbf6ea;
  color: var(--muted);
  font-size: 12px;
  align-items: center;
}
.data-row h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 18px; }
.data-row p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.data-row small { color: var(--muted); }
.data-time { white-space: nowrap; padding-top: 4px; }
@media (max-width: 900px) {
  .data-row, .data-row.data-head {
    grid-template-columns: 1fr;
  }
  .data-head { display: none; }
}

.meta-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 12px;
  padding: 8px 32px 0;
}
.meta-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.meta-grid input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}
.split {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  min-height: 420px;
  padding: 16px 32px 32px;
}
.split textarea, .preview {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  min-height: 100%;
}
.split textarea {
  padding: 16px;
  resize: none;
  line-height: 1.7;
}

.article { padding-bottom: 48px; }
.article-meta { color: var(--muted); display: flex; gap: 16px; }
.prose {
  max-width: 760px;
  margin: 0;
  line-height: 1.85;
}
.article .prose { margin: 0 32px; }
.prose h1, .prose h2, .prose h3 { font-family: var(--serif); }
.prose pre {
  background: #1c1913;
  color: #f3eee4;
  padding: 14px;
  border-radius: 12px;
  overflow: auto;
}
.prose code { background: #f0e6d4; padding: 1px 5px; border-radius: 4px; }
.prose pre code { background: transparent; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; }
.prose img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 12px 0;
  border-radius: 8px;
  background: #f6efe3;
  border: 1px solid var(--line);
  cursor: zoom-in;
}
.prose blockquote {
  margin: 0;
  padding: 4px 14px;
  border-left: 3px solid var(--cinnabar);
  color: var(--ink-soft);
  background: #fbf4e8;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--ink);
  color: #f6efe3;
  padding: 10px 14px;
  border-radius: 12px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 48px));
}
.empty-note {
  margin: 32px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 960px) {
  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    padding: 0;
  }
  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    height: auto;
    max-height: 42vh;
    padding: 12px 14px;
  }
  .workspace {
    margin: 0 8px 8px;
    border-radius: 18px;
    height: auto;
    max-height: none;
    flex: 1;
  }
  .sidebar-meta { width: 100%; grid-template-columns: 1fr 1fr; }
  .chat-board, .split, .meta-grid { grid-template-columns: 1fr; }
  .session-rail { display: none; }
  .page-head, .article-head { padding: 20px 16px 8px; }
  .toolbar, .dropzone, .doc-grid, .data-list, .meta-grid, .split, .prose { margin-left: 16px; margin-right: 16px; padding-left: 0; padding-right: 0; }
  .library-page .library-head { padding: 16px 16px 4px; }
  .library-tools { padding: 8px 16px 0; }
  .library-page .library-search,
  .library-page .library-drop,
  .library-page .data-list { margin-left: 0; margin-right: 0; }
  .library-drop {
    flex-direction: column;
    align-items: stretch;
  }
  .library-drop-actions { justify-content: flex-end; }
  .admin-page { padding: 0 16px 16px; }
  .admin-page .toolbar,
  .admin-page .data-list { margin-left: 0; margin-right: 0; }
  .admin-form { grid-template-columns: 1fr; max-width: none; }
  .wf-page { padding: 0 16px 16px; }
  .wf-board { grid-template-columns: 1fr; }
  .wf-meta-bar { grid-template-columns: 1fr 1fr; }
  .wf-desc-field { grid-column: 1 / -1; }
  .wf-schedule-bar { grid-template-columns: 1fr 1fr; }
  .wf-pair { grid-template-columns: 1fr; }
  .wf-preview-grid { grid-template-columns: 1fr; }
  .messages { padding: 16px; }
}

/* —— 备忘录 —— */
.memo-shell {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  max-width: none;
  margin: 0;
  padding: 0 28px 20px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.memo-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 4px 14px;
  flex-shrink: 0;
}
.memo-head h1 {
  margin: 4px 0 0;
  font-size: 1.65rem;
}
.memo-sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--mute, #6b7280);
}
.memo-head-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.memo-board-wrap {
  flex: 1;
  min-height: 0;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--line, #e6ecef);
  box-shadow: 0 8px 28px rgba(15, 45, 42, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.memo-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line, #eef2f4);
  background: linear-gradient(180deg, #f8fbfb 0%, #fff 100%);
}
.memo-toolbar .memo-search-wrap {
  flex: 1;
  min-width: 220px;
  max-width: 480px;
  margin-left: auto;
}
.memo-board {
  flex: 1;
  padding: 20px 20px 28px;
  overflow: auto;
}
.memo-board-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  text-align: center;
  color: var(--mute, #6b7280);
}
.memo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  width: 100%;
}
@media (min-width: 1400px) {
  .memo-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}
.memo-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line, #e8ecef);
  border-radius: 16px;
  padding: 16px 40px 14px 16px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.12s;
  outline: none;
}
.memo-card-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--mute, #9ca3af);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s, background 0.12s, color 0.12s;
}
.memo-card:hover .memo-card-delete,
.memo-card:focus-within .memo-card-delete {
  opacity: 1;
}
.memo-card-delete:hover {
  background: #ffe8e8;
  color: #d14343;
}
@media (hover: none) {
  .memo-card-delete {
    opacity: 1;
  }
}
.memo-card:hover,
.memo-card:focus-visible {
  border-color: #b8e4dc;
  box-shadow: 0 8px 24px rgba(13, 107, 92, 0.1);
  transform: translateY(-1px);
}
.memo-card.is-pinned {
  background: linear-gradient(145deg, #fff 0%, #f4fbf9 100%);
  border-color: #c5ebe4;
}
.memo-card-top {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 8px;
}
.memo-card-top h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink, #1a1a1a);
  line-height: 1.35;
  flex: 1;
}
.memo-card-pin {
  font-size: 12px;
}
.memo-card-preview {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--mute, #6b7280);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.1em;
}
.memo-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.memo-card-tag {
  font-size: 11px;
  color: #0d6b5c;
  background: #e8f8f6;
  padding: 2px 8px;
  border-radius: 999px;
}
.memo-card-remind {
  font-size: 11px;
  color: #c45c26;
  background: #fff6f0;
  padding: 3px 8px;
  border-radius: 999px;
  margin-left: auto;
}
.memo-form-modal .wf-modal-card {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 0;
}
.memo-form-card {
  display: flex;
  flex-direction: column;
}
.memo-form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px 12px;
  border-bottom: 1px solid var(--line, #eef2f4);
}
.memo-form-head-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.memo-form-scope-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 650;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  line-height: 1.2;
}
.memo-form-scope-badge.memo-form-scope-mine {
  background: #e6f3ef;
  color: #0b5c4a;
  border: 1px solid #b8ddd2;
}
.memo-form-scope-badge.memo-form-scope-team {
  background: #e8f0fa;
  color: #1a4d7a;
  border: 1px solid #b8cce8;
}
.memo-form-scope-badge.memo-form-scope-shared {
  background: #f3ebff;
  color: #6b21a8;
  border: 1px solid #dbc4f5;
}
.memo-form-head h3 {
  margin: 0;
  font-size: 1.15rem;
}
.memo-form-close {
  border: none;
  background: #f3f6f6;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--mute, #6b7280);
}
.memo-form-close:hover {
  background: #e8f8f6;
  color: #0d6b5c;
}
.memo-form-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 0;
  padding: 0;
}
.memo-form-main {
  padding: 18px 22px;
  border-right: 1px solid var(--line, #eef2f4);
}
.memo-form-side {
  padding: 16px 16px 18px;
  background: #fafcfc;
  overflow: auto;
}
.memo-form-foot {
  padding: 12px 22px 18px;
  border-top: 1px solid var(--line, #eef2f4);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.memo-form-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}
.memo-form-foot-btns {
  display: flex;
  gap: 10px;
  margin-left: auto;
}
.memo-form-foot .memo-save-hint {
  width: 100%;
  margin: 0;
  order: -1;
}
@media (max-width: 768px) {
  .memo-form-body {
    grid-template-columns: 1fr;
  }
  .memo-form-main {
    border-right: none;
    border-bottom: 1px solid var(--line, #eef2f4);
  }
  .memo-toolbar .memo-search-wrap {
    max-width: none;
    width: 100%;
    margin-left: 0;
  }
}
.memo-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.memo-tab {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 8px 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--mute, #6b7280);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.memo-tab:hover {
  background: rgba(13, 107, 92, 0.06);
  color: var(--ink, #1a1a1a);
}
.memo-tab.active {
  background: #e8f8f6;
  color: #0d6b5c;
  box-shadow: inset 0 0 0 1px #b8e4dc;
}
.memo-tab-trash.active {
  background: #fff4f0;
  color: #c45c26;
  box-shadow: inset 0 0 0 1px #f0c9b8;
}
.memo-card-trash {
  cursor: default;
  padding-bottom: 12px;
}
.memo-card-trash:hover {
  transform: none;
}
.memo-card-deleted {
  font-size: 11px;
  color: var(--mute, #6b7280);
}
.memo-card-trash-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line, #eef2f4);
}
.memo-card-trash-actions .btn {
  flex: 1;
  font-size: 13px;
  padding: 8px 10px;
}
.memo-search-wrap {
  position: relative;
}
.memo-search {
  width: 100%;
  border: 1px solid var(--line, #e6ecef);
  border-radius: 12px;
  padding: 10px 12px 10px 36px;
  font-size: 14px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='5'/%3E%3Cpath d='M12 12l4 4'/%3E%3C/svg%3E") 12px center no-repeat;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.memo-search:focus {
  border-color: #7ecfc4;
  box-shadow: 0 0 0 3px rgba(13, 107, 92, 0.12);
}
.memo-team-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.memo-team-chip {
  border: 1px solid var(--line, #e6ecef);
  background: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  color: var(--mute, #6b7280);
}
.memo-team-chip.active {
  background: #0d6b5c;
  border-color: #0d6b5c;
  color: #fff;
}
.memo-empty-seal {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(145deg, #0d6b5c, #14a892);
  color: #fff;
  font-family: var(--serif, "Noto Serif SC", serif);
  font-size: 32px;
  line-height: 72px;
  margin: 0 0 16px;
  box-shadow: 0 8px 24px rgba(13, 107, 92, 0.25);
}
.memo-board-empty h2 {
  margin: 0 0 8px;
  color: var(--ink, #1a1a1a);
  font-size: 1.25rem;
}
.memo-title {
  width: 100%;
  border: none;
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 12px;
  outline: none;
  color: var(--ink, #1a1a1a);
  background: transparent;
}
.memo-title::placeholder {
  color: #c4cdd4;
  font-weight: 500;
}
.memo-content {
  width: 100%;
  min-height: 200px;
  border: 1px solid var(--line, #e8ecef);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 10px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.65;
  resize: vertical;
  outline: none;
  color: var(--ink, #1a1a1a);
  box-sizing: border-box;
}
.memo-content::placeholder {
  color: #b8c2ca;
}
.memo-panel {
  margin-bottom: 18px;
}
.memo-panel-title {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a949e;
}
.memo-remind-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line, #e6ecef);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink, #1a1a1a);
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
  margin-bottom: 12px;
}
.memo-remind-trigger:hover,
.memo-remind-trigger[aria-expanded="true"] {
  border-color: #7ecfc4;
  box-shadow: 0 0 0 3px rgba(13, 107, 92, 0.1);
}
.memo-remind-ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #e8f8f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.memo-remind-text {
  flex: 1;
  line-height: 1.35;
}
.memo-remind-text.is-set {
  color: #0d6b5c;
  font-weight: 500;
}
.memo-remind-caret {
  width: 8px;
  height: 8px;
  border-right: 2px solid #9ca3af;
  border-bottom: 2px solid #9ca3af;
  transform: rotate(45deg);
  margin-right: 4px;
  transition: transform 0.15s;
}
.memo-remind-trigger[aria-expanded="true"] .memo-remind-caret {
  transform: rotate(-135deg);
  margin-top: 4px;
}
.memo-picker {
  position: relative;
  z-index: 5;
  background: #fff;
  border: 1px solid var(--line, #e6ecef);
  border-radius: 16px;
  padding: 12px 12px 10px;
  margin: -4px 0 14px;
  box-shadow: 0 16px 40px rgba(15, 45, 42, 0.12);
}
.memo-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.memo-picker-head strong {
  font-size: 15px;
  color: var(--ink, #1a1a1a);
}
.memo-picker-nav {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: #f3f6f6;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: #0d6b5c;
}
.memo-picker-nav:hover {
  background: #e8f8f6;
}
.memo-picker-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
}
.memo-picker-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 12px;
}
.memo-picker-day {
  aspect-ratio: 1;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink, #1a1a1a);
}
.memo-picker-day:hover:not(:disabled) {
  background: #eef8f6;
}
.memo-picker-day.is-today {
  box-shadow: inset 0 0 0 1px #9fd9d0;
}
.memo-picker-day.is-selected {
  background: #0d6b5c;
  color: #fff;
  font-weight: 600;
}
.memo-picker-day.is-other {
  color: #c4cdd4;
}
.memo-picker-day:disabled {
  cursor: default;
  visibility: hidden;
}
.memo-picker-time {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 8px 0 4px;
  border-top: 1px solid var(--line, #eef2f4);
}
.memo-picker-time label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--mute, #6b7280);
}
.memo-picker-time select {
  border: 1px solid var(--line, #e6ecef);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 15px;
  font-weight: 600;
  color: #0d6b5c;
  background: #fff;
  min-width: 72px;
  cursor: pointer;
}
.memo-picker-colon {
  font-size: 18px;
  font-weight: 700;
  color: #9ca3af;
  padding-bottom: 10px;
}
.memo-picker-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.memo-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--mute, #6b7280);
}
.memo-field-inline .memo-stepper {
  margin-top: 2px;
}
.memo-select {
  border: 1px solid var(--line, #e6ecef);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 14px;
  background: #fff;
  color: var(--ink, #1a1a1a);
}
.memo-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}
.memo-stepper input {
  width: 44px;
  text-align: center;
  border: 1px solid var(--line, #e6ecef);
  border-radius: 8px;
  padding: 6px;
  font-size: 14px;
  font-weight: 600;
  background: #fff;
}
.memo-step {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line, #e6ecef);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #0d6b5c;
}
.memo-step:hover {
  background: #e8f8f6;
}
.memo-step-unit {
  font-size: 12px;
  color: var(--mute, #6b7280);
}
.memo-channels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.memo-channel {
  position: relative;
  cursor: pointer;
}
.memo-channel input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.memo-channel span {
  display: block;
  text-align: center;
  padding: 9px 8px;
  border-radius: 10px;
  border: 1px solid var(--line, #e6ecef);
  background: #fff;
  font-size: 13px;
  color: var(--mute, #6b7280);
  transition: all 0.12s;
}
.memo-channel input:checked + span {
  background: #e8f8f6;
  border-color: #7ecfc4;
  color: #0d6b5c;
  font-weight: 600;
}
.memo-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 12px;
}
.memo-toggle input {
  position: absolute;
  opacity: 0;
}
.memo-toggle-ui {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #dde3e8;
  position: relative;
  transition: background 0.15s;
}
.memo-toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s;
}
.memo-toggle input:checked + .memo-toggle-ui {
  background: #0d6b5c;
}
.memo-toggle input:checked + .memo-toggle-ui::after {
  transform: translateX(18px);
}
.memo-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.memo-action-row .btn {
  flex: 1;
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
  font-size: 13px;
}
.memo-save-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: #0d6b5c;
  min-height: 1.2em;
}
.site-beian {
  margin-top: auto;
  padding: 16px 12px 20px;
  text-align: center;
  font-size: 12px;
  color: #8a8f98;
}
.site-beian a {
  color: inherit;
  text-decoration: none;
}
.site-beian a:hover {
  text-decoration: underline;
}
.login-beian {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px 18px;
  text-align: center;
  font-size: 12px;
  color: #8a8f98;
  pointer-events: auto;
}
.login-beian a {
  color: inherit;
  text-decoration: none;
}
.login-beian a:hover {
  text-decoration: underline;
}
.memo-team-card label {
  display: block;
  margin-bottom: 12px;
}
.memo-team-manage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.memo-team-manage-head h3 {
  margin: 0;
}
.memo-team-list-items {
  list-style: none;
  margin: 0;
  padding: 0;
}
.memo-team-list-items li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}
.memo-team-list-items li:last-child {
  border-bottom: none;
}
.memo-team-manage-single .memo-team-manage-head {
  flex-wrap: wrap;
}
.memo-team-manage-single .memo-team-manage-head h3 {
  flex: 1;
  text-align: center;
  margin: 0;
}
.memo-team-manage-label {
  font-size: 12px;
  color: var(--muted, #666);
  margin: 0 0 8px;
}
.memo-team-manage-items {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}
.memo-team-manage-items li button {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 14px;
}
.memo-team-manage-items li button.active {
  border-color: #0d6b5c;
  background: #ecfdf8;
}
.memo-team-manage-new input {
  width: 100%;
  margin-top: 4px;
}
.memo-team-manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px;
}
.memo-team-members,
.memo-share-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  max-height: 200px;
  overflow: auto;
}
.memo-team-members li,
.memo-share-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}
.memo-team-members select {
  font-size: 12px;
  max-width: 100px;
}
.memo-share-perm {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}
