@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../assets/fonts/manrope-latin-ext.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../assets/fonts/manrope-latin.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
    U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --acid: #c8ff54;
  --muted: #919298;
  --line: #ffffff17;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #07080b;
  color: #f4f4f4;
  font-family: Manrope, Arial, sans-serif;
  font-size: 14px;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 13px;
  transition:
    background 0.2s,
    border 0.2s;
}
button:hover {
  background: #ffffff14;
  border-color: #ffffff55;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 4px;
}
button.selected,
button[aria-pressed='true'] {
  color: var(--acid);
  border-color: #c8ff5470;
  background: #c8ff5412;
}
kbd {
  font: 11px monospace;
  padding: 3px 5px;
  border: 1px solid #ffffff25;
  border-radius: 3px;
  color: #9d9ea3;
  margin-left: 8px;
}
#visual {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}
.shade {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, #06070bc2, transparent 55%),
    linear-gradient(0deg, #05060b 0%, #05060b40 37%, transparent 68%, #05060b70);
}
header {
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 28px 38px;
}
.brand {
  font:
    700 32px 'Space Grotesk',
    sans-serif;
  letter-spacing: -2px;
  color: white;
  text-decoration: none;
  white-space: nowrap;
}
.brand span {
  font-size: 13px;
  vertical-align: top;
  letter-spacing: 0;
  margin-left: 3px;
}
.brand .brand-vj {
  font-size: 0.4em;
  vertical-align: baseline;
  letter-spacing: 0.04em;
  margin-left: 6px;
}
.edition,
.eyebrow {
  font:
    11px 'Space Grotesk',
    sans-serif;
  letter-spacing: 2px;
  color: #b2b4b9;
}
.edition {
  border-left: 1px solid #ffffff35;
  padding-left: 25px;
  font-size: 10px;
}
.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.top-actions > #fps {
  font: 11px monospace;
  color: #9b9ea5;
  margin-right: 12px;
}
.top-actions button {
  font-size: 12px;
}
main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  top: 25%;
  left: 40px;
  right: 40px;
}
.scene-info h1 {
  font:
    500 clamp(38px, 4.4vw, 70px)/1.05 'Space Grotesk',
    sans-serif;
  letter-spacing: -3px;
  margin: 20px 0 14px;
}
.scene-info p {
  color: #a2a3aa;
  margin: 0 0 25px;
  font-size: 14px;
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acid);
  margin-right: 8px;
  box-shadow: 0 0 12px #c8ff5450;
}
.divider {
  margin: 0 14px;
  color: #686b72;
}
.scene-tags {
  display: flex;
  gap: 8px;
}
.scene-tags span {
  font: 10px monospace;
  letter-spacing: 1px;
  border: 1px solid #ffffff25;
  padding: 6px 9px;
  border-radius: 4px;
  color: #bdc0c5;
}
.signal {
  text-align: right;
  align-self: flex-start;
  padding-top: 12px;
  width: 230px;
}
.tempo {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
}
.tempo > span {
  font: 500 56px 'Space Grotesk';
  letter-spacing: -3px;
}
.tempo small {
  font: 11px monospace;
  color: #a5a6ab;
}
.tempo i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  align-self: center;
  margin-left: 8px;
}
.signal-note {
  color: #989aa0;
  font-size: 11px;
}
footer {
  position: absolute;
  bottom: 0;
  left: 38px;
  right: 38px;
}
.transport {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 10px;
}
.transport-left,
.transport-right {
  display: flex;
  gap: 8px;
  align-items: center;
}
.transport button {
  background: #080a0da0;
  font-size: 12px;
}
.transport #prev,
.transport #next {
  font-size: 18px;
  padding: 7px 14px;
}
.separator {
  width: 1px;
  height: 20px;
  background: var(--line);
  margin: 0 8px;
}
.off-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #64656b;
  margin-left: 7px;
}
#auto[aria-pressed='true'] .off-dot {
  background: var(--acid);
}
#library-toggle {
  color: var(--acid);
  border-color: #c8ff5440;
}
#library-toggle b {
  font-size: 10px;
  margin-left: 15px;
  background: #c8ff5420;
  padding: 3px 5px;
  border-radius: 3px;
}
.deck {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  background: #0e1014e8;
  border: 1px solid #ffffff20;
  border-radius: 12px;
  backdrop-filter: blur(20px);
  padding: 22px 0;
}
.deck-section {
  padding: 0 25px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.deck-section:last-child {
  border: 0;
}
.section-label {
  color: #666c74;
  font: 10px monospace;
  letter-spacing: 1px;
  margin-bottom: 18px;
}
.section-label span {
  color: #9da0a8;
  margin-left: 10px;
}
.mic-button,
#camera {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  font-size: 12px;
  padding: 11px;
}
.mic-button {
  background: var(--acid);
  color: #111;
  border: 0;
  font-weight: 800;
}
.mic-button:hover {
  background: #dcff8a;
  color: #111;
}
.button-plus {
  margin-left: auto;
}
.gain-row,
.range-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  font-size: 11px;
  color: #b4b6bd;
}
.gain-row label {
  min-width: 43px;
}
.range-row label {
  min-width: 61px;
}
input[type='range'] {
  min-width: 30px;
  width: 100%;
  height: 3px;
  accent-color: var(--acid);
  cursor: pointer;
}
output {
  font: 10px monospace;
  white-space: nowrap;
  min-width: 35px;
  text-align: right;
}
.meter {
  position: relative;
  height: 6px;
  background: #272a30;
  margin-top: 13px;
}
/* input gate threshold: below it no drums / drops are detected */
.meter b {
  position: absolute;
  top: -5px;
  bottom: -5px;
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}
.meter.gated i {
  background: #5d616b;
}
.meter i {
  display: block;
  height: 100%;
  background: var(--acid);
  width: 0;
  transition: width 0.08s;
}
.genre {
  display: flex;
  gap: 6px;
}
.genre button {
  font-size: 10px;
  letter-spacing: 0.5px;
  padding: 9px 10px;
  flex: 1;
}
.rhythm-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
}
.rhythm-row button {
  font-size: 11px;
  padding: 8px;
}
.bpm-input {
  font: 10px monospace;
  color: #838891;
  flex: 1;
  white-space: nowrap;
}
.bpm-input input {
  width: 49px;
  color: white;
  background: none;
  border: 0;
  font: 20px 'Space Grotesk';
  appearance: textfield;
}
.bpm-input input::-webkit-inner-spin-button {
  display: none;
}
.camera-section p {
  font-size: 10px;
  color: #696e78;
  margin-bottom: 0;
}
.bottom-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: space-between;
  padding: 17px 0;
  font: 9px monospace;
  letter-spacing: 1px;
  color: #6b707b;
}
.bottom-line i {
  margin: 0 10px;
}
.bottom-line b {
  color: var(--acid);
  font-size: 8px;
  margin-left: 6px;
}
.hidden-ui .chrome,
.hidden-ui .shade {
  display: none;
}
#show-controls {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: #090b11bb;
  opacity: 0.15;
}
#show-controls:hover {
  opacity: 1;
}
.hidden-ui #show-controls {
  display: block;
}
#toast {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: #1b2027;
  border: 1px solid #ffffff30;
  padding: 14px 20px;
  max-width: 90vw;
  z-index: 10;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
