/* 세계관 스튜디오 — 전용 스타일 */

.wb-page { --wb-accent: #4a6fa5; --wb-accent-soft: #6b8fc4; }
[data-theme="dark"] .wb-page { --wb-accent: #7aa3d4; --wb-accent-soft: #9bbde8; }

.wb-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100dvh - 58px);
}

.wb-sidebar {
  border-right: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 58px;
  height: calc(100dvh - 58px);
  overflow-y: auto;
  z-index: 20;
  isolation: isolate;
}

.wb-project-bar {
  display: flex;
  gap: 6px;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
}
.wb-project-bar select {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.88rem;
}
.wb-icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 1rem;
}
.wb-icon-btn:hover { border-color: var(--wb-accent); color: var(--wb-accent); }

.wb-module-nav {
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 2px;
  flex: 1;
}
.wb-module-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.wb-module-nav button:hover { background: color-mix(in srgb, var(--wb-accent) 12%, transparent); color: var(--ink); }
.wb-module-nav button.active {
  background: color-mix(in srgb, var(--wb-accent) 18%, transparent);
  color: var(--wb-accent);
  font-weight: 600;
}
.wb-nav-icon { opacity: 0.7; width: 1.2em; text-align: center; }

.wb-sidebar-foot {
  padding: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
}

.wb-main {
  padding: clamp(16px, 3vw, 28px);
  overflow-x: hidden;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.wb-panel { display: none; animation: wbFade 0.3s var(--ease-out); }
.wb-panel.active { display: block; }
@keyframes wbFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.wb-panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.wb-panel-head h1 {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 700;
}
.wb-sub { margin: 0; color: var(--ink-faint); font-size: 0.92rem; }
.wb-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.wb-hub-layout {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 20px;
  min-height: 420px;
}
.wb-tree {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  overflow-y: auto;
  max-height: 560px;
}
.wb-tree-item {
  padding: 6px 8px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wb-tree-item:hover { background: color-mix(in srgb, var(--wb-accent) 10%, transparent); }
.wb-tree-item.active { background: color-mix(in srgb, var(--wb-accent) 16%, transparent); font-weight: 600; }
.wb-tree-item.child { padding-left: 24px; }
.wb-tree-cat { font-weight: 700; color: var(--wb-accent); margin: 8px 0 4px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }

.wb-detail {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}
.wb-detail h2 { margin: 0 0 12px; font-family: var(--font-serif); }
.wb-detail .wb-meta { font-size: 0.85rem; color: var(--ink-faint); margin-bottom: 16px; }
.wb-empty { color: var(--ink-faint); text-align: center; padding: 48px 20px; }

.wb-form label { display: block; margin-bottom: 12px; font-size: 0.88rem; color: var(--ink-soft); }
.wb-form input, .wb-form textarea, .wb-form select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.92rem;
}
.wb-form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.wb-form-row label { margin: 0; }
.wb-form-row input, .wb-form-row select { margin-top: 4px; }
.wb-hint {
  margin: -8px 0 16px;
  font-size: 0.82rem;
  color: var(--ink-faint);
  line-height: 1.45;
}

.wb-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 20px;
}
.wb-card h3, .wb-card h4 { margin: 0 0 12px; font-size: 1rem; }

/* Timeline */
.wb-timeline-wrap { position: relative; margin-bottom: 20px; }
.wb-timeline-axis {
  height: 4px;
  background: linear-gradient(90deg, var(--wb-accent), var(--gold));
  border-radius: 2px;
  margin: 40px 0 24px;
  position: relative;
}
.wb-tl-marker {
  position: absolute;
  top: -32px;
  transform: translateX(-50%);
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-faint);
  white-space: nowrap;
}
.wb-tl-dot {
  width: 12px;
  height: 12px;
  background: var(--wb-accent);
  border-radius: 50%;
  margin: 0 auto 4px;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 2px var(--wb-accent);
}
.wb-timeline-list { display: flex; flex-direction: column; gap: 10px; }
.wb-tl-event {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-left: 3px solid var(--wb-accent);
}
.wb-tl-year { font-weight: 700; color: var(--wb-accent); font-variant-numeric: tabular-nums; }
.wb-tl-event h4 { margin: 0 0 4px; font-size: 1rem; }
.wb-tl-event p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }
.wb-tl-links { font-size: 0.8rem; color: var(--ink-faint); margin-top: 6px; }

/* Map */
.wb-map-layout { display: grid; grid-template-columns: 1fr 260px; gap: 16px; }
#map-canvas {
  width: 100%;
  height: auto;
  max-height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #1a2838;
  cursor: crosshair;
  touch-action: none;
}
[data-theme="dark"] #map-canvas { background: #0d1520; }
.wb-map-side { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.wb-map-tools select, .wb-map-tools input { padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line); }

/* Relations */
.wb-rel-layout { display: grid; grid-template-columns: 1fr 240px; gap: 16px; }
#rel-svg {
  width: 100%;
  height: 480px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.wb-rel-node { cursor: grab; }
.wb-rel-node circle { fill: var(--wb-accent); stroke: var(--paper); stroke-width: 2; }
.wb-rel-node text { fill: var(--ink); font-size: 11px; text-anchor: middle; pointer-events: none; }
.wb-rel-edge { stroke: var(--ink-faint); stroke-width: 1.5; fill: none; }
.wb-rel-edge-label { font-size: 9px; fill: var(--ink-faint); }
.wb-rel-side { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }

/* Consistency */
.wb-results { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.wb-issue {
  padding: 12px 16px;
  border-radius: var(--radius);
  border-left: 4px solid;
  font-size: 0.9rem;
}
.wb-issue.error { background: color-mix(in srgb, #c44 12%, var(--paper)); border-color: #c44; }
.wb-issue.warn { background: color-mix(in srgb, #c90 12%, var(--paper)); border-color: #c90; }
.wb-issue.ok { background: color-mix(in srgb, #4a4 12%, var(--paper)); border-color: #4a4; }
.wb-rule-list { margin: 0; padding-left: 20px; color: var(--ink-soft); font-size: 0.88rem; }

/* Culture */
.wb-culture-output {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.wb-culture-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.wb-culture-card h4 { margin: 0 0 8px; color: var(--wb-accent); font-size: 0.92rem; }
.wb-culture-card ul { margin: 0; padding-left: 18px; font-size: 0.86rem; color: var(--ink-soft); }

/* System table */
.wb-table-wrap { overflow-x: auto; }
.wb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.wb-table th, .wb-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.wb-table th { background: color-mix(in srgb, var(--wb-accent) 10%, var(--paper)); font-weight: 600; }
.wb-table input, .wb-table select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.85rem;
}

/* Seeds */
.wb-seed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.wb-seed-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  border-top: 3px solid var(--gold);
}
.wb-seed-card h4 { margin: 0 0 8px; font-family: var(--font-serif); }
.wb-seed-card p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }
.wb-seed-type { font-size: 0.75rem; color: var(--wb-accent); text-transform: uppercase; letter-spacing: 0.05em; }

/* Export */
.wb-export-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.wb-btn-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
#export-preview {
  width: 100%;
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink-soft);
  resize: vertical;
}
.wb-status-legend { margin-top: 16px; font-size: 0.85rem; color: var(--ink-faint); }
.wb-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 6px;
}
.wb-badge.draft { background: color-mix(in srgb, #888 20%, transparent); color: var(--ink-soft); }
.wb-badge.confirmed { background: color-mix(in srgb, var(--wb-accent) 25%, transparent); color: var(--wb-accent); }

/* Ideas board */
.wb-ideas-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.wb-idea-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  position: relative;
}
.wb-idea-card.done { opacity: 0.75; border-color: color-mix(in srgb, #4a4 40%, var(--line)); }
.wb-idea-card.pending { border-left: 3px solid var(--gold); }
.wb-idea-card h4 { margin: 0 0 6px; font-size: 0.95rem; }
.wb-idea-card p { margin: 0; font-size: 0.82rem; color: var(--ink-faint); }
.wb-idea-status {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--bg);
}

.wb-mini-list { list-style: none; margin: 0; padding: 0; }
.wb-mini-list li {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
  cursor: pointer;
}
.wb-mini-list li:hover { background: color-mix(in srgb, var(--wb-accent) 8%, transparent); }
.wb-mini-list li:last-child { border-bottom: none; }

.wb-modal {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  max-width: 480px;
  width: 92vw;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-lift);
}
.wb-modal::backdrop { background: rgba(0,0,0,0.45); }
.wb-modal form { padding: 22px 24px; }
.wb-modal h3 { margin: 0 0 16px; }
.wb-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.btn.danger { color: #c44; border-color: #c44; }
.btn.danger:hover { background: color-mix(in srgb, #c44 12%, transparent); }

.wb-footer { margin-top: 0; }

/* AI Guide */
.wb-guide-locked[hidden] { display: none !important; }
.wb-guide-locked:not([hidden]) {
  display: flex;
  justify-content: center;
  padding: 48px 20px;
}
.wb-guide-lock-card {
  text-align: center;
  max-width: 400px;
  padding: 32px 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.wb-guide-lock-icon { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.wb-guide-lock-card code { font-size: 0.82rem; background: var(--bg); padding: 2px 6px; border-radius: 4px; }
.wb-guide-setup-card {
  max-width: 560px;
  text-align: left;
}
.wb-guide-setup-card h2 { text-align: center; }
.wb-guide-setup-card > .wb-guide-lock-icon { text-align: center; }
.wb-guide-setup-lead {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.5;
}
.wb-guide-key-label {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 10px;
}
.wb-guide-key-label input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-monospace, monospace;
  font-size: 0.88rem;
}
.wb-guide-setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.wb-guide-howto {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}
.wb-guide-howto summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--wb-accent);
  margin-bottom: 10px;
}
.wb-guide-howto ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.wb-guide-howto li { margin-bottom: 8px; }
.wb-guide-howto a { color: var(--wb-accent); }

.wb-guide-progress { margin-bottom: 20px; }
.wb-guide-progress-bar {
  height: 10px;
  background: var(--bg-deep);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 8px;
}
#guide-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--wb-accent), var(--gold));
  border-radius: 99px;
  transition: width 0.5s var(--ease-out);
}
.wb-guide-progress-label { font-size: 0.9rem; color: var(--ink-soft); font-weight: 600; }
#guide-progress-pct { color: var(--wb-accent); font-size: 1.1rem; }

.wb-guide-steps {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 20px;
  scrollbar-width: thin;
}
.wb-guide-step {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  cursor: pointer;
  font-size: 0.82rem;
  text-align: center;
  min-width: 88px;
  transition: border-color 0.2s, transform 0.15s;
}
.wb-guide-step:hover { border-color: var(--wb-accent); }
.wb-guide-step.active { border-color: var(--wb-accent); background: color-mix(in srgb, var(--wb-accent) 12%, var(--paper)); font-weight: 600; }
.wb-guide-step.done { opacity: 0.7; }
.wb-guide-step .step-emoji { display: block; font-size: 1.2rem; margin-bottom: 4px; }
.wb-guide-step .step-pct { font-size: 0.7rem; color: var(--ink-faint); }

.wb-guide-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 18px;
  align-items: start;
}
.wb-guide-chat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 480px;
  max-height: 72vh;
}
.wb-guide-mentor {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--wb-accent) 6%, var(--paper));
}
.wb-guide-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wb-accent), var(--gold));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.wb-guide-mentor strong { display: block; }
.wb-guide-mentor small { color: var(--ink-faint); }

