/* Kongming product UI (1920) ? Design Token
   Dark: warm ink + champagne apricot; Light: cream mist orange #F29966 */
:root {
  /* brand */
  --km-brand: #E8A07A;
  --km-brand-2: #C47D55;
  --km-brand-ink: #2A1A12;
  --km-warn: #E0B05C;
  --km-danger: #E07A7A;
  --km-info: #8BA4C7;

  /* dark warm ink */
  --km-bg: #0C0A09;
  --km-bg-stage: #090807;
  --km-bg-glow-a: #3A261C;
  --km-bg-glow-b: #1E2430;
  --km-panel-soft: linear-gradient(165deg, rgba(232, 160, 122, 0.12) 0%, rgba(36, 28, 24, 0.62) 48%, rgba(22, 18, 16, 0.78) 100%);
  --km-panel: linear-gradient(180deg, rgba(38, 32, 28, 0.94) 0%, rgba(22, 18, 16, 0.96) 100%);
  --km-panel-deep: linear-gradient(180deg, rgba(20, 16, 14, 0.98) 0%, rgba(12, 10, 9, 0.99) 100%);
  --km-panel-2: rgba(255, 244, 234, 0.045);
  --km-surface-solid: #181410;
  --km-drawer-bg: #12100E;
  --km-line: rgba(232, 200, 176, 0.14);
  --km-line-strong: rgba(232, 160, 122, 0.4);
  --km-text: #F6EFE8;
  --km-text-secondary: #D6C4B4;
  --km-muted: #A89484;
  --km-muted-deep: #857568;
  --km-shadow-card: inset 0 1px 0 rgba(255, 240, 228, 0.07), 0 10px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(232, 160, 122, 0.05);
  --km-shadow-soft: inset 0 1px 0 rgba(255, 240, 228, 0.09), 0 6px 22px rgba(0, 0, 0, 0.32), 0 0 24px rgba(232, 160, 122, 0.07);
  --km-shadow-deep: inset 0 1px 0 rgba(255, 240, 228, 0.04), 0 14px 40px rgba(0, 0, 0, 0.58);
  --km-brand-glow: rgba(232, 160, 122, 0.38);
  --km-scrollbar: rgba(232, 160, 122, 0.3);
  --km-scrollbar-hover: rgba(232, 160, 122, 0.5);
  --km-overlay: rgba(8, 6, 5, 0.58);
  --km-placeholder-bg: rgba(224, 176, 92, 0.1);
  --km-placeholder-text: #E8C98A;
  --km-accent-bar: linear-gradient(90deg, transparent, rgba(232, 160, 122, 0.5), transparent);

  /* radius / space / type */
  --km-radius-sm: 8px;
  --km-radius: 14px;
  --km-radius-lg: 18px;
  --km-space-1: 6px;
  --km-space-2: 10px;
  --km-space-3: 14px;
  --km-space-4: 18px;
  --km-fs-xs: 10px;
  --km-fs-sm: 12px;
  --km-fs-md: 13px;
  --km-fs-lg: 15px;
  --km-fs-xl: 18px;
  --km-fs-2xl: 22px;
  --km-fs-3xl: 28px;
  --km-font: "Noto Sans SC", "Segoe UI", "PingFang SC", sans-serif;
  --km-w: 1920px;
  color-scheme: dark;
}

/* light ? cream mist orange #F29966 */
html[data-theme="light"] {
  --km-brand: #F29966;
  --km-brand-2: #D97B45;
  --km-brand-ink: #FFFFFF;
  --km-warn: #D4A04A;
  --km-danger: #D96B6B;
  --km-info: #7A96B8;
  --km-bg: #F7EDE4;
  --km-bg-stage: #F0E2D6;
  --km-bg-glow-a: #F8D5C0;
  --km-bg-glow-b: #E8D8CC;
  --km-panel-soft: linear-gradient(165deg, rgba(255, 250, 245, 0.96) 0%, rgba(252, 236, 224, 0.92) 100%);
  --km-panel: linear-gradient(180deg, #FFF9F4 0%, #F8EDE3 100%);
  --km-panel-deep: linear-gradient(180deg, #F5E6DA 0%, #EFDCCE 100%);
  --km-panel-2: rgba(90, 48, 28, 0.045);
  --km-surface-solid: #FFF9F4;
  --km-drawer-bg: #FBF3EB;
  --km-line: rgba(120, 72, 48, 0.12);
  --km-line-strong: rgba(242, 153, 102, 0.42);
  --km-text: #3A2C24;
  --km-text-secondary: #4A372C;
  --km-muted: #5E4A3E;
  --km-muted-deep: #7A6456;
  --km-shadow-card: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 8px 24px rgba(120, 72, 48, 0.08);
  --km-shadow-soft: inset 0 1px 0 #fff, 0 4px 16px rgba(242, 153, 102, 0.12);
  --km-shadow-deep: inset 0 1px 0 #fff, 0 12px 32px rgba(90, 48, 28, 0.1);
  --km-brand-glow: rgba(242, 153, 102, 0.32);
  --km-scrollbar: rgba(242, 153, 102, 0.35);
  --km-scrollbar-hover: rgba(217, 123, 69, 0.5);
  --km-overlay: rgba(58, 44, 36, 0.32);
  --km-placeholder-bg: rgba(242, 153, 102, 0.14);
  --km-placeholder-text: #9A5A32;
  --km-accent-bar: linear-gradient(90deg, transparent, rgba(242, 153, 102, 0.5), transparent);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--km-font);
  color: var(--km-text);
  background:
    radial-gradient(980px 520px at 8% -6%, rgba(232, 160, 122, 0.18) 0%, transparent 58%),
    radial-gradient(720px 420px at 92% 4%, rgba(139, 164, 199, 0.1) 0%, transparent 52%),
    radial-gradient(600px 360px at 50% 110%, rgba(232, 160, 122, 0.07) 0%, transparent 55%),
    var(--km-bg);
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .2s ease;
}
html[data-theme="light"] body {
  background:
    radial-gradient(900px 480px at 10% -8%, rgba(242, 153, 102, 0.22) 0%, transparent 55%),
    radial-gradient(700px 400px at 90% 0%, rgba(232, 200, 176, 0.35) 0%, transparent 50%),
    var(--km-bg);
}

/* ??? */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--km-scrollbar) transparent;
}
*::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: var(--km-scrollbar);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--km-scrollbar-hover);
  border: 3px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-corner {
  background: transparent;
}

/* ???????????????? */
.list,
.table-wrap,
.fluoro-panel-body,
.evt-detail-main,
.km-drawer-body,
.modal {
  padding-right: 8px;
  box-sizing: border-box;
}

.km-stage {
  width: 100vw; height: 100vh; overflow: hidden; position: relative;
  background:
    linear-gradient(180deg, rgba(12, 10, 9, 0.35), transparent 30%),
    var(--km-bg-stage);
}
.km-shell {
  position: absolute; left: 50%; top: 0;
  width: var(--km-w); min-width: var(--km-w); max-width: var(--km-w);
  height: 1080px; min-height: 1080px;
  transform-origin: top center;
  display: flex; flex-direction: column;
  padding: 0 20px 18px;
}

.km-top {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; flex-shrink: 0;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent 0%, rgba(232, 160, 122, 0.4) 22%, rgba(232, 160, 122, 0.12) 50%, rgba(139, 164, 199, 0.22) 78%, transparent 100%) 1;
  background: linear-gradient(180deg, rgba(232, 160, 122, 0.07), transparent);
}
.km-brand { display: flex; align-items: flex-start; gap: 12px; text-decoration: none; color: inherit; }
.km-brand-mark {
  --km-brand-mark-size: calc(var(--km-fs-2xl) * 1.2 + 2px + var(--km-fs-sm) * 1.3);
  width: var(--km-brand-mark-size);
  height: var(--km-brand-mark-size);
  border-radius: 12px;
  object-fit: cover;
  object-position: center 40%;
  flex-shrink: 0;
  display: block;
  background: #dceef8;
  box-shadow: 0 0 0 1px rgba(232, 160, 122, 0.28), 0 6px 18px rgba(120, 72, 48, 0.1);
}
.km-brand > div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: var(--km-brand-mark-size, calc(var(--km-fs-2xl) * 1.2 + 2px + var(--km-fs-sm) * 1.3));
  gap: 2px;
  padding: 0;
}
.km-brand h1 {
  font-size: var(--km-fs-2xl); font-weight: 700; letter-spacing: 0.04em;
  line-height: 1.2;
  background: linear-gradient(90deg, #FFF8F2 0%, #F0D2BC 50%, var(--km-brand) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
html[data-theme="light"] .km-brand h1 {
  background: linear-gradient(90deg, #3A2C24 0%, #8A4E32 55%, #F29966 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.km-brand p {
  font-size: var(--km-fs-sm);
  color: var(--km-muted);
  margin-top: 0;
  line-height: 1.3;
}

.km-nav { display: flex; gap: 6px; align-items: center; }
.km-nav a {
  color: var(--km-muted); text-decoration: none; font-size: var(--km-fs-md);
  padding: 8px 14px; border-radius: 999px; border: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}
html[data-theme="light"] .km-nav a {
  color: var(--km-text-secondary);
  font-weight: 500;
}
.km-nav a:hover { color: var(--km-text); border-color: var(--km-line); background: var(--km-panel-2); transform: translateY(-1px); }
html[data-theme="light"] .km-nav a:hover {
  color: var(--km-text);
  background: rgba(90, 48, 28, 0.06);
}
.km-nav a.active {
  color: var(--km-brand-ink); background: linear-gradient(135deg, #F5B48A, var(--km-brand));
  border-color: transparent; font-weight: 600;
  box-shadow: 0 4px 16px var(--km-brand-glow);
}
html[data-theme="light"] .km-nav a.active {
  color: #fff;
  font-weight: 600;
}
.km-top-meta { display: flex; align-items: center; gap: 14px; color: var(--km-muted); font-size: var(--km-fs-sm); }
html[data-theme="light"] .km-top-meta {
  color: var(--km-text-secondary);
}
html[data-theme="light"] .km-util-link,
html[data-theme="light"] .km-brand p,
html[data-theme="light"] .page-lead,
html[data-theme="light"] .d {
  color: var(--km-muted);
}
.km-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--km-line);
  background: color-mix(in srgb, var(--km-surface-solid) 80%, transparent);
  color: var(--km-text);
  font-size: 12px;
}
.km-user-chip[hidden] { display: none !important; }
.km-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--km-brand);
  display: inline-block; margin-right: 6px;
  box-shadow: 0 0 0 4px rgba(232, 160, 122, .18), 0 0 12px rgba(232, 160, 122, .5);
  animation: breath 2.4s ease-in-out infinite;
}
.km-gear, .km-theme-toggle {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--km-line);
  background: var(--km-panel-2); color: var(--km-text); cursor: pointer; font-size: 15px;
  display: inline-grid; place-items: center; text-decoration: none; line-height: 1;
  transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.km-gear {
  width: 40px;
  height: 40px;
}
.km-gear-icon {
  width: 22px;
  height: 22px;
  display: block;
}
.km-gear:hover, .km-theme-toggle:hover {
  border-color: var(--km-brand); color: var(--km-brand); transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(232, 160, 122, 0.22);
}
.km-gear:hover .km-gear-icon {
  transform: rotate(28deg);
  transition: transform .25s ease;
}
.km-theme-toggle { font-size: 14px; padding: 0; }