#toast.visible {
  opacity: 1;
}
dialog {
  color: inherit;
  background: #101217;
  border: 1px solid #ffffff25;
  border-radius: 16px;
  padding: 28px;
  width: min(960px, 92vw);
  max-height: 85vh;
}
dialog::backdrop {
  background: #02040ad0;
  backdrop-filter: blur(12px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.dialog-head h2 {
  font: 500 28px 'Space Grotesk';
  letter-spacing: -1px;
}
.dialog-head button {
  font-size: 22px;
}
/* Only scene cards scroll: the title and all filters stay accessible, including on touch screens. */
#library {
  padding: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
  overflow: hidden;
}
#library[open] {
  display: flex;
  flex-direction: column;
}
.library-header {
  flex: 0 0 auto;
  padding: 24px 28px 0;
  background: #101217;
  border-bottom: 1px solid var(--line);
}
.library-header .dialog-head {
  position: static;
  gap: 12px;
}
.library-header .dialog-head > div:first-child {
  min-width: 0;
}
.library-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 0 28px 28px;
}
@media (max-width: 600px) {
  .library-header {
    padding: 16px 16px 0;
  }
  .library-content {
    padding: 0 16px 16px;
  }
}
@media (max-height: 500px) {
  .library-header {
    padding-top: 8px;
  }
  .library-header .eyebrow {
    display: none;
  }
  .library-header h2 {
    margin-block: 8px;
    font-size: 20px;
  }
  .library-header .library-tools {
    margin-block: 8px;
    gap: 6px;
  }
}
.library-tools {
  display: flex;
  gap: 12px;
  margin: 12px 0 24px;
}
.library-tools input,
.library-tools select {
  background: #1b1d24;
  color: white;
  border: 1px solid #ffffff25;
  padding: 12px;
  border-radius: 6px;
  min-width: 0;
}
.library-tools input {
  flex: 1;
}
#hidden-toggle {
  padding: 12px;
  border-radius: 6px;
  white-space: nowrap;
}
#hidden-toggle.selected {
  border-color: currentColor;
}
#scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.scene-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left;
  padding: 0;
  overflow: hidden;
}
.scene-card .thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background: radial-gradient(
    ellipse at center,
    transparent 12%,
    #c8ff5490 13%,
    transparent 16%,
    transparent 29%,
    #c8ff5460 30%,
    transparent 34%,
    #090d16 80%
  );
  filter: hue-rotate(var(--hue));
  position: relative;
}
.scene-card .thumb:after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(from var(--angle), transparent 0deg 18deg, #0009 20deg 28deg);
  mix-blend-mode: overlay;
}
.scene-card .thumb img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scene-card .thumb:has(img) {
  filter: none;
}
.scene-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 12px 12px;
}
.scene-card .tags i {
  font: 9px/1 monospace;
  font-style: normal;
  letter-spacing: 0.04em;
  padding: 3px 5px;
  border-radius: 3px;
  color: #b8bec8;
  background: #ffffff12;
}
.scene-card .tags .energy.chill {
  color: #9fd8ff;
  background: #4aa8ff26;
}
.scene-card .tags .energy.dance {
  color: #c8ff54;
  background: #c8ff5422;
}
.scene-card .tags .energy.death {
  color: #ff8a7a;
  background: #ff4a3a2a;
}
#vibe-note {
  margin: -4px 0 12px;
  font-size: 12px;
  color: #8f959f;
}
.scene-card strong {
  display: block;
  padding: 12px 12px 3px;
  font-size: 12px;
}
.scene-card small {
  display: block;
  padding: 0 12px 8px;
  font: 10px monospace;
  color: #8f959f;
}
#help-dialog {
  max-width: 580px;
}
#help-dialog p {
  font-size: 14px;
  line-height: 1.7;
  color: #b4bac4;
}
.shortcuts {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 13px;
  margin-top: 25px;
}
.shortcuts span:nth-child(odd) {
  color: var(--acid);
}
@media (min-height: 950px) {
  main {
    top: 29%;
  }
  .deck {
    padding: 28px 0;
  }
}
@media (max-width: 1000px) {
  .edition {
    display: none;
  }
  .deck-section {
    padding: 0 14px;
  }
  .deck {
    grid-template-columns: 1fr 1fr;
  }
  .deck-section:nth-child(2) {
    border-right: 0;
  }
  .deck-section:nth-child(n + 3) {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
  }
  main {
    top: 19%;
  }
  .scene-info h1 {
    font-size: 46px;
  }
  .signal {
    width: 170px;
  }
  .signal canvas {
    width: 170px;
  }
  .bottom-line > span:nth-child(2) {
    display: none;
  }
}
@media (max-width: 600px) {
  header {
    padding: 18px;
  }
  .brand {
    font-size: 27px;
  }
  .top-actions {
    gap: 7px;
  }
  .top-actions > #fps,
  .top-actions button span,
  .top-actions kbd {
    display: none;
  }
  main {
    left: 20px;
    right: 20px;
    top: 105px;
  }
  .scene-info h1 {
    font-size: 34px;
    letter-spacing: -1.6px;
  }
  .scene-info p {
    font-size: 11px;
    max-width: 230px;
    line-height: 1.5;
  }
  .scene-tags span {
    font-size: 8px;
  }
  .signal {
    display: none;
  }
  .eyebrow {
    font-size: 9px;
  }
  footer {
    left: 12px;
    right: 12px;
  }
  .deck {
    padding: 16px 0;
  }
  .section-label {
    font-size: 9px;
    margin-bottom: 12px;
  }
  .deck-section {
    padding: 0 12px;
  }
  .range-row {
    gap: 5px;
  }
  .range-row label {
    min-width: 50px;
  }
  .genre button {
    padding: 8px 5px;
    font-size: 9px;
  }
  .mic-button,
  #camera {
    font-size: 10px;
    gap: 5px;
  }
  .transport {
    margin-bottom: 10px;
  }
  .transport button {
    padding: 8px;
  }
  #random span,
  #hide,
  #library-toggle b {
    display: none;
  }
  .separator {
    margin: 0 2px;
  }
  .bottom-line {
    font-size: 8px;
    padding: 12px 0;
  }
  .rhythm-row kbd {
    display: none;
  }
  #scene-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  dialog {
    padding: 18px;
  }
  .dialog-head h2 {
    font-size: 23px;
  }
}
@media (max-height: 680px) and (min-width: 1001px) {
  main {
    top: 20%;
  }
  .scene-info h1 {
    font-size: 44px;
  }
  .deck {
    padding: 16px 0;
  }
}
@media (max-height: 740px) and (max-width: 600px) {
  body:not(.hidden-ui) {
    min-height: 800px;
  }
  main {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    margin: 24px 20px 70px;
  }
  footer {
    position: relative;
    left: auto;
    right: auto;
    margin: 0 12px;
  }
  .scene-info h1 {
    margin-top: 14px;
  }
}

/* Live performance controls */
.shade {
  background:
    linear-gradient(90deg, #06070b65, transparent 52%),
    linear-gradient(0deg, #05060be0, transparent 40%, transparent 80%, #05060b40);
}
.scene-info {
  text-shadow:
    0 2px 20px #000,
    0 1px 4px #000;
}
.signal {
  text-shadow: 0 2px 8px #000;
}
#dj-overlay {
  position: fixed;
  left: 50%;
  top: 46%;
  z-index: 0;
  pointer-events: none;
  width: 86vw;
  max-width: 1100px;
  text-align: center;
  will-change: transform;
  transform: translate(-50%, -50%);
}
#dj-overlay[hidden] {
  display: none;
}
#dj-text {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
  font-size: 2vw;
  opacity: 0.45;
  line-height: 1.08;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
  color: #d2d7dc;
  text-shadow: 0 1px 5px #0006;
  max-width: 100%;
}
.chrome {
  z-index: 1;
}
header {
  position: relative;
}
.mix-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
.mix-grid h3 {
  font-size: 16px;
  margin: 12px 0 20px;
}
.mix-grid p {
  color: #a9aeb7;
  font-size: 13px;
  line-height: 1.6;
}
.mix-grid .range-row {
  font-size: 14px;
  gap: 10px;
  margin: 24px 0;
}
.mix-grid .range-row label {
  min-width: 78px;
}
.mix-grid output {
  font-size: 12px;
  min-width: 43px;
}
.check-row {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}
.check-row input {
  accent-color: var(--acid);
  width: 17px;
  height: 17px;
}
.dj-settings {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.dj-settings > label:not(.check-row) {
  display: block;
  color: #adb3bc;
  margin-bottom: 8px;
}
.dj-settings > input {
  display: block;
  width: 100%;
  background: #090c11;
  border: 1px solid #ffffff30;
  border-radius: 7px;
  padding: 14px;
  color: white;
  margin-bottom: 16px;
  font-size: 18px;
}
.camera-activity {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #a9aeb7;
  font-size: 12px;
}
.camera-activity meter {
  width: 90px;
  accent-color: var(--acid);
}
@media (max-width: 600px) {
  .mix-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .dj-settings {
    grid-column: auto;
  }
  .transport-left,
  .transport-right {
    gap: 5px;
  }
  .transport {
    gap: 4px;
  }
  .scene-info h1 {
    font-size: 31px;
  }
  #dj-text {
    letter-spacing: -0.025em;
  }
}
@media (max-height: 800px) and (min-width: 601px) and (max-width: 1000px) {
  body:not(.hidden-ui) {
    min-height: 900px;
  }
  main {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    margin: 35px 38px 70px;
  }
  footer {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    margin: 0 38px;
  }
}

#language {
  background: transparent;
  color: inherit;
  border: 1px solid #ffffff30;
  border-radius: 6px;
  padding: 9px 6px;
  font:
    12px 'Space Grotesk',
    sans-serif;
  cursor: pointer;
  max-width: 76px;
}
#language:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}
#family-tag {
  text-transform: uppercase;
}
.range-row label {
  flex-shrink: 0;
}
.mix-grid .range-row label {
  min-width: 95px;
}
.camera-section .range-row label {
  max-width: 80px;
}
.section-label span {
  letter-spacing: 0.5px;
}
.top-actions {
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.top-actions > * {
  flex: 0 0 auto;
}
footer.chrome .transport,
footer.chrome .transport-left,
footer.chrome .transport-right {
  flex-wrap: wrap;
  min-width: 0;
}
@media (max-width: 1500px) {
  body > header.chrome .edition {
    display: none;
  }
}
/* Wrapped controls need normal flow so they cannot cover the current scene. */
@media (max-width: 1500px), (max-height: 800px) {
  body:not(.hidden-ui):not(.simple-ui) > main.chrome {
    position: relative;
    inset: auto;
    margin: 24px 38px 48px;
  }
  body:not(.hidden-ui):not(.simple-ui) > footer.chrome {
    position: relative;
    inset: auto;
    margin: 0 38px;
  }
}
@media (max-width: 1000px) {
  body > header.chrome {
    flex-wrap: wrap;
    gap: 14px;
  }
  body > header.chrome .top-actions {
    flex-basis: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
  body:not(.hidden-ui):not(.simple-ui) > main.chrome {
    position: relative;
    inset: auto;
    margin: 24px 20px 48px;
  }
  body:not(.hidden-ui):not(.simple-ui) > footer.chrome {
    position: relative;
    inset: auto;
    margin: 0 12px;
  }
}
.mix-grid .check-row {
  line-height: 1.5;
}
#camera-direction {
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  header {
    gap: 8px;
  }
  .top-actions {
    gap: 5px;
  }
  .top-actions button {
    padding: 9px;
  }
  .top-actions #language {
    padding: 8px 4px;
  }
  .genre button {
    white-space: nowrap;
  }
  .deck-section .range-row {
    flex-wrap: wrap;
  }
  .deck-section .range-row input {
    flex: 1;
  }
  .deck-section .range-row label {
    max-width: 80px;
  }
}

.scene-card[data-scene^='12'] .thumb {
  background: repeating-radial-gradient(circle at center, #c8ff54 0 2px, transparent 3px 12px), #10141b;
}

.projection-tools {
  position: fixed;
  left: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px;
  background: #090b11db;
  border-radius: 10px;
  font-size: 12px;
}
.projecting .projection-tools {
  display: none;
}
#projection-note {
  position: fixed;
  top: 24px;
  left: 24px;
  padding: 14px;
  background: #090b11db;
  border-radius: 8px;
}
.projection-output #engine-status,
.projection-output #scene-desc {
  position: fixed;
  top: 80px;
  left: 24px;
  background: #090b11db;
}
.projection-output.projecting {
  cursor: none;
}
/* Hide the pointer only for an explicitly clean output; compact controls are still an operator UI. */
body.hidden-ui:not(:has(dialog[open])) {
  cursor: none;
}
body.simple-ui .chrome,
body.hidden-ui #show-controls {
  cursor: auto;
}
@media (max-width: 600px) {
  .projection-tools {
    right: 24px;
    flex-wrap: wrap;
  }
}

