/* ==========================================================================
   BACKSTAGE TP LIVE CLINICIAN & CHILD DEMO PORTAL (v10)
   Warm Editorial Stationery · Single-Screen 100dvh Mobile Child Stage
   Strict CSP Compliant · Standard sRGB/hex colors · 0 inline style/script
   ========================================================================== */

@property --fade-start {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

@property --fade-end {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

:root {
  --bd-bg: #efe7d7;
  --bd-panel: #f7f2e7;
  --bd-card: #fdfbf6;
  --bd-well: #ebe2cf;
  --bd-ink: #1e1915;
  --bd-ink-2: #4f463c;
  --bd-ink-3: #6e6357;
  --bd-line: rgb(42 32 20 / 0.14);
  --bd-line-strong: rgb(42 32 20 / 0.28);
  --bd-teal: #1e6e7a;
  --bd-teal-deep: #15525b;
  --bd-coral: #c4472f;
  --bd-amber: #9c6210;
  --bd-amber-bg: #faecd1;
  --bd-green: #1d6449;
  --bd-green-bg: #e2f2ea;
  --bd-focus: #284674;
  --bd-spring: linear(0, 0.38 14%, 0.94 34%, 1.12 50%, 1.02 68%, 0.99 84%, 1);
  --bd-bounce: linear(0, 0.214 14.7%, 0.386 23.7%, 0.598 31.9%, 0.999 44.7%, 0.807 52.6%, 0.762 56%, 0.747 59.4%, 0.758 62.4%, 0.793 65.6%, 0.999 77.4%, 0.961 81.2%, 0.949 84.8%, 0.956 88%, 0.993 95.5%, 1);
  --bd-sans: "Archivo Variable", "IBM Plex Sans JP", system-ui, -apple-system, sans-serif;
  --bd-display: "League Gothic Variable", "Archivo Variable", sans-serif;
  --bd-game-font: "Fredoka Variable", "Archivo Variable", ui-rounded, system-ui, sans-serif;
}

@supports not (animation-timing-function: linear(0, 1)) {
  :root {
    --bd-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --bd-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html.bd-html,
body.bd-body {
  margin: 0;
  padding: 0;
  min-block-size: 100svh;
  min-block-size: 100dvh;
  background: var(--bd-bg);
  color: var(--bd-ink);
  font-family: var(--bd-sans);
  line-height: 1.5;
  overflow-x: clip;
  color-scheme: light;
}

.bd-app {
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  min-block-size: 100svh;
  min-block-size: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
}

.bd-app > main,
.bd-studio,
.bd-topbar,
.bd-top-left,
.bd-top-right,
.bd-game-switcher-bar,
.bd-workspace-grid,
.bd-clinician-deck,
.bd-stage-host,
.bd-stage-panel,
.bd-stage-host .bs-game-shell,
.bd-stage-host .tr-stage-pane,
.bd-stage-host .tr-stage-bar {
  min-inline-size: 0;
  max-inline-size: 100%;
}

[hidden] {
  display: none !important;
}

.bd-app :where(button, a, input, select, textarea):focus-visible,
dialog.bd-dialog :where(button, a, input, textarea):focus-visible {
  outline: 2px solid var(--bd-focus);
  outline-offset: 2px;
}

/* ==========================================================================
   TOP BAR (ADAPTS BETWEEN LOBBY, CLINICIAN, AND CHILD VIEWS)
   ========================================================================== */
.bd-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.65rem 1.15rem;
  border-bottom: 1px solid var(--bd-line-strong);
  background: var(--bd-card);
  z-index: 25;
}

.bd-top-left,
.bd-top-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  min-inline-size: 0;
}

.bd-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--bd-ink);
  font-weight: 760;
  font-size: 0.92rem;
  letter-spacing: -0.015em;
  flex: none;
}

.bd-brand-emblem {
  display: block;
  inline-size: 1.9rem;
  block-size: 1.9rem;
  object-fit: contain;
  flex: none;
}

.bd-brand-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.54rem;
  border-radius: 999px;
  border: 1px solid var(--bd-line-strong);
  background: var(--bd-well);
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bd-ink-2);
}

.bd-room-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.24rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgb(30 110 122 / 0.34);
  background: #e6f2f4;
  color: var(--bd-teal-deep);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.bd-conn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.24rem 0.74rem;
  border-radius: 999px;
  border: 1px solid var(--bd-line-strong);
  background: var(--bd-panel);
  color: var(--bd-ink-2);
  font-size: 0.74rem;
  font-weight: 660;
}

.bd-conn-dot {
  inline-size: 0.5rem;
  block-size: 0.5rem;
  border-radius: 50%;
  background: #b08826;
}

.bd-conn-pill[data-connected="true"] {
  border-color: rgb(29 100 73 / 0.34);
  background: var(--bd-green-bg);
  color: var(--bd-green);
}

.bd-conn-pill[data-connected="true"] .bd-conn-dot {
  background: var(--bd-green);
}

.bd-mood-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.24rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--bd-line-strong);
  background: var(--bd-amber-bg);
  color: var(--bd-amber);
  font-size: 0.72rem;
  font-weight: 740;
}

.bd-mood-pill[data-mood="break"] {
  border-color: rgb(196 71 47 / 0.45);
  background: #fce4df;
  color: var(--bd-coral);
}

.bd-mood-pill[data-mood="yay"] {
  border-color: rgb(29 100 73 / 0.36);
  background: var(--bd-green-bg);
  color: var(--bd-green);
}

.bd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-inline-size: 2.4rem;
  min-block-size: 2.38rem;
  padding: 0.36rem 0.94rem;
  border-radius: 12px;
  border: 2px solid #4a3a2c;
  background: #fdfbf6;
  color: var(--bd-ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 740;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
}

.bd-btn.is-primary {
  border-color: #0e3d44;
  background: #1c6b77;
  color: #ffffff;
  box-shadow: none;
}

.bd-btn.is-amber {
  border-color: #704305;
  background: #ffcf4d;
  color: #3f2200;
  box-shadow: none;
}

.bd-btn.is-coral {
  border-color: #6b1d0a;
  background: #ce4d32;
  color: #ffffff;
  box-shadow: none;
}

.bd-btn[aria-pressed="true"] {
  border-color: #0e191b;
  background: #1d2d30;
  color: #ffffff;
  box-shadow: none;
}

@media (prefers-reduced-motion: no-preference) {
  .bd-btn,
  .bd-avatar-btn,
  .bd-preset-btn,
  .bd-sticker-btn,
  .bd-kid-mood-btn,
  .bd-tb-btn {
    transition-property: background-color, border-color, color, transform, scale;
    transition-duration: 160ms;
    transition-timing-function: var(--bd-spring);
  }
}

@media (hover: hover) {
  .bd-btn:not(.is-primary):not(.is-amber):not(.is-coral):not([aria-pressed="true"]):hover {
    border-color: #2b1a10;
    background: #f5ebd9;
  }
  .bd-btn[aria-pressed="true"]:hover {
    background: #132023;
  }
  .bd-btn.is-primary:hover {
    background: #175d68;
  }
  .bd-btn.is-amber:hover {
    background: #ffda6e;
  }
  .bd-btn.is-coral:hover {
    background: #b84229;
  }
}

.bd-btn:active,
.bd-avatar-btn:active,
.bd-sticker-btn:active,
.bd-kid-mood-btn:active,
.bd-tb-btn:active {
  transform: scale(0.97);
}

@media (pointer: coarse) {
  .bd-btn,
  .bd-tb-btn,
  .bd-copy-btn {
    min-inline-size: 3rem;
    min-block-size: 3rem;
  }
}

/* ==========================================================================
   LOBBY VIEW (CLINICIAN LOGIN CARD + CHILD JOIN CARD)
   ========================================================================== */
.bd-lobby {
  max-inline-size: 74rem;
  inline-size: 100%;
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
  display: grid;
  gap: 1.5rem;
  align-content: start;
}

.bd-lobby-hero {
  display: grid;
  gap: 0.55rem;
}

.bd-lobby-logo-wrap {
  display: grid;
  place-items: center;
  margin-bottom: 0.25rem;
}

.bd-lobby-logo {
  display: block;
  inline-size: auto;
  block-size: clamp(2.6rem, 4.8vw, 3.8rem);
  max-inline-size: min(92vw, 22rem);
  object-fit: contain;
}

html[data-theme="light"] .is-logo-dark {
  display: none !important;
}

html:not([data-theme="light"]) .is-logo-light {
  display: none !important;
}

.bd-kicker {
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bd-coral);
}

.bd-h1 {
  margin: 0;
  font-family: var(--bd-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 0.96;
  letter-spacing: 0.01em;
  color: var(--bd-ink);
  text-transform: uppercase;
}

.bd-lead {
  margin: 0;
  max-inline-size: 48rem;
  font-size: 0.98rem;
  color: var(--bd-ink-2);
}

.bd-lobby-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 54rem) {
  .bd-lobby-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.bd-role-card {
  display: grid;
  gap: 1rem;
  padding: 1.45rem;
  border-radius: 14px;
  border: 1px solid var(--bd-line-strong);
  background: var(--bd-card);
}

.bd-role-card.is-invited {
  border: 2px solid var(--bd-teal-deep);
  box-shadow: none;
}

@media (max-height: 700px) {
  .bd-lobby {
    padding: 0.95rem 1.15rem 1.85rem;
    gap: 0.85rem;
  }
  .bd-lobby-logo {
    block-size: clamp(3.3rem, 6.2vw, 4.5rem);
  }
  .bd-h1 {
    font-size: clamp(1.9rem, 4vw, 2.85rem);
  }
  .bd-role-card {
    padding: 1.05rem;
    gap: 0.72rem;
  }
}

.bd-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.bd-card-head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 760;
  color: var(--bd-ink);
}

.bd-role-tag {
  padding: 0.2rem 0.62rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--bd-well);
  color: var(--bd-ink-2);
}

.bd-role-tag.is-child {
  background: #e2f2ee;
  color: var(--bd-teal-deep);
}

.bd-role-tag.is-clinician {
  background: #fbe6e0;
  color: #a63420;
}

.bd-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.bd-preset-btn {
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--bd-line-strong);
  background: var(--bd-panel);
  color: var(--bd-ink-2);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 660;
  cursor: pointer;
}

.bd-preset-btn[aria-pressed="true"] {
  border-color: var(--bd-coral);
  background: #fbe6e0;
  color: #8f2d1b;
}

.bd-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.78rem;
}

@media (max-width: 34rem) {
  .bd-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.bd-field {
  display: grid;
  gap: 0.3rem;
}

.bd-field.is-full {
  grid-column: 1 / -1;
}

.bd-field label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--bd-ink-2);
}

.bd-input,
.bd-select,
.bd-textarea {
  inline-size: 100%;
  min-block-size: 2.55rem;
  padding: 0.5rem 0.78rem;
  border-radius: 10px;
  border: 1px solid var(--bd-line-strong);
  background: #ffffff;
  color: var(--bd-ink);
  font: inherit;
  font-size: 0.88rem;
}

