@font-face {
  font-family: Inter;
  font-weight: 100 900;
  font-display: swap;
  src: url("./assets/inter.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-weight: 100 900;
  font-display: swap;
  src: url("./assets/cormorant.woff2") format("woff2");
}
* {
  box-sizing: border-box;
}
html {
  --bg: #0f1419;
  --fg: #f5efe6;
  --accent: #dc3c3c;
  --head: "Cormorant Garamond";
  --actionText: white;
  --panel: color-mix(in srgb, var(--fg) 72%, white);
  --line: color-mix(in srgb, var(--bg) 17%, var(--fg));
  --muted: color-mix(in srgb, var(--bg) 74%, var(--fg));
  --wash: color-mix(in srgb, var(--bg) 4%, var(--fg));
  background: var(--fg);
  color: var(--bg);
  font:
    100%/1.5 Inter,
    Arial,
    sans-serif;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
}
button,
select,
input,
textarea {
  font: inherit;
  color: inherit;
}
button,
summary,
select {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button {
  min-height: 44px;
  padding: 0.59rem 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--bg);
  cursor: pointer;
  font-size: 0.91rem;
  font-weight: 630;
  line-height: 1.25;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}
@media (hover: hover) {
  button:enabled:hover {
    box-shadow: inset 0 0 0 1px currentColor;
  }
}
button:enabled:active {
  filter: brightness(0.93);
}
button:disabled {
  opacity: 0.52;
  cursor: default;
}
:where(button, input, select, textarea, summary, a):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--fg);
}
button.primary,
.cell.current {
  background: var(--accent);
  border-color: transparent;
  color: var(--actionText);
}
body > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 0.72rem
    max(env(safe-area-inset-right), calc((100vw - 1300px) / 2), 4vw) 0.72rem
    max(env(safe-area-inset-left), calc((100vw - 1300px) / 2), 4vw);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font:
    700 2rem/0.95 var(--head),
    Georgia,
    serif;
  letter-spacing: -0.045em;
}
.mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.9rem;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 22%, color-mix(in srgb, var(--accent) 62%, white), var(--accent) 60%, color-mix(in srgb, var(--accent) 70%, black));
}
.mark > span {
  display: grid;
  place-items: center;
  width: 65%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fffaf0;
  color: #0f1419;
  font: 800 0.83rem/1 Inter, sans-serif;
  letter-spacing: 0;
}
nav {
  display: flex;
  gap: 0.15rem;
  padding: 3px;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 999px;
}
nav button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  min-height: 44px;
  padding-inline: 1.25rem;
}
nav .active {
  color: var(--fg);
  background: var(--bg);
}
main {
  width: min(92%, 1300px);
  margin: auto;
  padding: clamp(1rem, 2.75vw, 2.5rem) 0
    max(2.5rem, env(safe-area-inset-bottom));
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--head), Georgia, serif;
  line-height: 1.03;
  overflow-wrap: anywhere;
}
h1 {
  font-size: clamp(2.8rem, 5.1vw, 4.75rem);
  font-weight: 570;
  letter-spacing: -0.052em;
}
h2 {
  font-size: clamp(1.9rem, 2.65vw, 2.35rem);
  font-weight: 650;
  letter-spacing: -0.04em;
}
h3 {
  font-size: clamp(1.55rem, 2.15vw, 1.9rem);
  font-weight: 650;
  letter-spacing: -0.025em;
}
.pageTitle,
.panelTitle,
.row,
.ticketTop,
.ticketFoot,
.playback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  flex-wrap: wrap;
}
.pageTitle {
  margin-bottom: 1.3rem;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.79rem;
  font-weight: 720;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.pageTitle .kicker {
  margin-bottom: 0.3rem;
}
.pageTitle .kicker:before {
  content: "";
  height: 2px;
  width: 1.45rem;
  background: var(--accent);
}
.sub,
.quiet {
  color: var(--muted);
}
.sub {
  font-size: 0.91rem;
  line-height: 1.5;
}
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.32rem 0.66rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--wash);
  border: 1px solid var(--line);
}
.columns {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: clamp(1rem, 2.25vw, 2rem);
  align-items: start;
}
.columns > section,
.two > *,
.three > * {
  min-width: 0;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(1rem, 1.9vw, 1.6rem);
  margin-bottom: 1rem;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--bg) 3%, transparent);
}
.panelTitle {
  margin-bottom: 0.95rem;
}
.smallActions,
.pads,
.resumeBar,
.rehearseBar,
.recent,
.lastCalls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pads,
.resumeBar,
.rehearseBar,
.recent {
  margin-top: 0.8rem;
}