#auto-mood-note {
  color: #a5abb5;
  font-size: 12px;
}
.library-tools {
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .transport {
    flex-wrap: wrap;
  }
  .transport-right {
    margin-left: auto;
  }
  .library-tools select {
    flex: 1;
  }
}

#cameo-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
}
@media (max-width: 800px) {
  .top-actions {
    gap: 5px;
  }
  .top-actions button {
    padding: 8px;
  }
  .top-actions button span {
    display: none;
  }
}

#new-art {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  display: none;
  pointer-events: none;
}
.deck {
  backdrop-filter: none;
}
#scope {
  contain: strict;
}

/* Scene transitions (renderers/transition-layer.js): above every scene canvas, below the overlays. */
/* FX over the picture (renderers/fx-layer.js): above the scene and camera canvases, below every overlay */
#fx-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: none;
  pointer-events: none;
}
#transition-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  display: none;
  pointer-events: none;
}
#world-3d {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  display: none;
  pointer-events: none;
}
#train-frame {
  display: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border: clamp(12px, 3vw, 45px) solid #242b2d;
  border-radius: 10%;
  box-shadow:
    inset 0 0 0 5px #788381,
    inset 0 0 45px #18232488;
}
body.train-scene #train-frame {
  display: block;
}
#train-frame:after {
  content: '';
  position: absolute;
  left: 48%;
  top: 0;
  bottom: 0;
  width: 12px;
  background: #313c3e;
  box-shadow: 2px 0 0 #84918d;
}

.drop-status {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 2px 0 7px auto;
  padding: 4px 8px;
  border: 1px solid #ffffff25;
  border-radius: 4px;
  color: #9ba7ae;
  background: #07131aab;
  font:
    10px 'Space Grotesk',
    sans-serif;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}
.drop-status.active {
  color: #fff1ba;
  border-color: #ffbd62;
  background: #ad4d2388;
  box-shadow:
    0 0 16px #ff7a45aa,
    0 0 36px #ff7a4555;
  text-shadow: 0 0 8px #fff2c6;
}
#settings-dialog {
  max-width: 760px;
  width: min(760px, 94vw);
}
.settings-grid {
  margin-top: 18px;
}
#settings-dialog p {
  color: #aab2bd;
  font-size: 13px;
  line-height: 1.6;
}
.settings-fields {
  display: grid;
  gap: 16px;
}
.settings-fields > label {
  display: grid;
  gap: 7px;
  color: #bfc5cf;
  font-size: 13px;
}
.settings-fields > label[hidden] {
  display: none;
}
.settings-fields select,
.camera-visuals-choice select {
  background: #0a0e13;
  color: white;
  padding: 10px;
  border: 1px solid #ffffff30;
  border-radius: 6px;
  width: 100%;
}
.settings-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.settings-actions #settings-save {
  background: var(--acid);
  color: #111;
  border-color: var(--acid);
  font-weight: 800;
}
#settings-open,
.privacy-link {
  color: var(--acid);
}
.privacy-link {
  font-size: 11px;
  text-decoration: none;
}
.privacy-link:hover {
  text-decoration: underline;
}
.camera-visuals-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: #b4b6bd;
  font-size: 11px;
}
.camera-visuals-choice select {
  width: 74px;
  padding: 7px 8px;
}
.camera-section #camera {
  background: var(--acid);
  color: #111;
  border: 0;
  font-weight: 800;
}
.camera-section #camera:hover {
  background: #dcff8a;
  color: #111;
}

#dj-text[hidden],
#dj-logo[hidden] {
  display: none;
}
#dj-logo {
  display: block;
  margin: auto;
  width: 12vw;
  max-width: 80vw;
  max-height: 55vh;
  object-fit: contain;
  opacity: 0.45;
}
#dj-logo-file {
  font-size: 14px;
}
.dj-settings #dj-logo-remove {
  margin-top: 14px;
}

/* Phone fullscreen: horizontal swipes change the scene (app.js), so the page itself must not pan or zoom. */
.hidden-ui {
  touch-action: none;
}

#camera-show {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  display: none;
}
.camera-auto {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #ffffff14;
  color: #b4b6bd;
  font-size: 11px;
}
.camera-auto-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 8px 0 2px;
}
.camera-auto-modes label {
  display: flex;
  align-items: center;
  gap: 5px;
}
.camera-auto .camera-visuals-choice select {
  width: auto;
}
.camera-section p.camera-auto-note {
  margin-top: 6px;
  color: #7c7f87;
}

/* D diagnostics stay in the operator window; stack on smaller screens. */
#debug-panels {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
  max-width: calc(100vw - 24px);
}
#rhythm-debug {
  background: rgba(0, 0, 0, 0.78);
  border-radius: 8px;
  width: 420px;
  max-width: 100%;
  height: auto;
}
#character-debug {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 50;
  width: 640px;
  max-width: calc(100vw - 24px);
  height: auto;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.82);
  pointer-events: none;
}
#performance-debug {
  box-sizing: border-box;
  width: 390px;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font: 12px/1.5 monospace;
}
#performance-debug[hidden] {
  display: none;
}
#performance-debug dl {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  margin: 4px 0;
}
#performance-debug dt {
  color: #aaa;
}
#performance-debug dd {
  margin: 0;
  overflow-wrap: anywhere;
}
#performance-debug small {
  color: #aaa;
  font-size: 10px;
}
#performance-debug[data-warning='true'] {
  box-shadow: inset 0 0 0 1px #ffb020;
}
@media (max-width: 850px) {
  #debug-panels {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* UI reorganization 2026-10: section links, input/camera panel, FX drawer, tabbed settings */
.section-label {
  display: flex;
  align-items: center;
  gap: 0;
}
.section-link {
  margin-left: auto;
  padding: 4px 0 4px 10px;
  border: 0;
  background: none;
  color: var(--acid);
  font:
    600 11px 'Space Grotesk',
    sans-serif;
  letter-spacing: 0.3px;
  cursor: pointer;
}
.section-link:hover {
  text-decoration: underline;
  background: none;
}
.mix-grid .section-link {
  margin: 6px 0 12px;
  padding: 6px 0;
  display: block;
}
.secondary-button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding: 9px 14px;
  background: transparent;
  border: 1px solid #ffffff30;
  color: #dfe2e6;
  font-size: 12px;
}
.camera-uses {
  display: grid;
  margin: 10px 0 8px;
}
.camera-uses .check-row {
  min-height: 34px;
  font-size: 12px;
  color: #d3d6db;
}
.camera-shot-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.camera-shot-buttons button {
  font-size: 11px;
  padding: 8px 6px;
  white-space: nowrap;
}
.camera-shot-buttons button[aria-pressed='true'] {
  border-color: var(--acid);
  color: var(--acid);
}
#cam-block[aria-pressed='true'] {
  border-color: #ff7749;
  color: #ff9d7a;
}
/* The shell stays fixed; only the selected panel scrolls. */
#settings-dialog {
  width: min(1000px, calc(100vw - 32px));
  max-width: 1000px;
  height: min(800px, calc(100dvh - 48px));
  max-height: calc(100dvh - 48px);
  overflow: hidden;
}
#settings-dialog[open] {
  display: flex;
  flex-direction: column;
}
.settings-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 24px;
  margin-top: 18px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.settings-tabs {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.settings-tabs > button {
  flex-shrink: 0;
}
.settings-panels {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-inline-end: 8px;
}
#settings-dialog > .dialog-head,
#settings-dialog > .settings-footer {
  flex-shrink: 0;
}
.settings-tabs button {
  text-align: left;
  padding: 12px 14px;
  min-height: 44px;
  border: 1px solid transparent;
  background: transparent;
  color: #cfd3d9;
  font-size: 14px;
}
.settings-tabs button[aria-selected='true'] {
  border-color: #c8ff5470;
  background: #c8ff5418;
  color: var(--acid);
}
.settings-panel > p:first-child {
  margin-top: 0;
}
.settings-panel .range-row {
  font-size: 13px;
  gap: 10px;
  margin: 18px 0;
}
.settings-panel .range-row label {
  min-width: 110px;
}
.settings-panel .camera-auto-modes {
  font-size: 13px;
  gap: 8px 16px;
  margin-bottom: 14px;
}
.settings-panel #language {
  max-width: none;
  width: 100%;
  padding: 10px;
  font-size: 13px;
}
.settings-panel.dj-settings {
  border-top: 0;
  padding-top: 0;
}
.settings-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.settings-footer #settings-save {
  background: var(--acid);
  color: #111;
  border-color: var(--acid);
  font-weight: 800;
}
#settings-dialog .settings-footer p {
  margin: 0;
}
@media (max-width: 700px) {
  #settings-dialog {
    width: calc(100vw - 16px);
    height: min(800px, calc(100dvh - 16px));
    max-height: calc(100dvh - 16px);
    padding: 16px;
  }
  .settings-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    margin-top: 10px;
  }
  .settings-tabs {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .settings-tabs button {
    flex: 0 0 auto;
    text-align: center;
    padding: 10px 12px;
  }
  .settings-panels {
    padding-inline-end: 4px;
  }
  #settings-dialog > .settings-footer {
    margin-top: 10px;
    padding-top: 10px;
  }
  #settings-manual {
    max-width: 40%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
@media (pointer: coarse) {
  .section-link,
  .camera-uses .check-row,
  .camera-shot-buttons button {
    min-height: 44px;
  }
}

.deck-link-decks {
  list-style: none;
  padding: 0;
  margin: 0;
}
.deck-link-decks li {
  border-top: 1px solid var(--line);
  padding: 10px 0;
  overflow-wrap: anywhere;
}
.deck-link-help {
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.6;
}
.deck-link-help summary {
  cursor: pointer;
  color: var(--acid);
}
.deck-link-help li {
  margin-bottom: 8px;
}