.bd-input-code {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
}

.bd-avatars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.bd-avatar-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  min-block-size: 3.1rem;
  padding: 0.35rem 0.65rem;
  border-radius: 12px;
  border: 2px solid var(--bd-line-strong);
  background: var(--bd-panel);
  color: var(--bd-ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 720;
  cursor: pointer;
}

.bd-avatar-thumb {
  flex: none;
  inline-size: 38px;
  block-size: 38px;
  border-radius: 8px;
  border: 1.5px solid #3c2618;
  background: #f8ecd6;
  object-fit: contain;
  object-position: center bottom;
}

.bd-avatar-btn[aria-pressed="true"] {
  border-color: var(--bd-teal);
  border-width: 2px;
  background: #e1f1f3;
  color: var(--bd-teal-deep);
}

.bd-form-error {
  margin: 0;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  background: #fbe6e0;
  border: 1px solid rgb(196 71 47 / 0.38);
  color: #962c18;
  font-size: 0.78rem;
  font-weight: 660;
}

.bd-rejoin-details {
  border-top: 1px solid var(--bd-line);
  padding-top: 0.85rem;
  font-size: 0.82rem;
}

.bd-rejoin-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--bd-ink-2);
}

.bd-rejoin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.bd-rejoin-row .bd-input {
  flex: 1 1 8rem;
}

.bd-privacy-strip {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--bd-line);
  background: var(--bd-panel);
  font-size: 0.8rem;
  color: var(--bd-ink-2);
}

/* ==========================================================================
   LIVE STUDIO SHELL (CLINICIAN SPLIT + CHILD FULL-STAGE MODES)
   ========================================================================== */
.bd-studio {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-block-size: calc(100dvh - 3.65rem);
}

.bd-game-switcher-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.9rem;
  padding: 0.5rem 1.15rem;
  border-bottom: 1px solid var(--bd-line);
  background: var(--bd-panel);
}

.bd-game-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.bd-game-pill {
  min-block-size: 2.2rem;
  padding: 0.28rem 0.82rem;
  border-radius: 999px;
  border: 1px solid var(--bd-line-strong);
  background: var(--bd-card);
  color: var(--bd-ink-2);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.bd-game-pill[aria-selected="true"] {
  border-color: var(--bd-ink);
  background: var(--bd-ink);
  color: #fdfbf6;
}

@media (max-width: 56rem) {
  .bd-game-switcher-bar {
    padding: 0.36rem 0.75rem;
    gap: 0.38rem;
    flex-wrap: wrap;
    overflow-x: visible;
  }
  .bd-game-pills {
    flex-wrap: wrap;
    flex: 1 1 auto;
  }
  .bd-game-pill {
    white-space: nowrap;
    flex: none;
    min-block-size: 1.95rem;
    padding: 0.22rem 0.68rem;
    font-size: 0.72rem;
  }
}

.bd-child-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.8rem;
  padding: 0.55rem 1.15rem;
  border-bottom: 1px solid var(--bd-line);
  background: #f5efe2;
}

.bd-child-ident {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  font-weight: 720;
}

.bd-child-chef-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-block-size: 1.95rem;
  padding: 0.16rem 0.58rem;
  border-radius: 999px;
  border: 2px solid #704305;
  background: #ffdf73;
  color: #3f2200;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 780;
  cursor: pointer;
}

.bd-child-chef-btn[hidden] {
  display: none;
}

.bd-child-mood-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.bd-kid-mood-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-block-size: 2.2rem;
  padding: 0.26rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--bd-line-strong);
  background: #ffffff;
  color: var(--bd-ink);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 680;
  cursor: pointer;
}

.bd-kid-mood-btn[aria-pressed="true"] {
  border-color: var(--bd-teal);
  background: #e1f1f3;
  color: var(--bd-teal-deep);
}

.bd-workspace-grid {
  display: grid;
  grid-template-columns: minmax(24.5rem, 26.5rem) minmax(0, 1fr);
  min-block-size: 0;
  align-items: stretch;
}

.bd-app[data-demo-role="child"] .bd-workspace-grid,
.bd-app[data-preview-child="true"] .bd-workspace-grid {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 62.01rem) and (min-height: 700px) {
  .bd-app:not([data-demo-role="lobby"]) {
    block-size: 100dvh;
    max-block-size: 100dvh;
    overflow: hidden;
  }
  .bd-app:not([data-demo-role="lobby"]) > main {
    block-size: 100%;
    min-block-size: 0;
    overflow: hidden;
  }
  .bd-studio {
    block-size: 100%;
    min-block-size: 0;
    overflow: hidden;
  }
  .bd-workspace-grid {
    block-size: 100%;
    min-block-size: 0;
    overflow: hidden;
  }
  .bd-clinician-deck {
    block-size: 100%;
    max-block-size: 100%;
    min-block-size: 0;
    overflow-y: auto;
  }
  .bd-stage-host,
  .bd-stage-host .bs-game-shell,
  .bd-stage-host .tr-stage-pane {
    block-size: 100%;
    min-block-size: 0;
    overflow: hidden;
  }
  .bd-stage-panel {
    flex: 1 1 0;
    block-size: auto;
    min-block-size: 0;
    overflow: hidden;
  }
  .bd-stage-host .tr-stage-pane {
    display: flex;
    flex-direction: column;
  }
}

@media (min-width: 62.01rem) and (max-height: 699px) {
  .bd-app:not([data-demo-role="lobby"]):not([data-demo-role="child"]):not([data-preview-child="true"]) .bd-stage-host {
    min-block-size: 27rem;
  }
  .bd-app:not([data-demo-role="lobby"]):not([data-demo-role="child"]):not([data-preview-child="true"]) .bd-stage-host .tr-stage-wrap {
    min-block-size: clamp(23rem, 64dvh, 36rem);
  }
}

@media (min-width: 62.01rem) and (max-width: 74rem) {
  .bd-workspace-grid {
    grid-template-columns: minmax(18.5rem, 20.5rem) minmax(0, 1fr);
  }
}

@media (max-width: 74rem) {
  .bd-app:not([data-demo-role="lobby"]) .bd-topbar {
    padding: 0.44rem 0.78rem;
    gap: 0.38rem 0.55rem;
  }
  .bd-app:not([data-demo-role="child"]):not([data-preview-child="true"]) .bd-top-right {
    inline-size: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    overflow-x: visible;
    gap: 0.36rem;
    max-inline-size: 100%;
  }
  .bd-app:not([data-demo-role="child"]):not([data-preview-child="true"]) .bd-top-right .bd-btn,
  .bd-app:not([data-demo-role="child"]):not([data-preview-child="true"]) .bd-top-right .bd-tb-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    min-inline-size: max-content;
    min-block-size: 2.05rem;
    padding: 0.24rem 0.62rem;
    font-size: 0.72rem;
  }
}

@media (max-width: 62rem) {
  .bd-app,
  .bd-app > main,
  .bd-studio,
  .bd-topbar,
  .bd-top-left,
  .bd-top-right,
  .bd-game-switcher-bar,
  .bd-workspace-grid,
  .bd-clinician-deck,
  .bd-stage-host,
  .bd-stage-panel,
  .bd-stage-host .bs-game-shell,
  .bd-stage-host .tr-stage-pane,
  .bd-stage-host .tr-stage-bar {
    min-inline-size: 0;
    max-inline-size: 100%;
  }
  .bd-app:not([data-demo-role="child"]):not([data-preview-child="true"]) .bd-top-right {
    inline-size: 100%;
    flex-wrap: wrap;
  }
  .bd-stage-host .tr-hud-tools {
    flex-wrap: wrap;
    overflow-x: visible;
    max-inline-size: 100%;
  }
  .bd-workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .bd-stage-host {
    order: -1;
    min-block-size: 26rem;
  }
}

/* CLINICIAN CO-TOOL DECK */
.bd-clinician-deck {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--bd-line-strong);
  background: var(--bd-panel);
  padding: 0.9rem;
  gap: 0.85rem;
  overflow-y: auto;
  max-block-size: calc(100dvh - 6.8rem);
}

.bd-deck-stack {
  display: grid;
  gap: 0.72rem;
  align-content: start;
  min-inline-size: 0;
}

.bd-clinician-deck.is-compact {
  padding: 0.62rem;
  gap: 0.55rem;
}

.bd-clinician-deck.is-compact .bd-deck-stack {
  gap: 0.48rem;
}

.bd-clinician-deck.is-compact .bd-toolbar {
  padding: 0.3rem;
  gap: 0.22rem;
}

.bd-clinician-deck.is-compact .bd-tb-btn {
  min-block-size: 2.05rem;
  padding: 0.2rem 0.44rem;
  font-size: 0.68rem;
}

.bd-clinician-deck.is-compact .bd-deck-tab {
  min-block-size: 2.05rem;
  padding: 0.26rem 0.58rem;
}

.bd-clinician-deck.is-compact .bd-deck-panel {
  gap: 0.5rem;
}

.bd-clinician-deck.is-compact .tr-cue-row {
  min-block-size: 2.75rem;
  padding: 0.42rem 0.64rem;
}

.bd-clinician-deck.is-compact .bd-sticker-btn {
  min-block-size: 2.2rem;
  padding: 0.26rem 0.5rem;
  font-size: 0.72rem;
}

.bd-clinician-deck.is-compact .tr-ctrl-btn {
  min-block-size: 2.35rem;
  padding: 0.34rem 0.7rem;
}

@media (max-width: 62rem) {
  .bd-clinician-deck {
    border-right: 0;
    border-top: 1px solid var(--bd-line-strong);
    max-block-size: none;
  }
}

/* Hero Role=Toolbar (Modern Web Guidance `toolbar`) */
.bd-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  padding: 0.42rem;
  border-radius: 12px;
  border: 1px solid var(--bd-line-strong);
  background: var(--bd-card);
}

.bd-tb-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.24rem;
}

.bd-tb-sep {
  inline-size: 1px;
  block-size: 1.55rem;
  margin-inline: 0.08rem;
  border-left: 1px solid var(--bd-line-strong);
}

.bd-tb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.24rem;
  min-inline-size: 2.2rem;
  min-block-size: 2.35rem;
  padding: 0.28rem 0.54rem;
  border-radius: 8px;
  border: 1px solid var(--bd-line);
  background: var(--bd-panel);
  color: var(--bd-ink);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 720;
  white-space: nowrap;
  cursor: pointer;
}

.bd-tb-btn[aria-pressed="true"] {
  border-color: var(--bd-teal-deep);
  background: var(--bd-teal);
  color: #ffffff;
}

.bd-tb-btn.is-laser[aria-pressed="true"] {
  border-color: #a63420;
  background: var(--bd-coral);
  color: #ffffff;
}

.bd-tb-btn.is-star {
  border-color: rgb(156 98 16 / 0.36);
  background: var(--bd-amber-bg);
  color: #7c4c08;
}