.km-main { flex: 1; min-height: 0; padding-top: 16px; overflow: hidden; display: flex; flex-direction: column; gap: 12px; }
.km-row { display: grid; gap: 14px; }
.km-row-kpi { grid-template-columns: repeat(6, minmax(0, 1fr)); flex: 0 0 auto; }
.km-row-island { grid-template-columns: 1fr; flex: 0 0 auto; }
.km-row-mid { grid-template-columns: 1.7fr 1fr 0.6fr; flex: 2.2 1 0; min-height: 0; }
.km-row-mid > .km-card,
.km-row-mid .evt-pair > .km-card {
  min-height: 0; overflow: hidden;
  display: flex; flex-direction: column;
}
.km-row-mid .table-wrap { flex: 1; min-height: 0; height: auto; }

/* 上报事件 ↔ 事件内容 */
.evt-pair {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) 22px minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(242, 153, 102, 0.28);
  border-radius: var(--km-radius);
  background:
    linear-gradient(135deg, rgba(242, 153, 102, 0.07) 0%, transparent 42%),
    rgba(255, 255, 255, 0.02);
  box-shadow: var(--km-shadow-card);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.evt-pair.is-linked {
  border-color: rgba(242, 153, 102, 0.48);
  box-shadow: var(--km-shadow-card), 0 0 0 1px rgba(242, 153, 102, 0.12);
}
.evt-pair > .km-card {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
}
.evt-pair > .km-card::before { display: none; }
.evt-pair > .km-card:hover {
  border-color: transparent;
  box-shadow: none;
  transform: none;
}
.evt-pair-bridge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 0;
  background: linear-gradient(
    180deg,
    transparent 8%,
    rgba(242, 153, 102, 0.1) 35%,
    rgba(242, 153, 102, 0.1) 65%,
    transparent 92%
  );
  border-left: 1px dashed rgba(242, 153, 102, 0.28);
  border-right: 1px dashed rgba(242, 153, 102, 0.28);
}
.evt-pair-bridge-line {
  flex: 1;
  width: 1px;
  max-height: 48px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(242, 153, 102, 0.45),
    transparent
  );
}
.evt-pair-bridge-mark {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: var(--km-brand);
  background: rgba(242, 153, 102, 0.14);
  border: 1px solid rgba(242, 153, 102, 0.4);
  box-shadow: 0 0 12px rgba(242, 153, 102, 0.18);
}
.evt-pair.is-linked .evt-pair-bridge-mark {
  background: rgba(242, 153, 102, 0.28);
  border-color: rgba(242, 153, 102, 0.65);
  animation: evt-pair-pulse 1.8s ease-in-out infinite;
}
@keyframes evt-pair-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(242, 153, 102, 0.2); }
  50% { box-shadow: 0 0 16px rgba(242, 153, 102, 0.4); }
}
#evt-detail-context {
  max-width: 16em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--km-brand);
  opacity: .85;
}
.evt-pair:not(.is-linked) #evt-detail-context {
  color: var(--km-muted);
  opacity: 1;
}
html[data-theme="light"] .evt-pair {
  background:
    linear-gradient(135deg, rgba(242, 153, 102, 0.1) 0%, transparent 42%),
    rgba(255, 248, 242, 0.55);
  border-color: rgba(200, 120, 70, 0.28);
}
html[data-theme="light"] .evt-pair.is-linked {
  border-color: rgba(200, 120, 70, 0.5);
}

.cc-task-panel {
  min-height: 0;
}
.cc-task-panel > h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.cc-task-filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0;
  flex-shrink: 0;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.cc-task-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--km-muted);
  cursor: pointer;
  user-select: none;
}
.cc-task-filter input {
  accent-color: var(--km-brand);
  width: 13px;
  height: 13px;
  margin: 0;
}
.cc-task-list {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
}
.cc-task-list .list-item {
  cursor: default;
}
.cc-task-list .list-item.is-clickable {
  cursor: pointer;
}
.cc-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}

/* 底部四卡 */
.km-row-bottom {
  grid-template-columns: 1fr 1fr 1fr 1fr;
  flex: 1.7 1 0;
  height: auto;
  min-height: 0;
}
.km-row-bottom > .km-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.km-row-bottom .list { max-height: none; flex: 1 1 auto; min-height: 140px; overflow: auto; }
.km-row-bottom #optimize-mount,
.km-row-bottom #enabler-mount {
  flex: 0 1 auto;
  max-height: 38%;
  overflow: auto;
}

.km-card {
  background: var(--km-panel); border: 1px solid var(--km-line);
  border-radius: var(--km-radius); padding: 14px 16px;
  backdrop-filter: blur(14px); min-height: 0; overflow: hidden;
  box-shadow: var(--km-shadow-card);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
  position: relative;
}
.km-card::before {
  content: "";
  position: absolute; left: 16px; right: 16px; top: 0; height: 1px;
  background: var(--km-accent-bar);
  opacity: .7; pointer-events: none;
}
/* ?????KPI ????/ ???? / ???? */
.km-card--soft,
.km-row-kpi > .km-card {
  background: var(--km-panel-soft);
  box-shadow: var(--km-shadow-soft);
  border-color: rgba(242, 153, 102, 0.22);
}
.km-card--deep,
.km-row-bottom > .km-card {
  background: var(--km-panel-deep);
  box-shadow: var(--km-shadow-deep);
}
.km-card:hover {
  border-color: var(--km-line-strong);
  box-shadow: var(--km-shadow-card), 0 0 0 1px rgba(242, 153, 102, 0.08);
}
.km-row-kpi > .km-card:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 153, 102, 0.45);
  box-shadow: var(--km-shadow-soft), 0 0 28px rgba(242, 153, 102, 0.12);
}
.km-card h2 {
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--km-muted); text-transform: uppercase; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.km-card h2 a { color: var(--km-brand); text-decoration: none; font-size: 12px; text-transform: none; letter-spacing: 0; }

/* ???????????? / ???? / ????AI */
.km-row-mid > .km-card > h2,
.km-row-mid .evt-pair > .km-card > h2,
.km-row-mid .fluoro-panel-head h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--km-brand);
  text-transform: none;
  margin-bottom: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 4px 0;
}
.km-row-mid > .km-card.cc-task-panel > h2 {
  justify-content: space-between;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}
.km-row-mid > .km-card.cc-task-panel > h2 .cc-task-filters {
  margin-left: auto;
  justify-content: flex-end;
}

/* mid row title extras */
.km-row-bottom > .km-card > h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--km-brand);
  text-transform: none;
  margin-bottom: 10px;
}

/* ????????????????? */
.km-row-mid > .km-card > h2,
.km-row-mid .evt-pair > .km-card > h2,
.km-row-bottom > .km-card > h2,
.km-row-mid .fluoro-panel-head {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--km-line-strong);
  margin-bottom: 12px;
}
.km-row-mid .fluoro-panel-head h2 {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.kpi-value { font-size: 30px; font-weight: 700; color: var(--km-brand); text-shadow: 0 0 18px rgba(242, 153, 102, 0.35); }
.kpi-label { font-size: 12px; color: var(--km-muted); margin-top: 4px; }
.kpi-sub { font-size: 11px; color: var(--km-muted); margin-top: 8px; }

/* KPI ??????????+????/ ????*/
.km-card-kpi {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}
.kpi-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.kpi-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--km-text);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.kpi-count {
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  color: var(--km-brand);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  text-shadow: 0 0 22px rgba(242, 153, 102, 0.4);
}
.kpi-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.2;
  color: var(--km-muted);
}
.kpi-meta > span {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
  padding: 0 8px;
  border-left: 1px solid var(--km-line);
}
.kpi-meta > span:first-child {
  padding-left: 0;
  border-left: none;
}
.kpi-meta b {
  font-size: 12px;
  font-weight: 700;
  color: var(--km-text);
  font-variant-numeric: tabular-nums;
}
.kpi-meta .is-accent b { color: var(--km-brand); }
.kpi-meta .is-warn b { color: var(--km-warn); }
.kpi-meta .is-danger b { color: var(--km-danger); }
.kpi-meta .is-text { gap: 0; }