/* Scene tree editor, LIVE pool, setlist (2026-10) */
.pool-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px 0 10px;
  min-height: 34px;
  border: 1px solid #c8ff5470;
  border-radius: 6px;
  background: #080a0dc0;
  color: var(--acid);
  font:
    11px 'Space Grotesk',
    sans-serif;
  letter-spacing: 0.4px;
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
}
.pool-chip[hidden] {
  display: none;
}
.pool-chip button {
  border: 0;
  background: none;
  padding: 4px 8px;
  font-size: 15px;
  color: inherit;
}
.setlist-chip {
  padding-right: 10px;
  border-color: #ff8a5c80;
  color: #ffb08f;
}
.scene-card.in-pool {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}
#tree-editor {
  width: calc(100vw - 32px);
  max-width: none;
  height: calc(100dvh - 32px);
  max-height: none;
  display: none;
  flex-direction: column;
  padding: 22px;
}
#tree-editor[open] {
  display: flex;
}
.tree-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
#tree-status {
  color: #a9aeb7;
  font-size: 12px;
  margin-left: 8px;
}
.tree-hint {
  color: #8f949c;
  font-size: 12px;
  margin: 8px 0;
}
.tree-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 44px;
  max-height: 22vh;
  overflow: auto;
  padding: 8px;
  border: 1px dashed #ffffff30;
  border-radius: 10px;
  margin-bottom: 12px;
}
.tree-tray-head {
  width: 100%;
  color: #a9aeb7;
  font: 11px monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.tree-board {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 12px;
  overflow: auto;
  align-items: flex-start;
}
.tree-col {
  flex: 0 0 260px;
  background: #15171d;
  border: 1px solid #ffffff1c;
  border-radius: 12px;
  padding: 8px;
  max-height: 100%;
  overflow: auto;
}
.tree-col-head,
.tree-leaf-head {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: grab;
}
.tree-col-head {
  padding: 4px 2px 8px;
}
.tree-name {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #f2f3f5;
  padding: 5px 6px;
  font:
    600 14px Manrope,
    sans-serif;
}
.tree-col-head .tree-name {
  font:
    600 16px 'Space Grotesk',
    sans-serif;
}
.tree-name:hover,
.tree-name:focus {
  border-color: #ffffff30;
  background: #0b0d11;
}
.tree-count {
  font: 11px monospace;
  color: #8f949c;
  padding: 2px 6px;
  border-radius: 4px;
  background: #ffffff0d;
}
.tree-count.over {
  color: #ffb08f;
  background: #ff774930;
}
.tree-del {
  border: 0;
  background: none;
  color: #8f949c;
  padding: 2px 6px;
  font-size: 15px;
}
.tree-del:hover {
  color: #ff9d7a;
  background: none;
}
.tree-leaf {
  background: #0e1014;
  border: 1px solid #ffffff14;
  border-radius: 9px;
  padding: 6px;
  margin-bottom: 8px;
}
.tree-chips {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 30px;
  margin-top: 4px;
}
.tree-direct {
  margin-bottom: 8px;
}
.tree-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px 3px 3px;
  border-radius: 6px;
  background: #1c1f26;
  font-size: 12px;
  color: #e3e5e9;
  cursor: grab;
  user-select: none;
}
.tree-tray .tree-chip {
  flex: 0 0 auto;
}
.tree-chip img {
  width: 44px;
  height: 25px;
  object-fit: cover;
  border-radius: 4px;
}
.tree-chip span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tree-chip.hidden-scene {
  opacity: 0.55;
}
.mood-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #52e4ff;
}
.mood-dot.dance {
  background: var(--acid);
}
.mood-dot.death {
  background: #ff7749;
}
.tree-add-sub {
  width: 100%;
  font-size: 12px;
  border-style: dashed;
}
.drop-over {
  outline: 2px solid var(--acid);
  outline-offset: 1px;
}
.setlist {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.setlist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.setlist-head h3,
.setlist-manual {
  margin: 0;
  font-size: 16px;
}
.setlist-cols,
.setlist-row {
  display: grid;
  grid-template-columns: 96px 96px minmax(80px, 1fr) 54px 104px 104px minmax(100px, 1fr) 36px 30px;
  gap: 6px;
  align-items: center;
}
.setlist-cols {
  color: #8f949c;
  font: 10px monospace;
  letter-spacing: 0.5px;
  margin-top: 10px;
}
.setlist-row {
  padding: 5px;
  border-radius: 8px;
  margin-top: 4px;
}
.setlist-row.active {
  background: #c8ff5414;
  outline: 1px solid #c8ff5460;
}
.setlist-row input,
.setlist-row select {
  min-width: 0;
  width: 100%;
  background: #0a0e13;
  color: white;
  border: 1px solid #ffffff30;
  border-radius: 6px;
  padding: 7px 6px;
  font-size: 12px;
}
.setlist-row input[type='time'] {
  color-scheme: dark;
}
.setlist-logo {
  height: 32px;
  padding: 0 4px;
  font-size: 11px;
  overflow: hidden;
}
.setlist-logo img {
  max-width: 44px;
  max-height: 26px;
  object-fit: contain;
}
.setlist-play,
.setlist-del {
  padding: 6px 0;
  font-size: 13px;
}
.setlist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
@media (max-width: 700px) {
  .setlist-cols {
    display: none;
  }
  .setlist-row {
    grid-template-columns: 1fr 1fr 1fr;
    border: 1px solid #ffffff14;
  }
  .tree-col {
    flex-basis: 220px;
  }
}

/* S: Spectro Lines overlay (operator window only) */
#spectro-overlay {
  position: fixed;
  top: 76px;
  right: 16px;
  z-index: 61;
  width: min(960px, calc(100vw - 32px));
  aspect-ratio: 16 / 9;
  border: 1px solid #ffffff30;
  border-radius: 10px;
  overflow: hidden;
  background: #04050a;
  box-shadow: 0 12px 40px #000a;
  pointer-events: none;
}
#spectro-overlay[hidden] {
  display: none;
}
#spectro-overlay canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#feedback-dialog {
  width: min(560px, 94vw);
}
#feedback-form textarea,
#feedback-email {
  box-sizing: border-box;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #090c10;
  color: #edf0f2;
  font: inherit;
}
#feedback-form textarea {
  resize: vertical;
}
#feedback-form .check-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}
.feedback-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.feedback-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.feedback-actions a {
  color: #aab2bd;
}
.bottom-line .feedback-open {
  background: transparent;
  color: inherit;
  border: 0;
  padding: 0;
  font: inherit;
  text-transform: inherit;
}

#feedback-form p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #aab2bd;
}

#feedback-submit:not(:disabled) {
  background: var(--acid);
  border-color: var(--acid);
  color: #111;
  font-weight: 700;
}
#feedback-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.scene-entry {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.scene-entry .scene-card {
  width: 100%;
  flex: 1;
}
.auto-indicator {
  display: none;
  position: fixed;
  left: calc(18px + env(safe-area-inset-left));
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: 34px;
  height: 34px;
  z-index: 8;
  pointer-events: none;
  color: #fff;
  opacity: 0.6;
}
.hidden-ui .auto-indicator:not([hidden]),
:fullscreen .auto-indicator:not([hidden]),
.projection-output .auto-indicator:not([hidden]) {
  display: block;
}
.auto-indicator svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.auto-indicator circle {
  fill: #080b1090;
  stroke: currentColor;
  stroke-width: 2;
}
.auto-indicator .auto-track {
  stroke-opacity: 0.2;
}
.auto-indicator .auto-progress {
  fill: none;
  stroke-dasharray: 94.248;
  stroke-dashoffset: 94.248;
  stroke-linecap: round;
}
.auto-indicator span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
}
.auto-indicator.final {
  color: #ffd84a;
}
.auto-indicator.final span {
  font-size: 14px;
}
.auto-indicator.waiting .auto-progress {
  animation: auto-wait 1.2s ease-in-out infinite;
}
@keyframes auto-wait {
  50% {
    stroke-opacity: 0.35;
  }
}
.hidden-ui:has(.auto-indicator:not([hidden])) #show-controls {
  left: calc(64px + env(safe-area-inset-left));
}
.rotary-control {
  display: inline-grid;
  justify-items: center;
  gap: 3px;
  flex-shrink: 0;
  color: #aab2bd;
  font-size: 10px;
}
.rotary-control output {
  font: 11px monospace;
  color: #e6e9eb;
  width: 44px;
  min-width: 0;
  text-align: center;
}
.rotary-knob {
  --knob-angle: 0deg;
  position: relative;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: ns-resize;
  touch-action: none;
  user-select: none;
}
.rotary-knob:hover {
  background: transparent;
}
.rotary-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  pointer-events: none;
}
.rotary-track {
  stroke: #ffffff25;
}
.rotary-fill {
  stroke: var(--acid);
}
.rotary-range {
  stroke: #c8ff5499;
}
.rotary-all .rotary-range {
  stroke: var(--acid);
}
.rotary-detent-hit {
  fill: transparent;
  stroke: none;
  pointer-events: all;
  cursor: pointer;
}
.rotary-detent {
  fill: #07080b;
  stroke: #c8ff54;
  stroke-width: 1.5;
  pointer-events: all;
  cursor: pointer;
}
.rotary-all .rotary-detent {
  fill: var(--acid);
}
.rotary-center-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--acid);
  font:
    700 9px Manrope,
    Arial,
    sans-serif;
  pointer-events: none;
}
/* The AutoPlay detent label must fit inside the existing mixer knob. */
.rotary-default .rotary-center-text {
  font-size: 7.5px;
  letter-spacing: -0.2px;
}
.rotary-all .rotary-needle {
  visibility: hidden;
}
.rotary-knob::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #20252e;
  border: 1px solid #ffffff15;
}
.rotary-needle {
  position: absolute;
  inset: 11px;
  transform: rotate(var(--knob-angle));
  pointer-events: none;
}
.rotary-needle::before {
  content: '';
  position: absolute;
  width: 2px;
  height: 7px;
  top: 0;
  left: calc(50% - 1px);
  border-radius: 1px;
  background: #fff;
}
.rotary-knob:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}
.rotary-auto:focus-visible {
  /* Keep keyboard focus visually distinct from the green scene-selection range. */
  outline: 1px dashed #ffffff70;
  outline-offset: 4px;
}
.tree-family {
  width: 52px;
  flex-shrink: 0;
  font-size: 10px;
  padding: 1px 2px;
}
.tree-leaf.family {
  outline: 1px solid #ffd84a80;
}
.scene-skip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px 6px;
  font-size: 10px;
  opacity: 0.8;
  cursor: pointer;
}
.scene-entry.skipped .scene-card {
  opacity: 0.4;
}
.scene-preferences {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
}
#auto-pace-control {
  display: flex;
  align-items: center;
  padding: 0 5px;
}