/* The drawn number sits on a record label. The grooves and sleeve are scalable, local artwork. */
.ticket {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--bg) 80%, var(--fg));
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--bg) 10%, transparent);
}
.ticket.rehearsal {
  outline: 2px dashed var(--accent);
  outline-offset: 2px;
}
.ticketTop,
.ticketFoot {
  position: relative;
  z-index: 1;
  padding: 0.75rem 1.15rem;
}
.ticketTop {
  border-bottom: 1px solid color-mix(in srgb, var(--fg) 20%, transparent);
  min-height: 48px;
}
.ticketTop > span:last-child {
  font-size: 0.92rem;
  font-weight: 620;
}
.ticketFoot {
  min-height: 48px;
  font-size: 0.85rem;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  border-top: 1px dashed color-mix(in srgb, var(--fg) 27%, transparent);
}
.lastCalls b {
  display: grid;
  place-items: center;
  min-width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--fg) 12%, var(--bg));
  font-size: 0.81rem;
}
.ballStage {
  --record-size: clamp(13rem, 23vw, 19.5rem);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(var(--record-size) + 1.15rem);
  display: grid;
  place-items: center;
  background: radial-gradient(
    ellipse at 45% 35%,
    color-mix(in srgb, var(--fg) 9%, var(--bg)),
    var(--bg) 72%
  );
}
.ballStage:before {
  content: "";
  grid-area: 1/1;
  z-index: -1;
  width: var(--record-size);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--fg) 23%, var(--bg));
  background:
    repeating-radial-gradient(
      circle,
      transparent 0 2px,
      color-mix(in srgb, var(--fg) 17%, transparent) 2.6px,
      transparent 3.6px
    ),
    conic-gradient(
      from 22deg,
      var(--bg),
      color-mix(in srgb, var(--fg) 22%, var(--bg)) 43deg,
      var(--bg) 78deg 165deg,
      color-mix(in srgb, var(--fg) 19%, var(--bg)) 225deg,
      var(--bg) 262deg
    );
  box-shadow: 0 9px 19px #0005;
}
.ballStage:after {
  content: "";
  position: absolute;
  inset: 0.8rem 1.15rem;
  pointer-events: none;
  background:
    linear-gradient(var(--fg), var(--fg)) top left/12px 1px,
    linear-gradient(var(--fg), var(--fg)) top left/1px 12px,
    linear-gradient(var(--fg), var(--fg)) bottom right/12px 1px,
    linear-gradient(var(--fg), var(--fg)) bottom right/1px 12px;
  background-repeat: no-repeat;
  opacity: 0.42;
}
.ball {
  grid-area: 1/1;
  display: grid;
  place-items: center;
  width: calc(var(--record-size) * 0.56);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  color: var(--actionText);
  outline: 1px solid color-mix(in srgb, var(--fg) 32%, transparent);
  outline-offset: 3px;
  font:
    730 clamp(3.75rem, 6.2vw, 5.25rem) / 1 Inter,
    Arial,
    sans-serif;
  letter-spacing: -0.06em;
  padding-right: 0.06em;
  font-variant-numeric: tabular-nums;
}
.is-empty .ball {
  font-family: Georgia, serif;
  font-weight: 400;
  letter-spacing: 0;
  padding: 0;
}
.reveal {
  animation: reveal 0.34s cubic-bezier(0.2, 0.75, 0.15, 1);
}
@keyframes reveal {
  from {
    transform: translateY(5px) scale(0.87);
    opacity: 0.3;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.controls {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 0.55rem;
  margin-top: 0.85rem;
}
.controls button {
  min-height: 50px;
}
.controls .draw {
  font-weight: 730;
  font-size: 1.04rem;
}
.controls .draw:enabled {
  box-shadow: 0 2px 4px color-mix(in srgb, var(--bg) 9%, transparent);
}
.controls .two {
  gap: 0.45rem;
}
.cuePad,
.cueRow strong,
.smallActions button,
.pads button {
  overflow-wrap: anywhere;
}
.playback {
  margin-top: 0.35rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  min-height: 36px;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}
#timeLeft {
  font-weight: 730;
}
.pads > button[data-act^="pad-"] {
  border-radius: 999px;
}
.board {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: clamp(2px, 0.33vw, 5px);
}
.cell {
  display: grid;
  place-items: center;
  min-height: 1.7rem;
  padding: 0.16rem 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--fg);
  font-size: clamp(0.85rem, 1.2vw, 1.02rem);
  font-weight: 570;
  font-variant-numeric: tabular-nums;
}
.called {
  background: var(--bg);
  color: var(--fg);
  border-color: var(--bg);
}
.cell.current {
  font-weight: 780;
  outline: 1px solid var(--bg);
}
.claim-board .cell {
  min-height: 44px;
}
.claim-picked {
  position: relative;
  outline: 2px solid var(--accent);
  outline-offset: -3px;
  font-weight: 800;
}
.claim-picked:after {
  content: "✓";
  position: absolute;
  top: 1px;
  right: 2px;
  font-size: 0.63rem;
  line-height: 1;
}
.claim-summary {
  margin: 0.85rem 0;
  padding: 0.7rem 0.85rem;
  background: var(--wash);
  border-radius: 8px;
}
details {
  border-top: 1px solid var(--line);
  margin-top: 0.9rem;
}
summary {
  cursor: pointer;
  padding: 0.75rem 0;
  min-height: 44px;
  font-weight: 650;
}
details[open] > .sub {
  margin-bottom: 0.65rem;
}
.field {
  display: grid;
  gap: 0.35rem;
  margin: 0.75rem 0;
  font-size: 0.91rem;
  font-weight: 630;
}
.field input,
.field select,
select,
input[type="number"],
input[type="text"],
input[type="search"],
input[type="time"],
textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: var(--fg);
  color: var(--bg);
  font-size: 1rem;
}
select {
  appearance: none;
  padding-right: 2rem !important;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    right 0.92rem center,
    right 0.66rem center;
  background-size: 0.27rem 0.27rem;
  background-repeat: no-repeat;
}
input[type="checkbox"] {
  accent-color: var(--accent);
}
.field input[type="color"] {
  padding: 2px;
}
input[type="file"] {
  max-width: 100%;
  overflow: hidden;
}
input[type="file"]::file-selector-button {
  font: inherit;
  margin-right: 0.5rem;
  padding: 0.24rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  color: var(--bg);
}
.two,
.three {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cueRow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border-top: 1px solid var(--line);
  padding: 0.55rem 0;
}
.cueRow strong {
  flex: 1;
  min-width: 0;
  font-weight: 620;
}
.cueID {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line);
  background: var(--wash);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
  font-weight: 670;
}
.countLine {
  margin-bottom: 0.75rem;
}
.rehearseBar {
  align-items: end;
}
.rehearseBar .field {
  margin: 0;
}
.rehearseBar input {
  max-width: 7rem;
}
.preview {
  padding: 1.4rem;
  border-radius: 13px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.6rem;
  text-align: center;
}
.preview strong {
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.logo {
  max-width: 110px;
  max-height: 40px;
  object-fit: contain;
}
.preview .logo {
  max-height: 60px;
}
.full {
  min-height: 54vh;
}
.full strong {
  font-size: clamp(3rem, 8.75vw, 8rem);
}
.audDetail {
  text-align: center;
}
dialog {
  width: min(680px, 94vw);
  max-width: 94vw;
  max-height: 90dvh;
  overflow: auto;
  overscroll-behavior: contain;
  margin: auto;
  padding: clamp(1.1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  color: var(--bg);
  box-shadow: 0 18px 80px #0005;
}
dialog::backdrop {
  background: rgb(6 11 18 / 72%);
}
dialog > button {
  margin-top: 1rem;
}
#dialogBody > p,
#numberLibrary h2,
#numberLibrary [data-summary],
#numberLibrary [data-message] {
  margin-block: 0.8rem;
}
#numberLibrary [data-list] {
  max-height: 48dvh;
  overflow: auto;
}
#notice {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--fg);
  border-radius: 12px;
  padding: 0.7rem 1.1rem;
  max-width: 90vw;
  width: max-content;
  z-index: 15;
}
.warning {
  font-weight: 650;
}
.wide {
  width: 100%;
}
.status {
  margin: 0.75rem 0;
  font-size: 0.9rem;
  min-height: 1.25rem;
}
footer {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}
@media (min-width: 761px) and (max-height: 820px) {
  main {
    padding-top: 0.9rem;
  }
  .pageTitle {
    margin-bottom: 0.9rem;
  }
  .pageTitle h1 {
    font-size: clamp(2.65rem, 4vw, 3.7rem);
  }
  .ballStage {
    --record-size: clamp(10.8rem, 25vh, 14rem);
  }
  .ball {
    font-size: clamp(3.25rem, 7vh, 4.5rem);
  }
}
@media (max-width: 900px) {
  main {
    width: 95%;
  }
  .panel {
    padding: 0.9rem;
  }
  .columns {
    gap: 0.85rem;
  }
  .controls button {
    padding-inline: 0.55rem;
  }
}
@media (max-width: 760px) {
  main {
    width: min(94%, 40rem);
  }
  .columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
  .ballStage {
    --record-size: clamp(11rem, 36vw, 15rem);
  }
  .ball {
    font-size: clamp(3rem, 10vw, 4.4rem);
  }
  .pageTitle {
    gap: 0.65rem;
  }
  .cell {
    min-height: 1.9rem;
  }
  .claim-board {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  body > header {
    padding: 0.45rem max(0.65rem, env(safe-area-inset-right)) 0.45rem
      max(0.65rem, env(safe-area-inset-left));
    gap: 0.4rem;
  }
  .brand {
    font-size: 1.65rem;
    gap: 0.35rem;
  }
  nav button {
    padding-inline: 0.73rem;
    font-size: 0.85rem;
  }
  .pageTitle {
    margin-bottom: 0.85rem;
  }
  .ticketTop,
  .ticketFoot {
    padding: 0.65rem 0.85rem;
  }
  .ballStage {
    min-height: calc(var(--record-size) + 0.65rem);
  }
  .smallActions,
  .pads {
    gap: 0.4rem;
  }
  .three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
  }
  .reveal {
    animation: none;
  }
}

