:root {
  /* LINEグリーン強め */
  --brand: #06c755;
  --brand-600: #05b24b;
  --brand-50: #e6f8ec;
  --brand-100: #c8efd5;

  --bg: #f6f7f8;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --ink: #101417;
  --ink-2: #2b3137;
  --muted: #6b7480;
  --muted-2: #98a0aa;
  --line: #e6e8ec;
  --line-2: #eef0f3;

  --accent: #0f7a3f;
  --danger: #e23b4c;
  --warn: #c28a00;
  --info: #2b6cb0;

  --radius: 10px;
  --radius-lg: 14px;
  --radius-sm: 6px;

  --shadow-sm: 0 1px 0 rgba(16,20,23,.03), 0 1px 2px rgba(16,20,23,.04);
  --shadow-md: 0 4px 12px rgba(16,20,23,.06), 0 1px 3px rgba(16,20,23,.05);
  --shadow-lg: 0 16px 40px rgba(16,20,23,.14);

  --font-jp: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic UI", sans-serif;
  --font-en: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

[data-theme="neutral"] {
  --brand: #3f4a57;
  --brand-600: #2f3945;
  --brand-50: #eef1f4;
  --brand-100: #dde2e8;
  --accent: #5b6b7a;
}
[data-theme="dark"] {
  --brand: #06c755;
  --brand-600: #00a447;
  --brand-50: #133122;
  --brand-100: #1a4a31;
  --bg: #0f1316;
  --surface: #161b20;
  --surface-2: #1b2127;
  --ink: #eef2f5;
  --ink-2: #cdd3da;
  --muted: #8a94a0;
  --muted-2: #6a7380;
  --line: #252c33;
  --line-2: #1e242a;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-jp);
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "palt";
}
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.app {
  display: grid;
  grid-template-rows: 52px 1fr;
  height: 100vh;
}

/* ── Topbar ─────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 13px; color: var(--ink);
  letter-spacing: -0.01em;
}
.logo-mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  font-family: var(--font-en);
}
.logo small {
  color: var(--muted);
  font-weight: 400;
  font-size: 11px;
  margin-left: 4px;
}
.topbar-divider { width: 1px; height: 22px; background: var(--line); }
.brand-switch {
  display: flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 10px 0 8px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface-2);
  font-size: 12px;
  cursor: pointer;
  transition: all .12s ease;
}
.brand-switch:hover { background: var(--surface); border-color: var(--muted-2); }
.brand-swatch {
  width: 18px; height: 18px; border-radius: 5px;
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 10px;
  font-family: var(--font-en);
}
.brand-switch .chev { color: var(--muted); font-size: 10px; }

.topbar-spacer { flex: 1; }

.seg {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.seg button {
  height: 26px; padding: 0 10px;
  font-size: 12px; color: var(--muted);
  background: transparent;
  border: 0; border-radius: 6px;
}
.seg button.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  font-weight: 500;
}

.icon-btn {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  transition: all .12s ease;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line); }

.btn {
  height: 32px; padding: 0 12px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  font-size: 12px; font-weight: 500;
  color: var(--ink);
  transition: all .12s ease;
}
.btn:hover { background: var(--surface-2); border-color: var(--muted-2); }
.btn.primary {
  background: var(--brand); color: #fff; border-color: var(--brand);
}
.btn.primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 11px; }
.btn.xs { height: 22px; padding: 0 7px; font-size: 11px; border-radius: 6px; }

.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, #6c7a89, #3c4858);
  color: #fff; display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
}

/* ── Layout ─────────────────────────────── */
.main {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 0;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 16px 12px;
  overflow-y: auto;
}
.side-label {
  font-size: 10px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 8px 8px 6px;
  font-family: var(--font-en);
}
.side-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px;
  border-radius: 7px;
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  line-height: 1.3;
}
.side-item:hover { background: var(--surface-2); }
.side-item.on {
  background: var(--brand-50);
  color: var(--ink);
  font-weight: 500;
}
[data-theme="dark"] .side-item.on { background: var(--brand-100); }
.side-item .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted-2); flex: none;
}
.side-item.on .dot { background: var(--brand); }
.side-item .count {
  margin-left: auto;
  font-size: 10px; color: var(--muted);
  font-family: var(--font-en);
}