.scene-preferences .rotary-control {
  flex: 1;
  min-width: 0;
  font-size: 9px;
  align-self: flex-start;
}
.scene-duration .rotary-fill,
.scene-duration .rotary-detent {
  stroke: #bb9aff;
}
.scene-duration .rotary-default .rotary-detent {
  fill: #bb9aff;
}
.scene-duration .rotary-center-text {
  color: #d2baff;
}
.scene-duration .rotary-default .rotary-needle {
  visibility: hidden;
}
.scene-duration output {
  width: auto;
  min-width: 44px;
  color: #d2baff;
}
.scene-duration-default {
  max-width: 100%;
  color: #a99abd;
  text-align: center;
  font-size: 8px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.scene-preferences-info {
  font-size: 12px;
  line-height: 1.5;
  margin: 12px 0;
  color: #aab2bd;
}
.scene-preferences-info summary {
  cursor: pointer;
}
/* These controls switch between the hosted companion and the local desktop source selector. */
#deck-link-companion[hidden],
#deck-link-local-controls[hidden],
#deck-link-monitor[hidden] {
  display: none !important;
}
#deck-link-companion a,
#deck-link-monitor {
  color: var(--acid);
}
#deck-link-connect {
  background: var(--acid);
  color: #07080b;
  font-weight: 700;
  margin-right: 12px;
}
#deck-link-connect:disabled {
  opacity: 0.7;
  cursor: default;
}

/* Performance surface: large touch targets, static thumbnails and no editing tools. */
#live-board {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
  padding: 0;
  overflow: hidden;
}
#live-board[open] {
  display: flex;
  flex-direction: column;
}
.live-board-header {
  flex: 0 0 auto;
  max-height: 55dvh;
  overflow-y: auto;
  padding: 16px 28px 0;
  background: #101217;
  border-bottom: 1px solid var(--line);
}
.live-board-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 16px 28px 24px;
}
.live-board-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.live-board-bar > div {
  flex: 1;
}
.live-board-bar h2 {
  margin: 0;
}
#live-board-genre {
  width: auto;
  min-width: 84px;
  flex: 0 0 auto;
}
.remote-pads-page #live-board-genre {
  min-height: 48px;
}
.live-board-bar p {
  margin: 6px 0 0;
  color: #aab2bd;
  font-size: 12px;
}
#live-board button {
  touch-action: manipulation;
  min-height: 48px;
}
#live-board button[aria-pressed='true'] {
  border-color: var(--acid);
  background: #c8ff541a;
}
#live-board button:disabled {
  opacity: 0.35;
  cursor: default;
}
#live-board-range,
.live-branch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
#live-board-range {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
#live-board-panels {
  display: grid;
  gap: 16px;
}
.live-branch-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff03;
}
.live-branch-panel h3 {
  font-size: 13px;
  color: #aab2bd;
  margin: 0 0 12px;
}
.live-branch-panel > .live-branch-panel {
  margin-top: 12px;
}
.live-scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 10px;
}
.live-scene-tile {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 0 0 10px;
  text-align: left;
  overflow: hidden;
  align-content: start;
  background: #171a20;
}
.live-scene-tile img {
  grid-column: 1 / -1;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #20252e;
}
.live-scene-tile strong {
  min-width: 0;
  overflow-wrap: anywhere;
  padding-left: 10px;
  font-size: 12px;
}
.live-scene-tile small {
  padding-right: 10px;
  color: #aab2bd;
  font: 11px monospace;
}
.live-scene-tile[aria-pressed='true'] {
  box-shadow: inset 0 0 0 1px var(--acid);
}
@media (max-width: 600px) {
  .live-board-header {
    padding: 12px 12px 0;
  }
  .live-board-content {
    padding: 12px;
  }
  .live-board-bar > div {
    min-width: 0;
  }
  .live-board-bar h2 {
    font-size: 18px;
  }
  .live-board-bar p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .live-board-bar button {
    padding: 8px;
    font-size: 12px;
  }
  #live-board-range,
  .live-branch-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 6px;
  }
  #live-board-range button,
  .live-branch-row button {
    flex-shrink: 0;
  }
  .live-branch-panel {
    padding: 10px;
  }
  .live-scene-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#settings-dialog > .dialog-head {
  position: static;
  top: auto;
  gap: 12px;
  z-index: 5;
  background: #101115;
  padding-block: 8px;
}
#settings-dialog > .dialog-head h2 {
  margin-right: auto;
}
#settings-manual {
  color: var(--acid);
  font-size: 12px;
  white-space: nowrap;
}
.setlist {
  container-type: inline-size;
}
.setlist-row .rotary-control {
  justify-self: center;
}
.setlist-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-size: 10px;
  color: #aab2bd;
}
@container (max-width: 720px) {
  .setlist-cols {
    display: none;
  }
  .setlist-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    border: 1px solid var(--line);
    padding: 12px;
  }
}
#remote-dialog {
  width: min(520px, 94vw);
}
#remote-qr {
  display: grid;
  gap: 12px;
  justify-items: center;
  margin-top: 20px;
}
#remote-qr img {
  display: block;
  background: white;
  border-radius: 8px;
  max-width: 100%;
  height: auto;
}
#remote-qr a {
  color: var(--acid);
  overflow-wrap: anywhere;
  font: 11px monospace;
}
#remote-qr select {
  max-width: 100%;
  padding: 10px;
  background: #20252e;
  color: white;
  border: 1px solid var(--line);
}
#remote-approval {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--acid);
  border-radius: 8px;
}
#remote-approval[hidden],
#remote-stop[hidden] {
  display: none;
}
.remote-pads-page #live-board-close {
  display: none;
}
/* Only the five performance actions stick; filters and scene panels use a single vertical scroller. */
.remote-transport {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 8px
    max(8px, env(safe-area-inset-left));
  background: #101217;
  border-bottom: 1px solid var(--line);
}
.remote-pads-page #live-board .remote-transport button {
  min-width: 0;
  min-height: 60px;
  padding: 6px 4px;
  font-size: 12px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 360px) {
  .remote-pads-page #live-board .remote-transport button {
    font-size: 11px;
    padding-inline: 2px;
  }
}
.remote-pads-page #live-board {
  display: block;
  border: 0;
  margin: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.remote-pads-page .live-board-header {
  max-height: none;
  overflow: visible;
  padding-top: max(12px, env(safe-area-inset-top));
}
.remote-pads-page .live-board-content {
  overflow: visible;
  scrollbar-gutter: auto;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}
#remote-device-status {
  margin: 0;
  padding: 10px 0;
  font-size: 12px;
  background: #151b0d;
  color: var(--acid);
  overflow-wrap: anywhere;
  pointer-events: none;
}
.remote-disconnected #remote-device-status {
  position: fixed;
  inset: 0 0 auto;
  z-index: 9999;
  padding: 10px max(12px, env(safe-area-inset-left));
  background: #493715;
  color: #ffd97b;
}
.remote-disconnected #live-board button {
  pointer-events: none;
  opacity: 0.35;
}
@media (max-width: 1100px) {
  .remote-pads-page .live-board-header,
  .remote-pads-page .live-board-content {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .remote-pads-page #live-board-range,
  .remote-pads-page .live-branch-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 6px;
  }
  .remote-pads-page #live-board-range button,
  .remote-pads-page .live-branch-row button {
    flex-shrink: 0;
  }
  .remote-pads-page .live-branch-panel {
    padding: 10px;
  }
}
#remote-start:disabled {
  opacity: 0.4;
  cursor: default;
}

#track-overlay {
  position: fixed;
  z-index: 1;
  left: 50%;
  bottom: 5vh;
  transform: translateX(-50%);
  width: max-content;
  max-width: 90vw;
  box-sizing: border-box;
  padding: 12px 20px;
  border-left: 3px solid var(--acid);
  border-radius: 4px 12px 12px 4px;
  background: rgb(5 8 12 / 78%);
  color: #fff;
  font:
    500 clamp(14px, 1.8vw, 30px) / 1.35 'Space Grotesk',
    sans-serif;
  text-align: center;
  text-shadow: 0 1px 5px #000;
  pointer-events: none;
  overflow-wrap: anywhere;
}
#track-overlay[hidden] {
  display: none;
}
.track-title-arrow {
  display: inline-block;
  padding: 0 0.6em;
  color: var(--acid);
}
#track-toggle[aria-pressed='true'] {
  color: var(--acid);
  border-color: var(--acid);
}

