.demo-shell-label {
  display: inline-flex;
  flex: none;
  align-items: center;
  margin-inline-start: auto;
  padding: .23rem .48rem;
  border: 1px solid #daca9d;
  border-radius: .38rem;
  background: #f4ead0;
  color: #594718;
  font-size: .71rem;
  font-weight: 680;
  line-height: 1.25;
  white-space: nowrap;
}
.rehearsal { display: grid; gap: 1rem; min-width: 0; }
.rehearsal h2 { margin: 0; font-size: 1.14rem; letter-spacing: -.025em; }
.rehearsal-environment { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .7rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius, 12px); background: var(--selected); }
.rehearsal-environment > div { display: flex; align-items: flex-start; gap: .78rem; min-width: 0; }
.rehearsal-environment .icon { flex: none; inline-size: 1.22rem; block-size: 1.22rem; margin-block-start: .14rem; color: var(--brand); }
.rehearsal-environment p { margin: .2rem 0 0; color: var(--muted); font-size: .85rem; }
.rehearsal-workbench { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); align-items: start; gap: 1rem; }
.rehearsal-workbench > .panel, .rehearsal-results { min-width: 0; }
.rehearsal-versions > section { margin-block-start: 1.06rem; }
.rehearsal-versions h3 { margin: 0 0 .36rem; color: var(--muted); font-size: .76rem; font-weight: 650; }
.rehearsal-entries { display: grid; gap: .2rem; }
.rehearsal-edition { width: 100%; min-height: 57px; display: grid; grid-template-columns: 2.25rem minmax(0,1fr) auto; align-items: center; gap: .7rem; padding: .4rem .6rem; border: 1px solid transparent; border-radius: .55rem; background: none; color: var(--ink); text-align: start; }
.rehearsal-edition:hover { background: var(--canvas, #f6f5f1); }
.rehearsal-edition[aria-pressed="true"] { border-color: var(--line); background: var(--selected); }
.rehearsal-edition:active { background: #dfe5da; }
.rehearsal-edition:disabled { opacity:.65;cursor:default; }
.rehearsal-edition strong, .rehearsal-edition small { display: block; }
.rehearsal-edition small { margin-block-start: .13rem; color: var(--muted); font-size: .75rem; }
.rehearsal-entry-icon { display: grid; place-items: center; inline-size: 2.12rem; block-size: 2.12rem; border-radius: .5rem; background: var(--surface); color: var(--brand); }
.rehearsal-edition > .icon { color: var(--brand); inline-size: 1rem; block-size: 1rem; }
.rehearsal-scenario > .field { margin-block-start: .45rem; }
.rehearsal-description { min-height: 2.6em; margin: .15rem 0 1rem; color: var(--muted); font-size: .87rem; }
.rehearsal-facts { display: grid; gap: 0; margin: 1rem 0 0; }
.rehearsal-facts > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem .7rem; padding: .43rem 0; border-top: 1px solid var(--line); }
.rehearsal-facts dt { color: var(--muted); font-size: .79rem; }
.rehearsal-facts dd { margin: 0; font-size: .85rem; overflow-wrap: anywhere; }
.rehearsal-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.rehearsal-actions .btn, .rehearsal-note .btn { min-height: 44px; }
.rehearsal-reset-button { color:#854d3b; }
.rehearsal-reset-dialog { max-width:29rem; }
.rehearsal-reset-dialog-body { min-width:0; }
.rehearsal-reset-dialog-body > p { line-height:1.6; }
.rehearsal-reset-target { display:grid;gap:.25rem;padding:.6rem .72rem;background:var(--selected);border:1px solid var(--line);border-radius:.48rem;overflow-wrap:anywhere; }
.rehearsal-reset-target strong { font-weight:650; }
.rehearsal-reset-target span { color:var(--muted);font-size:.78rem; }
.rehearsal-reset-confirm.btn.primary { background:#7f4838;border-color:#7f4838;color:#fff; }
.rehearsal-reset-confirm.btn.primary:active { background:#653a2e;border-color:#653a2e; }
.rehearsal-reset-dialog .rehearsal-actions { justify-content:flex-end; }
.rehearsal-feedback { margin: .6rem 0 0; font-size: .83rem; }
.rehearsal-feedback:empty, .rehearsal-history:empty, .rehearsal [hidden] { display: none; }
.rehearsal-note { display: grid; grid-template-columns: minmax(8rem,.28fr) minmax(12rem,1fr) auto; align-items: end; gap: .6rem; }
.rehearsal-note-target { margin: .4rem 0 .6rem; color: var(--brand); font-size: .87rem; font-weight: 650; }
.rehearsal-note-target:empty { display: none; }
.rehearsal-note .field { margin: 0; }
.rehearsal-history { margin: .65rem 0 0; padding: 0; list-style: none; }
.rehearsal-history li { padding: .65rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.rehearsal-history p { margin: .2rem 0; white-space: pre-wrap; }
.rehearsal-history small { color: var(--muted); }
@media (max-width: 880px) {
  .rehearsal-workbench, .rehearsal-note { grid-template-columns: minmax(0, 1fr); }
  .rehearsal-note .btn { justify-self: start; }
}
@media (max-width: 460px) {
  .page-head:has(+ .rehearsal) { margin-block-end: 1rem; }
  .rehearsal { gap: .75rem; }
  .rehearsal-workbench { gap: .75rem; }
  .rehearsal-environment { position: relative; padding: .65rem .8rem; }
  .rehearsal-environment strong { display: block; padding-inline-end: 4.1rem; }
  .rehearsal-environment > .badge { position: absolute; inset-block-start: .65rem; inset-inline-end: .75rem; }
  .rehearsal-versions { padding-block: .7rem; }
  .rehearsal-versions > section { margin-block-start: .65rem; }
  .rehearsal-entries { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .27rem; }
  .rehearsal-versions section:last-child .rehearsal-entries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rehearsal-edition { display: flex; flex-direction: column; align-items: start; gap: .25rem; min-height: 70px; padding: .28rem .38rem; background: var(--canvas, #f6f5f1); }
  .rehearsal-edition strong { font-size: clamp(.71rem, 3.1vw, .82rem); }
  .rehearsal-edition small { font-size: .65rem; }
  .rehearsal-edition > .icon { display: none; }
  .rehearsal-entry-icon { inline-size: 1.75rem; block-size: 1.75rem; }
  .rehearsal-entry-icon .icon { inline-size: .9rem; block-size: .9rem; }
  .rehearsal-description { min-height: 0; margin-block-end: .65rem; }
  .rehearsal-reset-dialog .rehearsal-actions { justify-content:flex-start; }
  .demo-shell-label { margin-inline-start: .15rem; }
}
