:root {
  color-scheme: dark;
  font: 16px/1.45 system-ui, sans-serif;
  --ink: #201b25;
  --paper: #ffefd5;
  --lime: #e2fb79;
  --metal: #312934;
  --rose: #ee829b;
  --muted: #d3b8c2;
  --beat: #ff9a76;
  --bass: #e9c868;
  --lead: #a7dce5;
  --vox: #ebafdc;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--paper); background: var(--ink); }
h1, h2, h3, p { margin: 0; }
button, summary { font: inherit; }
button {
  color: inherit;
  cursor: pointer;
  border: 1px solid #735b69;
  background: #352b38;
  border-radius: 7px;
  min-width: 44px;
  min-height: 44px;
  font-size: .875rem;
  font-weight: 720;
}
button:disabled { cursor: default; opacity: .63; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #fff3a9; outline-offset: 3px; z-index: 3; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#game { min-height: 100dvh; display: grid; touch-action: manipulation; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.pads, .performers { touch-action: none; }
.console {
  --cap: 1810px;
  position: relative;
  width: min(100%, var(--cap));
  height: 100dvh;
  min-height: 480px;
  margin-inline: auto;
  padding: max(14px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 9px;
}
#game:fullscreen, #game.fallback-full { background: var(--ink); overflow: auto; }
#game.fallback-full { position: fixed; inset: 0; z-index: 20; }
body.scroll-locked { overflow: hidden; }
.mast { position: relative; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 18px 4px; }
.mast h1 { line-height: .96; white-space: nowrap; padding-block: 4px; }
.mast h1 > span { display: inline-block; font: italic 900 clamp(2.4rem, 5.6vw, 5.3rem)/.84 Georgia, serif; letter-spacing: -.09em; text-shadow: 2px 2px #ffdbb0; }
.mast h1 > small { display: inline-block; margin-left: .55em; font-weight: 760; font-size: clamp(.85rem, 1.5vw, 1.35rem); }
.mast-meter { display: flex; align-items: center; gap: 4px; color: #8e455a; margin-inline: auto 2vw; transform: scaleY(.65); }
.mast-meter i { width: 3px; height: 36px; border-radius: 4px; background: currentColor; }
.mast-meter i:nth-child(3n) { height: 21px; }
.mast-meter i:nth-child(2n) { height: 12px; }
.window-buttons { display: flex; gap: 8px; }
.round { border-radius: 50%; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; color: var(--paper); }
.round svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stage {
  position: relative; isolation: isolate; color: var(--ink); border-radius: 16px; overflow: hidden;
  display: grid; grid-template: auto 36px minmax(0, 1fr) 48px / minmax(0, 1fr);
  border: 1px solid #fe99ac;
  background:
    radial-gradient(ellipse at 48% 82%, #ffc797 0%, #ffc79700 56%),
    linear-gradient(168deg, #f8aabc 0%, #e78392 52%, #cb627a 100%);
}
.stage::before {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, #6d34504c 0 1px, transparent 1px 42px) center 70% / 100% 1px no-repeat,
    conic-gradient(from 147deg at 22% -15%, #ffe1b34f 0 43deg, transparent 43deg),
    conic-gradient(from 160deg at 89% -19%, #ffeac061 0 43deg, transparent 43deg),
    radial-gradient(circle, #68274738 0 .65px, transparent .85px) 0 0 / 5px 5px,
    linear-gradient(0deg, #8b3b5764 0 18%, transparent 18%);
}
.stage::after {
  content: ""; position: absolute; z-index: -1; inset: 7px;
  border: 1px solid #6f34554c; border-radius: 11px; pointer-events: none;
}
#game[data-mode=menu] .stage { grid-template-rows: auto 36px minmax(0,1fr) 75px; }
.stage-legend { z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding-inline: 20px; font-size: .875rem; font-weight: 800; }
.on-air { display: flex; gap: 8px; align-items: center; justify-self: start; padding: 3px 8px; background: #ffe0be; border: 1px solid #6f3455; border-radius: 5px; }
.on-air i, .record i { display: inline-block; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.on-air i { color: #a13d61; }
#game:has(.has-take) .on-air { color: var(--paper); background: #6a2343; }
#game:has(.has-take) .on-air i { color: #ff9a76; box-shadow: 0 0 8px #ff9a76; }
.stage-legend > :last-child { text-align: right; }
.beat-meter { display: flex; gap: 5px; }
.beat-meter i { height: 8px; width: 18px; border-radius: 8px; background: #9c4b65; }
.beat-meter .lit { background: #231923; }
.beat-meter [data-hit=true] { background: var(--lime); box-shadow: inset 0 0 0 1px #231923; }
.beat-meter [data-hit=false] { background: repeating-linear-gradient(130deg,#231923 0 2px,#ffbb9b 2px 5px); }
.beat-meter .lit[data-hit]:not([data-hit=""]) { outline: 1px solid #231923; outline-offset: 2px; }
.performers { position: relative; display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; padding-inline: 20px; align-self: stretch; min-height: 0; }
.performer { position: relative; min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0,1fr) 28px; justify-items: center; padding: 0; color: var(--ink); background: none; border: 0; border-radius: 16px; }
.figure { position: relative; width: 100%; height: 100%; min-height: 0; display: block; overflow: hidden; }
.figure canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.performer.quiet .figure { opacity: .53; }
.plaque { position: relative; display: flex; gap: 6px; align-items: center; background: #49243c; color: var(--paper); border-radius: 20px; padding: 1px 9px 1px 3px; align-self: center; min-height: 24px; }
.plaque b { display: grid; place-items: center; background: #e4a8ba; color: #281c29; border-radius: 50%; width: 18px; height: 18px; font-size: .875rem; }
.performer.focused .plaque, .performer.solo .plaque { color: var(--ink); background: var(--lime); }
.stage.placing .performer, .dragging .performer { outline: 1px dashed #633347; outline-offset: -2px; }
.stage.placing .performer:hover, .performer.drop-target { outline: 3px solid var(--ink); background: #fac1d4; }
.stage-tools { position: relative; z-index: 1; display: grid; place-items: center; padding: 0 8px; font-weight: 700; font-size: .875rem; text-align: center; }
.layer-tools { display: flex; gap: 6px; }
.layer-tools button { padding-inline: 11px; color: var(--paper); background: #392231; border-color: #583346; }
.layer-tools button[aria-pressed=true] { color: var(--ink); background: var(--paper); }
.deck { display: grid; gap: 8px; background: var(--metal); border: 1px solid #5b475d; border-radius: 12px; padding: 10px 14px; box-shadow: inset 0 0 0 1px #1e1724; }
.deck-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.deck-heading h2 { font-size: 1.1rem; }
.deck-heading p { color: var(--muted); font-size: .875rem; }
.pads { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.sound-group { --role: var(--beat); min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 5px; }
.role-1, [data-role="1"] { --role: var(--bass); }
.role-2, [data-role="2"] { --role: var(--lead); }
.role-3, [data-role="3"] { --role: var(--vox); }
[data-role="0"] { --role: var(--beat); }
.performer:not(.focused) .plaque b { background: var(--role, #e4a8ba); }
.sound-group h3 { grid-column: 1/-1; color: var(--role); font-size: .875rem; }
.pad {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
  min-width: 0; min-height: clamp(52px, 9.5vh, 105px); padding: 3px 1px;
  color: #251923; border-color: #1c1822; background: var(--role);
  box-shadow: inset 0 -4px #25192334;
}
.pad:hover { filter: brightness(1.05); }
.pad[aria-pressed=true] { background: var(--lime); border: 2px solid #292133; outline: 2px solid var(--lime); outline-offset: 1px; }
.pad.cue-pad { box-shadow: inset 0 0 0 2px #292133, 0 0 0 2px var(--lime); }
.pad.next-pad { border: 2px dashed #292133; }
.pad-mark { display: block; flex-shrink: 0; width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.transport { display: flex; align-items: center; gap: 8px; }
.banks { display: flex; align-items: center; gap: 4px; }
.banks button[aria-pressed=true] { color: var(--ink); background: var(--lime); }
.banks .queued { outline: 2px dotted var(--lime); outline-offset: -4px; }
.undo { padding-inline: 16px; }
.guide-jump { background: transparent; padding-inline: 8px; }
.record { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; margin-left: auto; background: #ffe3c3; color: #211720; }
.record i { background: #9a274f; }
.take-info { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 4px 8px; font-size: .875rem; }
.cue { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.cue strong { color: var(--lime); }
.cue span { color: var(--paper); }
.cue[data-match=true] #phase-cue { color: var(--lime); }
.cue[data-match=false] #phase-cue { color: #ffd1ac; }
#next-cue { grid-column: 1/-1; color: #ffe3c3; }
.reel { grid-column: 1/-1; display: grid; grid-template-columns: repeat(var(--bars,24),minmax(0,1fr)); gap: 2px; }
.reel i { height: 5px; border-radius: 3px; background: #7e657a; }
.reel .cue-start { margin-left: 4px; }
.reel .hit { background: var(--lime); }
.reel .miss { background: var(--rose); }
.reel .now { background: var(--paper); }
.reel .up-next { outline: 1px solid #ffe3c3; }
.overlay { position: absolute; inset: 0; z-index: 2; display: grid; align-items: center; justify-items: center; pointer-events: none; padding: 48px 16px; }
#start-screen { align-items: end; padding: 0 10px 10px; }
#start-screen .slate { padding-block: 6px; min-height: 56px; gap: 18px; }
#start-screen h2 { font-size: clamp(1.13rem, 2.4vw, 2rem); }
#start-screen p { margin-top: 2px; font-size: .875rem; }
#game[data-mode=menu] .stage-tools { visibility: hidden; }
.slate {
  pointer-events: auto; display: flex; max-width: 100%; align-items: center; gap: 24px;
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 12px;
  padding: 12px 14px 12px 18px; box-shadow: 5px 6px 0 #211923;
}
.slate h2 { font-size: clamp(1.4rem, 3.4vw, 2.8rem); line-height: 1.06; letter-spacing: -.047em; }
.slate p { margin-top: 5px; font-weight: 600; }
.slate button:focus-visible { outline-color: #742548; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--lime); color: var(--ink); border: 2px solid var(--ink); padding: 0 18px; min-height: 49px; white-space: nowrap; }
.pause-slate, .end-slate { flex-direction: column; align-items: stretch; gap: 14px; width: min(430px, 100%); }
#pause-screen, .briefing { background: #1e1629b8; }
.briefing { z-index: 5; padding: 12px; }
.briefing .slate { display: grid; align-content: start; width: min(460px, 100%); max-height: 100%; overflow: auto; gap: 9px; }
.briefing.advanced .slate { display: flex; flex-direction: column; align-items: stretch; width: min(500px, 100%); overflow: hidden; }
.advanced .slate > :not(.take-sheet) { flex-shrink: 0; }
.take-sheet { display: grid; gap: 9px; }
.advanced .take-sheet { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.take-sheet:focus-visible { outline: 2px solid #742548; outline-offset: -2px; }
.briefing .slate p { margin: 0; font-size: .875rem; }
.briefing .end-actions button { padding-inline: 8px; }
.briefing .end-actions [data-act=cancel-take] { color: var(--paper); }
.take-cues { display: grid; gap: 4px; margin: 0; font-size: .875rem; }
.take-cues div { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 6px; }
.take-cues [aria-current] { background: #e5eea1; border-radius: 3px; }
.take-cues dt { font-weight: 800; color: #742548; }
.take-cues dd { margin: 0; }
.take-cues small { display: inline-block; font-size: inherit; color: #6f2e4a; white-space: nowrap; }
@media (pointer: coarse) { .keyboard-hint { display: none; } }
.settings { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; }
.settings button { color: var(--paper); }
.settings button[aria-pressed=true] { color: var(--ink); background: #efc7db; border-color: var(--ink); }
.end-actions { display: flex; gap: 8px; }
.end-actions > * { flex: 1; }
.end-actions [data-act=share] { color: var(--paper); }
.copy-fallback { display: grid; gap: 5px; font-size: .875rem; }
.copy-fallback input { min-width: 0; width: 100%; padding: 8px; border: 1px solid #735b69; border-radius: 6px; background: #fff9e9; color: var(--ink); font: inherit; user-select: text; }
#end-kicker { color: #6f2e4a; margin: 0 0 4px; font-size: .875rem; }
#end-next { color: #6f2e4a; }
#end-mix:empty, #end-next:empty { display: none; }
#end-screen { align-items: end; padding-bottom: max(14px, env(safe-area-inset-bottom)); background: linear-gradient(0deg,#211627ca,transparent 58%); }
#end-mix:empty { display: none; }
#game[data-mode=won] .stage { box-shadow: inset 0 0 40px #fff3a5; }
#game[data-mode=won] .end-slate { border-color: #3e5430; box-shadow: 7px 8px 0 #533247, 0 0 48px #effd9460; }
#game[data-mode=won] .plaque { color: var(--ink); background: var(--lime); }
.confetti { position: absolute; z-index: 1; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { display: none; position: absolute; left: var(--x); top: var(--y); width: 7px; height: 12px; background: var(--tint); transform: rotate(var(--angle)); }
#game[data-mode=won] .confetti i { display: block; animation: scatter .8s cubic-bezier(.15,.55,.49,1) both; }
@keyframes scatter { from { opacity: 0; translate: 0 35px; } to { opacity: 1; translate: 0 0; } }
.low-motion .confetti i { animation: none !important; }
.footer { padding: 28px max(16px, 6vw) 10px; }
.footer-links { position: relative; z-index: 1; display: flex; gap: 16px; flex-wrap: wrap; align-items: baseline; font-weight: 680; }
.footer p { pointer-events: none; margin-top: 12px; font: italic 900 clamp(3rem, 13vw, 14rem)/1 Georgia, serif; letter-spacing: -.08em; }
.footer details { margin-left: auto; }
.footer details span { display: block; margin-top: 8px; }
.editorial, .page-body {
  color-scheme: light; color: #281f2a; background: #f7dbc4;
  padding: clamp(32px, 6vw, 84px) max(16px, calc((100% - 1120px) / 2));
}
.notes-intro { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); align-items: start; gap: 20px; margin-bottom: 30px; }
.editorial h2, .page-body h1 { font-size: clamp(2.4rem, 5vw, 5.2rem); line-height: .96; letter-spacing: -.075em; }
.notes-intro p { font-size: clamp(1.05rem,2vw,1.25rem); max-width: 62ch; }
.notes-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.note { grid-column: span 2; padding: clamp(15px,3vw,30px); background: #ead4e4; border: 1px solid #69505e; border-radius: 12px; }
.note-wide { grid-column: span 3; background: #ffecd5; }
.note-light { background: #e5eea1; }
.note-tips { background: #ffb99f; }
.note-answers { background: #c5e0dc; }
.note h3, .page-body h2 { font-size: clamp(1.24rem,2vw,1.65rem); line-height: 1.15; letter-spacing: -.026em; }
.note p, .page-body p { margin-top: 12px; max-width: 75ch; }
.note ol { padding-left: 1.2em; }
.note li + li { margin-top: .55em; }
.note dd { margin: 3px 0 12px; }
.note dt { font-weight: 780; }
.page-body { min-height: 70dvh; }
.page-body h1 { margin-top: 28px; }
.page-body h2 { margin-top: 26px; }
.page-body a, .editorial a { text-decoration-thickness: .14em; text-underline-offset: .15em; }
.page-body li { max-width: 75ch; margin-bottom: 6px; }
.page-body .primary { margin-top: 20px; border-radius: 7px; font-weight: 750; text-decoration: none; }

@media (max-width: 830px) and (orientation: portrait) {
  .console { padding: max(9px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(9px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
  .mast-meter { display: none; }
  .mast { padding: 5px 9px 2px; }
  .stage { grid-template-rows: auto 30px minmax(0,1fr) 46px; }
  #game[data-mode=menu] .stage { grid-template-rows: auto 30px minmax(0,1fr) 68px; }
  .performers { grid-template-columns: repeat(3,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 4px 5px; padding-inline: 8px; }
  .pads { grid-template-columns: minmax(0,1fr); gap: 4px; }
  .sound-group { grid-template-columns: 36px repeat(4,minmax(0,1fr)); gap: 4px; align-items: center; }
  .sound-group h3 { grid-column: auto; }
  .pad { min-height: clamp(44px, 5.7vh, 62px); gap: 1px; }
  .pad-mark { width: 16px; height: 16px; }
  .deck { padding: 7px 8px; gap: 5px; }
}
@media (max-width: 480px) {
  .mast h1 > span { font-size: 2.78rem; }
  .mast h1 > small { display: block; margin: 6px 0 0 3px; }
  .window-buttons { gap: 6px; }
  .stage-legend { padding-inline: 11px; }
  .stage::after { inset-inline: 6px; }
  .deck-heading { min-height: 20px; }
  .transport { gap: 6px; }
  .undo { padding-inline: 9px; }
  .record { padding-inline: 8px; }
  .guide-jump span { display: none; }
  .slate { gap: 11px; padding: 10px 11px; }
  .slate p { font-size: .875rem; }
}
@media (max-width: 480px) and (max-height: 700px) and (orientation: portrait) {
  .console { gap: 5px; padding-block: max(7px, env(safe-area-inset-top)) max(7px, env(safe-area-inset-bottom)); }
  .mast { gap: 4px; padding: 2px 6px 0; }
  .mast h1 > span { font-size: clamp(2.05rem, 9.8vw, 2.45rem); }
  .mast h1 > small { display: inline; margin: 0 0 0 .2rem; }
  .round { width: 44px; height: 44px; }
  .window-buttons { gap: 4px; }
  .stage { grid-template-rows: auto 25px minmax(0,1fr) 44px; }
  #game[data-mode=menu] .stage { grid-template-rows: auto 25px minmax(0,1fr) 66px; }
  .on-air { padding-block: 0; }
  .performer { grid-template-rows: minmax(0,1fr) 20px; }
  .plaque { min-height: 20px; padding-block: 0; line-height: 1; }
  .deck-heading { display: none; }
  .deck { padding-block: 4px; gap: 3px; }
  .take-info { gap: 2px 6px; line-height: 1.15; }
  .transport { gap: 5px; }
  .undo { padding-inline: 6px; }
  .guide-jump { padding-inline: 0; }
  .record { padding-inline: 6px; }
}
@media (max-width: 680px) {
  .notes-intro { grid-template-columns: 1fr; }
  .notes-grid { grid-template-columns: 1fr; }
  .note { grid-column: 1; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .console { min-height: 365px; padding: max(4px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); gap: 7px; }
  .mast { padding: 5px 9px 2px; }
  .mast h1 > span { font-size: 2.75rem; }
  .mast h1 > small { display: inline; }
  .stage { grid-template-rows: auto 26px minmax(0,1fr) 44px; }
  #game[data-mode=menu] .stage { grid-template-rows: auto 26px minmax(0,1fr) 66px; }
  .on-air { padding-block: 0; }
  #start-screen { padding-bottom: 4px; }
  .deck { gap: 3px; padding: 4px 7px; }
  .deck-heading { display: none; }
  .pads { gap: 7px; }
  .sound-group { gap: 3px; }
  .pad { min-height: 44px; gap: 1px; }
  .pad-mark { width: 16px; height: 16px; }
  .pad { letter-spacing: -.025em; }
  #pause-screen { padding-block: 12px; }
  #end-screen { padding-block: 12px; }
}
@media (orientation: landscape) and (max-height: 520px) and (min-width: 600px) {
  .console { grid-template: minmax(0,1fr) / minmax(0, 1fr) minmax(280px, .62fr); }
  .mast-meter { display: none; }
  .mast h1 > span { font-size: clamp(2.03rem, 5vw, 2.75rem); }
  .mast h1 > small { margin-left: .25em; }
  .window-buttons { gap: 5px; }
  .round { width: 44px; height: 44px; }
  .performers { grid-template-columns: repeat(3,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 4px; padding-inline: 8px; }
  .performer { grid-template-rows: minmax(0,1fr) 20px; }
  .plaque { min-height: 20px; padding-block: 0; line-height: 1; }
  .deck { align-self: stretch; align-content: center; padding-inline: 7px; gap: 6px; }
  .pads { grid-template-columns: 1fr; gap: 3px; }
  .sound-group { grid-template-columns: 36px repeat(4,minmax(0,1fr)); align-items: center; }
  .sound-group h3 { grid-column: auto; }
  .transport { gap: 5px; }
  .record, .undo, .guide-jump { padding-inline: 5px; }
  .briefing.advanced .slate { width: min(600px, 100%); }
  #end-screen { justify-items: end; background: linear-gradient(270deg,#211627ca,transparent 63%); }
  #end-screen .slate { width: min(40%, 450px); }
}
@media (min-width: 1600px) and (min-height: 900px) {
  .performers {
    grid-template-columns: repeat(3,minmax(0,1fr));
    grid-template-rows: repeat(2,minmax(0,1fr));
    width: min(100%, 1320px);
    justify-self: center;
  }
}

#start-screen .slate { gap: clamp(6px, 1.5vw, 18px); }
#start-screen [data-act=map] { margin-left: auto; }
[data-act=map], [data-act=close-map], [data-act=hear-cue], [data-act=replay] { color: var(--paper); }
.campaign-desk .layer-tools { gap: 4px; }
.campaign-desk .layer-tools button { padding-inline: 7px; }
.beat-editor { display: flex; align-items: center; gap: 5px; }
.beat-editor button { color: var(--paper); background: #392231; border-color: #583346; }
.beat-editor [data-beat][aria-pressed=true] { color: var(--ink); background: var(--lime); }
.beat-editor .beat-now { box-shadow: inset 0 -4px #c46481; }
#beat-owner { min-width: 50px; }
.edit-bank { white-space: nowrap; padding-inline: 6px; }
.edit-bank[aria-pressed=true] { background: var(--paper); color: var(--ink); }
.pad.outside-kit { background: #453b47; color: #e2cbd8; box-shadow: none; }
.pad.outside-kit[aria-pressed=true] { color: var(--ink); background: var(--lime); }
#cue-clock { color: var(--muted); grid-column: 1/-1; }
#score:empty { display: none; }
.campaign-desk .cue { flex-wrap: wrap; column-gap: 7px; row-gap: 2px; }
.campaign-desk .reel .cue-start { margin-left: 1px; border-left: 1px solid #fff0cc; }
.take-cues div { grid-template-columns: minmax(4rem,auto) minmax(0, 1fr); }
.take-cues small { display: block; }
.end-campaign { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#end-stars { color: #614d09; font-size: 1.5rem; letter-spacing: .12em; }
#map-screen .slate { width: min(810px, 100%); height: min(100%, 680px); overflow: hidden;
  min-height: 0; align-items: stretch; grid-template-rows: auto minmax(0,1fr); }
.map-heading { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.map-heading p { color: #6f2e4a; padding-top: 5px; }
.map-chapters { position: relative; display: grid; gap: 7px; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-color: #81506a #ffe9cc; padding: 3px 5px 5px 3px; }
.map-chapter { background: #f0d7c6; border: 1px solid #997586; border-radius: 8px; padding: 8px; }
.map-chapter h3 { font-size: 1rem; line-height: 1.2; }
.map-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 5px; margin-top: 6px; }
.map-grid button { display: flex; align-items: flex-start; justify-content: center; text-align: left; flex-direction: column;
  min-width: 0; min-height: 74px; gap: 4px; padding: 5px 7px; background: #442b42; color: var(--paper); line-height: 1.12; }
.map-grid button[aria-current] { color: var(--ink); background: var(--lime); border-color: #3e5430; }
.map-grid button:disabled { background: #e1c4be; color: #553a49; opacity: 1; }
.map-grid button b { display: inline-block; margin-right: 3px; }
.map-grid button small { font-size: .875rem; }
@media (max-width: 650px) {
  .map-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 480px) {
  #start-screen .primary { padding-inline: 10px; }
  #start-screen .slate p { line-height: 1.2; }
  .beat-editor { gap: 3px; }
  #beat-owner { min-width: 45px; }
  .campaign-desk .transport { gap: 4px; }
  .campaign-desk .transport .record { padding-inline: 4px; gap: 4px; min-width: 61px; }
  .campaign-desk .transport .record i { display: none; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .campaign-desk .console { grid-template-columns: minmax(0,1fr) minmax(325px,.69fr); }
  .campaign-desk .deck { gap: 4px; }
  #map-screen .slate { gap: 5px; }
}
.notes-intro p + p { margin-top: 12px; }
.note ul { padding-left: 1.2em; }
.note table { width: 100%; margin-top: 12px; border-collapse: collapse; }
.note th, .note td { padding: .35em .4em; border-bottom: 1px solid #69505e60; text-align: left; }
.note td:last-child { white-space: nowrap; }
.languages nav { display: flex; flex-wrap: wrap; gap: .45rem .8rem; margin-top: .5rem; }
.languages [aria-current=page] { color: var(--lime); }
.languages summary { cursor: pointer; }

html:not([lang=en]) .map-grid button,
html:not([lang=en]) .take-cues,
html:not([lang=en]) .editorial { overflow-wrap: anywhere; }
html:not([lang=en]) .take-cues div { grid-template-columns: minmax(0, 34%) minmax(0, 1fr); }
html:not([lang=en]) .end-actions > button { min-width: 0; white-space: normal; }
@media (max-width: 480px) {
  html:not([lang=en]) .mast h1 { white-space: normal; }
  html:not([lang=en]) .mast h1 > small { display: block; margin: 3px 0 0 .2rem; }
  html:not([lang=en]) .stage-legend { font-size: .78rem; }
  html:not([lang=en]) .on-air { gap: 5px; padding-inline: 5px; }
  html:not([lang=en]) .sound-group h3 { font-size: .73rem; }
  html:not([lang=en]) .plaque { max-width: 100%; gap: 2px; padding-inline: 2px 3px; font-size: .69rem; }
  html:not([lang=en]) .plaque b { width: 13px; height: 13px; flex: 0 0 13px; font-size: .68rem; }
  html:not([lang=en]) .plaque span { min-width: 0; overflow-wrap: anywhere; }
  html:not([lang=en]) .layer-tools { gap: 3px; }
  html:not([lang=en]) .layer-tools button { min-width: 0; padding-inline: 5px; font-size: .78rem; }
  html:not([lang=en]) .transport > button { font-size: .78rem; }
  html:not([lang=en]) .campaign-desk .transport > button { min-width: 0; }
  html:not([lang=en]) .beat-editor button { min-width: 41px; padding-inline: 5px; }
  html:not([lang=en]) #start-screen .slate { width: 100%; }
  html:not([lang=en]) .take-cues small { white-space: normal; }
}
@media (max-width: 830px) and (orientation: portrait) {
  html:not([lang=en]) .sound-group { grid-template-columns: 61px repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  html:not([lang=en]) .transport > :is(.undo, .guide-jump) { flex-shrink: 0; min-width: 44px; }
  html:not([lang=en]) .transport > :is(.edit-bank, .record) { min-width: 44px; white-space: normal; line-height: 1.15; }
  html:not([lang=en]) .transport > .edit-bank { padding-inline: 4px; }
}
