:root {
  color-scheme: light;
  --paper: #f7f6f3;
  --surface: #fffefa;
  --text: #252430;
  --ink: #191928;
  --subtle: #686673;
  --line: #dcdad7;
  --edge: #c9c7cb;
  --purple: #66529b;
  --purple-dark: #4d3a7e;
  --purple-tint: #f3effa;
  --lilac: #d8c9fc;
  --radius: 13px;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  font-synthesis: none;
  background: var(--paper);
  color: var(--text);
}
*, *::after, *::before { box-sizing: border-box; }
body { margin: 0; min-width: 290px; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, select, input, textarea { color: var(--text); }
button {
  display: inline-flex; align-items: center; justify-content: center; gap: .48rem;
  min-height: 2.46rem; padding: .46rem .85rem; line-height: 1.2;
  font-size: .88rem; font-weight: 610; border: 1px solid var(--edge);
  border-radius: 7px; background: var(--surface); cursor: pointer;
  transition: background .13s ease, color .13s ease, border-color .13s ease;
}
button:hover:not(:disabled) { background: #f3f1f0; border-color: #a9a5aa; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { cursor: default; opacity: .49; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
canvas:focus-visible { outline: 3px solid #a684e5; outline-offset: 3px; }
a { color: var(--purple-dark); }
label { font-weight: 580; }
input, select, textarea {
  min-height: 2.6rem; padding: .5rem .71rem; font-size: .94rem;
  border: 1px solid var(--edge); border-radius: 7px; background-color: #fffefa;
}
input[readonly], input:disabled, select:disabled { background-color: #eeedea; color: var(--subtle); }
input:disabled,select:disabled { cursor: not-allowed; }
input::placeholder { color: #797582; opacity: 1; }
select {
  appearance: none; cursor: pointer; padding-right: 1.95rem;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m1.5 1.5 4.5 4.5 4.5-4.5' fill='none' stroke='%23676570' stroke-width='1.65' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right .72rem center; background-size: .67rem; background-repeat: no-repeat;
}
input[type=range], input[type=checkbox] { min-height: auto; padding: 0; }
input[type=range] { touch-action: pan-y; cursor: pointer; }
input[type=checkbox] { accent-color: var(--purple); }
h1, h2, h3, p { margin: 0; }
h1,h2,h3 { font-family: "Inter","Segoe UI",system-ui,sans-serif; }
h2 { font-size: 1.2rem; letter-spacing: -.035em; line-height: 1.15; font-weight: 700; }
.icon { width: 1.12rem; height: 1.12rem; flex: none; display: block; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.symbol-store { position: absolute; height: 0; width: 0; overflow: hidden; pointer-events: none; }
.skip-link { z-index: 10; position: fixed; left: .7rem; top: -5rem; background: white; padding: .6rem; }
.skip-link:focus { top: .7rem; }
.topbar { background: var(--ink); color: #faf7ff; }
.topbar-inner, .workspace { max-width: 1520px; width: min(100% - clamp(2rem,7vw,8rem), 1520px); margin-inline: auto; }
.topbar-inner { min-height: 3.75rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .59rem; color: #fffdfa; font-size: 1.12rem; font-weight: 780; letter-spacing: -.054em; text-decoration: none; white-space: nowrap; }
.brand-accent { color: #dbcff6; }
.brand-icon { width: 1.64rem; aspect-ratio: 1; color: var(--lilac); display: grid; place-items: center; }
.brand-icon svg { width: 100%; height: 100%; }
.file-actions { display: flex; align-items: center; gap: .38rem; }
.file-actions button { min-height: 2.12rem; border: 1px solid transparent; background: transparent; color: #e6e1ee; }
.file-actions button:hover:not(:disabled) { background: #303040; color: white; border-color: transparent; }
.file-actions .save-action { background: var(--lilac); color: #251b3a; padding-inline: .87rem; margin-left: .24rem; gap: .43rem; }
.save-action .wide-only { margin-left: -.43rem; }
.file-actions .save-action:hover:not(:disabled) { background: #e7ddff; color: #21132f; }
.file-actions .icon { width: 1.02rem; height: 1.02rem; }
.workspace { padding: clamp(1.4rem,2.3vw,2.4rem) 0 3.5rem; }
.title-row, .field-grid, .section-heading, .button-row, .panel-title, .dialog-actions, .catalogue-filters { display: flex; align-items: center; }
.title-row { justify-content: space-between; gap: 1rem; margin-bottom: clamp(1.05rem,1.9vw,1.8rem); }
h1 { display: flex; align-items: flex-start; gap: .43rem; color: #23212c; font-weight: 720; letter-spacing: -.065em; font-size: clamp(2.45rem,3.8vw,3.9rem); line-height: 1; }
.title-spark { color: var(--purple); transform: rotate(14deg); width: .33em; height: .33em; margin-top: .07em; }
.title-spark svg { width: 100%; height: 100%; display: block; }
.project-name { display: flex; align-items: center; gap: .8rem; font-size: .81rem; color: var(--subtle); white-space: nowrap; }
.project-field { position: relative; display: inline-flex; }
.project-field input { width: clamp(9rem,15vw,15rem); padding-right: 2rem; min-height: 2.38rem; color: var(--text); font-size: .91rem; }
.project-field .icon { width: .85rem; height: .85rem; position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); pointer-events: none; color: #777381; }
.hero-grid { display: grid; grid-template-columns: minmax(0,2.4fr) minmax(280px,.9fr); gap: clamp(.9rem,1.55vw,1.55rem); align-items: stretch; }
#theatre, .setup-card { min-width: 0; border-radius: var(--radius); }
#theatre { display: flex; flex-direction: column; color: #f6f6fb; background: #161724; overflow: hidden; position: relative; }
.stage-viewport { position: relative; isolation: isolate; flex: 1 0 auto; min-height: clamp(255px,23.4vw,378px); background: linear-gradient(#101627,#262a44 78%,#11191d); overflow: hidden; }
#sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-caption, .stage-expand, .stage-label { position: absolute; z-index: 1; }
.stage-caption { top: .86rem; left: 1rem; display: inline-flex; align-items: center; gap: .42rem; color: #fffbff; border-radius: 6px; padding: .22rem .36rem; text-shadow: 0 1px 7px #000; background: #11142188; pointer-events: none; }
.stage-caption .icon { width: 1.08rem; }
.stage-caption h2 { font-size: .87rem; font-weight: 590; letter-spacing: .005em; }
.stage-expand { top: .72rem; right: .8rem; width: 2.15rem; height: 2.15rem; min-height: 2.15rem; border: 1px solid #ada7c35c; background: #141626b8; color: #fbf9ff; padding: 0; }
.stage-expand:hover:not(:disabled) { background: #373549; border-color: #b4a8c8; }
.stage-label { bottom: .7rem; left: 1.12rem; color: #f6effa; font-size: .77rem; line-height: 1.35; font-weight: 540; text-shadow: 0 1px 5px #000; background: #151523b5; border-radius: 4px; padding: .18rem .4rem; pointer-events: none; }
.stage-label:empty { display: none; }
.transport { padding: .76rem 1.1rem .66rem; background: #1b1c2b; }
.transport-line, .distance-line { display: flex; align-items: center; min-width: 0; gap: .78rem; }
.transport .play-button { flex: none; min-height: 2.22rem; min-width: 4.4rem; background: #e8e0fc; color: #292039; border: 0; padding: .4rem .75rem; font-size: .82rem; }
.transport .play-button:hover:not(:disabled) { background: #fff6ff; }
.play-button::before { content: ""; display: inline-block; width: 0; height: 0; border: solid transparent; border-width: .28rem 0 .28rem .47rem; border-left-color: currentColor; }
.play-button[aria-pressed=true]::before, .play-button.playing::before { width: .47rem; height: .58rem; border: none; background: linear-gradient(to right,currentColor 38%,transparent 38% 62%,currentColor 62%); }
.clock, #distanceValue { flex: none; font-family: "IBM Plex Mono","SFMono-Regular",Consolas,monospace; font-variant-numeric: tabular-nums; font-size: .83rem; }
.clock { min-inline-size: 7ch; text-align: right; }
.muted-clock { color: #b8b7c7; }
.transport input[type=range] { height: 1.5rem; width: 100%; min-width: 2.4rem; margin: 0; flex: 1; border: 0; border-radius: 4px; background: transparent; accent-color: #c5b3f2; }
.distance-line { margin: .55rem 0 0; border-top: 1px solid #353545; padding-top: .46rem; }
.distance-line label { display: inline-flex; align-items: center; gap: .4rem; color: #dbd9e8; font-size: .78rem; font-weight: 510; white-space: nowrap; }
.distance-line .icon { width: 1.05rem; height: 1.05rem; color: #c3bcd7; }
.distance-line #distance { max-width: 14rem; }
#distanceValue { color: #dbd2eb; min-width: 4.0rem; font-size: .76rem; }
.distance-line .reports-switch { margin-left: auto; gap: .38rem; }
.reports-switch input { width: .93rem; height:.93rem; margin: 0; accent-color: #c8b6ef; }
#theatre:fullscreen { width: 100%; height: 100%; max-height: 100%; border-radius: 0; background: #121321; }
#theatre:fullscreen .stage-viewport { flex: 1 1 0; height: auto; min-height: 0; }
#theatre:fullscreen .transport { padding: 1rem clamp(1rem,4vw,4rem); }
.setup-card { display: flex; position: relative; flex-direction: column; border: 1px solid var(--line); padding: clamp(1rem,1.65vw,1.75rem); background: var(--surface); }
.section-heading { gap: .55rem; margin-bottom: 1.3rem; }
.setup-icon { width: 2.1rem; height: 2.1rem; display: grid; place-items: center; background: #eee9f6; color: var(--purple-dark); border-radius: 8px; }
.section-heading h2 { font-size: 1.26rem; }
.setup-forms { width: 100%; display: grid; align-content: start; gap: 1rem; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: .65rem; }
.timing-fields { grid-template-columns: 1.2fr .8fr; }
.field { display: block; width: 100%; min-width: 0; font-size: .83rem; font-weight: 635; line-height: 1.3; }
.field > input, .field > select { width: 100%; margin-top: .39rem; font-weight: 465; }
.unit-label { font-size: .72rem; font-weight: 480; color: var(--subtle); }
.music-fields { display: grid; gap: .25rem; }
input[type=file] { font-size: .8rem; padding: .37rem; display: block; min-height: 2.4rem; max-width: 100%; }
input::file-selector-button { color: var(--purple-dark); background: var(--purple-tint); border: 0; border-radius: 4px; margin-right: .38rem; padding: .3rem .45rem; font: inherit; cursor: pointer; }
#audioStatus { font-size: .78rem; color: var(--subtle); overflow-wrap: anywhere; }
.stock-button { width: 100%; justify-content: flex-start; gap: .54rem; color: var(--purple-dark); background: #f8f5fc; border-color: #ded6ed; margin-top: .2rem; }
.stock-plus { margin-left: auto; width: .97rem; }
.generate-group { display: grid; grid-template-columns: 1fr auto; align-items: stretch; gap: .45rem; padding-top: 1rem; margin-top: auto; }
.primary, .accent-outline, .undo-button { border-color: #cbbfe0; color: var(--purple-dark); }
.primary { min-height: 2.58rem; background: var(--purple); color: #fff; border-color: var(--purple); }
button.primary:hover:not(:disabled) { background: var(--purple-dark); border-color: var(--purple-dark); }
.accent-outline { background: var(--purple-tint); }
button.accent-outline:hover:not(:disabled), button.stock-button:hover:not(:disabled) { background: #eae2f5; border-color: #ab9ac9; }
.undo-button { padding: .45rem .62rem; background: #faf9f7; color: var(--subtle); border-color: var(--line); }
.panel-tabs { display: flex; gap: .5rem; align-items: stretch; margin-top: clamp(1.1rem,2vw,1.95rem); border-bottom: 1px solid var(--line); }
.panel-tabs button { display: inline-flex; position: relative; justify-content: center; padding: .7rem 1.02rem .87rem; min-height: 2.7rem; color: var(--subtle); background: transparent; border: none; border-radius: 5px 5px 0 0; }
.panel-tabs button:first-child { margin-left: -.25rem; }
.panel-tabs button:hover:not(:disabled) { background: #f0eeef; color: var(--text); }
.panel-tabs button[aria-selected=true], .panel-tabs button.active { color: var(--purple-dark); }
.panel-tabs button[aria-selected=true]::after, .panel-tabs button.active::after { content: ""; position: absolute; inset: auto .34rem -1px; height: 3px; background: var(--purple); border-radius: 2px; }
.workspace-panel { padding-top: 1.05rem; min-width: 0; }
.panel-bar { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .85rem; }
.panel-title { gap: .65rem; flex-wrap: wrap; }
.panel-meta { color: var(--subtle); font-size: .8rem; line-height: 1.4; }
.button-row,.dialog-actions,.catalogue-filters { gap: .5rem; flex-wrap: wrap; }
.button-row button { min-height: 2.25rem; }
.timeline-frame { width: 100%; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
#timeline { width: 100%; height: 168px; display: block; touch-action: pan-y; }
.event-list,.inventory-list { overflow-x: auto; }
.catalogue-filters input, .catalogue-filters select { min-height: 2.33rem; font-size: .89rem; }
.search-wrap { display: flex; position: relative; }
.search-wrap .icon { position: absolute; pointer-events: none; left: .65rem; top: 50%; transform: translateY(-50%); color: var(--subtle); width: .99rem; height: .99rem; }
.search-wrap input { width: 15rem; padding-left: 2.05rem; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(16rem,100%),1fr)); gap: .85rem; }
.catalog-art { display: block; background: #1b2031; width: 100%; }
.demo-button { margin-top: .78rem; font-size: .82rem; color: var(--purple-dark); min-height: 2.12rem; }
#toast { position: fixed; z-index: 16; bottom: 1rem; left: 50%; transform: translateX(-50%); pointer-events: none; color: #fff; background: #232232; border: 1px solid #5e596b; border-radius: 8px; padding: .69rem 1rem; max-width: min(34rem,calc(100% - 2rem)); width:max-content; font-size:.9rem; box-shadow: 0 5px 24px #1f1b2a30; }
#toast:empty { display: none; }
#editor { border: 1px solid #d0cad7; border-radius: 12px; padding: 0; width: min(95vw,28rem); max-height: min(90svh,50rem); color: var(--text); background: var(--surface); box-shadow: 0 1.4rem 5rem #17132244; }
#editor::backdrop { background: #17142380; backdrop-filter: blur(3px); }
#editor form { padding: 1.4rem; }
#editorFields { display: grid; gap: .75rem; margin: 1.1rem 0 1.35rem; }
#editorFields label { display: block; min-width: 0; font-size: .86rem; line-height: 1.4; }
#editorFields label input:not([type=checkbox]), #editorFields label select, #editorFields label textarea { display: block; margin-top: .26rem; width: 100%; }
#editorFields p { line-height: 1.5; }
.dialog-actions { justify-content: flex-end; }
@media (min-width: 1450px) {
  .setup-forms { gap: 1.25rem; }
  .transport { padding: .86rem 1.3rem .75rem; }
}
@media (max-width: 925px) {
  .topbar-inner,.workspace { width: calc(100% - 2.4rem); }
  .hero-grid { grid-template-columns: minmax(0,1.75fr) minmax(258px,1fr); }
  .transport { padding-inline: .78rem; }
  .distance-line { flex-wrap: wrap; gap: .3rem .45rem; }
  .distance-line #distance { max-width: 12rem; }
  .distance-line .reports-switch { margin-left: 0; }
  .section-heading { margin-bottom: 1.05rem; }
}
@media (max-width: 720px) {
  .hero-grid { grid-template-columns: 1fr; }
  #theatre { min-height: 0; }
  .stage-viewport { flex: none; min-height: 0; height: clamp(238px,49vw,350px); }
  .setup-card { padding: 1rem; }
  .section-heading { margin-bottom: .9rem; }
  .setup-forms { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .85rem; }
  .setup-forms .music-fields { grid-column: 1/-1; grid-row: 2; }
  .timing-fields { grid-template-columns: 1.13fr .87fr; }
  .stock-button { grid-column: 1/-1; width: max-content; }
  .stock-plus { display: none; }
  .generate-group { position: static; margin-top:.65rem; padding-top:0; }
  .title-row { flex-wrap: wrap; row-gap: .8rem; }
  .project-name { gap: .55rem; }
  .project-field input { width: 11.5rem; }
  .catalogue-filters { width: 100%; }
  .catalogue-filters .search-wrap { flex: 1; }
  .catalogue-filters input { width: 100%; min-width: 4rem; }
}
@media (max-width: 510px) {
  .workspace,.topbar-inner { width: calc(100% - 1.45rem); }
  .topbar-inner { min-height: 3.3rem; gap: .3rem; }
  .brand { font-size: .99rem; gap: .3rem; }
  .brand-icon { width: 1.42rem; }
  .file-actions { gap: .04rem; }
  .file-actions button { padding-inline: .43rem; font-size:.81rem; min-height:2.3rem; gap:.28rem; }
  .file-actions .save-action { padding-inline: .57rem; margin-left:.1rem; }
  .file-actions .wide-only { display: none; }
  .file-actions .icon { width: .9rem; height: .9rem; }
  .title-row { display: grid; margin-bottom: .93rem; gap: .65rem; }
  .project-name { font-size: .8rem; }
  .project-field input { min-height: 2rem; padding-block: .26rem; font-size: .86rem; }
  .hero-grid { gap: .85rem; }
  .transport-line { gap: .45rem; }
  .distance-line { gap: .29rem .45rem; }
  .distance-line .reports-switch { margin-left:auto; }
  .distance-line #distance { max-width: 7rem; }
  #distanceValue { min-width: auto; }
  .distance-line label { font-size: .74rem; }
  .distance-line .icon { display:none; }
  .setup-forms { grid-template-columns: 1fr; gap: .68rem; }
  .setup-forms .music-fields { grid-column: auto; grid-row: auto; }
  .setup-forms > .field-grid { column-gap: .65rem; }
  .stock-button { width: 100%; }
  .stock-plus { display:block; }
  .field-grid, .timing-fields { grid-template-columns: 1fr 1fr; }
  .panel-tabs { gap: 0; justify-content: space-between; }
  .panel-tabs button { gap: .34rem; padding-inline: .45rem; font-size: .85rem; }
  .panel-tabs button:first-child { margin-left: 0; }
  .panel-tabs .icon { width: .97rem; height:.97rem; }
  .panel-title { gap:.4rem; }
  .panel-bar { gap:.58rem; }
  .button-row button { min-height: 2.3rem; font-size: .81rem; padding-inline:.61rem; }
  .panel-bar .button-row { gap:.4rem; }
  button, input, select { touch-action: manipulation; }
  input[type=text], input[type=number], input[type=search], select { font-size: 1rem; }
}
@media (max-width:460px) {
  .panel-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
  .panel-tabs button { padding-inline:.18rem; font-size:.8rem; min-height:2.8rem; }
  .panel-tabs .icon { display:none; }
}
@media (max-width:345px) {
  .file-actions button:not(.save-action) .icon, .brand-icon { display:none; }
  .brand { font-size:1rem; }
  .distance-line .reports-switch { margin-left:0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration:0s !important; scroll-behavior:auto !important; }
}
@media print {
  body,.workspace { background: white; color: #111; }
  .workspace { width: 100%; max-width: none; padding:0; }
  .topbar,.skip-link,.hero-grid,.panel-tabs,.panel-bar button,.demo-button,.title-spark,
  #layoutPanel,#cataloguePanel,#inventoryPanel,#toast,dialog,.project-field .icon { display:none !important; }
  #timelinePanel { display:block !important; }
  .workspace { font: 11pt sans-serif; }
  .title-row { margin-bottom: 1rem; align-items: baseline; }
  h1 { font-size: 22pt; }
  .project-name input { border:0; padding:0; font-size:11pt; width:auto; }
  .timeline-frame { break-inside: avoid; }
}
/* Product cards and editable project rows */
.fs-card { min-width: 0; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.fs-card .catalog-art { flex: none; width: 100%; height: auto; aspect-ratio: 30 / 11; }
.fs-card-info { flex: 1; display: flex; align-items: flex-start; flex-direction: column; padding: .85rem .95rem; gap: .38rem; }
.fs-card h3 { font-size: 1.08rem; line-height: 1.25; letter-spacing: -.025em; font-weight: 670; }
.fs-meta,.fs-note,.field-note,.fs-stock { color: var(--subtle); font-size: .82rem; line-height: 1.43; }
.fs-note,.field-note { line-height: 1.5; }
.fs-card-info > .fs-meta:first-child { color: var(--purple-dark); font-weight: 570; }
.fs-card-foot { align-self: stretch; display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: auto; padding-top: .65rem; }
.fs-source { font-size: .78rem; text-decoration-color: #b2a2ca; text-underline-offset: 3px; }
.fs-small,.fs-text,.fs-time { min-height: 2rem; padding: .33rem .68rem; font-size: .8rem; }
.fs-small { background: #f6f2fa; border-color: #d6cbe3; color: var(--purple-dark); }
button.fs-small:hover:not(:disabled) { background: #eae2f5; border-color: #b29fc7; }
.fs-text { color: var(--subtle); border-color: transparent; background: transparent; }
.fs-actions { display: flex; align-items: center; justify-content: flex-start; gap: .25rem; }
.fs-time { justify-self: start; color: var(--purple-dark); font-family: "IBM Plex Mono",Consolas,monospace; font-weight: 550; border-color: transparent; background: transparent; font-variant-numeric: tabular-nums; }
.fs-row,.fs-event { display: grid; gap: .55rem .8rem; align-items: center; background: var(--surface); border-bottom: 1px solid var(--line); padding: .55rem .8rem; }
.fs-row { grid-template-columns: minmax(12rem,1.5fr) minmax(7rem,.7fr) minmax(8rem,1fr) auto auto; }
.fs-event { grid-template-columns: minmax(4.4rem,.45fr) minmax(9rem,1.8fr) minmax(6rem,1fr) minmax(8rem,.7fr); }
.fs-row-name { min-width: 0; display: flex; align-items: baseline; gap: .52rem; }
.fs-row strong,.fs-event strong { font-weight: 620; font-size: .89rem; line-height: 1.35; overflow-wrap: anywhere; }
.colour-key { display: inline-block; flex: 0 0 auto; align-self: center; height: .76rem; width: .76rem; border-radius: 50%; border: 1px solid #29213338; }
.event-list:not(:empty), .inventory-list:not(:empty) { border-radius: 8px; }
.event-list { margin-top: .65rem; }
.timeline-notes { margin-top:1.2rem; }
.timeline-notes h3 { margin:0 0 .42rem; font-size:1rem; }
.timeline-notes ol { list-style:none; margin:0; padding:0; }
.timeline-notes li { display:grid; grid-template-columns:max-content minmax(0,1fr); gap:.75rem; align-items:baseline; border-bottom:1px solid var(--line); padding:.25rem .5rem; }
.timeline-notes li span, .printed-timeline-notes td { white-space:pre-wrap; overflow-wrap:anywhere; }
.timeline-notes .button-row { margin-top:.6rem; font-size:.85rem; }
.fs-event.fs-heading { background: #eeecee; color: #6b6671; font-size: .77rem; font-weight: 620; }
.fs-event.selected { background: #f2edf8; box-shadow: inset 3px 0 var(--purple); }
.empty-note { font-size: .88rem; line-height: 1.5; color: var(--subtle); padding: .85rem 0 .1rem; }
.form-error { color:#a33332; font-size:.85rem; font-weight:560; }
.form-error:empty { display:none; }
@media(max-width:730px) {
  .fs-row { grid-template-columns: minmax(0,1.4fr) minmax(0,.9fr) auto auto; }
  .fs-row > .fs-meta { display:none; }
  .fs-event { grid-template-columns: 4rem minmax(8rem,1fr) minmax(4.5rem,.7fr) auto; gap:.35rem; padding:.47rem .55rem; }
}
@media(max-width:520px) {
  .fs-row,.fs-event { grid-template-columns:minmax(0,1fr) auto; column-gap:.45rem; padding:.61rem .65rem; }
  .fs-row>.fs-row-name { grid-column:1; grid-row:1; }
  .fs-row>.fs-stock { grid-column:1; grid-row:2; }
  .fs-row>button { justify-self:end; }
  .fs-row>.fs-small { grid-column:2; grid-row:1; }
  .fs-row>.fs-text { grid-column:2; grid-row:2; }
  .fs-event.fs-heading { display:none; }
  .fs-event > .fs-row-name { grid-column:1; grid-row:1; }
  .fs-event > .fs-meta { grid-column:1; grid-row:2; }
  .fs-event > .fs-time { grid-column:2; grid-row:1; justify-self:end; }
  .fs-event > .fs-actions { grid-column:2; grid-row:2; }
  .fs-row .fs-small,.fs-row .fs-text,.fs-actions button,.fs-time { min-height:2.1rem; }
}
@media print {
  .fs-actions, .fs-event.fs-heading > :last-child,.fs-row button { display:none !important; }
  .fs-event,.fs-event.fs-heading { grid-template-columns:.55fr 1.8fr 1fr; width:100%; break-inside:avoid; }
  .fs-time { color:black; padding:0; }
}
.fs-field { display:block; }
.fs-field input[type=color] { min-height:2.65rem; padding:.23rem; }
#printOutput { display:none; }
@media print {
  body:has(#printOutput:not(:empty)) > *:not(#printOutput):not(:has(#printOutput)) { display:none !important; }
  body:has(#printOutput:not(:empty)) *:has(> #printOutput) > *:not(#printOutput) { display:none !important; }
  body:has(#printOutput:not(:empty)) #printOutput { display:block !important; width:100%; }
  #printOutput { color:#111; background:#fff; font-family:"Segoe UI",sans-serif; }
  #printOutput h1 { color:#111; font-size:22pt; letter-spacing:-.035em; margin-bottom: .45rem; }
  #printOutput h2 { color:#281c3b; font-size:14pt; margin: .7rem 0 .25rem; }
  #printOutput p { font-size:10pt; line-height:1.5; }
  #printOutput table { border-collapse:collapse; margin-top:.5rem; font-size:9.5pt; width:100%; }
  #printOutput th, #printOutput td { text-align:left; vertical-align:top; border-bottom:1px solid #bbbbbf; padding:.28rem .32rem; }
  #printOutput th { border-block:1px solid #7a7484; }
  #printOutput tr { break-inside:avoid; }
}
#theatre.expanded-view {
  position: fixed; inset: 0; z-index: 50; width: 100%; height: 100%; max-height: 100%;
  border-radius: 0; background: #121321;
}
#theatre.expanded-view .stage-viewport { flex: 1 1 0; height: auto; min-height: 0; }
#theatre.expanded-view .transport { padding: 1rem clamp(1rem,4vw,4rem); }
.marker-tools { display:flex; flex-wrap:wrap; gap:.35rem; margin-top:.3rem; }
.marker-tools button { font-size:.81rem; min-height:2rem; padding:.24rem .5rem; }