.island { display: flex; flex-direction: column; height: 100%; }
.island-hint { font-size: 11px; color: var(--km-muted); font-weight: 400; margin-left: 6px; }
.island-headline {
  margin: 2px 0 12px; font-size: 15px; font-weight: 600; line-height: 1.35;
  color: var(--km-text, #e8f0f4);
}
.island-panel {
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}
.island-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}
.island-panel-head h2 {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  border-bottom: none !important;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--km-brand);
  text-transform: none;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 4px 0;
}
.island-panel-head h2 .island-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--km-muted);
  margin-left: 8px;
}
.island-legend {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.island-leg {
  font-size: 12px;
  color: var(--km-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.island-leg::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 1px solid var(--km-line);
}
.island-leg.is-idle::before { background: rgba(242, 153, 102, .45); border-color: rgba(242, 153, 102, .5); }
.island-leg.is-working::before { background: var(--km-info); border-color: var(--km-info); }
.island-leg.is-alert::before { background: var(--km-danger); border-color: var(--km-danger); }
.island-leg.is-soon::before { background: transparent; border-style: dashed; }

.island-body { flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.island-pulse { display: flex; flex-direction: column; gap: 8px; }
.pulse-card {
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--km-line);
  background: var(--km-panel-2); cursor: pointer; transition: border-color .2s, transform .2s;
}
.pulse-card:hover { transform: translateY(-2px); border-color: rgba(242, 153, 102,.4); }
.pulse-card.is-hot { border-color: rgba(232,165,75,.45); background: rgba(232,165,75,.06); }
.pulse-card.is-alert { border-color: rgba(226,107,107,.45); background: rgba(226,107,107,.07); }
.pulse-card.is-working { border-color: rgba(94,176,229,.4); background: rgba(94,176,229,.07); }
.pulse-top { display: flex; align-items: center; gap: 8px; }
.pulse-orb {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 10px; font-weight: 700;
  border: 1.5px solid var(--km-line); background: var(--km-surface-solid); color: var(--km-muted);
}
.pulse-card.is-working .pulse-orb {
  border-color: var(--km-info); color: #dff3ff; background: rgba(94,176,229,.12);
  animation: breath 2.4s ease-in-out infinite;
}
.pulse-card.is-alert .pulse-orb {
  border-color: var(--km-danger); color: #ffe0e0; background: rgba(226,107,107,.12);
  animation: blink 1s ease-in-out infinite;
}
.pulse-card.is-idle .pulse-orb { animation: breath 3.2s ease-in-out infinite; }
.pulse-name { font-size: 13px; font-weight: 600; }
.pulse-status {
  margin-left: auto; font-size: 10px; padding: 2px 8px; border-radius: 999px;
  background: rgba(255,255,255,.06); color: var(--km-muted);
}
.pulse-card.is-working .pulse-status { background: rgba(94,176,229,.15); color: var(--km-info); }
.pulse-card.is-alert .pulse-status { background: rgba(226,107,107,.15); color: var(--km-danger); }
.pulse-card.is-idle .pulse-status { background: rgba(242, 153, 102,.12); color: var(--km-brand); }
.pulse-detail { margin-top: 8px; font-size: 13px; line-height: 1.4; }
.pulse-action { margin-top: 6px; font-size: 11px; color: var(--km-brand); }
.island-roadmap {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px;
  padding-top: 4px; border-top: 1px dashed var(--km-line);
}
.roadmap-chip {
  font-size: 11px; color: var(--km-muted); padding: 4px 10px; border-radius: 999px;
  border: 1px dashed var(--km-line); background: rgba(255,255,255,.03);
}
.roadmap-sub { font-size: 11px; color: var(--km-muted); opacity: .85; }

/* ???????? */
.island-track {
  flex: 1; display: flex; align-items: flex-start; justify-content: space-between;
  gap: 6px; position: relative; padding: 6px 4px 2px;
}
.island-track::before {
  content: ""; position: absolute; left: 3%; right: 3%; top: 30px;
  height: 2px; background: linear-gradient(90deg, transparent, rgba(242, 153, 102,.35), transparent);
  pointer-events: none;
}
.agent-node {
  position: relative; z-index: 1; flex: 1 1 0; min-width: 0; max-width: 220px;
  text-align: center; cursor: pointer; transition: transform .2s ease;
  background: transparent; border: none; color: inherit; font: inherit; padding: 0 2px;
}
.agent-node:hover { transform: translateY(-3px); }
.agent-orb {
  width: 46px; height: 46px; margin: 0 auto 6px; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px; font-weight: 700;
  border: 2px solid var(--km-line); background: var(--km-surface-solid); color: var(--km-muted);
}
.agent-node.is-idle .agent-orb { animation: breath 2.8s ease-in-out infinite; }
.agent-node.is-working .agent-orb {
  border-color: var(--km-info); color: #dff3ff; background: rgba(94,176,229,.12);
  box-shadow: 0 0 0 5px rgba(94,176,229,.12);
}
.agent-node.is-alert .agent-orb {
  border-color: var(--km-danger); color: #ffe0e0; background: rgba(226,107,107,.12);
  animation: blink 1s ease-in-out infinite;
}
.agent-node.is-soon .agent-orb { border-style: dashed; opacity: .75; }
.agent-name {
  display: block; font-size: 13px; font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.agent-detail {
  display: block; font-size: 12px; color: var(--km-muted); margin-top: 4px; line-height: 1.35;
  min-height: 32px; max-height: 32px; overflow: hidden;
}
.agent-tag {
  display: inline-block; margin-top: 4px; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: rgba(242, 153, 102,.12); color: var(--km-brand);
}
.agent-node.is-soon .agent-tag { background: rgba(255,255,255,.06); color: var(--km-muted); }
.agent-node.is-working .agent-tag { background: rgba(94,176,229,.15); color: var(--km-info); }
.agent-node.is-alert .agent-tag { background: rgba(226,107,107,.15); color: var(--km-danger); }

.km-coach-entry {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--km-line); background: var(--km-panel-2);
  color: var(--km-text); text-decoration: none; font-size: 12px; font-weight: 500;
  transition: border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.km-coach-entry:hover {
  border-color: var(--km-brand); color: var(--km-brand); transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(232, 160, 122, 0.22);
}
.km-util-link {
  color: var(--km-muted); text-decoration: none; font-size: 12px;
  padding: 8px 10px; border-radius: 8px; border: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.km-util-link:hover {
  color: var(--km-text); border-color: var(--km-line); background: var(--km-panel-2);
}
.km-coach-badge {
  font-size: 10px; padding: 1px 6px; border-radius: 999px;
  background: rgba(226,107,107,.18); color: var(--km-danger);
  border: 1px solid rgba(226,107,107,.32); font-weight: 600;
}
.km-coach-badge[hidden] { display: none !important; }

.agent-mount {
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--km-line);
  flex-shrink: 0;
}
.agent-mount[hidden] { display: none !important; }
.agent-mount-head {
  font-size: 11px; color: var(--km-muted); margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px; letter-spacing: 0.04em;
}
.agent-mount-item { cursor: default; }
.agent-mount-item:hover { transform: none; box-shadow: none; }
#problems .list-item[data-problem-idx] {
  cursor: pointer;
}
#problems .list-item[data-problem-idx]::after {
  content: "查看证据";
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--km-muted);
}

@keyframes breath { 0%,100% { box-shadow: 0 0 0 0 rgba(242, 153, 102,.15);} 50% { box-shadow: 0 0 0 8px rgba(242, 153, 102,.05);} }
@keyframes blink { 0%,100% { opacity: 1;} 50% { opacity: .55;} }

.list { display: flex; flex-direction: column; gap: 8px; overflow: auto; max-height: calc(100% - 28px); }
.list .list-item.is-clickable { cursor: pointer; }
.list .list-item.is-clickable:hover { border-color: rgba(242, 153, 102, 0.35); }