/* Printed cards, the live set list, and accessible text shared by the two workspaces. */
.visuallyHidden,
.ticket-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.ticket-config {
  display: grid;
  gap: 0.25rem 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.5rem), 1fr));
}
.ticket-config .field {
  margin-bottom: 0.15rem;
}
.ticket-entry {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ticket-entry .field {
  flex: 1 1 12rem;
  margin: 0;
}
#ticket-code {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}
.ticket-results,
.runList {
  padding: 0;
  list-style: none;
  margin: 0;
}
.ticket-result {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem;
}
.ticket-result > strong {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}
.ticket-result > p {
  margin: 0.3rem 0;
  font-size: 0.9rem;
}
.ticket-result.verified {
  border-inline-start: 4px solid var(--bg);
}
.ticket-grid {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-top: 0.65rem;
}
.ticket-grid td {
  text-align: center;
  height: 2rem;
  border: 1px solid var(--line);
  font-weight: 640;
  font-variant-numeric: tabular-nums;
}
.ticket-grid .matched {
  background: var(--bg);
  color: var(--fg);
}
.ticket-grid .blank {
  background: var(--wash);
}
.ticket-grid .completed {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.runClock {
  display: grid;
  justify-items: end;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.runClock strong {
  font-size: 1.15rem;
}
.runMoment {
  border-inline-start: 3px solid var(--accent);
  padding: 0.25rem 0.85rem;
}
.runMoment .kicker {
  margin-bottom: 0.35rem;
}
.runActions {
  margin-top: 0.65rem;
}
.runList li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0.5rem 0;
  gap: 0.25rem 0.6rem;
}
.runList li + li {
  border-top: 1px solid var(--line);
}
.runEditorRow {
  min-width: 0;
  padding: 0.25rem 0.8rem 0.8rem;
  margin: 0.9rem 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.runEditorRow legend {
  padding: 0 0.35rem;
  font-weight: 670;
}
.prepStatus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--accent);
  border-radius: 0.65rem;
}
.prepStatus p {
  margin: 0.15rem 0 0;
}
.cueNote {
  margin: 0.75rem 0;
  font-size: 1rem;
  line-height: 1.4;
}
.cueNote strong {
  margin-right: 0.5rem;
}
.cueRow[hidden] {
  display: none;
}

.soundboard { margin-block:1rem; }
.effectGrid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.55rem; }
.effectSlot { min-width:0; }
.effectPad { display:flex; width:100%; flex-flow:column; align-items:flex-start; justify-content:center; text-align:left; min-height:5.2rem; border-radius:.7rem; padding:.55rem .72rem; }
.effectPad:enabled { background:var(--bg); color:var(--fg); border-color:var(--bg); }
.effectPad:disabled { border-style:dashed; }
.effectMeta,.effectHint { font-size:.78rem; line-height:1.35; font-weight:500; }
.effectPad strong { overflow-wrap:anywhere; line-height:1.25; margin:.15rem 0; }
.effectPad:active:enabled { box-shadow:inset 4px 0 0 var(--accent); }
@media(max-width:500px){.effectGrid { grid-template-columns:repeat(2,minmax(0,1fr)); }}