.wb-guide-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wb-guide-msg {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
}
.wb-guide-msg.user {
  align-self: flex-end;
  background: color-mix(in srgb, var(--wb-accent) 18%, var(--paper));
  border-bottom-right-radius: 4px;
}
.wb-guide-msg.assistant {
  align-self: flex-start;
  background: var(--bg);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.wb-guide-msg.system {
  align-self: center;
  font-size: 0.8rem;
  color: var(--ink-faint);
  background: transparent;
  padding: 4px;
}
.wb-guide-msg.loading { opacity: 0.6; font-style: italic; }
.wb-guide-msg.streaming {
  opacity: 0.95;
  white-space: pre-wrap;
}
.wb-guide-msg.streaming::after {
  content: "▍
  display: inline-block;
  margin-left: 1px;
  animation: nl-caret 1s step-end infinite;
  color: var(--wb-accent, #c4a574);
}
@keyframes nl-caret {
  50% { opacity: 0; }
}
.wb-nl-draft.is-streaming {
  outline: 1px dashed rgba(196, 165, 116, 0.45);
}

.wb-guide-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 10px;
}
.wb-guide-quick button {
  font-size: 0.78rem;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--bg);
  color: var(--ink-soft);
  cursor: pointer;
}
.wb-guide-quick button:hover { border-color: var(--wb-accent); color: var(--wb-accent); }
.wb-guide-quick button[data-continue] {
  border-color: var(--wb-accent);
  color: var(--wb-accent);
  background: color-mix(in srgb, var(--wb-accent) 12%, var(--bg));
}
.wb-guide-quick.is-busy button,
.wb-guide-quick button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.wb-guide-input {
  border-top: 1px solid var(--line);
  padding: 12px 16px;
}
.wb-guide-input.is-busy textarea {
  opacity: 0.7;
}
.wb-guide-input textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  resize: vertical;
  margin-bottom: 8px;
}
.wb-guide-input-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wb-nl-cancel {
  border-color: #b85c5c;
  color: #8f3a3a;
}
.wb-nl-cancel:hover {
  border-color: #8f3a3a;
  background: rgba(184, 92, 92, 0.08);
}
.wb-nl-cancel-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.wb-guide-side .wb-card { margin-top: 0; }
.wb-guide-side .wb-card + .wb-card { margin-top: 14px; }
.wb-guide-gallery img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-bottom: 8px;
}
.wb-guide-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.86rem;
}
.wb-guide-checklist li {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}
.wb-guide-checklist li.done { color: var(--wb-accent); }
.wb-guide-checklist li.done::before { content: "✓ "; }

#nav-guide {
  border: 1px dashed color-mix(in srgb, var(--gold) 50%, var(--line));
}
#nav-guide:not([hidden]) {
  animation: wbGuideGlow 2s ease-in-out infinite alternate;
}
@keyframes wbGuideGlow {
  from { box-shadow: none; }
  to { box-shadow: 0 0 12px color-mix(in srgb, var(--gold) 30%, transparent); }
}

#nav-novelist {
  border: 1px dashed color-mix(in srgb, var(--wb-accent) 45%, var(--line));
}