.bd-tb-btn.is-gate {
  border-color: rgb(30 110 122 / 0.46);
  background: #e2f1f4;
  color: #124b54;
}

@media (hover: hover) {
  .bd-tb-btn:hover:not([aria-pressed="true"]):not(.is-gate) {
    border-color: var(--bd-ink-2);
    background: #eae1cf;
  }
  .bd-tb-btn.is-gate:hover {
    border-color: var(--bd-teal-deep);
    background: #cfe8ed;
  }
}

/* Single-Row Scrollable Tablist + Scroll-Driven Edge Mask Fades */
.bd-deck-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.2rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: inline proximity;
  scroll-padding-inline: 2.25rem;
  scrollbar-width: none;
  padding: 0.28rem 0.34rem;
  border-radius: 10px;
  border: 1px solid var(--bd-line);
  background: var(--bd-well);
  --fade-size: 2.25rem;
  --fade-dir: right;
  --fade-start-pos: 0;
  --fade-end-pos: 100%;
  mask:
    linear-gradient(black, black) no-clip subtract,
    linear-gradient(to var(--fade-dir), black, transparent) var(--fade-start-pos) 0 / var(--fade-start) 100% no-repeat no-clip,
    linear-gradient(to var(--fade-dir), transparent, black) var(--fade-end-pos) 0 / var(--fade-end) 100% no-repeat no-clip;
  animation: bd-reveal-fade-start linear both, bd-hide-fade-end linear both;
  animation-timeline: scroll(self inline);
  animation-range: 0 var(--fade-size), calc(100% - var(--fade-size)) 100%;
}

.bd-deck-tabs:dir(rtl) {
  --fade-dir: left;
  --fade-start-pos: 100%;
  --fade-end-pos: 0;
}

.bd-deck-tabs::-webkit-scrollbar {
  display: none;
}

@keyframes bd-reveal-fade-start {
  to {
    --fade-start: var(--fade-size);
  }
}

@keyframes bd-hide-fade-end {
  from {
    --fade-end: var(--fade-size);
  }
}

@supports not (animation-timeline: scroll()) {
  .bd-deck-tabs {
    animation: none;
    transition: --fade-start 0.2s, --fade-end 0.2s;
  }
  .bd-deck-tabs.more-start {
    --fade-start: var(--fade-size);
  }
  .bd-deck-tabs.more-end {
    --fade-end: var(--fade-size);
  }
}

.bd-deck-tab {
  position: relative;
  flex: none;
  scroll-snap-align: start;
  min-block-size: 2.3rem;
  padding: 0.3rem 0.56rem;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--bd-ink-2);
  font: inherit;
  font-size: 0.71rem;
  font-weight: 720;
  cursor: pointer;
  white-space: nowrap;
}

@media (hover: hover) {
  .bd-deck-tab:hover:not([aria-selected="true"]) {
    color: var(--bd-ink);
    background: rgb(253 251 246 / 0.55);
  }
}

.bd-deck-tab[aria-selected="true"] {
  border-color: var(--bd-line-strong);
  background: var(--bd-card);
  color: var(--bd-ink);
}

.bd-deck-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 0.45rem 0;
  border-block-end: 3px solid var(--bd-teal);
  border-radius: 999px;
}

.bd-deck-panel {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

/* Custom Prompt Composer Save-to-Panel & Profession Cue Tones */
.bd-clinician-deck .tr-custom-prompt {
  flex-wrap: wrap;
  align-items: center;
}

.bd-clinician-deck .tr-custom-input {
  flex: 1 1 9.5rem;
}

.bd-clinician-deck [data-cd-save-custom] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.26rem;
  min-block-size: 2.45rem;
  padding: 0.35rem 0.72rem;
  border-radius: var(--r-control, 10px);
  border: 1px solid var(--bd-line-strong);
  background: var(--bd-panel);
  color: var(--bd-ink);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

@media (hover: hover) {
  .bd-clinician-deck [data-cd-save-custom]:hover {
    border-color: var(--bd-teal-deep);
    background: #e6f2f4;
    color: var(--bd-teal-deep);
  }
}

.bd-clinician-deck [data-cd-save-custom]:active {
  transform: scale(0.98);
}

.bd-custom-save-status {
  display: block;
  margin-top: 0.22rem;
  font-size: 0.72rem;
  font-weight: 680;
  color: var(--bd-green);
}

.bd-custom-save-status.is-error {
  color: var(--bd-coral);
}

.bd-clinician-deck .tr-cue-row.is-psych .tr-cue-badge {
  border-color: rgb(92 71 168 / 0.36);
  background: #ede9fc;
  color: #4b369c;
}

.bd-clinician-deck .tr-cue-row.is-physio .tr-cue-badge {
  border-color: rgb(29 100 73 / 0.36);
  background: #e3f4ec;
  color: #175c41;
}

.bd-clinician-deck .tr-cue-row.is-custom .tr-cue-badge {
  border-color: rgb(156 98 16 / 0.36);
  background: var(--bd-amber-bg);
  color: #7c4c08;
}

.bd-clinician-deck .tr-score-btn.is-wide {
  grid-column: 1 / -1;
}

.bd-clinician-deck .tr-ctrl-btn.is-gate {
  border-color: rgb(30 110 122 / 0.42);
  background: #e3f2f4;
  color: #124b54;
}

@media (hover: hover) {
  .bd-clinician-deck .tr-ctrl-btn.is-gate:hover:not(:disabled) {
    border-color: var(--bd-teal-deep);
    background: #cfe8ed;
    color: #0e3d44;
  }
}

.bd-clinician-deck [data-cd-board-shuffle] {
  border-color: rgb(30 110 122 / 0.36);
  background: #edf6f7;
  color: #144d56;
  font-weight: 700;
}

@media (hover: hover) {
  .bd-clinician-deck [data-cd-board-shuffle]:hover:not(:disabled) {
    border-color: var(--bd-teal-deep);
    background: #dbeff2;
    color: #0e3d44;
  }
}

.bd-sec-title {
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bd-ink-3);
}

.bd-sticker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

.bd-sticker-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-block-size: 2.55rem;
  padding: 0.35rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--bd-line-strong);
  background: var(--bd-card);
  color: var(--bd-ink);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

@media (hover: hover) {
  .bd-sticker-btn:hover {
    border-color: var(--bd-amber);
    background: var(--bd-amber-bg);
  }
}

.bd-log-list {
  display: grid;
  gap: 0.4rem;
  max-block-size: 13rem;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.bd-log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.62rem;
  border-radius: 8px;
  border: 1px solid var(--bd-line);
  background: var(--bd-card);
  font-size: 0.74rem;
}

.bd-log-outcome {
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 740;
  background: var(--bd-green-bg);
  color: var(--bd-green);
}

.bd-deck-progress-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.72rem 0.8rem;
  border-radius: 12px;
  border: 2px solid rgb(30 110 122 / 0.24);
  background: linear-gradient(180deg, #fffdf9 0%, #eef6f7 100%);
}

.bd-deck-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.bd-rep-mini-badge {
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  background: #e1f3ea;
  border: 1px solid rgb(29 100 73 / 0.28);
  color: var(--bd-green);
  font-size: 0.66rem;
  font-weight: 760;
  white-space: nowrap;
}

.bd-deck-progress-sub {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--bd-ink-2);
}

/* SHARED GAME STAGE HOST */
.bd-stage-host {
  position: relative;
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
  min-block-size: 0;
  background: #e9ddc7;
}

.bd-stage-panel {
  flex: 1 1 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-inline-size: 0;
  min-block-size: 0;
}

.bd-stage-panel[hidden] {
  display: none;
}

.bd-stage-host .bs-game-shell,
.bd-stage-host .tr-stage-pane {
  border: 0;
  border-radius: 0;
  min-block-size: 0;
  block-size: 100%;
}

@media (min-width: 62.01rem) {
  .bd-stage-host .tr-stage-wrap {
    flex: 1 1 0;
    min-block-size: 0;
    content-visibility: visible;
  }
}

@media (max-width: 62rem) {
  .bd-stage-host {
    block-size: auto;
    min-block-size: 0;
    overflow: visible;
  }
  .bd-stage-panel {
    flex: 1 0 auto;
    grid-template-rows: auto;
  }
  .bd-stage-host .bs-game-shell,
  .bd-stage-host .tr-stage-pane {
    block-size: auto;
  }
  .bd-stage-host .tr-stage-wrap {
    min-block-size: clamp(22rem, 62dvh, 36rem);
    content-visibility: visible;
  }
}

/* ==========================================================================
   NATIVE <dialog> MODALS + COPY BUTTON STATUS BUBBLE (MODERN WEB GUIDANCE)
   ========================================================================== */
dialog.bd-dialog {
  max-inline-size: min(34rem, calc(100vw - 2rem));
  inline-size: 100%;
  margin: auto;
  padding: 0;
  border: 2.5px solid #2b1a10;
  border-radius: 18px;
  background: var(--bd-card);
  color: var(--bd-ink);
  box-shadow: none;
}

dialog.bd-dialog[open] {
  display: grid;
}

dialog.bd-dialog:modal {
  overscroll-behavior: contain;
}

dialog.bd-dialog::backdrop {
  background: rgb(20 21 23 / 0.56);
  overflow: hidden;
  overscroll-behavior: contain;
}

.bd-dlg-inner {
  display: grid;
  gap: 1rem;
  padding: 1.35rem 1.4rem;
}

.bd-dlg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.bd-dlg-head h2 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 760;
}

.bd-share-split {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

@media (max-width: 34rem) {
  .bd-share-split {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }
}

.bd-qr-frame {
  padding: 0.55rem;
  border-radius: 12px;
  border: 1px solid var(--bd-line-strong);
  background: #ffffff;
  display: grid;
  place-items: center;
}

.bd-qr-canvas {
  display: block;
  inline-size: 156px;
  block-size: 156px;
  image-rendering: pixelated;
}

.bd-code-box {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--bd-line-strong);
  background: var(--bd-panel);
  font-size: 1.3rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  color: var(--bd-teal-deep);
}

.bd-copy-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.bd-copy-row .bd-input,
.bd-copy-row .bd-textarea {
  flex: 1 1 auto;
  min-inline-size: 0;
}

.bd-copy-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: none;
}

.bd-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-inline-size: 2.5rem;
  min-block-size: 2.5rem;
  padding: 0.34rem 0.78rem;
  border-radius: 8px;
  border: 1px solid var(--bd-line-strong);
  background: var(--bd-panel);
  color: var(--bd-ink);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 720;
  cursor: pointer;
}

.bd-copy-btn[data-copied] {
  border-color: var(--bd-green);
  background: var(--bd-green-bg);
  color: var(--bd-green);
}

.bd-copy-btn[data-failed] {
  border-color: var(--bd-coral);
  background: #fbe6e0;
  color: var(--bd-coral);
}

.bd-copy-tip {
  position: absolute;
  inset-block-end: calc(100% + 0.35rem);
  inset-inline-end: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: #1e1915;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.bd-copy-btn[data-copied] + .bd-copy-tip,
.bd-copy-btn[data-failed] + .bd-copy-tip {
  opacity: 1;
}

.bd-dlg-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--bd-line);
}

