:root {
  --bcv1-ink: #342a25;
  --bcv1-muted: #796a61;
  --bcv1-soft: #a09086;
  --bcv1-line: rgba(103, 77, 62, 0.14);
  --bcv1-paper: #fffdf9;
  --bcv1-cream: #fbf4e9;
  --bcv1-peach: #f2c8b6;
  --bcv1-coral: #d97663;
  --bcv1-coral-dark: #b95648;
  --bcv1-sage: #94a388;
  --bcv1-shadow: 0 18px 55px rgba(83, 51, 35, 0.14);
}

/* One home, two rooms. Kept here so the main page and writing room share a palette. */
.bunny-cottage {max-width:680px;margin:0 auto;padding:28px 16px 48px;color:var(--text,#342a25)}
.bunny-cottage header {padding:12px 8px 30px}
.bunny-cottage header>span {font-size:11px;letter-spacing:3px;color:#a7654e}
.bunny-cottage h1 {font:600 30px/1.5 Georgia,"Noto Serif SC",serif;margin:12px 0 8px}
.bunny-cottage header p,.cottage-home-note {font-size:14px;line-height:1.8;color:var(--text3,#796a61)}
.cottage-room {display:grid;grid-template-columns:44px minmax(0,1fr) 20px;align-items:center;gap:16px;width:100%;min-height:150px;padding:24px 20px;margin:0 0 18px;border:1px solid rgba(103,77,62,.16);border-radius:22px;text-align:left;font:inherit;color:inherit;background:rgba(194,207,178,.18);cursor:pointer}
.cottage-read {background:rgba(242,200,182,.18)}
.cottage-room-mark {font-size:32px;color:#90735d}
.cottage-room strong {display:block;margin:5px 0;font:600 24px/1.5 Georgia,"Noto Serif SC",serif}
.cottage-room small {color:var(--text3,#796a61);font-size:12px;letter-spacing:2px}
.cottage-room p {margin:6px 0 0;font-size:13px;line-height:1.8;overflow-wrap:anywhere;color:var(--text2,#796a61)}
.cottage-room i {font-size:24px;font-style:normal}
.cottage-home-note {text-align:center;margin-top:28px;font-size:12px}

html.bcv1-document-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.bcv1-overlay,
.bcv1-overlay * {
  box-sizing: border-box;
}

.bcv1-overlay[hidden] {
  display: none !important;
}

.bcv1-overlay {
  --bcv1-viewport-height: 100dvh;
  position: fixed;
  z-index: 2147482000;
  inset: 0;
  width: 100%;
  height: var(--bcv1-viewport-height);
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 205, 184, 0.54), transparent 31%),
    radial-gradient(circle at 92% 84%, rgba(194, 207, 178, 0.42), transparent 32%),
    #f8f0e5;
  color: var(--bcv1-ink);
  font-family: "Noto Sans SC", "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.bcv1-overlay button,
.bcv1-overlay input,
.bcv1-overlay textarea {
  margin: 0;
  color: inherit;
  font: inherit;
}

.bcv1-overlay button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  cursor: pointer;
}

.bcv1-overlay button:focus-visible,
.bcv1-overlay input:focus-visible,
.bcv1-overlay textarea:focus-visible {
  outline: 3px solid rgba(217, 118, 99, 0.36);
  outline-offset: 2px;
}

.bcv1-overlay button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.15);
  opacity: 0.48;
}

.bcv1-shell {
  position: relative;
  display: flex;
  width: min(100%, 780px);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 252, 247, 0.8);
  box-shadow: var(--bcv1-shadow);
  isolation: isolate;
}

.bcv1-shell::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(rgba(110, 78, 60, 0.024) 1px, transparent 1px);
  background-size: 100% 28px;
  content: "";
  pointer-events: none;
}

.bcv1-header {
  display: grid;
  min-height: calc(64px + env(safe-area-inset-top));
  flex: 0 0 auto;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  align-items: end;
  padding: env(safe-area-inset-top) 8px 7px;
  border-bottom: 1px solid var(--bcv1-line);
  background: rgba(255, 253, 249, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.bcv1-icon-button,
.bcv1-header-link {
  display: inline-grid;
  place-items: center;
  align-self: center;
  border-radius: 14px;
  background: transparent;
}

.bcv1-icon-button {
  font-size: 32px;
  font-weight: 260;
  line-height: 1;
}

.bcv1-header-link {
  color: var(--bcv1-coral-dark);
  font-size: 14px;
  font-weight: 750;
}

.bcv1-header-spacer {
  width: 44px;
  height: 44px;
}

.bcv1-heading {
  min-width: 0;
  align-self: center;
  text-align: center;
}

.bcv1-heading h1 {
  margin: 0;
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(16px, 4.5vw, 20px);
  font-weight: 760;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bcv1-kicker {
  margin-bottom: -1px;
  color: var(--bcv1-soft);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bcv1-main {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px clamp(12px, 4vw, 26px) calc(34px + env(safe-area-inset-bottom));
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.bcv1-main > * {
  max-width: 680px;
  margin-right: auto;
  margin-left: auto;
}

.bcv1-welcome {
  position: relative;
  min-height: 210px;
  padding: 32px 24px 26px;
  overflow: hidden;
  border: 1px solid rgba(142, 102, 80, 0.12);
  border-radius: 28px 28px 48px 28px;
  background:
    linear-gradient(145deg, rgba(255, 250, 243, 0.98), rgba(247, 223, 207, 0.84)),
    var(--bcv1-paper);
  box-shadow: 0 12px 30px rgba(101, 65, 46, 0.09);
}

.bcv1-welcome::after {
  position: absolute;
  right: -35px;
  bottom: -55px;
  width: 150px;
  height: 150px;
  border: 24px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  content: "";
}

.bcv1-welcome h2,
.bcv1-work-hero h2,
.bcv1-worldbook-intro h2 {
  margin: 6px 0 8px;
  font-family: "Songti SC", "STSong", serif;
  font-weight: 760;
  line-height: 1.28;
}

.bcv1-welcome h2 {
  max-width: 68%;
  font-size: clamp(25px, 8vw, 38px);
}

.bcv1-welcome p {
  max-width: 70%;
  margin: 0;
  color: var(--bcv1-muted);
  font-size: 13px;
}

.bcv1-welcome .bcv1-eyebrow {
  color: var(--bcv1-coral-dark);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.bcv1-window {
  position: absolute;
  top: 34px;
  right: 24px;
  display: grid;
  width: 82px;
  height: 102px;
  place-items: center;
  border: 6px solid rgba(255, 253, 248, 0.9);
  border-radius: 41px 41px 14px 14px;
  background: linear-gradient(#cddbbb 0 50%, #edbfae 50%);
  box-shadow: inset 0 0 0 1px rgba(87, 78, 57, 0.1), 0 9px 18px rgba(82, 60, 45, 0.1);
}

.bcv1-window::before,
.bcv1-window::after {
  position: absolute;
  background: rgba(255, 254, 249, 0.82);
  content: "";
}

.bcv1-window::before { width: 5px; height: 100%; }
.bcv1-window::after { width: 100%; height: 5px; }

.bcv1-window span,
.bcv1-window i {
  position: absolute;
  z-index: 1;
  bottom: -8px;
  width: 18px;
  height: 28px;
  border-radius: 50% 50% 12% 12%;
  background: #8da27b;
  transform: rotate(-18deg);
}

.bcv1-window span { right: 11px; }
.bcv1-window i { right: 26px; height: 21px; transform: rotate(14deg); }

.bcv1-section {
  margin-top: 22px;
}

.bcv1-section-title {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.bcv1-section-title > div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 9px;
}

.bcv1-section-title span {
  font-family: "Songti SC", "STSong", serif;
  font-size: 18px;
  font-weight: 760;
}

.bcv1-section-title small {
  color: var(--bcv1-soft);
  font-size: 11px;
}

.bcv1-section-title button {
  padding: 0 11px;
  border: 1px solid var(--bcv1-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--bcv1-coral-dark);
  font-size: 12px;
  font-weight: 730;
}

.bcv1-work-card,
.bcv1-chapter-row,
.bcv1-worldbook-entry,
.bcv1-version-summary {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  text-align: left;
}

.bcv1-work-card {
  gap: 12px;
  margin-bottom: 9px;
  padding: 13px;
  border: 1px solid var(--bcv1-line) !important;
  border-radius: 19px;
  background: rgba(255, 254, 251, 0.82);
  box-shadow: 0 6px 16px rgba(102, 72, 54, 0.055);
}

.bcv1-book-mark {
  display: grid;
  width: 44px;
  height: 56px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px 13px 13px 7px;
  background: linear-gradient(145deg, #d98a78, #bc6255);
  color: #fff8ef;
  box-shadow: inset 5px 0 0 rgba(255, 255, 255, 0.13);
}

.bcv1-work-copy,
.bcv1-chapter-copy,
.bcv1-worldbook-entry > span:nth-child(2),
.bcv1-version-summary > span:first-child {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

.bcv1-work-copy strong,
.bcv1-chapter-copy strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bcv1-work-copy span,
.bcv1-work-copy small,
.bcv1-chapter-copy small,
.bcv1-worldbook-entry small,
.bcv1-version-summary small {
  overflow: hidden;
  color: var(--bcv1-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bcv1-work-copy small {
  margin-top: 3px;
  color: var(--bcv1-soft);
}

.bcv1-chevron {
  flex: 0 0 auto;
  color: var(--bcv1-soft);
  font-size: 24px;
  font-weight: 300;
}

.bcv1-truth-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 22px;
  color: var(--bcv1-soft);
  font-size: 11px;
  text-align: center;
}

.bcv1-inline-form {
  margin-top: 10px;
  padding: 14px;
  border: 1px dashed rgba(154, 98, 72, 0.25);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.82);
}

.bcv1-inline-form[hidden] { display: none; }
.bcv1-inline-form label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 720; }
.bcv1-inline-form div { display: flex; gap: 8px; }
.bcv1-inline-form input { min-width: 0; height: 46px; flex: 1 1 auto; padding: 0 12px; border: 1px solid var(--bcv1-line); border-radius: 13px; background: #fff; }
.bcv1-inline-form button { flex: 0 0 auto; padding: 0 13px; border-radius: 13px; background: var(--bcv1-coral); color: white; font-size: 12px; font-weight: 750; }

.bcv1-empty {
  padding: 32px 20px;
  border: 1px dashed rgba(132, 103, 85, 0.24);
  border-radius: 20px;
  color: var(--bcv1-muted);
  text-align: center;
}

.bcv1-empty > span { display: block; margin-bottom: 8px; font-size: 30px; }
.bcv1-empty strong { display: block; color: var(--bcv1-ink); font-size: 14px; }
.bcv1-empty p { margin: 5px 0 0; font-size: 12px; }
.bcv1-empty button { margin-top: 14px; padding: 0 15px; border-radius: 13px; background: var(--bcv1-coral); color: white; }

.bcv1-work-hero {
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(145deg, #8e9e81, #73866d);
  color: white;
  box-shadow: 0 12px 27px rgba(63, 80, 57, 0.18);
}

.bcv1-hero-label {
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.12em;
  opacity: 0.8;
}

.bcv1-work-hero h2 { margin-top: 8px; font-size: 28px; }
.bcv1-work-hero p { margin: 0 0 15px; font-size: 12px; opacity: 0.85; }
.bcv1-work-hero > div { display: flex; gap: 14px; font-size: 11px; opacity: 0.78; }

.bcv1-paper-section {
  padding: 18px 14px 4px;
  border: 1px solid var(--bcv1-line);
  border-radius: 22px;
  background: rgba(255, 254, 251, 0.78);
}

.bcv1-chapter-row {
  gap: 11px;
  padding: 13px 4px;
  border-top: 1px solid var(--bcv1-line) !important;
  background: transparent;
}

.bcv1-chapter-number {
  flex: 0 0 auto;
  color: var(--bcv1-coral);
  font-family: Georgia, serif;
  font-size: 12px;
  font-style: italic;
}

.bcv1-candidate-dot {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: #f7ddd2;
  color: #a65345;
  font-size: 9px;
  font-weight: 760;
}

.bcv1-worldbook-entry {
  gap: 11px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(106, 124, 91, 0.18) !important;
  border-radius: 20px;
  background: rgba(231, 237, 222, 0.78);
}

.bcv1-worldbook-icon,
.bcv1-worldbook-count {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #65735b;
}

.bcv1-worldbook-count { width: 32px; height: 32px; border-radius: 50%; font-size: 11px; font-weight: 760; }

.bcv1-editor-page { padding-bottom: calc(30px + env(safe-area-inset-bottom)); }

.bcv1-editor-card,
.bcv1-prompt-card,
.bcv1-claude-card {
  border: 1px solid var(--bcv1-line);
  border-radius: 22px;
  background: rgba(255, 254, 251, 0.9);
  box-shadow: 0 8px 22px rgba(82, 56, 43, 0.055);
}

.bcv1-editor-card { padding: 16px; }

.bcv1-editor-topline,
.bcv1-save-row,
.bcv1-claude-meta,
.bcv1-card-line,
.bcv1-drawer-header,
.bcv1-version-row,
.bcv1-sticky-save,
.bcv1-world-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bcv1-editor-topline label,
.bcv1-body-label,
.bcv1-world-card label > span,
.bcv1-field-grid label > span {
  display: block;
  color: var(--bcv1-muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.06em;
}

.bcv1-editor-topline span,
.bcv1-save-row span,
.bcv1-sticky-save span {
  color: var(--bcv1-soft);
  font-size: 10px;
}

.bcv1-title-input,
.bcv1-manuscript,
.bcv1-instruction,
.bcv1-world-card input,
.bcv1-world-card textarea {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  resize: vertical;
}

.bcv1-title-input {
  height: 48px;
  padding: 5px 0 4px;
  border-bottom-color: var(--bcv1-line);
  border-radius: 0;
  font-family: "Songti SC", "STSong", serif !important;
  font-size: 22px !important;
  font-weight: 760 !important;
}

.bcv1-body-label { margin-top: 13px; }

.bcv1-manuscript {
  display: block;
  min-height: clamp(270px, 45dvh, 540px);
  padding: 13px 2px 18px;
  border-radius: 9px;
  font-family: "Songti SC", "STSong", serif !important;
  font-size: 16px !important;
  line-height: 1.9 !important;
  white-space: pre-wrap;
}

.bcv1-title-input:focus,
.bcv1-manuscript:focus,
.bcv1-instruction:focus,
.bcv1-world-card input:focus,
.bcv1-world-card textarea:focus {
  border-color: rgba(217, 118, 99, 0.34);
  background: rgba(255, 255, 255, 0.78);
}

.bcv1-save-row {
  align-items: flex-end;
  padding-top: 11px;
  border-top: 1px solid var(--bcv1-line);
}

.bcv1-save-row span { max-width: 48%; }

.bcv1-secondary-button,
.bcv1-primary-button {
  padding: 0 15px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 780 !important;
}

.bcv1-secondary-button { border: 1px solid rgba(205, 102, 82, 0.26) !important; background: #fff6f1; color: var(--bcv1-coral-dark) !important; }
.bcv1-primary-button { width: 100%; background: linear-gradient(135deg, #da806b, #c86455); color: white !important; box-shadow: 0 8px 18px rgba(181, 83, 67, 0.2); }

.bcv1-prompt-card { margin-top: 14px; padding: 15px; }
.bcv1-prompt-card .bcv1-section-title { margin-bottom: 5px; }

.bcv1-instruction {
  min-height: 96px;
  margin-bottom: 10px !important;
  padding: 11px;
  border-color: var(--bcv1-line);
  border-radius: 14px;
  background: rgba(253, 247, 239, 0.72);
  font-size: 13px !important;
  line-height: 1.65 !important;
}

.bcv1-disabled-reason { margin: 8px 0 0; color: var(--bcv1-soft); font-size: 10px; text-align: center; }

.bcv1-claude-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  margin-top: 14px;
  padding: 15px;
}

.bcv1-claude-warm { border-color: rgba(217, 118, 99, 0.24); background: linear-gradient(145deg, #fffdf9, #fbeddf); }
.bcv1-claude-danger { border-color: rgba(178, 60, 48, 0.25); }

.bcv1-claude-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 15px 15px 15px 5px;
  background: #75645d;
  color: white;
  font-family: Georgia, serif;
  font-size: 18px;
}

.bcv1-claude-meta strong { font-size: 11px; }
.bcv1-claude-meta span { padding: 2px 6px; border-radius: 999px; background: #ece8e3; color: #736a65; font-family: ui-monospace, monospace; font-size: 8px; }
.bcv1-claude-meta span.is-called { background: #dce8d2; color: #4f6545; }
.bcv1-claude-card h3 { margin: 6px 0 3px; font-size: 13px; }
.bcv1-claude-card p { margin: 0; color: var(--bcv1-muted); font-size: 11px; }

.bcv1-version-summary {
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid var(--bcv1-line) !important;
  border-radius: 17px;
  background: rgba(255, 254, 251, 0.84);
}

.bcv1-version-summary > span:last-child { flex: 0 0 auto; color: var(--bcv1-soft); font-size: 10px; }

.bcv1-drawer-layer {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: max(44px, env(safe-area-inset-top));
  background: rgba(52, 40, 34, 0.34);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.bcv1-drawer {
  display: flex;
  width: 100%;
  max-height: min(100%, 720px);
  flex-direction: column;
  overflow: hidden;
  border-radius: 26px 26px 0 0;
  background: #fffaf3;
  box-shadow: 0 -16px 45px rgba(55, 38, 29, 0.2);
  padding-bottom: env(safe-area-inset-bottom);
}

.bcv1-drawer-handle { width: 42px; height: 5px; margin: 9px auto 3px; border-radius: 99px; background: #d6cbc2; }
.bcv1-drawer-header { flex: 0 0 auto; padding: 8px 16px 11px; border-bottom: 1px solid var(--bcv1-line); }
.bcv1-drawer-header > div { display: flex; flex-direction: column; }
.bcv1-drawer-header span { font-family: "Songti SC", serif; font-size: 18px; font-weight: 760; }
.bcv1-drawer-header small { color: var(--bcv1-soft); font-size: 10px; }
.bcv1-drawer-header button { border-radius: 50%; background: rgba(117, 94, 80, 0.08); font-size: 24px; }
.bcv1-drawer-scroll { min-height: 0; overflow-y: auto; padding: 8px 14px 24px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.bcv1-drawer-scroll h3 { margin: 14px 2px 8px; color: var(--bcv1-muted); font-size: 11px; letter-spacing: 0.06em; }
.bcv1-drawer-empty { padding: 20px; border-radius: 14px; background: rgba(124, 101, 87, 0.05); color: var(--bcv1-soft); font-size: 11px; text-align: center; }

.bcv1-candidate-card { margin-bottom: 10px; padding: 14px; border: 1px solid rgba(217, 118, 99, 0.19); border-radius: 19px; background: #fffdf9; }
.bcv1-card-line span { color: var(--bcv1-coral-dark); font-size: 11px; font-weight: 760; }
.bcv1-card-line small { color: var(--bcv1-soft); font-size: 9px; }
.bcv1-candidate-card blockquote { margin: 9px 0; padding-left: 10px; border-left: 3px solid var(--bcv1-peach); color: var(--bcv1-muted); font-size: 10px; }
.bcv1-candidate-body { max-height: 190px; overflow-y: auto; padding: 10px; border-radius: 12px; background: #fcf6ed; font-family: "Songti SC", serif; font-size: 13px; line-height: 1.75; white-space: pre-wrap; }
.bcv1-candidate-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }
.bcv1-candidate-actions button { padding: 7px 5px; border: 1px solid var(--bcv1-line); border-radius: 12px; background: #fff; color: var(--bcv1-muted); font-size: 10px; font-weight: 700; }
.bcv1-candidate-actions button:first-child { border-color: transparent; background: var(--bcv1-coral); color: white; }
.bcv1-candidate-actions .bcv1-reject-candidate { color: #a65345; }
.bcv1-candidate-actions button:last-child { grid-column: 1 / -1; }

.bcv1-version-row { padding: 11px 3px; border-bottom: 1px solid var(--bcv1-line); }
.bcv1-version-row > span { display: flex; min-width: 0; flex-direction: column; }
.bcv1-version-row strong { font-size: 11px; }
.bcv1-version-row small { color: var(--bcv1-soft); font-size: 9px; }
.bcv1-version-row em { flex: 0 0 auto; color: #6a805f; font-size: 9px; font-style: normal; }

.bcv1-worldbook-intro {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, #e9efe2, #dce7d3);
}

.bcv1-worldbook-intro > span { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 16px; background: rgba(255, 255, 255, 0.64); color: #65765c; font-size: 22px; }
.bcv1-worldbook-intro h2 { margin: 0 0 4px; font-size: 20px; }
.bcv1-worldbook-intro p { margin: 0; color: #65705e; font-size: 11px; }
.bcv1-world-import-tools {
  margin-top: 12px;
  padding: 13px;
  border: 1px solid rgba(104, 119, 91, 0.18);
  border-radius: 19px;
  background: rgba(247, 250, 242, 0.84);
}
.bcv1-world-import-heading,
.bcv1-import-source-line,
.bcv1-import-summary,
.bcv1-import-preview-head,
.bcv1-import-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.bcv1-world-import-heading > div,
.bcv1-import-summary > div,
.bcv1-import-dialog-head > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.bcv1-world-import-heading strong { font-size: 12px; }
.bcv1-world-import-heading small { color: var(--bcv1-soft); font-size: 9px; }
.bcv1-world-import-heading > span,
.bcv1-import-source-line > span {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 99px;
  background: rgba(103, 119, 91, 0.11);
  color: #5f7156;
  font-size: 9px;
  font-weight: 760;
}
.bcv1-world-import-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.bcv1-world-import-actions button {
  display: grid;
  min-width: 0;
  min-height: 70px;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  align-items: center;
  column-gap: 7px;
  padding: 8px 9px;
  border: 1px solid var(--bcv1-line);
  border-radius: 15px;
  background: #fffdf9;
  text-align: left;
}
.bcv1-world-import-actions button > span { grid-row: 1 / 3; color: var(--bcv1-coral-dark); font-size: 22px; text-align: center; }
.bcv1-world-import-actions button strong { min-width: 0; font-size: 11px; }
.bcv1-world-import-actions button small { min-width: 0; overflow: hidden; color: var(--bcv1-soft); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.bcv1-import-unavailable { margin: 8px 1px 0; color: #a65345; font-size: 9px; }

.bcv1-import-pending {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(188, 117, 55, 0.3);
  border-radius: 17px;
  background: #fff4dd;
  box-shadow: 0 7px 18px rgba(109, 72, 36, 0.08);
}
.bcv1-import-pending-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bcv1-import-pending-top > div { display: flex; min-width: 0; flex-direction: column; }
.bcv1-import-pending strong { color: #8b572b; font-size: 11px; }
.bcv1-import-pending span { color: #876b51; font-size: 9px; }
.bcv1-import-pending-top button {
  flex: 0 0 auto;
  padding: 0 10px;
  border: 1px solid rgba(163, 98, 48, 0.24);
  border-radius: 12px;
  background: #fffaf0;
  color: #9a5d2f;
  font-size: 9px;
  font-weight: 760;
}
.bcv1-import-plan-warnings { margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(163, 98, 48, 0.18); }
.bcv1-import-plan-warnings > strong { display: block; font-size: 9px; }
.bcv1-import-plan-warnings ul { margin: 5px 0 0; padding-left: 18px; color: #7c6248; font-size: 9px; }
.bcv1-import-plan-warnings li + li { margin-top: 3px; }

.bcv1-import-layer {
  position: absolute;
  z-index: 12;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: max(18px, env(safe-area-inset-top));
  background: rgba(52, 40, 34, 0.4);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.bcv1-import-dialog {
  display: flex;
  width: min(100%, 720px);
  max-height: calc(100% - max(18px, env(safe-area-inset-top)));
  min-height: min(72%, 620px);
  flex-direction: column;
  overflow: hidden;
  border-radius: 25px 25px 0 0;
  background: #fffaf3;
  box-shadow: 0 -18px 48px rgba(55, 38, 29, 0.24);
  padding-bottom: env(safe-area-inset-bottom);
}
.bcv1-import-dialog-head {
  min-height: 64px;
  flex: 0 0 auto;
  padding: 9px 13px 9px 16px;
  border-bottom: 1px solid var(--bcv1-line);
  background: rgba(255, 253, 248, 0.96);
}
.bcv1-import-dialog-head strong { font-family: "Songti SC", "STSong", serif; font-size: 18px; }
.bcv1-import-dialog-head small { color: var(--bcv1-soft); font-size: 9px; }
.bcv1-import-dialog-head button { border-radius: 50%; background: rgba(117, 94, 80, 0.08); font-size: 24px; }
.bcv1-import-dialog-scroll {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 13px clamp(12px, 4vw, 20px) 24px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.bcv1-import-back { margin: -4px 0 8px; padding: 0 5px; background: transparent; color: var(--bcv1-coral-dark) !important; font-size: 11px; font-weight: 750; }
.bcv1-import-source-line strong { min-width: 0; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.bcv1-import-source > label,
.bcv1-import-preview-card > label { display: block; margin-top: 10px; }
.bcv1-import-source label > span,
.bcv1-import-preview-card label > span,
.bcv1-import-mode legend {
  display: block;
  color: var(--bcv1-muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.04em;
}
.bcv1-import-source textarea,
.bcv1-import-preview-card input:not([type="checkbox"]),
.bcv1-import-preview-card textarea {
  width: 100%;
  margin-top: 5px;
  padding: 10px;
  border: 1px solid var(--bcv1-line);
  border-radius: 12px;
  background: #fffdfa;
  resize: vertical;
}
.bcv1-import-source textarea { min-height: clamp(190px, 34dvh, 380px); font-family: ui-monospace, "SFMono-Regular", monospace; font-size: 11px; line-height: 1.6; }
.bcv1-import-preview-card textarea { min-height: 118px; font-size: 12px; line-height: 1.65; }
.bcv1-import-preview-card input:not([type="checkbox"]) { font-size: 12px; }
.bcv1-import-parse-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.bcv1-import-parse-actions button { min-width: 0; padding: 7px 9px; border: 1px solid var(--bcv1-line); border-radius: 13px; background: #fff; color: var(--bcv1-muted); font-size: 10px; font-weight: 760; line-height: 1.35; }
.bcv1-import-parse-actions .bcv1-primary-button { grid-column: 1 / -1; border-color: transparent; color: white; }
.bcv1-import-summary { padding: 12px; border-radius: 15px; background: #edf3e8; }
.bcv1-import-summary strong { font-size: 13px; }
.bcv1-import-summary small { overflow: hidden; color: #6d7a65; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.bcv1-import-summary > span { flex: 0 0 auto; padding: 3px 7px; border-radius: 99px; background: rgba(96, 124, 79, 0.12); color: #567047; font-size: 9px; }
.bcv1-import-summary > span.has-warnings { background: #ffe3bd; color: #8e5a27; }
.bcv1-import-warnings { margin: 9px 0 0; padding: 9px 10px 9px 28px; border-radius: 13px; background: #fff4df; color: #805f3f; font-size: 9px; }
.bcv1-import-warnings li + li { margin-top: 5px; }
.bcv1-import-warnings li { overflow-wrap: anywhere; }
.bcv1-import-warnings code { margin-right: 5px; color: #a2612e; font-size: 8px; }
.bcv1-import-clear { margin: 8px 2px 0; color: #66805b; font-size: 9px; }
.bcv1-import-preview-list { margin-top: 10px; }
.bcv1-import-preview-card { margin-bottom: 10px; padding: 13px; border: 1px solid var(--bcv1-line); border-radius: 18px; background: rgba(255, 254, 251, 0.96); }
.bcv1-import-preview-head strong { color: #617057; font-size: 11px; }
.bcv1-import-preview-head label { display: flex; align-items: center; gap: 5px; color: var(--bcv1-muted); font-size: 9px; }
.bcv1-import-preview-head input,
.bcv1-import-mode input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--bcv1-coral); }
.bcv1-import-mode { display: grid; gap: 7px; margin: 12px 0 0; padding: 0; border: 0; }
.bcv1-import-mode legend { margin-bottom: 6px; }
.bcv1-import-mode > label { display: flex; min-width: 0; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--bcv1-line); border-radius: 14px; background: #fffdfa; }
.bcv1-import-mode > label > span { display: flex; min-width: 0; flex-direction: column; }
.bcv1-import-mode strong { font-size: 10px; }
.bcv1-import-mode small { color: var(--bcv1-soft); font-size: 9px; }
.bcv1-import-mode .is-destructive { border-color: rgba(176, 83, 70, 0.2); }
.bcv1-import-confirm { margin-top: 12px; padding: 12px; border-radius: 16px; background: #f8efe4; }
.bcv1-import-confirm p { margin: 0 0 9px; color: var(--bcv1-muted); font-size: 9px; }
.bcv1-world-list { margin-top: 14px; }
.bcv1-world-card { margin-bottom: 11px; padding: 14px; border: 1px solid var(--bcv1-line); border-radius: 20px; background: rgba(255, 254, 251, 0.88); }
.bcv1-world-card-head { margin-bottom: 8px; }
.bcv1-world-card-head > span { color: #617057; font-size: 11px; font-weight: 760; }
.bcv1-world-card-head label { display: flex; align-items: center; gap: 5px; color: var(--bcv1-muted); font-size: 10px; }
.bcv1-world-card label { display: block; margin-top: 9px; }
.bcv1-world-card input:not([type="checkbox"]), .bcv1-world-card textarea { margin-top: 4px; padding: 10px; border-color: var(--bcv1-line); border-radius: 11px; background: #fffdfa; font-size: 12px; }
.bcv1-world-card textarea { min-height: 120px; line-height: 1.65; }
.bcv1-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bcv1-text-button { display: block; min-height: 44px !important; margin: 7px 0 0 auto !important; padding: 0 10px; background: transparent; color: #a7675d !important; font-size: 12px !important; }
.bcv1-add-world { width: 100%; margin: 2px 0 12px; border: 1px dashed rgba(103, 119, 91, 0.35) !important; border-radius: 16px; background: rgba(235, 240, 228, 0.5); color: #607158 !important; font-size: 12px !important; font-weight: 750 !important; }

.bcv1-sticky-save {
  position: relative;
  flex: 0 0 auto;
  flex-wrap: wrap;
  z-index: 3;
  margin: 0;
  padding: 10px 14px max(10px, env(safe-area-inset-bottom));
  border: 1px solid var(--bcv1-line);
  border-radius: 17px 17px 0 0;
  background: rgba(255, 251, 245, 0.94);
  box-shadow: 0 10px 30px rgba(65, 43, 33, 0.17);
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
}

.bcv1-banner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 13px;
  font-size: 10px;
}
.bcv1-banner strong { font-size: 11px; }
.bcv1-banner-danger { border: 1px solid rgba(170, 72, 62, 0.2); background: #fff0ec; color: #9c4f45; }

.bcv1-toast {
  pointer-events: none;
  position: absolute;
  z-index: 20;
  right: 16px;
  top: calc(72px + env(safe-area-inset-top));
  left: 16px;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 0 auto;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(53, 43, 38, 0.91);
  color: white;
  font-size: 11px;
  text-align: center;
  box-shadow: 0 8px 22px rgba(37, 27, 22, 0.2);
}

.bcv1-confirm-layer {
  position: absolute;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: rgba(52, 40, 34, 0.48);
}
.bcv1-confirm-panel {
  width: min(100%, 430px);
  max-height: 100%;
  overflow-y: auto;
  padding: 22px 18px 18px;
  border: 1px solid var(--bcv1-line);
  border-radius: 22px;
  background: #fffaf3;
  box-shadow: 0 18px 48px rgba(55, 38, 29, 0.28);
}
.bcv1-confirm-panel h2 { margin: 0; color: var(--bcv1-text); font-family: "Songti SC", serif; font-size: 21px; }
.bcv1-confirm-panel p { margin: 12px 0 18px; color: var(--bcv1-muted); font-size: 14px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.bcv1-confirm-panel>div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 10px; }
.bcv1-confirm-panel button { min-width: 0; min-height: 48px; border-radius: 14px; font-size: 14px; white-space: normal; }

.bcv1-center { display: grid; place-items: center; }
.bcv1-loading { display: flex; align-items: center; gap: 9px; color: var(--bcv1-muted); font-size: 12px; }
.bcv1-loading i { width: 17px; height: 17px; border: 2px solid rgba(126, 101, 87, 0.18); border-top-color: var(--bcv1-coral); border-radius: 50%; animation: bcv1-spin 0.8s linear infinite; }
@keyframes bcv1-spin { to { transform: rotate(360deg); } }

@media (max-width: 420px) {
  .bcv1-main { padding-right: 12px; padding-left: 12px; }
  .bcv1-welcome { min-height: 196px; padding: 27px 18px 22px; }
  .bcv1-welcome h2 { max-width: 70%; font-size: 26px; }
  .bcv1-welcome p { max-width: 67%; font-size: 11px; }
  .bcv1-window { top: 31px; right: 17px; width: 70px; height: 90px; }
  .bcv1-save-row { align-items: stretch; flex-direction: column; }
  .bcv1-save-row span { max-width: 100%; }
  .bcv1-save-row button { width: 100%; }
  .bcv1-import-pending-top { align-items: stretch; flex-direction: column; }
  .bcv1-import-pending-top button { width: 100%; }
}

@media (max-width: 350px) {
  .bcv1-header { grid-template-columns: 48px minmax(0, 1fr) 48px; padding-right: 4px; padding-left: 4px; }
  .bcv1-kicker { font-size: 8px; }
  .bcv1-welcome { padding-left: 16px; }
  .bcv1-welcome h2 { max-width: 68%; font-size: 23px; }
  .bcv1-window { right: 13px; width: 64px; height: 84px; }
  .bcv1-work-hero { padding: 18px; }
  .bcv1-work-hero h2 { font-size: 24px; }
  .bcv1-editor-card { padding: 12px; }
  .bcv1-field-grid { grid-template-columns: 1fr; gap: 0; }
  .bcv1-inline-form div { align-items: stretch; flex-direction: column; }
  .bcv1-world-import-actions,
  .bcv1-import-parse-actions { grid-template-columns: 1fr; }
  .bcv1-import-parse-actions .bcv1-primary-button { grid-column: auto; }
}

@media (min-width: 781px) {
  .bcv1-overlay { padding: 18px; }
  .bcv1-shell { height: calc(100% - 36px); margin: 0 auto; border: 1px solid var(--bcv1-line); border-radius: 28px; }
  .bcv1-header { border-radius: 28px 28px 0 0; }
  .bcv1-drawer { margin: 0 18px; border-radius: 26px; }
  .bcv1-drawer-layer { padding-bottom: 18px; }
  .bcv1-import-layer { align-items: center; padding: 18px; }
  .bcv1-import-dialog { max-height: min(90%, 780px); min-height: min(76%, 640px); border-radius: 25px; padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bcv1-overlay *, .bcv1-overlay *::before, .bcv1-overlay *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Reading-first mobile writing desk: one scroll surface, two persistent actions. */
.bcv1-home .bcv1-welcome {min-height:0;padding:20px 4px 24px;background:none;box-shadow:none;border:0;border-radius:0}
.bcv1-home .bcv1-window {display:none}
.bcv1-home .bcv1-welcome h2 {font-size:26px;margin:8px 0}
.bcv1-home .bcv1-welcome p {max-width:none}
.bcv1-work-hero {padding:20px;border-radius:18px;min-height:0}
.bcv1-work-hero h2 {font-size:24px;margin:8px 0}
.bcv1-editor-page {padding:14px 18px 22px;background:var(--bcv1-paper)}
.bcv1-editor-card {padding:8px 0 16px;border:0;border-radius:0;background:transparent;box-shadow:none}
.bcv1-manuscript {min-height:52dvh;resize:none;overflow:hidden;font-size:18px!important;line-height:2!important;border:0;border-radius:0}
.bcv1-title-input {font-size:23px!important}
.bcv1-editor-topline,.bcv1-body-label {font-size:11px;color:var(--bcv1-muted)}
.bcv1-save-row {flex-direction:row;align-items:center;gap:12px}
.bcv1-save-row>span {font-size:11px;flex:1}
.bcv1-save-row button {width:auto;padding:10px 12px;font-size:12px}
.bcv1-prompt-card[hidden],.bcv1-selection-quote[hidden] {display:none!important}
.bcv1-prompt-card {padding:16px;margin-top:12px}
.bcv1-writing-bar {display:grid;grid-template-columns:1fr 2fr;gap:10px;flex-shrink:0;padding:10px 16px max(10px,env(safe-area-inset-bottom));border-top:1px solid var(--bcv1-line);background:var(--bcv1-paper)}
.bcv1-writing-bar button {border-radius:12px;font-size:13px;padding:10px 8px;background:var(--bcv1-cream)}
.bcv1-writing-bar .bcv1-primary-button {background:var(--bcv1-coral-dark);color:#fff;width:100%;margin:0}
.bcv1-selection-quote {background:var(--bcv1-cream);border-radius:12px;padding:8px 14px;font-size:13px!important}
.bcv1-review-tabs {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;border-bottom:1px solid var(--bcv1-line);margin:12px 0 8px}
.bcv1-review-tabs button {border-radius:8px 8px 0 0;background:transparent;font-size:13px;padding:8px 3px}
.bcv1-review-tabs [aria-selected=true] {background:var(--bcv1-cream);color:var(--bcv1-coral-dark);box-shadow:inset 0 -2px var(--bcv1-coral-dark)}
.bcv1-review-note,.bcv1-diff-key {font:12px/1.7 sans-serif;color:var(--bcv1-muted);white-space:normal}
.bcv1-candidate-body del,.bcv1-candidate-body ins {display:block;white-space:pre-wrap;overflow-wrap:anywhere;padding:12px;border-radius:8px;margin:8px 0}
.bcv1-candidate-body del {color:#92392f;background:#fbe9e4}
.bcv1-candidate-body ins {color:#345639;background:#e9f2e4}
.bcv1-review-progress {position:sticky;top:0;z-index:1;background:var(--bcv1-cream);border:1px solid var(--bcv1-line);border-radius:10px;padding:14px}
.bcv1-drawer {max-height:92%}
.bcv1-candidate-body {max-height:45dvh;font-size:16px;line-height:1.9}
.bcv1-selection-card {padding:16px;margin:12px 0;border:1px solid var(--bcv1-line);border-radius:16px;background:var(--bcv1-paper)}
.bcv1-selection-card[hidden] {display:none}
.bcv1-selection-card>label {display:flex;align-items:center;gap:12px;min-height:44px;cursor:pointer}
.bcv1-selection-card input {width:24px;height:24px;accent-color:var(--bcv1-coral-dark)}
.bcv1-selection-card strong,.bcv1-selection-card small {display:block}
.bcv1-selection-card small {color:var(--bcv1-muted);font-size:12px;margin-top:4px}
.bcv1-selection-card summary,.bcv1-library-trash summary {padding:12px 0;min-height:44px;cursor:pointer}
.bcv1-selection-card p {white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.9}
.bcv1-selection-search {display:block;font-size:13px}
.bcv1-selection-search input {display:block;width:100%;margin-top:8px;padding:12px;border:1px solid var(--bcv1-line);border-radius:12px;background:var(--bcv1-paper)}
.bcv1-library-trash {border:1px solid var(--bcv1-line);border-radius:16px;padding:4px 16px;margin-top:16px}
.bcv1-library-trash>div {display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 0;border-top:1px solid var(--bcv1-line)}
.bcv1-library-trash button {border-radius:12px;background:var(--bcv1-cream)}
.bcv1-library-trash p,.bcv1-world-card-head small {font-size:12px;line-height:1.7;color:var(--bcv1-muted)}
.bcv1-library-trash {margin-bottom:12px}
.bcv1-selection-list {padding-bottom:12px}
.bcv1-world-card-head {flex-wrap:wrap;overflow-wrap:anywhere}
.bcv1-library-trash>div>span {min-width:0;overflow-wrap:anywhere}
.bcv1-library-trash button {flex-shrink:0}
.bcv1-sticky-save>span {flex:1 1 80px;overflow-wrap:anywhere}
.bcv1-sticky-save>button {min-width:0;max-width:100%;white-space:normal}
.bcv1-selection-intro {display:block}
.bcv1-world-card[hidden] {display:none}