/* ????????/ ?? ?????????????????? */
.intel-card { display: flex; flex-direction: column; min-height: 0; }
.intel-card > h2 { margin-bottom: 8px; }
.intel-head-actions {
  display: inline-flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.intel-tabs {
  display: inline-flex; align-items: center; gap: 10px;
}
.intel-card h2 .intel-tab {
  color: var(--km-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}
.intel-card h2 .intel-tab:hover { color: var(--km-text); }
.intel-card h2 .intel-tab.is-active {
  color: var(--km-brand);
  font-weight: 600;
}
.intel-meta {
  font-size: 11px; color: var(--km-muted); margin-bottom: 6px; line-height: 1.35; flex-shrink: 0;
}
.intel-meta[hidden] { display: none !important; }
.intel-card .list { max-height: none; flex: 1; min-height: 0; }
.list-item {
  padding: 10px 12px; border-radius: 10px; background: var(--km-panel-2);
  border: 1px solid transparent; cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.list-item:hover {
  border-color: rgba(242, 153, 102, 0.28);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  background: rgba(242, 153, 102, 0.06);
}
.list-item .t {
  font-size: 13px;
  font-weight: 500;
  color: var(--km-text-secondary);
  line-height: 1.35;
}
.list-item .t .badge { margin-left: 8px; vertical-align: middle; }
.list-item .d {
  font-size: 12px;
  color: var(--km-muted-deep);
  margin-top: 5px;
  line-height: 1.45;
}
.badge {
  display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 999px;
  background: rgba(255,255,255,.08); color: var(--km-muted);
  border: 1px solid transparent;
}
.badge.ok { background: rgba(242, 153, 102,.18); color: var(--km-brand); border-color: rgba(242, 153, 102,.28); }
.badge.warn { background: rgba(232,165,75,.18); color: var(--km-warn); border-color: rgba(232,165,75,.3); }
.badge.danger { background: rgba(226,107,107,.18); color: var(--km-danger); border-color: rgba(226,107,107,.32); }
.badge.soon { background: rgba(255,255,255,.06); color: var(--km-muted); }

.table-wrap { overflow: auto; height: calc(100% - 28px); }
table.km-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.km-table th, .km-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--km-line); vertical-align: top; }
.km-table th {
  color: var(--km-muted); font-weight: 600; position: sticky; top: 0; z-index: 1;
  background: var(--km-surface-solid);
  letter-spacing: 0.04em; font-size: 11px; text-transform: uppercase;
  border-bottom: 1px solid var(--km-line-strong);
}
html[data-theme="light"] .km-table th {
  color: #6B5346;
  background: linear-gradient(180deg, #FFF9F4 0%, #F3E4D6 100%);
  border-bottom-color: rgba(242, 153, 102, 0.28);
}
html:not([data-theme="light"]) .km-table th {
  color: var(--km-text-secondary);
  background: linear-gradient(180deg, #1E1915 0%, #181410 100%);
  border-bottom-color: rgba(232, 160, 122, 0.22);
}
.km-table tbody tr { transition: background .15s ease; }
.km-table tbody tr:hover td { background: rgba(242, 153, 102, 0.07); }
.km-table a { color: var(--km-brand); text-decoration: none; }

.drill-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.drill-card {
  display: block; text-decoration: none; color: inherit;
  padding: 18px; border-radius: var(--km-radius); border: 1px solid var(--km-line);
  background: linear-gradient(160deg, rgba(232, 160, 122,.12), transparent 55%),
              linear-gradient(180deg, rgba(38, 32, 28, 0.94) 0%, rgba(22, 18, 16, 0.96) 100%);
  transition: transform .2s ease, border-color .2s, box-shadow .2s;
}
.drill-card:hover {
  transform: translateY(-3px);
  border-color: rgba(232, 160, 122,.45);
  box-shadow: 0 12px 28px rgba(0,0,0,.35), 0 0 20px rgba(232, 160, 122,.12);
}
.drill-card h3 { font-size: 18px; margin-bottom: 8px; }
.drill-card p { color: var(--km-muted); font-size: 13px; line-height: 1.5; }

.km-drawer-mask {
  position: fixed; inset: 0; background: var(--km-overlay); z-index: 40;
  opacity: 0; pointer-events: none; transition: .2s;
}
.km-drawer-mask.open { opacity: 1; pointer-events: auto; }
.km-drawer {
  position: fixed; top: 0; right: 0; width: min(960px, 52vw); height: 100vh;
  background: var(--km-drawer-bg); border-left: 1px solid var(--km-line); z-index: 50;
  transform: translateX(100%); transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.km-drawer.open { transform: translateX(0); }
.km-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--km-line);
}
.km-tabs { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--km-line); flex-wrap: wrap; }
.km-tab {
  border: 1px solid var(--km-line); background: transparent; color: var(--km-muted);
  padding: 7px 12px; border-radius: 999px; cursor: pointer; font-size: 12px;
}
.km-tab.active { background: var(--km-brand); color: var(--km-brand-ink); border-color: transparent; font-weight: 600; }
html[data-theme="light"] .km-tab.active,
html[data-theme="light"] .btn:not(.ghost) { color: #fff; }
.km-drawer-body { flex: 1; overflow: auto; padding: 16px 18px; }
.km-drawer iframe { width: 100%; height: calc(100vh - 160px); border: 0; border-radius: 12px; background: #fff; }
.km-pane { display: none; }
.km-pane.active { display: block; }
.km-pane.active.is-flex {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 12px;
}

.page-title { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.page-lead { color: var(--km-muted); font-size: 13px; margin-bottom: 16px; }
.placeholder-banner {
  border: 1px dashed rgba(232,165,75,.45); background: var(--km-placeholder-bg);
  color: var(--km-placeholder-text); padding: 10px 12px; border-radius: 10px; font-size: 12px; margin-bottom: 14px;
}
.split-2 { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; min-height: 0; flex: 1; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; border-radius: 10px; padding: 9px 14px; cursor: pointer;
  background: var(--km-brand); color: var(--km-brand-ink); font-weight: 600; text-decoration: none; font-size: 13px;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px var(--km-brand-glow); }
.btn.ghost { background: transparent; border: 1px solid var(--km-line); color: var(--km-text); box-shadow: none; }
.btn.ghost:hover { border-color: var(--km-brand); color: var(--km-brand); box-shadow: none; }
#btn-reset-demo {
  border-color: rgba(226, 107, 107, 0.45);
  color: var(--km-danger);
  font-size: 12px;
  padding: 4px 10px;
}
#btn-reset-demo:hover {
  background: rgba(226, 107, 107, 0.12);
  color: var(--km-danger);
  border-color: var(--km-danger);
}
.form-grid { display: grid; gap: 10px; max-width: 520px; }
.form-grid label { font-size: 12px; color: var(--km-muted); display: grid; gap: 6px; }
.form-grid input, .form-grid select, .form-grid textarea {
  background: var(--km-surface-solid); border: 1px solid var(--km-line); color: var(--km-text);
  border-radius: 8px; padding: 9px 10px; font: inherit;
}

/* 表单字段旁带圈问号 + 点击说明 */
.field-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-sizing: border-box;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  vertical-align: -1px;
  cursor: pointer;
  opacity: 0.72;
  color: var(--km-muted);
  user-select: none;
}
.field-help:hover,
.field-help.is-open,
.field-help:focus-visible {
  opacity: 1;
  color: var(--km-text);
  outline: none;
}
.field-help-bubble {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 50;
  width: max-content;
  max-width: min(320px, calc(100vw - 48px));
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--km-line);
  background: var(--km-surface-solid);
  color: var(--km-text);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}
.field-help-bubble::before {
  content: "";
  position: absolute;
  left: 4px;
  bottom: 100%;
  border: 6px solid transparent;
  border-bottom-color: var(--km-line);
}
.field-help-bubble::after {
  content: "";
  position: absolute;
  left: 5px;
  bottom: 100%;
  border: 5px solid transparent;
  border-bottom-color: var(--km-surface-solid);
}
.field-help.is-open .field-help-bubble {
  display: block;
}

.km-pane[data-pane="system"] > .km-card {
  overflow: visible;
}

/* 系统基础：左侧分类 + 右侧可滚动内容 */
.system-workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
}
.system-workspace--drawer {
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: min(72vh, 680px);
}
.system-rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 12px;
}
.system-rail-head {
  flex-shrink: 0;
  margin-bottom: 10px;
}
.system-rail-head h2 {
  margin: 0;
  font-size: 14px;
}
.system-rail-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.system-nav-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--km-line);
  border-radius: 10px;
  background: transparent;
  color: var(--km-muted);
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.system-nav-item:hover {
  color: var(--km-text);
  border-color: var(--km-brand);
}
.system-nav-item.active {
  color: var(--km-text);
  border-color: var(--km-brand);
  background: var(--km-panel-2);
  font-weight: 600;
}
.system-workspace--drawer .system-nav-item {
  padding: 8px 10px;
  font-size: 12px;
}
.system-detail {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.system-settings-form {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.system-detail-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 18px 12px;
}
.system-panel {
  display: none;
  flex-direction: column;
  gap: 14px;
}
.system-panel.active {
  display: flex;
}
.settings-section-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.settings-section-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--km-text);
  letter-spacing: 0.02em;
}
.settings-section-desc {
  margin: 0;
  font-size: 12px;
  color: var(--km-muted);
  line-height: 1.4;
}
.system-panel .form-grid {
  max-width: none;
}
.system-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px 24px;
  align-items: start;
}
.system-split-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--km-line);
  border-radius: 12px;
  background: var(--km-panel-2);
}
.system-split-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--km-text);
}
.settings-section-actions {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed var(--km-line);
  max-width: none;
}
@media (max-width: 1100px) {
  .system-split {
    grid-template-columns: 1fr;
  }
}
.system-workspace--drawer .system-split {
  grid-template-columns: 1fr;
}
.settings-action-label {
  margin: 0;
  font-size: 12px;
  color: var(--km-muted);
}
.system-settings-save {
  flex-shrink: 0;
  margin: 0;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--km-line);
  background: var(--km-surface-solid, var(--km-panel));
}