/* ==========================================================================
   PRACTITIONER & PARENT PROGRESS REPORT DIALOG (TABBED + PRINTABLE)
   ========================================================================== */
dialog.bd-dialog.bd-report-dialog {
  max-inline-size: min(62rem, calc(100vw - 1.5rem));
  max-block-size: calc(100dvh - 1.5rem);
  overflow: hidden;
}

.bd-rep-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  max-block-size: calc(100dvh - 1.5rem);
  overflow: hidden;
  gap: 0.8rem;
}

.bd-rep-head {
  align-items: flex-start;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--bd-line);
}

.bd-rep-head h2 {
  margin: 0.15rem 0 0.12rem;
  font-size: 1.32rem;
}

.bd-rep-subtitle {
  margin: 0;
  font-size: 0.8rem;
  color: var(--bd-ink-2);
}

.bd-rep-close-x {
  min-inline-size: 2.35rem;
  min-block-size: 2.35rem;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
}

.bd-report-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--bd-line);
}

.bd-rep-tablist {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.24rem;
  border-radius: 12px;
  background: var(--bd-well);
  border: 1px solid var(--bd-line);
}

.bd-rep-tab {
  position: relative;
  min-block-size: 2.35rem;
  padding: 0.36rem 0.9rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--bd-ink-2);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 720;
  cursor: pointer;
}

.bd-rep-tab::after {
  content: "";
  position: absolute;
  inset-block-end: 0.16rem;
  inset-inline: 0.65rem;
  block-size: 2.5px;
  border-radius: 999px;
  background: transparent;
}

.bd-rep-tab[aria-selected="true"] {
  border: 2px solid var(--bd-teal-deep);
  background: var(--bd-card);
  color: var(--bd-teal-deep);
  box-shadow: none;
}

.bd-rep-tab[aria-selected="true"]::after {
  background: var(--bd-teal);
}

.bd-baseline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  padding: 0.34rem 0.72rem;
  border-radius: 10px;
  border: 1px solid var(--bd-line-strong);
  background: var(--bd-panel);
  font-size: 0.75rem;
  font-weight: 660;
  color: var(--bd-ink-2);
  cursor: pointer;
}

.bd-baseline-toggle input {
  inline-size: 1rem;
  block-size: 1rem;
  accent-color: var(--bd-teal);
  cursor: pointer;
}

.bd-rep-panel {
  overflow-y: auto;
  min-block-size: 0;
  padding-inline-end: 0.25rem;
  display: grid;
  gap: 0.85rem;
  align-content: start;
}

.bd-rep-hero {
  display: grid;
  gap: 0.28rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  border: 2px solid rgb(29 100 73 / 0.24);
  background: linear-gradient(135deg, #fffdf5 0%, #e7f6ee 55%, #e5f3f6 100%);
}

.bd-rep-hero-badge {
  justify-self: start;
  padding: 0.16rem 0.62rem;
  border-radius: 999px;
  background: #ffd966;
  border: 1.5px solid #b57b10;
  color: #5b3700;
  font-family: var(--bd-game-font);
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.04em;
}

.bd-rep-hero-title {
  margin: 0.15rem 0 0;
  font-family: var(--bd-game-font);
  font-size: 1.38rem;
  font-weight: 760;
  color: #164f39;
}

.bd-rep-hero-sub {
  margin: 0;
  font-size: 0.84rem;
  color: var(--bd-ink-2);
}

.bd-rep-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

@media (max-width: 44rem) {
  .bd-rep-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.bd-rep-kpi {
  display: grid;
  gap: 0.16rem;
  padding: 0.72rem 0.84rem;
  border-radius: 12px;
  border: 1.5px solid var(--bd-line-strong);
  border-top: 3.5px solid var(--bd-teal);
  background: var(--bd-panel);
}

.bd-rep-kpi.is-kpi-gold {
  border-top-color: #d99316;
  background: linear-gradient(180deg, #fffdf4 0%, #fcf4dd 100%);
}

.bd-rep-kpi.is-kpi-teal {
  border-top-color: #1e6e7a;
}

.bd-rep-kpi.is-kpi-emerald {
  border-top-color: #1b8053;
  background: linear-gradient(180deg, #fcfefd 0%, #edf8f2 100%);
}

.bd-rep-kpi.is-kpi-indigo {
  border-top-color: #3f44b8;
  background: linear-gradient(180deg, #fcfcff 0%, #eff0fd 100%);
}

.bd-rep-kpi.is-kpi-amber {
  border-top-color: #c26f13;
}

.bd-rep-kpi span {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bd-ink-3);
}

.bd-rep-kpi strong {
  font-family: var(--bd-game-font);
  font-size: 1.38rem;
  font-weight: 760;
  color: var(--bd-ink);
  font-variant-numeric: tabular-nums;
}

.bd-rep-kpi small {
  font-size: 0.7rem;
  color: var(--bd-green);
  font-weight: 680;
}

.bd-rep-card {
  display: grid;
  gap: 0.6rem;
  padding: 0.88rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--bd-line-strong);
  background: var(--bd-card);
}

.bd-rep-card h4 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 760;
  color: var(--bd-ink);
}

.bd-rep-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.bd-rep-chip {
  padding: 0.16rem 0.62rem;
  border-radius: 999px;
  background: #e2f2ea;
  border: 1px solid rgb(29 100 73 / 0.28);
  color: var(--bd-green);
  font-size: 0.7rem;
  font-weight: 740;
}

.bd-rep-skills-list {
  display: grid;
  gap: 0.72rem;
}

.bd-rep-skill-row {
  display: grid;
  gap: 0.28rem;
  padding: 0.62rem 0.75rem;
  border-radius: 10px;
  background: var(--bd-panel);
  border: 1px solid var(--bd-line);
}

.bd-rep-skill-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.82rem;
}

.bd-rep-delta {
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 740;
  background: var(--bd-amber-bg);
  color: var(--bd-amber);
}

.bd-rep-delta.is-up {
  background: var(--bd-green-bg);
  color: var(--bd-green);
}

.bd-rep-meter {
  appearance: none;
  -webkit-appearance: none;
  inline-size: 100%;
  block-size: 0.75rem;
  border: 1px solid rgb(42 32 20 / 0.14);
  border-radius: 999px;
  background: #e7decb;
  overflow: hidden;
}

.bd-rep-meter::-webkit-progress-bar {
  background: #e7decb;
  border-radius: 999px;
}

.bd-rep-meter::-webkit-progress-value {
  background: linear-gradient(90deg, #1d8a5a 0%, #2b9fa6 100%);
  border-radius: 999px;
}

.bd-rep-meter::-moz-progress-bar {
  background: linear-gradient(90deg, #1d8a5a 0%, #2b9fa6 100%);
  border-radius: 999px;
}

.bd-rep-skill-sub {
  margin: 0;
  font-size: 0.74rem;
  color: var(--bd-ink-2);
}

.bd-rep-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 44rem) {
  .bd-rep-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

.bd-rep-bullets {
  margin: 0;
  padding-inline-start: 1.15rem;
  display: grid;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--bd-ink-2);
}

.bd-rep-home-tip,
.bd-rep-plain-note {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.52;
  color: var(--bd-ink-2);
}

.bd-rep-plain-note {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border-inline-start: 4px solid var(--bd-teal);
  background: var(--bd-panel);
}

.bd-rep-chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  font-size: 0.74rem;
  font-weight: 660;
  color: var(--bd-ink-2);
}

.bd-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.bd-legend-swatch {
  display: inline-block;
  flex: none;
}

.bd-legend-swatch.is-line {
  inline-size: 16px;
  block-size: 3px;
  border-radius: 999px;
  background: #1b8053;
}

.bd-legend-swatch.is-bar {
  inline-size: 12px;
  block-size: 12px;
  border-radius: 3px;
  background: rgb(43 159 166 / 0.28);
  border: 1px solid rgb(30 110 122 / 0.55);
}

.bd-legend-swatch.is-today {
  inline-size: 10px;
  block-size: 10px;
  border-radius: 50%;
  background: #f0b323;
  border: 2px solid #8c4a00;
}

.bd-rep-letterhead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.72rem 0.92rem;
  border-radius: 10px;
  border: 1px solid var(--bd-line-strong);
  background: var(--bd-well);
}

.bd-rep-letterhead-main {
  display: grid;
  gap: 0.1rem;
}

.bd-rep-letterhead-main strong {
  font-size: 0.86rem;
}

.bd-rep-letterhead-main span {
  font-size: 0.75rem;
  color: var(--bd-ink-2);
}

.bd-rep-scope-pill {
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  background: #e6f2f4;
  border: 1px solid rgb(30 110 122 / 0.34);
  color: var(--bd-teal-deep);
  font-size: 0.68rem;
  font-weight: 740;
}

.bd-rep-svg-host {
  inline-size: 100%;
  border-radius: 10px;
  border: 1px solid var(--bd-line);
  background: #fcfaf4;
  padding: 0.65rem 0.65rem 0.45rem;
}

.bd-rep-chart-svg {
  display: block;
  inline-size: 100%;
  block-size: auto;
  overflow: visible;
  font-family: var(--bd-sans);
}