/* Transition gallery (core/transition-gallery.js) — same language as the scene library. */
#transitions {
  padding: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
  overflow: hidden;
}
#transitions[open] {
  display: flex;
  flex-direction: column;
}
.transition-tools {
  flex-wrap: wrap;
  align-items: center;
  margin: 10px 0 14px;
}
.transition-tools .check-row {
  margin: 0;
}
.tx-range {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.library-tools .tx-range input {
  flex: 0 0 140px;
  padding: 0;
}
.tx-filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.tx-filters button,
.transition-tools > button {
  padding: 10px 12px;
  border-radius: 6px;
  white-space: nowrap;
}
.tx-filters button.selected {
  border-color: currentColor;
  color: var(--accent, #c8ff54);
}
#tx-status {
  margin: 0 0 6px;
  font-size: 13px;
}
.tx-note,
.tx-diagnostics {
  margin: 0 0 14px;
  font-size: 12px;
  color: #8f959f;
}
.tx-diagnostics {
  margin-top: 16px;
  font-family: monospace;
}
#transition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.transition-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line, #ffffff1f);
  border-radius: 8px;
  overflow: hidden;
  background: #14161c;
}
.transition-card.off {
  opacity: 0.5;
}
.transition-card.single {
  border-color: #c8ff54;
  box-shadow: 0 0 0 1px #c8ff54;
}
.transition-card .tx-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  cursor: pointer;
}
.transition-card .tx-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 2px;
  font-size: 12px;
}
.transition-card small {
  display: block;
  padding: 0 12px 6px;
  font: 10px monospace;
  color: #8f959f;
}
.transition-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 12px 8px;
}
.transition-card .tags i {
  font: 9px/1 monospace;
  font-style: normal;
  padding: 3px 5px;
  border-radius: 3px;
  color: #b8bec8;
  background: #ffffff12;
}
.transition-card .tags .flash {
  color: #ff8a7a;
  background: #ff4a3a2a;
}
.transition-card .tags .humor {
  color: #ffe14a;
  background: #ffe14a22;
}
.transition-card select {
  margin: 0 12px 12px;
  background: #1b1d24;
  color: white;
  border: 1px solid #ffffff25;
  padding: 6px;
  border-radius: 6px;
  font-size: 11px;
}
.transitions-header {
  flex: 0 0 auto;
  padding: 24px 28px 0;
  background: #101217;
  border-bottom: 1px solid var(--line);
}
.transitions-header .dialog-head {
  position: static;
  gap: 12px;
}
.transitions-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 28px 28px;
}

.live-board-phrase {
  font-weight: 700;
}

/* Library tabs: Galerie · Uspořádat větve · Knihovna, shared export/import */
.lib-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.lib-tabs button {
  padding: 5px 12px;
  font-size: 12px;
}
.lib-tabs button.active {
  color: var(--acid);
  border-color: #c8ff5460;
  background: #c8ff5414;
}
.lib-tabs-gap {
  flex: 1;
}
#tree-editor {
  padding: 0;
}
#tree-editor .tree-tools {
  margin: 0;
  padding: 8px 12px;
}
#tree-editor .tree-tools .tree-hint {
  margin: 0;
  flex: 1;
}
#tree-editor .tree-tray,
#tree-editor .tree-board {
  margin: 0 12px 12px;
}
.tree-title {
  font-size: 14px;
  margin-right: 6px;
}
/* Gallery grouped by branches */
.library-group {
  grid-column: 1 / -1;
  margin: 14px 0 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--acid);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
}
.library-group:first-child {
  margin-top: 0;
}
.library-group small {
  color: #ffd84a;
  font-size: 10px;
  margin-left: 6px;
}
/* Knihovna: branches · scenes by branch · detail */
#scene-manager {
  padding: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
  overflow: hidden;
}
#scene-manager[open] {
  display: flex;
  flex-direction: column;
}
.sm-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 300px;
}
.sm-tree,
.sm-main,
.sm-detail {
  overflow: auto;
  padding: 10px;
  min-height: 0;
}
.sm-tree {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sm-detail {
  border-left: 1px solid var(--line);
}
.sm-branch {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  text-align: left;
  border: 0;
  background: none;
  padding: 5px 8px;
  font-size: 12px;
}
.sm-branch.depth-0 {
  font-weight: 700;
  margin-top: 6px;
}
.sm-branch.depth-1 {
  padding-left: 18px;
  color: #c9ccd2;
}
.sm-branch small {
  color: var(--muted);
}
.sm-branch.selected,
.sm-section-head.selected {
  color: var(--acid);
  background: #c8ff5414;
}
.sm-top {
  margin: 18px 0 4px;
  font-size: 15px;
}
.sm-section {
  margin-bottom: 14px;
}
.sm-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: none;
  padding: 4px 2px;
  font-size: 12px;
  color: #c9ccd2;
}
.sm-family {
  color: #ffd84a;
  font-size: 10px;
}
.sm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  padding: 8px 0;
  min-height: 40px;
}
.sm-grid.drop-over,
.sm-tile.drop-over {
  outline: 2px dashed var(--acid);
}
.sm-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
  text-align: left;
  font-size: 11px;
}
.sm-tile.selected {
  border-color: var(--acid);
}
.sm-tile.playing strong::after {
  content: ' ▶';
  color: var(--acid);
}
.sm-tile.skipped {
  opacity: 0.4;
}
.sm-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background: #ffffff10;
  border-radius: 4px;
  overflow: hidden;
}
.sm-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sm-empty,
.sm-hint {
  color: var(--muted);
  font-size: 12px;
}
.sm-detail-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sm-detail-body h3 {
  margin: 0;
}
.sm-meta {
  color: var(--muted);
}
.sm-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.sm-favor {
  font-size: 12px;
  margin: 0;
}
@media (max-width: 900px) {
  .sm-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .sm-tree {
    display: none;
  }
  .sm-detail {
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: 45dvh;
  }
}

/* One look for all three library screens: tab row (title bar) + one compact toolbar row */
#library,
#tree-editor,
#scene-manager {
  padding: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
  overflow: hidden;
  background: #0d0f13;
}
.lib-tabs {
  background: #101217;
  padding: 10px 16px;
}
.lib-tabs-close {
  margin-left: 8px;
  width: 30px;
  padding: 5px 0 !important;
}
#library .library-header {
  padding: 0;
  background: none;
}
#library .library-header .dialog-head,
#transitions .transitions-header .dialog-head,
#tree-editor .tree-title,
#tree-editor #tree-close {
  display: none;
}
#library .library-tools,
#tree-editor .tree-tools,
.sm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
#library .library-tools input,
#library .library-tools select,
#library .library-tools button,
#tree-editor .tree-tools button,
.sm-toolbar input {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 6px;
}
#library .library-tools input,
.sm-toolbar input {
  flex: 0 1 260px;
  background: #1b1d24;
  color: white;
  border: 1px solid #ffffff25;
}
.sm-toolbar .tree-hint,
#tree-editor .tree-tools .tree-hint {
  margin: 0 0 0 8px;
  flex: 1;
  font-size: 12px;
}
#library .library-content {
  padding: 12px 16px 16px;
}
#tree-editor .tree-tray {
  margin: 12px 16px;
}
#tree-editor .tree-board {
  margin: 0 16px 16px;
}
/* Same section headings and form fields in Galerie and Knihovna */
.sm-section-head {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--acid);
}
.sm-top {
  font-size: 13px;
  color: #c9ccd2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sm-detail input,
.sm-detail select {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 6px;
  background: #1b1d24;
  color: white;
  border: 1px solid #ffffff25;
}

/* ---------- Entry UI: welcome, guide, play bar, blackout (core/onboarding.js) ---------- */
.blackout {
  background: #000;
}
.blackout canvas,
.blackout #dj-overlay,
.blackout #track-overlay {
  visibility: hidden;
}
.blackout .auto-indicator,
.projection-output.blackout > * {
  visibility: hidden !important;
}
#gj-file-player {
  width: min(720px, 100%);
  margin: 0 auto 18px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #101217f2;
}
#gj-file-player audio {
  display: block;
  width: 100%;
  height: 40px;
}
.file-playback-clock {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 10px 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.file-playback-clock > :first-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-playback-clock > :last-child {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}
.hidden-ui #gj-file-player,
.blackout #gj-file-player {
  display: none !important;
}
#event-live-chip {
  position: relative;
  margin: 0 18px 12px;
  z-index: 12;
  max-width: calc(100vw - 36px);
  background: #101217;
  font-size: 12px;
}
.hidden-ui #event-live-chip {
  display: none;
}
.projection-output.blackout {
  background: #000;
}
.simple-ui main.chrome,
.simple-ui footer.chrome,
.simple-ui #fps,
.simple-ui .shade {
  display: none;
}
#play-bar {
  display: none;
}
#play-scene-name {
  display: none;
  position: fixed;
  top: calc(10px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  max-width: min(480px, 60vw);
  overflow: hidden;
  color: #ffffffb3;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 4px #000;
  pointer-events: none;
}
.simple-ui:not(.hidden-ui):not(.blackout) #play-scene-name {
  display: block;
}
.simple-ui #play-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 16px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #07080bcc;
  backdrop-filter: blur(12px);
}
.hidden-ui #play-bar {
  display: none;
}
.pb-status,
.pb-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
#play-bar button {
  padding: 7px 11px;
  border-radius: 10px;
  white-space: nowrap;
}
#play-bar button[aria-pressed='true'] {
  border-color: var(--acid);
  color: var(--acid);
}
#play-bar .pb-input-gain {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
  --gj-input-color: #ffb547;
}
#play-bar .pb-input-gain[data-level='open'] {
  --gj-input-color: var(--acid);
}
#play-bar .pb-input-gain[data-level='hot'] {
  --gj-input-color: #ff4d4d;
}
#play-bar .pb-input-gain[data-level='idle'] {
  --gj-input-color: #858b96;
}
#play-bar .pb-input-gain > span,
#play-bar .pb-input-gain > output {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
#play-bar .pb-input-gain .rotary-knob {
  padding: 0;
  border: 0;
  border-radius: 50%;
}
#play-bar .pb-input-gain .rotary-fill {
  stroke: var(--gj-input-color);
}
#play-bar .pb-input-gain .rotary-knob:focus-visible {
  outline: 1px dashed #ffffff80;
  outline-offset: 1px;
}
#play-bar .pb-input-gain .gj-input-threshold {
  stroke: #fff;
  stroke-width: 1.5;
}
.pb-mode b {
  font-weight: 800;
  letter-spacing: 0.08em;
}
#play-bar :is(.pb-mode, .pb-live).on {
  background: var(--acid);
  color: #07080b;
}
#play-bar .pb-black[aria-pressed='true'] {
  background: #ff4fa0;
  border-color: #ff4fa0;
  color: #07080b;
}
.pb-dot {
  font-size: 12px;
  color: var(--muted);
}
.pb-dot::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  background: #555;
}
.pb-dot.ok::before {
  background: var(--acid);
}
.pb-dot.low::before,
.pb-dot.warn::before {
  background: #ffb547;
}
.pb-track {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
#welcome,
#wizard {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 16px;
  background: radial-gradient(ellipse at center, #05050799 0%, #050507dd 70%);
}
#welcome[hidden],
#wizard[hidden] {
  display: none;
}
.welcome-card,
.wiz-card {
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #0b0c11ee;
  box-shadow: 0 30px 80px #000a;
}
.welcome-card {
  text-align: center;
}
.welcome-brand b {
  color: var(--acid);
  letter-spacing: 0.3em;
  font-size: 13px;
}
.welcome-card h1 {
  margin: 14px 0 10px;
  font-size: clamp(26px, 5vw, 38px);
  line-height: 1.1;
}
.welcome-sub,
.welcome-summary,
.wiz-lead {
  color: #c9cad0;
  line-height: 1.5;
}
.welcome-summary span {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: #ffffff10;
}
.welcome-go,
.wiz-primary {
  padding: 13px 22px;
  border: 0;
  border-radius: 14px;
  background: var(--acid);
  color: #07080b;
  font-weight: 800;
  font-size: 16px;
}
.welcome-go {
  display: block;
  width: 100%;
  margin: 20px 0 8px;
  font-size: 18px;
}
.welcome-go:disabled,
.wiz-primary:disabled {
  opacity: 0.5;
}
.welcome-link,
.wiz-link,
.wiz-skip,
.wiz-back {
  border: 0;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.welcome-links {
  display: flex;
  justify-content: center;
  gap: 16px;
}
.welcome-fine {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.welcome-fine a {
  color: inherit;
}
.wiz-top {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.wiz-skip {
  margin-left: auto;
}
.wiz-dots {
  display: flex;
  gap: 5px;
}
.wiz-dots[hidden] {
  display: none;
}
.wiz-dots i {
  width: 22px;
  height: 4px;
  border-radius: 2px;
  background: #ffffff22;
}
.wiz-dots i.done {
  background: #c8ff5488;
}
.wiz-dots i.on {
  background: var(--acid);
}
.wiz-card h2 {
  margin: 18px 0 14px;
  font-size: 26px;
}
.wiz-options {
  display: grid;
  gap: 10px;
}
.wiz-option {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 2px 12px;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  text-align: left;
}
.wiz-option .wiz-icon {
  grid-row: span 2;
  font-size: 26px;
}
.wiz-option small {
  color: var(--muted);
}
.wiz-option[aria-pressed='true'] {
  border-color: var(--acid);
  background: #c8ff5414;
}
.wiz-explain {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: #ffffff0a;
}
.wiz-explain p {
  margin: 0 0 12px;
  line-height: 1.5;
}
.wiz-error {
  color: #ff8a8a;
}
.wiz-meter {
  position: relative;
  height: 18px;
  margin: 16px 0 10px;
  border-radius: 9px;
  background: #ffffff12;
  overflow: hidden;
}
.meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: #ffb547;
  transition: width 0.08s linear;
}
.meter-fill.open {
  background: var(--acid);
}
.meter-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #fff;
}
.wiz-status {
  font-weight: 700;
}
.wiz-status.ok {
  color: var(--acid);
}
.wiz-device {
  width: 100%;
  margin: 6px 0 10px;
}
.wiz-help {
  color: var(--muted);
}
.wiz-help summary {
  cursor: pointer;
}

.wiz-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}
.wiz-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--acid);
}
.wiz-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
}
@media (max-width: 640px) {
  .welcome-card,
  .wiz-card {
    padding: 20px;
  }
  .simple-ui #play-bar {
    bottom: 8px;
  }
}
.wiz-sens {
  display: grid;
  grid-template-columns: auto 1fr 3.5em;
  align-items: center;
  gap: 12px;
  margin: 4px 0 12px;
}
.wiz-sens input {
  width: 100%;
  accent-color: var(--acid);
}
.wiz-sens-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.wiz-steps {
  margin: 0 0 14px;
  padding-left: 20px;
  line-height: 1.5;
}
.wiz-steps li + li {
  margin-top: 6px;
}
.wiz-steps a {
  color: var(--acid);
}
.wiz-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
}
button.pb-dot {
  padding: 4px 6px;
  border: 0;
}
button.pb-dot:not(:disabled):hover {
  color: var(--acid);
}
button.pb-dot:disabled {
  cursor: default;
}