.backup-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.backup-panel-actions {
  margin: 0;
}
.backup-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.backup-empty {
  font-size: 12px;
  color: var(--km-muted);
  padding: 8px 0;
}
.token-usage-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.token-range-label {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--km-brand);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.token-usage-table-wrap {
  height: auto;
  max-height: none;
  border: 1px solid var(--km-line);
  border-radius: 12px;
  overflow: auto;
  background: var(--km-panel-2);
}
.token-usage-table {
  margin: 0;
}
.token-usage-table tfoot th {
  font-weight: 600;
  border-top: 1px solid var(--km-line);
  border-bottom: none;
  background: transparent;
  color: var(--km-text);
  padding: 10px 8px;
}
.token-price-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--km-line);
  border-radius: 12px;
  background: var(--km-panel-2);
}
.token-price-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 520px;
}
.token-price-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.token-cost-line {
  margin: 0;
  font-size: 13px;
  color: var(--km-muted);
}
.token-cost-line strong {
  color: var(--km-text);
  font-size: 16px;
  font-weight: 600;
  margin-left: 4px;
}
@media (max-width: 700px) {
  .token-price-grid {
    grid-template-columns: 1fr;
  }
}
.llm-call-log-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.llm-log-toolbar {
  justify-content: flex-end;
}
.llm-call-log-table-wrap {
  max-height: min(62vh, 560px);
}
.llm-call-log-table .llm-log-error {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--km-muted);
}
.llm-log-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
}
.llm-log-ok {
  color: #1a7f4b;
}
.llm-log-fail {
  color: #b42318;
}
.llm-log-mock {
  color: var(--km-muted);
}
.backup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--km-line);
  border-radius: 10px;
  background: var(--km-panel-2);
}
.backup-item-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.backup-item-name {
  font-size: 12px;
  color: var(--km-text);
  word-break: break-all;
}
.backup-item-meta {
  font-size: 11px;
  color: var(--km-muted);
}
.backup-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.backup-item-actions .btn {
  padding: 5px 10px;
  font-size: 12px;
}

/* ???????? / ????????? */
.profile-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.9fr);
  gap: 12px;
  align-items: stretch;
}
.profile-form-card,
.profile-preview-card,
.profile-rooms-card {
  padding: 16px;
  min-height: 0;
}
.profile-form-card {
  display: flex;
  flex-direction: column;
  overflow: auto;
}
.profile-side {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1.4fr) minmax(200px, 0.9fr);
  gap: 12px;
}
.profile-preview-card,
.profile-rooms-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.profile-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.profile-card-head h2 {
  margin: 0 0 4px;
  font-size: 16px;
}
.profile-lead {
  margin: 0;
  font-size: 12px;
  max-width: none;
}
.profile-fill-meta {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--km-muted);
  font-variant-numeric: tabular-nums;
}
.profile-form {
  max-width: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
.profile-form-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  align-content: start;
}
.profile-form-fields label:has(textarea) {
  grid-column: 1 / -1;
}
.profile-hint {
  font-size: 11px;
  color: var(--km-muted);
  font-weight: 400;
  margin-left: 6px;
}
.profile-rooms-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.profile-rooms-head h3 {
  margin: 0;
  font-size: 14px;
}
.profile-preview-badge {
  font-size: 11px;
  color: var(--km-brand);
  border: 1px solid rgba(232, 160, 122, 0.35);
  border-radius: 999px;
  padding: 2px 8px;
}
.profile-preview-body {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border-radius: 8px;
  border: 1px solid var(--km-line);
  background: var(--km-surface-solid);
  color: var(--km-text);
  font-family: "Noto Sans SC", sans-serif;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.profile-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 4px;
  flex-shrink: 0;
}
.profile-save-status {
  font-size: 12px;
  color: var(--km-muted);
}
.profile-room-count {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--km-text);
  font-variant-numeric: tabular-nums;
}
.profile-room-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.profile-room-list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--km-surface-solid);
  border: 1px solid var(--km-line);
}
.profile-room-list li code {
  font-size: 12px;
}
.profile-room-meta {
  font-size: 11px;
  color: var(--km-muted);
}
.profile-room-empty {
  font-size: 12px;
  color: var(--km-muted);
  border: 0;
  background: transparent;
  padding: 0;
}

.canvas-placeholder {
  height: 420px; border: 1px dashed var(--km-line); border-radius: 12px;
  display: grid; place-items: center; color: var(--km-muted); text-align: center; padding: 24px; background:
    repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(255,255,255,.03) 20px),
    repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(255,255,255,.03) 20px);
}

/* ???? ? ???? */
.config-page {
  flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px;
}
.config-head {
  flex-shrink: 0; display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.config-head .page-title { font-size: 20px; margin-bottom: 2px; }
.config-head .page-lead { margin-bottom: 0; font-size: 12px; }
.config-tabs { padding: 0; border: 0; margin: 0; }
.config-page > .km-pane.active.is-flex { flex: 1; min-height: 0; }

/* ???? ? ??????? */
.wf-workspace {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 12px;
}
.wf-rail {
  display: flex; flex-direction: column; min-height: 0; padding: 12px;
}
.wf-rail-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 10px; flex-shrink: 0;
}
.wf-rail-head h2 { margin-bottom: 0; }
.wf-coach-btn { padding: 5px 10px; font-size: 12px; }
.wf-rail-list {
  flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 6px;
}
.wf-rail-empty {
  color: var(--km-muted); font-size: 12px; line-height: 1.5; padding: 16px 8px; text-align: center;
}
button.wf-row {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--km-line); border-radius: 10px;
  background: var(--km-panel-2); color: inherit; padding: 10px 12px;
  font: inherit; transition: border-color .15s, background .15s;
}
button.wf-row:hover { border-color: rgba(242, 153, 102,.35); }
button.wf-row.is-selected {
  border-color: rgba(242, 153, 102,.55);
  background: rgba(242, 153, 102,.12);
  box-shadow: inset 3px 0 0 var(--km-brand);
}
.wf-row-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.wf-row-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; font-size: 11px; color: var(--km-muted);
}
.wf-detail {
  display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden;
}
.wf-detail-empty {
  flex: 1; display: grid; place-items: center; color: var(--km-muted);
  font-size: 13px; padding: 24px; text-align: center;
}
.wf-detail-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.wf-detail-empty[hidden],
.wf-detail-body[hidden] {
  display: none !important;
}
.wf-detail-head {
  flex-shrink: 0; display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--km-line);
}
.wf-detail-head-main { min-width: 0; }
.wf-detail-title { font-size: 18px; font-weight: 700; line-height: 1.3; }
.wf-detail-sub {
  margin-top: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 11px; color: var(--km-muted);
}
.wf-detail-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.wf-detail-actions .btn { padding: 6px 10px; font-size: 12px; }
.wf-view-tabs { display: flex; gap: 4px; }
.wf-view-tab {
  border: 1px solid var(--km-line); background: transparent; color: var(--km-muted);
  padding: 4px 10px; border-radius: 999px; cursor: pointer; font-size: 11px;
}
.wf-view-tab.active { background: rgba(242, 153, 102,.15); color: var(--km-brand); border-color: rgba(242, 153, 102,.35); }
.wf-detail-dual {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr); gap: 0;
}
.wf-readable-pane {
  min-height: 0; overflow: auto; padding: 12px 14px 16px;
  border-right: 1px solid var(--km-line);
}
.wf-raw-pane {
  min-height: 0; display: flex; flex-direction: column; overflow: hidden;
  background: rgba(0,0,0,.22);
}
.wf-raw-head {
  flex-shrink: 0; display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--km-line);
}
.wf-raw-title {
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--km-muted);
}
.wf-raw-path { margin-top: 4px; font-size: 11px; color: var(--km-muted); }
.wf-raw-pre {
  flex: 1; min-height: 0; overflow: auto; margin: 0; padding: 12px 14px 16px;
  border: 0; border-radius: 0; background: transparent;
}
.wf-overview {
  margin-bottom: 14px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid rgba(242, 153, 102,.22); background: rgba(242, 153, 102,.07);
}
.wf-overview-label {
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--km-brand); margin-bottom: 6px;
}
.wf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.wf-chip {
  font-size: 11px; color: var(--km-text); padding: 3px 8px; border-radius: 999px;
  background: rgba(0,0,0,.22); border: 1px solid var(--km-line);
}
.wf-chip em { font-style: normal; color: var(--km-muted); margin-right: 6px; }
.wf-rules {
  margin-top: 4px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--km-line); background: rgba(0,0,0,.16);
}
.wf-section { margin-bottom: 12px; }
.wf-section:last-child { margin-bottom: 0; }
.wf-section h4 {
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--km-muted); margin-bottom: 6px;
}
.wf-text { font-size: 13px; line-height: 1.5; color: var(--km-text); }
.wf-muted { font-size: 12px; color: var(--km-muted); }
.wf-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wf-step {
  border: 1px solid var(--km-line); border-radius: 10px; padding: 10px 12px;
  background: var(--km-panel-2);
}
.wf-step-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.wf-step-idx {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: rgba(242, 153, 102,.15); color: var(--km-brand);
}
.wf-step-title { font-size: 13px; font-weight: 600; }
.wf-tool {
  font-size: 10px; padding: 1px 6px; border-radius: 4px;
  background: rgba(94,176,229,.12); color: var(--km-info);
}
.wf-flags { display: inline-flex; gap: 4px; margin-left: auto; }
.wf-flag {
  font-size: 10px; padding: 1px 6px; border-radius: 999px;
  background: rgba(255,255,255,.06); color: var(--km-muted);
}
.wf-step-action { margin-top: 6px; font-size: 12px; color: var(--km-muted); line-height: 1.45; }
.wf-bullets { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; color: var(--km-text); }
.wf-pre {
  margin: 0; white-space: pre-wrap; word-break: break-word;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 14px; line-height: 1.55; color: var(--km-text-secondary);
}

@media (max-width: 1100px) {
  .wf-workspace { grid-template-columns: 220px minmax(0, 1fr); }
  .wf-detail-dual { grid-template-columns: 1fr; }
  .wf-readable-pane { border-right: 0; border-bottom: 1px solid var(--km-line); max-height: 45%; }
}