.setupLayout { display:grid; grid-template-columns:minmax(12rem, 17rem) minmax(0,1fr); gap:clamp(1rem,3vw,2.5rem); align-items:start }
.setupSteps { display:grid; gap:.35rem; border:0; border-radius:0; background:transparent; padding:0 }
.setupSteps button { display:grid; text-align:left; gap:.15rem; border:1px solid var(--line); border-radius:10px; padding:.8rem 1rem; background:transparent }
.setupSteps [aria-current="step"] { background:var(--bg); color:var(--fg); border-inline-start:5px solid var(--accent) }
.setupSteps small,.helpTopics small { display:block; font-size:.85rem; font-weight:450 }
.setupPanel { min-width:0; margin:0; padding:clamp(1rem,3vw,2rem) }
.setupPanel h2,.setupPanel h3 { margin-bottom:.6rem }
.setupPanel h3,.setupNext { margin-top:1.5rem }
.setupNext { border-top:1px solid var(--line); padding-top:1rem }
.readiness { display:grid; grid-template-columns: minmax(7rem,1fr) 2fr; gap:.7rem; }
.readiness dt { font-weight:650 }
.readiness dd { margin:0 }
.helpTopics details { margin:0; border:0; border-bottom:1px solid var(--line); padding:0 }
.helpTopics summary { font-weight:650; min-height:44px; padding:.68rem 0; cursor:pointer; line-height:1.35 }
.helpTopics details[open] p {margin:.15rem 0 .8rem}
.tourBall { display:grid; place-items:center; border-radius:50%; background:var(--bg); color:var(--fg); width:5rem; height:5rem; font:650 3rem/1 var(--head); margin:1rem 0 }
.sampleGrid { display:grid; grid-template-columns:repeat(9,1fr); margin:1rem 0 }
.sampleGrid span { text-align:center; border:1px solid var(--line); min-height:1.8rem }
.sampleGrid span:nth-child(-n+9) { background:var(--wash); font-weight:700 }
.claimDesk { border-inline-start:5px solid var(--accent); margin-bottom:1.25rem }
.claimDesk details { margin-top:.75rem }
.claimDesk summary,#calledBoard summary,#livePlan summary { cursor:pointer; min-height:44px; align-content:center; font-weight:650 }
@media(max-width:760px) {
 .setupLayout { grid-template-columns:1fr }
 .setupSteps { display:flex; flex-wrap:wrap }
 .setupSteps small {display:none}
 .setupSteps button {padding:.5rem .7rem}
 .readiness {grid-template-columns:1fr; gap:.25rem}
 .readiness dd { margin-bottom:.55rem }
}
@media(max-width:420px){header {flex-wrap:wrap} header nav {max-width:100%} header nav button {padding-inline:.65rem}}
#problem:not([hidden]) {max-width:min(92%,1300px);margin:1rem auto;display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 1rem;border:2px solid var(--accent);border-radius:10px}