.bd-chart-grid {
  stroke: rgb(42 32 20 / 0.11);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.bd-chart-axis {
  stroke: rgb(42 32 20 / 0.28);
  stroke-width: 1.25;
}

.bd-chart-area {
  fill: rgb(27 128 83 / 0.11);
}

.bd-chart-bar {
  fill: rgb(43 159 166 / 0.24);
  stroke: rgb(30 110 122 / 0.45);
  stroke-width: 1;
}

.bd-chart-line {
  fill: none;
  stroke: #1b8053;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bd-chart-dot {
  fill: #ffffff;
  stroke: #1b8053;
  stroke-width: 3;
}

.bd-chart-dot.is-current {
  fill: #f0b323;
  stroke: #8c4a00;
}

.bd-chart-pill {
  fill: #ffffff;
  stroke: rgb(27 128 83 / 0.38);
  stroke-width: 1.25;
}

.bd-chart-pill.is-current {
  fill: #fff8df;
  stroke: #b57b10;
}

.bd-chart-label {
  fill: #5c5045;
  font-size: 11px;
  font-weight: 660;
}

.bd-chart-sublabel {
  fill: #6e6357;
  font-size: 10px;
  font-weight: 600;
}

.bd-chart-val {
  fill: #155c3c;
  font-size: 11px;
  font-weight: 760;
}

.bd-chart-val.is-current {
  fill: #7a4600;
}

.bd-rep-svg-caption {
  margin: 0;
  font-size: 0.74rem;
  color: var(--bd-ink-2);
}

.bd-rep-table-wrap {
  overflow-x: auto;
}

.bd-rep-table {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.bd-rep-table th,
.bd-rep-table td {
  padding: 0.48rem 0.56rem;
  border-bottom: 1px solid var(--bd-line);
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.bd-rep-table th {
  font-size: 0.68rem;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bd-ink-3);
  background: var(--bd-panel);
}

.bd-rep-log-scroll {
  display: grid;
  gap: 0.35rem;
  max-block-size: 10.5rem;
  overflow-y: auto;
}

.bd-rep-log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.42rem 0.58rem;
  border-radius: 7px;
  background: var(--bd-panel);
  border: 1px solid var(--bd-line);
  font-size: 0.72rem;
}

.bd-rep-log-item > span {
  flex: 1 1 auto;
  min-inline-size: 0;
  line-height: 1.35;
}

.bd-rep-log-pill {
  flex: none;
  white-space: nowrap;
  align-self: center;
  padding: 0.14rem 0.52rem;
  border-radius: 999px;
  background: var(--bd-green-bg);
  color: var(--bd-green);
  font-size: 0.67rem;
  font-weight: 740;
}

.bd-rep-td-meter {
  display: flex;
  align-items: center;
  gap: 0.48rem;
}

.bd-rep-mini-meter {
  appearance: none;
  -webkit-appearance: none;
  inline-size: 4.5rem;
  block-size: 0.5rem;
  border: 1px solid rgb(42 32 20 / 0.14);
  border-radius: 999px;
  background: #e7decb;
  overflow: hidden;
  flex: none;
}

.bd-rep-mini-meter::-webkit-progress-bar {
  background: #e7decb;
  border-radius: 999px;
}

.bd-rep-mini-meter::-webkit-progress-value {
  background: linear-gradient(90deg, #1d8a5a 0%, #2b9fa6 100%);
  border-radius: 999px;
}

.bd-rep-mini-meter::-moz-progress-bar {
  background: linear-gradient(90deg, #1d8a5a 0%, #2b9fa6 100%);
  border-radius: 999px;
}

@media (max-width: 44rem) {
  dialog.bd-dialog.bd-report-dialog {
    max-inline-size: calc(100vw - 1rem);
    max-block-size: calc(100dvh - 1rem);
  }
  .bd-rep-shell {
    padding: 0.9rem;
    max-block-size: calc(100dvh - 1rem);
    gap: 0.6rem;
  }
  .bd-report-bar {
    gap: 0.45rem;
  }
  .bd-rep-tablist {
    inline-size: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bd-rep-tab {
    padding: 0.34rem 0.5rem;
    font-size: 0.72rem;
    text-align: center;
  }
  .bd-rep-foot {
    justify-content: flex-start;
  }
  .bd-rep-toolbar {
    inline-size: 100%;
  }
  .bd-rep-toolbar .bd-btn {
    flex: 1 1 auto;
    padding: 0.34rem 0.6rem;
    font-size: 0.72rem;
  }
}

.bd-rep-foot {
  align-items: center;
  justify-content: space-between;
}

.bd-rep-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.bd-rep-status {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--bd-green);
}

@media print {
  .bd-app,
  #bs-share-dialog,
  .bd-report-bar,
  .bd-rep-foot,
  .bd-rep-close-x {
    display: none !important;
  }
  html.bd-html,
  body.bd-body {
    background: #ffffff;
    overflow: visible;
  }
  dialog#bs-summary-dialog[open] {
    position: static;
    max-inline-size: 100%;
    max-block-size: none;
    overflow: visible;
    border: 0;
    box-shadow: none;
    background: #ffffff;
  }
  .bd-rep-shell {
    max-block-size: none;
    overflow: visible;
  }
  .bd-rep-panel[hidden] {
    display: grid !important;
  }
  .bd-rep-panel {
    overflow: visible;
  }
}

@media (forced-colors: active) {
  .bd-tb-btn[aria-pressed="true"],
  .bd-deck-tab[aria-selected="true"],
  .bd-avatar-btn[aria-pressed="true"],
  .bd-btn[aria-pressed="true"] {
    outline: 2px solid Highlight;
    border-color: Highlight;
  }
  .bd-deck-tab[aria-selected="true"]::after {
    border-block-end-color: Highlight;
  }
  .bd-tb-btn.is-gate,
  .bd-clinician-deck .tr-ctrl-btn.is-gate,
  .bd-clinician-deck [data-cd-save-custom],
  .bd-clinician-deck [data-cd-board-shuffle] {
    border-color: ButtonText;
  }
  .bd-tb-sep {
    border-color: ButtonText;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bd-btn,
  .bd-avatar-btn,
  .bd-preset-btn,
  .bd-sticker-btn,
  .bd-kid-mood-btn,
  .bd-tb-btn,
  .bd-deck-tabs {
    transition: none;
  }
}

/* ==========================================================================
   MOBILE SINGLE-SCREEN STUDENT STAGE (100dvh · Safe Areas · 0 Page Scroll)
   Applies on <= 62rem ONLY in Child Play View or Preview Child Screen
   ========================================================================== */
@media (max-width: 62rem) {
  html.bd-html:has(.bd-app[data-demo-role="child"]),
  html.bd-html:has(.bd-app[data-preview-child="true"]),
  body.bd-body:has(.bd-app[data-demo-role="child"]),
  body.bd-body:has(.bd-app[data-preview-child="true"]) {
    block-size: 100svh;
    block-size: 100dvh;
    max-block-size: 100dvh;
    min-block-size: 0;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .bd-app[data-demo-role="child"],
  .bd-app[data-preview-child="true"] {
    position: fixed;
    inset: 0;
    inline-size: 100%;
    max-inline-size: 100%;
    block-size: 100svh;
    block-size: 100dvh;
    max-block-size: 100dvh;
    min-block-size: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px);
    padding-block-end: env(safe-area-inset-bottom, 0px);
  }

  .bd-app[data-demo-role="child"] > main,
  .bd-app[data-preview-child="true"] > main {
    min-inline-size: 0;
    max-inline-size: 100%;
    min-block-size: 0;
    block-size: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
  }

  .bd-app[data-demo-role="child"] .bd-stage-panel,
  .bd-app[data-preview-child="true"] .bd-stage-panel {
    flex: 1 1 0;
    min-inline-size: 0;
    max-inline-size: 100%;
    min-block-size: 0;
    block-size: auto;
    overflow: hidden;
  }

  .bd-app[data-demo-role="child"] .bd-studio,
  .bd-app[data-preview-child="true"] .bd-studio,
  .bd-app[data-demo-role="child"] .bd-workspace-grid,
  .bd-app[data-preview-child="true"] .bd-workspace-grid,
  .bd-app[data-demo-role="child"] .bd-stage-host,
  .bd-app[data-preview-child="true"] .bd-stage-host,
  .bd-app[data-demo-role="child"] .bd-stage-host .bs-game-shell,
  .bd-app[data-preview-child="true"] .bd-stage-host .bs-game-shell {
    grid-template-columns: minmax(0, 1fr);
    min-inline-size: 0;
    max-inline-size: 100%;
    min-block-size: 0;
    block-size: 100%;
    overflow: hidden;
  }

  .bd-app[data-demo-role="child"] .bd-stage-host .tr-stage-pane,
  .bd-app[data-preview-child="true"] .bd-stage-host .tr-stage-pane {
    display: flex;
    flex-direction: column;
    min-inline-size: 0;
    max-inline-size: 100%;
    min-block-size: 0;
    block-size: 100%;
    overflow: hidden;
  }

  .bd-app[data-demo-role="child"] .bd-stage-host .tr-stage-wrap,
  .bd-app[data-preview-child="true"] .bd-stage-host .tr-stage-wrap {
    flex: 1 1 0;
    inline-size: 100%;
    max-inline-size: 100%;
    min-inline-size: 0;
    min-block-size: 0;
    block-size: auto;
    content-visibility: visible;
  }

  /* Bar 1: Compact Single-Row Top Bar */
  .bd-app[data-demo-role="child"] .bd-topbar,
  .bd-app[data-preview-child="true"] .bd-topbar {
    min-inline-size: 0;
    max-inline-size: 100%;
    flex-wrap: nowrap;
    gap: 0.32rem;
    padding: max(0.28rem, env(safe-area-inset-top, 0px)) 0.55rem 0.28rem;
  }

  .bd-app[data-demo-role="child"] .bd-brand,
  .bd-app[data-preview-child="true"] .bd-brand {
    display: none;
  }

  .bd-app[data-demo-role="child"] .bd-top-left,
  .bd-app[data-preview-child="true"] .bd-top-left {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    min-inline-size: 0;
    gap: 0.3rem;
    overflow: hidden;
  }

  .bd-app[data-demo-role="child"] .bd-top-right,
  .bd-app[data-preview-child="true"] .bd-top-right {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 0.26rem;
  }

  .bd-app[data-demo-role="child"] .bd-room-pill,
  .bd-app[data-preview-child="true"] .bd-room-pill {
    padding: 0.16rem 0.5rem;
    font-family: var(--bd-game-font);
    font-size: 0.68rem;
    white-space: nowrap;
    flex: none;
  }

  .bd-app[data-demo-role="child"] .bd-conn-pill,
  .bd-app[data-preview-child="true"] .bd-conn-pill {
    padding: 0.16rem 0.5rem;
    font-size: 0.68rem;
    min-inline-size: 0;
    overflow: hidden;
  }

  .bd-app[data-demo-role="child"] [data-demo-conn-label],
  .bd-app[data-preview-child="true"] [data-demo-conn-label] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .bd-app[data-demo-role="child"] .bd-topbar .bd-btn,
  .bd-app[data-preview-child="true"] .bd-topbar .bd-btn {
    min-block-size: 2.05rem;
    min-inline-size: auto;
    padding: 0.18rem 0.6rem;
    font-family: var(--bd-game-font);
    font-size: 0.7rem;
    box-shadow: none;
    position: relative;
  }

  /* Bar 2: Compact Single-Row Buddy & Color-Coded Mood Strip */
  .bd-app[data-demo-role="child"] .bd-child-strip,
  .bd-app[data-preview-child="true"] .bd-child-strip {
    min-inline-size: 0;
    max-inline-size: 100%;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.34rem;
    padding: 0.2rem 0.5rem;
  }

  .bd-app[data-demo-role="child"] [data-child-strip-clinician],
  .bd-app[data-preview-child="true"] [data-child-strip-clinician] {
    display: none;
  }

  .bd-app[data-demo-role="child"] .bd-child-ident,
  .bd-app[data-preview-child="true"] .bd-child-ident {
    flex: 0 0 auto;
    font-family: var(--bd-game-font);
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
  }

  .bd-app[data-demo-role="child"] .bd-child-mood-group,
  .bd-app[data-preview-child="true"] .bd-child-mood-group {
    flex: 1 1 auto;
    min-inline-size: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 0.22rem;
    padding-block: 0.22rem;
    padding-inline-end: 0.65rem;
    margin-block: -0.16rem;
  }

  .bd-app[data-demo-role="child"] .bd-child-mood-group::-webkit-scrollbar,
  .bd-app[data-preview-child="true"] .bd-child-mood-group::-webkit-scrollbar {
    display: none;
  }

  .bd-app[data-demo-role="child"] .bd-kid-mood-btn,
  .bd-app[data-preview-child="true"] .bd-kid-mood-btn {
    flex: 0 0 auto;
    min-block-size: 1.85rem;
    padding: 0.14rem 0.44rem;
    font-family: var(--bd-game-font);
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
    border: 2px solid #4a3a2c;
    box-shadow: none;
    position: relative;
  }

  .bd-app[data-demo-role="child"] .bd-kid-mood-btn[data-child-mood="ready"][aria-pressed="true"],
  .bd-app[data-preview-child="true"] .bd-kid-mood-btn[data-child-mood="ready"][aria-pressed="true"] {
    border-color: #1e6e7a;
    background: #dff2f4;
    color: #114750;
  }

  .bd-app[data-demo-role="child"] .bd-kid-mood-btn[data-child-mood="hint"][aria-pressed="true"],
  .bd-app[data-preview-child="true"] .bd-kid-mood-btn[data-child-mood="hint"][aria-pressed="true"] {
    border-color: #b56c0c;
    background: #fff0c7;
    color: #7c4804;
  }

  .bd-app[data-demo-role="child"] .bd-kid-mood-btn[data-child-mood="break"][aria-pressed="true"],
  .bd-app[data-preview-child="true"] .bd-kid-mood-btn[data-child-mood="break"][aria-pressed="true"] {
    border-color: #3f67a4;
    background: #e3ecfc;
    color: #213c6b;
  }

  .bd-app[data-demo-role="child"] .bd-kid-mood-btn[data-child-mood="yay"][aria-pressed="true"],
  .bd-app[data-preview-child="true"] .bd-kid-mood-btn[data-child-mood="yay"][aria-pressed="true"] {
    border-color: #1f7a53;
    background: #dff4ea;
    color: #114f35;
  }

  /* Bar 3: Compact Game Header & Scrollable Action Row */
  .bd-app[data-demo-role="child"] .tr-stage-bar,
  .bd-app[data-preview-child="true"] .tr-stage-bar {
    min-inline-size: 0;
    max-inline-size: 100%;
    padding: 0.3rem 0.55rem 0.28rem;
    gap: 0.24rem;
    flex: 0 0 auto;
  }

  .bd-app[data-demo-role="child"] .tr-stage-bar-top,
  .bd-app[data-preview-child="true"] .tr-stage-bar-top {
    min-inline-size: 0;
    max-inline-size: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.24rem;
  }

  .bd-app[data-demo-role="child"] .tr-bar-title-row,
  .bd-app[data-preview-child="true"] .tr-bar-title-row {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.3rem;
    min-inline-size: 0;
    max-inline-size: 100%;
    overflow: hidden;
  }

  .bd-app[data-demo-role="child"] .tr-bar-title-row strong,
  .bd-app[data-preview-child="true"] .tr-bar-title-row strong {
    font-size: 0.84rem;
    white-space: nowrap;
    flex: none;
  }

  .bd-app[data-demo-role="child"] .tr-hud-level,
  .bd-app[data-preview-child="true"] .tr-hud-level {
    font-size: 0.58rem;
    padding: 0.12rem 0.44rem;
    min-inline-size: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .bd-app[data-demo-role="child"] .tr-turn-badge,
  .bd-app[data-preview-child="true"] .tr-turn-badge {
    margin-inline-start: auto;
    flex: none;
    font-size: 0.56rem;
    padding: 0.12rem 0.42rem;
  }

  .bd-app[data-demo-role="child"] .tr-moves-badge,
  .bd-app[data-preview-child="true"] .tr-moves-badge,
  .bd-app[data-demo-role="child"] .tr-mastery-stars,
  .bd-app[data-preview-child="true"] .tr-mastery-stars {
    display: none;
  }

  .bd-app[data-demo-role="child"] .tr-hud-tools,
  .bd-app[data-preview-child="true"] .tr-hud-tools {
    min-inline-size: 0;
    max-inline-size: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: none;
    mask-image: none;
    align-items: center;
    gap: 0.28rem;
    padding-block: 0.06rem;
    margin-block: 0;
  }

  .bd-app[data-demo-role="child"] .tr-hud-tools::-webkit-scrollbar,
  .bd-app[data-preview-child="true"] .tr-hud-tools::-webkit-scrollbar {
    display: none;
  }

  .bd-app[data-demo-role="child"] .tr-star-counter,
  .bd-app[data-preview-child="true"] .tr-star-counter {
    order: 1;
    min-block-size: 2.05rem;
    padding: 0.14rem 0.56rem;
    font-size: 0.74rem;
    flex: 0 0 auto;
  }

  .bd-app[data-demo-role="child"] [data-wc-next],
  .bd-app[data-preview-child="true"] [data-wc-next],
  .bd-app[data-demo-role="child"] [data-tr-next-btn],
  .bd-app[data-preview-child="true"] [data-tr-next-btn],
  .bd-app[data-demo-role="child"] [data-sc-next],
  .bd-app[data-preview-child="true"] [data-sc-next] {
    order: 2;
  }

  .bd-app[data-demo-role="child"] [data-wc-serve],
  .bd-app[data-preview-child="true"] [data-wc-serve],
  .bd-app[data-demo-role="child"] [data-sc-launch],
  .bd-app[data-preview-child="true"] [data-sc-launch],
  .bd-app[data-demo-role="child"] [data-sc-listen],
  .bd-app[data-preview-child="true"] [data-sc-listen],
  .bd-app[data-demo-role="child"] [data-tr-flip-btn],
  .bd-app[data-preview-child="true"] [data-tr-flip-btn] {
    order: 3;
  }

  .bd-app[data-demo-role="child"] .tr-hud-tools:has([data-wc-next]:not([hidden])) [data-wc-serve],
  .bd-app[data-preview-child="true"] .tr-hud-tools:has([data-wc-next]:not([hidden])) [data-wc-serve],
  .bd-app[data-demo-role="child"] .tr-hud-tools:has([data-sc-next]:not([hidden])) [data-sc-launch],
  .bd-app[data-preview-child="true"] .tr-hud-tools:has([data-sc-next]:not([hidden])) [data-sc-launch] {
    display: none;
  }

  .bd-app[data-demo-role="child"] .tr-stage-btn,
  .bd-app[data-preview-child="true"] .tr-stage-btn {
    order: 4;
    flex: 0 0 auto;
    white-space: nowrap;
    min-block-size: 2.05rem;
    padding: 0.2rem 0.58rem;
    font-family: "Fredoka Variable", "Archivo Variable", system-ui, sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    gap: 0.26rem;
    position: relative;
  }

  .bd-app[data-demo-role="child"] .tr-hud-tools .tr-stage-btn:not(.is-primary),
  .bd-app[data-preview-child="true"] .tr-hud-tools .tr-stage-btn:not(.is-primary) {
    inline-size: 2rem;
    block-size: 2rem;
    min-inline-size: 2rem;
    min-block-size: 2rem;
    padding: 0;
    border-radius: 999px;
    justify-content: center;
    gap: 0;
  }

  .bd-app[data-demo-role="child"] .tr-hud-tools .tr-stage-btn:not(.is-primary) > span:not(.tr-icon-swap),
  .bd-app[data-preview-child="true"] .tr-hud-tools .tr-stage-btn:not(.is-primary) > span:not(.tr-icon-swap) {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .bd-app[data-demo-role="child"] .tr-stage-btn svg,
  .bd-app[data-preview-child="true"] .tr-stage-btn svg {
    inline-size: 0.92rem;
    block-size: 0.92rem;
  }

  .bd-app[data-demo-role="child"] .tr-hud-hint,
  .bd-app[data-preview-child="true"] .tr-hud-hint {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    margin: 0;
    padding: 0;
  }

  .bd-app[data-demo-role="child"] .wc-turn-spotlight,
  .bd-app[data-preview-child="true"] .wc-turn-spotlight {
    padding: 0.18rem 0.5rem;
    gap: 0.22rem 0.45rem;
  }

  .bd-app[data-demo-role="child"] .wc-turn-headline,
  .bd-app[data-preview-child="true"] .wc-turn-headline {
    font-size: 0.72rem;
  }

  .bd-app[data-demo-role="child"] .wc-player-chip,
  .bd-app[data-preview-child="true"] .wc-player-chip {
    padding: 0.1rem 0.42rem;
    font-size: 0.62rem;
  }
}

@media (max-width: 52rem) {
  .bd-app[data-preview-child="true"] .bd-conn-pill,
  .bd-app[data-preview-child="true"] [data-demo-open-child-tab],
  .bd-app[data-preview-child="true"] [data-demo-share-btn],
  .bd-app[data-preview-child="true"] [data-demo-summary-btn] {
    display: none;
  }
}

@media (max-width: 62rem) and (pointer: coarse) {
  .bd-app[data-demo-role="child"] .bd-topbar .bd-btn,
  .bd-app[data-preview-child="true"] .bd-topbar .bd-btn {
    min-inline-size: 2.75rem;
    min-block-size: 2.1rem;
  }

  .bd-app[data-demo-role="child"] .bd-kid-mood-btn,
  .bd-app[data-preview-child="true"] .bd-kid-mood-btn,
  .bd-app[data-demo-role="child"] .tr-stage-btn,
  .bd-app[data-preview-child="true"] .tr-stage-btn {
    min-inline-size: 2.75rem;
    min-block-size: 2.05rem;
  }

  .bd-app[data-demo-role="child"] .tr-hud-tools .tr-stage-btn:not(.is-primary),
  .bd-app[data-preview-child="true"] .tr-hud-tools .tr-stage-btn:not(.is-primary) {
    min-inline-size: 2.05rem;
    min-block-size: 2.05rem;
  }

  .bd-app[data-demo-role="child"] .bd-topbar .bd-btn::after,
  .bd-app[data-preview-child="true"] .bd-topbar .bd-btn::after,
  .bd-app[data-demo-role="child"] .bd-kid-mood-btn::after,
  .bd-app[data-preview-child="true"] .bd-kid-mood-btn::after,
  .bd-app[data-demo-role="child"] .tr-stage-btn::after,
  .bd-app[data-preview-child="true"] .tr-stage-btn::after {
    content: "";
    position: absolute;
    inset: -6px;
  }
}

@media (max-width: 62rem) and (max-height: 460px) {
  .bd-app[data-demo-role="child"] .tr-hud-hint,
  .bd-app[data-preview-child="true"] .tr-hud-hint {
    display: none;
  }

  .bd-app[data-demo-role="child"] .bd-child-strip,
  .bd-app[data-preview-child="true"] .bd-child-strip {
    padding: 0.12rem 0.5rem;
  }
}

/* ==========================================================================
   DARK STUDIO THEME (html[data-theme="dark"] + seen-theme.v3.js)
   ========================================================================== */
html[data-theme="dark"] {
  --bd-bg: #101215;
  --bd-panel: #171a1f;
  --bd-card: #1d2128;
  --bd-well: #14171c;
  --bd-ink: #f4f1ea;
  --bd-ink-2: #cfc9be;
  --bd-ink-3: #9e978c;
  --bd-line: rgb(244 241 234 / 0.14);
  --bd-line-strong: rgb(244 241 234 / 0.28);
  --bd-teal: #4ab6c4;
  --bd-teal-deep: #6bd0dc;
  --bd-coral: #f07b63;
  --bd-amber: #f6c453;
  --bd-amber-bg: #2e2310;
  --bd-green: #5ee2ab;
  --bd-green-bg: #132d23;
  --bd-focus: #7fb4ff;
  color-scheme: dark;
}

html[data-theme="dark"].bd-html,
html[data-theme="dark"] body.bd-body {
  background: var(--bd-bg);
  color: var(--bd-ink);
}

html[data-theme="dark"] .bd-topbar {
  background: #14171c;
  border-bottom-color: var(--bd-line);
}

html[data-theme="dark"] .bd-room-pill {
  background: #172b30;
  border-color: rgb(74 182 196 / 0.42);
  color: #a9ecf3;
}

html[data-theme="dark"] .bd-conn-pill {
  background: var(--bd-panel);
  border-color: var(--bd-line-strong);
  color: var(--bd-ink-2);
}

html[data-theme="dark"] .bd-conn-pill[data-connected="true"] {
  background: #142f23;
  border-color: rgb(94 226 171 / 0.42);
  color: #a2f5cf;
}

html[data-theme="dark"] .bd-mood-pill {
  background: var(--bd-panel);
  border-color: var(--bd-line-strong);
  color: var(--bd-ink);
}

html[data-theme="dark"] .bd-mood-pill[data-mood="break"] {
  background: #361b17;
  border-color: rgb(240 123 99 / 0.48);
  color: #ffc2b5;
}

html[data-theme="dark"] .bd-btn {
  border-color: #6b5d4e;
  background: #232830;
  color: #f4f1ea;
  box-shadow: none;
}

@media (hover: hover) {
  html[data-theme="dark"] .bd-btn:hover:not(:disabled) {
    background: #2e3440;
    border-color: #9e8a74;
  }
}

html[data-theme="dark"] .bd-btn.is-primary {
  border-color: #4dc2d4;
  background: #175c67;
  color: #ffffff;
}

html[data-theme="dark"] .bd-btn.is-amber {
  border-color: #c99220;
  background: #ffd459;
  color: #2e1900;
}

html[data-theme="dark"] .bd-btn.is-coral {
  border-color: #f0896d;
  background: #c4472f;
  color: #ffffff;
}

html[data-theme="dark"] .bd-btn[aria-pressed="true"] {
  border-color: #4dc2d4;
  background: #193b42;
  color: #a9ecf3;
}

html[data-theme="dark"] .bd-role-card {
  background: var(--bd-card);
  border-color: var(--bd-line-strong);
}

html[data-theme="dark"] .bd-role-tag.is-child {
  background: #142f27;
  color: #8ee8c2;
}

html[data-theme="dark"] .bd-role-tag.is-clinician,
html[data-theme="dark"] .bd-preset-btn[aria-pressed="true"] {
  background: #361d18;
  color: #ffc3b5;
  border-color: #f07b63;
}

html[data-theme="dark"] .bd-preset-btn {
  background: #232830;
  border-color: var(--bd-line-strong);
  color: var(--bd-ink-2);
}

html[data-theme="dark"] .bd-input,
html[data-theme="dark"] .bd-select,
html[data-theme="dark"] .bd-textarea {
  background: #121519;
  border-color: var(--bd-line-strong);
  color: var(--bd-ink);
}

html[data-theme="dark"] .bd-avatar-btn {
  border-color: #5e5144;
  background: #22272f;
  color: var(--bd-ink);
}

html[data-theme="dark"] .bd-avatar-thumb {
  border-color: #6b5d4e;
  background: #2c313b;
}

html[data-theme="dark"] .bd-avatar-btn[aria-pressed="true"] {
  border-color: #4ab6c4;
  background: #173338;
  color: #b0edf5;
}

html[data-theme="dark"] .bd-form-error {
  background: #381a15;
  border-color: #f07b63;
  color: #ffbfb3;
}

html[data-theme="dark"] .bd-rejoin-details,
html[data-theme="dark"] .bd-privacy-strip,
html[data-theme="dark"] .bd-game-switcher-bar {
  background: #15181d;
  border-color: var(--bd-line);
}

html[data-theme="dark"] .bd-game-pill {
  background: #22272f;
  border-color: var(--bd-line-strong);
  color: var(--bd-ink-2);
}

html[data-theme="dark"] .bd-game-pill[aria-selected="true"] {
  background: #f4f1ea;
  border-color: #f4f1ea;
  color: #101215;
}

html[data-theme="dark"] .bd-clinician-deck {
  background: var(--bd-panel);
  border-right-color: var(--bd-line);
}

html[data-theme="dark"] .bd-child-strip {
  background: #1a1e24;
  border-bottom-color: var(--bd-line);
}

html[data-theme="dark"] .bd-child-chef-btn {
  border-color: #c99220;
  background: #ffcf4d;
  color: #2e1900;
}

html[data-theme="dark"] .bd-kid-mood-btn {
  background: #232830;
  border-color: var(--bd-line-strong);
  color: var(--bd-ink);
}

html[data-theme="dark"] .bd-kid-mood-btn[aria-pressed="true"] {
  border-color: #4ab6c4;
  background: #16363c;
  color: #a9ecf3;
}

html[data-theme="dark"] .bd-tb-btn {
  background: #22272f;
  border-color: var(--bd-line-strong);
  color: var(--bd-ink);
}

html[data-theme="dark"] .bd-tb-btn.is-star {
  border-color: rgb(246 196 83 / 0.42);
  background: #2f2410;
  color: #fbd989;
}

html[data-theme="dark"] .bd-tb-btn.is-gate {
  border-color: rgb(74 182 196 / 0.5);
  background: #163339;
  color: #a9ecf3;
}

@media (hover: hover) {
  html[data-theme="dark"] .bd-tb-btn:hover:not([aria-pressed="true"]):not(.is-gate) {
    border-color: #a99b88;
    background: #2e3440;
  }
  html[data-theme="dark"] .bd-tb-btn.is-gate:hover {
    border-color: #6bd0dc;
    background: #1d434b;
  }
  html[data-theme="dark"] .bd-deck-tab:hover:not([aria-selected="true"]) {
    color: var(--bd-ink);
    background: rgb(35 40 48 / 0.72);
  }
}

html[data-theme="dark"] .bd-deck-tabs {
  background: var(--bd-well);
  border-color: var(--bd-line);
}

html[data-theme="dark"] .bd-deck-tab {
  color: var(--bd-ink-2);
}

html[data-theme="dark"] .bd-deck-tab[aria-selected="true"] {
  background: var(--bd-card);
  border-color: var(--bd-line-strong);
  color: var(--bd-ink);
}

html[data-theme="dark"] .bd-deck-tab[aria-selected="true"]::after {
  border-block-end-color: #4ab6c4;
}

html[data-theme="dark"] .bd-clinician-deck [data-cd-save-custom] {
  background: #22272f;
  border-color: var(--bd-line-strong);
  color: var(--bd-ink);
}

@media (hover: hover) {
  html[data-theme="dark"] .bd-clinician-deck [data-cd-save-custom]:hover {
    background: #173338;
    border-color: #4ab6c4;
    color: #a9ecf3;
  }
}

html[data-theme="dark"] .bd-custom-save-status {
  color: var(--bd-green);
}

html[data-theme="dark"] .bd-custom-save-status.is-error {
  color: var(--bd-coral);
}

html[data-theme="dark"] .bd-clinician-deck .tr-cue-row.is-psych .tr-cue-badge {
  border-color: rgb(163 140 245 / 0.45);
  background: #251d3d;
  color: #d6c8ff;
}

html[data-theme="dark"] .bd-clinician-deck .tr-cue-row.is-physio .tr-cue-badge {
  border-color: rgb(94 226 171 / 0.42);
  background: #142f24;
  color: #96f2c7;
}

html[data-theme="dark"] .bd-clinician-deck .tr-cue-row.is-custom .tr-cue-badge {
  border-color: rgb(246 196 83 / 0.42);
  background: #2f2410;
  color: #fbd989;
}

html[data-theme="dark"] .bd-clinician-deck .tr-ctrl-btn.is-gate {
  border-color: rgb(74 182 196 / 0.5);
  background: #163238;
  color: #a9ecf3;
}

@media (hover: hover) {
  html[data-theme="dark"] .bd-clinician-deck .tr-ctrl-btn.is-gate:hover:not(:disabled) {
    border-color: #6bd0dc;
    background: #1d434b;
    color: #ffffff;
  }
}

html[data-theme="dark"] .bd-clinician-deck [data-cd-board-shuffle] {
  border-color: rgb(74 182 196 / 0.42);
  background: #172b30;
  color: #a9ecf3;
}

@media (hover: hover) {
  html[data-theme="dark"] .bd-clinician-deck [data-cd-board-shuffle]:hover:not(:disabled) {
    border-color: #6bd0dc;
    background: #1e3b42;
    color: #ffffff;
  }
}

html[data-theme="dark"] .bd-sticker-btn {
  background: #22272f;
  border-color: var(--bd-line-strong);
  color: var(--bd-ink);
}

@media (hover: hover) {
  html[data-theme="dark"] .bd-sticker-btn:hover {
    border-color: #f6c453;
    background: #2e2412;
  }
}

html[data-theme="dark"] .bd-log-item {
  background: #22272f;
  border-color: var(--bd-line);
  color: var(--bd-ink);
}

html[data-theme="dark"] .bd-deck-progress-card {
  border-color: rgb(74 182 196 / 0.32);
  background: linear-gradient(180deg, #1b2229 0%, #152126 100%);
  color: var(--bd-ink);
}

html[data-theme="dark"] .bd-rep-mini-badge {
  background: #153326;
  border-color: rgb(94 226 171 / 0.36);
  color: #96f2c7;
}

html[data-theme="dark"] .bd-stage-host {
  background: #121519;
}

html[data-theme="dark"] dialog.bd-dialog {
  border-color: #7c6d5c;
  background: #1b1f26;
  color: var(--bd-ink);
  box-shadow: none;
}

html[data-theme="dark"] .bd-qr-frame {
  border-color: #9e8f7b;
  background: #ffffff;
}

html[data-theme="dark"] .bd-code-box {
  background: #121519;
  border-color: var(--bd-line-strong);
  color: #8ee6f2;
}

html[data-theme="dark"] .bd-rep-hero {
  border-color: rgb(94 226 171 / 0.34);
  background: linear-gradient(135deg, #192226 0%, #162a24 55%, #16252c 100%);
}

html[data-theme="dark"] .bd-rep-hero-title {
  color: #98f0c8;
}

html[data-theme="dark"] .bd-rep-kpi.is-kpi-gold {
  border-top-color: #f0b43a;
  background: linear-gradient(180deg, #252116 0%, #1f1b12 100%);
}

html[data-theme="dark"] .bd-rep-kpi.is-kpi-emerald {
  border-top-color: #5ee2ab;
  background: linear-gradient(180deg, #16241f 0%, #131e1a 100%);
}

html[data-theme="dark"] .bd-rep-kpi.is-kpi-indigo {
  border-top-color: #8f96f7;
  background: linear-gradient(180deg, #1c1e2e 0%, #171926 100%);
}

html[data-theme="dark"] .bd-rep-card {
  background: #1b1f26;
  border-color: var(--bd-line-strong);
}

html[data-theme="dark"] .bd-rep-meter,
html[data-theme="dark"] .bd-rep-mini-meter {
  background: #282e38;
}

html[data-theme="dark"] .bd-rep-svg-host {
  background: #141921;
  border-color: var(--bd-line-strong);
}

html[data-theme="dark"] .bd-rep-chip {
  background: #153326;
  border-color: rgb(94 226 171 / 0.42);
  color: #98f0c8;
}

html[data-theme="dark"] .bd-rep-scope-pill {
  background: #152b30;
  border-color: rgb(91 200 214 / 0.42);
  color: #9fe8f7;
}

html[data-theme="dark"] .bd-chart-grid {
  stroke: rgba(235, 228, 214, 0.12);
}

html[data-theme="dark"] .bd-chart-axis {
  stroke: rgba(235, 228, 214, 0.32);
}

html[data-theme="dark"] .bd-chart-pill {
  fill: #1c2430;
  stroke: rgb(94 226 171 / 0.48);
}

html[data-theme="dark"] .bd-chart-pill.is-current {
  fill: #2d2414;
  stroke: #f0b43a;
}

html[data-theme="dark"] .bd-chart-label {
  fill: #d8d2c6;
}

html[data-theme="dark"] .bd-chart-sublabel {
  fill: #a8b0bc;
}

html[data-theme="dark"] .bd-chart-val {
  fill: #8ff0c3;
}

html[data-theme="dark"] .bd-chart-val.is-current {
  fill: #ffd578;
}

html[data-theme="dark"] .bd-rep-kpi {
  background: #1b1f26;
  border-color: var(--bd-line-strong);
}

html[data-theme="dark"] .bd-rep-table th {
  background: #212731;
  color: #cdd4de;
}

html[data-theme="dark"] .bd-rep-table td {
  color: var(--bd-ink);
  border-bottom-color: var(--bd-line);
}

dialog.bd-dialog:modal {
  overscroll-behavior: contain;
}

dialog.bd-dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
}

.bd-stage-slp-strip {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.38rem 0.72rem;
  border-bottom: 1px solid var(--bd-line);
  background: var(--bd-panel);
  font-size: 0.8rem;
}

.bd-stage-slp-strip[hidden] {
  display: none;
}

.bd-stage-slp-card {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
  font-weight: 700;
}

.bd-stage-slp-tag {
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  background: rgb(30 110 122 / 0.16);
  color: var(--bd-teal-deep);
}

html[data-theme="dark"] .bd-stage-slp-tag {
  background: rgb(82 190 214 / 0.2);
  color: #9fe8f7;
}

.bd-stage-speak-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-inline-size: 2.2rem;
  min-block-size: 1.75rem;
  padding: 0.14rem 0.56rem;
  border-radius: 999px;
  border: 1.5px solid var(--bd-teal-deep);
  background: #e6f2f4;
  color: var(--bd-teal-deep);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 760;
  cursor: pointer;
}

.bd-stage-speak-btn[data-speaking="true"] {
  background: var(--bd-teal);
  border-color: var(--bd-teal-deep);
  color: #ffffff;
}

@media (hover: hover) {
  .bd-stage-speak-btn:hover:not([data-speaking="true"]) {
    background: #d3eaee;
  }
}

html[data-theme="dark"] .bd-stage-speak-btn {
  background: #172b30;
  border-color: #4ab6c4;
  color: #a9ecf3;
}

html[data-theme="dark"] .bd-stage-speak-btn[data-speaking="true"] {
  background: #4ab6c4;
  border-color: #8ee6f2;
  color: #0b161a;
}

.bd-stage-team-ribbon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.34rem;
}

.bd-stage-team-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.16rem 0.56rem;
  border-radius: 999px;
  font-weight: 740;
  font-size: 0.73rem;
  background: #fff2cf;
  color: #5c3a04;
  border: 1.5px solid #d69d2c;
}

.bd-stage-team-pill.is-color-amber {
  background: #fff2cf;
  color: #5c3a04;
  border-color: #d69d2c;
}

.bd-stage-team-pill.is-color-teal {
  background: #e1f3f5;
  color: #114c56;
  border-color: #2b9fa6;
}

.bd-stage-team-pill.is-color-coral {
  background: #fde8e3;
  color: #6b1d0a;
  border-color: #d45b68;
}

.bd-stage-team-pill.is-color-violet {
  background: #efeafd;
  color: #3b2478;
  border-color: #7d62d9;
}

.bd-stage-team-pill.is-active {
  border-width: 2px;
  border-color: var(--bd-ink);
  font-weight: 820;
  outline: 2px solid rgb(214 157 44 / 0.35);
  outline-offset: 1px;
}

.bd-team-shield,
.bd-team-encore {
  padding: 0.06rem 0.34rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  background: rgb(30 110 122 / 0.16);
  color: var(--bd-teal-deep);
}

.bd-team-encore {
  background: rgb(156 98 16 / 0.18);
  color: #6b4004;
}

html[data-theme="dark"] .bd-stage-team-pill,
html[data-theme="dark"] .bd-stage-team-pill.is-color-amber {
  background: #2f2411;
  color: #ffd983;
  border-color: rgb(246 196 83 / 0.55);
}

html[data-theme="dark"] .bd-stage-team-pill.is-color-teal {
  background: #152d33;
  color: #a6edf5;
  border-color: rgb(74 182 196 / 0.55);
}

html[data-theme="dark"] .bd-stage-team-pill.is-color-coral {
  background: #361c1a;
  color: #ffc2b8;
  border-color: rgb(240 123 99 / 0.55);
}

html[data-theme="dark"] .bd-stage-team-pill.is-color-violet {
  background: #251d3d;
  color: #d6c8ff;
  border-color: rgb(163 140 245 / 0.55);
}

html[data-theme="dark"] .bd-stage-team-pill.is-active {
  border-color: #f4f1ea;
  outline-color: rgb(246 196 83 / 0.45);
}

html[data-theme="dark"] .bd-team-shield {
  background: rgb(82 190 214 / 0.24);
  color: #a6edf5;
}

html[data-theme="dark"] .bd-team-encore {
  background: rgb(246 196 83 / 0.22);
  color: #ffd983;
}

.bd-stage-timer-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.54rem;
  border-radius: 999px;
  border: 1.5px solid #b57b10;
  background: #fff5d6;
  color: #633c00;
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

html[data-theme="dark"] .bd-stage-timer-pill {
  background: #2f2410;
  border-color: #f6c453;
  color: #ffd983;
}

.bd-mood-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.65rem;
  padding: 0.54rem 0.72rem;
  border-radius: 11px;
  border: 2px solid var(--bd-coral);
  background: #fcebe7;
  color: #5c190c;
  font-size: 0.78rem;
}

.bd-mood-alert[data-mood="hint"] {
  border-color: #b5720c;
  background: #fff4d6;
  color: #4d2e00;
}

.bd-mood-alert-text {
  flex: 1 1 9rem;
  font-weight: 760;
  line-height: 1.35;
}

.bd-mood-alert-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.bd-mood-alert-btn {
  min-block-size: 2rem;
  padding: 0.2rem 0.62rem;
  border-radius: 8px;
  border: 1.5px solid rgb(42 32 20 / 0.35);
  background: #ffffff;
  color: #1e1915;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 740;
  cursor: pointer;
}

.bd-mood-alert-btn.is-action {
  background: #a63420;
  border-color: #7d2111;
  color: #ffffff;
}

.bd-mood-alert[data-mood="hint"] .bd-mood-alert-btn.is-action {
  background: #9c6210;
  border-color: #6b4004;
  color: #ffffff;
}

@media (hover: hover) {
  .bd-mood-alert-btn:not(.is-action):hover {
    background: #f5ebd9;
  }
  .bd-mood-alert-btn.is-action:hover {
    filter: brightness(0.94);
  }
}

html[data-theme="dark"] .bd-mood-alert {
  border-color: #f07b63;
  background: #331b17;
  color: #ffd4cc;
}

html[data-theme="dark"] .bd-mood-alert[data-mood="hint"] {
  border-color: #f6c453;
  background: #2d2210;
  color: #ffe5a3;
}

html[data-theme="dark"] .bd-mood-alert-btn {
  background: #232830;
  border-color: rgb(244 241 234 / 0.34);
  color: #f4f1ea;
}

html[data-theme="dark"] .bd-mood-alert-btn.is-action {
  background: #ce4d32;
  border-color: #f0896d;
  color: #ffffff;
}

html[data-theme="dark"] .bd-mood-alert[data-mood="hint"] .bd-mood-alert-btn.is-action {
  background: #d99316;
  border-color: #f6c453;
  color: #1e1400;
}

.bd-shortcut-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.32rem 0.55rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--bd-line);
  font-size: 0.68rem;
  color: var(--bd-ink-3);
}

.bd-shortcut-item {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
}

.bd-kbd {
  display: inline-block;
  padding: 0.05rem 0.34rem;
  border-radius: 5px;
  border: 1px solid var(--bd-line-strong);
  background: var(--bd-card);
  color: var(--bd-ink-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.64rem;
  font-weight: 700;
}

@media (max-width: 62rem) {
  .bd-app[data-demo-role="child"] .bd-stage-slp-strip,
  .bd-app[data-preview-child="true"] .bd-stage-slp-strip {
    padding: 0.2rem 0.5rem;
    gap: 0.24rem 0.38rem;
    font-size: 0.7rem;
  }
  .bd-app[data-demo-role="child"] .bd-stage-team-pill,
  .bd-app[data-preview-child="true"] .bd-stage-team-pill {
    padding: 0.1rem 0.42rem;
    font-size: 0.64rem;
  }
}

@media (forced-colors: active) {
  .bd-mood-alert,
  .bd-stage-team-pill.is-active,
  .bd-stage-speak-btn {
    border-color: Highlight;
  }
}

.bd-stage-powerup-host {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 42;
}

.bd-stage-powerup-host > * {
  pointer-events: auto;
}

@media (pointer: coarse) {
  .bd-tb-btn,
  .bd-deck-tab,
  .bd-chip-btn,
  .bd-kid-mood-btn,
  .bd-mood-alert-btn,
  .bd-clinician-deck [data-cd-save-custom] {
    min-block-size: 44px;
  }
  .bd-stage-speak-btn::after {
    content: "";
    position: absolute;
    inset: -6px;
  }
}