/* Shared operator telemetry: Console on the control display, Remote on the phone. */
.console-monitor {
  display: grid;
  grid-template-columns: minmax(120px, 1.3fr) minmax(120px, 1.3fr) 0.7fr 1fr 1.2fr;
  gap: 12px;
  padding: 12px 0;
}
.console-monitor > div {
  min-width: 0;
}
.console-monitor small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}
.console-monitor strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 600;
}
.console-monitor progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 5px;
  accent-color: var(--acid);
}
.console-output-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
@media (max-width: 760px) {
  .console-monitor {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .console-monitor {
    grid-template-columns: 1fr 1fr;
    gap: 12px 8px;
  }
  .live-board-bar {
    flex-wrap: wrap;
  }
  .live-board-bar > div {
    flex: 1 0 100%;
  }
}
/* Shared projection state is visible in both Console and the minimal Remote page. */
.console-program {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.console-program.is-blackout {
  padding: 8px 10px;
  border: 1px solid var(--acid);
  border-radius: 6px;
  color: var(--acid);
}
/* Welcome: three intents (show / live / studio) */
.welcome-intents {
  display: grid;
  gap: 10px;
  margin: 20px 0 10px;
  text-align: left;
}
.welcome-intent {
  text-align: left;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 2px 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
}
.welcome-intent .wiz-icon {
  grid-row: span 2;
  font-size: 24px;
}
.wiz-icon .gj-icon {
  width: 1.1em;
  height: 1.1em;
}
.event-branch .gj-icon,
.event-selected-family .gj-icon {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 4px;
  opacity: 0.7;
}
.welcome-intent b {
  font-size: 17px;
}
.welcome-intent small {
  color: var(--muted);
}
.welcome-intent.primary {
  border: 0;
  background: var(--acid);
  color: #07080b;
}
.welcome-intent.primary small {
  color: #07080bb0;
}
.welcome-intent:hover,
.welcome-intent:focus-visible {
  border-color: var(--acid);
}
/* Simple layer: the header keeps brand, Studio, account, help, language, settings and second display.
   Name/logo and readiness live in Studio, blackout and fullscreen are on the play bar. */
.simple-ui #identity-open,
.simple-ui #readiness-open,
.simple-ui #blackout-control,
.simple-ui #fullscreen {
  display: none;
}
@media (min-width: 1700px) {
  .welcome-card,
  .wiz-card {
    width: min(680px, 100%);
    font-size: 17px;
  }
}

/* The same gallery header includes transitions; it wraps without pushing close/export offscreen. */
.lib-tabs {
  flex-wrap: wrap;
}
#transitions .transitions-header .transition-tools {
  display: flex;
  padding: 10px 16px;
  margin: 0;
}
#transitions .transitions-header {
  padding: 0;
  max-height: 55dvh;
  overflow-y: auto;
}
@media (max-width: 700px) {
  #transitions .tx-filters,
  #transitions #tx-search {
    flex: 1 1 100%;
  }
  #transitions .tx-range {
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  #transitions .tx-range input {
    width: 100%;
    min-width: 0;
  }
}
@media (min-width: 641px) and (max-width: 1000px) {
  .deck .camera-section {
    grid-column: 1 / -1;
  }
}

#language:hover {
  background: #ffffff14;
  border-color: #ffffff55;
}
#language option {
  background: #171a21;
  color: #f4f4f4;
}
#help-dialog {
  width: min(720px, calc(100vw - 24px));
  max-width: 720px;
}
.gj-help-version {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-block: 12px;
  border-block: 1px solid var(--line);
}
.gj-help-version > p {
  flex-basis: 100%;
  margin: 0;
}
.gj-help-version > strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}

#help-dialog #gj-help-qa {
  display: inline-block;
  margin-left: 18px;
}
@media (max-width: 440px) {
  #help-dialog #gj-help-qa {
    display: block;
    margin: 10px 0 0;
  }
}

/* The compact mode control reports state; its hint describes the next action without widening the bar. */
#play-bar .pb-mode-hint {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 48px);
  padding: 9px 12px;
  border: 1px solid #ffffff30;
  border-radius: 8px;
  background: #16191f;
  color: #f4f4f4;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
  white-space: normal;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}
#play-bar :is(.pb-mode, .pb-live):focus-visible .pb-mode-hint {
  visibility: visible;
  opacity: 1;
}
@media (hover: hover) {
  #play-bar :is(.pb-mode, .pb-live):hover .pb-mode-hint {
    visibility: visible;
    opacity: 1;
  }
}

/* Operator inspectors never replace the shared playing scene. */
#check-overlay {
  position: fixed;
  top: 76px;
  right: 16px;
  z-index: 61;
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100vh - 150px);
  overflow: auto;
  border: 1px solid #ffffff30;
  border-radius: 10px;
  background: #04050a;
  box-shadow: 0 12px 40px #000a;
}
#check-overlay[hidden] {
  display: none;
}
#check-overlay canvas {
  display: block;
  width: 100%;
  height: auto;
}
/* Remote and Console both explain the native horizontal filter strips on phones. */
.gj-scroll-note {
  display: none;
}
@media (max-width: 600px) {
  .gj-scroll-note {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin: 8px 0;
  }
}
/* Free edition: no local Studio path */
body[data-gj-edition='free'] #account-local,
body[data-gj-edition='free'] #account-local + .account-note {
  display: none;
}
/* Account button: icon on phones, where header labels are hidden */
#account-open .gj-icon {
  width: 18px;
  height: 18px;
  flex: none;
}
@media (min-width: 801px) {
  #account-open .gj-icon {
    display: none;
  }
}
/* AutoPlay setup: the scene filter and selection sit below the playback settings */
#auto-setup .gj-selection-source {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid #ffffff1f;
}
/* during an event the identity button gives its place to "Řízení akce" (names and logos come from the set) */
body.event-playing #play-identity {
  display: none !important;
}

