/* ---- materials.css (beebox/src/frontend/src/themes/) ---- */
/* Every surfaced card defines a complete material. Nested cards reset these
   variables; frameless embeds intentionally inherit their enclosing material.
   Selection colors are the exception: a theme without its own pair keeps the
   system theme's (chrome.css), so the base material leaves them unset. */
.bbx-card-theme {
  --bbx-sheet-decoration: none;
  --bbx-sheet-shadow: none;
  --bbx-tab-radius: 6px 6px 0 0;
  --bbx-paper: #fff;
  --bbx-ink: #302f2d;
  --bbx-ink-soft: #625e58;
  --bbx-pen: #455f87;
  --bbx-edge: #dedbd6;
  --bbx-underlay: #efede9;
  --bbx-font: ui-sans-serif, system-ui, sans-serif;
  --bbx-link-decoration: underline;
  --bbx-link-image: none;
  --bbx-quote-paper: transparent;
  --bbx-quote-layer-paper: #fff;
  --bbx-quote-sheet-display: none;
  --bbx-blockquote-sheet-display: none;
  --bbx-slip-angle: -0.25deg;
  --bbx-slip-grain: initial;
  --bbx-sheet-radius: 8px;
  --bbx-slip-overhang: 0px;
  --bbx-quote-shadow: none;
  --bbx-quote-edge: 0px;
  --bbx-quote-radius: 0 4px 4px 0;
  --bbx-quote-offset: 0px;
  --bbx-quote-padding-left: 0;
  --bbx-blockquote-paper: transparent;
  --bbx-blockquote-shadow: none;
  --bbx-blockquote-edge: 0px;
  --bbx-blockquote-padding: 0.5em 0;
  --bbx-content-padding: clamp(1rem, 3vw, 2rem);
  /* Prose furniture derives from the material, so every theme dresses it
     without restating it; a theme overrides one when the mix is wrong.
     Code stays a dark slab (the selection code pairs assume one), cut
     from the theme's own ink. */
  --bbx-bullet: var(--bbx-pen);
  --bbx-counter: var(--bbx-ink-soft);
  --bbx-rule: color-mix(in srgb, var(--bbx-ink) 18%, transparent);
  --bbx-rule-strong: color-mix(in srgb, var(--bbx-ink) 34%, transparent);
  --bbx-code-paper: color-mix(in srgb, var(--bbx-ink) 88%, #000);
  --bbx-code-ink: var(--bbx-paper);
  /* Light surfaces for in-card controls and panels (the Tailwind `card`
     role). Derived, because some themes' underlay is a saturated accent. */
  --bbx-tint: color-mix(in srgb, var(--bbx-ink) 7%, var(--bbx-paper));
  --bbx-sheet: color-mix(in srgb, var(--bbx-paper) 55%, #fff);
  color: var(--bbx-ink);
  font-family: var(--bbx-font);
}

/* A card theme with its own selection pair drops the system theme's code
   pair, which was chosen for a different selection color. */
.bbx-card-theme:is([data-card-theme="paper"], [data-card-theme="post-it"]) {
  --bbx-selection-code: initial;
  --bbx-selection-code-ink: initial;
}

.bbx-card-theme[data-card-theme="paper"] {
  /* Sepia ink, inverted; parchment on dark code. */
  --bbx-selection: #6b5640;
  --bbx-selection-ink: #fbf6ea;
  --bbx-selection-code: #e8dcc4;
  --bbx-selection-code-ink: #2a2418;
  --bbx-sheet-radius: 12px;
  --bbx-slip-overhang: calc(var(--bbx-content-padding) + 0.625rem);
  --bbx-paper: #f5efe2;
  --bbx-ink: #332e27;
  --bbx-ink-soft: #4f4439;
  --bbx-pen: #2b4264;
  --bbx-edge: #d6c8af;
  --bbx-underlay: #e4dac9;
  --bbx-font: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --bbx-quote-paper: #fcf8ee;
  --bbx-quote-layer-paper: #fcf8ee;
  --bbx-blockquote-paper: #ffffff45;
  --bbx-link-decoration: none;
  --bbx-link-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='6' viewBox='0 0 128 6'%3E%3Cpath d='M0 4 Q19 2 39 3.7 T80 3.8 T128 3' stroke='%232b4264' stroke-width='1.25' fill='none'/%3E%3C/svg%3E");
}

.bbx-card-theme[data-card-theme="paper"][data-card-stock="manila"] {
  /* Blue pencil. */
  --bbx-selection: #2f5fa8;
  --bbx-selection-ink: #fffaf0;
  --bbx-selection-code: #9cc0f0;
  --bbx-selection-code-ink: #14202e;
  --bbx-pen: #263b59;
  --bbx-paper: #ecdbb1;
  --bbx-ink: #3d3221;
  --bbx-ink-soft: #473a29;
  --bbx-edge: #c9b58b;
  --bbx-quote-paper: #f8eacb;
  --bbx-quote-layer-paper: #f8eacb;
}
.bbx-card-theme[data-card-theme="paper"][data-card-stock="blue"] {
  /* Dusty rose. */
  --bbx-selection: #e3bcc4;
  --bbx-selection-ink: #2a1a20;
  --bbx-selection-code: initial;
  --bbx-selection-code-ink: initial;
  --bbx-paper: #e0e9ee;
  --bbx-ink: #263a44;
  --bbx-ink-soft: #34444e;
  --bbx-edge: #b6cbd5;
  --bbx-quote-paper: #f0f5f6;
  --bbx-quote-layer-paper: #f0f5f6;
}

.bbx-card-theme[data-card-theme="post-it"] {
  /* Pink highlighter on yellow. */
  --bbx-selection: #ff6fae;
  --bbx-selection-ink: #2b1a14;
  --bbx-sheet-radius: 2px 3px 9px 2px;
  --bbx-slip-overhang: calc(var(--bbx-content-padding) + 0.625rem);
  --bbx-paper: #faee9f;
  --bbx-ink: #36321b;
  --bbx-ink-soft: #625a30;
  --bbx-pen: #3c5169;
  --bbx-edge: #dacb73;
  --bbx-underlay: #e9dfa9;
  --bbx-font: "Avenir Next", Avenir, ui-sans-serif, system-ui, sans-serif;
  --bbx-quote-paper: #fff8cf;
  --bbx-quote-layer-paper: #fff8cf;
  --bbx-slip-angle: 0.3deg;
  --bbx-blockquote-paper: #ffffff30;
}
.bbx-card-theme[data-card-theme="post-it"][data-card-stock="rose"] {
  /* Mint highlighter on rose. */
  --bbx-selection: #4fdbb4;
  --bbx-selection-ink: #16302a;
  --bbx-paper: #f6d1d0;
  --bbx-ink: #452d35;
  --bbx-ink-soft: #694a54;
  --bbx-edge: #d4a6ad;
  --bbx-quote-paper: #ffebea;
  --bbx-quote-layer-paper: #ffebea;
}
.bbx-card-theme[data-card-theme="post-it"][data-card-stock="mint"] {
  /* Orange highlighter on mint. */
  --bbx-selection: #ff9a3c;
  --bbx-selection-ink: #2a1a0c;
  --bbx-paper: #d7ebcd;
  --bbx-ink: #2c3d29;
  --bbx-ink-soft: #4a5e45;
  --bbx-edge: #adc4a4;
  --bbx-quote-paper: #edf6e7;
  --bbx-quote-layer-paper: #edf6e7;
}

/* Catalog-selected defaults set shape; the stock supplies the material. */
.bbx-card-theme[data-default-quote-treatment="inset"] {
  --bbx-quote-edge: 2px;
  --bbx-quote-radius: 0;
  --bbx-quote-padding-left: 1.1em;
}
.bbx-card-theme[data-default-quote-treatment="layered"] {
  --bbx-quote-sheet-display: block;
  --bbx-quote-paper: transparent;
  --bbx-quote-radius: 3px;
  --bbx-quote-offset: 3px;
  --bbx-quote-padding-left: 1.1em;
}
.bbx-card-theme[data-default-blockquote-treatment="inset"] {
  --bbx-blockquote-edge: 2px;
  --bbx-blockquote-padding: 0.5em 1em;
}
.bbx-card-theme[data-default-blockquote-treatment="layered"] {
  --bbx-blockquote-sheet-display: block;
  --bbx-blockquote-paper: transparent;
  --bbx-blockquote-padding: 0.9em 1.1em;
}

/* ---- card-themes.css (beebox/src/frontend/src/themes/) ---- */
.bbx-card-theme[data-card-theme="paper"] {
  --bbx-paper-vignette: radial-gradient(
    ellipse at 50% 35%,
    #fffaf000 50%,
    #6e553724 100%
  );
}
.bbx-card-surface {
  position: relative;
  isolation: isolate;
  min-width: 0;
  background: var(--bbx-paper);
  border: 1px solid var(--bbx-edge);
  border-radius: var(--bbx-sheet-radius);
}
.bbx-card-surface[data-card-theme="paper"] {
  border: 0;
  border-radius: var(--bbx-sheet-radius);
  box-shadow:
    0 1px 1px #3c2d191a,
    0 4px 10px #3c2d1924,
    0 14px 28px #3c2d1924,
    inset 0 0 0 1px #ffffff80,
    inset 0 0 22px #785f3c12;
}
:is(.bbx-card-surface, .bbx-interface-tab[data-active="true"])[data-card-theme="paper"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='700'%3E%3Cfilter id='pulp'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.035' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23pulp)' opacity='.18'/%3E%3C/svg%3E");
  background-size:
    240px 240px,
    700px 700px;
  opacity: 0.24;
  mix-blend-mode: multiply;
}
:is(.bbx-card-surface, .bbx-interface-tab[data-active="true"])[data-card-theme="paper"]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: var(--bbx-paper-vignette);
  mix-blend-mode: multiply;
}
.bbx-card-surface[data-card-theme="post-it"] {
  border: 0;
  border-radius: var(--bbx-sheet-radius);
  box-shadow:
    0 1px 1px #51492524,
    1px 5px 7px -4px #5149255c,
    4px 15px 18px -14px #5149258a,
    inset 0 1px 0 #ffffff55;
}
:is(.bbx-card-surface, .bbx-interface-tab[data-active="true"])[data-card-theme="post-it"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='fibers'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='2' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23fibers)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: 0.1;
  mix-blend-mode: multiply;
}
:is(.bbx-card-surface, .bbx-interface-tab[data-active="true"])[data-card-theme="post-it"]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      #ffffff20 0,
      transparent 13%,
      transparent 76%,
      #6c5b2212 100%
    ),
    radial-gradient(ellipse at 45% 28%, transparent 55%, #6c5b2210 100%);
  box-shadow: inset 0 0 0 1px #6a5b2310;
}
.bbx-card-surface[data-card-theme="paper"] > .bbx-card-heading,
.bbx-card-surface[data-card-theme="paper"] > .bbx-card-front,
.bbx-card-surface[data-card-theme="paper"] > .bbx-card-back,
.bbx-card-surface[data-card-theme="post-it"] > .bbx-card-heading,
.bbx-card-surface[data-card-theme="post-it"] > .bbx-card-front,
.bbx-card-surface[data-card-theme="post-it"] > .bbx-card-back {
  position: relative;
  z-index: 1;
}
.bbx-card-heading {
  padding: 1.15rem var(--bbx-content-padding) 0;
  padding-right: 4rem;
}
.bbx-card-surface[data-card-theme="paper"] > .bbx-card-heading {
  padding-top: 1.875rem;
}
.bbx-card-heading h1,
.bbx-card-heading h2 {
  margin: 0;
  color: var(--bbx-ink);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.bbx-card-surface[data-card-theme="paper"] > .bbx-card-heading h1,
.bbx-card-surface[data-card-theme="paper"] > .bbx-card-heading h2 {
  font-size: 1.6rem;
}
.bbx-card-front {
  min-width: 0;
}
.bbx-card-content {
  padding: var(--bbx-content-padding, 1rem);
  max-width: 54rem;
}
.bbx-card-view[data-view-layout="inset"] {
  padding: var(--bbx-content-padding, 1rem);
}
.bbx-card-front[data-card-mode="chat"] {
  max-height: 24rem;
  overflow: auto;
}
.bbx-card-back {
  padding: var(--bbx-content-padding);
  min-height: 15rem;
}
.bbx-card-back h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.bbx-card-back dl {
  display: grid;
  gap: 0.3rem 1rem;
  grid-template-columns: minmax(6rem, auto) minmax(0, 1fr);
  font-size: 0.875rem;
}
.bbx-card-back dt {
  color: var(--bbx-ink-soft);
}
.bbx-card-back dd {
  overflow-wrap: anywhere;
}
.bbx-card-properties {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 44px;
  height: 44px;
  appearance: none;
  border: 0;
  border-radius: 0 8px 0 6px;
  background: linear-gradient(
    225deg,
    var(--bbx-underlay) 0 49%,
    var(--bbx-quote-layer-paper) 51% 100%
  );
  box-shadow: -2px 2px 3px #493c2825;
  color: var(--bbx-ink-soft);
  padding: 0;
}
.bbx-card-surface[data-card-theme="plain"] > .bbx-card-properties {
  box-shadow: none;
}
.bbx-card-properties:focus-visible,
.bbx-theme-link:focus-visible {
  outline: 2px solid var(--bbx-pen, #455f87);
  outline-offset: 3px;
}
.bbx-card-properties:hover {
  color: var(--bbx-ink);
}
.bbx-card-problem {
  border-left: 3px solid #a63d31;
  padding: 0.65rem 1rem;
  font:
    0.8rem/1.4 ui-sans-serif,
    system-ui,
    sans-serif;
  background: #fff4ee;
  color: #833127;
}
.bbx-theme-prose {
  --tw-prose-body: var(--bbx-ink, #6b5d4b);
  --tw-prose-headings: var(--bbx-ink, #302f2d);
  --tw-prose-bold: var(--bbx-ink, #302f2d);
  --tw-prose-links: var(--bbx-pen, #455f87);
  --tw-prose-quotes: var(--bbx-ink, #302f2d);
  --tw-prose-code: var(--bbx-ink, #302f2d);
  --tw-prose-quote-borders: var(--bbx-edge, #dedbd6);
  color: var(--bbx-ink, #6b5d4b);
}
.bbx-card-theme .bbx-theme-prose {
  --tw-prose-bullets: var(--bbx-bullet);
  --tw-prose-counters: var(--bbx-counter);
  --tw-prose-hr: var(--bbx-rule);
  --tw-prose-th-borders: var(--bbx-rule-strong);
  --tw-prose-td-borders: var(--bbx-rule);
  --tw-prose-captions: var(--bbx-ink-soft);
  --tw-prose-pre-bg: var(--bbx-code-paper);
  --tw-prose-pre-code: var(--bbx-code-ink);
}
.bbx-card-theme input[type="checkbox"] {
  accent-color: var(--bbx-pen);
}
.bbx-theme-link {
  color: var(--bbx-pen, #455f87);
  text-decoration-line: var(--bbx-link-decoration, underline);
  text-underline-offset: 3px;
  background-image: var(--bbx-link-image, none), var(--bbx-link-image, none);
  background-repeat: repeat-x, no-repeat;
  background-position:
    left bottom,
    left calc(100% + 2px);
  background-size:
    auto 6px,
    0% 6px;
  padding-bottom: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: background-size 180ms ease-out;
}
.bbx-theme-link:hover {
  background-size:
    auto 6px,
    100% 6px;
}
.bbx-quote-block {
  margin: 1.1em var(--bbx-quote-offset, 0px);
  padding: 0.85em 1.1em;
  padding-left: var(--bbx-quote-padding-left, 0);
  background: var(--bbx-quote-paper, #f5f4f1);
  border-left: var(--bbx-quote-edge, 3px) solid var(--bbx-pen, #455f87);
  border-radius: var(--bbx-quote-radius, 0 4px 4px 0);
  box-shadow: var(--bbx-quote-shadow, none);
  color: var(--bbx-ink, #302f2d);
}
.bbx-quote-block[data-treatment="layered"] {
  padding-left: 1.1em;
  background: var(--bbx-quote-layer-paper, #fff);
  border-left-width: 0;
  border-radius: 3px;
  box-shadow:
    0 1px 2px #352e2220,
    0 6px 12px #352e2218;
}
.bbx-quote-block[data-treatment="inset"] {
  padding-left: 1.1em;
  border-left-width: 2px;
  border-radius: 0;
  box-shadow: none;
}
.bbx-quote-block[data-treatment="plain"] {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding-left: 0;
}
.bbx-quote-body {
  font-family: inherit;
  font-style: italic;
  color: inherit;
  border: 0;
  margin: 0;
  padding: 0;
}
.bbx-theme-prose .bbx-quote-body {
  border: 0;
  margin: 0;
  padding: 0;
  font-weight: inherit;
  color: inherit;
}
.bbx-quote-body::before,
.bbx-quote-body::after {
  content: none;
}
.bbx-quote-attribution {
  display: block;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8rem;
  font-style: normal;
  color: var(--bbx-ink-soft, #625e58);
  margin-top: 0.6em;
}
.bbx-quote-inline {
  font-style: italic;
}
.bbx-quote-inline .bbx-quote-attribution {
  display: inline;
  margin-left: 0.3em;
}
.bbx-quote-mark {
  color: var(--bbx-pen, #455f87);
  font-style: normal;
}
.bbx-blockquote {
  background: var(--bbx-blockquote-paper, transparent);
  box-shadow: var(--bbx-blockquote-shadow, none);
  padding: var(--bbx-blockquote-padding, 0.5em 1em);
  border-left: var(--bbx-blockquote-edge, 2px) solid var(--bbx-edge, #dedbd6);
}
@media (max-width: 520px) {
  .bbx-card-back dl {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .bbx-card-back dd {
    margin-bottom: 0.6rem;
  }
  .bbx-card-heading {
    padding-top: 1rem;
  }
  .bbx-card-surface[data-card-theme="paper"] > .bbx-card-heading {
    padding-top: 1.5rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bbx-theme-link {
    transition: none;
  }
}
@media print {
  .bbx-card-surface {
    border: 0;
    box-shadow: none;
    background: transparent;
    color: #000;
  }
  .bbx-card-surface::before,
  .bbx-card-surface::after,
  .bbx-card-properties,
  .bbx-card-back {
    display: none;
  }
  .bbx-card-front[hidden] {
    display: block;
  }
  .bbx-card-front[data-card-mode="chat"] {
    max-height: none;
    overflow: visible;
  }
  .bbx-quote-block {
    box-shadow: none;
  }
}
.bbx-theme-swatch-group {
  margin: 0.75rem 0 0.5rem;
  color: var(--bbx-ink-soft);
  font:
    600 0.7rem/1.3 ui-sans-serif,
    system-ui,
    sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.bbx-theme-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 0.75rem;
  max-width: 42rem;
}
.bbx-theme-swatch-button {
  padding: 0.45rem;
  border: 2px solid transparent;
  border-radius: 8px;
  text-align: left;
  min-width: 0;
}
.bbx-theme-swatch-button[aria-pressed="true"] {
  border-color: var(--bbx-pen);
  background: #ffffff40;
}
.bbx-theme-swatch-button:focus-visible {
  outline: 2px solid var(--bbx-pen);
  outline-offset: 2px;
}
.bbx-theme-swatch-button:hover {
  background: #ffffff50;
}
.bbx-theme-swatch-button:disabled {
  opacity: 0.6;
  cursor: progress;
}
.bbx-theme-swatch {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 78px;
  padding: 0.65rem;
  font-size: 0.7rem;
}
.bbx-theme-swatch-writing {
  font-weight: 600;
}
.bbx-theme-swatch .bbx-theme-link {
  align-self: flex-start;
}
.bbx-theme-swatch-label {
  display: flex;
  flex-direction: column;
  margin-top: 0.55rem;
  font:
    0.75rem/1.4 ui-sans-serif,
    system-ui,
    sans-serif;
}
.bbx-theme-swatch-label > span {
  color: var(--bbx-ink-soft);
  text-transform: capitalize;
}
@media print {
  [data-card-page-actions] {
    display: none;
  }
  .bbx-card-surface[data-card-theme],
  .bbx-quote-block[data-treatment] {
    box-shadow: none;
    background: transparent;
    border: 0;
  }
}
.bbx-card-fields {
  color: var(--bbx-ink, #4a3f32);
}
.bbx-card-field-label,
.bbx-quote-speakers {
  color: var(--bbx-ink-soft, #b8a890);
}

.bbx-card-surface[data-card-mode="companion"] {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.bbx-card-surface[data-card-mode="companion"] > .bbx-card-front {
  flex: 1;
  min-height: 0;
}
.bbx-card-heading {
  flex-shrink: 0;
}
.bbx-card-chat-path {
  min-width: 0;
  flex: 1;
  align-self: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--bbx-ink-soft);
}

.bbx-card-theme .bbx-theme-prose {
  font-size: inherit;
}

/* ---- quote-sheets.css (beebox/src/frontend/src/themes/) ---- */
/* A quote's words and attribution share a single slip. Only the paper behind
   them is a little askew: text stays crisp, selectable, and in normal flow. */
.bbx-quote-block,
.bbx-blockquote {
  position: relative;
  isolation: isolate;
  min-width: 0;
  --bbx-slip-reach: var(--bbx-slip-overhang, 0px);
}
.bbx-quote-block::before,
.bbx-blockquote::before {
  content: "";
  position: absolute;
  inset: 0 calc(-1 * var(--bbx-slip-reach)) 0 0;
  z-index: -1;
  pointer-events: none;
  border: 1px solid #6b573223;
  border-top-color: #ffffffcc;
  border-radius: var(--bbx-sheet-radius, 8px);
  background-color: var(--bbx-quote-layer-paper, #fff);
  background-image:
    var(--bbx-slip-grain, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='fiber'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.1' filter='url(%23fiber)'/%3E%3C/svg%3E")),
    linear-gradient(175deg, #ffffff35, transparent 65%, #8467350c);
  background-size: 160px 160px, auto;
  transform: rotate(var(--bbx-slip-angle, -0.25deg));
  transform-origin: 45% 15%;
  box-shadow: 0 1px 1px #4e3d2529, 1px 4px 5px -2px #4e3d2540,
    2px 10px 14px -8px #4e3d2540;
}
.bbx-quote-block::before { display: var(--bbx-quote-sheet-display, none); }
.bbx-blockquote::before { display: var(--bbx-blockquote-sheet-display, none); }
.bbx-blockquote { margin: 1.3em 0.25rem; }
.bbx-quote-block[data-treatment="layered"] {
  background: transparent;
  box-shadow: none;
}
.bbx-quote-block[data-treatment="layered"]::before { display: block; }
.bbx-quote-block[data-treatment="inset"] {
  background: var(--bbx-quote-layer-paper, #f5f4f1);
}
.bbx-quote-block[data-treatment="inset"]::before,
.bbx-quote-block[data-treatment="plain"]::before { display: none; }
/* Para is a div so it can host card embeds. Keep its prose margins from
   making the little sheet's top and bottom appear uneven. */
.bbx-blockquote > :first-child,
.bbx-quote-body > :first-child { margin-top: 0; }
.bbx-blockquote > :last-child,
.bbx-quote-body > :last-child { margin-bottom: 0; }
/* Nested quotations stay on their enclosing slip instead of accumulating
   overhang beyond the card. Only decorative paper extends; text never does. */
.bbx-blockquote :is(.bbx-blockquote, .bbx-quote-block),
.bbx-quote-block :is(.bbx-blockquote, .bbx-quote-block) { --bbx-slip-reach: 0px; }
/* Compact chat cards scroll their front; keep the decoration inside that
   scrolling boundary instead of introducing a horizontal scrollbar. */
.bbx-card-front[data-card-mode="chat"] { --bbx-slip-overhang: 0px; }
@media (max-width: 520px) {
  .bbx-quote-block::before,
  .bbx-blockquote::before { transform: rotate(0.15deg); }
}
@media print {
  .bbx-quote-block::before,
  .bbx-quote-block[data-treatment]::before,
  .bbx-blockquote::before { display: none; }
  .bbx-blockquote { background: transparent; box-shadow: none; }
}

/* ---- card-turn.css (beebox/src/frontend/src/themes/) ---- */
/* The fold lifts on hover; clicking turns the whole sheet at its midpoint.
   Front content remains mounted and the control retains keyboard focus. */
.bbx-card-properties {
  transform-origin: top right;
  transition: transform 160ms ease-out;
}
.bbx-card-properties-label {
  position: absolute;
  pointer-events: none;
  font: 600 0.68rem/1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.bbx-card-surface[data-card-side="front"] .bbx-card-properties-label {
  top: calc(100% + 0.35rem);
  right: 0.25rem;
  opacity: 0.28;
  transform: rotate(-90deg) translateY(-100%);
  transform-origin: top right;
  transition: opacity 160ms ease-out;
}
.bbx-card-surface[data-card-side="front"] .bbx-card-properties:hover .bbx-card-properties-label,
.bbx-card-surface[data-card-side="front"] .bbx-card-properties:focus-visible .bbx-card-properties-label {
  opacity: 0.78;
}
.bbx-card-surface[data-card-side="back"] .bbx-card-properties-label {
  right: calc(100% + 0.75rem);
  top: 0;
  height: 44px;
  display: flex;
  align-items: center;
  pointer-events: auto;
  color: var(--bbx-ink);
  font-size: 0.72rem;
  font-weight: 400;
}
.bbx-card-surface[data-card-side="back"] > .bbx-card-heading {
  padding-top: 3.75rem;
}
.bbx-card-properties:hover,
.bbx-card-properties:focus-visible { transform: scale(1.12); }
.bbx-card-properties[aria-busy="true"] { transform: scale(1.2); }
.bbx-card-surface[data-card-turn] {
  transform-origin: center;
  backface-visibility: hidden;
}
.bbx-card-surface[data-card-turn="out"] {
  animation: bbx-card-turn-out 140ms ease-in both;
}
.bbx-card-surface[data-card-turn="in"] {
  animation: bbx-card-turn-in 180ms ease-out both;
}
@keyframes bbx-card-turn-out {
  from { transform: perspective(2000px) rotateY(0deg) scale(1); }
  to { transform: perspective(2000px) rotateY(-90deg) scale(.94); }
}
@keyframes bbx-card-turn-in {
  from { transform: perspective(2000px) rotateY(90deg) scale(.94); }
  to { transform: perspective(2000px) rotateY(0deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .bbx-card-properties,
  .bbx-card-properties-label { transition: none; }
  .bbx-card-properties:hover,
  .bbx-card-properties:focus-visible,
  .bbx-card-properties[aria-busy="true"] { transform: none; }
  /* A preference change during a turn must still complete the state change. */
  .bbx-card-surface[data-card-turn] { animation-duration: 1ms; }
}
@media print {
  .bbx-card-surface[data-card-turn] { animation: none; transform: none; }
}

/* ---- stock-textures.css (beebox/src/frontend/src/themes/) ---- */
/* Manila mixes short irregular fibers into the grain; other stocks keep their finish. */
.bbx-card-theme[data-card-theme="paper"][data-card-stock="manila"] {
  --bbx-slip-grain: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22320%22%20height%3D%22320%22%3E%3Cfilter%20id%3D%22grain%22%3E%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%22.65%22%20numOctaves%3D%223%22%20seed%3D%2219%22%20stitchTiles%3D%22stitch%22%2F%3E%3CfeColorMatrix%20type%3D%22saturate%22%20values%3D%220%22%2F%3E%3C%2Ffilter%3E%3Cg%20opacity%3D%220.3%22%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20filter%3D%22url%28%23grain%29%22%20opacity%3D%22.26%22%2F%3E%3Cpath%20d%3D%22M216.0%20250.0q2.6%200.9%205.8%200.4%20M126.4%20317.0q-0.7%20-1.8%20-2.4%20-3.2%20M84.5%2084.3q0.7%20-1.8%200.5%20-4.3%20M36.0%20104.9q1.5%201.3%203.8%201.8%20M65.7%2024.4q1.4%200.8%203.2%200.9%20M124.8%20233.8q3.6%20-1.0%206.8%20-4.0%20M33.4%20232.0q3.2%20-1.4%206.0%20-4.6%20M210.0%2096.5q-2.9%202.9%20-4.4%207.6%20M252.3%20303.4q1.4%200.9%203.4%201.0%20M233.1%20255.3q-0.9%20-2.0%20-3.1%20-3.6%20M199.9%2035.1q-3.2%20-1.0%20-7.2%20-0.3%20M145.6%20153.6q1.3%200.2%202.7%20-0.3%20M160.0%20118.6q-3.4%202.2%20-5.8%206.4%20M283.4%2079.4q0.8%20-0.5%201.4%20-1.4%20M37.9%20224.9q-0.9%20-1.6%20-2.7%20-2.7%20M91.7%20129.5q3.5%200.0%207.2%20-1.8%20M97.2%20216.0q0.0%20-1.0%20-0.5%20-2.1%20M219.2%20239.6q-0.9%20-0.8%20-2.3%20-1.0%20M161.8%20209.4q0.9%20-0.1%201.8%20-0.8%20M88.8%2028.9q0.7%20-1.3%200.7%20-3.0%20M149.6%2037.5q-2.7%201.5%20-4.7%204.5%20M218.1%2023.5q1.4%202.8%204.5%205.0%20M4.8%20123.6q-3.1%200.2%20-6.5%202.1%20M295.5%20182.0q-2.9%200.0%20-6.1%201.6%20M68.6%20162.9q-0.4%201.0%20-0.4%202.2%20M208.6%2068.5q1.4%200.6%203.3%200.5%20M239.5%2044.9q1.9%200.7%204.3%200.4%20M84.5%20281.5q-3.4%200.0%20-7.1%202.0%20M204.5%20217.3q1.8%200.5%204.0%200.1%20M137.6%20153.2q-0.8%200.7%20-1.4%201.8%20M50.8%20146.8q3.9%201.4%208.9%200.7%20M276.5%2084.3q2.2%20-1.2%203.9%20-3.7%20M104.5%20118.7q-1.8%201.6%20-2.8%204.4%20M308.8%2031.9q2.9%201.4%206.8%201.3%20M132.6%2014.9q1.4%20-1.7%201.8%20-4.2%20M118.0%20189.5q1.1%20-1.8%201.3%20-4.4%20M88.7%20310.8q-2.2%20-0.2%20-4.7%200.8%20M54.3%20211.8q-0.0%202.8%201.5%205.9%20M164.6%20278.1q-2.5%20-1.5%20-6.0%20-1.8%20M217.7%20195.8q-0.2%201.7%200.5%203.6%20M266.1%2089.6q0.7%20-1.2%200.7%20-2.8%20M188.3%20142.3q1.1%20-0.0%202.2%20-0.7%20M174.9%20184.9q-1.0%201.8%20-1.0%204.4%20M215.9%2083.7q-2.0%200.5%20-4.0%202.0%20M71.8%20143.4q1.4%201.4%203.6%202.1%20M253.3%2041.0q-1.2%20-0.9%20-3.0%20-1.3%20M41.8%20166.5q-2.6%200.2%20-5.2%201.8%20M145.2%20168.0q0.1%20-0.9%20-0.3%20-2.0%20M99.8%2079.0q3.5%20-0.9%206.8%20-3.9%20M45.1%20170.8q-0.2%20-1.4%20-1.2%20-2.7%20M194.1%2029.2q3.5%20-0.5%207.0%20-2.8%20M22.3%20215.0q-0.8%204.2%200.7%209.1%20M267.9%20298.8q1.8%200.3%203.9%20-0.3%20M236.2%20127.4q4.2%20-0.9%208.1%20-4.3%20M8.9%2032.1q-2.2%20-0.9%20-5.0%20-0.6%20M194.7%20316.3q-4.1%20-0.7%20-8.9%200.8%20M80.7%2059.0q-1.1%200.2%20-2.1%201.0%20M10.2%2024.9q-3.2%200.2%20-6.5%202.2%20M170.8%2021.9q-0.6%200.7%20-0.9%201.9%20M219.5%20100.1q1.9%20-3.9%201.8%20-9.1%20M48.9%20307.3q0.9%20-0.6%201.4%20-1.7%20M58.8%20204.2q0.7%20-2.5%200.1%20-5.5%20M200.4%2035.8q-2.0%203.9%20-1.9%209.1%20M68.0%20190.3q1.4%201.2%203.5%201.8%20M101.6%2068.4q-2.0%20-1.7%20-5.0%20-2.4%20M315.8%20251.0q1.0%201.3%202.9%202.1%20M57.9%2054.7q-0.1%202.2%201.0%204.6%20M23.9%20297.9q-0.5%20-1.7%20-1.9%20-3.2%20M156.1%20288.0q2.0%201.1%204.9%201.1%20M313.9%20168.6q-0.3%20-2.1%20-1.7%20-4.1%20M166.8%20201.4q-0.3%20-2.9%20-2.2%20-5.9%20M5.9%20307.1q-2.5%202.2%20-4.0%205.9%20M268.0%20136.5q-1.5%20-0.0%20-3.1%200.7%20M285.3%2022.8q3.0%200.8%206.6%200.0%20M9.7%20181.7q3.1%20-0.2%206.4%20-2.2%20M82.6%20282.1q1.4%20-2.9%201.3%20-6.8%20M247.9%20289.4q1.7%201.5%204.3%202.1%20M31.7%2043.9q-3.9%200.1%20-8.0%202.3%20M296.3%2049.0q3.1%20-1.4%205.6%20-4.5%20M70.0%20284.4q-0.9%20-0.8%20-2.2%20-1.2%20M112.4%2048.2q1.0%202.0%203.3%203.6%20M164.9%20293.1q-1.0%20-2.3%20-3.4%20-4.3%20M175.4%209.4q-1.0%20-3.0%20-3.7%20-5.8%20M156.0%20140.5q-2.0%20-3.6%20-6.2%20-6.4%20M91.2%20105.8q2.4%20-1.2%204.4%20-3.8%20M312.1%20294.7q1.0%204.1%204.4%207.9%20M253.5%20176.1q-0.4%20-1.5%20-1.7%20-2.9%20M61.9%20244.5q-2.9%20-1.5%20-6.8%20-1.5%20M94.3%2025.5q2.0%20-1.8%203.1%20-4.9%20M154.5%20118.9q2.3%20-0.0%204.7%20-1.4%20M250.6%2023.7q2.5%202.5%206.5%203.9%20M252.2%2051.4q-1.8%200.6%20-3.3%202.2%20M305.0%2088.3q1.6%20-1.5%202.4%20-4.0%20M105.7%20301.6q2.6%20-0.5%205.0%20-2.6%20M287.5%20202.7q1.5%203.9%205.3%207.2%20M141.7%2026.9q2.4%201.0%205.5%200.8%20M197.2%20269.7q1.8%201.2%204.4%201.4%20M262.5%20302.1q1.3%20-3.6%200.7%20-8.1%20M262.4%20214.8q1.6%201.1%204.0%201.4%20M252.8%20257.2q1.7%200.3%203.6%20-0.3%20M211.7%2056.2q-1.8%203.1%20-1.9%207.4%20M185.9%20304.0q0.9%20-1.8%200.8%20-4.1%20M309.1%20196.5q0.9%20-0.1%201.7%20-0.8%20M102.2%20263.6q-1.9%20-3.9%20-6.0%20-7.0%20M216.3%20272.3q1.3%20-0.1%202.5%20-0.9%20M12.5%20114.0q-0.0%202.9%201.6%206.0%20M88.6%20210.1q2.3%20-1.6%204.0%20-4.5%20M161.8%20255.3q3.6%20-0.9%206.8%20-3.8%20M252.6%20140.9q0.3%20-2.5%20-0.8%20-5.4%20M159.7%2020.1q3.3%20-2.0%205.7%20-6.0%20M115.6%20272.6q3.3%20-0.1%206.8%20-2.0%20M274.6%20190.8q1.3%20-3.7%200.7%20-8.4%20M250.0%20301.5q-0.7%202.2%20-0.3%204.9%20M309.7%20188.8q-2.0%20-2.9%20-5.9%20-4.9%20M38.1%20262.3q-1.2%20-3.4%20-4.4%20-6.3%20M252.5%2047.4q-3.8%200.7%20-7.5%203.6%20M170.0%2096.3q-3.0%201.9%20-5.1%205.6%20M51.3%20151.1q-1.0%203.0%20-0.5%206.8%20M6.6%20255.9q-2.0%202.3%20-2.9%205.9%20M42.8%20132.7q-2.8%201.1%20-5.3%204.0%20M132.8%20299.0q-2.6%200.7%20-5.0%203.0%20M310.6%2027.2q1.0%20-1.2%201.4%20-3.1%20M170.7%20227.4q2.2%20-1.9%203.6%20-5.2%20M57.8%20139.0q-0.4%20-4.4%20-3.2%20-8.8%20M58.3%20172.5q-0.8%201.3%20-0.9%203.1%20M152.9%2026.4q0.1%202.5%201.7%205.2%20M186.2%2073.5q-2.5%20-3.4%20-7.0%20-5.7%20M10.4%2079.0q3.6%201.6%208.5%201.4%20M209.7%20118.5q2.1%20-0.3%204.2%20-1.7%20M61.2%20189.8q-1.9%200.1%20-4.0%201.3%20M248.1%2061.7q-2.1%20-3.6%20-6.4%20-6.3%20M294.5%20143.1q3.5%201.6%208.1%201.4%20M136.7%20115.2q2.6%201.3%206.0%201.2%20M40.6%20153.5q-1.9%201.8%20-2.9%204.6%20M54.4%2063.1q1.0%20-0.5%201.9%20-1.6%20M133.9%20115.3q-1.1%200.2%20-2.2%201.1%20M18.9%20217.7q1.6%200.3%203.5%20-0.3%20M128.0%20161.7q0.0%20-1.2%20-0.5%20-2.5%20M31.2%20224.4q0.2%200.9%200.9%201.8%20M87.6%2035.9q-0.9%203.7%200.2%208.2%20M46.4%2082.2q2.1%20-2.8%202.7%20-7.0%20M237.3%20179.6q1.4%20-2.4%201.6%20-5.8%20M169.3%20278.9q1.1%200.2%202.5%20-0.3%20M156.7%206.5q-0.1%20-1.8%20-1.2%20-3.8%20M213.9%20217.5q3.0%20-0.9%205.6%20-3.5%20M254.8%20262.7q-2.7%20-1.8%20-6.8%20-2.3%20M61.9%20262.6q1.0%201.2%202.7%202.0%20M292.7%2099.5q2.1%20-1.3%203.6%20-3.7%20M175.7%20113.4q-1.6%200.1%20-3.2%201.0%20M121.6%20300.0q-1.0%20-2.2%20-3.2%20-4.0%22%20fill%3D%22none%22%20stroke%3D%22%236f5423%22%20stroke-width%3D%22.8%22%20stroke-opacity%3D%22.32%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}
:is(.bbx-card-surface, .bbx-interface-tab[data-active="true"])[data-card-theme="paper"][data-card-stock="manila"]::before {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22320%22%20height%3D%22320%22%3E%3Cfilter%20id%3D%22grain%22%3E%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%22.65%22%20numOctaves%3D%223%22%20seed%3D%2219%22%20stitchTiles%3D%22stitch%22%2F%3E%3CfeColorMatrix%20type%3D%22saturate%22%20values%3D%220%22%2F%3E%3C%2Ffilter%3E%3Cg%20opacity%3D%221%22%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20filter%3D%22url%28%23grain%29%22%20opacity%3D%22.26%22%2F%3E%3Cpath%20d%3D%22M216.0%20250.0q2.6%200.9%205.8%200.4%20M126.4%20317.0q-0.7%20-1.8%20-2.4%20-3.2%20M84.5%2084.3q0.7%20-1.8%200.5%20-4.3%20M36.0%20104.9q1.5%201.3%203.8%201.8%20M65.7%2024.4q1.4%200.8%203.2%200.9%20M124.8%20233.8q3.6%20-1.0%206.8%20-4.0%20M33.4%20232.0q3.2%20-1.4%206.0%20-4.6%20M210.0%2096.5q-2.9%202.9%20-4.4%207.6%20M252.3%20303.4q1.4%200.9%203.4%201.0%20M233.1%20255.3q-0.9%20-2.0%20-3.1%20-3.6%20M199.9%2035.1q-3.2%20-1.0%20-7.2%20-0.3%20M145.6%20153.6q1.3%200.2%202.7%20-0.3%20M160.0%20118.6q-3.4%202.2%20-5.8%206.4%20M283.4%2079.4q0.8%20-0.5%201.4%20-1.4%20M37.9%20224.9q-0.9%20-1.6%20-2.7%20-2.7%20M91.7%20129.5q3.5%200.0%207.2%20-1.8%20M97.2%20216.0q0.0%20-1.0%20-0.5%20-2.1%20M219.2%20239.6q-0.9%20-0.8%20-2.3%20-1.0%20M161.8%20209.4q0.9%20-0.1%201.8%20-0.8%20M88.8%2028.9q0.7%20-1.3%200.7%20-3.0%20M149.6%2037.5q-2.7%201.5%20-4.7%204.5%20M218.1%2023.5q1.4%202.8%204.5%205.0%20M4.8%20123.6q-3.1%200.2%20-6.5%202.1%20M295.5%20182.0q-2.9%200.0%20-6.1%201.6%20M68.6%20162.9q-0.4%201.0%20-0.4%202.2%20M208.6%2068.5q1.4%200.6%203.3%200.5%20M239.5%2044.9q1.9%200.7%204.3%200.4%20M84.5%20281.5q-3.4%200.0%20-7.1%202.0%20M204.5%20217.3q1.8%200.5%204.0%200.1%20M137.6%20153.2q-0.8%200.7%20-1.4%201.8%20M50.8%20146.8q3.9%201.4%208.9%200.7%20M276.5%2084.3q2.2%20-1.2%203.9%20-3.7%20M104.5%20118.7q-1.8%201.6%20-2.8%204.4%20M308.8%2031.9q2.9%201.4%206.8%201.3%20M132.6%2014.9q1.4%20-1.7%201.8%20-4.2%20M118.0%20189.5q1.1%20-1.8%201.3%20-4.4%20M88.7%20310.8q-2.2%20-0.2%20-4.7%200.8%20M54.3%20211.8q-0.0%202.8%201.5%205.9%20M164.6%20278.1q-2.5%20-1.5%20-6.0%20-1.8%20M217.7%20195.8q-0.2%201.7%200.5%203.6%20M266.1%2089.6q0.7%20-1.2%200.7%20-2.8%20M188.3%20142.3q1.1%20-0.0%202.2%20-0.7%20M174.9%20184.9q-1.0%201.8%20-1.0%204.4%20M215.9%2083.7q-2.0%200.5%20-4.0%202.0%20M71.8%20143.4q1.4%201.4%203.6%202.1%20M253.3%2041.0q-1.2%20-0.9%20-3.0%20-1.3%20M41.8%20166.5q-2.6%200.2%20-5.2%201.8%20M145.2%20168.0q0.1%20-0.9%20-0.3%20-2.0%20M99.8%2079.0q3.5%20-0.9%206.8%20-3.9%20M45.1%20170.8q-0.2%20-1.4%20-1.2%20-2.7%20M194.1%2029.2q3.5%20-0.5%207.0%20-2.8%20M22.3%20215.0q-0.8%204.2%200.7%209.1%20M267.9%20298.8q1.8%200.3%203.9%20-0.3%20M236.2%20127.4q4.2%20-0.9%208.1%20-4.3%20M8.9%2032.1q-2.2%20-0.9%20-5.0%20-0.6%20M194.7%20316.3q-4.1%20-0.7%20-8.9%200.8%20M80.7%2059.0q-1.1%200.2%20-2.1%201.0%20M10.2%2024.9q-3.2%200.2%20-6.5%202.2%20M170.8%2021.9q-0.6%200.7%20-0.9%201.9%20M219.5%20100.1q1.9%20-3.9%201.8%20-9.1%20M48.9%20307.3q0.9%20-0.6%201.4%20-1.7%20M58.8%20204.2q0.7%20-2.5%200.1%20-5.5%20M200.4%2035.8q-2.0%203.9%20-1.9%209.1%20M68.0%20190.3q1.4%201.2%203.5%201.8%20M101.6%2068.4q-2.0%20-1.7%20-5.0%20-2.4%20M315.8%20251.0q1.0%201.3%202.9%202.1%20M57.9%2054.7q-0.1%202.2%201.0%204.6%20M23.9%20297.9q-0.5%20-1.7%20-1.9%20-3.2%20M156.1%20288.0q2.0%201.1%204.9%201.1%20M313.9%20168.6q-0.3%20-2.1%20-1.7%20-4.1%20M166.8%20201.4q-0.3%20-2.9%20-2.2%20-5.9%20M5.9%20307.1q-2.5%202.2%20-4.0%205.9%20M268.0%20136.5q-1.5%20-0.0%20-3.1%200.7%20M285.3%2022.8q3.0%200.8%206.6%200.0%20M9.7%20181.7q3.1%20-0.2%206.4%20-2.2%20M82.6%20282.1q1.4%20-2.9%201.3%20-6.8%20M247.9%20289.4q1.7%201.5%204.3%202.1%20M31.7%2043.9q-3.9%200.1%20-8.0%202.3%20M296.3%2049.0q3.1%20-1.4%205.6%20-4.5%20M70.0%20284.4q-0.9%20-0.8%20-2.2%20-1.2%20M112.4%2048.2q1.0%202.0%203.3%203.6%20M164.9%20293.1q-1.0%20-2.3%20-3.4%20-4.3%20M175.4%209.4q-1.0%20-3.0%20-3.7%20-5.8%20M156.0%20140.5q-2.0%20-3.6%20-6.2%20-6.4%20M91.2%20105.8q2.4%20-1.2%204.4%20-3.8%20M312.1%20294.7q1.0%204.1%204.4%207.9%20M253.5%20176.1q-0.4%20-1.5%20-1.7%20-2.9%20M61.9%20244.5q-2.9%20-1.5%20-6.8%20-1.5%20M94.3%2025.5q2.0%20-1.8%203.1%20-4.9%20M154.5%20118.9q2.3%20-0.0%204.7%20-1.4%20M250.6%2023.7q2.5%202.5%206.5%203.9%20M252.2%2051.4q-1.8%200.6%20-3.3%202.2%20M305.0%2088.3q1.6%20-1.5%202.4%20-4.0%20M105.7%20301.6q2.6%20-0.5%205.0%20-2.6%20M287.5%20202.7q1.5%203.9%205.3%207.2%20M141.7%2026.9q2.4%201.0%205.5%200.8%20M197.2%20269.7q1.8%201.2%204.4%201.4%20M262.5%20302.1q1.3%20-3.6%200.7%20-8.1%20M262.4%20214.8q1.6%201.1%204.0%201.4%20M252.8%20257.2q1.7%200.3%203.6%20-0.3%20M211.7%2056.2q-1.8%203.1%20-1.9%207.4%20M185.9%20304.0q0.9%20-1.8%200.8%20-4.1%20M309.1%20196.5q0.9%20-0.1%201.7%20-0.8%20M102.2%20263.6q-1.9%20-3.9%20-6.0%20-7.0%20M216.3%20272.3q1.3%20-0.1%202.5%20-0.9%20M12.5%20114.0q-0.0%202.9%201.6%206.0%20M88.6%20210.1q2.3%20-1.6%204.0%20-4.5%20M161.8%20255.3q3.6%20-0.9%206.8%20-3.8%20M252.6%20140.9q0.3%20-2.5%20-0.8%20-5.4%20M159.7%2020.1q3.3%20-2.0%205.7%20-6.0%20M115.6%20272.6q3.3%20-0.1%206.8%20-2.0%20M274.6%20190.8q1.3%20-3.7%200.7%20-8.4%20M250.0%20301.5q-0.7%202.2%20-0.3%204.9%20M309.7%20188.8q-2.0%20-2.9%20-5.9%20-4.9%20M38.1%20262.3q-1.2%20-3.4%20-4.4%20-6.3%20M252.5%2047.4q-3.8%200.7%20-7.5%203.6%20M170.0%2096.3q-3.0%201.9%20-5.1%205.6%20M51.3%20151.1q-1.0%203.0%20-0.5%206.8%20M6.6%20255.9q-2.0%202.3%20-2.9%205.9%20M42.8%20132.7q-2.8%201.1%20-5.3%204.0%20M132.8%20299.0q-2.6%200.7%20-5.0%203.0%20M310.6%2027.2q1.0%20-1.2%201.4%20-3.1%20M170.7%20227.4q2.2%20-1.9%203.6%20-5.2%20M57.8%20139.0q-0.4%20-4.4%20-3.2%20-8.8%20M58.3%20172.5q-0.8%201.3%20-0.9%203.1%20M152.9%2026.4q0.1%202.5%201.7%205.2%20M186.2%2073.5q-2.5%20-3.4%20-7.0%20-5.7%20M10.4%2079.0q3.6%201.6%208.5%201.4%20M209.7%20118.5q2.1%20-0.3%204.2%20-1.7%20M61.2%20189.8q-1.9%200.1%20-4.0%201.3%20M248.1%2061.7q-2.1%20-3.6%20-6.4%20-6.3%20M294.5%20143.1q3.5%201.6%208.1%201.4%20M136.7%20115.2q2.6%201.3%206.0%201.2%20M40.6%20153.5q-1.9%201.8%20-2.9%204.6%20M54.4%2063.1q1.0%20-0.5%201.9%20-1.6%20M133.9%20115.3q-1.1%200.2%20-2.2%201.1%20M18.9%20217.7q1.6%200.3%203.5%20-0.3%20M128.0%20161.7q0.0%20-1.2%20-0.5%20-2.5%20M31.2%20224.4q0.2%200.9%200.9%201.8%20M87.6%2035.9q-0.9%203.7%200.2%208.2%20M46.4%2082.2q2.1%20-2.8%202.7%20-7.0%20M237.3%20179.6q1.4%20-2.4%201.6%20-5.8%20M169.3%20278.9q1.1%200.2%202.5%20-0.3%20M156.7%206.5q-0.1%20-1.8%20-1.2%20-3.8%20M213.9%20217.5q3.0%20-0.9%205.6%20-3.5%20M254.8%20262.7q-2.7%20-1.8%20-6.8%20-2.3%20M61.9%20262.6q1.0%201.2%202.7%202.0%20M292.7%2099.5q2.1%20-1.3%203.6%20-3.7%20M175.7%20113.4q-1.6%200.1%20-3.2%201.0%20M121.6%20300.0q-1.0%20-2.2%20-3.2%20-4.0%22%20fill%3D%22none%22%20stroke%3D%22%236f5423%22%20stroke-width%3D%22.8%22%20stroke-opacity%3D%22.32%22%20stroke-linecap%3D%22round%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  background-size: 320px 320px;
  opacity: .45;
}

/* ---- letter-set.css (beebox/src/frontend/src/themes/) ---- */
/* Letter set: pastel stationery with a stitched border, rounded type, and a
   few hearts in the corner. It pairs with the Candy system theme. */
.bbx-card-theme[data-card-theme="letter-set"] {
  --bbx-sheet-radius: 18px;
  --bbx-slip-overhang: 0px;
  --bbx-slip-angle: -0.6deg;
  --bbx-font: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Arial Rounded MT Bold", "Varela Round", ui-sans-serif, system-ui, sans-serif;
  --bbx-paper: #fff8fa;
  --bbx-ink: #4a2234;
  --bbx-ink-soft: #7a4a5e;
  --bbx-pen: #c2185b;
  --bbx-edge: #f6c3d3;
  --bbx-underlay: #fbe3ea;
  --bbx-quote-paper: #fff;
  --bbx-quote-layer-paper: #fff;
  --bbx-blockquote-paper: #ffffff80;
  --bbx-letter-stitch: #f28fb0;
  --bbx-letter-heart: #e3264a;
  --bbx-selection: #ffb3cb;
  --bbx-selection-ink: #3a1626;
  --bbx-selection-code: initial;
  --bbx-selection-code-ink: initial;
}
.bbx-card-theme[data-card-theme="letter-set"][data-card-stock="lemon"] {
  --bbx-paper: #fff8d6;
  --bbx-ink: #43381a;
  --bbx-ink-soft: #6e5e2e;
  --bbx-pen: #2d6fa8;
  --bbx-edge: #ecd98a;
  --bbx-underlay: #f6eab0;
  --bbx-quote-paper: #fffdf0;
  --bbx-quote-layer-paper: #fffdf0;
  --bbx-letter-stitch: #7cb8e6;
  --bbx-letter-heart: #4a9bd8;
  --bbx-selection: #9fd3f5;
  --bbx-selection-ink: #14304a;
}
.bbx-card-theme[data-card-theme="letter-set"][data-card-stock="sky"] {
  --bbx-paper: #eaf5fc;
  --bbx-ink: #20384a;
  --bbx-ink-soft: #4a6276;
  --bbx-edge: #b9dcf0;
  --bbx-underlay: #d6ebf7;
  --bbx-quote-paper: #f7fbfe;
  --bbx-quote-layer-paper: #f7fbfe;
  --bbx-selection: #ffc4d6;
  --bbx-selection-ink: #3a1626;
}
.bbx-card-surface[data-card-theme="letter-set"] {
  border: 0;
  box-shadow: 0 2px 0 var(--bbx-edge), 0 6px 16px #8a3a5a1f;
}
.bbx-card-surface[data-card-theme="letter-set"]::before {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: 0;
  border: 2px dashed var(--bbx-letter-stitch);
  border-radius: calc(var(--bbx-sheet-radius) - 6px);
  pointer-events: none;
}
.bbx-card-surface[data-card-theme="letter-set"]::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 64px;
  height: 44px;
  z-index: 0;
  pointer-events: none;
  background: var(--bbx-letter-heart);
  opacity: 0.85;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54 38'%3E%3Cpath id='h' d='M12 21s-7-4.4-9.5-8.6C.8 9.3 2.6 5 6.5 5c2.1 0 3.6 1.2 5.5 3.2C13.9 6.2 15.4 5 17.5 5c3.9 0 5.7 4.3 4 7.4C19 16.6 12 21 12 21z'/%3E%3Cuse href='%23h' transform='translate(28 10) scale(1.1) rotate(14 12 12)'/%3E%3Cuse href='%23h' transform='translate(20 -3) scale(.45) rotate(-10 12 12)' opacity='.6'/%3E%3C/svg%3E") no-repeat center / contain;
}
.bbx-card-surface[data-card-theme="letter-set"] > :is(.bbx-card-heading, .bbx-card-front, .bbx-card-back) {
  position: relative;
  z-index: 1;
}
.bbx-card-surface[data-card-theme="letter-set"] > .bbx-card-heading {
  padding-top: 1.6rem;
}
.bbx-card-surface[data-card-theme="letter-set"] > .bbx-card-heading :is(h1, h2) {
  font-weight: 700;
  letter-spacing: 0.01em;
}
.bbx-card-theme[data-card-theme="letter-set"] .bbx-theme-link {
  text-decoration-style: wavy;
  text-decoration-color: var(--bbx-letter-stitch);
  text-decoration-thickness: 1.5px;
}
.bbx-card-surface[data-card-theme="letter-set"] > .bbx-card-properties {
  border-radius: 0 18px 0 12px;
}
.bbx-card-surface[data-card-theme="letter-set"].bbx-theme-swatch::after {
  right: 8px;
  bottom: 6px;
  width: 30px;
  height: 21px;
}

/* ---- chrome.css (beebox/src/frontend/src/themes/) ---- */
/* Card preview framing and optional box-scoped chrome. */
/* A card preview rests on a desk; its own heading belongs to the paper. */
.bbx-card-overlay {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: auto;
  width: 100%;
  max-width: 56rem;
  max-height: calc(100% - 32px);
  min-height: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #e7e5e1;
  box-shadow: 0 16px 64px #17120d45;
}
.bbx-card-overlay:has(> .bbx-card-overlay-desk > .bbx-card-surface[data-card-theme="paper"]),
.bbx-card-overlay:has(> .bbx-card-overlay-desk > .bbx-card-surface[data-card-theme="post-it"]) {
  background: #d8d0c2;
}
.bbx-card-overlay-dismiss {
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
  padding: 6px 8px 0;
}
.bbx-card-overlay-dismiss button { min-width: 44px; min-height: 44px; color: #655744; }
.bbx-card-overlay-desk {
  flex: 0 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 40px 48px;
  scrollbar-gutter: stable both-edges;
}
.bbx-card-overlay-desk .bbx-card-surface[data-card-mode="companion"] { min-height: 0; }
@media (max-width: 640px) {
  .bbx-card-overlay { max-height: calc(100% - 16px); width: calc(100% - 16px); border-radius: 10px; }
  .bbx-card-overlay-desk { padding: 8px 16px 32px; scrollbar-gutter: auto; }
}
/* Selection colors are optional theme tokens, set in pairs. A card theme's
   pair overrides the system theme's through the cascade; with neither, the
   fallback here applies. A theme whose selection is dark adds a code pair
   that stays visible on dark code blocks. */
::selection {
  background-color: var(--bbx-selection, #bcd4f6);
  color: var(--bbx-selection-ink, #14202e);
}
:is(pre, pre *)::selection {
  background-color: var(--bbx-selection-code, var(--bbx-selection, #bcd4f6));
  color: var(--bbx-selection-code-ink, var(--bbx-selection-ink, #14202e));
}
/* Chrome owns the common desk and its saturated material palette. */
.bbx-box-presentation {
  --bbx-input-paper: #fff;
  --bbx-input-ink: #302f2d;
  --bbx-input-muted: #625e58;
  --bbx-scene: initial;
  --bbx-toolbar-background: initial;
  --bbx-toolbar-ink: initial;
  --bbx-toolbar-edge: initial;
  --bbx-toolbar-radius: initial;
  --bbx-toolbar-shadow: initial;
  --bbx-status-background: initial;
  --bbx-status-ink: initial;
  --bbx-status-edge: initial;
  --bbx-composer-background: initial;
  --bbx-composer-ink: initial;
  --bbx-composer-edge: initial;
  --bbx-composer-radius: initial;
  --bbx-composer-shadow: initial;
  --bbx-control-background: initial;
  --bbx-control-ink: initial;
  --bbx-control-radius: initial;
  --bbx-control-shape-default: initial;
  --bbx-control-shape-place: initial;
  --bbx-control-shape-session: initial;
  --bbx-control-shape-voice: initial;
  --bbx-control-shape-profile: initial;
  --bbx-control-shape-add: initial;
  --bbx-control-shape-send: initial;
  --bbx-control-shape-mic: initial;
  --bbx-control-shape-keyboard: initial;
  --bbx-control-shape-capture: initial;
  --bbx-send-background: initial;
  --bbx-send-ink: initial;
  --bbx-chat-user-paper: initial;
  --bbx-chat-user-ink: initial;
  --bbx-chat-user-radius: initial;
  --bbx-chat-reply-paper: initial;
  --bbx-chat-agent-paper: initial;
  --bbx-chat-reply-ink: initial;
  --bbx-menu-paper: initial;
  --bbx-menu-ink: initial;
  --bbx-menu-edge: initial;
  --bbx-menu-radius: initial;
  /* Reset per presentation so a nested preview never inherits the page's
     theme tokens. */
  --bbx-desk-pattern: none;
  --bbx-selection: initial;
  --bbx-selection-ink: initial;
  --bbx-selection-code: initial;
  --bbx-selection-code-ink: initial;
  --bbx-desk-background: #e4e0d9;
  background: var(--bbx-desk-pattern, none), var(--bbx-desk-background);
}
.bbx-box-presentation[data-chrome-theme="paper"] {
  --bbx-desk-background: #e4e0d9;
  /* Sepia ink, inverted; parchment on dark code. */
  --bbx-selection: #6b5640;
  --bbx-selection-ink: #fbf6ea;
  --bbx-selection-code: #e8dcc4;
  --bbx-selection-code-ink: #2a2418;
  --bbx-bar-paper: #43536e;
  --bbx-bar-edge: #2d394d;
}
.bbx-box-presentation[data-chrome-theme="paper"][data-chrome-stock="manila"] {
  /* Blue pencil. */
  --bbx-selection: #2f5fa8;
  --bbx-selection-ink: #fffaf0;
  --bbx-selection-code: #9cc0f0;
  --bbx-selection-code-ink: #14202e;
  --bbx-bar-paper: #8b3f2c;
  --bbx-bar-edge: #602819;
}
.bbx-box-presentation[data-chrome-theme="paper"][data-chrome-stock="blue"] {
  /* Dusty rose. */
  --bbx-selection: #e3bcc4;
  --bbx-selection-ink: #2a1a20;
  --bbx-selection-code: initial;
  --bbx-selection-code-ink: initial;
  --bbx-bar-paper: #304c79;
  --bbx-bar-edge: #1d3355;
}
/* Flat is deliberately quiet: one solid ink surface and no raised/paper
   treatment. The old default gradient remains available as Spectrum. */
.bbx-box-presentation[data-chrome-theme="plain"] {
  --bbx-desk-background: #e4e1db;
  --bbx-flat-bar: #27364d;
  /* Inverted into the bar's ink. */
  --bbx-selection: #27364d;
  --bbx-selection-ink: #f6f3ec;
  --bbx-selection-code: #f6f3ec;
  --bbx-selection-code-ink: #27364d;
}
.bbx-box-presentation[data-chrome-theme="plain"] .bbx-app-nav {
  background: var(--bbx-flat-bar);
  background-image: none;
}
.bbx-box-presentation[data-chrome-theme="plain"] .bbx-composer-material {
  background: #ece8e0;
  border-color: #d5cec3;
  box-shadow: none;
}
/* Spectrum keeps the familiar colorful bar, but gives it an explicit theme
   identity so Flat can remain genuinely flat. */
.bbx-box-presentation[data-chrome-theme="spectrum"] {
  --bbx-selection: #c2187a;
  --bbx-selection-ink: #fff;
}
.bbx-box-presentation[data-chrome-theme="spectrum"] .bbx-app-nav {
  background-image: linear-gradient(to right, #5e5490, #9b6ba6, #d4845a);
}
/* One textured bar surface, with raised controls on top. */
.bbx-box-presentation[data-chrome-theme="paper"] .bbx-system-control {
  background: linear-gradient(165deg, #ffffff20, #00000012), var(--bbx-bar-paper);
  color: #fff8ec;
  border: 1px solid #ffffff70;
  box-shadow: inset 0 1px 0 #ffffff70, inset 0 -1px 0 #00000030,
    0 2px 1px var(--bbx-bar-edge), 0 4px 6px #182c2840;
}
.bbx-box-presentation[data-chrome-theme="paper"] .bbx-system-control:active {
  box-shadow: inset 0 1px 2px #00000025, 0 1px 0 var(--bbx-bar-edge);
}
.bbx-box-presentation[data-chrome-theme="paper"] .bbx-app-nav {
  position: relative;
  /* Keep the lower shadow above both static cards and positioned chat panes. */
  z-index: 1;
  isolation: isolate;
  background: transparent;
  color: #fff8ec;
  box-shadow: none;
}
.bbx-box-presentation[data-chrome-theme="paper"] .bbx-app-nav > div {
  position: relative;
  isolation: isolate;
  background: var(--bbx-bar-paper);
  border-radius: 0 0 12px 3px;
  box-shadow: inset 0 1px 0 #ffffff50, inset 0 -1px 0 #ffffff45,
    inset 0 -7px 12px -9px #000, 0 3px 5px #182c2855;
}
.bbx-box-presentation[data-chrome-theme="paper"] .bbx-app-nav > div::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='140'%3E%3Cfilter id='pulp'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.025 .07' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23pulp)'/%3E%3C/svg%3E");
  background-size: 240px 240px, 600px 140px;
  background-blend-mode: soft-light;
  mix-blend-mode: soft-light;
  opacity: .3;
}
/* Keep the familiar capsule/circle outlines. A bright rim and contact shadow
   lift each control off the sheet without affecting its portaled menu. */
.bbx-box-presentation[data-chrome-theme="paper"] .bbx-app-nav :is(
  .bbx-place-pill, #bbx-nav-session, #bbx-nav-voice, #bbx-nav-profile,
  #bbx-nav-todo, #bbx-nav-back-to-chat
) {
  border-radius: 9999px;
  background-color: color-mix(in srgb, var(--bbx-bar-paper) 85%, white);
  box-shadow: inset 0 1px 0 #ffffff70, inset 0 -1px 0 #00000030,
    0 2px 0 var(--bbx-bar-edge), 0 4px 5px #00000035;
}
.bbx-box-presentation[data-chrome-theme="paper"] .bbx-place-pill {
  border-color: #ffffff60;
}
.bbx-box-presentation[data-chrome-theme="paper"] .bbx-app-nav :is(
  #bbx-nav-session, #bbx-nav-voice, #bbx-nav-profile, #bbx-nav-todo, #bbx-nav-back-to-chat
):active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 2px #00000025, 0 1px 0 var(--bbx-bar-edge);
}
.bbx-box-presentation[data-chrome-theme="paper"] .bbx-app-nav :is(
  #bbx-nav-session, #bbx-nav-voice, #bbx-nav-profile, #bbx-nav-todo, #bbx-nav-back-to-chat
):focus-visible {
  outline: 2px solid #fff8ec;
  outline-offset: 3px;
}
.bbx-box-presentation .bbx-conversation-desk {
  background: var(--bbx-desk-pattern, none), var(--bbx-desk-background);
}
.bbx-box-presentation[data-chrome-theme="paper"] .bbx-composer-material {
  background: #f7f1e6;
  border: 1px solid #dbcfb9;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -3px 12px #56482c12;
}
@media print {
  .bbx-box-presentation[data-chrome-theme] .bbx-conversation-desk { background: #fff; }
  .bbx-composer-material { display: none; }
}

/* ---- candy.css (beebox/src/frontend/src/themes/) ---- */
/* Candy: a strawberry-pink system theme with polka dots and rounded,
   candy-button controls. It pairs with the Letter set card theme without
   repeating it: the chrome is saturated pink, the cards are pastel paper. */
.bbx-box-presentation[data-chrome-theme="candy"] {
  --bbx-candy-bar: #d6336c;
  --bbx-candy-bar-edge: #a8204f;
  --bbx-candy-dots: radial-gradient(circle, #ffffff38 0 2.5px, transparent 3px);
  --bbx-desk-background: #fbe6ee;
  --bbx-desk-pattern: radial-gradient(circle, #ffffff8c 0 1.5px, transparent 2px) 0 0 / 40px 40px fixed;
  --bbx-selection: #e3264a;
  --bbx-selection-ink: #fff;
  --bbx-selection-code: #ffb3cb;
  --bbx-selection-code-ink: #3a1626;
  --bbx-chat-user-paper: #d6336c;
  --bbx-chat-user-ink: #fff;
}
.bbx-box-presentation[data-chrome-theme="candy"] .bbx-app-nav {
  position: relative;
  z-index: 1;
  background-color: var(--bbx-candy-bar);
  background-image: var(--bbx-candy-dots);
  background-size: 18px 18px;
  border-radius: 0 0 18px 18px;
  box-shadow: inset 0 -3px 0 var(--bbx-candy-bar-edge), 0 3px 8px #a8204f40;
}
.bbx-box-presentation[data-chrome-theme="candy"] .bbx-app-nav :is(
  .bbx-place-pill, #bbx-nav-session, #bbx-nav-voice, #bbx-nav-profile,
  #bbx-nav-todo, #bbx-nav-back-to-chat
) {
  border-radius: 9999px;
  border-color: #ffffffa0;
  /* Darker than the bar so small white labels keep AA contrast. */
  background-color: #b02556;
  box-shadow: inset 0 2px 0 #ffffff60, 0 2px 0 var(--bbx-candy-bar-edge);
}
.bbx-box-presentation[data-chrome-theme="candy"] .bbx-app-nav :is(
  #bbx-nav-session, #bbx-nav-voice, #bbx-nav-profile, #bbx-nav-todo, #bbx-nav-back-to-chat
):active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 2px #00000025, 0 1px 0 var(--bbx-candy-bar-edge);
}
.bbx-box-presentation[data-chrome-theme="candy"] .bbx-composer-material {
  overflow: hidden;
  background: #fff7fa;
  border: 2px solid #f6b5ca;
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -3px 12px #d6336c1a;
}
.bbx-box-presentation[data-chrome-theme="candy"] .bbx-composer-material > section {
  border-top: 0;
  background: transparent;
}
.bbx-box-presentation[data-chrome-theme="candy"] #bbx-composer-send {
  background-color: #e3264a;
}
.bbx-box-presentation[data-chrome-theme="candy"] #bbx-composer-mic {
  background-color: #3f8fd0;
}
.bbx-box-presentation[data-chrome-theme="candy"] #bbx-composer-add {
  background-color: #fde0ea;
  color: #a8204f;
}
.bbx-box-presentation[data-chrome-theme="candy"] .bbx-chat-user-paper {
  border-radius: 20px 20px 4px 20px;
  background-color: var(--bbx-chat-user-paper);
  background-image: none;
  color: var(--bbx-chat-user-ink);
  box-shadow: 0 2px 0 var(--bbx-candy-bar-edge);
  /* The theme's red selection would vanish on the pink bubble. */
  --bbx-selection: #fff;
  --bbx-selection-ink: #a8204f;
}
.bbx-box-presentation[data-chrome-theme="candy"] .bbx-chat-callout {
  border: 2px solid #f6b5ca;
  border-radius: 16px;
  background-color: #fff7fa;
  color: #4a2234;
}
.bbx-system-theme-preview[data-chrome-theme="candy"] .bbx-system-theme-toolbar {
  background-color: #d6336c;
  background-image: radial-gradient(circle, #ffffff50 0 1.5px, transparent 2px);
  background-size: 8px 8px;
}

/* ---- system-theme-picker.css (beebox/src/frontend/src/themes/) ---- */
.bbx-system-theme-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.65rem;
}
.bbx-system-theme-button {
  min-width: 0;
  padding: 0.4rem;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  text-align: left;
}
.bbx-system-theme-button:hover { background: #ffffff55; }
.bbx-system-theme-button:focus-visible { outline: 2px solid var(--bbx-focus-ring, #59489a); outline-offset: 2px; }
.bbx-system-theme-button[aria-pressed="true"] { border-color: var(--bbx-focus-ring, #59489a); }
.bbx-system-theme-button:disabled { cursor: progress; opacity: 0.6; }
.bbx-system-theme-preview {
  display: grid;
  grid-template-rows: 1rem 3.25rem;
  overflow: hidden;
  min-height: 4.25rem;
  border: 1px solid var(--bbx-desk-edge, #0003);
  border-radius: 0.35rem;
  background: var(--bbx-desk-pattern, none), var(--bbx-desk-background);
}
.bbx-system-theme-toolbar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0 0.35rem;
  border-bottom: 1px solid var(--bbx-desk-edge, #0003);
  background: linear-gradient(90deg, #5e5490, #9b6ba6, #d4845a);
}
.bbx-system-theme-preview[data-chrome-theme="paper"] .bbx-system-theme-toolbar { background: var(--bbx-bar-paper); }
.bbx-system-theme-preview[data-chrome-theme="plain"] .bbx-system-theme-toolbar { background: #27364d; }
.bbx-system-theme-toolbar i { width: 0.7rem; height: 0.18rem; border-radius: 1rem; background: white; opacity: 0.65; }
.bbx-system-theme-desk { display: grid; place-items: center; padding: 0.65rem; }
.bbx-system-theme-desk > span {
  width: 58%;
  height: 1.2rem;
  border: 1px solid #ffffff70;
  border-radius: 0.3rem;
  background: #ffffff45;
  box-shadow: 0 2px 4px #0002;
}
.bbx-system-theme-label { display: block; margin-top: 0.35rem; font: 0.75rem/1.3 ui-sans-serif, system-ui, sans-serif; }
.bbx-landmark-system-theme { margin-top: 1.5rem; }
.bbx-landmark-system-theme > h4 { margin-bottom: 0.5rem; font-size: 0.875rem; font-weight: 600; }

/* ---- chat-material.css (beebox/src/frontend/src/themes/) ---- */
/* User-authored chat turns become paper slips only when the box chrome uses
   paper. The existing row keeps ownership of alignment, width, and scrolling. */
.bbx-box-presentation[data-chrome-theme="paper"] {
  --bbx-chat-user-paper: var(--bbx-bar-paper);
  --bbx-chat-user-ink: #ffffff;
}

.bbx-box-presentation[data-chrome-theme="paper"] .bbx-chat-user-paper {
  /* The stocks' dark selections would blend into the slip. */
  --bbx-selection: #fbf6ea;
  --bbx-selection-ink: #2a2418;
  position: relative;
  isolation: isolate;
  border: 0;
  border-radius: 13px 0 0 13px;
  background-color: var(--bbx-chat-user-paper);
  color: var(--bbx-chat-user-ink);
  box-shadow: -2px 3px 5px #353b4226, -8px 9px 15px -12px #252b3347;
}

.bbx-box-presentation[data-chrome-theme="paper"] .bbx-chat-user-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='fiber'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='2' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23fiber)' opacity='.13'/%3E%3C/svg%3E"),
    linear-gradient(174deg, #ffffff18, transparent 58%, #00000016);
  background-size: 180px 180px, auto;
  background-blend-mode: soft-light;
  opacity: .48;
}

.bbx-box-presentation[data-chrome-theme="paper"] .bbx-chat-user-paper .bbx-chat-user-token,
.bbx-box-presentation[data-chrome-theme="paper"] .bbx-chat-user-paper .bbx-chat-user-attachment,
.bbx-box-presentation[data-chrome-theme="paper"] .bbx-chat-user-paper .bbx-chat-user-attachment-badge {
  background-color: rgb(255 255 255 / 13%);
}
.bbx-box-presentation[data-chrome-theme="paper"] .bbx-chat-user-paper .bbx-chat-user-attachment:hover {
  background-color: rgb(255 255 255 / 20%);
}
.bbx-box-presentation[data-chrome-theme="paper"] .bbx-chat-user-paper :is(
  .bbx-chat-user-status, .bbx-chat-user-attachment-summary
) { color: color-mix(in srgb, var(--bbx-chat-user-ink) 85%, transparent); }
.bbx-box-presentation[data-chrome-theme="paper"] .bbx-chat-user-paper .bbx-chat-user-unsure {
  text-decoration-color: color-mix(in srgb, var(--bbx-chat-user-ink) 45%, transparent);
}


/* Callouts remain foreground sheets in the transcript and ambient replies. */
.bbx-box-presentation[data-chrome-theme="paper"] .bbx-chat-callout {
  border: 0;
  border-radius: 5px 8px 7px 4px;
  background-color: #faf3dd;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='.065'/%3E%3C/svg%3E");
  box-shadow: 0 1px 1px #3c2d1920, 1px 4px 9px #3c2d1924, inset 0 1px 0 #ffffffb0;
  color: #39372f;
}

/* ---- interface.css (beebox/src/frontend/src/themes/) ---- */
/* Shared framing for cards where the surrounding interface is part of the
   reading surface: browse detail, sidecar panels, and their tabs. */
.bbx-interface-card-desk[data-card-content="card"],
.bbx-interface-browse-panel[data-card-content="card"] > .bbx-interface-card-desk {
  background: var(--bbx-desk-pattern, none), var(--bbx-desk-background, #e4e0d9);
  padding: 20px;
}

.bbx-interface-card-desk[data-card-content="card"] > .bbx-card-surface,
.bbx-interface-browse-panel[data-card-content="card"] > .bbx-interface-card-desk > .bbx-card-surface {
  min-height: 0;
}

.bbx-interface-browse-panel[data-card-content="card"] {
  border-radius: 12px;
  background: var(--bbx-desk-pattern, none), var(--bbx-desk-background, #e4e0d9);
}

.bbx-interface-browse-panel > .bbx-interface-card-desk {
  border-radius: 0 0 12px 12px;
}

.bbx-interface-card-toolbar {
  border-radius: 12px 12px 0 0;
  border-bottom: 1px solid #d2ccc2;
  background: #f5f2ec;
}

.bbx-interface-tabstrip > [role="none"] {
  align-items: stretch;
  /* The compact row must not lose label height to a horizontal scrollbar. */
  scrollbar-width: none;
  gap: 3px;
  padding: 6px 3px 0;
}

.bbx-interface-tabstrip > [role="none"]::-webkit-scrollbar {
  display: none;
}

.bbx-interface-tab {
  --bbx-tab-top-border: 1px;
  min-height: 34px;
  border-radius: 6px 6px 0 0;
  border-top: var(--bbx-tab-top-border) solid var(--bbx-edge);
  border-left: 1px solid var(--bbx-edge);
  color: var(--bbx-ink);
  background-color: color-mix(in srgb, var(--bbx-paper) 88%, #e8e3da);
  border-right: 1px solid color-mix(in srgb, var(--bbx-edge) 75%, #cbc4b9);
  border-bottom: 3px solid transparent;
}

.bbx-interface-tab[data-card-theme="paper"],
.bbx-interface-tab[data-card-theme="post-it"] {
  background-image: var(--bbx-interface-tab-grain);
}

.bbx-interface-tab[data-card-theme="paper"] {
  --bbx-interface-tab-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='.08'/%3E%3C/svg%3E");
}

.bbx-interface-tab[data-card-theme="post-it"] {
  --bbx-interface-tab-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='.05'/%3E%3C/svg%3E");
}

.bbx-interface-tab:hover {
  background-color: color-mix(in srgb, var(--bbx-paper) 78%, white);
}

.bbx-interface-tab[data-active="true"] {
  border-bottom-color: var(--bbx-pen);
  background-color: var(--bbx-paper);
}

.bbx-interface-tab-action {
  color: var(--bbx-ink-soft);
}

.bbx-interface-tab-action:hover {
  color: var(--bbx-ink);
  background: color-mix(in srgb, var(--bbx-ink) 10%, transparent);
}

.bbx-interface-tab-pin {
  color: var(--bbx-pen);
}

@media (max-width: 640px) {
  .bbx-interface-card-desk[data-card-content="card"],
  .bbx-interface-browse-panel[data-card-content="card"] > .bbx-interface-card-desk {
    padding: 12px;
  }
}

@media print {
  .bbx-interface-card-desk[data-card-content="card"],
  .bbx-interface-browse-panel[data-card-content="card"] > .bbx-interface-card-desk {
    padding: 0;
    background: transparent;
  }
}

/* A selected card's tab grows from the sheet's top edge. The desk surrounds
   the whole tab-and-card assembly rather than cutting between its parts. */
.bbx-companion-desk[data-active-card] {
  --bbx-desk-gutter: 20px;
  background: var(--bbx-desk-pattern, none), var(--bbx-desk-background, #e4e0d9);
}
.bbx-companion-desk[data-active-card] > .bbx-companion-tabs {
  margin: var(--bbx-desk-gutter) var(--bbx-desk-gutter) 0;
  background: transparent;
  border-bottom: 0;
}
.bbx-companion-desk[data-active-card] .bbx-interface-card-desk[data-card-content="card"] {
  padding-top: 0;
}
.bbx-companion-desk[data-active-card] .bbx-interface-tabstrip > [role="none"] {
  position: relative;
  padding: 0;
  /* Leave a sliver of breathing room after the final tab. Without it the
     scroller clips the tab's outer edge exactly where the controls begin. */
  padding-right: 2px;
  background: transparent;
  border-right: 0;
  gap: 4px;
}
.bbx-companion-desk[data-active-card] .bbx-interface-tabstrip > [role="none"]::before,
.bbx-companion-desk[data-active-card] .bbx-interface-tabstrip > [role="none"]::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  width: 18px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease;
}
.bbx-companion-desk[data-active-card] .bbx-interface-tabstrip > [role="none"]::before {
  left: 0;
  background: linear-gradient(to right, var(--bbx-desk-background, #e4e0d9), transparent);
}
.bbx-companion-desk[data-active-card] .bbx-interface-tabstrip > [role="none"]::after {
  right: 0;
  background: linear-gradient(to left, var(--bbx-desk-background, #e4e0d9), transparent);
}
.bbx-companion-desk[data-active-card] .bbx-interface-tabstrip > [role="none"][data-overflow-left]::before,
.bbx-companion-desk[data-active-card] .bbx-interface-tabstrip > [role="none"][data-overflow-right]::after {
  opacity: 0.9;
}
.bbx-companion-desk[data-active-card] .bbx-interface-tabstrip > [role="none"] + [role="none"] {
  margin-left: 4px;
}
.bbx-companion-desk[data-active-card] .bbx-interface-tab {
  border-bottom-width: 0;
  /* Balance the decorative top edge so label and actions share the tab center. */
  padding-bottom: var(--bbx-tab-top-border);
}
.bbx-companion-desk[data-active-card] .bbx-interface-tab[data-active="true"] {
  z-index: 2;
}
.bbx-companion-desk[data-active-card] .bbx-interface-tab[data-active="true"] [role="tab"] {
  font-weight: 600;
}
.bbx-companion-desk[data-active-card] .bbx-interface-card-desk > .bbx-card-surface {
  position: relative;
  z-index: 1;
}
.bbx-companion-desk[data-active-card]:has(.bbx-interface-tabstrip > [role="none"] > .bbx-interface-tab:first-child) .bbx-interface-card-desk[aria-hidden="false"] > .bbx-card-surface {
  border-top-left-radius: 0;
}
@media (max-width: 640px) {
  .bbx-companion-desk[data-active-card] { --bbx-desk-gutter: 12px; }
}

/* Paint the selected tab with the sheet's actual stock texture (the shared
   ::before rules), rather than a separate approximation of that material. */
.bbx-interface-tab[data-active="true"] {
  position: relative;
  isolation: isolate;
  background-image: none;
}
.bbx-interface-tab[data-active="true"] > button {
  position: relative;
  z-index: 1;
}
/* Tab and sheet sample one material canvas: the sheet keeps its full
   vignette, edge lighting, and raised shadow. Only the sampling origin differs. */
.bbx-companion-desk[data-active-card] .bbx-interface-card-desk > .bbx-card-surface::after,
.bbx-companion-desk[data-active-card] .bbx-interface-tab[data-active="true"]::after {
  background-size: var(--bbx-material-width, 100%) var(--bbx-material-height, 100%);
  background-repeat: no-repeat;
}
.bbx-companion-desk[data-active-card] .bbx-interface-card-desk > .bbx-card-surface::before,
.bbx-companion-desk[data-active-card] .bbx-interface-card-desk > .bbx-card-surface::after {
  background-position: 0 calc(-1 * var(--bbx-material-tab-height, 0px));
}
.bbx-companion-desk[data-active-card] .bbx-interface-tab[data-active="true"]::before,
.bbx-companion-desk[data-active-card] .bbx-interface-tab[data-active="true"]::after {
  background-position: calc(-1 * var(--bbx-material-tab-x, 0px)) 0;
}
/* Continue the bright rim around the outline, not across the tab joint.
   Keep highlights on the surface: the vignette layer uses multiply blending. */
.bbx-companion-desk[data-active-card] .bbx-interface-tab[data-active="true"][data-card-theme="paper"] {
  box-shadow: inset 0 1px 0 #ffffff80;
  outline: 1px solid var(--bbx-edge);
  outline-offset: -1px;
}
.bbx-companion-desk[data-active-card] .bbx-interface-card-desk > .bbx-card-surface[data-card-theme="paper"] {
  background-image: linear-gradient(to right,
    #ffffff80 0px var(--bbx-material-tab-x, 0px),
    transparent var(--bbx-material-tab-x, 0px) var(--bbx-material-tab-right, 0px),
    #ffffff80 var(--bbx-material-tab-right, 0px) 100%);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  box-shadow: 0 1px 1px #3c2d191a, 0 4px 10px #3c2d1924,
    0 14px 28px #3c2d1924, inset 0 0 22px #785f3c12,
    inset 1px 0 0 #ffffff80, inset -1px 0 0 #ffffff80, inset 0 -1px 0 #ffffff80;
}

/* ---- expressive.css (beebox/src/frontend/src/themes/) ---- */
/* Scene and material parameters are independent: choosing a system theme
   never replaces a card's own material. Existing themes keep their CSS. */
.bbx-box-presentation[data-theme-composition="expressive"] {
  background: var(--bbx-scene);
}
.bbx-box-presentation[data-theme-composition="expressive"] :is(.bbx-conversation-desk, .bbx-companion-desk[data-active-card], .bbx-interface-card-desk[data-card-content="card"]) {
  background: transparent;
}
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-app-nav {
  background: var(--bbx-toolbar-background);
  color: var(--bbx-toolbar-ink);
  border-bottom: 1px solid var(--bbx-toolbar-edge);
  border-radius: var(--bbx-toolbar-radius);
  box-shadow: var(--bbx-toolbar-shadow);
}
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-app-nav :is(.bbx-place-pill, #bbx-nav-session, #bbx-nav-voice, #bbx-nav-profile, #bbx-nav-todo, #bbx-nav-questions) {
  background: var(--bbx-control-background);
  color: var(--bbx-control-ink);
  border-radius: var(--bbx-control-radius);
  border-color: currentColor;
}
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-app-nav :is(button, a):focus-visible {
  outline: 2px solid var(--bbx-toolbar-ink);
  outline-offset: 3px;
}
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-composer-material {
  background: var(--bbx-composer-background);
  color: var(--bbx-composer-ink);
  border: 1px solid var(--bbx-composer-edge);
  border-radius: var(--bbx-composer-radius);
  box-shadow: var(--bbx-composer-shadow);
}
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-composer-material > section {
  background: transparent;
  border-top: 0;
}
.bbx-box-presentation[data-theme-composition="expressive"] :is(#bbx-composer-add, #bbx-composer-mic, #bbx-composer-keyboard, #bbx-composer-capture) {
  background: var(--bbx-control-background);
  color: var(--bbx-control-ink);
  border-radius: var(--bbx-control-radius);
}
.bbx-box-presentation[data-theme-composition="expressive"] #bbx-composer-send {
  background: var(--bbx-send-background);
  color: var(--bbx-send-ink);
  border-radius: var(--bbx-control-radius);
}
.bbx-box-presentation[data-theme-composition="expressive"] #bbx-composer-input {
  background: var(--bbx-input-paper);
  color: var(--bbx-input-ink);
  border-radius: var(--bbx-control-radius);
}
.bbx-box-presentation[data-theme-composition="expressive"] #bbx-composer-input::placeholder { color: var(--bbx-input-muted); }
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-chat-user-paper {
  background: var(--bbx-chat-user-paper);
  color: var(--bbx-chat-user-ink);
  border-radius: var(--bbx-chat-user-radius);
}
/* Apply to content, not the viewport-sized final-turn scroll spacer. */
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-chat-reply-material {
  margin: 8px 12px;
  padding: 16px;
  background: var(--bbx-chat-agent-paper, var(--bbx-chat-reply-paper));
  color: var(--bbx-chat-reply-ink);
  border-radius: var(--bbx-control-radius);
  box-shadow: 0 2px 5px #0002;
}
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-chat-callout {
  background: var(--bbx-chat-reply-paper);
  color: var(--bbx-chat-reply-ink);
}
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-interface-card-toolbar {
  background: var(--bbx-menu-paper);
  color: var(--bbx-menu-ink);
  border-color: var(--bbx-menu-edge);
}
/* Portals carry the selected selectors; no copying of computed DOM styles. */
.bbx-themed-menu[data-theme-composition="expressive"] {
  background: var(--bbx-menu-paper);
  color: var(--bbx-menu-ink);
  border-color: var(--bbx-menu-edge);
  border-radius: var(--bbx-menu-radius);
  box-shadow: 3px 5px 0 color-mix(in srgb, var(--bbx-menu-edge) 65%, transparent);
}
.bbx-themed-menu[data-theme-composition="expressive"] [role="menuitem"]:not(.text-danger, [aria-disabled="true"], :disabled) {
  color: var(--bbx-menu-ink);
}
.bbx-themed-menu[data-theme-composition="expressive"] [role="menuitem"]:not([aria-disabled="true"], :disabled):is(:hover, :focus-visible) {
  background: color-mix(in srgb, var(--bbx-menu-edge) 16%, var(--bbx-menu-paper));
}
.bbx-card-theme[data-theme-composition="expressive"].bbx-card-surface {
  background: var(--bbx-sheet-decoration), var(--bbx-paper);
  box-shadow: var(--bbx-sheet-shadow);
}
.bbx-card-theme[data-theme-composition="expressive"].bbx-interface-tab {
  border-radius: var(--bbx-tab-radius);
}
.bbx-card-theme[data-theme-composition="expressive"] .bbx-card-properties-label { opacity: 1; }
.bbx-system-theme-preview[data-theme-composition="expressive"] .bbx-system-theme-toolbar { background: var(--bbx-toolbar-background); }
@media print {
  .bbx-box-presentation[data-theme-composition="expressive"] { background: white; color: black; }
}
/* These child controls set an explicit legacy white, so inheritance alone
   cannot follow a light toolbar material. */
.bbx-box-presentation[data-theme-composition="expressive"] :is(#bbx-nav-place, #bbx-nav-here, #bbx-nav-profile > span) {
  color: var(--bbx-control-ink);
}
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-companion-tabs > [role="none"] > button {
  background: var(--bbx-control-background);
  color: var(--bbx-control-ink);
  border-radius: var(--bbx-control-radius);
}

.bbx-box-presentation[data-theme-composition="expressive"] :is(.bbx-chat-empty-label, .bbx-chat-meta-material) {
  background: var(--bbx-chat-reply-paper);
  color: var(--bbx-chat-reply-ink);
  padding: 0.65rem 1rem;
  border-radius: var(--bbx-control-radius);
}
.bbx-box-presentation[data-theme-composition="expressive"] :is(#bbx-pane-left-move, #bbx-pane-left-focus, #bbx-pane-left-chat, #bbx-pane-right-move, #bbx-pane-right-focus, #bbx-pane-right-chat) {
  background: var(--bbx-control-background);
  color: var(--bbx-control-ink);
  border-radius: var(--bbx-control-radius);
}
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-chat-user-paper :is(.bbx-chat-user-status, .bbx-chat-user-attachment-summary) {
  color: var(--bbx-chat-user-ink);
}

.bbx-box-presentation[data-theme-composition="expressive"] .bbx-chat-meta-material {
  width: fit-content;
}
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-chat-meta-material:disabled {
  color: color-mix(in srgb, var(--bbx-chat-reply-ink) 60%, var(--bbx-chat-reply-paper));
}
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-chat-user-paper.opacity-60 {
  opacity: 1;
}
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-chat-meta-material :is(.text-warm-500, .text-warm-600) { color: inherit; }

/* Progress and tool details use muted text inside the opaque reply panel;
   keep their ink legible on every expressive stock. */
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-chat-reply-material :is(.text-warm-500, .text-warm-600),
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-chat-callout > .text-accent-dark {
  color: var(--bbx-chat-reply-ink);
}
/* The provisional voice bubble is translucent by design. Give its whole
   group an opaque backing so the art cannot show through text or status. */
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-chat-pending-material {
  background: var(--bbx-chat-reply-paper);
  color: var(--bbx-chat-reply-ink);
  padding: 8px;
  border-radius: var(--bbx-control-radius);
}
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-chat-pending-material :is([role="status"], .text-warm-500, .text-warm-600) {
  color: inherit;
}
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-chat-pending-material > :is(.opacity-60, .opacity-90) {
  opacity: 1;
  background: var(--bbx-chat-user-paper);
  color: var(--bbx-chat-user-ink);
}
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-chat-reply-material .prose {
  --tw-prose-body: var(--bbx-chat-reply-ink);
  --tw-prose-headings: var(--bbx-chat-reply-ink);
  --tw-prose-bold: var(--bbx-chat-reply-ink);
  --tw-prose-quotes: var(--bbx-chat-reply-ink);
  --tw-prose-bullets: var(--bbx-chat-reply-ink);
  --tw-prose-counters: var(--bbx-chat-reply-ink);
}
.bbx-themed-menu[data-theme-composition="expressive"] [role="menuitem"]:is([aria-disabled="true"], :disabled) {
  color: color-mix(in srgb, var(--bbx-menu-ink) 50%, var(--bbx-menu-paper));
}

/* The target's activity belongs to the composer material. Round only the
   exposed top edge, skipping hidden ambient regions; do not clip the composer
   or its floating controls. The strip can stand alone with native input. */
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-chat-target-strip {
  background: var(--bbx-status-background);
  color: var(--bbx-status-ink);
  border-color: var(--bbx-status-edge);
  border-bottom: 1px solid var(--bbx-status-edge);
  padding-block: 0.5rem;
}
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-composer-material > .bbx-chat-target-strip:nth-child(1 of :not([hidden], :empty)) {
  border-top: 0;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-chat-target-strip > button {
  border-radius: var(--bbx-control-radius);
}

.bbx-box-presentation[data-theme-composition="expressive"] .bbx-composer-material > .bbx-chat-target-strip:nth-last-child(1 of :not([hidden], :empty)) {
  border-bottom: 0;
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}

/* Notices and dictation actions need their own reading surface on dark chrome. */
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-composer-notices {
  background: var(--bbx-input-paper);
  color: var(--bbx-input-ink);
}
.bbx-box-presentation[data-theme-composition="expressive"] :is(#bbx-composer-dictation-cancel, #bbx-composer-dictation-edit) {
  background: var(--bbx-input-paper);
  color: var(--bbx-input-ink);
}
.bbx-box-presentation[data-theme-composition="expressive"] :is(#bbx-composer-dictation-cancel, #bbx-composer-dictation-edit):hover {
  background: var(--bbx-control-background);
  color: var(--bbx-control-ink);
}

/* ---- control-shapes.css (beebox/src/frontend/src/themes/) ---- */
/* Shape only decorative layers: hit targets and focus outlines stay whole. */
.bbx-box-presentation[data-theme-composition="expressive"] :is(.bbx-app-nav, .bbx-composer-material) :is(.bbx-place-pill, #bbx-nav-session, #bbx-nav-voice, #bbx-nav-profile, #bbx-nav-todo, #bbx-nav-questions, #bbx-composer-add, #bbx-composer-send, #bbx-composer-mic, #bbx-composer-keyboard, #bbx-composer-capture) {
  position: relative;
  isolation: isolate;
  background: transparent;
  border-color: transparent;
}
.bbx-box-presentation[data-theme-composition="expressive"] :is(.bbx-app-nav, .bbx-composer-material) :is(.bbx-place-pill, #bbx-nav-session, #bbx-nav-voice, #bbx-nav-profile, #bbx-nav-todo, #bbx-nav-questions, #bbx-composer-add, #bbx-composer-send, #bbx-composer-mic, #bbx-composer-keyboard, #bbx-composer-capture)::before,
.bbx-box-presentation[data-theme-composition="expressive"] :is(.bbx-app-nav, .bbx-composer-material) :is(.bbx-place-pill, #bbx-nav-session, #bbx-nav-voice, #bbx-nav-profile, #bbx-nav-todo, #bbx-nav-questions, #bbx-composer-add, #bbx-composer-send, #bbx-composer-mic, #bbx-composer-keyboard, #bbx-composer-capture)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: var(--bbx-control-radius);
  clip-path: var(--bbx-control-shape, var(--bbx-control-shape-default, none));
  background: var(--bbx-control-ink);
}
.bbx-box-presentation[data-theme-composition="expressive"] :is(.bbx-app-nav, .bbx-composer-material) :is(.bbx-place-pill, #bbx-nav-session, #bbx-nav-voice, #bbx-nav-profile, #bbx-nav-todo, #bbx-nav-questions, #bbx-composer-add, #bbx-composer-send, #bbx-composer-mic, #bbx-composer-keyboard, #bbx-composer-capture)::after {
  inset: 1px;
  background: var(--bbx-control-face, var(--bbx-control-background));
}
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-place-pill { --bbx-control-shape: var(--bbx-control-shape-place, var(--bbx-control-shape-default, none)); }
.bbx-box-presentation[data-theme-composition="expressive"] #bbx-nav-session { --bbx-control-shape: var(--bbx-control-shape-session, var(--bbx-control-shape-default, none)); }
.bbx-box-presentation[data-theme-composition="expressive"] #bbx-nav-voice { --bbx-control-shape: var(--bbx-control-shape-voice, var(--bbx-control-shape-default, none)); }
.bbx-box-presentation[data-theme-composition="expressive"] #bbx-nav-profile { --bbx-control-shape: var(--bbx-control-shape-profile, var(--bbx-control-shape-default, none)); }
.bbx-box-presentation[data-theme-composition="expressive"] #bbx-composer-add { --bbx-control-shape: var(--bbx-control-shape-add, var(--bbx-control-shape-default, none)); }
.bbx-box-presentation[data-theme-composition="expressive"] #bbx-composer-send { --bbx-control-shape: var(--bbx-control-shape-send, var(--bbx-control-shape-default, none)); }
.bbx-box-presentation[data-theme-composition="expressive"] #bbx-composer-mic { --bbx-control-shape: var(--bbx-control-shape-mic, var(--bbx-control-shape-default, none)); }
.bbx-box-presentation[data-theme-composition="expressive"] #bbx-composer-keyboard { --bbx-control-shape: var(--bbx-control-shape-keyboard, var(--bbx-control-shape-default, none)); }
.bbx-box-presentation[data-theme-composition="expressive"] #bbx-composer-capture { --bbx-control-shape: var(--bbx-control-shape-capture, var(--bbx-control-shape-default, none)); }
.bbx-box-presentation[data-theme-composition="expressive"] #bbx-composer-send {
  --bbx-control-face: var(--bbx-send-background);
}

/* Badge parents clip overflow, so draw their focus above the face, inside. */
.bbx-box-presentation[data-theme-composition="expressive"] .bbx-app-nav :is(#bbx-nav-todo, #bbx-nav-questions):focus-visible {
  outline: 2px solid var(--bbx-control-ink);
  outline-offset: -3px;
}

/* ---- harlequin.css (beebox/src/frontend/src/themes/) ---- */
/* Pigment wedges carry the composition; quiet, opaque fields carry words.
   The SVG is original artwork, shared by desk, navigation, and card heading. */
.bbx-box-presentation[data-chrome-theme="harlequin"],
.bbx-themed-menu[data-chrome-theme="harlequin"] {
  --bbx-status-background: #ddd0a8;
  --bbx-status-ink: #292925;
  --bbx-status-edge: #8a6c1f;
  --bbx-desk-background: transparent;
  --bbx-desk-pattern: none;
  --bbx-harlequin-art: url("./art/harlequin-pigment.svg");
  --bbx-scene: var(--bbx-harlequin-art) center / cover no-repeat, #273b2e;
  --bbx-toolbar-background: #292925;
  --bbx-toolbar-ink: #fff8e9;
  --bbx-toolbar-edge: #c6a245;
  --bbx-toolbar-radius: 0;
  --bbx-toolbar-shadow: 0 4px 0 #171914;
  --bbx-composer-background: #eee5d2;
  --bbx-composer-ink: #292925;
  --bbx-composer-edge: #292925;
  --bbx-composer-radius: 0;
  --bbx-composer-shadow: -5px -5px 0 #bb9635;
  --bbx-control-background: #eee5d2;
  --bbx-control-ink: #292925;
  --bbx-control-radius: 2px;
  --bbx-control-shape-default: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  --bbx-control-shape-place: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
  --bbx-control-shape-send: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  --bbx-control-shape-voice: polygon(0 0, calc(100% - 7px) 0, 100% 100%, 7px 100%);
  --bbx-control-shape-profile: polygon(25% 0, 100% 0, 100% 75%, 75% 100%, 0 100%, 0 25%);
  --bbx-control-shape-add: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  --bbx-control-shape-mic: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  --bbx-control-shape-keyboard: var(--bbx-control-shape-add);
  --bbx-control-shape-capture: var(--bbx-control-shape-mic);
  --bbx-send-background: #213d94;
  --bbx-send-ink: #fff8e9;
  --bbx-chat-user-paper: #213d94;
  --bbx-chat-user-ink: #fff8e9;
  --bbx-chat-user-radius: 2px 2px 2px 20px;
  --bbx-chat-reply-paper: #f5efdf;
  --bbx-chat-reply-ink: #292925;
  --bbx-menu-paper: #f5efdf;
  --bbx-menu-ink: #292925;
  --bbx-menu-edge: #292925;
  --bbx-menu-radius: 2px;
  --bbx-selection: #bb9635;
  --bbx-selection-ink: #211e16;
  --bbx-selection-code: #e8dcc2;
  --bbx-selection-code-ink: #292925;
  --bbx-focus-ring: #8a6c1f;
}

.bbx-card-theme[data-card-theme="harlequin"] {
  --bbx-harlequin-art: url("./art/harlequin-pigment.svg");
  --bbx-paper: #f5efdf;
  --bbx-ink: #292925;
  --bbx-ink-soft: #625848;
  --bbx-pen: #213d94;
  --bbx-edge: #9a8a69;
  --bbx-underlay: #bb9635;
  --bbx-font: "Avenir Next", Avenir, ui-sans-serif, system-ui, sans-serif;
  --bbx-sheet-radius: 2px;
  --bbx-sheet-shadow: 5px 6px 0 #292925;
  --bbx-sheet-decoration: none;
  --bbx-tab-radius: 2px 2px 0 0;
  --bbx-quote-paper: #e6ddc8;
  --bbx-quote-layer-paper: #e6ddc8;
  --bbx-quote-edge: 4px;
  --bbx-quote-radius: 0;
  --bbx-quote-padding-left: 1.1em;
  --bbx-blockquote-paper: #e6ddc8;
  --bbx-blockquote-edge: 4px;
  --bbx-blockquote-padding: 0.75em 1em;
  --bbx-slip-overhang: 0px;
  --bbx-selection: #213d94;
  --bbx-selection-ink: #fff8e9;
  --bbx-selection-code: #bb9635;
  --bbx-selection-code-ink: #211e16;
  --bbx-link-decoration: underline;
}

/* An irregular painted edge, never a mask on text or interactive controls. */
.bbx-box-presentation[data-chrome-theme="harlequin"] .bbx-app-nav {
  border-bottom-width: 0;
  padding-bottom: 7px;
  background-image: var(--bbx-harlequin-art);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center 41%;
}
.bbx-box-presentation[data-chrome-theme="harlequin"] .bbx-app-nav > div {
  background: var(--bbx-toolbar-background);
}
.bbx-box-presentation[data-chrome-theme="harlequin"] .bbx-composer-material {
  border-top-width: 3px;
}
.bbx-box-presentation[data-chrome-theme="harlequin"] .bbx-chat-user-paper {
  border-right: 5px solid #bb9635;
  box-shadow: 3px 3px 0 #292925;
  --bbx-selection: #e8dcc2;
  --bbx-selection-ink: #292925;
}
.bbx-box-presentation[data-chrome-theme="harlequin"] .bbx-chat-callout {
  border-left: 5px solid #772d35;
  border-radius: 0;
}

.bbx-card-surface[data-card-theme="harlequin"] {
  border-top: 0;
  box-shadow: var(--bbx-sheet-shadow);
}
.bbx-card-surface[data-card-theme="harlequin"] > .bbx-card-heading {
  position: relative;
  padding-top: 2.5rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--bbx-edge);
}
.bbx-card-surface[data-card-theme="harlequin"] > .bbx-card-heading::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 44px;
  height: 20px;
  background: var(--bbx-harlequin-art) 45% 44% / cover no-repeat;
  pointer-events: none;
}
.bbx-card-surface[data-card-theme="harlequin"] > .bbx-card-heading :is(h1, h2) {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
}
.bbx-card-surface[data-card-theme="harlequin"] > .bbx-card-properties {
  border-radius: 0;
  box-shadow: none;
}
.bbx-interface-tab[data-card-theme="harlequin"] {
  --bbx-tab-top-border: 4px;
  border-top-color: #772d35;
}
.bbx-interface-tab[data-card-theme="harlequin"][data-active="true"] {
  border-top-color: #213d94;
}
.bbx-card-theme[data-card-theme="harlequin"] .bbx-theme-link {
  text-decoration-thickness: 1.5px;
}
.bbx-card-theme[data-card-theme="harlequin"] .bbx-quote-attribution {
  font-weight: 600;
}
.bbx-card-surface[data-card-theme="harlequin"].bbx-theme-swatch {
  border-top: 9px solid #213d94;
  border-left: 5px solid #bb9635;
}
.bbx-system-theme-preview[data-chrome-theme="harlequin"] .bbx-system-theme-toolbar {
  background: #292925;
  border-bottom: 3px solid #bb9635;
}

@media (max-width: 640px) {
  .bbx-box-presentation[data-chrome-theme="harlequin"] {
    --bbx-composer-shadow: -3px -3px 0 #bb9635;
  }
  .bbx-card-theme[data-card-theme="harlequin"] {
    --bbx-sheet-shadow: 3px 4px 0 #292925;
  }
}
@media print {
  .bbx-card-surface[data-card-theme="harlequin"] {
    box-shadow: none;
  }
  .bbx-card-surface[data-card-theme="harlequin"] > .bbx-card-heading::before {
    display: none;
  }
}

/* ---- electric-playground.css (beebox/src/frontend/src/themes/) ---- */
/* A printed black stage with hard acrylic edges, not emitted-light effects. */
.bbx-box-presentation[data-chrome-theme="electric-playground"],
.bbx-themed-menu[data-chrome-theme="electric-playground"] {
  --bbx-status-background: #384896;
  --bbx-status-ink: #edf4ff;
  --bbx-status-edge: #83d9f4;
  --bbx-desk-background: transparent;
  --bbx-desk-pattern: none;
  --bbx-scene:
    url("./art/electric-stage.svg") center bottom / cover no-repeat,
    #08090f;
  --bbx-toolbar-background:
    repeating-linear-gradient(0deg, #ffffff06 0 1px, transparent 1px 4px),
    linear-gradient(105deg, #182758, #11131e 62%);
  --bbx-toolbar-ink: #edf4ff;
  --bbx-toolbar-edge: #7790ee;
  --bbx-toolbar-radius: 0 0 22px 3px;
  --bbx-toolbar-shadow: 0 3px 0 #d66cff, 0 6px 0 #08090f;
  --bbx-composer-background:
    linear-gradient(120deg, #485ccd 0 12%, transparent 12.1%),
    repeating-linear-gradient(90deg, #a7cfff0d 0 1px, transparent 1px 5px),
    #263580;
  --bbx-composer-ink: #edf4ff;
  --bbx-composer-edge: #83d9f4;
  --bbx-composer-radius: 18px 3px 24px 3px;
  --bbx-composer-shadow:
    inset 0 2px 0 #a7e7ff,
    inset 0 -5px 0 #191e57,
    5px 5px 0 #05060b;
  --bbx-control-background: #d5ecff;
  --bbx-control-ink: #202452;
  --bbx-control-radius: 3px 11px 3px 3px;
  --bbx-control-shape-default: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
  --bbx-control-shape-place: polygon(0 0, calc(100% - 11px) 0, 100% 100%, 11px 100%);
  --bbx-control-shape-session: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  --bbx-control-shape-voice: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 0 100%);
  --bbx-control-shape-profile: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  --bbx-control-shape-add: polygon(0 9px, 9px 0, 100% 0, 100% 100%, 0 100%);
  --bbx-control-shape-send: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%);
  --bbx-control-shape-mic: polygon(9px 0, 100% 0, 100% 100%, 0 100%, 0 9px);
  --bbx-control-shape-keyboard: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  --bbx-control-shape-capture: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  --bbx-input-paper: #edf4ff;
  --bbx-input-ink: #202452;
  --bbx-input-muted: #515775;
  --bbx-send-background: #ee9cfa;
  --bbx-send-ink: #351447;
  --bbx-chat-user-paper: #f2ceec;
  --bbx-chat-user-ink: #33132d;
  --bbx-chat-user-radius: 19px 3px 3px 3px;
  --bbx-chat-reply-paper: #e4ebff;
  --bbx-chat-reply-ink: #171f37;
  --bbx-menu-paper: #f1e8f6;
  --bbx-menu-ink: #271c36;
  --bbx-menu-muted: #655675;
  --bbx-menu-edge: #664696;
  --bbx-menu-radius: 3px 18px 3px 3px;
  --bbx-selection: #a1e5ff;
  --bbx-selection-ink: #17243d;
  --bbx-selection-code: #a1e5ff;
  --bbx-selection-code-ink: #17243d;
}

/* Neutral retry and inline-tool surfaces use the same cool acrylic stock. */
.bbx-box-presentation[data-chrome-theme="electric-playground"] .bbx-chat-pending-material button.bg-warm-200 {
  background: var(--bbx-control-background);
  color: var(--bbx-control-ink);
}
.bbx-box-presentation[data-chrome-theme="electric-playground"] .bbx-chat-pending-material button:is(.bg-warm-200, .bg-transparent):hover {
  background: var(--bbx-input-paper);
  color: var(--bbx-control-ink);
}
.bbx-box-presentation[data-chrome-theme="electric-playground"] .bbx-chat-reply-material :is(.bg-warm-50, .bg-warm-100) {
  background: var(--bbx-input-paper);
  color: var(--bbx-input-ink);
}

/* The prism stock is opaque where people read, translucent at its edges. */
.bbx-card-theme[data-card-theme="electric-playground"] {
  --bbx-tab-radius: 10px 2px 0 0;
  --bbx-paper: #e9edf9;
  --bbx-ink: #1d2440;
  --bbx-ink-soft: #4a4766;
  --bbx-pen: #49349b;
  --bbx-edge: #6865ae;
  --bbx-underlay: #d4d4ee;
  --bbx-font: "Avenir Next", Avenir, ui-sans-serif, system-ui, sans-serif;
  --bbx-sheet-radius: 4px 27px 4px 4px;
  --bbx-sheet-decoration:
    linear-gradient(122deg, #ab80ec28 0 13%, transparent 13.1%) left top / 100% 100% no-repeat,
    linear-gradient(305deg, #ec74b333 0 7%, transparent 7.1%) right bottom / 100% 100% no-repeat,
    repeating-linear-gradient(0deg, #40479705 0 1px, transparent 1px 4px);
  --bbx-sheet-shadow:
    inset 3px 0 0 #e266b3,
    inset 0 3px 0 #eff8ff,
    4px 4px 0 #54499e,
    7px 7px 0 #100e27;
  --bbx-quote-paper: #dedafa;
  --bbx-quote-layer-paper: #dedafa;
  --bbx-blockquote-paper: #dedafa;
  --bbx-blockquote-edge: 3px;
  --bbx-blockquote-padding: 0.65em 0.85em;
  --bbx-quote-radius: 2px 14px 2px 2px;
  --bbx-link-decoration: underline;
  --bbx-link-image: none;
  --bbx-selection: #472875;
  --bbx-selection-ink: #f4edff;
  --bbx-selection-code: #e9a9df;
  --bbx-selection-code-ink: #211424;
}

/* Stock-specific details don't rotate, cut, or cover interactive content. */
.bbx-card-surface[data-card-theme="electric-playground"] > .bbx-card-heading {
  padding-top: 1.7rem;
}

.bbx-card-surface[data-card-theme="electric-playground"] .bbx-card-heading :is(h1, h2) {
  letter-spacing: -0.035em;
  font-weight: 800;
}

.bbx-card-theme[data-card-theme="electric-playground"] :is(th, code) {
  font-variant-numeric: tabular-nums;
}

/* Decorations stay restrained behind content on the narrow stage. */
@media (max-width: 639px) {
  .bbx-box-presentation[data-chrome-theme="electric-playground"] {
    --bbx-scene:
      url("./art/electric-stage.svg") 56% bottom / auto 100% no-repeat,
      #08090f;
    --bbx-toolbar-radius: 0 0 12px 2px;
    --bbx-toolbar-shadow: 0 3px 0 #d66cff;
    --bbx-control-shape-place: polygon(0 0, calc(100% - 4px) 0, 100% 100%, 4px 100%);
    --bbx-control-shape-session: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
    --bbx-composer-radius: 12px 3px 17px 3px;
    --bbx-composer-shadow: inset 0 2px 0 #a7e7ff, inset 0 -3px 0 #191e57;
  }

  .bbx-card-theme[data-card-theme="electric-playground"] {
    --bbx-sheet-radius: 3px 20px 3px 3px;
    --bbx-sheet-shadow:
      inset 2px 0 0 #e266b3,
      inset 0 2px 0 #eff8ff,
      2px 3px 0 #54499e;
  }
}

.bbx-themed-menu[data-chrome-theme="electric-playground"] .bbx-profile-email {
  color: var(--bbx-menu-muted);
}

/* ---- daydream.css (beebox/src/frontend/src/themes/) ---- */
/* A sky of sweeping cloud banks and small, uneven starbursts. The artwork
   lives around reading sheets, with a faint glimpse through reply material. */
.bbx-box-presentation[data-chrome-theme="daydream"],
.bbx-themed-menu[data-chrome-theme="daydream"] {
  --bbx-status-background: #dbc5ef;
  --bbx-status-ink: #442743;
  --bbx-status-edge: #ac82b4;
  --bbx-desk-background: transparent;
  --bbx-desk-pattern: none;
  --bbx-scene:
    url("./art/daydream-sparks.svg") center top / 640px 480px repeat,
    url("./art/daydream-clouds.svg") center bottom / cover no-repeat,
    radial-gradient(ellipse at 48% 68%, #ffe5ac 0, #f8add0 46%, #ed8fbd 100%);
  --bbx-toolbar-background: linear-gradient(112deg, #b69ce0 0%, #d591c0 48%, #e6a7ca 72%, #a7b6e7 100%);
  --bbx-toolbar-ink: #39213f;
  --bbx-toolbar-edge: #805e9c;
  --bbx-toolbar-radius: 0 0 26px 12px;
  --bbx-toolbar-shadow: 0 4px 0 #8870b4, 0 7px 0 #e8b0d0;
  --bbx-composer-background: #ecdef6;
  --bbx-composer-ink: #442743;
  --bbx-composer-edge: #9672b1;
  --bbx-composer-radius: 27px 27px 18px 27px;
  --bbx-composer-shadow: 0 5px 0 #c6b3df, 0 8px 0 #fff7fc;
  --bbx-control-background: #f5d9ef;
  --bbx-control-ink: #58255b;
  --bbx-control-radius: 18px 12px 17px 10px;
  --bbx-send-background: #813969;
  --bbx-send-ink: #ffffff;
  --bbx-chat-user-paper: #fce5f1;
  --bbx-chat-user-ink: #4c2848;
  --bbx-chat-user-radius: 23px 23px 7px 23px;
  --bbx-chat-reply-paper: #fffafd;
  --bbx-chat-agent-paper: rgb(255 245 253 / 88%);
  --bbx-chat-reply-ink: #442743;
  --bbx-menu-paper: #fffafd;
  --bbx-menu-ink: #442743;
  --bbx-menu-edge: #ac82b4;
  --bbx-menu-radius: 19px 12px 22px 14px;
  --bbx-selection: #75346c;
  --bbx-selection-ink: #ffffff;
  --bbx-selection-code: #f7cce8;
  --bbx-selection-code-ink: #442743;
}

.bbx-card-theme[data-card-theme="daydream"] {
  --bbx-tab-radius: 20px 20px 5px 5px;
  --bbx-paper: #fffafd;
  --bbx-ink: #442743;
  --bbx-ink-soft: #74516c;
  --bbx-pen: #17657a;
  --bbx-edge: #9066a8;
  --bbx-underlay: #c1a4dd;
  --bbx-font: ui-rounded, "SF Pro Rounded", "Avenir Next", system-ui, sans-serif;
  --bbx-sheet-radius: 25px 25px 14px 25px;
  --bbx-sheet-shadow: inset 0 0 0 1px #a382bf, 3px 4px 0 #d899c2, 6px 8px 0 #8d77b5, 0 13px 23px #703d6133;
  --bbx-sheet-decoration:
    radial-gradient(ellipse 74px 22px at 96% 100%, #c9b8df 98%, transparent),
    radial-gradient(ellipse 43px 18px at 85% 100%, #e8d9f1 98%, transparent),
    radial-gradient(ellipse 46px 12px at 6% 100%, #ebd9ef 98%, transparent);
  --bbx-selection: #75346c;
  --bbx-selection-ink: #ffffff;
  --bbx-selection-code: #f7cce8;
  --bbx-selection-code-ink: #442743;
  --bbx-quote-paper: #f4eaf9;
  --bbx-quote-layer-paper: #f4eaf9;
  --bbx-quote-radius: 20px 20px 20px 7px;
  --bbx-quote-edge: 0px;
  --bbx-quote-shadow: 3px 3px 0 #d4c4e5;
  --bbx-quote-padding-left: 1rem;
  --bbx-blockquote-paper: #f4eaf9;
  --bbx-blockquote-padding: 0.75em 1em;
  --bbx-blockquote-shadow: 3px 3px 0 #d4c4e5;
  --bbx-blockquote-edge: 0px;
}

/* Small scallops at the sheet foot repeat the scene's cloud shapes without
   putting a picture under prose or changing the card's rectangular hit area. */
.bbx-card-surface[data-card-theme="daydream"] {
  padding-bottom: 18px;
}

.bbx-card-theme[data-card-theme="daydream"] .bbx-blockquote {
  border-radius: 21px 19px 19px 6px;
}

@media (max-width: 640px) {
  .bbx-box-presentation[data-chrome-theme="daydream"] {
    --bbx-scene:
      url("./art/daydream-sparks.svg") 20% top / 470px 353px repeat,
      url("./art/daydream-clouds.svg") 48% bottom / auto 100% no-repeat,
      radial-gradient(ellipse at 48% 68%, #ffe5ac 0, #f8add0 46%, #ed8fbd 100%);
    --bbx-toolbar-radius: 0 0 18px 9px;
    --bbx-composer-radius: 22px 22px 14px 22px;
  }

  .bbx-card-theme[data-card-theme="daydream"] {
    --bbx-sheet-radius: 18px 18px 10px 18px;
    --bbx-sheet-shadow: inset 0 0 0 1px #a382bf, 2px 3px 0 #d899c2, 3px 6px 0 #8d77b5;
  }
}

@media print {
  .bbx-card-theme[data-card-theme="daydream"] {
    --bbx-sheet-decoration: none;
    --bbx-sheet-shadow: none;
  }
}

/* ---- selvedge.css (beebox/src/frontend/src/themes/) ---- */
/* Uneven yarn panels and sewn labels: the reading cloth has a quieter weave. */
.bbx-box-presentation[data-chrome-theme="selvedge"],
.bbx-themed-menu[data-chrome-theme="selvedge"] {
  --bbx-cloth: url("./art/selvedge-linen.svg");
  --bbx-scene: url("./art/selvedge-yarn.svg") center / cover no-repeat, #773e50;
  --bbx-desk-background: transparent;
  --bbx-desk-pattern: none;
  --bbx-toolbar-background: var(--bbx-cloth), #65334c;
  --bbx-toolbar-ink: #fff0d1;
  --bbx-toolbar-edge: #d8b980;
  --bbx-toolbar-radius: 0 0 5px 9px;
  --bbx-toolbar-shadow: 0 4px 0 #292738, 0 7px 0 #d6a451;
  --bbx-composer-background: var(--bbx-cloth), #303b56;
  --bbx-composer-ink: #fff0d1;
  --bbx-composer-edge: #ddbe8d;
  --bbx-composer-radius: 10px 6px 14px 6px;
  --bbx-composer-shadow: 0 4px 0 #342438, 0 7px 12px #251d3555;
  --bbx-status-background: #ddc99f;
  --bbx-status-ink: #342438;
  --bbx-status-edge: #79634d;
  --bbx-control-background: var(--bbx-cloth), #ecdfbd;
  --bbx-control-ink: #342438;
  --bbx-control-radius: 5px 7px 4px 6px;
  --bbx-send-background: var(--bbx-cloth), #eed477;
  --bbx-send-ink: #342438;
  --bbx-input-paper: #f4ead3;
  --bbx-input-ink: #342438;
  --bbx-input-muted: #71575c;
  --bbx-chat-user-paper: #5b354b;
  --bbx-chat-user-ink: #fff2d8;
  --bbx-chat-user-radius: 8px 8px 2px 8px;
  --bbx-chat-reply-paper: #f4ead3;
  --bbx-chat-agent-paper: var(--bbx-cloth), #f4ead3;
  --bbx-chat-reply-ink: #342438;
  --bbx-menu-paper: #ecdfbd;
  --bbx-menu-ink: #342438;
  --bbx-menu-edge: #6e4357;
  --bbx-menu-radius: 5px 9px 6px 4px;
  --bbx-selection: #753a57;
  --bbx-selection-ink: #fff2d8;
  --bbx-selection-code: #e3c18b;
  --bbx-selection-code-ink: #342438;
}
.bbx-card-theme[data-card-theme="selvedge"] {
  --bbx-cloth: url("./art/selvedge-linen.svg");
  --bbx-paper: #f4ead3;
  --bbx-ink: #342438;
  --bbx-ink-soft: #71575c;
  --bbx-pen: #31584f;
  --bbx-edge: #6e4357;
  --bbx-underlay: #b57175;
  --bbx-font: "Avenir Next", ui-sans-serif, system-ui, sans-serif;
  --bbx-sheet-radius: 7px 11px 6px 9px;
  --bbx-sheet-shadow: 4px 5px 0 #69364d, 7px 8px 0 #d8be7d, 0 10px 20px #21152d44;
  --bbx-sheet-decoration: var(--bbx-cloth);
  --bbx-tab-radius: 6px 8px 0 0;
  --bbx-quote-paper: #e5d8b8;
  --bbx-quote-layer-paper: #e5d8b8;
  --bbx-quote-edge: 3px;
  --bbx-quote-radius: 3px;
  --bbx-quote-padding-left: 1rem;
  --bbx-blockquote-paper: #e5d8b8;
  --bbx-blockquote-edge: 3px;
  --bbx-blockquote-padding: .75em 1em;
  --bbx-selection: #753a57;
  --bbx-selection-ink: #fff2d8;
  --bbx-selection-code: #e3c18b;
  --bbx-selection-code-ink: #342438;
}
.bbx-card-surface[data-card-theme="selvedge"]::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed var(--bbx-edge);
  border-radius: inherit;
  pointer-events: none;
  opacity: .65;
}
.bbx-card-surface[data-card-theme="selvedge"] > .bbx-card-heading {
  padding-top: 1.75rem;
  padding-bottom: 1rem;
  margin-bottom: .4rem;
  border-bottom: 2px dashed var(--bbx-edge);
}
.bbx-box-presentation[data-chrome-theme="selvedge"] .bbx-app-nav {
  border-bottom-style: dashed;
  border-bottom-width: 2px;
}
.bbx-box-presentation[data-chrome-theme="selvedge"] :is(.bbx-chat-reply-material, .bbx-chat-user-paper) {
  outline: 1px dashed var(--bbx-menu-edge);
  outline-offset: -5px;
}
.bbx-box-presentation[data-chrome-theme="selvedge"] .bbx-composer-material {
  outline: 1px dashed var(--bbx-composer-edge);
  outline-offset: -4px;
}
@media (max-width: 640px) {
  .bbx-box-presentation[data-chrome-theme="selvedge"] { --bbx-scene: url("./art/selvedge-yarn.svg") 43% center / auto 100% no-repeat, #773e50; }
  .bbx-card-theme[data-card-theme="selvedge"] { --bbx-sheet-shadow: 2px 3px 0 #69364d, 4px 5px 0 #d8be7d; }
}

/* ---- footlights.css (beebox/src/frontend/src/themes/) ---- */
/* Original theatrical fans and stepped borders; the stage stays outside prose. */
.bbx-box-presentation[data-chrome-theme="footlights"],
.bbx-themed-menu[data-chrome-theme="footlights"] {
  --bbx-desk-background: transparent;
  --bbx-desk-pattern: none;
  --bbx-scene: url("./art/footlights-marquee.svg") center / cover no-repeat, #174f50;
  --bbx-toolbar-background: #122f32;
  --bbx-toolbar-ink: #f6ecd6;
  --bbx-toolbar-edge: #be9b59;
  --bbx-toolbar-radius: 0;
  --bbx-toolbar-shadow: 0 3px 0 #ba3e2d, 0 6px 0 #e8d9b6;
  --bbx-composer-background: #91b7ac;
  --bbx-composer-ink: #173e40;
  --bbx-composer-edge: #173e40;
  --bbx-composer-radius: 0;
  --bbx-composer-shadow: 4px 4px 0 #ba3e2d, 7px 7px 0 #122f32;
  --bbx-control-background: #e9ce75;
  --bbx-control-ink: #173e40;
  --bbx-control-radius: 3px;
  --bbx-control-shape-default: none;
  --bbx-control-shape-profile: none;
  --bbx-control-shape-send: none;
  --bbx-send-background: #a32f23;
  --bbx-send-ink: #fff6e4;
  --bbx-input-paper: #fff9ed;
  --bbx-input-ink: #173e40;
  --bbx-input-muted: #57625a;
  --bbx-status-background: #e5d6b4;
  --bbx-status-ink: #173e40;
  --bbx-status-edge: #936d39;
  --bbx-chat-user-paper: #174f50;
  --bbx-chat-user-ink: #fff6e4;
  --bbx-chat-user-radius: 0;
  --bbx-chat-reply-paper: #fff9ed;
  --bbx-chat-agent-paper: #fff9ed;
  --bbx-chat-reply-ink: #173e40;
  --bbx-menu-paper: #fff9ed;
  --bbx-menu-ink: #173e40;
  --bbx-menu-edge: #173e40;
  --bbx-menu-radius: 0;
  --bbx-selection: #a32f23;
  --bbx-selection-ink: #fff9ed;
  --bbx-selection-code: #e5d6b4;
  --bbx-selection-code-ink: #173e40;
  --bbx-focus-ring: #a32f23;
}
.bbx-card-theme[data-card-theme="footlights"] {
  --bbx-paper: #fff9ed;
  --bbx-ink: #173e40;
  --bbx-ink-soft: #57625a;
  --bbx-pen: #a32f23;
  --bbx-edge: #947945;
  --bbx-underlay: #ba3e2d;
  --bbx-font: "Avenir Next", Avenir, system-ui, sans-serif;
  --bbx-sheet-radius: 0;
  --bbx-sheet-shadow: 4px 4px 0 #174f50, 7px 7px 0 #ba3e2d;
  --bbx-sheet-decoration: linear-gradient(90deg, #174f50 0 42%, #ba3e2d 42% 58%, #174f50 58%) left bottom / 100% 5px no-repeat;
  --bbx-tab-radius: 0;
  --bbx-quote-paper: #eee3c9;
  --bbx-quote-layer-paper: #eee3c9;
  --bbx-quote-edge: 3px;
  --bbx-quote-radius: 0;
  --bbx-quote-padding-left: 1rem;
  --bbx-blockquote-paper: #eee3c9;
  --bbx-blockquote-edge: 3px;
  --bbx-blockquote-padding: 0.75em 1em;
  --bbx-slip-overhang: 0px;
  --bbx-selection: #a32f23;
  --bbx-selection-ink: #fff9ed;
  --bbx-selection-code: #e5d6b4;
  --bbx-selection-code-ink: #173e40;
  --bbx-link-decoration: underline;
}
.bbx-card-surface[data-card-theme="footlights"] > .bbx-card-heading {
  position: relative;
  border-bottom: 1px solid #947945;
  margin-top: 10px;
}
.bbx-card-surface[data-card-theme="footlights"] > .bbx-card-heading :is(h1, h2) {
  font-family: "Avenir Next Condensed", "Helvetica Neue", sans-serif;
  font-weight: 300;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.bbx-box-presentation[data-chrome-theme="footlights"] .bbx-chat-user-paper {
  border-left: 4px solid #ba3e2d;
  box-shadow: 3px 3px 0 #e5d6b4;
}
.bbx-interface-tab[data-card-theme="footlights"] { --bbx-tab-top-border: 3px; border-top-color: #ba3e2d; }
@media print {
  .bbx-card-theme[data-card-theme="footlights"] { --bbx-sheet-shadow: none; }
}

.bbx-card-surface[data-card-theme="footlights"] > .bbx-card-heading::before {
  content: "";
  position: absolute;
  inset: 0 52px auto 0;
  border-top: 7px double #174f50;
  pointer-events: none;
}
.bbx-box-presentation[data-chrome-theme="footlights"] .bbx-app-nav :is(#bbx-nav-session, #bbx-nav-voice) {
  --bbx-control-background: #a6c8ba;
}
.bbx-box-presentation[data-chrome-theme="footlights"] .bbx-app-nav :is(#bbx-nav-profile, #bbx-nav-questions) {
  --bbx-control-background: #efb39a;
}
.bbx-card-surface[data-card-theme="footlights"] > .bbx-card-properties {
  border-radius: 0;
}

.bbx-card-surface[data-card-theme="footlights"][data-card-side="front"] > .bbx-card-heading {
  padding-top: 1rem;
}

/* ---- overpass.css (beebox/src/frontend/src/themes/) ---- */
/* Orange pigment and distressed fine ink; no literal structures. */
.bbx-box-presentation[data-chrome-theme="overpass"],
.bbx-themed-menu[data-chrome-theme="overpass"] {
  --bbx-desk-background: transparent;
  --bbx-desk-pattern: none;
  --bbx-scene: url("./art/overpass-ink.webp") center / cover no-repeat, #e66b27;
  --bbx-toolbar-background: #242820;
  --bbx-toolbar-ink: #fff3c1;
  --bbx-toolbar-edge: #111710;
  --bbx-toolbar-radius: 0;
  --bbx-toolbar-shadow: 0 1px 0 #ffb142, 0 4px 0 #171b15;
  --bbx-composer-background: repeating-linear-gradient(115deg, #ffffff08 0 1px, transparent 1px 7px), #30382b;
  --bbx-composer-ink: #f9f4d8;
  --bbx-composer-edge: #a9ab77;
  --bbx-composer-radius: 0;
  --bbx-composer-shadow: 0 2px 0 #727b54, 0 5px 0 #171b15;
  --bbx-control-background: #ffdc57;
  --bbx-control-ink: #23271d;
  --bbx-control-radius: 0;
  --bbx-control-shape-default: polygon(0 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%);
  --bbx-control-shape-place: polygon(0 0, calc(100% - 8px) 0, 100% 100%, 0 100%);
  --bbx-control-shape-session: polygon(8px 0, 100% 0, 100% 100%, 0 100%);
  --bbx-control-shape-voice: polygon(0 0, 100% 0, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  --bbx-control-shape-profile: polygon(5px 0, 100% 0, 100% 100%, 0 100%, 0 5px);
  --bbx-control-shape-send: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%);
  --bbx-control-shape-add: polygon(0 0, 100% 0, 100% 100%, 7px 100%, 0 calc(100% - 7px));
  --bbx-control-shape-mic: polygon(7px 0, 100% 0, 100% 100%, 0 100%, 0 7px);
  --bbx-send-background: #f9a74c;
  --bbx-send-ink: #282a1e;
  --bbx-input-paper: #f5f0d6;
  --bbx-input-ink: #293022;
  --bbx-input-muted: #5d634c;
  --bbx-status-background: #d2d19d;
  --bbx-status-ink: #293022;
  --bbx-status-edge: #676d48;
  --bbx-chat-user-paper: #ffe19a;
  --bbx-chat-user-ink: #303321;
  --bbx-chat-user-radius: 0;
  --bbx-chat-reply-paper: #f5f0d6;
  --bbx-chat-agent-paper: #f5f0d6;
  --bbx-chat-reply-ink: #293022;
  --bbx-menu-paper: #e4e3b9;
  --bbx-menu-ink: #293022;
  --bbx-menu-edge: #343d29;
  --bbx-menu-radius: 0;
  --bbx-selection: #334329;
  --bbx-selection-ink: #fff4c9;
  --bbx-selection-code: #ffd35b;
  --bbx-selection-code-ink: #252d20;
}
.bbx-card-theme[data-card-theme="overpass"] {
  --bbx-paper: #f5f0d6;
  --bbx-ink: #293022;
  --bbx-ink-soft: #586049;
  --bbx-pen: #7b391d;
  --bbx-edge: #414a34;
  --bbx-underlay: #96996e;
  --bbx-font: "Avenir Next", Avenir, system-ui, sans-serif;
  --bbx-sheet-radius: 0;
  --bbx-tab-radius: 0;
  --bbx-sheet-shadow: 0 1px 0 #99996c, 0 4px 0 #252d20;
  --bbx-sheet-decoration: repeating-linear-gradient(176deg, transparent 0 4px, #343d2955 4px 5px, transparent 5px 9px) right bottom / 100% 12px no-repeat;
  --bbx-quote-paper: #dfe1b9;
  --bbx-quote-layer-paper: #dfe1b9;
  --bbx-quote-radius: 0;
  --bbx-quote-edge: 3px;
  --bbx-quote-shadow: 3px 3px 0 #777e53;
  --bbx-quote-padding-left: 1rem;
  --bbx-blockquote-paper: #dfe1b9;
  --bbx-blockquote-padding: .75em 1em;
  --bbx-blockquote-edge: 3px;
  --bbx-blockquote-shadow: 3px 3px 0 #777e53;
  --bbx-selection: #334329;
  --bbx-selection-ink: #fff4c9;
  --bbx-selection-code: #ffd35b;
  --bbx-selection-code-ink: #252d20;
}
.bbx-card-surface[data-card-theme="overpass"] .bbx-card-heading :is(h1, h2) {
  font-weight: 850;
  letter-spacing: -.025em;
}
@media (max-width: 639px) {
  .bbx-box-presentation[data-chrome-theme="overpass"] {
    --bbx-scene: url("./art/overpass-ink.webp") 68% center / auto 100% no-repeat, #e66b27;
    --bbx-control-shape-place: polygon(0 0, calc(100% - 3px) 0, 100% 100%, 0 100%);
    --bbx-control-shape-session: polygon(4px 0, 100% 0, 100% 100%, 0 100%);
  }
}

.bbx-box-presentation[data-chrome-theme="overpass"] .bbx-chat-pending-material button.bg-warm-200 {
  background: var(--bbx-control-background);
  color: var(--bbx-control-ink);
}
.bbx-box-presentation[data-chrome-theme="overpass"] .bbx-chat-pending-material button:is(.bg-warm-200, .bg-transparent):hover {
  background: var(--bbx-input-paper);
  color: var(--bbx-input-ink);
}
.bbx-box-presentation[data-chrome-theme="overpass"] .bbx-chat-reply-material :is(.bg-warm-50, .bg-warm-100) {
  background: var(--bbx-input-paper);
  color: var(--bbx-input-ink);
}

/* ---- golden-hour.css (beebox/src/frontend/src/themes/) ---- */
/* Granulated warm pigment and cool ink, without scenic motifs. */
.bbx-box-presentation[data-chrome-theme="golden-hour"],
.bbx-themed-menu[data-chrome-theme="golden-hour"] {
  --bbx-desk-background: transparent;
  --bbx-desk-pattern: none;
  --bbx-scene: url("./art/golden-hour-pigment.webp") center / cover no-repeat, #367d80;
  --bbx-toolbar-background: #d9983d;
  --bbx-toolbar-ink: #352c20;
  --bbx-toolbar-edge: #9a6539;
  --bbx-toolbar-radius: 0;
  --bbx-toolbar-shadow: 0 4px 0 #367d80;
  --bbx-composer-background: #e6b96d;
  --bbx-composer-ink: #293e37;
  --bbx-composer-edge: #9a6539;
  --bbx-composer-radius: 7px;
  --bbx-composer-shadow: 0 2px 0 #a85c35, 0 6px 18px #24595c40;
  --bbx-control-background: #24595c;
  --bbx-control-ink: #fff2d7;
  --bbx-control-radius: 6px;
  --bbx-control-shape-default: none;
  --bbx-control-shape-send: polygon(0 0, 80% 0, 100% 50%, 80% 100%, 0 100%);
  --bbx-control-shape-profile: ellipse(49% 48% at 50% 50%);
  --bbx-send-background: #256b70;
  --bbx-send-ink: #fff8e9;
  --bbx-status-background: #f1c678;
  --bbx-status-ink: #293e37;
  --bbx-status-edge: #9a6539;
  --bbx-input-paper: #fff2d7;
  --bbx-input-ink: #293e37;
  --bbx-input-muted: #53634e;
  --bbx-chat-user-paper: #24595c;
  --bbx-chat-user-ink: #fff2d7;
  --bbx-chat-user-radius: 7px;
  --bbx-chat-reply-paper: #fff2d7;
  --bbx-chat-reply-ink: #293e37;
  --bbx-menu-paper: #fff2d7;
  --bbx-menu-ink: #293e37;
  --bbx-menu-edge: #9a6539;
  --bbx-menu-radius: 7px;
  --bbx-selection: #256b70;
  --bbx-selection-ink: #fff8e9;
  --bbx-selection-code: #f1c678;
  --bbx-selection-code-ink: #293e37;
}
.bbx-card-theme[data-card-theme="golden-hour"] {
  --bbx-paper: #fff2d7;
  --bbx-ink: #293e37;
  --bbx-ink-soft: #53634e;
  --bbx-pen: #256b70;
  --bbx-edge: #9a6539;
  --bbx-underlay: #367d80;
  --bbx-font: "Avenir Next", Avenir, ui-sans-serif, system-ui, sans-serif;
  --bbx-tab-radius: 15px 4px 0 0;
  --bbx-sheet-radius: 7px;
  --bbx-sheet-shadow: 0 2px 0 #a85c35, 0 6px 18px #24595c40;
  --bbx-sheet-decoration: none;
  --bbx-selection: #256b70;
  --bbx-selection-ink: #fff8e9;
  --bbx-selection-code: #f1c678;
  --bbx-selection-code-ink: #293e37;
  --bbx-quote-paper: #f1dfb8;
  --bbx-quote-layer-paper: #f1dfb8;
  --bbx-quote-radius: 5px;
  --bbx-quote-edge: 0px;
  --bbx-quote-shadow: 0 3px 0 #9a6539;
  --bbx-quote-padding-left: 1rem;
  --bbx-blockquote-paper: #f1dfb8;
  --bbx-blockquote-padding: 0.75em 1em;
  --bbx-blockquote-shadow: 0 3px 0 #9a6539;
  --bbx-blockquote-edge: 0px;
}
.bbx-card-theme[data-card-theme="golden-hour"] .bbx-blockquote { border-radius: 5px; }
@media (max-width: 640px) {
  .bbx-box-presentation[data-chrome-theme="golden-hour"] { --bbx-composer-radius: 7px; }
  .bbx-card-theme[data-card-theme="golden-hour"] { --bbx-sheet-radius: 7px; }
}
@media print {
  .bbx-card-theme[data-card-theme="golden-hour"] { --bbx-sheet-shadow: none; }
}

/* ---- blacklight.css (beebox/src/frontend/src/themes/) ---- */
/* Flat fluorescent poster inks, rounded lobes, and heavy black contours. */
.bbx-box-presentation[data-chrome-theme="blacklight"],
.bbx-themed-menu[data-chrome-theme="blacklight"] {
  --bbx-desk-background: transparent;
  --bbx-desk-pattern: none;
  --bbx-scene: url("./art/blacklight-garden.svg") center / cover no-repeat, #273be6;
  --bbx-toolbar-background: #463078;
  --bbx-toolbar-ink: #fff0d8;
  --bbx-toolbar-edge: #17142d;
  --bbx-toolbar-radius: 0 0 32px 8px;
  --bbx-toolbar-shadow: 0 5px 0 #17142d, 0 10px 0 #ed53bc;
  --bbx-composer-background: #bb5aa1;
  --bbx-composer-ink: #100e20;
  --bbx-composer-edge: #17142d;
  --bbx-composer-radius: 35px 13px 35px 13px;
  --bbx-composer-shadow: inset 0 0 0 3px #17142d, 5px 5px 0 #17142d;
  --bbx-control-background: #f4a0eb;
  --bbx-control-ink: #17142d;
  --bbx-control-radius: 22px 9px 20px 8px;
  --bbx-control-shape-default: none;
  --bbx-control-shape-place: none;
  --bbx-control-shape-session: none;
  --bbx-control-shape-voice: none;
  --bbx-control-shape-profile: none;
  --bbx-control-shape-add: none;
  --bbx-control-shape-send: none;
  --bbx-control-shape-mic: none;
  --bbx-send-background: #2537b9;
  --bbx-send-ink: #ffffff;
  --bbx-input-paper: #fff0d8;
  --bbx-input-ink: #17142d;
  --bbx-input-muted: #535341;
  --bbx-status-background: #f6a8df;
  --bbx-status-ink: #17142d;
  --bbx-status-edge: #17142d;
  --bbx-chat-user-paper: #f6a8df;
  --bbx-chat-user-ink: #17142d;
  --bbx-chat-user-radius: 28px 13px 28px 6px;
  --bbx-chat-reply-paper: #fff0d8;
  --bbx-chat-agent-paper: #fff0d8;
  --bbx-chat-reply-ink: #17142d;
  --bbx-menu-paper: #fff0d8;
  --bbx-menu-ink: #17142d;
  --bbx-menu-edge: #17142d;
  --bbx-menu-radius: 26px 11px 26px 11px;
  --bbx-selection: #4130a0;
  --bbx-selection-ink: #ffffff;
  --bbx-selection-code: #d2ff39;
  --bbx-selection-code-ink: #17142d;
}
.bbx-box-presentation[data-chrome-theme="blacklight"] :is(.bbx-place-pill, #bbx-composer-add, #bbx-nav-profile) {
  --bbx-control-radius: 48% 24% 44% 21% / 34% 48% 27% 43%;
}
.bbx-box-presentation[data-chrome-theme="blacklight"] :is(#bbx-nav-session, #bbx-composer-mic) {
  --bbx-control-radius: 22% 48% 21% 44% / 43% 27% 48% 34%;
}
.bbx-box-presentation[data-chrome-theme="blacklight"] :is(#bbx-nav-voice, #bbx-composer-send) {
  --bbx-control-radius: 45% 45% 18% 45%;
}
.bbx-card-theme[data-card-theme="blacklight"] {
  --bbx-paper: #fff0d8;
  --bbx-ink: #17142d;
  --bbx-ink-soft: #535341;
  --bbx-pen: #4d2899;
  --bbx-edge: #17142d;
  --bbx-underlay: #eb76c5;
  --bbx-font: "Avenir Next", ui-rounded, system-ui, sans-serif;
  --bbx-sheet-radius: 33px 13px 33px 13px;
  --bbx-tab-radius: 22px 14px 0 0;
  --bbx-sheet-shadow: inset 0 0 0 2px #17142d, 5px 6px 0 #17142d, 9px 10px 0 #ed53bc;
  --bbx-sheet-decoration: radial-gradient(ellipse 35px 14px at 94% 100%, #d2ff39 95%, #17142d 96% 100%, transparent 101%), radial-gradient(ellipse 29px 12px at 8% 100%, #f4a0eb 95%, #17142d 96% 100%, transparent 101%);
  --bbx-quote-paper: #ead1f5;
  --bbx-quote-layer-paper: #ead1f5;
  --bbx-quote-radius: 20px 7px 20px 7px;
  --bbx-quote-edge: 2px;
  --bbx-quote-shadow: 3px 3px 0 #17142d;
  --bbx-quote-padding-left: 1rem;
  --bbx-blockquote-paper: #ead1f5;
  --bbx-blockquote-padding: .75em 1em;
  --bbx-blockquote-edge: 2px;
  --bbx-blockquote-shadow: 3px 3px 0 #17142d;
  --bbx-selection: #4130a0;
  --bbx-selection-ink: #ffffff;
  --bbx-selection-code: #d2ff39;
  --bbx-selection-code-ink: #17142d;
}
.bbx-card-surface[data-card-theme="blacklight"] .bbx-card-heading :is(h1, h2) {
  font-weight: 850;
  letter-spacing: -.04em;
}
@media (max-width: 639px) {
  .bbx-box-presentation[data-chrome-theme="blacklight"] {
    --bbx-scene: url("./art/blacklight-garden.svg") 67% center / auto 100% no-repeat, #273be6;
    --bbx-composer-radius: 24px 9px 24px 9px;
  }
  .bbx-card-theme[data-card-theme="blacklight"] {
    --bbx-sheet-radius: 23px 10px 23px 10px;
  }
}

.bbx-box-presentation[data-chrome-theme="blacklight"] .bbx-chat-pending-material button.bg-warm-200 {
  background: var(--bbx-control-background);
  color: var(--bbx-control-ink);
}
.bbx-box-presentation[data-chrome-theme="blacklight"] .bbx-chat-pending-material button:is(.bg-warm-200, .bg-transparent):hover {
  background: var(--bbx-input-paper);
  color: var(--bbx-input-ink);
}
.bbx-box-presentation[data-chrome-theme="blacklight"] .bbx-chat-reply-material :is(.bg-warm-50, .bg-warm-100) {
  background: var(--bbx-input-paper);
  color: var(--bbx-input-ink);
}

.bbx-box-presentation[data-chrome-theme="blacklight"] #bbx-composer-input { border-radius: 8px; }

/* ---- far-horizon.css (beebox/src/frontend/src/themes/) ---- */
/* Smooth layered gouache, with quiet cream reading fields. */
.bbx-box-presentation[data-chrome-theme="far-horizon"],
.bbx-themed-menu[data-chrome-theme="far-horizon"] {
  --bbx-desk-background: transparent;
  --bbx-desk-pattern: none;
  --bbx-scene: url("./art/far-horizon-satin.webp") center / cover no-repeat, #dba44d;
  --bbx-toolbar-background: #184a50;
  --bbx-toolbar-ink: #f6e6c8;
  --bbx-toolbar-edge: #a44b32;
  --bbx-toolbar-radius: 0;
  --bbx-toolbar-shadow: 0 2px 0 #c66b43;
  --bbx-composer-background: #24585c;
  --bbx-composer-ink: #f6e6c8;
  --bbx-composer-edge: #a44b32;
  --bbx-composer-radius: 5px;
  --bbx-composer-shadow: 0 2px 0 #a44b32, 0 8px 20px #102f3440;
  --bbx-control-background: #e6c597;
  --bbx-control-ink: #243f40;
  --bbx-control-radius: 6px;
  --bbx-control-shape-default: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  --bbx-control-shape-send: polygon(0 0, 80% 0, 100% 50%, 80% 100%, 0 100%);
  --bbx-control-shape-profile: ellipse(49% 48% at 50% 50%);
  --bbx-send-background: #98402c;
  --bbx-send-ink: #fff8e9;
  --bbx-status-background: #d3c6ad;
  --bbx-status-ink: #193e45;
  --bbx-status-edge: #a44b32;
  --bbx-input-paper: #f0e5cf;
  --bbx-input-ink: #193e45;
  --bbx-input-muted: #42646a;
  --bbx-chat-user-paper: #205760;
  --bbx-chat-user-ink: #f0f8e8;
  --bbx-chat-user-radius: 5px;
  --bbx-chat-reply-paper: #f0e5cf;
  --bbx-chat-reply-ink: #193e45;
  --bbx-menu-paper: #f0e5cf;
  --bbx-menu-ink: #193e45;
  --bbx-menu-edge: #a44b32;
  --bbx-menu-radius: 5px;
  --bbx-selection: #98402c;
  --bbx-selection-ink: #fff8e9;
  --bbx-selection-code: #d3c6ad;
  --bbx-selection-code-ink: #193e45;
}
.bbx-card-theme[data-card-theme="far-horizon"] {
  --bbx-paper: #f0e5cf;
  --bbx-ink: #193e45;
  --bbx-ink-soft: #42646a;
  --bbx-pen: #98402c;
  --bbx-edge: #a44b32;
  --bbx-underlay: #dba44d;
  --bbx-font: "Avenir Next", Avenir, ui-sans-serif, system-ui, sans-serif;
  --bbx-tab-radius: 15px 4px 0 0;
  --bbx-sheet-radius: 5px;
  --bbx-sheet-shadow: 0 2px 0 #a44b32, 0 8px 20px #102f3440;
  --bbx-sheet-decoration: none;
  --bbx-selection: #98402c;
  --bbx-selection-ink: #fff8e9;
  --bbx-selection-code: #d3c6ad;
  --bbx-selection-code-ink: #193e45;
  --bbx-quote-paper: #e1d3b9;
  --bbx-quote-layer-paper: #e1d3b9;
  --bbx-quote-radius: 4px;
  --bbx-quote-edge: 0px;
  --bbx-quote-shadow: 0 3px 0 #a44b32;
  --bbx-quote-padding-left: 1rem;
  --bbx-blockquote-paper: #e1d3b9;
  --bbx-blockquote-padding: 0.75em 1em;
  --bbx-blockquote-shadow: 0 3px 0 #a44b32;
  --bbx-blockquote-edge: 0px;
}
.bbx-card-theme[data-card-theme="far-horizon"] .bbx-blockquote { border-radius: 4px; }
@media (max-width: 640px) {
  .bbx-box-presentation[data-chrome-theme="far-horizon"] { --bbx-composer-radius: 5px; }
  .bbx-card-theme[data-card-theme="far-horizon"] { --bbx-sheet-radius: 5px; }
}
@media print {
  .bbx-card-theme[data-card-theme="far-horizon"] { --bbx-sheet-shadow: none; }
}