/* Chat Novelist */
.wb-nl-shelf {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.wb-nl-shelf-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wb-nl-shelf-hint {
  margin: 0;
}
.wb-nl-shelf-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.wb-nl-shelf-q {
  flex: 1;
  min-width: 140px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.86rem;
}
.wb-nl-shelf-status {
  min-width: 110px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.86rem;
}
.wb-nl-shelf-sort {
  min-width: 120px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.86rem;
}
.wb-nl-shelf-filter-count {
  font-size: 0.78rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.wb-nl-shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
}
.wb-nl-book.is-shelf-hidden {
  display: none;
}
.wb-nl-book {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  font: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.wb-nl-book:hover,
.wb-nl-book:focus-visible {
  border-color: color-mix(in srgb, var(--wb-accent) 55%, var(--line));
  transform: translateY(-2px);
  outline: none;
}
.wb-nl-book.is-active {
  border-color: var(--wb-accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--wb-accent) 35%, transparent);
}
.wb-nl-book.is-busy {
  opacity: 0.7;
  pointer-events: none;
}
.wb-nl-book-cover {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: color-mix(in srgb, var(--ink) 8%, var(--bg));
}
.wb-nl-book-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px 10px;
  min-height: 3.6em;
}
.wb-nl-book-title {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wb-nl-book-meta {
  font-size: 0.72rem;
  color: var(--ink-soft);
}
.wb-nl-book-read {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #2f6f3e;
  white-space: nowrap;
}
.wb-nl-book-read.is-slow {
  color: #9c6b1a;
}
.wb-nl-book-read.is-fast {
  color: #2b6cb0;
}
.wb-nl-book-read.is-ok {
  color: #2f6f3e;
}
.wb-nl-book-badge {
  align-self: flex-start;
  margin-top: 2px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--wb-accent);
}
.wb-nl-book-badge.is-import {
  color: color-mix(in srgb, var(--ink-soft) 40%, #8a5a2b);
}
.wb-nl-book-pub {
  align-self: flex-start;
  margin-top: 2px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 1px 0;
}
.wb-nl-book-pub.is-chip {
  display: inline-block;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 2px 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.wb-nl-book-pub.is-chip:hover:not(.is-busy) {
  filter: brightness(0.92);
}
.wb-nl-book-pub.is-chip.is-busy {
  cursor: wait;
  opacity: 0.75;
  text-decoration: none;
}
.wb-nl-book-pub.is-chip:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--wb-accent) 55%, #fff);
  outline-offset: 2px;
}
.wb-nl-book-pub.is-on {
  color: #2f9e44;
}
.wb-nl-book-pub.is-off {
  color: #868e96;
}
.wb-nl-book-pub.is-blocked {
  color: #c92a2a;
}
.wb-nl-book-reader {
  align-self: flex-start;
  margin-top: 2px;
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  cursor: pointer;
  padding: 2px 0;
}
.wb-nl-book-reader:hover {
  filter: brightness(0.92);
}
.wb-nl-book-reader:focus-visible {
  outline: 2px solid color-mix(in srgb, #1d4ed8 55%, transparent);
  outline-offset: 2px;
  border-radius: 2px;
}
.wb-nl-shelf-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}
.wb-nl-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-weight: 600;
}
.wb-nl-field select {
  min-width: 200px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
}
.wb-nl-create {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 240px;
}
.wb-nl-create input {
  flex: 1;
  min-width: 140px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
}
.wb-nl-meter {
  font-size: 0.84rem;
  color: var(--ink-soft);
  margin: 0 0 14px;
  padding: 10px 12px 12px;
  background: color-mix(in srgb, var(--wb-accent) 8%, var(--paper));
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--wb-accent) 20%, var(--line));
}
.wb-nl-meter-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 8px;
}
.wb-nl-meter-title {
  color: var(--ink);
  font-size: 0.88rem;
}
.wb-nl-meter-summary {
  flex: 1;
  min-width: 140px;
  color: var(--ink-soft);
  line-height: 1.4;
}
.wb-nl-meter-bar-wrap {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 70%, var(--paper));
  overflow: hidden;
  margin-bottom: 6px;
}
.wb-nl-meter-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--wb-accent), var(--wb-accent-soft));
  transition: width 0.35s ease, background 0.25s ease;
}
.wb-nl-meter-bar.is-warn {
  background: linear-gradient(90deg, #c47a2a, #d4a05a);
}
.wb-nl-meter-bar.is-hot {
  background: linear-gradient(90deg, #b44a4a, #d47878);
}
.wb-nl-meter-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.wb-nl-meter-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.wb-nl-meter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--paper) 80%, var(--wb-accent));
  border: 1px solid color-mix(in srgb, var(--wb-accent) 18%, var(--line));
  font-size: 0.75rem;
  color: var(--ink-soft);
  line-height: 1.3;
}
.wb-nl-meter-chip em {
  font-style: normal;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.wb-nl-meter-chip.is-empty {
  opacity: 0.45;
}
.wb-nl-meter-preview {
  margin: 2px 0 0;
}
.wb-nl-meter-preview summary {
  cursor: pointer;
  color: var(--wb-accent);
  font-size: 0.8rem;
  user-select: none;
}
.wb-nl-meter-preview-list {
  margin: 6px 0 0;
  padding-left: 1.15rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.45;
}
.wb-nl-meter-preview-list li { margin: 2px 0; }
.wb-nl-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
  gap: 16px;
  align-items: stretch;
}
.wb-nl-chat {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  max-height: 70vh;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.wb-nl-side .wb-card { margin-top: 0; }
.wb-nl-side .wb-card + .wb-card { margin-top: 14px; }
.wb-nl-draft-title {
  margin: 8px 0 6px;
  font-size: 1rem;
}
.wb-nl-draft {
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  line-height: 1.55;
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 12px;
  color: var(--ink);
}
.wb-nl-illust-ghost {
  display: block;
  margin: 0.35em 0;
  padding: 6px 10px;
  border-left: 3px solid color-mix(in srgb, #3b6ea5 70%, var(--line));
  background: color-mix(in srgb, #3b6ea5 10%, var(--bg));
  color: color-mix(in srgb, #2a4f7a 80%, var(--ink));
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 0 6px 6px 0;
}
.wb-nl-illust-mark {
  display: inline-block;
  margin: 0.2em 0;
  padding: 2px 8px;
  border-radius: 4px;
  background: color-mix(in srgb, #c9a227 22%, var(--bg));
  color: color-mix(in srgb, #6b5420 70%, var(--ink));
  font-weight: 600;
  font-style: normal;
}
.wb-nl-illust-ghost.is-flash,
.wb-nl-illust-mark.is-flash {
  outline: 2px solid color-mix(in srgb, #3b6ea5 70%, transparent);
  outline-offset: 2px;
}
.wb-nl-illust-preview {
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid var(--line, #e5e2d9);
  border-radius: 8px;
  background: color-mix(in srgb, #3b6ea5 6%, var(--paper, #fff));
}
.wb-nl-illust-preview-head {
  margin-bottom: 4px;
  font-size: 0.86rem;
  color: var(--ink);
}
.wb-nl-illust-preview-headline {
  margin: 0 0 8px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--ink-soft, #5c574e);
}
.wb-nl-illust-preview-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wb-nl-illust-preview-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: var(--bg, #faf8f4);
  cursor: pointer;
}
.wb-nl-illust-preview-item:hover,
.wb-nl-illust-preview-item:focus-visible {
  border-color: color-mix(in srgb, #3b6ea5 45%, var(--line));
  outline: none;
}
.wb-nl-illust-preview-item.is-existing {
  border-color: color-mix(in srgb, #c9a227 40%, var(--line));
}
.wb-nl-illust-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  background: color-mix(in srgb, var(--ink) 8%, var(--bg));
  border: 1px solid var(--line);
}
.wb-nl-illust-thumb.is-missing,
.wb-nl-illust-thumb.is-placeholder {
  opacity: 0.35;
  background: repeating-linear-gradient(
    -45deg,
    color-mix(in srgb, var(--ink) 6%, var(--bg)),
    color-mix(in srgb, var(--ink) 6%, var(--bg)) 4px,
    color-mix(in srgb, var(--ink) 12%, var(--bg)) 4px,
    color-mix(in srgb, var(--ink) 12%, var(--bg)) 8px
  );
}
.wb-nl-illust-preview-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 0.8rem;
}
.wb-nl-illust-preview-body strong {
  font-size: 0.78rem;
  color: var(--ink);
}
.wb-nl-illust-cap-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.72rem;
  color: var(--ink-soft, #5c574e);
  margin-top: 2px;
}
.wb-nl-illust-cap-input {
  font: inherit;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 5px 8px;
  border: 1px solid var(--line, #e5e2d9);
  border-radius: 6px;
  background: var(--paper, #fff);
  color: var(--ink);
}
.wb-nl-illust-cap-input:focus {
  outline: 2px solid color-mix(in srgb, #3b6ea5 35%, transparent);
  border-color: color-mix(in srgb, #3b6ea5 50%, var(--line));
}
.wb-nl-illust-cap-actions {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}
.wb-nl-illust-cap-actions .btn {
  font-size: 0.75rem;
  padding: 3px 8px;
}
.wb-nl-illust-slot-shift {
  display: inline-flex;
  gap: 4px;
  margin-left: 2px;
}
.wb-nl-illust-slot-shift .btn {
  min-width: 1.75rem;
  padding: 3px 6px;
  line-height: 1;
}
.wb-nl-draft-find {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg) 88%, var(--line));
}
.wb-nl-draft-find-label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 160px;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.wb-nl-draft-find-label input {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
}
.wb-nl-draft-find-label input:focus {
  outline: 2px solid color-mix(in srgb, #3b6ea5 35%, transparent);
  border-color: color-mix(in srgb, #3b6ea5 50%, var(--line));
}
.wb-nl-draft-find .btn {
  font-size: 0.75rem;
  padding: 3px 8px;
}
.wb-nl-draft-find-count {
  font-size: 0.74rem;
  color: var(--ink-soft);
  min-width: 2.5rem;
}
.wb-nl-find-hit {
  background: color-mix(in srgb, #c9a227 28%, transparent);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}
.wb-nl-find-hit.is-current {
  background: color-mix(in srgb, #3b6ea5 38%, transparent);
  outline: 1px solid color-mix(in srgb, #3b6ea5 55%, var(--line));
}
.wb-nl-draft.is-place-mode .wb-nl-draft-para {
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.12s ease;
}
.wb-nl-draft.is-place-mode .wb-nl-draft-para:hover,
.wb-nl-draft.is-place-mode .wb-nl-draft-para:focus-visible {
  background: color-mix(in srgb, #3b6ea5 12%, transparent);
  outline: 1px dashed color-mix(in srgb, #3b6ea5 45%, var(--line));
  outline-offset: 2px;
}
.wb-nl-draft-para {
  display: block;
}
.wb-nl-illust-preview-item.is-placing {
  outline: 2px solid color-mix(in srgb, #3b6ea5 55%, var(--line));
  outline-offset: 1px;
  background: color-mix(in srgb, #3b6ea5 8%, var(--bg));
}
.wb-nl-illust-preview-cap {
  color: var(--ink);
  line-height: 1.35;
}
.wb-nl-illust-preview-pos {
  color: var(--ink-soft);
  font-size: 0.74rem;
}
.wb-nl-char-meter {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--line, #e5e2d9);
  border-radius: 8px;
  background: var(--bg, #faf8f4);
}
.wb-nl-char-meter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wb-nl-char-meter-title {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft, #5c574e);
}
.wb-nl-char-meter-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--line, #d8d2c8);
  overflow: hidden;
}
.wb-nl-char-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: #e67700;
  transition: width 0.25s ease, background 0.25s ease;
}
.wb-nl-char-meter.is-low .wb-nl-char-meter-fill {
  background: #e03131;
}
.wb-nl-char-meter.is-mid .wb-nl-char-meter-fill {
  background: #e67700;
}
.wb-nl-char-meter.is-ok .wb-nl-char-meter-fill {
  background: #2f9e44;
}
.wb-nl-char-meter-label {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft, #5c574e);
  min-width: 5.2em;
  text-align: right;
}
.wb-nl-char-meter-hint {
  margin: 6px 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--ink-soft, #5c574e);
}
.wb-nl-read-estimate {
  margin: 4px 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--ink, #2c2923);
}
.wb-nl-read-estimate.is-slow {
  color: #9c6b1a;
}
.wb-nl-read-estimate.is-fast {
  color: #2b6cb0;
}
.wb-nl-read-estimate.is-ok {
  color: #2f6f3e;
}
.wb-nl-batch {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--line, #e5e2d9);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg, #faf8f4) 88%, #dfe8f2);
}
.wb-nl-batch-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.wb-nl-batch-head strong {
  font-size: 0.92rem;
}
.wb-nl-batch-note {
  font-size: 0.75rem;
  color: var(--ink-soft, #5c574e);
}
.wb-nl-batch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 8px;
}
.wb-nl-batch-row .wb-nl-field {
  margin: 0;
  font-size: 0.82rem;
}
.wb-nl-batch-row input[type="number"] {
  width: 4.8rem;
  margin-left: 6px;
  padding: 4px 6px;
}
.wb-nl-batch-review {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 8px;
  font-size: 0.82rem;
}
.wb-nl-batch-review label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.wb-nl-batch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.wb-nl-batch-status {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--ink-soft, #5c574e);
}
.wb-nl-batch-status[data-kind="warn"] {
  color: #9c6b1a;
}
.wb-nl-batch-status[data-kind="gate"] {
  color: #9c6b1a;
  font-weight: 600;
}
.wb-nl-batch-status[data-kind="review"],
.wb-nl-batch-status[data-kind="ok"] {
  color: #2f6f3e;
}
.wb-nl-batch.is-active .wb-nl-batch-status {
  color: var(--ink, #2c2923);
}
.wb-nl-batch.is-active .wb-nl-batch-status[data-kind="warn"],
.wb-nl-batch.is-active .wb-nl-batch-status[data-kind="gate"] {
  color: #9c6b1a;
}
.wb-nl-batch.is-active .wb-nl-batch-status[data-kind="review"],
.wb-nl-batch.is-active .wb-nl-batch-status[data-kind="ok"] {
  color: #2f6f3e;
}
.wb-nl-batch-gate {
  margin: 8px 0 0;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, #c48a2a 35%, var(--line, #e5e2d9));
  border-radius: 8px;
  background: color-mix(in srgb, #fff8eb 88%, #f0e6d4);
}
.wb-nl-batch-gate-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  margin-bottom: 6px;
}
.wb-nl-batch-gate-head strong {
  font-size: 0.84rem;
  color: #8a5a12;
}
.wb-nl-batch-gate-head .btn {
  font-size: 0.75rem;
  padding: 2px 8px;
}
.wb-nl-batch-gate-list {
  margin: 0 0 6px;
  padding: 0 0 0 1.1rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--ink, #2c2923);
}
.wb-nl-batch-gate-list li {
  margin: 0 0 3px;
}
.wb-nl-batch-gate-hint {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--ink-soft, #5c574e);
}
.wb-nl-batch-beat {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px 8px;
  margin: 6px 0 0;
  padding: 6px 8px;
  border: 1px solid var(--line, #e5e2d9);
  border-radius: 6px;
  background: #f7f5f0;
}
.wb-nl-batch-beat-label {
  flex: 1 1 12rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--ink, #2c2923);
}
.wb-nl-batch-beat .wb-nl-beat-prompt {
  flex: 0 0 auto;
  font-size: 0.75rem;
  padding: 2px 8px;
}
.wb-nl-batch-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.wb-nl-precommit {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--line, #e5e2d9);
  border-radius: 8px;
  background: #f3f6f1;
}
.wb-nl-precommit.is-warn {
  background: #faf4eb;
  border-color: #e8d5b5;
}
.wb-nl-precommit.is-ok {
  background: #eef7ef;
  border-color: #c6e0c8;
}
.wb-nl-precommit-line {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--ink, #2c2923);
}
.wb-nl-precommit-diff {
  margin: 5px 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #4a5a48;
}
.wb-nl-precommit-diff.is-loading {
  color: #7a7a70;
}
.wb-nl-precommit-diff.is-empty {
  color: #8a7a60;
}
.wb-nl-precommit-diff.is-ready {
  color: #3d5240;
}
.wb-nl-precommit-collision {
  margin: 6px 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #8a5a12;
}
.wb-nl-precommit-collision.is-findable {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}
.wb-nl-precommit-collision.is-findable:hover,
.wb-nl-precommit-collision.is-findable:focus {
  color: #6b440e;
  outline: none;
}
.wb-nl-precommit.has-collision {
  border-color: #e0c08a;
}
.wb-nl-precommit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.wb-nl-precommit-actions:empty {
  display: none;
}
.wb-nl-precommit-actions .btn {
  font-size: 0.78rem;
  padding: 4px 8px;
}
.wb-nl-draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wb-nl-reopen {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line, #e5e2d9);
}
.wb-nl-reopen .wb-nl-field {
  flex: 1 1 160px;
  margin: 0;
}
.wb-nl-reopen select {
  width: 100%;
}
.wb-nl-reopen .wb-nl-check {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.86rem;
  color: var(--wb-muted, #6b7280);
  cursor: pointer;
  user-select: none;
}
.wb-nl-reopen .wb-nl-check input {
  margin: 0;
}
.wb-nl-audio {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1 1 100%;
  margin: 0;
}
.wb-nl-audio-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-soft, #6b7280);
}
.wb-nl-audio-field-label {
  white-space: nowrap;
}
.wb-nl-audio-voice,
.wb-nl-audio-rate {
  max-width: 180px;
  padding: 6px 8px;
  border: 1px solid var(--line, #e5e2d9);
  border-radius: 8px;
  background: var(--bg, #fff);
  color: var(--ink, #1f2937);
  font-family: var(--font-ui);
  font-size: 0.8rem;
}
.wb-nl-audio-rate {
  max-width: 96px;
}
.wb-nl-audio-status {
  font-size: 0.8rem;
  color: var(--ink-soft, #6b7280);
  min-height: 1.2em;
}
.wb-nl-audio-status.is-err {
  color: #b45309;
}
.wb-nl-audio-status.is-ok {
  color: var(--wb-accent, #0f766e);
}
#nl-audio-prev,
#nl-audio-next {
  min-width: 4.5rem;
}
.wb-nl-audio-follow {
  flex: 1 1 100%;
  max-height: 9.5rem;
  overflow: auto;
  margin: 6px 0 0;
  padding: 8px 10px;
  border: 1px solid var(--line, #e5e2d9);
  border-radius: 10px;
  background: color-mix(in srgb, var(--wb-accent, #0f766e) 4%, var(--bg, #fff));
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--ink, #1f2937);
}
.wb-nl-audio-follow[hidden] {
  display: none !important;
}
.wb-nl-audio-chunk {
  margin: 0 0 0.55em;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.wb-nl-audio-follow.is-seekable .wb-nl-audio-chunk {
  cursor: pointer;
}
.wb-nl-audio-follow.is-seekable .wb-nl-audio-chunk:hover {
  background: color-mix(in srgb, var(--wb-accent, #0f766e) 10%, transparent);
}
.wb-nl-audio-follow.is-seekable .wb-nl-audio-chunk:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--wb-accent, #0f766e) 55%, transparent);
  outline-offset: 1px;
}
.wb-nl-audio-chunk:last-child {
  margin-bottom: 0;
}
.wb-nl-audio-chunk.is-now,
.wb-nl-draft .wb-nl-audio-now {
  background: color-mix(in srgb, var(--wb-accent, #0f766e) 16%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--wb-accent, #0f766e) 12%, transparent);
}
.wb-nl-draft .wb-nl-draft-para.wb-nl-audio-now {
  border-radius: 6px;
}
.wb-nl-draft.is-audio-live:not(.is-place-mode) .wb-nl-draft-para {
  cursor: pointer;
}
.wb-nl-draft.is-audio-live:not(.is-place-mode) .wb-nl-draft-para:hover {
  background: color-mix(in srgb, var(--wb-accent, #0f766e) 8%, transparent);
  border-radius: 6px;
}
.wb-nl-shelf-history {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 8px 0 0;
}
.wb-nl-shelf-history-label {
  font-size: 0.75rem;
  color: var(--ink-soft, #6b7280);
  white-space: nowrap;
}
.wb-nl-shelf-history-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}
.wb-nl-shelf-history-chip {
  appearance: none;
  border: 1px solid var(--line, #e5e2d9);
  background: color-mix(in srgb, var(--bg, #fff) 88%, var(--wb-accent, #0f766e));
  color: var(--ink, #1f2937);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.75rem;
  line-height: 1.35;
  cursor: pointer;
  font-family: var(--font-ui);
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wb-nl-shelf-history-chip:hover,
.wb-nl-shelf-history-chip:focus-visible {
  border-color: var(--wb-accent, #0f766e);
  outline: none;
}
.wb-nl-shelf-history-clear {
  padding: 2px 8px;
  font-size: 0.72rem;
  line-height: 1.3;
}
.wb-nl-shelf-hit {
  background: color-mix(in srgb, #fbbf24 55%, transparent);
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}
.wb-nl-book-match {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1.4;
  background: color-mix(in srgb, #fbbf24 28%, var(--bg, #fff));
  color: var(--ink, #1f2937);
}
.wb-nl-versions {
  margin: 0 0 12px;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--line, #e5e2d9);
}
.wb-nl-versions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.wb-nl-versions-head strong {
  font-size: 0.95rem;
}
.wb-nl-versions .wb-nl-field {
  margin: 0 0 8px;
}
.wb-nl-versions select {
  width: 100%;
}
.wb-nl-version-caption {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line, #e5e2d9);
  border-radius: 8px;
  background: var(--bg, #fff);
  color: var(--ink, #222);
  font-family: var(--font-ui);
  font-size: 0.9rem;
}
.wb-nl-versions-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  max-height: 180px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wb-nl-versions-list:empty::after {
  content: "아직 이전 버전이 없어요.";
  display: block;
  font-size: 0.88rem;
  color: var(--wb-muted, #6b7280);
}
.wb-nl-version-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 8px 10px;
  border: 1px solid var(--line, #e5e2d9);
  border-radius: 8px;
  background: var(--wb-card-soft, #faf9f6);
}
.wb-nl-version-meta {
  flex: 1 1 140px;
  font-size: 0.88rem;
  line-height: 1.35;
}
.wb-nl-version-meta em {
  font-style: normal;
  color: var(--wb-muted, #6b7280);
}
.wb-nl-version-cap {
  display: block;
  margin-top: 2px;
  font-size: 0.82rem;
  color: var(--ink-soft, #4b5563);
}
.wb-nl-version-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.wb-nl-version-picks {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.wb-nl-version-pick {
  min-width: 2rem;
  padding: 2px 8px;
  font-weight: 700;
  opacity: 0.72;
}
.wb-nl-version-pick.is-on {
  opacity: 1;
  outline: 2px solid color-mix(in srgb, var(--wb-accent, #8a5a2b) 70%, transparent);
  outline-offset: 1px;
  background: color-mix(in srgb, var(--wb-accent, #8a5a2b) 14%, var(--bg, #fff));
}
.wb-nl-version-pair {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px dashed var(--line, #e5e2d9);
  border-radius: 8px;
  background: color-mix(in srgb, var(--wb-card-soft, #faf9f6) 80%, var(--bg, #fff));
}
.wb-nl-version-pair-label {
  flex: 1 1 160px;
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--ink-soft, #4b5563);
}
.wb-nl-publish-status {
  margin: 6px 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--wb-muted, #6b7280);
}
.wb-nl-publish-status.is-on {
  color: #2f9e44;
}
.wb-nl-publish-status.is-off {
  color: #868e96;
}
.wb-nl-publish-status.is-err {
  color: #c92a2a;
}
.wb-nl-cover-status {
  margin: 6px 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--wb-muted, #6b7280);
}
.wb-nl-cover-status.is-busy {
  color: #3b5bdb;
}
.wb-nl-cover-status.is-done {
  color: #2f9e44;
}
.wb-nl-cover-status.is-err {
  color: #c92a2a;
}
.wb-nl-illust-status {
  margin: 10px 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--wb-muted, #6b7280);
}
.wb-nl-illust-status.is-busy {
  color: #3b5bdb;
}
.wb-nl-illust-status.is-done {
  color: #2f9e44;
}
.wb-nl-illust-status.is-err {
  color: #c92a2a;
}
.wb-nl-draft-save-hint {
  margin: 8px 0 0;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--ink-soft, #5c574e);
}
.wb-nl-draft-save-hint.is-busy {
  color: #3b5bdb;
}
.wb-nl-draft-save-hint.is-ok {
  color: #2f9e44;
}
.wb-nl-draft-save-hint.is-err {
  color: #c92a2a;
}
.wb-nl-voice {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
  margin: 0 0 10px;
  padding: 0 2px;
}
.wb-nl-voice .wb-nl-field {
  flex: 1 1 180px;
  margin: 0;
}
.wb-nl-voice select {
  width: 100%;
  max-width: 280px;
}
.wb-nl-voice-hint {
  margin: 0;
  flex: 2 1 200px;
  font-size: 0.8rem;
  color: var(--ink-soft, #5c574e);
}
.wb-nl-glossary-hint {
  margin: -6px 0 10px;
  font-size: 0.82rem;
  color: var(--wb-muted, #6b7280);
}
.wb-nl-gloss {
  border-bottom: 1px dotted #3b5bdb;
  cursor: help;
  position: relative;
  color: inherit;
}
.wb-nl-gloss:hover,
.wb-nl-gloss:focus {
  background: rgba(59, 91, 219, 0.08);
}
.wb-nl-gloss:hover::after,
.wb-nl-gloss:focus::after {
  content: attr(data-tip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  z-index: 5;
  min-width: 140px;
  max-width: 260px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #1f2937;
  color: #f9fafb;
  font-size: 0.78rem;
  line-height: 1.4;
  white-space: normal;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}
.wb-nl-goals-panel {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line, #d8d2c8);
  border-radius: 10px;
  background: var(--bg-soft, #f7f5f1);
}
.wb-nl-bible-panel {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line, #d8d2c8);
  border-radius: 10px;
  background: #f4f6f3;
}
.wb-nl-bible-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.wb-nl-bible-head strong {
  font-size: 0.92rem;
}
.wb-nl-bible-head-actions {
  display: flex;
  gap: 6px;
}
.wb-nl-bible-headline {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: var(--muted, #6b6560);
  line-height: 1.45;
}
.wb-nl-bible-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  max-height: 320px;
  overflow: auto;
}
.wb-nl-bible-list li,
.wb-nl-bible-row {
  display: grid;
  grid-template-columns: minmax(4.5rem, auto) minmax(2.5rem, auto) 1fr auto;
  gap: 4px 8px;
  padding: 8px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.84rem;
  line-height: 1.4;
  align-items: start;
}
.wb-nl-bible-list li:first-child {
  border-top: 0;
}
.wb-nl-bible-row.is-flash,
.wb-nl-bible-panel.is-flash {
  outline: 2px solid #6a8f6e;
  outline-offset: 2px;
  border-radius: 8px;
}
.wb-nl-bible-name {
  font-weight: 650;
  color: #2f3a2c;
}
.wb-nl-bible-debut {
  color: var(--muted, #6b6560);
  font-size: 0.75rem;
  padding-top: 2px;
}
.wb-nl-bible-field {
  grid-column: 1 / -2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.72rem;
  color: var(--muted, #6b6560);
}
.wb-nl-bible-role-input,
.wb-nl-bible-look-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line, #d8d2c8);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.82rem;
  background: #fff;
}
.wb-nl-bible-role-input:focus,
.wb-nl-bible-look-input:focus {
  outline: none;
  border-color: #6a8f6e;
}
.wb-nl-bible-actions {
  grid-column: -2 / -1;
  grid-row: 2 / span 2;
  align-self: center;
}
.wb-nl-bible-actions .btn {
  font-size: 0.75rem;
  padding: 4px 8px;
}
.wb-nl-bible-role {
  color: var(--muted, #6b6560);
  font-size: 0.78rem;
}
.wb-nl-bible-look {
  grid-column: 1 / -1;
  color: #3d4a38;
  font-size: 0.8rem;
}
.wb-nl-bible-look:empty {
  display: none;
}
.wb-nl-illust-look-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-top: 4px;
  font-size: 0.75rem;
  color: #3d4a38;
}
.wb-nl-illust-look-preview.is-empty {
  color: var(--muted, #6b6560);
}
.wb-nl-illust-look-label {
  font-weight: 600;
  color: var(--muted, #6b6560);
}
.wb-nl-illust-look-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.wb-nl-illust-look-chip {
  border: 1px solid #c5d0c2;
  background: #eef3ec;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  cursor: pointer;
  color: #2f3a2c;
}
.wb-nl-illust-look-chip.is-missing-look {
  border-color: #c9a27a;
  background: #fbf6ef;
  color: #6a4a2c;
}
.wb-nl-illust-look-jump {
  font-size: 0.72rem;
  padding: 2px 8px;
}
.wb-nl-illust-look-empty {
  font-size: 0.72rem;
}
.wb-nl-bible-sync-opt {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 10px;
  padding: 6px 8px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #5a4634;
  background: #f7f1e8;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
}
.wb-nl-bible-sync-opt input {
  margin-top: 2px;
  flex-shrink: 0;
}
.wb-nl-illust-prompt-preview {
  margin-top: 6px;
  border: 1px solid #e2d4c2;
  border-radius: 8px;
  background: #faf7f2;
}
.wb-nl-illust-prompt-preview > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  font-size: 0.76rem;
  color: #5a4634;
  user-select: none;
}
.wb-nl-illust-prompt-preview > summary::-webkit-details-marker {
  display: none;
}
.wb-nl-illust-prompt-preview > summary::before {
  content: "▸";
  color: #8a6a4a;
  margin-right: 4px;
  flex-shrink: 0;
}
.wb-nl-illust-prompt-preview[open] > summary::before {
  content: "▾";
}
.wb-nl-illust-prompt-summary-label {
  flex: 1;
  min-width: 0;
}
.wb-nl-illust-prompt-summary-meta {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: #8a6a4a;
}
.wb-nl-illust-prompt-body {
  padding: 0 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wb-nl-illust-prompt-text {
  margin: 0;
  padding: 8px;
  max-height: 9.5rem;
  overflow: auto;
  font-size: 0.72rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  color: #3a3228;
  background: #fff;
  border: 1px solid #eadfcf;
  border-radius: 6px;
  font-family: "Consolas", "Courier New", monospace;
}
.wb-nl-illust-prompt-edit-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.7rem;
  color: #8a6a4a;
}
.wb-nl-illust-prompt-edit {
  margin: 0;
  padding: 8px;
  min-height: 6.5rem;
  max-height: 12rem;
  resize: vertical;
  overflow: auto;
  font-size: 0.72rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  color: #3a3228;
  background: #fff;
  border: 1px solid #eadfcf;
  border-radius: 6px;
  font-family: "Consolas", "Courier New", monospace;
  box-sizing: border-box;
  width: 100%;
}
.wb-nl-illust-prompt-edit:focus {
  outline: none;
  border-color: #c9a27a;
  box-shadow: 0 0 0 2px rgba(201, 162, 122, 0.25);
}
.wb-nl-illust-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.wb-nl-illust-prompt-actions .btn {
  font-size: 0.72rem;
  padding: 2px 8px;
}
.wb-nl-illust-prompt-copied {
  font-size: 0.7rem;
  color: #2f6b45;
}
.wb-nl-illust-prompt-dirty {
  font-size: 0.7rem;
  color: #8a5a2b;
}
.wb-nl-illust-negative-label {
  display: block;
  margin-top: 8px;
  font-size: 0.72rem;
  color: #6a5040;
}
.wb-nl-illust-negative-edit {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 6px 8px;
  border: 1px solid #e2d4c2;
  border-radius: 6px;
  background: #fff;
  font-size: 0.78rem;
  line-height: 1.35;
  resize: vertical;
  min-height: 2.4em;
  box-sizing: border-box;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
.wb-nl-illust-negative-edit:focus {
  outline: none;
  border-color: #c9a27a;
  box-shadow: 0 0 0 2px rgba(201, 162, 122, 0.25);
}
.wb-nl-illust-negative-tip {
  font-size: 0.7rem;
  color: #8a5a2b;
}
.wb-nl-bible-look-gloss {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  padding: 2px 0 0;
}
.wb-nl-bible-look-gloss-label {
  font-size: 0.7rem;
  color: #8a6a4a;
}
.wb-nl-bible-look-gloss-text {
  font-size: 0.74rem;
  color: #3d2f24;
  background: #f3ebe0;
  padding: 2px 6px;
  border-radius: 4px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.wb-nl-bible-look-gloss-copy {
  font-size: 0.72rem !important;
  padding: 2px 8px !important;
}
.wb-nl-bible-look-gloss-copied {
  font-size: 0.7rem;
  color: #2f6b45;
}
.wb-nl-bible-look-suggest {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  padding: 4px 0 0;
}
.wb-nl-bible-look-suggest-label {
  font-size: 0.7rem;
  color: #8a6a4a;
}
.wb-nl-bible-look-suggest-chip,
.wb-nl-bible-look-suggest-apply {
  font-size: 0.72rem !important;
  padding: 2px 8px !important;
}
.wb-nl-bible-look-suggest-chip {
  background: #f3ebe0;
  border-color: #e2d4c2;
}
.wb-nl-draft-conflict {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #c9a27a;
  border-radius: 10px;
  background: #fbf6ef;
}
.wb-nl-draft-conflict-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.wb-nl-draft-conflict-headline {
  margin: 0 0 8px;
  font-size: 0.86rem;
  color: #6a4a2c;
  line-height: 1.45;
}
.wb-nl-draft-conflict-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.wb-nl-draft-conflict-col h4 {
  margin: 0 0 4px;
  font-size: 0.82rem;
}
.wb-nl-draft-conflict-meta {
  margin: 0 0 6px;
  font-size: 0.75rem;
  color: var(--muted, #6b6560);
}
.wb-nl-draft-conflict-preview {
  margin: 0;
  padding: 8px;
  max-height: 140px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.75rem;
  line-height: 1.4;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
}
.wb-nl-draft-conflict-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
@media (max-width: 720px) {
  .wb-nl-draft-conflict-cols {
    grid-template-columns: 1fr;
  }
}
.wb-nl-upcoming-beats {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line, #d8d2c8);
  border-radius: 10px;
  background: #f5f3ef;
}
.wb-nl-upcoming-beats-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.wb-nl-upcoming-beats-head strong {
  font-size: 0.92rem;
}
.wb-nl-upcoming-beats-label {
  font-size: 0.78rem;
  color: var(--muted, #6b6560);
}
.wb-nl-upcoming-beats-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wb-nl-upcoming-beats-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 2px 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line, #e5e2d9);
}
.wb-nl-upcoming-beats-list li.is-empty {
  display: block;
  font-size: 0.84rem;
  color: var(--muted, #6b6560);
  background: transparent;
  border-style: dashed;
}
.wb-nl-upcoming-meta {
  grid-column: 1;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted, #6b6560);
}
.wb-nl-upcoming-text {
  grid-column: 1;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--ink, #2c2923);
}
.wb-nl-upcoming-beats-list .wb-nl-beat-prompt {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  white-space: nowrap;
  font-size: 0.78rem;
  padding: 4px 8px;
}
.wb-nl-goals-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.wb-nl-goals-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.wb-nl-goals-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
}
.wb-nl-goals-progress-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--line, #d8d2c8);
  overflow: hidden;
}
.wb-nl-goals-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: #2f9e44;
  transition: width 0.25s ease;
}
.wb-nl-goals-progress.is-empty .wb-nl-goals-progress-fill {
  background: var(--ink-soft, #5c574e);
  opacity: 0.35;
}
.wb-nl-goals-progress.is-partial .wb-nl-goals-progress-fill {
  background: #e67700;
}
.wb-nl-goals-progress.is-done .wb-nl-goals-progress-fill {
  background: #2f9e44;
}
.wb-nl-goals-progress-label {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft, #5c574e);
  min-width: 2.6em;
  text-align: right;
}
.wb-nl-goals-headline {
  margin: 0 0 6px;
  font-size: 0.88rem;
  line-height: 1.4;
}
.wb-nl-goals-headline.is-next {
  margin-top: 12px;
  color: var(--ink-soft, #5c574e);
}
.wb-nl-goals-list {
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
}
.wb-nl-goals-list li {
  position: relative;
  margin: 0 0 8px;
  padding: 8px 10px 8px 28px;
  border-radius: 6px;
  background: var(--paper, #fff);
  border: 1px solid var(--line, #d8d2c8);
  font-size: 0.86rem;
  line-height: 1.45;
}
.wb-nl-goals-list li::before {
  content: "○";
  position: absolute;
  left: 8px;
  top: 8px;
  color: var(--ink-soft, #5c574e);
}
.wb-nl-goals-list li.is-done {
  border-color: #b2f2bb;
  background: #ebfbee;
}
.wb-nl-goals-list li.is-done::before {
  content: "✓";
  color: #2f9e44;
}
.wb-nl-goals-list li.is-partial::before {
  content: "◐";
  color: #e67700;
}
.wb-nl-goals-list li.is-upcoming {
  opacity: 0.88;
}
.wb-nl-goals-list .wb-nl-goal-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--ink-soft, #5c574e);
}
.wb-nl-goals-list .wb-nl-beat-prompt,
.wb-nl-goals-list .wb-nl-goal-edit,
.wb-nl-goals-list .wb-nl-goal-del,
.wb-nl-goals-list .wb-nl-goal-save,
.wb-nl-goals-list .wb-nl-goal-cancel {
  display: inline-block;
  margin-top: 6px;
  margin-right: 4px;
  padding: 3px 8px;
  font-size: 0.78rem;
  line-height: 1.3;
}
.wb-nl-goal-actions {
  margin-top: 4px;
}
.wb-nl-goal-edit-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 4px 0;
  padding: 6px 8px;
  font: inherit;
  border: 1px solid var(--line, #d8d2c8);
  border-radius: 6px;
  background: var(--paper, #fff);
}
.wb-nl-pacing-panel {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--line, #d8d2c8);
  border-radius: 10px;
  background: var(--bg-soft, #f7f5f1);
}
.wb-nl-pacing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.wb-nl-pacing-headline {
  margin: 0 0 6px;
  font-size: 0.88rem;
  line-height: 1.4;
}
.wb-nl-pacing-list {
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
}
.wb-nl-pacing-list li {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--paper, #fff);
  border: 1px solid var(--line, #d8d2c8);
  font-size: 0.86rem;
  line-height: 1.45;
}
.wb-nl-pacing-list li.is-warn {
  border-color: #ffd8a8;
  background: #fff9db;
}
.wb-nl-pacing-list li.is-ok {
  border-color: #b2f2bb;
  background: #ebfbee;
  color: var(--ink-soft, #5c574e);
}
.wb-nl-pacing-list li.is-info {
  border-color: #a5d8ff;
  background: #e7f5ff;
}
.wb-nl-pacing-msg {
  display: block;
}
.wb-nl-pacing-prompt,
.wb-nl-pacing-voice {
  display: inline-block;
  margin-top: 6px;
  margin-right: 4px;
  padding: 3px 8px;
  font-size: 0.78rem;
  line-height: 1.3;
}
.wb-nl-pacing-voice-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 6px;
}
.wb-nl-pacing-voice-links .btn {
  padding: 3px 8px;
  font-size: 0.78rem;
  line-height: 1.3;
}
.wb-nl-term-first-panel {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--line, #d8d2c8);
  border-radius: 10px;
  background: var(--bg-soft, #f7f5f1);
}
.wb-nl-term-first-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.wb-nl-term-first-headline {
  margin: 0 0 6px;
  font-size: 0.88rem;
  line-height: 1.4;
}
.wb-nl-term-first-list {
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
}
.wb-nl-term-first-list li {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--paper, #fff);
  border: 1px solid var(--line, #d8d2c8);
  font-size: 0.86rem;
  line-height: 1.45;
}
.wb-nl-term-first-list li.is-warn {
  border-color: #ffd8a8;
  background: #fff9db;
}
.wb-nl-term-first-list li.is-ok {
  border-color: #b2f2bb;
  background: #ebfbee;
  color: var(--ink-soft, #5c574e);
}
.wb-nl-term-first-msg {
  display: block;
}
.wb-nl-term-first-prompt {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 8px;
  font-size: 0.78rem;
  line-height: 1.3;
}
.wb-nl-lint-panel {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line, #d8d2c8);
  border-radius: 10px;
  background: var(--bg-soft, #f7f5f1);
}
.wb-nl-lint-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.wb-nl-lint-headline {
  margin: 0 0 8px;
  font-size: 0.92rem;
}
.wb-nl-lint-list {
  margin: 0 0 8px;
  padding-left: 1.2em;
  font-size: 0.88rem;
  line-height: 1.45;
}
.wb-nl-lint-list li {
  margin: 0 0 6px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.wb-nl-lint-list li .wb-nl-lint-msg {
  flex: 1;
  min-width: 0;
}
.wb-nl-lint-list li .wb-nl-lint-typo-apply,
.wb-nl-lint-list li .wb-nl-lint-fill-threads {
  flex-shrink: 0;
  font-size: 0.8rem;
  padding: 2px 8px;
}
.wb-nl-lint-typo-all {
  font-size: 0.8rem;
  padding: 2px 8px;
  margin-left: auto;
}
.wb-nl-lint-list li.is-info {
  color: var(--ink-soft, #5c574e);
}
.wb-nl-lint-list li.is-warn {
  color: var(--ink, #1f1b16);
}
.wb-nl-lint-list li.is-findable {
  cursor: pointer;
  border-radius: 6px;
  padding: 2px 4px;
  margin-left: -4px;
}
.wb-nl-lint-list li.is-findable:hover,
.wb-nl-lint-list li.is-findable:focus {
  background: rgba(180, 140, 60, 0.12);
  outline: none;
}
.wb-nl-outline-sync {
  border-left: 3px solid rgba(196, 165, 116, 0.85);
}
.wb-nl-outline-sync-msg {
  margin: 0 0 6px;
}
.wb-nl-outline-sync-detail {
  margin: 0 0 10px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink-soft, #5c574e);
}
.wb-nl-outline-sync-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wb-nl-reader-jump {
  border-left: 3px solid rgba(59, 91, 219, 0.75);
}
.wb-nl-reader-jump-msg {
  margin: 0 0 8px;
}
.wb-nl-reader-jump-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wb-nl-world-patch {
  border-left: 3px solid rgba(74, 107, 82, 0.85);
}
.wb-nl-world-patch-msg {
  margin: 0 0 6px;
}
.wb-nl-world-patch-detail {
  margin: 0 0 10px;
}
.wb-nl-world-patch-targets {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--ink-soft, #5c574e);
}
.wb-nl-world-patch-preview {
  margin: 0 0 8px;
  padding: 8px 10px;
  max-height: 140px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.82rem;
  line-height: 1.45;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 6px;
}
.wb-nl-world-patch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wb-nl-compress-status {
  margin: 8px 0 10px;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--wb-muted, #6b7280);
}
.wb-nl-compress-status.is-busy {
  color: #3b5bdb;
}
.wb-nl-compress-status.is-done {
  color: #2f9e44;
}
.wb-nl-compress-status.is-err {
  color: #c92a2a;
}
.wb-nl-compress-arcs-range-chip {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #4a5568;
  background: rgba(226, 232, 240, 0.9);
  vertical-align: middle;
}
.wb-nl-compress-arcs-range-chip[hidden] {
  display: none !important;
}
.wb-nl-stale-arc-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  line-height: 1.35;
  color: #9c4221;
  background: rgba(255, 227, 199, 0.95);
  vertical-align: middle;
  cursor: default;
}
.wb-nl-stale-arc-badge[hidden] {
  display: none !important;
}
.wb-nl-stale-arc-badge.is-fresh {
  color: #2f6b3a;
  background: rgba(210, 235, 216, 0.95);
}
.wb-nl-compress-stale-only {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  font-size: 0.8rem;
  color: var(--ink-soft, #6b6560);
  cursor: pointer;
  vertical-align: middle;
}
.wb-nl-compress-stale-only input {
  margin: 0;
}
.wb-nl-compress-range-hint {
  margin: 4px 0 8px;
  font-size: 0.78rem;
}
.wb-nl-refresh-summaries-status {
  margin: 8px 0 10px;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--wb-muted, #6b7280);
}
.wb-nl-refresh-summaries-status.is-busy {
  color: #3b5bdb;
}
.wb-nl-refresh-summaries-status.is-done {
  color: #2f9e44;
}
.wb-nl-refresh-summaries-status.is-err {
  color: #c92a2a;
}
.wb-nl-refresh-summaries-range {
  margin: 6px 0 4px;
}
.wb-nl-sql-mirror {
  margin: 0.35rem 0 0.6rem;
  font-size: 0.78rem;
  color: #6a655c;
  letter-spacing: 0.01em;
}
.wb-nl-sql-mirror.is-on {
  color: #4a6b52;
}
.wb-nl-sql-mirror.is-off {
  color: #8a8578;
}
.wb-nl-export-status {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--wb-muted, #6b7280);
  width: 100%;
}
.wb-nl-export-status.is-busy {
  color: #3b5bdb;
}
.wb-nl-export-status.is-done {
  color: #2f9e44;
}
.wb-nl-export-status.is-err {
  color: #c92a2a;
}
.wb-nl-illust-missing-panel {
  margin: 8px 0 0;
  padding: 10px 12px;
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: rgba(255, 250, 245, 0.95);
  box-sizing: border-box;
}
.wb-nl-illust-missing-panel.is-ok {
  background: rgba(240, 250, 242, 0.95);
  border-color: rgba(47, 158, 68, 0.25);
}
.wb-nl-illust-missing-panel.is-warn {
  background: rgba(255, 248, 240, 0.98);
  border-color: rgba(217, 119, 6, 0.28);
}
.wb-nl-illust-missing-headline {
  margin: 0 0 6px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--ink-soft, #5c574e);
}
.wb-nl-illust-missing-list {
  margin: 0;
  padding-left: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #7c2d12;
  max-height: 12rem;
  overflow: auto;
  list-style: none;
}
.wb-nl-illust-missing-panel.is-ok .wb-nl-illust-missing-list {
  color: #3d6b45;
}
.wb-nl-illust-missing-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 6px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(124, 45, 18, 0.08);
}
.wb-nl-illust-missing-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.wb-nl-illust-missing-row-text {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.4;
}
.wb-nl-illust-missing-one {
  flex: 0 0 auto;
  margin: 0;
  padding: 2px 8px;
  font-size: 0.78rem;
  line-height: 1.3;
  white-space: nowrap;
}
.wb-nl-illust-missing-one:disabled {
  opacity: 0.55;
  cursor: wait;
}
.wb-nl-illust-force-regen {
  margin: 0;
  padding: 2px 8px;
  font-size: 0.78rem;
  line-height: 1.3;
  white-space: nowrap;
}
.wb-nl-illust-force-regen:disabled {
  opacity: 0.55;
  cursor: wait;
}
.wb-nl-illust-regen-status {
  margin: 8px 0 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--wb-muted, #6b7280);
}
.wb-nl-illust-regen-status.is-busy {
  color: #3b5bdb;
}
.wb-nl-illust-regen-status.is-done {
  color: #2f9e44;
}
.wb-nl-illust-regen-status.is-err {
  color: #c92a2a;
}
.wb-nl-book-illust {
  align-self: flex-start;
  margin-top: 2px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #9c6b1a;
}
.wb-nl-book-illust.is-ok {
  color: #2f6f3e;
}
.wb-nl-diff-panel {
  margin: 12px 0 8px;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: rgba(255, 252, 247, 0.9);
}
.wb-nl-diff-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.wb-nl-diff-headline {
  margin: 0 0 6px;
  font-size: 0.92rem;
  line-height: 1.45;
}
.wb-nl-diff-stats {
  margin: 0 0 6px;
  font-size: 0.85rem;
  color: var(--ink-soft, #5c574e);
}
.wb-nl-diff-saved {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: #3b5bdb;
}
.wb-nl-diff-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.78rem;
}
.wb-nl-diff-legend span {
  padding: 2px 8px;
  border-radius: 4px;
}
.wb-nl-diff-legend .is-same {
  background: rgba(0, 0, 0, 0.04);
}
.wb-nl-diff-legend .is-added {
  background: rgba(47, 158, 68, 0.15);
  color: #2b8a3e;
}
.wb-nl-diff-legend .is-removed {
  background: rgba(201, 42, 42, 0.12);
  color: #c92a2a;
}
.wb-nl-diff-blocks {
  max-height: 280px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wb-nl-diff-block {
  margin: 0;
  padding: 8px 10px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.82rem;
  line-height: 1.45;
  border-radius: 6px;
  border-left: 3px solid transparent;
}
.wb-nl-diff-block.is-same {
  background: rgba(0, 0, 0, 0.03);
  color: var(--ink-soft, #5c574e);
  border-left-color: rgba(0, 0, 0, 0.12);
}
.wb-nl-diff-block.is-added {
  background: rgba(47, 158, 68, 0.1);
  border-left-color: #2f9e44;
}
.wb-nl-diff-block.is-removed {
  background: rgba(201, 42, 42, 0.08);
  border-left-color: #c92a2a;
  text-decoration: line-through;
  opacity: 0.9;
}
.wb-nl-diff-block-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.85;
}
.wb-nl-diff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
#nl-notes-revise-revert {
  margin: 0;
}
#nl-outline-from-summaries-undo {
  margin: 0 0 8px;
}
.wb-nl-commit-rollback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 6px 0 10px;
}
.wb-nl-commit-rollback[hidden] {
  display: none !important;
}
.wb-nl-commit-rollback-hint {
  font-size: 0.85rem;
  color: var(--ink-soft, #6b6560);
}
.wb-nl-commit-rollback-diff {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-soft, #6b6560);
  white-space: pre-wrap;
}
.wb-nl-commit-rollback-diff[hidden] {
  display: none !important;
}
.wb-nl-outline-bak-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 8px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--ink-soft, #6b6560);
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.wb-nl-outline-bak-source[hidden] {
  display: none !important;
}
.wb-nl-outline-bak-source.is-gap {
  border-color: rgba(60, 110, 80, 0.25);
  background: rgba(60, 110, 80, 0.06);
}
.wb-nl-outline-bak-source.is-summaries {
  border-color: rgba(70, 90, 140, 0.25);
  background: rgba(70, 90, 140, 0.06);
}
.wb-nl-outline-bak-preview {
  margin: 0 0 10px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-soft, #6b6560);
  white-space: pre-wrap;
}
.wb-nl-outline-bak-preview[hidden] {
  display: none !important;
}
.wb-nl-version-restore-diff {
  margin: 6px 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-soft, #6b6560);
  white-space: pre-wrap;
}
.wb-nl-version-restore-diff[hidden] {
  display: none !important;
}
.wb-nl-version-restore-dirty-warn {
  margin: 6px 0 0;
  padding: 6px 8px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #7a4a12;
  background: rgba(255, 236, 200, 0.75);
  border-radius: 4px;
  white-space: pre-wrap;
}
.wb-nl-version-restore-dirty-warn[hidden] {
  display: none !important;
}
#nl-version-restore-keep-draft-wrap select {
  display: block;
  width: 100%;
  max-width: 16rem;
  margin-top: 2px;
  padding: 4px 6px;
  border: 1px solid var(--line, #d8d2c8);
  border-radius: 6px;
  background: var(--bg, #fff);
  font-size: 0.86rem;
}
#nl-draft-snapshot-before-restore-wrap {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 8px 0 4px;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--ink-soft, #6b6560);
  cursor: pointer;
}
#nl-draft-snapshot-before-restore-wrap input {
  margin-top: 2px;
  flex-shrink: 0;
}
.wb-nl-version-snapshot-now-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 6px 0 4px;
}
.wb-nl-version-snapshot-now-hint {
  font-size: 0.78rem;
  color: var(--ink-soft, #6b6560);
  line-height: 1.35;
}
.wb-nl-version-snapshot-source {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0 0 6px;
  font-size: 0.82rem;
  color: var(--ink-soft, #6b6560);
}
.wb-nl-version-snapshot-source[hidden] {
  display: none !important;
}
.wb-nl-version-snapshot-source-opt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.wb-nl-version-snapshot-source-opt input {
  margin: 0;
}
.wb-nl-outline-from-summaries-range {
  margin-top: 4px;
}
.wb-nl-outline-accept-diff {
  margin: 8px 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-soft, #6b6560);
  white-space: pre-wrap;
}
.wb-nl-outline-accept-diff[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .wb-nl-layout { grid-template-columns: 1fr; }
  .wb-nl-chat { max-height: none; min-height: 360px; }
}

@media (max-width: 900px) {
  .wb-guide-layout { grid-template-columns: 1fr; }
  .wb-guide-chat { max-height: none; min-height: 360px; }
}

/* Plot Arc */
.wb-plot-tension {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.wb-tension-bar {
  flex: 1;
  height: 48px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 4px 0;
}
.wb-tension-bar span {
  flex: 1;
  background: linear-gradient(180deg, var(--wb-accent), color-mix(in srgb, var(--wb-accent) 40%, transparent));
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  transition: height 0.3s;
}
.wb-plot-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.wb-plot-act {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}
.wb-plot-act header {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--wb-accent);
}
.wb-plot-act h3 { margin: 0 0 4px; font-size: 1rem; color: var(--wb-accent); }
.wb-plot-act small { color: var(--ink-faint); font-size: 0.78rem; }
.wb-plot-beats {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 320px;
}
.wb-plot-beat {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.86rem;
}
.wb-plot-beat strong { display: block; margin-bottom: 4px; font-size: 0.88rem; }
.wb-plot-beat p { margin: 0; color: var(--ink-soft); font-size: 0.82rem; }
.wb-plot-beat .beat-type {
  font-size: 0.7rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.wb-plot-beat-actions { display: flex; gap: 4px; margin-top: 8px; }
.wb-plot-beat-actions button {
  font-size: 0.72rem;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  cursor: pointer;
}
.wb-plot-add-beat {
  margin-top: 10px;
  width: 100%;
  padding: 8px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  font-size: 0.85rem;
}
.wb-plot-add-beat:hover { border-color: var(--wb-accent); color: var(--wb-accent); }
#plot-notes { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font-family: var(--font-ui); }

/* Faction radar */
.wb-faction-layout {
  display: grid;
  grid-template-columns: minmax(280px, 400px) 1fr;
  gap: 20px;
  align-items: start;
}
.wb-faction-chart-wrap {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
#fac-radar { width: 100%; max-width: 380px; height: auto; }
.wb-faction-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
  font-size: 0.85rem;
}
.wb-faction-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wb-faction-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.wb-fac-axis-label { font-size: 11px; fill: var(--ink-faint); }
.wb-fac-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.wb-fac-poly { fill-opacity: 0.2; stroke-width: 2; }

.wb-name-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.wb-name-chip {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}
.wb-name-chip:hover { border-color: var(--wb-accent); transform: translateY(-1px); }
.wb-name-chip strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.wb-name-chip .wb-name-roman {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  color: var(--ink-muted, var(--ink-faint));
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.wb-name-chip small { color: var(--ink-faint); font-size: 0.78rem; }

/* Weather & Season */
.wb-weather-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: 20px;
  align-items: start;
}
.wb-weather-side .wb-card { margin-bottom: 14px; }
.wb-inline-label { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; margin-bottom: 10px; }
.wb-inline-label input { width: 64px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); }
#weather-month-names, #weather-region-note {
  width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink); font-family: var(--font-ui); font-size: 0.88rem;
}
.wb-weather-regions li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer;
}
.wb-weather-regions li.active { background: color-mix(in srgb, var(--wb-accent) 14%, transparent); font-weight: 600; }
.wb-weather-regions li button {
  border: none; background: transparent; color: var(--ink-faint); cursor: pointer; font-size: 1rem;
}
.wb-weather-head { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.wb-weather-name {
  flex: 1; min-width: 180px; font-size: 1.2rem; font-weight: 600;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink);
}
.wb-weather-visual {
  display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: center; margin-bottom: 18px;
}
.wb-climate-ring { width: 200px; height: 200px; }
.wb-weather-calendar {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.wb-cal-month {
  padding: 6px 10px; border-radius: 6px; font-size: 0.78rem;
  background: color-mix(in srgb, hsl(var(--cal-hue, 200), 50%, 40%) 25%, var(--paper));
  border: 1px solid var(--line);
}
.wb-weather-seasons {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px;
}
.wb-weather-season {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
}
.wb-weather-season header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.wb-weather-season h4 { margin: 0; font-size: 0.95rem; }
.wb-weather-season label {
  display: block; font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 10px;
}
.wb-weather-season input[type="range"] { width: 100%; margin: 4px 0; }
.wb-weather-season input[type="text"] {
  width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--ink); font-size: 0.85rem;
}
.wb-weather-season output { font-size: 0.78rem; color: var(--gold); }
.wb-weather-disasters { display: flex; flex-direction: column; gap: 8px; }
.wb-weather-disaster {
  display: grid; grid-template-columns: 80px 1fr 72px 1fr 28px; gap: 8px; align-items: center;
}
.wb-weather-disaster input, .wb-weather-disaster select {
  padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); font-size: 0.85rem;
}
.wb-weather-disaster button { border: none; background: transparent; color: var(--ink-faint); cursor: pointer; }

/* Language Sketch */
.wb-lang-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: 20px;
  align-items: start;
}
.wb-lang-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer;
}
.wb-lang-list li.active { background: color-mix(in srgb, var(--wb-accent) 14%, transparent); font-weight: 600; }
.wb-lang-list li button { border: none; background: transparent; color: var(--ink-faint); cursor: pointer; }
.wb-lang-head { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.wb-lang-name {
  flex: 1; min-width: 160px; font-size: 1.2rem; font-weight: 600;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink);
}
.wb-lang-script {
  flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink); font-size: 0.9rem;
}
#lang-phonetics, #lang-grammar, #lang-note {
  width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink); font-family: var(--font-ui); font-size: 0.88rem;
}
.wb-lang-snippets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.wb-lang-snippets .btn { font-size: 0.78rem; padding: 4px 10px; }
.wb-lang-vocab-table input, .wb-lang-vocab-table select {
  width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--ink); font-size: 0.85rem;
}
.wb-lang-phrases { display: flex; flex-direction: column; gap: 8px; }
.wb-lang-phrase {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 28px; gap: 8px; align-items: center;
}
.wb-lang-phrase input {
  padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg); color: var(--ink); font-size: 0.85rem;
}
.wb-lang-phrase button { border: none; background: transparent; color: var(--ink-faint); cursor: pointer; }

/* Item Codex */
.wb-item-rarity-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.wb-rarity {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
}
.wb-rarity.common { color: #8a8a8a; }
.wb-rarity.uncommon { color: #3d8b5a; }
.wb-rarity.rare { color: #3a6ea5; }
.wb-rarity.epic { color: #7a4db0; }
.wb-rarity.legendary { color: #c47a1a; }
#item-table select, #item-table input {
  width: 100%;
  min-width: 0;
  font-size: 0.86rem;
}

@media (max-width: 900px) {
  .wb-shell { grid-template-columns: 1fr; }
  .wb-sidebar {
    position: relative;
    top: 0;
    height: auto;
    max-height: none;
  }
  .wb-module-nav {
    flex-direction: row;
    flex-wrap: wrap;
    overflow-x: auto;
  }
  .wb-module-nav button { flex: 1 1 auto; min-width: 140px; }
  .wb-hub-layout, .wb-map-layout, .wb-rel-layout { grid-template-columns: 1fr; }
  .wb-faction-layout { grid-template-columns: 1fr; }
  .wb-weather-layout { grid-template-columns: 1fr; }
  .wb-weather-visual { grid-template-columns: 1fr; justify-items: center; }
  .wb-weather-disaster { grid-template-columns: 1fr 1fr; }
  .wb-lang-layout { grid-template-columns: 1fr; }
  .wb-lang-phrase { grid-template-columns: 1fr 1fr; }
}

/* --- novelist chapter notes + outline-from-summaries --- */
.wb-nl-chapter-notes {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line, #d8d2c8);
  border-radius: 10px;
  background: #f6f4ef;
}
.wb-nl-chapter-notes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.wb-nl-chapter-notes-head strong {
  font-size: 0.92rem;
}
.wb-nl-chapter-notes-head-actions {
  display: flex;
  gap: 6px;
}
.wb-nl-chapter-notes .wb-nl-field {
  margin-bottom: 8px;
}
.wb-nl-chapter-notes select {
  width: 100%;
  max-width: 100%;
}
.wb-nl-notes-text {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 96px;
  resize: vertical;
  padding: 8px 10px;
  border: 1px solid var(--line, #d8d2c8);
  border-radius: 8px;
  font: inherit;
  line-height: 1.45;
  background: #fff;
}
.wb-nl-notes-text:disabled {
  opacity: 0.65;
}
.wb-nl-notes-status {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--muted, #6b6560);
  line-height: 1.4;
}
.wb-nl-notes-status.is-ok {
  color: #2f6b3a;
}
.wb-nl-notes-status.is-err {
  color: #8a3030;
}
.wb-nl-notes-status.is-busy {
  color: #5a554e;
}
.wb-nl-outline-from-summaries-status {
  margin: 6px 0 8px;
  font-size: 0.8rem;
  color: var(--muted, #6b6560);
  line-height: 1.4;
}
.wb-nl-outline-from-summaries-status.is-busy {
  color: #5a554e;
}
.wb-nl-outline-from-summaries-status.is-done {
  color: #2f6b3a;
}
.wb-nl-outline-from-summaries-status.is-err {
  color: #8a3030;
}
.wb-nl-outline-from-summaries-panel {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--line, #d8d2c8);
  border-radius: 10px;
  background: var(--bg-soft, #f7f5f1);
}
.wb-nl-outline-from-summaries-msg {
  margin: 0 0 8px;
  font-size: 0.86rem;
  line-height: 1.45;
}
.wb-nl-outline-from-summaries-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  max-height: 220px;
  overflow: auto;
}
.wb-nl-outline-from-summaries-list li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.8rem;
  line-height: 1.4;
}
.wb-nl-outline-from-summaries-list li.is-changed {
  background: rgba(255, 244, 214, 0.55);
  margin: 0 -6px;
  padding-left: 6px;
  padding-right: 6px;
  border-radius: 4px;
}
.wb-nl-outline-from-summaries-list li.is-changed label.wb-nl-ofs-pick,
.wb-nl-outline-from-summaries-list li label.wb-nl-ofs-pick {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  margin: 0;
}
.wb-nl-outline-from-summaries-list .wb-nl-ofs-pick-input {
  margin-top: 3px;
  flex-shrink: 0;
}
.wb-nl-outline-from-summaries-list .wb-nl-ofs-pick-body {
  min-width: 0;
  flex: 1;
}
.wb-nl-outline-from-summaries-list .wb-nl-ofs-no {
  font-weight: 600;
  margin-right: 4px;
}
.wb-nl-outline-from-summaries-list .wb-nl-ofs-cur {
  color: var(--muted, #6b6560);
  font-size: 0.76rem;
}
.wb-nl-outline-from-summaries-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
}
.wb-nl-outline-from-summaries-pick-count {
  font-size: 0.78rem;
  color: var(--muted, #6b6560);
}
.wb-nl-outline-from-summaries-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.wb-nl-outline-gap-range {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: flex-end;
  margin: 8px 0 6px;
}
.wb-nl-outline-gap-range .wb-nl-field {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted, #6b6560);
}
.wb-nl-outline-gap-range input[type="number"] {
  display: block;
  width: 4.5rem;
  margin-top: 2px;
  padding: 4px 6px;
  border: 1px solid var(--line, #d8d2c8);
  border-radius: 6px;
  background: var(--bg, #fff);
  font-size: 0.86rem;
}
.wb-nl-outline-gap-fill-status {
  margin: 6px 0 8px;
  font-size: 0.8rem;
  color: var(--muted, #6b6560);
  line-height: 1.4;
}
.wb-nl-outline-gap-fill-status.is-busy {
  color: #5a554e;
}
.wb-nl-outline-gap-fill-status.is-done {
  color: #2f6b3a;
}
.wb-nl-outline-gap-fill-status.is-err {
  color: #8a3030;
}
.wb-nl-outline-gap-fill-panel {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--line, #d8d2c8);
  border-radius: 10px;
  background: var(--bg-soft, #f7f5f1);
}
.wb-nl-outline-gap-fill-msg {
  margin: 0 0 8px;
  font-size: 0.86rem;
  line-height: 1.45;
}
.wb-nl-outline-gap-fill-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  max-height: 220px;
  overflow: auto;
}
.wb-nl-outline-gap-fill-list li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.8rem;
  line-height: 1.4;
}
.wb-nl-outline-gap-fill-list li.is-gap {
  background: rgba(214, 232, 255, 0.45);
  margin: 0 -6px;
  padding-left: 6px;
  padding-right: 6px;
  border-radius: 4px;
}
.wb-nl-outline-gap-fill-list li.is-gap label.wb-nl-ogf-pick {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  margin: 0;
}
.wb-nl-outline-gap-fill-list .wb-nl-ogf-pick-input {
  margin-top: 3px;
  flex-shrink: 0;
}
.wb-nl-outline-gap-fill-list .wb-nl-ogf-pick-body {
  min-width: 0;
  flex: 1;
}
.wb-nl-outline-gap-fill-list .wb-nl-ogf-no {
  font-weight: 600;
  margin-right: 4px;
}
.wb-nl-outline-gap-fill-list .wb-nl-ogf-cur {
  color: var(--muted, #6b6560);
  font-size: 0.76rem;
}
.wb-nl-outline-gap-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
}
.wb-nl-outline-gap-pick-count {
  font-size: 0.78rem;
  color: var(--muted, #6b6560);
}
.wb-nl-outline-gap-fill-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
#nl-outline-gap-undo {
  margin: 0 0 8px;
}