/* GhostReel live preview (projection.html?embed=1 in an iframe) */
.projection-embed .projection-tools,
.projection-embed #projection-note,
.projection-embed #engine-status,
.projection-embed #scene-desc {
  display: none !important;
}

/* ===== F1: one button system =====
   Three heights: S 32 px (dense panels: Console, cockpit), M 40 px (dialogs, Studio), L 44 px (play bar, phone).
   One filled primary per view; everything else outlined; danger in red. */
:root {
  --btn-s: 32px;
  --btn-m: 40px;
  --btn-l: 44px;
}
dialog.ui-dialog .ui-button,
dialog.ui-dialog button.ui-button,
.gj-scene-workspace .ui-button {
  min-height: var(--btn-m);
}
#play-bar .pb-actions > button,
#play-bar .pb-live,
#play-bar .pb-mode {
  min-height: var(--btn-l);
}
@media (pointer: coarse) {
  dialog.ui-dialog .ui-button,
  .gj-scene-workspace .ui-button {
    min-height: var(--btn-l);
  }
}
.ui-button.is-danger,
button.is-danger {
  border-color: #ff6b6b;
  color: #ff8a8a;
}
/* Studio is opening: answer the click at once */
.studio-loading {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background: #0b0c10cc;
  color: var(--text, #fff);
  font: 600 16px 'Space Grotesk', sans-serif;
}
.studio-loading[hidden] {
  display: none;
}
/* GhostReel opens its own page: a link with an "elsewhere" icon, not a tab */
.event-ghostreel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-style: dashed;
}
.event-ghostreel .gj-icon {
  width: 14px;
  height: 14px;
}
/* four intents on the welcome card */
.welcome-intents:has(> :nth-child(4)) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 600px) {
  .welcome-intents:has(> :nth-child(4)) {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* the cockpit layer shows blackout and fullscreen in the header; the play bar keeps only one of each */
body:not(.simple-ui) #play-bar .pb-black,
body:not(.simple-ui) #play-bar button[title='Celá obrazovka'] {
  display: none;
}
/* play bar: the active scene selection beside Ruční / AutoPlay */
#play-selection {
  min-height: 36px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}
/* phone header: one row, the rest behind ⋯ */
#header-menu {
  display: none;
}
@media (max-width: 600px) {
  header .top-actions {
    position: relative;
    flex-wrap: nowrap;
  }
  #header-menu {
    display: grid;
    place-items: center;
    width: 44px;
    min-height: 44px;
    padding: 0;
  }
  header .top-actions > :not(#header-menu):not(#account-open):not(#fps) {
    display: none !important;
  }
  header .top-actions.is-menu-open > :not(#header-menu):not(#account-open):not(#fps):not([hidden]) {
    display: inline-flex !important;
  }
  header .top-actions.is-menu-open {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #101217f2;
  }
  header .top-actions.is-menu-open > * {
    min-height: 44px;
  }
}
/* Studio / GhostReel without the plan: visible, marked as part of Studio; a click asks for sign-in */
.is-locked {
  opacity: 0.75;
}
.welcome-intent.is-locked b::after {
  content: 'Studio';
  margin-left: 8px;
  padding: 1px 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  vertical-align: 2px;
  opacity: 0.8;
}

/* Vlastní scény (core/custom-scenes-ui.js) */
#custom-scenes {
  padding: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
  overflow: hidden;
  background: #0d0f13;
}
#custom-scenes[open] {
  display: flex;
  flex-direction: column;
}
.cs-toolbar a.ui-button {
  text-decoration: none;
}
.cs-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(320px, 520px) minmax(0, 1fr);
  overflow: hidden;
}
.cs-left,
.cs-right {
  overflow: auto;
  padding: 14px 16px 24px;
  min-height: 0;
}
.cs-left {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cs-left h3,
.cs-right h3 {
  margin: 6px 0 4px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--acid);
}
.cs-right h3 small {
  color: var(--muted);
  font-weight: 400;
  margin-left: 6px;
}
.cs-steps {
  margin: 0;
  padding-left: 20px;
  color: #c9ccd2;
  font-size: 13px;
  line-height: 1.5;
}
.cs-gate {
  border: 1px solid #ffd84a60;
  background: #ffd84a12;
  border-radius: 8px;
  padding: 10px 12px;
}
.cs-gate p {
  margin: 0 0 8px;
}
#custom-scenes.is-guest .cs-drop,
#custom-scenes.is-guest #cs-paste,
#custom-scenes.is-guest #cs-check,
#custom-scenes.is-guest #cs-import,
#custom-scenes.is-guest #cs-idea,
#custom-scenes.is-guest #cs-starter {
  opacity: 0.4;
  pointer-events: none;
}
.cs-drop {
  border: 1px dashed #ffffff40;
  border-radius: 10px;
  padding: 22px 12px;
  text-align: center;
  color: #c9ccd2;
  cursor: pointer;
}
.cs-drop.drop-over,
.cs-drop:focus-visible {
  border-color: var(--acid);
  background: #c8ff5414;
}
#cs-paste {
  width: 100%;
  box-sizing: border-box;
  font: 12px/1.4 ui-monospace, Menlo, monospace;
  background: #1b1d24;
  color: #fff;
  border: 1px solid #ffffff25;
  border-radius: 6px;
  padding: 8px;
  resize: vertical;
}
#cs-check {
  align-self: flex-start;
}
.cs-result {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #ffffff06;
}
.cs-result-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.cs-result-head h3 {
  margin: 2px 0;
  color: #fff;
  font-size: 15px;
}
.cs-thumb {
  width: 160px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: #000;
}
.cs-ok {
  color: var(--acid);
}
.cs-bad,
.cs-error {
  color: #ff6b6b;
}
.cs-errors,
.cs-warnings {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.45;
}
.cs-errors li {
  color: #ff9a9a;
}
.cs-warnings li {
  color: #ffd84a;
}
.cs-meta {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.cs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.cs-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.cs-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: #ffffff05;
}
.cs-card.is-new {
  border-color: var(--acid);
}
.cs-card .cs-actions {
  grid-column: 1 / -1;
  margin-top: 0;
}
.cs-card .ui-button {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
}
.cs-card-thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  color: var(--muted);
  font-size: 11px;
}
.cs-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cs-card-body strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cs-badge {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  margin: 3px 0;
  background: #ffffff14;
}
.cs-badge.is-public,
.cs-badge.is-approved {
  background: #c8ff5426;
  color: var(--acid);
}
.cs-badge.is-pending,
.cs-badge.is-review {
  background: #ffd84a22;
  color: #ffd84a;
}
.cs-badge.is-rejected {
  background: #ff6b6b22;
  color: #ff9a9a;
}
.cs-reason {
  display: block;
  color: #ff9a9a;
  font-size: 11px;
}
.cs-empty,
.cs-note {
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 900px) {
  .cs-body {
    grid-template-columns: minmax(0, 1fr);
    overflow: auto;
  }
  .cs-left {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .cs-left,
  .cs-right {
    overflow: visible;
  }
}

.cs-preview {
  width: 240px;
  height: 135px;
  display: block;
}
/* admin/custom-scenes.html */
.cs-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.cs-admin-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #ffffff05;
}
.cs-admin-head h3 {
  margin: 0;
}
.cs-admin-head small {
  display: block;
  color: var(--muted);
  margin: 2px 0 6px;
}
.cs-admin-body {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cs-admin-preview {
  width: 320px;
  height: 180px;
  background: #000;
  border-radius: 6px;
}
.cs-admin-checks {
  flex: 1;
  min-width: 160px;
  font-size: 12px;
}
.cs-code {
  max-height: 320px;
  overflow: auto;
  background: #0b0c10;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  font: 11px/1.4 ui-monospace, Menlo, monospace;
  white-space: pre-wrap;
}
.cs-code mark {
  background: #ff6b6b55;
  color: #fff;
}
.cs-admin .cs-actions input.ui-field {
  flex: 1;
  min-width: 180px;
}
.cs-preview-box {
  position: relative;
  margin: 0;
  flex: none;
}
.cs-preview-tag {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.02em;
  pointer-events: none;
}
.cs-steps li + li {
  margin-top: 8px;
}
.cs-steps li strong {
  display: block;
  color: #fff;
  font-weight: 600;
}
#cs-idea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 6px 0;
  resize: vertical;
  font: 13px/1.4 inherit;
  font-family: inherit;
  background: #1b1d24;
  color: #fff;
  border: 1px solid #ffffff25;
  border-radius: 6px;
  padding: 8px;
}
#custom-scenes-open {
  color: var(--acid);
  border-color: #c8ff5440;
}
.cs-skill-link {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #9aa0aa;
}
.cs-summary {
  margin: 4px 0 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
}
.cs-details summary {
  cursor: pointer;
  color: #9aa0aa;
  font-size: 12px;
}
.cs-save:disabled {
  opacity: 0.6;
  cursor: progress;
}
.cs-admin .catalogue-main {
  display: block;
  max-width: 1400px;
}
.cs-admin .catalogue-main > h2 {
  margin: 22px 0 10px;
}
#custom-scenes .cs-drop {
  padding: 8px 12px;
  font-size: 12px;
  border-style: dashed;
}
#cs-paste::placeholder {
  font-family: system-ui, sans-serif;
  font-size: 13px;
}
#cs-admin-status:empty {
  display: none;
}
.cs-testing {
  color: #c9ccd2;
}

/* the scene description sits on the live picture: keep it readable on bright scenes */
body:not(.projection-output) #scene-desc {
  text-shadow:
    0 1px 2px #000,
    0 0 14px #000d;
}

/* Kontrola před hraním: the name and a one-line state under it */
#readiness-open {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  line-height: 1.15;
}
#readiness-open .check-summary {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
#readiness-open.is-demo .check-summary {
  color: #ffb547;
}
/* sound help */
.sound-help {
  max-width: min(560px, calc(100vw - 32px));
}
.sound-help-lead {
  color: var(--muted);
  line-height: 1.5;
}
.sound-help-steps {
  display: grid;
  gap: 8px;
  padding-left: 20px;
  line-height: 1.45;
}
.sound-help-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