/* ???? ? ???????????????? */
.agent-detail-pulse {
  margin: 8px 0 0; font-size: 12px; line-height: 1.45; color: var(--km-muted);
}
.agent-detail-main {
  flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden;
}
.agent-files-bar {
  flex-shrink: 0; padding: 10px 12px; border-bottom: 1px solid var(--km-line);
  display: flex; flex-direction: column; gap: 8px;
  background: rgba(0,0,0,.12);
}
.agent-file-tabs {
  display: flex; flex-wrap: wrap; gap: 6px; max-height: 88px; overflow: auto;
}
.agent-file-tab {
  border: 1px solid var(--km-line); background: transparent; color: var(--km-muted);
  padding: 4px 10px; border-radius: 999px; cursor: pointer; font-size: 11px;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.agent-file-tab:hover { border-color: rgba(242, 153, 102,.35); color: var(--km-text); }
.agent-file-tab.active {
  background: rgba(242, 153, 102,.15); color: var(--km-brand); border-color: rgba(242, 153, 102,.35);
}
.agent-file-pane { flex: 1; min-height: 0; }
.agent-files-empty {
  flex: 1; display: grid; place-items: center; color: var(--km-muted);
  font-size: 13px; padding: 24px; text-align: center;
}
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; flex: 1; min-height: 0; }
.week-day {
  background: var(--km-panel); border: 1px solid var(--km-line); border-radius: 12px; padding: 10px;
  display: flex; flex-direction: column; gap: 8px; overflow: auto;
}
.week-day h3 { font-size: 13px; color: var(--km-muted); }
.week-chip { background: var(--km-panel-2); border-radius: 8px; padding: 8px; font-size: 12px; line-height: 1.35; }
.week-chip.soon { opacity: .65; border: 1px dashed var(--km-line); }

.modal-mask { position: fixed; inset: 0; background: var(--km-overlay); z-index: 60; display: none; place-items: center; }
.modal-mask.open { display: grid; }
.km-job-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  background: rgba(20, 18, 16, 0.45);
  padding: 24px;
}
.km-job-overlay.is-open { display: grid; }
.km-job-card {
  width: min(420px, 100%);
  border-radius: 16px;
  border: 1px solid var(--km-line);
  background: var(--km-panel, #fff);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  padding: 22px 22px 18px;
}
.km-job-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}
.km-job-step {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 8px;
}
.km-job-elapsed {
  font-size: 13px;
  color: var(--km-brand);
  font-weight: 600;
  margin-bottom: 14px;
}
.km-job-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin-bottom: 12px;
}
.km-job-bar > span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(242, 153, 102, 0.55), var(--km-brand));
  transition: width .35s ease;
}
.km-job-hint {
  font-size: 12px;
  color: var(--km-muted);
  line-height: 1.45;
}
.modal {
  width: min(720px, 90vw); max-height: 80vh; overflow: auto;
  background: var(--km-surface-solid); border: 1px solid var(--km-line); border-radius: 14px; padding: 18px;
  box-shadow: var(--km-shadow-deep);
}
.modal h3 { margin-bottom: 10px; }
.modal pre { white-space: pre-wrap; font-size: 12px; color: var(--km-muted); line-height: 1.45; }

/* ?????????????*/
.island-hint { font-size: 11px; color: var(--km-muted); font-weight: 400; margin-left: 6px; }
.fluoro-title-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--km-muted);
  letter-spacing: 0.02em;
  margin-left: 6px;
  text-transform: none;
}
.km-row-mid > .km-card > h2 .island-hint,
.km-row-mid .evt-pair > .km-card > h2 .island-hint,
.km-row-bottom > .km-card > h2 .island-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--km-muted);
  margin-left: 8px;
}
.km-table tr.trace-row { cursor: pointer; }
.km-table tr.trace-row:hover td { background: rgba(242, 153, 102,.06); }
.km-table tr.trace-row.is-selected td { background: rgba(242, 153, 102,.12); }
#recent-traces td {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  vertical-align: middle;
}
#recent-traces .trace-event {
  font-size: 12px; font-weight: 400; color: var(--km-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 14em;
}
.status-text {
  font-size: 12px;
  font-weight: 500;
  background: none;
  padding: 0;
  border-radius: 0;
}
.status-text.ok { color: var(--km-brand); }
.status-text.warn { color: var(--km-warn); }
.status-text.danger { color: var(--km-danger); }
.status-text.soon { color: var(--km-muted); }

