.bot-content-workspace {
  --bc-canvas: var(--app-bg, #f5f6f8);
  --bc-paper: #fff;
  --bc-ink: var(--app-text, #202a35);
  --bc-muted: var(--app-muted, #657180);
  --bc-line: var(--app-border, #e1e5eb);
  --bc-soft: #eff6e9;
  --bc-green: #2d7a52;
  --bc-green-hover: #246543;
  --bc-focus: #2d7a52;
  --bc-danger: #a33f35;
  color: var(--bc-ink);
  background: var(--bc-canvas);
  min-width: 0;
  font-size: 13px;
  line-height: 1.45;
  container: bot-content / inline-size;
}
.bot-content-workspace [hidden] { display: none !important; }
.bot-content-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-width: 0; align-items: start; }
.bot-content-errors:empty { display: none; }
.bot-content-errors:not(:empty) { margin-bottom: 12px; }
.bot-content-directory { min-width: 0; padding: 16px 10px 18px; background: var(--bc-paper); border-right: 1px solid var(--bc-line); position: sticky; top: 76px; max-height: calc(100dvh - 92px); overflow: auto; scrollbar-width: thin; }
.bot-content-directory-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 7px; margin-bottom: 13px; }
.bot-content-directory-heading h2 { font-size: 12px; line-height: 1.4; letter-spacing: 0; font-weight: 600; margin: 0; color: var(--bc-ink); }
.bot-content-count { font-size: 11px; color: var(--bc-muted); font-variant-numeric: tabular-nums; }
.bot-content-load-status { display: flex; align-items: center; gap: 7px; margin: 0 7px 12px; color: var(--bc-muted); font-size: 11px; }
.bot-content-load-status::before, .bot-content-loading-title::before { content: ""; width: 14px; height: 14px; flex: 0 0 14px; border: 2px solid var(--bc-line); border-top-color: var(--bc-green); border-radius: 50%; animation: bc-load-spin .8s linear infinite; }
.bot-content-loading-reader { min-height: 530px; padding: 20px 0; }
.bot-content-loading-title { display: flex; align-items: center; gap: 9px; margin: 0 0 25px; color: var(--bc-muted); font-size: 13px; font-weight: 400; }
.bot-content-skeleton { display: grid; gap: 18px; max-width: 620px; }
.bot-content-skeleton span { display: block; height: 18px; width: 65%; border-radius: 5px; background: linear-gradient(100deg,#edf0f2 25%,#f8fafb 45%,#edf0f2 65%); background-size: 240% 100%; animation: bc-load-shimmer 1.5s ease-in-out infinite; }
.bot-content-skeleton span:nth-child(2) { width: 92%; height: 270px; margin-top: 12px; }
.bot-content-skeleton span:nth-child(3) { width: 44%; }
.bot-content-skeleton span:nth-child(4) { width: 55%; }
@keyframes bc-load-spin { to { transform: rotate(360deg); } }
@keyframes bc-load-shimmer { from { background-position: 130% 0; } to { background-position: -130% 0; } }
@media (prefers-reduced-motion: reduce) { .bot-content-load-status::before, .bot-content-loading-title::before, .bot-content-skeleton span { animation: none; } }
.bot-content-directory .field { margin: 0 3px 14px; gap: 0; }
.bot-content-directory .field > label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.bot-content-workspace .field input, .bot-content-workspace .field select, .bot-content-workspace .field textarea { font: inherit; font-size: 13px; font-weight: 400; line-height: 1.5; border: 1px solid var(--bc-line); border-radius: 6px; box-shadow: none; color: var(--bc-ink); background: var(--bc-paper); min-height: 38px; padding: 8px 10px; }
.bot-content-directory .field input { min-height: 34px; font-size: 12px; padding: 6px 9px; }
.bot-content-workspace .field > label { color: var(--bc-ink); font-size: 12px; font-weight: 500; }
.bot-content-workspace .field input::placeholder, .bot-content-workspace .field textarea::placeholder { color: var(--bc-muted); opacity: 1; }
.bot-content-workspace .field input:focus, .bot-content-workspace .field textarea:focus { border-color: var(--bc-focus); box-shadow: none; }
.bot-content-workspace button:focus-visible, .bot-content-workspace input:focus-visible, .bot-content-workspace textarea:focus-visible { outline: 2px solid var(--bc-focus); outline-offset: 2px; }
.bot-content-tree { display: grid; gap: 9px; }
.bot-content-section { min-width: 0; }
.bot-content-section-toggle { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 7px; width: 100%; padding: 8px 6px; min-height: 33px; color: var(--bc-ink); background: transparent; border: 0; border-radius: 3px; font: inherit; font-size: 12px; font-weight: 550; line-height: 1.4; text-align: left; }
.bot-content-section-toggle small { color: var(--bc-muted); font-size: 10px; font-weight: 400; }
.bot-content-section-toggle:hover { background: var(--bc-soft); }
.bot-content-chevron { width: 5px; height: 5px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
.bot-content-section-toggle[aria-expanded=true] .bot-content-chevron { transform: rotate(135deg); }
.bot-content-subsection { margin: 10px 7px 4px 21px; font-size: 10px; line-height: 1.5; font-weight: 500; letter-spacing: 0; color: var(--bc-muted); }
.bot-content-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.bot-content-row { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; min-height: 32px; margin: 0; padding: 7px 8px 7px 20px; border: 0; border-radius: 3px; background: transparent; color: var(--bc-muted); font: inherit; font-size: 11px; line-height: 1.45; font-weight: 400; text-align: left; box-shadow: none; transform: none; }
.bot-content-row:hover { background: var(--bc-soft); color: var(--bc-ink); }
.bot-content-row.is-selected { color: var(--bc-ink); background: var(--bc-soft); box-shadow: inset 3px 0 var(--bc-green); font-weight: 550; }
.bot-content-row-title { min-width: 0; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bot-content-row-state { width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: var(--bc-line); }
.bot-content-row-state.is-published { background: var(--bc-green); }
.bot-content-empty-list { margin: 15px 7px; font-size: 12px; color: var(--bc-muted); line-height: 1.5; }
.bot-content-reader { min-width: 0; padding: 18px 20px; }
.bot-content-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.bot-content-heading-text { min-width: 0; }
.bot-content-kicker { font-size: 11px; color: var(--bc-muted); line-height: 1.5; margin-bottom: 5px; }
.bot-content-heading h2 { font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -.35px; margin: 0; color: var(--bc-ink); overflow-wrap: anywhere; }
.bot-content-heading-status { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; flex-shrink: 0; }
.bot-content-state { padding: 3px 6px; border: 1px solid var(--bc-line); border-radius: 4px; font-size: 10px; line-height: 1.4; color: var(--bc-muted); background: var(--bc-paper); white-space: nowrap; }
.bot-content-state.is-published { color: var(--bc-green); }
.bot-content-state.is-dirty { color: var(--bc-ink); border-style: dashed; }
.bot-content-channel { color: var(--bc-muted); font-size: 10px; }
.bot-content-columns { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; min-width: 0; }
.bot-content-editor { display: flex; flex-direction: column; gap: 16px; min-width: 0; min-height: 530px; margin: 0; padding: 18px; background: var(--bc-paper); border: 1px solid var(--bc-line); border-radius: 6px; }
.bot-content-context { font-size: 12px; color: var(--bc-muted); line-height: 1.65; margin: 0; padding-bottom: 14px; border-bottom: 1px solid var(--bc-line); }
.bot-content-editor .field { margin: 0; gap: 7px; }
.bot-content-workspace .bot-content-body-field textarea { display: block; width: 100%; resize: vertical; min-height: 300px; font-size: 14px; line-height: 1.65; padding: 11px 12px; }
.bot-content-workspace .field textarea:disabled, .bot-content-workspace .field input:disabled { background: var(--bc-soft); color: var(--bc-muted); opacity: 1; }
.bot-content-editor-tools { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-top: -7px; min-width: 0; }
.bot-content-variables { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.bot-content-counter { color: var(--bc-muted); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0; padding-top: 5px; }
.bot-content-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bot-content-field-help, .bot-content-protected-note { margin: -6px 0 0; color: var(--bc-muted); font-size: 11px; line-height: 1.6; }
.bot-content-publication { display: flex; align-items: flex-start; gap: 9px; color: var(--bc-ink); font-size: 12px; line-height: 1.5; margin: 2px 0; }
.bot-content-publication input { width: 16px; height: 16px; min-height: 16px; flex: 0 0 16px; margin: 1px 0 0; padding: 0; accent-color: var(--bc-green); }
.bot-content-editor-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--bc-line); }
.bot-content-save-state { color: var(--bc-muted); font-size: 11px; line-height: 1.5; }
.bot-content-editor-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; margin-left: auto; }
.bot-content-workspace .button { min-height: 35px; padding: 8px 10px; border: 1px solid var(--bc-line); border-radius: 6px; background: var(--bc-paper); color: var(--bc-ink); box-shadow: none; font: inherit; font-size: 12px; line-height: 1.4; font-weight: 500; transform: none; white-space: normal; }
.bot-content-workspace .button:hover { color: var(--bc-ink); background: var(--bc-soft); border-color: var(--bc-line); box-shadow: none; transform: none; }
.bot-content-workspace .button:active:not(:disabled) { transform: none; box-shadow: none; }
.bot-content-workspace .button.primary { color: #fff; background: var(--bc-green); border-color: var(--bc-green); box-shadow: none; }
.bot-content-workspace .button.primary:hover { color: #fff; background: var(--bc-green-hover); border-color: var(--bc-green-hover); box-shadow: none; }
.bot-content-workspace .button:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }
.bot-content-workspace .bot-content-token { min-height: 28px; padding: 4px 7px; font-size: 11px; border-color: var(--bc-line); background: var(--bc-paper); }
.bot-content-workspace .bot-content-reset { border-color: transparent; padding-inline: 0; color: var(--bc-muted); font-size: 11px; font-weight: 400; }
.bot-content-workspace .bot-content-reset:hover { color: var(--bc-ink); background: transparent; text-decoration: underline; }
.bot-content-workspace .bot-content-add { width: calc(100% - 6px); margin: 0 3px 14px; text-align: center; }
.bot-content-preview { min-width: 0; width: 360px; max-width: 100%; }
.bot-content-preview-heading { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-bottom: 12px; line-height: 1.5; }
.bot-content-preview-heading strong { color: var(--bc-muted); font-size: 11px; font-weight: 500; }
.bot-content-preview-state { color: var(--bc-muted); font-size: 10px; text-align: center; }
.bot-content-phone-host { min-width: 0; }
.bot-content-preview-unavailable { padding: 18px; border: 1px solid var(--bc-line); border-radius: 6px; background: var(--bc-paper); color: var(--bc-muted); font-size: 12px; line-height: 1.6; }
.bot-content-empty-reader { padding: 45px 14px; max-width: 460px; }
.bot-content-empty-reader h3 { font-size: 18px; color: var(--bc-ink); margin: 0 0 9px; }
.bot-content-empty-reader p { font-size: 13px; color: var(--bc-muted); line-height: 1.6; }
.bot-content-view-tabs, .bot-content-mobile-back { display: none; }
@container bot-content (max-width: 930px) {
  .bot-content-columns { grid-template-columns: minmax(0, 1fr); }
  .bot-content-view-tabs { display: flex; gap: 18px; margin: -2px 0 15px; padding-bottom: 1px; border-bottom: 1px solid var(--bc-line); }
  .bot-content-view-tab { color: var(--bc-muted); background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 7px 0; min-height: 36px; font: inherit; font-size: 12px; }
  .bot-content-view-tab.is-active { color: var(--bc-ink); border-bottom-color: var(--bc-green); }
  .bot-content-workspace[data-pane=text] .bot-content-preview { display: none; }
  .bot-content-workspace[data-pane=phone] .bot-content-editor { display: none; }
  .bot-content-preview { justify-self: center; }
  .bot-content-editor { min-height: 480px; }
}
@container bot-content (max-width: 680px) {
  .bot-content-layout { display: block; }
  .bot-content-directory { position: static; max-height: none; border-right: 0; padding: 12px 10px; }
  .bot-content-reader { padding: 13px 0; }
  .bot-content-workspace[data-has-selection=true] .bot-content-directory, .bot-content-workspace[data-has-selection=false] .bot-content-reader { display: none; }
  .bot-content-mobile-back { display: block; min-height: 36px; margin: 0 0 13px; padding: 6px 0; color: var(--bc-muted); background: transparent; border: 0; border-radius: 0; font: inherit; font-size: 12px; }
  .bot-content-mobile-back::before { content: '‹'; font-size: 17px; margin-right: 6px; }
  .bot-content-heading { gap: 9px; flex-direction: column; margin-bottom: 14px; }
  .bot-content-heading h2 { font-size: 20px; }
  .bot-content-heading-status { justify-content: flex-start; }
  .bot-content-editor { padding: 14px; gap: 15px; min-height: 0; }
  .bot-content-workspace .field input, .bot-content-workspace .field textarea { font-size: 16px; min-height: 44px; }
  .bot-content-workspace .bot-content-body-field textarea { font-size: 16px; min-height: 280px; }
  .bot-content-dates { grid-template-columns: minmax(0, 1fr); }
  .bot-content-editor-footer { align-items: flex-start; }
  .bot-content-editor-actions { width: 100%; justify-content: space-between; margin-left: 0; }
  .bot-content-workspace .bot-content-save { margin-left: auto; }
  .bot-content-section-toggle { min-height: 40px; }
  .bot-content-row { min-height: 39px; font-size: 12px; }
  .bot-content-subsection { font-size: 11px; }
}
@media (pointer: coarse) {
  .bot-content-workspace .button, .bot-content-row, .bot-content-section-toggle, .bot-content-view-tab, .bot-content-mobile-back { min-height: 44px; }
  .bot-content-workspace .bot-content-publication { min-height: 36px; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  .bot-content-workspace *, .bot-content-workspace *::before, .bot-content-workspace *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
/* One device heading; keep the saved/unsaved state just above it. */
.bot-content-preview-heading{min-height:15px;margin-bottom:4px}
.bot-content-preview-heading>strong{display:none}

/* Clinic typography and controls; navigation remains a compact scenario tree. */
.bot-content-layout{border:1px solid var(--bc-line);border-radius:18px;background:var(--bc-paper)}
.bot-content-directory{border-radius:18px 0 0 18px;padding:18px 12px}
.bot-content-reader{padding:20px;min-width:0}
.bot-content-directory-heading h2{font-size:14px;font-weight:600}
.bot-content-directory .field input{min-height:38px;border-radius:10px;font-size:13px}
.bot-content-section-toggle{min-height:38px;font-size:13px;border-radius:8px}
.bot-content-section-toggle small{font-size:11px}
.bot-content-subsection{font-size:11px;margin-top:12px}
.bot-content-row{min-height:36px;font-size:12px;line-height:1.5;border-radius:8px;padding-block:8px}
.bot-content-row.is-selected{color:var(--bc-ink);background:#eff6e9;box-shadow:inset 3px 0 #78a86d}
.bot-content-heading h2{font-size:22px;line-height:1.35;font-weight:550;letter-spacing:-.35px}
.bot-content-editor{border-radius:14px;padding:18px;gap:16px;min-height:500px}
.bot-content-context{font-size:12px;line-height:1.7}
.bot-content-workspace .field input,.bot-content-workspace .field select,.bot-content-workspace .field textarea{border-radius:10px;min-height:42px;font-size:13px;padding:10px 12px}
.bot-content-workspace .field>label{font-size:12px;font-weight:500}
.bot-content-workspace .button{min-height:40px;padding:9px 13px;border-radius:10px;font-size:13px;font-weight:550;line-height:1.4}
.bot-content-workspace .button.primary{background:var(--clinic-orange,#ee9b4d);border-color:transparent;color:#54371b}
.bot-content-workspace .button.primary:hover{background:#e99b44;border-color:transparent;color:#54371b}
.bot-content-workspace .bot-content-token{min-height:30px;font-size:11px;padding:5px 8px}
.bot-content-workspace .bot-content-reset{min-height:36px;font-size:11px;padding:6px 0}
.bot-content-publication{font-size:12px;line-height:1.6}
.bot-content-state{border-radius:6px;font-size:11px;padding:4px 7px}
@container bot-content (max-width:680px){.bot-content-layout{border:0;background:transparent}.bot-content-directory{border:1px solid var(--bc-line);border-radius:17px;padding:15px 12px}.bot-content-reader{padding:15px 0}.bot-content-heading h2{font-size:21px}.bot-content-workspace .field input,.bot-content-workspace .field select,.bot-content-workspace .field textarea{font-size:16px;min-height:44px}.bot-content-workspace .button{min-height:44px}.bot-content-editor{padding:16px;min-height:0}}