.side-group {
  padding: 8px 4px;
  margin-top: 4px;
}
.side-group + .side-group { border-top: 1px solid var(--line-2); }

/* ── Canvas ─────────────────────────────── */
.canvas-wrap {
  position: relative;
  min-width: 0;
  overflow: auto;
  background: var(--bg);
  background-image:
    radial-gradient(circle, rgba(107,116,128,0.12) 1px, transparent 1px);
  background-size: 16px 16px;
  background-position: 0 0;
}
[data-theme="dark"] .canvas-wrap {
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
}

.canvas-toolbar {
  position: sticky; top: 0; left: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(to bottom, var(--bg) 70%, transparent);
  z-index: 5;
  pointer-events: none;
}
.canvas-toolbar > * { pointer-events: auto; }
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted);
}
.breadcrumb strong { color: var(--ink); font-weight: 600; }
.breadcrumb .sep { color: var(--muted-2); }

.zoom-pill {
  display: inline-flex; align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.zoom-pill button {
  width: 28px; height: 28px;
  background: transparent; border: 0; color: var(--muted);
}
.zoom-pill button:hover { background: var(--surface-2); color: var(--ink); }
.zoom-pill .zval {
  width: 42px; text-align: center;
  font-family: var(--font-en);
  font-size: 11px; color: var(--ink-2);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

/* ── Flow ───────────────────────────────── */
.flow {
  position: relative;
  padding: 40px 60px 80px;
  min-width: 1400px;
}
.flow-svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  overflow: visible;
}
.flow-svg path { fill: none; stroke: var(--muted-2); stroke-width: 1.5; opacity: 0.55; }
.flow-svg path.active { stroke: var(--brand); opacity: 1; stroke-width: 2; }
.flow-svg path.dim { opacity: 0.2; }

.node {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.node.selected { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50), var(--shadow-md); }
.node.trigger { width: 220px; }
.node.condition { width: 220px; }
.node.reply { width: 260px; }
.node.action { width: 220px; }
.node.userinput { width: 200px; }
.node.condition {
  width: 140px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.node.condition.selected { box-shadow: 0 0 0 2px var(--brand-50); border-radius: 8px; }
.cond-compact {
  display: flex; flex-direction: column; gap: 4px;
  padding: 2px;
}
.cond-row {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 11px;
  box-shadow: var(--shadow-sm);
}
.cond-op {
  font-weight: 600; color: var(--ink);
  font-size: 11px;
}
.cond-arrow { color: var(--muted-2); font-size: 10px; }
.cond-goto {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--muted);
}
.node.userinput .kind-icon { background: #fff4de; color: #a06a00; }
[data-theme="dark"] .node.userinput .kind-icon { background: #3a2e10; color: #f5c66d; }

.node-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-2);
  font-size: 11px; font-weight: 600;
  color: var(--muted);
}
.node-head .kind-icon {
  width: 18px; height: 18px; border-radius: 5px;
  display: grid; place-items: center;
  flex: none;
}
.node.trigger .kind-icon { background: #eaf3ff; color: #2b6cb0; }
.node.condition .kind-icon { background: #fff4de; color: #a06a00; }
.node.reply .kind-icon { background: var(--brand-50); color: var(--brand-600); }
.node.action .kind-icon { background: #f3eefb; color: #6f47c0; }
[data-theme="dark"] .node.trigger .kind-icon { background: #1a2b3d; color: #7cb4f5; }
[data-theme="dark"] .node.condition .kind-icon { background: #3a2e10; color: #f5c66d; }
[data-theme="dark"] .node.action .kind-icon { background: #2a1f3d; color: #b89af5; }

.node-head .kind-label {
  font-family: var(--font-en);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
}
.node-head .id {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px; color: var(--muted-2);
}

.node-body {
  padding: 10px 12px 12px;
}
.node-title {
  font-size: 12px; font-weight: 600; color: var(--ink);
  margin: 0 0 4px;
  line-height: 1.3;
}
.node-meta {
  font-size: 10.5px; color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}
.keywords {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 6px;
}
.kw {
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 10.5px;
  color: var(--ink-2);
}
.kw-input {
  background: transparent;
  border: 1px dashed var(--line);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 10.5px;
  color: var(--muted);
  width: 50px;
}

/* Reply bubble inside node */
.reply-bubble {
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--ink);
  line-height: 1.5;
  cursor: text;
  white-space: pre-wrap;
  position: relative;
  transition: all .12s ease;
}
.reply-bubble:hover {
  border-color: var(--brand);
  background: #fff;
}
[data-theme="dark"] .reply-bubble:hover { background: var(--surface); }
.reply-bubble:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  background: var(--surface);
}
.reply-bubble.editing {
  background: var(--surface);
  border-color: var(--brand);
}

.node .reply-actions {
  display: flex; align-items: center; gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line-2);
}
.node .reply-actions .btn { flex: none; }
.node .reply-actions .spacer { flex: 1; }

.variants-row {
  display: flex; align-items: center; gap: 3px;
  font-size: 10px;
  color: var(--muted);
  font-family: var(--font-en);
  padding: 6px 10px 2px;
}
.variant-dot {
  width: 18px; height: 18px; border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  display: grid; place-items: center;
  font-size: 9px; font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: all .1s ease;
}
.variant-dot:hover { border-color: var(--muted-2); color: var(--ink); }
.variant-dot.on {
  background: var(--brand); color: #fff;
  border-color: var(--brand);
}
.variant-add {
  width: 18px; height: 18px; border-radius: 5px;
  border: 1px dashed var(--muted-2);
  color: var(--muted);
  background: transparent;
  display: grid; place-items: center;
  font-size: 11px;
  cursor: pointer;
}
.variant-add:hover { color: var(--brand); border-color: var(--brand); }

.node .variants-label {
  margin-right: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Condition branches */
.branch-list { padding: 0 10px 10px; }
.branch-row {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  background: var(--surface-2);
  margin-top: 5px;
  border: 1px solid var(--line);
}
.branch-row .op {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 10px;
}
.branch-row .txt { flex: 1; color: var(--ink-2); }
.branch-row .jump {
  font-size: 9.5px; color: var(--muted);
  font-family: var(--font-mono);
}

/* ── Right panel (AI) ───────────────────── */
.inspector {
  background: var(--surface);
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  min-height: 0;
}
.insp-tabs {
  display: flex;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  gap: 2px;
}
.insp-tabs button {
  background: transparent;
  border: 0;
  padding: 12px 10px 10px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.insp-tabs button.on {
  color: var(--ink);
  border-bottom-color: var(--brand);
  font-weight: 500;
}

.insp-body {
  flex: 1; overflow-y: auto;
  padding: 16px;
}
.field { display: block; margin-bottom: 14px; }
.field > label {
  display: block;
  font-size: 10.5px; font-weight: 600;
  color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.field textarea, .field input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  resize: vertical;
}
.field textarea:focus, .field input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-50); }

.tone-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tone-chip {
  padding: 5px 10px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 11px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .12s ease;
}
.tone-chip:hover { border-color: var(--muted-2); }
.tone-chip.on {
  background: var(--brand-50); border-color: var(--brand);
  color: var(--brand-600); font-weight: 500;
}
[data-theme="dark"] .tone-chip.on { color: #7fe0a1; }

.result-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: var(--surface);
  transition: all .15s ease;
}
.result-card:hover { border-color: var(--muted-2); }
.result-card.picked { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-50); }
.result-card .rc-head {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 6px;
  font-size: 10.5px;
  color: var(--muted);
}
.result-card .rc-head .tag {
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-en);
  font-size: 10px;
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.result-card .rc-head .len {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
}
.result-card .rc-body {
  font-size: 12px;
  color: var(--ink);
  line-height: 1.55;
  white-space: pre-wrap;
  margin-bottom: 8px;
}
.result-card .rc-actions { display: flex; gap: 6px; }

/* ── Preview ────────────────────────────── */
.preview-toggle {
  position: absolute;
  right: 16px; bottom: 16px;
  z-index: 6;
}
.line-preview {
  position: fixed;
  right: 20px; bottom: 56px;
  width: 280px; height: 520px;
  background: #87a4bc;
  border-radius: 28px;
  padding: 6px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,.08);
  z-index: 6;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.line-preview-inner {
  flex: 1;
  background: #87a4bc;
  border-radius: 22px;
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
}
.lp-statusbar {
  height: 20px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  font-family: var(--font-en);
  font-size: 10px;
  color: #fff;
  font-weight: 600;
}
.lp-header {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px 8px;
  background: #87a4bc;
  color: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.lp-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff;
  color: #87a4bc;
  font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
  font-family: var(--font-en);
}
.lp-header .name { font-size: 12px; font-weight: 600; line-height: 1.1; }
.lp-header .sub { font-size: 9.5px; opacity: 0.85; }
.lp-body {
  flex: 1;
  padding: 8px 10px 60px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
}
.lp-msg {
  max-width: 78%;
  padding: 7px 10px;
  font-size: 11px;
  line-height: 1.45;
  border-radius: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  animation: pop .22s ease-out;
}
@keyframes pop { from { transform: translateY(4px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.lp-msg.user {
  align-self: flex-end;
  background: #8fe05a;
  color: #0c2e13;
  border-bottom-right-radius: 4px;
}
.lp-msg.bot {
  align-self: flex-start;
  background: #ffffff;
  color: #222;
  border-bottom-left-radius: 4px;
}
.lp-time {
  font-size: 9px;
  color: rgba(255,255,255,0.85);
  align-self: flex-end;
  margin-right: 4px;
  margin-bottom: 2px;
  font-family: var(--font-en);
}
.lp-time.left { align-self: flex-start; margin-right: 0; margin-left: 4px; }
.lp-input {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: #f3f4f6;
  border-top: 1px solid rgba(0,0,0,0.08);
  display: flex; align-items: center; gap: 6px;
  padding: 0 8px;
}
.lp-input .pill {
  flex: 1; height: 26px;
  background: #fff;
  border-radius: 13px;
  font-size: 10px; color: #aaa;
  padding: 0 10px;
  display: flex; align-items: center;
}

/* ── Modal ──────────────────────────────── */
.backdrop {
  position: fixed; inset: 0;
  background: rgba(16,20,23,0.4);
  z-index: 50;
  display: grid; place-items: center;
  animation: fadein .15s ease;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 680px; max-width: 94vw; max-height: 86vh;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: pop-in .2s ease;
}
@keyframes pop-in { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.modal-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.modal-head .sub { font-size: 11px; color: var(--muted); }
.modal-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.modal-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
}
.modal-foot .spacer { flex: 1; }

/* ── Tweaks panel ───────────────────────── */
.tweaks {
  position: fixed;
  right: 20px; top: 68px;
  width: 280px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 40;
  overflow: hidden;
}
.tweaks-head {
  padding: 10px 12px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.tweaks-head h4 {
  margin: 0; font-size: 12px; font-weight: 600;
}
.tweaks-head small { font-size: 10px; color: var(--muted); margin-left: auto; }
.tweaks-body { padding: 12px; display: flex; flex-direction: column; gap: 14px; }
.tweak-row { }
.tweak-row > label {
  display: block; font-size: 10.5px; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.swatch-row { display: flex; gap: 6px; }
.swatch {
  width: 40px; height: 28px; border-radius: 7px;
  border: 2px solid var(--line);
  cursor: pointer;
  display: grid; place-items: center;
  font-size: 9px; color: #fff; font-weight: 700;
  font-family: var(--font-en);
}
.swatch.on { border-color: var(--ink); }

/* ── Bits ───────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  font-family: var(--font-en);
}
.badge.green { background: var(--brand-50); color: var(--brand-600); }
.badge.gray { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge.amber { background: #fff4de; color: #a06a00; }
.badge.blue { background: #eaf3ff; color: #2b6cb0; }
[data-theme="dark"] .badge.green { background: var(--brand-100); color: #7fe0a1; }

.skel {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--line-2) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shim 1.2s linear infinite;
  border-radius: 4px;
}
@keyframes shim { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.divider { height: 1px; background: var(--line); margin: 10px 0; }

.kbd {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
}

.empty-hint {
  padding: 24px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 11.5px;
}