.fluoro-panel { display: flex; flex-direction: column; min-height: 0; padding: 12px 14px; }
.fluoro-panel-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  margin-bottom: 8px; flex-shrink: 0;
}
.fluoro-panel-head h2 { margin-bottom: 0 !important; padding-bottom: 0 !important; border-bottom: none !important; }
.fluoro-panel-body { flex: 1; min-height: 0; overflow: auto; }
.fluoro-empty {
  list-style: none; font-size: 12px; color: var(--km-muted); padding: 8px 0;
}
.fluoro-panel-foot {
  flex-shrink: 0; padding-top: 6px; margin-top: 6px; border-top: 1px solid var(--km-line);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.fluoro-panel-foot a { font-size: 11px; color: var(--km-brand); text-decoration: none; white-space: nowrap; }
.fluoro-panel-foot a:hover { text-decoration: underline; }

.fluoro-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.fluoro-timeline::before {
  content: ""; position: absolute; left: 14px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, rgba(232, 160, 122,.45), rgba(255,255,255,.06));
}
html[data-theme="light"] .fluoro-timeline::before {
  background: linear-gradient(180deg, rgba(242, 153, 102,.4), rgba(120, 72, 48,.08));
}
.fluoro-stage {
  position: relative; padding: 0 0 8px 42px; cursor: pointer;
}
.fluoro-stage:last-child { padding-bottom: 0; }
.fluoro-dot {
  position: absolute; left: 0; top: 4px; width: 30px; height: 22px; border-radius: 5px;
  border: 1.5px solid var(--km-line); background: var(--km-surface-solid); display: grid; place-items: center;
  font-size: 10px; font-weight: 700; line-height: 1; color: var(--km-muted); z-index: 1;
  letter-spacing: -0.04em;
}
.fluoro-stage.is-done .fluoro-dot {
  border-color: var(--km-brand); color: var(--km-brand);
  background: rgba(232, 160, 122, 0.12);
}
.fluoro-stage.is-active .fluoro-dot {
  border-color: #6B9FD4; color: #E8F4FF; background: rgba(107, 159, 212, 0.22);
  box-shadow: 0 0 0 3px rgba(107, 159, 212, 0.2); animation: breath 2s ease-in-out infinite;
}
.fluoro-stage.is-waiting .fluoro-dot {
  border-color: #E8B04A; color: #2A1E08; background: linear-gradient(145deg, #F5D078, #E0A84A);
  box-shadow: 0 0 0 3px rgba(232, 176, 74, 0.28), 0 0 14px rgba(232, 176, 74, 0.35);
  animation: fluoro-pulse-warn 1.2s ease-in-out infinite;
}
.fluoro-stage.is-unclaimed .fluoro-dot,
.fluoro-stage.is-error .fluoro-dot {
  border-color: #E05A5A; color: #fff; background: linear-gradient(145deg, #E87878, #C94A4A);
  box-shadow: 0 0 0 3px rgba(224, 90, 90, 0.28), 0 0 16px rgba(224, 90, 90, 0.4);
  animation: fluoro-pulse-danger 1s ease-in-out infinite;
}
html[data-theme="light"] .fluoro-stage.is-waiting .fluoro-dot {
  color: #5A3A08;
}
.fluoro-stage-card {
  border: 1px solid var(--km-line); border-radius: 8px; padding: 6px 10px;
  background: var(--km-panel-2); transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  border-left: 3px solid transparent;
}
.fluoro-stage:hover .fluoro-stage-card { border-color: rgba(232, 160, 122,.28); }
.fluoro-stage.is-waiting .fluoro-stage-card {
  border-color: rgba(232, 176, 74, 0.55);
  border-left-color: #E8B04A;
  background: rgba(232, 176, 74, 0.14);
  box-shadow: inset 0 0 0 1px rgba(232, 176, 74, 0.12);
}
.fluoro-stage.is-unclaimed .fluoro-stage-card,
.fluoro-stage.is-error .fluoro-stage-card {
  border-color: rgba(224, 90, 90, 0.55);
  border-left-color: #E05A5A;
  background: rgba(224, 90, 90, 0.14);
  box-shadow: inset 0 0 0 1px rgba(224, 90, 90, 0.12);
}
.fluoro-stage.is-active .fluoro-stage-card {
  border-color: rgba(107, 159, 212, 0.45);
  border-left-color: #6B9FD4;
  background: rgba(107, 159, 212, 0.1);
}
.fluoro-stage.is-done .fluoro-stage-card {
  border-left-color: var(--km-brand);
}
html[data-theme="light"] .fluoro-stage.is-waiting .fluoro-stage-card {
  background: rgba(232, 176, 74, 0.2);
  border-color: rgba(200, 140, 40, 0.5);
}
html[data-theme="light"] .fluoro-stage.is-unclaimed .fluoro-stage-card,
html[data-theme="light"] .fluoro-stage.is-error .fluoro-stage-card {
  background: rgba(224, 90, 90, 0.14);
  border-color: rgba(200, 60, 60, 0.45);
}
.fluoro-stage-top {
  display: flex; align-items: center; gap: 8px; min-width: 0;
}
.fluoro-stage-title {
  font-size: 12px; font-weight: 500; line-height: 1.3;
  min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--km-text-secondary);
}
.fluoro-stage.is-waiting .fluoro-stage-title,
.fluoro-stage.is-unclaimed .fluoro-stage-title,
.fluoro-stage.is-error .fluoro-stage-title {
  color: var(--km-text); font-weight: 600;
}
.fluoro-stage-tail {
  flex: 0 0 auto;
  display: inline-grid;
  grid-template-columns: auto 4.5em;
  align-items: center;
  column-gap: 6px;
  white-space: nowrap;
  margin-left: 8px;
}
.fluoro-stage-status {
  font-size: 10px; font-weight: 700;
  color: var(--km-muted); letter-spacing: 0.02em;
  text-align: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid transparent;
  min-width: 3.2em;
  box-sizing: border-box;
}
.fluoro-stage.is-done .fluoro-stage-status {
  color: var(--km-brand);
  background: rgba(232, 160, 122, 0.14);
  border-color: rgba(232, 160, 122, 0.28);
}
.fluoro-stage.is-active .fluoro-stage-status {
  color: #D6EBFF;
  background: rgba(107, 159, 212, 0.22);
  border-color: rgba(107, 159, 212, 0.4);
}
.fluoro-stage.is-waiting .fluoro-stage-status {
  color: #2A1E08;
  background: linear-gradient(135deg, #F5D078, #E8B04A);
  border-color: rgba(200, 140, 40, 0.55);
  box-shadow: 0 2px 8px rgba(232, 176, 74, 0.35);
}
.fluoro-stage.is-unclaimed .fluoro-stage-status,
.fluoro-stage.is-error .fluoro-stage-status {
  color: #fff;
  background: linear-gradient(135deg, #E87878, #C94A4A);
  border-color: rgba(180, 50, 50, 0.55);
  box-shadow: 0 2px 8px rgba(224, 90, 90, 0.4);
}
html[data-theme="light"] .fluoro-stage.is-active .fluoro-stage-status {
  color: #1E4A72;
  background: rgba(107, 159, 212, 0.22);
}
html[data-theme="light"] .fluoro-stage.is-waiting .fluoro-stage-status {
  color: #5A3A08;
}
.fluoro-stage-dur {
  font-size: 10px; color: var(--km-muted); opacity: .9;
  text-align: right; min-height: 1em;
  min-width: 0;
}
.fluoro-stage-dur.is-empty {
  opacity: .45;
}
.fluoro-ai { font-size: 9px; color: var(--km-info); margin-left: 3px; font-weight: 700; }
.fluoro-tech {
  display: none; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--km-line);
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px;
  color: var(--km-muted); white-space: pre-wrap; line-height: 1.4; max-height: 140px; overflow: auto;
}
.fluoro-stage.open .fluoro-tech { display: block; }
.fluoro-hint { font-size: 10px; color: var(--km-muted); margin: 0; line-height: 1.3; }
.fluoro-live {
  font-size: 11px; font-weight: 700; color: #5A3A08; white-space: nowrap;
  padding: 3px 10px; border-radius: 999px;
  background: linear-gradient(135deg, #F5D078, #E8B04A);
  box-shadow: 0 0 12px rgba(232, 176, 74, 0.35);
  animation: fluoro-pulse-warn 1.4s ease-in-out infinite;
}

@keyframes fluoro-pulse-warn {
  0%, 100% { filter: brightness(1); box-shadow: 0 0 0 3px rgba(232, 176, 74, 0.22), 0 0 12px rgba(232, 176, 74, 0.3); }
  50% { filter: brightness(1.08); box-shadow: 0 0 0 5px rgba(232, 176, 74, 0.12), 0 0 18px rgba(232, 176, 74, 0.45); }
}
@keyframes fluoro-pulse-danger {
  0%, 100% { filter: brightness(1); box-shadow: 0 0 0 3px rgba(224, 90, 90, 0.22), 0 0 12px rgba(224, 90, 90, 0.35); }
  50% { filter: brightness(1.1); box-shadow: 0 0 0 5px rgba(224, 90, 90, 0.12), 0 0 20px rgba(224, 90, 90, 0.5); }
}

/* ????????Tab ?????? */
.evt-detail-panel {
  padding: 12px 10px 12px 14px;
  display: flex; flex-direction: column; min-height: 0;
}
.evt-detail-panel > h2 { margin-bottom: 8px !important; }
.evt-detail-body {
  flex: 1; min-height: 0;
  display: flex; flex-direction: row; gap: 8px;
}
.evt-detail-main {
  flex: 1; min-width: 0; min-height: 0; overflow: auto;
  position: relative;
}
.evt-detail-pane { min-height: 100%; }
.evt-detail-pane[hidden] { display: none !important; }
.evt-detail-empty {
  margin: 12px 0; font-size: 12px; color: var(--km-muted);
}
.evt-detail-tabs {
  flex-shrink: 0; width: 34px;
  display: flex; flex-direction: column; gap: 4px;
  border-left: 1px solid var(--km-line); padding-left: 6px;
}
.evt-detail-tab {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.12em;
  font-size: 12px; font-weight: 600;
  color: var(--km-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 4px;
  cursor: pointer;
  line-height: 1.2;
}
.evt-detail-tab:hover { color: var(--km-text); background: rgba(255,255,255,.04); }
.evt-detail-tab.is-active {
  color: var(--km-brand);
  border-color: rgba(242, 153, 102,.35);
  background: rgba(242, 153, 102,.1);
}

.evt-rooms-legend {
  display: flex; flex-wrap: wrap; gap: 8px 12px;
  margin-bottom: 8px; font-size: 11px; color: var(--km-muted);
}
.evt-rooms-legend span {
  display: inline-flex; align-items: center; gap: 5px;
}
.evt-rooms-legend i {
  width: 10px; height: 10px; border-radius: 2px; display: inline-block;
}
.evt-rooms-board { display: flex; flex-direction: column; gap: 10px; }
.evt-room-building-head {
  font-size: 11px; color: var(--km-muted); margin-bottom: 4px;
  display: flex; justify-content: space-between; gap: 8px;
}
.evt-room-floor {
  display: flex; gap: 6px; align-items: flex-start; margin-bottom: 6px;
}
.evt-room-floor-label {
  flex-shrink: 0; width: 28px; font-size: 10px; color: var(--km-muted);
  padding-top: 6px;
}
.evt-room-tiles {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.evt-room-tile {
  width: var(--evt-tile-w, 3.2em); min-width: 0; height: 30px; padding: 0 4px;
  box-sizing: border-box; border-radius: 6px; border: 1px solid rgba(255,255,255,.12);
  color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  display: grid; place-items: center;
  cursor: default; opacity: .95; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 2px 8px rgba(0,0,0,.25);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.evt-room-tile:hover { transform: translateY(-1px); opacity: 1; }
/* ????????????????????????? */
.evt-room-tile[data-status="clean"] { background: linear-gradient(160deg, #A8B89A, #7E9174); }
.evt-room-tile[data-status="dirty"] { background: linear-gradient(160deg, #E0A86A, #C47D45); }
.evt-room-tile[data-status="occupied"] { background: linear-gradient(160deg, #8AA0B8, #5E7694); }
.evt-room-tile[data-status="cleaning"] { background: linear-gradient(160deg, #B09A88, #8A7364); }
.evt-room-tile[data-status="maintenance"] { background: linear-gradient(160deg, #C98A82, #A05A54); }
.evt-room-tile.is-focus {
  outline: 2px solid #fff8f2;
  box-shadow: 0 0 0 2px var(--km-brand), 0 0 16px rgba(232, 160, 122, 0.45);
  opacity: 1;
}

.evt-photos {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
.evt-photos a, .evt-photos img {
  display: block; width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--km-line); background: var(--km-surface-solid);
}
.evt-text {
  margin: 0; padding: 10px 12px;
  font-family: inherit; font-size: 13px; line-height: 1.55;
  color: var(--km-text); white-space: pre-wrap; word-break: break-word;
  background: var(--km-panel-2); border: 1px solid var(--km-line); border-radius: 8px;
}

.km-staff-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  flex: 1;
}
.km-staff-lead {
  margin: 0;
  flex-shrink: 0;
}
.km-staff-config {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.35fr);
  gap: 14px;
  align-items: start;
  min-height: 0;
  flex: 1;
}
.km-staff-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
}
.km-staff-col--staff {
  min-height: 0;
}
.km-staff-col-head {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  min-height: 38px;
  flex-shrink: 0;
}
.km-staff-col-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--km-text);
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 8px;
}
.km-staff-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--km-brand);
  background: rgba(242, 153, 102, 0.14);
  border: 1px solid rgba(242, 153, 102, 0.28);
}
.km-staff-col-head .d {
  margin: 0;
  font-size: 12px;
  color: var(--km-muted);
  line-height: 1.35;
}
.km-skills-stack {
  display: grid;
  gap: 8px;
  align-content: start;
}
.km-skills-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.km-skills-card--staff {
  gap: 8px;
  padding: 12px 14px;
}
.km-staff-fields--3 {
  /* rooms editor: wrap fields freely */
  grid-template-columns: none;
}
.km-skills-card-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.km-skills-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--km-text);
  line-height: 1.3;
}
.km-skills-card-title code {
  font-size: 11px;
  color: var(--km-muted);
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.km-skills-desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--km-muted);
}
.km-skills-card--catalog {
  gap: 6px;
  padding: 10px 12px;
}
.km-skills-meta {
  font-size: 11px;
  line-height: 1.35;
  color: var(--km-muted);
  padding-top: 6px;
  border-top: 1px solid var(--km-line);
}

/* 添加员工：默认折叠为一行 */
.km-staff-create {
  padding: 0;
  gap: 0;
  overflow: hidden;
  flex-shrink: 0;
}
.km-staff-create-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
}
.km-staff-create-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.km-staff-create-title .d {
  font-size: 12px;
}
.km-staff-create-body {
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--km-line);
  padding-top: 10px;
}
.km-staff-create-body[hidden] {
  display: none !important;
}
.km-staff-create.is-open {
  box-shadow: var(--km-shadow-soft);
}

/* 员工紧凑列表 */
.km-staff-table {
  --km-staff-cols: 4.5rem 5.5rem 3.75rem minmax(0, 1fr) 4.75rem 7.25rem;
  --km-staff-col-gap: 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  border: 1px solid var(--km-line);
  border-radius: var(--km-radius-sm);
  background: var(--km-panel);
  overflow: hidden;
}
.km-staff-empty {
  margin: 0;
  padding: 16px 14px;
}
.km-staff-row {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--km-line);
  background: transparent;
  transition: background 0.15s ease;
}
.km-staff-row:last-child {
  border-bottom: none;
}
.km-staff-row:hover {
  background: var(--km-panel-2);
}
.km-staff-row.is-open {
  background: rgba(242, 153, 102, 0.06);
}
.km-staff-row-summary {
  display: grid;
  grid-template-columns: var(--km-staff-cols);
  column-gap: var(--km-staff-col-gap);
  align-items: center;
  padding: 8px 14px;
  min-height: 44px;
  box-sizing: border-box;
}
.km-staff-table-head {
  min-height: 34px;
  padding-top: 7px;
  padding-bottom: 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--km-muted);
  background: var(--km-panel-2);
  border-bottom: 1px solid var(--km-line);
  user-select: none;
}
.km-staff-row-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--km-text);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.km-staff-row-id,
.km-staff-row-summary > code {
  display: block;
  font-size: 11px;
  color: var(--km-muted);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.km-staff-row-role {
  display: flex;
  align-items: center;
  min-width: 0;
}
.km-staff-row-role .badge {
  transform: none;
  font-size: 10px;
  padding: 1px 6px;
  line-height: 1.35;
}
.km-staff-role-empty {
  font-size: 11px;
  color: var(--km-muted);
  line-height: 1.25;
}
.km-staff-row-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  align-items: center;
}
.km-staff-skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--km-brand);
  background: rgba(242, 153, 102, 0.12);
  border: 1px solid rgba(242, 153, 102, 0.28);
  white-space: nowrap;
}
.km-staff-skill-empty {
  font-size: 11px;
  color: var(--km-muted);
}
.km-staff-row-flags {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}
.km-staff-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
  border: 1px solid var(--km-line);
  color: var(--km-muted);
  background: var(--km-panel-2);
  box-sizing: border-box;
}
.km-staff-flag.is-on {
  color: #5a9a6a;
  border-color: rgba(90, 154, 106, 0.35);
  background: rgba(90, 154, 106, 0.1);
}
html[data-theme="light"] .km-staff-flag.is-on {
  color: #3d7a4c;
}
.km-staff-flag.is-off {
  color: var(--km-muted);
  opacity: 0.85;
}
.km-staff-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.km-staff-edit-btn {
  padding: 4px 10px !important;
  font-size: 12px !important;
}
.km-staff-row-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 12px 12px;
  border-top: 1px dashed var(--km-line);
  padding-top: 10px;
  margin: 0 4px 4px;
  border-radius: 0 0 8px 8px;
  background: rgba(0, 0, 0, 0.04);
}
html[data-theme="light"] .km-staff-row-editor {
  background: rgba(90, 48, 28, 0.03);
}
.km-staff-row-editor[hidden] {
  display: none !important;
}