/* ---- 3.8.0 host deck, modes, audition ---- */
.modeBar{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:center;padding:8px 14px;margin:0 0 10px;border-radius:10px;font-size:.9rem;background:#0F1419;color:#F5EFE6}
.modeBar strong{letter-spacing:.08em;padding:2px 10px;border-radius:999px;background:#F5EFE6;color:#0F1419}
.modeBar.isRehearsal{background:repeating-linear-gradient(135deg,#0F1419 0 14px,#2a2418 14px 28px);border:2px solid #E8B84A}
.modeBar.isRehearsal strong{background:#E8B84A}
.modeBar.isLive strong{background:#DC3C3C;color:#fff}
button.bingo{min-height:76px;font-size:1.15rem;font-weight:700;border:2px solid #DC3C3C}
button.bingo.isPlaying{background:#DC3C3C;color:#fff;box-shadow:0 0 0 4px rgba(220,60,60,.3)}
button.backToDraw{min-height:56px;font-weight:600}
.claimDesk .pads button{min-height:72px;font-size:1.1rem}
.playback{padding:6px 0}
@media (max-width:1100px){.controls.mainDeck{position:sticky;bottom:0;z-index:6;background:#F5EFE6;padding:8px;border-radius:12px 12px 0 0;box-shadow:0 -6px 12px rgba(0,0,0,.12)}}
.rehearseBar{border:2px dashed #E8B84A;border-radius:10px;padding:8px}
.audNote{margin:.4rem 0}.audBar{display:flex;gap:8px;align-items:center;justify-content:space-between;margin:8px 0}
.audBar button { min-height:48px; min-width:0; }
.audName { flex:1; min-width:0; text-align:center; display:flex; flex-direction:column; overflow-wrap:anywhere; }
.audName small { opacity:.75; }
.audActions { flex-wrap:wrap; }
.audRM{display:flex;gap:6px;align-items:center;min-height:44px}
.audGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(48px,1fr));gap:6px;margin-top:8px;max-height:30vh;overflow:auto}
.audCell{min-height:44px;font-weight:700}.audCell[aria-pressed="true"]{background:#DC3C3C;color:#fff}
.audCell:focus-visible,button.bingo:focus-visible{outline:3px solid #E8B84A;outline-offset:2px}

.animationFiles {padding: .85rem 0; border-top: 1px solid currentColor}
.animationFiles p {margin: 0 0 .5rem; overflow-wrap: anywhere}
.animationFiles small {display:block; margin: .5rem 0; line-height: 1.4}
.animationFiles [hidden] {display:none}

.hostCall { margin: .25rem 0 1rem; font-size: clamp(1.1rem, 3vw, 1.65rem); font-weight: 600; }

.tourPreference { display:flex; align-items:center; gap:.6rem; min-height:44px; cursor:pointer; }
.tourProjection { width:100%; aspect-ratio:16/9; max-height:28dvh; background:#000; border:0; border-radius:.6rem; }
.tourFeedback { min-height:1.5em; }

.themeGallery {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,10rem),1fr));gap:.7rem;margin:1rem 0}
.themeTile {display:grid;align-content:start;gap:.35rem;text-align:left;padding:.7rem;min-width:0}
.themeTile[aria-pressed=true] {outline:2px solid var(--accent);outline-offset:-2px}
.themeTile small {color:var(--muted);font-weight:450}
.themeSelected {font-size:.8rem;font-weight:700}
.themeSample {display:flex;align-items:center;justify-content:space-between;padding:.55rem .7rem;border:1px solid var(--line);border-left:4px solid;border-radius:7px;margin-bottom:.25rem}
.themeSample b {font-size:1.65rem;line-height:1;font-variant-numeric:tabular-nums}
.themeSample i {width:1.6rem;height:.55rem;border-radius:1rem}
.modeBar.isLive strong,.audCell[aria-pressed=true],button.bingo.isPlaying {background:var(--accent);color:var(--actionText)}
button.bingo {border-color:var(--accent)}
.controls.mainDeck {background:var(--panel)}

html[data-layout=forge] {
  color-scheme:dark;
  --panel:color-mix(in srgb,var(--fg) 96%,var(--bg));
  --wash:color-mix(in srgb,var(--fg) 92%,var(--bg));
  --line:color-mix(in srgb,var(--fg) 78%,var(--bg));
  --muted:color-mix(in srgb,var(--bg) 72%,var(--fg));
}
[data-layout=forge] body>header {background:var(--fg);padding:.8rem max(3vw,1rem)}
[data-layout=forge] .brand {font:760 1.25rem/1.2 var(--head),sans-serif;letter-spacing:.09em;text-transform:uppercase}
[data-layout=forge] .pageTitle h1 {font-size:clamp(1.8rem,3.2vw,2.7rem);font-weight:730;letter-spacing:-.035em}
[data-layout=forge] h2 {font-size:clamp(1.3rem,2vw,1.75rem);letter-spacing:-.025em}
[data-layout=forge] h3 {font-size:1.04rem;letter-spacing:.025em}
[data-layout=forge] .panel,[data-layout=forge] .ticket {border-radius:14px;box-shadow:none}
[data-layout=forge] .modeBar.isLive {background:var(--panel);color:var(--bg);border:1px solid var(--line)}
[data-layout=forge] .ticket {background:var(--panel);color:var(--bg);border-color:var(--line)}
[data-layout=forge] .ticketFoot,[data-layout=forge] .ticketTop {border-color:var(--line)}
[data-layout=forge] .ballStage {background:linear-gradient(150deg,var(--wash),var(--panel));min-height:9rem}
[data-layout=forge] .ballStage::before,[data-layout=forge] .ballStage::after {display:none}
[data-layout=forge] .ball {background:transparent;color:var(--accent);border:0;box-shadow:none;font-family:var(--head),sans-serif;font-weight:780;font-variant-numeric:tabular-nums}
[data-layout=forge] .lastCalls b,[data-layout=forge] .effectPad:enabled {background:var(--wash);color:var(--bg);border-color:var(--line)}
[data-layout=forge] .effectPad:enabled {border-inline-start:3px solid var(--accent)}
[data-layout=forge] .setupSteps [aria-current=step],[data-layout=forge] header nav .active {background:var(--wash);color:var(--bg);box-shadow:inset 0 -3px var(--accent)}
[data-layout=forge] body>header nav {position:fixed;z-index:10;gap:4px;background:var(--panel);border:1px solid var(--line);border-radius:0}
[data-layout=forge] body>header nav button {border-radius:7px;display:flex;align-items:center;justify-content:center;gap:.25rem;flex-direction:column}
[data-layout=forge] body>header nav button::before {content:"";width:1.05rem;height:1.05rem;border:1.6px solid currentColor;border-radius:50%}
[data-layout=forge] body>header nav button[data-page=prepare]::before {border-radius:3px;background:linear-gradient(currentColor,currentColor) center/55% 2px no-repeat}
[data-layout=forge] body>header nav button[data-act=help]::before {content:"?";font-size:.8rem;line-height:1.05rem;text-align:center}
[data-layout=forge] body>header nav button.active::before {color:var(--accent)}
@media screen and (min-width:960px) {
  [data-layout=forge] body {padding-inline-start:7rem}
  [data-layout=forge] body>header nav {inset:0 auto 0 0;width:7rem;padding:1rem .45rem;flex-direction:column}
  [data-layout=forge] header nav button {min-height:4.5rem}
  [data-layout=forge] main {width:min(94%,1220px)}
}
@media screen and (max-width:959px) {
  [data-layout=forge] {--dock:calc(3.875rem + env(safe-area-inset-bottom,0px));scroll-padding-bottom:var(--dock)}
  [data-layout=forge] body {padding-bottom:var(--dock)}
  [data-layout=forge] body>header nav {inset:auto 0 0;width:100%;max-width:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:.25rem .45rem calc(.25rem + env(safe-area-inset-bottom,0px))}
  [data-layout=forge] header nav button {min-height:3.25rem}
  [data-layout=forge] .controls.mainDeck {bottom:var(--dock)}
  [data-layout=forge] #notice {bottom:calc(var(--dock) + .5rem)}
}

.settingsGrid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,21rem),1fr));gap:1rem;align-items:start}
.settingsGrid .panel {margin:0;min-width:0}
.settingsGrid h2 {margin-bottom:.75rem}
[data-layout=forge] body>header nav button[data-page=settings]::before {content:"⚙";border:0;font:1.15rem/1 sans-serif}
@media (max-width:600px) {
  body>header {flex-wrap:wrap}
  body>header nav {max-width:100%}
  body>header nav button {padding-inline:.45rem}
  [data-layout=forge] body>header nav button {padding-inline:.15rem;font-size:.81rem}
}

#themePreview + button[data-act="saveTheme"] {
  margin-block-start: 0.75rem;
}

.controls .keepPlaying { grid-column: 1 / -1; }

.helpSearch { margin-block:1rem .25rem; }
.helpTopics section { margin-block:1rem; }
.helpTopics h3 { margin-bottom:.3rem; font-size:1.2rem; }
.helpTopics details[open] > button { margin-bottom:.6rem; }
.guideChecklist { display:grid; gap:.8rem; padding-inline-start:1.5rem; }
.tourProgress { display:block; width:100%; height:.45rem; margin-top:.75rem; accent-color:var(--accent); }
.tourFeedback:empty { min-height:0; margin:0; }

#modal[open]:has(#helpSearch) { display:flex; flex-direction:column; overflow:hidden; max-height:calc(100dvh - 2rem); }
#modal:has(#helpSearch) #dialogBody { min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:.2rem .25rem .25rem; }
#modal:has(#helpSearch) > #closeDialog { align-self:flex-end; flex:none; margin-top:.6rem; }
.helpShortcuts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.55rem; margin-top:.8rem; }
.helpShortcuts button { padding-inline:.45rem; }
@media (max-width:480px) {
  .helpShortcuts { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .helpShortcuts button:first-child { grid-column:1 / -1; }
}

/* Keep long booking, cue and ticket labels within the available panel width. */
:where(.field, .pageTitle > div, .cueRow > *, .ticketTop > *, .readiness dd, .runList li, .claimDesk, .modeBar > *) {
  min-width: 0;
  overflow-wrap: anywhere;
}
:where(.pads, .smallActions, .scanActions) > button { max-inline-size:100%; overflow-wrap:anywhere; }
#dialogBody { min-width:0; }
.controls .two > button { min-width:0; padding-inline:.35rem; }
@media (max-width:480px) {
  .audNavigation { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .audName { grid-row:1; grid-column:1 / -1; }
  .audNavigation button { width:100%; }
  .setupSteps { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,7rem),1fr)); }
  .setupSteps button { white-space:normal; text-align:center; }
  .modeBar > #outputStatus { flex-basis:100%; }
  .controls .two { grid-template-columns:repeat(auto-fit,minmax(min(100%,3.8rem),1fr)); }
}

/* Live caller */
html { --rule:color-mix(in srgb,var(--bg) 24%,var(--fg)); }
body > header { padding-block:.55rem; }
.brand, [data-layout=forge] .brand {
  font:750 1.25rem/1.1 Inter, sans-serif;
  letter-spacing:-.045em;
  text-transform:none;
}
.mark { width:1.65rem; background:var(--accent); }
h1 { font-weight:690; }
button { border-radius:6px; }
.panel, [data-layout=forge] .panel { border-radius:8px; box-shadow:none; }
.showHeading {
  display:flex;
  align-items:end;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:.6rem 1rem;
  margin-bottom:1rem;
}
.showHeading h1 { font-size:clamp(1.75rem, 4.1vw, 3.25rem); }
.showHeading .smallActions { margin-bottom:.15rem; }
.showHeading .modeBar, [data-layout=forge] .showHeading .modeBar.isLive {
  margin:.45rem 0 0;
  padding:0;
  gap:.4rem .7rem;
  background:none;
  border:0;
  color:var(--bg);
  align-items:center;
  box-shadow:none;
}
.showHeading .modeBar strong { border-radius:4px; padding:.16rem .5rem; font-size:.73rem; text-transform:uppercase; }
.showHeading .modeBar.isRehearsal strong { color:#15100a; }
#outputStatus { color:var(--muted); }
.console { grid-template-columns:minmax(0,1.35fr) minmax(0,1fr); gap:clamp(.8rem,2.5vw,1.8rem); }
.callerSurface { border:1px solid var(--rule); border-radius:9px; background:var(--panel); }
.callerSurface .ticket, [data-layout=forge] .callerSurface .ticket {
  border:0;
  border-radius:8px 8px 0 0;
  background:var(--bg);
  color:var(--fg);
  box-shadow:none;
}
[data-layout=forge] .callerSurface .ticket { background:var(--wash); color:var(--bg); }
.callerSurface .ticket.rehearsal { outline:0; }
.callerSurface .ticketTop { padding:.65rem 1rem; }
.callerSurface .ballStage, [data-layout=forge] .callerSurface .ballStage {
  min-height:clamp(7rem,20vh,12rem);
  background:none;
  padding:.55rem;
}
.callerSurface .ballStage::before, .callerSurface .ballStage::after { display:none; }
.callerSurface .ball, [data-layout=forge] .callerSurface .ball {
  width:auto;
  aspect-ratio:auto;
  padding:0;
  border:0;
  outline:0;
  background:none;
  color:inherit;
  font:760 clamp(5rem, 14vh, 9rem)/.91 Inter, sans-serif;
  letter-spacing:-.085em;
  font-variant-numeric:tabular-nums;
}
.callerSurface .is-empty .ball { opacity:.62; }
.callerSurface .hostCall { margin:0 1rem .6rem; text-align:center; }
.callerSurface .ticketFoot { gap:.25rem .75rem; padding:.45rem 1rem; min-height:42px; }
.callerControls { padding:.8rem; }
.callerControls .mainDeck { position:static; padding:0; margin:0; border-radius:0; box-shadow:none; background:none; }
.callerControls .mainDeck button { min-height:48px; }
.callerControls .mainDeck .draw, .callerControls .mainDeck .bingo { min-height:60px; font-size:1rem; }
.callerControls .cuePad, .callerControls .playbackActions { grid-column:1/-1; }
.callerControls .playbackActions { margin:0; }
.callerControls .playback { border:0; padding:.4rem 0 0; min-height:0; }
.callerControls .resumeBar { margin:0 0 .6rem; }
.callerAside .panel { padding:.75rem .85rem; margin:0 0 .65rem; }
.callerAside #calledBoard p { max-height:3.2em; overflow:auto; font-size:.78rem; margin-bottom:.55rem; }
.callerAside .board { gap:3px; }
.callerAside .effectPad { min-height:3.5rem; }
.callerAside .effectMeta, .callerAside .effectHint { font-size:.72rem; }
.settingsGrid { display:block; max-width:58rem; border-top:1px solid var(--rule); }
.settingsGrid .panel, [data-layout=forge] .settingsGrid .panel { border:0; border-bottom:1px solid var(--rule); border-radius:0; background:none; padding:1rem 0; }
.settingsGrid .panel h2 { font-size:clamp(1.25rem, 2.5vw, 1.65rem); }
.settingsGrid .panel .pads { margin-top:.5rem; }
.setupLayout { gap:clamp(.8rem,2vw,1.4rem); }
.setupSteps button, .themeTile { border-radius:6px; }
.helpTopics section { border-top:1px solid var(--rule); padding-top:.75rem; }
.helpTopics details:last-child { border-bottom:0; }
dialog { border-radius:12px; }
.preview { border-radius:8px; }
@media (max-width:760px) {
  .console { grid-template-columns:minmax(0,1fr); }
  .callerSurface .ballStage, [data-layout=forge] .callerSurface .ballStage { min-height:7rem; }
}
@media (prefers-reduced-motion:reduce) {
  .callerSurface .ball { animation:none; }
}
.callerSurface .readyLabel { font:620 clamp(1.35rem,3vw,2rem)/1.2 Inter,sans-serif; letter-spacing:-.04em; }
.callerControls button.bingo.isPlaying { background:color-mix(in srgb,var(--accent) 11%,var(--panel)); color:var(--bg); box-shadow:none; }

/* Ticket branding studio */
.brandStudio h3 { margin: 1rem 0 .4rem; font-size: 1rem; }
.brandCols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
@media (min-width: 1100px) { .brandCols { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }
.brandForm .field { display: block; margin: 0 0 .6rem; }
.brandForm input[type="text"], .brandForm input[type="tel"], .brandForm input[type="email"] { width: 100%; }
.brandColours { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.brandColours input[type="color"] { width: 4.5rem; height: 2.75rem; padding: 0; border: 1px solid currentColor; border-radius: 8px; background: none; }
.brandLogo { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: .75rem 0; }
.brandLogo img { max-width: 11rem; max-height: 5rem; object-fit: contain; border: 1px solid #cfd4da; border-radius: 8px; padding: .25rem; background: #fff; }
.brandNotes { margin: .75rem 0 0; padding-left: 1.1rem; }
.brandPreview { width: 100%; overflow: hidden; border: 1px solid #cfd4da; border-radius: 8px; background: #fff; }
.brandPreview iframe { display: block; }
.brandColours .field { display: flex; flex-direction: column; gap: .35rem; margin: 0; }
.brandForm [hidden] { display: none !important; }

.ticket-seat { display:block; font-weight:700; margin:2px 0 4px; }
.gameGoals { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,11rem),1fr)); gap:0.25rem 0.75rem; border:1px solid var(--line,#c9ccd1); border-radius:10px; padding:0.5rem 0.75rem 0.75rem; margin:0.75rem 0; }
.gameGoals legend { font-weight:700; padding:0 0.35rem; }

.licenceGate{position:fixed;inset:0;z-index:100;background:#F2F2F7;color:#1c1c1e;display:flex;align-items:center;justify-content:center;padding:1rem;overflow:auto;font:16px/1.5 system-ui,-apple-system,sans-serif}
.licenceGate[hidden]{display:none}
.licenceBox{max-width:32rem;width:100%}
.licenceBox h1{font-family:"Cormorant Garamond",Georgia,serif;font-size:2.2rem;margin:0 0 .5rem}
.licenceBox textarea,.licenceBox input{width:100%;box-sizing:border-box;font:inherit;color:#1c1c1e;background:#fff;border:1px solid #c7c7cc;border-radius:10px;padding:.6rem .7rem}
.licenceBox button{font:inherit;font-weight:600;color:#fff;background:#1c1c1e;border:0;border-radius:10px;padding:.7rem 1.1rem;margin:.5rem .5rem 0 0;min-height:44px;cursor:pointer}
.licenceBox button[data-lic="buy"]{background:#fff;color:#1c1c1e;border:1px solid #1c1c1e}
.licenceBox label{display:block;margin:1rem 0 .3rem}
.licenceBox #licNote{min-height:1.5em;color:#8e1f1f}