.km-staff-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  width: 100%;
  align-items: flex-end;
}
.km-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  font-size: 11px;
  color: var(--km-muted);
}
.km-field--name { width: 140px; }
.km-field--id { width: 150px; }
.km-field--password { width: 120px; }
.km-field input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 13px;
  color: var(--km-text);
  background: var(--km-panel-2);
  border: 1px solid var(--km-line);
  border-radius: 7px;
  padding: 6px 9px;
  line-height: 1.3;
}
.km-field input[readonly] {
  opacity: 0.72;
  cursor: default;
}
.km-field input:focus {
  outline: none;
  border-color: var(--km-brand);
}
.km-skills-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.km-skills-label {
  font-size: 11px;
  color: var(--km-muted);
  line-height: 1.3;
}
.km-skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.km-skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 3px 8px 3px 6px;
  border: 1px solid var(--km-line);
  border-radius: 999px;
  background: var(--km-panel-2);
  font-size: 11px;
  line-height: 1.2;
  color: var(--km-text);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.km-skill-chip:hover {
  border-color: rgba(242, 153, 102, 0.45);
}
.km-skill-chip:has(input:checked) {
  border-color: rgba(242, 153, 102, 0.55);
  background: rgba(242, 153, 102, 0.12);
  color: var(--km-brand);
}
.km-skill-chip input {
  width: 12px;
  height: 12px;
  margin: 0;
  accent-color: var(--km-brand);
  flex-shrink: 0;
}
.km-staff-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid var(--km-line);
}
.km-staff-toolbar-flags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  min-width: 0;
}
.km-avail-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  color: var(--km-text);
  cursor: pointer;
  user-select: none;
}
.km-avail-inline input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--km-brand);
}
.km-btn-danger {
  color: #e26b6b !important;
  border-color: rgba(226, 107, 107, 0.35) !important;
  padding: 4px 10px !important;
  font-size: 12px !important;
}

@media (max-width: 1100px) {
  .km-staff-config {
    grid-template-columns: 1fr;
  }
  .km-staff-table {
    --km-staff-cols: 4rem 5.25rem minmax(0, 1fr) 4.75rem 7.25rem;
    --km-staff-col-gap: 12px;
  }
  .km-staff-table-head span:nth-child(3),
  .km-staff-row-role {
    display: none;
  }
}
@media (max-width: 720px) {
  .km-staff-table {
    --km-staff-cols: minmax(0, 1fr) auto;
    --km-staff-col-gap: 10px;
  }
  .km-staff-table-head {
    display: none;
  }
  .km-staff-row-summary {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name actions"
      "id flags"
      "skills skills";
    row-gap: 6px;
  }
  .km-staff-row-name { grid-area: name; }
  .km-staff-row-id { grid-area: id; }
  .km-staff-row-skills { grid-area: skills; }
  .km-staff-row-flags { grid-area: flags; justify-content: flex-end; }
  .km-staff-row-actions { grid-area: actions; }
}
.km-skills-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  max-width: min(520px, calc(100vw - 32px));
  margin: 0;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  background: var(--km-panel);
  border: 1px solid rgba(242, 153, 102,.45);
  color: var(--km-text);
}
.km-skills-toast.is-err {
  background: #fff5f5;
  border-color: rgba(226,107,107,.55);
  color: #a33b3b;
}
html:not([data-theme="light"]) .km-skills-toast.is-err {
  background: rgba(60, 24, 24, 0.96);
  color: #f0b4b4;
}
.km-skills-toast[hidden] { display: none !important; }

.km-pane[data-pane="skills"].active,
.km-pane[data-pane="rooms"].active {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.km-pane[data-pane="skills"] [data-km-skills],
.km-pane[data-pane="rooms"] [data-km-rooms] {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.km-rooms-layout {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}
.km-rooms-layout > [data-create-room] {
  flex: 0 0 auto;
  min-height: auto;
  overflow: visible;
}
.km-rooms-layout > [data-room-list] {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}
.km-rooms-layout > [data-room-editor] {
  flex: 0 0 auto;
  min-height: auto;
  overflow: visible;
}
.km-rooms-layout > [data-room-editor][hidden] {
  display: none !important;
}
.km-rooms-page .km-staff-lead {
  flex-shrink: 0;
}

.cfg-rooms-panel {
  padding: 14px 16px;
}
.cfg-rooms-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 12px;
  font-size: 11px;
  color: var(--km-muted);
}
.cfg-rooms-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.cfg-rooms-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}
.cfg-rooms-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cfg-room-building-head {
  font-size: 12px;
  color: var(--km-muted);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.cfg-room-building-head strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--km-text);
}
.cfg-room-floor {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.cfg-room-floor-label {
  flex-shrink: 0;
  width: 28px;
  font-size: 11px;
  color: var(--km-muted);
  padding-top: 8px;
  text-align: left;
}
.cfg-room-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cfg-room-tile {
  width: var(--cfg-tile-w, 3.2em);
  min-width: 0;
  height: 34px;
  padding: 0 6px;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0.95;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.cfg-room-tile:hover {
  transform: translateY(-1px);
  opacity: 1;
}
.cfg-room-tile[data-status="clean"] {
  background: linear-gradient(160deg, #A8B89A, #7E9174);
}
.cfg-room-tile[data-status="dirty"] {
  background: linear-gradient(160deg, #E0A86A, #C47D45);
}
.cfg-room-tile[data-status="occupied"] {
  background: linear-gradient(160deg, #8AA0B8, #5E7694);
}
.cfg-room-tile[data-status="cleaning"] {
  background: linear-gradient(160deg, #B09A88, #8A7364);
}
.cfg-room-tile.is-selected {
  outline: 2px solid #fff8f2;
  box-shadow: 0 0 0 2px var(--km-brand), 0 0 14px rgba(232, 160, 122, 0.4);
  opacity: 1;
}
.cfg-room-editor-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.km-field--notes {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--km-muted);
}
.km-field select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 13px;
  color: var(--km-text);
  background: var(--km-panel-2);
  border: 1px solid var(--km-line);
  border-radius: 7px;
  padding: 6px 9px;
  line-height: 1.3;
}
.km-field select:focus {
  outline: none;
  border-color: var(--km-brand);
}
.km-rooms-page .km-field {
  flex: 1 1 140px;
  max-width: 220px;
}
.km-rooms-page .km-field--notes {
  max-width: none;
  flex: 1 1 100%;
}
