:root {
  color-scheme: dark;
  --bg: #08090d;
  --panel: rgba(19, 22, 31, 0.88);
  --panel-2: #202633;
  --text: #f8fbff;
  --muted: #aab4c0;
  --line: rgba(255, 255, 255, 0.13);
  --green: #69f0ae;
  --red: #ff4f6a;
  --amber: #ffc94d;
  --blue: #40c9ff;
  --violet: #a56dff;
  --cyan: #38f3ff;
  --pink: #ff3d9a;
  --band: var(--blue);
  --audio-band: var(--blue);
  --muse-signal: 82%;
  --muse-calm: 58%;
  --muse-focus: 64%;
  --muse-stress: 22%;
  --muse-artifacts: 14%;
  --muse-ring-speed: 9s;
  --light-ring-speed: 4s;
  --audio-ring-speed: 5s;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 18%, rgba(64, 201, 255, 0.22), transparent 30%),
    radial-gradient(circle at 74% 12%, rgba(255, 61, 154, 0.18), transparent 24%),
    linear-gradient(135deg, #08090d 0%, #111521 52%, #090a0f 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(300px, 440px);
  min-height: 100vh;
}

.shell:has(.controls[data-control-ui="tabs"]) {
  grid-template-columns: minmax(340px, 1fr) minmax(500px, 580px);
}

.stage {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
  min-height: 520px;
  padding: 28px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(8, 9, 13, 0.42), rgba(8, 9, 13, 0.72)),
    linear-gradient(0deg, rgba(8, 9, 13, 0.24), rgba(8, 9, 13, 0.5)),
    url("assets/brain-network-bg.png");
  background-position: center;
  background-size: cover;
}

.topbar,
.actions,
.panel-heading,
.connection,
.toggle,
.color-field {
  display: flex;
  align-items: center;
}

.topbar,
.actions,
.panel-heading {
  justify-content: space-between;
  gap: 16px;
}

h2 {
  margin: 0;
  letter-spacing: 0;
}

h2 {
  font-size: 1rem;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
}

.brand-lockup {
  display: grid;
  justify-items: start;
  min-width: 0;
  width: 100%;
}

.hero-logo {
  display: block;
  width: clamp(260px, 54vw, 820px);
  max-width: 100%;
  height: auto;
  max-height: 260px;
  justify-self: start;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(255, 70, 82, 0.28));
}

.edition-name {
  width: 100%;
  color: var(--cyan);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0;
  text-align: right;
  text-transform: lowercase;
}

.connection {
  min-width: 160px;
  justify-content: flex-end;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}

.app-version {
  width: 100%;
  color: rgba(170, 180, 192, 0.62);
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.status {
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 18px rgba(255, 79, 88, 0.7);
}

.status.connected {
  background: var(--green);
  box-shadow: 0 0 18px rgba(99, 212, 113, 0.7);
}

.visualizer {
  position: relative;
  overflow: visible;
  align-self: center;
  width: min(44vw, 520px, 58vh);
  aspect-ratio: 1;
  justify-self: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.12) 0 2px, transparent 3px),
    radial-gradient(circle at 50% 50%, rgba(64, 201, 255, 0.22), transparent 28%),
    radial-gradient(circle at 50% 50%, rgba(255, 61, 154, 0.14), transparent 44%),
    #06080c;
  background-size: 34px 34px, auto, auto, auto;
  box-shadow:
    inset 0 0 60px rgba(64, 201, 255, 0.16),
    0 0 70px rgba(64, 201, 255, 0.12);
}

.wave-ring {
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--band) 70%, transparent);
  border-radius: 50%;
  opacity: 0.65;
  animation: pulse-ring var(--light-ring-speed) ease-in-out infinite;
}

.ring-one {
  inset: 12%;
}

.ring-two {
  inset: 24%;
  animation-delay: -1.2s;
}

.ring-three {
  inset: 36%;
  animation-delay: -2.4s;
}

.audio-wave-ring {
  position: absolute;
  inset: 18%;
  border: 2px dashed color-mix(in srgb, var(--audio-band) 76%, transparent);
  border-radius: 50%;
  opacity: 0.72;
  animation: audio-ring var(--audio-ring-speed) linear infinite;
  box-shadow: 0 0 20px color-mix(in srgb, var(--audio-band) 34%, transparent);
}

.visualizer.light-code-active .audio-wave-ring {
  border-style: solid;
  opacity: 0.9;
  border-color: color-mix(in srgb, var(--light-code-color, var(--audio-band)) 86%, white 8%);
  box-shadow:
    0 0 var(--light-code-audio-glow, 28px) color-mix(in srgb, var(--light-code-color, var(--audio-band)) 58%, transparent),
    inset 0 0 var(--light-code-inner-glow, 18px) color-mix(in srgb, var(--light-code-color, var(--audio-band)) 28%, transparent);
}

.visualizer.light-code-active .wave-ring {
  border-color: color-mix(in srgb, var(--light-code-color, var(--audio-band)) 82%, white 8%);
  opacity: var(--light-code-opacity, 0.5);
  box-shadow:
    0 0 var(--light-code-glow, 18px) color-mix(in srgb, var(--light-code-color, var(--audio-band)) 54%, transparent),
    inset 0 0 var(--light-code-inner-glow, 14px) color-mix(in srgb, var(--light-code-color, var(--audio-band)) 20%, transparent);
}

.muse-monitor-ring {
  position: absolute;
  inset: 4.8%;
  border-radius: 50%;
  opacity: 0.94;
  filter: drop-shadow(0 0 18px rgba(56, 243, 255, 0.22));
  pointer-events: none;
  transform-origin: center;
}

.muse-monitor-ring::before,
.muse-monitor-ring::after,
.muse-ring-lines {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.muse-monitor-ring::before {
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 26px rgba(56, 243, 255, 0.12);
}

.muse-monitor-ring::after {
  content: "";
  inset: 7%;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  animation: muse-ring 14s linear reverse infinite;
}

.muse-ring-lines {
  overflow: visible;
  transform: rotate(-90deg);
}

.muse-ring-lines circle {
  fill: none;
  stroke: var(--line-color);
  stroke-width: var(--line-width, 1.8);
  stroke-dasharray: var(--line-value) 100;
  stroke-linecap: round;
  opacity: 0.96;
  filter: drop-shadow(0 0 3px var(--line-color));
}

.muse-ring-lines .signal {
  --line-color: rgba(105, 240, 174, 0.72);
  --line-value: var(--muse-signal);
}

.muse-ring-lines .calm {
  --line-color: rgba(64, 201, 255, 0.78);
  --line-value: var(--muse-calm);
}

.muse-ring-lines .focus {
  --line-color: rgb(255, 201, 77);
  --line-width: 2.3;
  --line-value: var(--muse-focus);
}

.muse-ring-lines .stress {
  --line-color: rgb(255, 79, 106);
  --line-width: 2.3;
  --line-value: var(--muse-stress);
}

.muse-ring-lines .artifacts {
  --line-color: rgb(255, 159, 67);
  --line-width: 2.2;
  --line-value: var(--muse-artifacts);
}

.eeg-spectrum-plot {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  overflow: hidden;
  border: 1px solid rgba(56, 243, 255, 0.32);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(56, 243, 255, 0.08), transparent 18%, transparent 82%, rgba(255, 79, 106, 0.08)),
    radial-gradient(circle at 50% 30%, rgba(105, 240, 174, 0.1), transparent 46%),
    linear-gradient(180deg, rgba(4, 8, 14, 0.86), rgba(2, 3, 7, 0.98));
  box-shadow:
    inset 0 0 64px rgba(56, 243, 255, 0.16),
    0 0 44px rgba(56, 243, 255, 0.18);
}

.eeg-spectrum-plot canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.eeg-spectrum-label {
  position: absolute;
  left: 50%;
  top: 4%;
  display: grid;
  gap: 2px;
  min-width: 170px;
  padding: 5px 10px 6px;
  transform: translateX(-50%);
  border: 1px solid rgba(56, 243, 255, 0.22);
  border-radius: 6px;
  background: rgba(4, 7, 12, 0.72);
  color: var(--text);
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.eeg-spectrum-label span {
  color: var(--cyan);
  font-size: 0.56rem;
  font-weight: 900;
  text-transform: uppercase;
}

.eeg-spectrum-label small {
  color: var(--muted);
  font-size: 0.52rem;
  font-weight: 800;
}

.visualizer.show-eeg-spectrum .wave-ring,
.visualizer.show-eeg-spectrum .audio-wave-ring,
.visualizer.show-eeg-spectrum .muse-monitor-ring,
.visualizer.show-eeg-spectrum .beam,
.visualizer.show-eeg-spectrum .frequency-orb {
  display: none;
}

.visualizer.show-eeg-spectrum .eeg-spectrum-plot {
  display: block;
}

.visualizer.show-eeg-spectrum {
  width: min(72vw, 980px, 88vh);
  max-width: calc(100vw - 56px);
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(56, 243, 255, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(255, 79, 106, 0.08), transparent 32%),
    #030509;
  box-shadow:
    inset 0 0 72px rgba(56, 243, 255, 0.12),
    0 24px 90px rgba(0, 0, 0, 0.36),
    0 0 70px rgba(56, 243, 255, 0.14);
}

@keyframes audio-ring {
  from { transform: rotate(0deg) scale(0.98); }
  50% { transform: rotate(180deg) scale(1.03); }
  to { transform: rotate(360deg) scale(0.98); }
}

@keyframes muse-ring {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse-ring {
  0%, 100% {
    transform: scale(0.98);
    box-shadow: 0 0 14px color-mix(in srgb, var(--band) 35%, transparent);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 28px color-mix(in srgb, var(--band) 65%, transparent);
  }
}

.beam {
  position: absolute;
  inset: 21%;
  border-radius: 50%;
  filter: blur(44px);
  opacity: 0;
  transform: scale(0.75);
  transition: opacity 120ms ease, transform 120ms ease, background 120ms ease;
}

.beam-white {
  background: white;
}

.beam-color {
  background: var(--blue);
  mix-blend-mode: screen;
}

.flash {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: white;
  opacity: 0;
}

.frequency-orb {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 190px;
  min-height: 190px;
  padding: 22px;
  transform: translate(-50%, -50%);
  border: 1px solid color-mix(in srgb, var(--band) 70%, white 10%);
  border-radius: 50%;
  background: rgba(8, 9, 13, 0.72);
  box-shadow:
    inset 0 0 34px color-mix(in srgb, var(--band) 35%, transparent),
    0 0 32px color-mix(in srgb, var(--band) 35%, transparent);
  backdrop-filter: blur(10px);
}

.orb-reading {
  display: grid;
  place-items: center;
  gap: 2px;
}

.orb-reading span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
}

.orb-reading strong {
  font-size: 1.45rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.orb-reading em {
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.orb-divider {
  width: 74%;
  height: 1px;
  margin: 7px 0;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.orb-lightcode-readout {
  display: grid;
  place-items: center;
  gap: 2px;
  width: 100%;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(248, 251, 255, 0.12);
  text-align: center;
}

.orb-lightcode-readout[hidden] {
  display: none;
}

.orb-lightcode-readout span,
.orb-lightcode-readout em {
  color: color-mix(in srgb, var(--audio-band) 78%, white 12%);
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.orb-lightcode-readout strong {
  color: #f8fbff;
  font-size: 0.98rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.audio-reading strong,
.audio-reading em {
  color: var(--audio-band);
}

.muse-monitor-readout {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  width: 160px;
  padding: 10px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(8, 9, 13, 0.62);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.muse-monitor-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  min-width: 0;
}

.muse-monitor-header strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muse-monitor-header span {
  max-width: 72px;
  overflow: hidden;
  color: var(--green);
  font-size: 0.64rem;
  font-weight: 800;
  text-align: right;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.muse-monitor-readout dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 10px;
  margin: 0;
}

.muse-monitor-readout div {
  display: grid;
  gap: 2px;
}

.muse-monitor-readout dt {
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 800;
  text-transform: uppercase;
}

.muse-monitor-readout dd {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muse-contact-fit {
  display: grid;
  gap: 4px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.muse-contact-fit svg {
  display: block;
  width: 100%;
  height: auto;
}

.contact-band {
  fill: none;
  stroke: rgba(248, 251, 255, 0.2);
  stroke-linecap: round;
  stroke-width: 7;
}

.contact-sensor {
  --contact-color: rgba(148, 163, 184, 0.92);
}

.contact-sensor circle {
  fill: var(--contact-color);
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 1.3;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--contact-color) 56%, transparent));
}

.contact-sensor text {
  fill: rgba(248, 251, 255, 0.56);
  font-size: 9px;
  font-weight: 900;
  text-anchor: middle;
}

.contact-sensor.good {
  --contact-color: #69f0ae;
}

.contact-sensor.fair {
  --contact-color: #ffc94d;
}

.contact-sensor.bad {
  --contact-color: #ff4f6a;
}

.contact-sensor.offline {
  --contact-color: rgba(107, 114, 128, 0.88);
}

.contact-sensor.fnirs text {
  fill: rgba(2, 6, 23, 0.78);
  font-size: 6px;
}

.contact-sensor.fnirs.offline text {
  fill: rgba(248, 251, 255, 0.52);
}

.muse-contact-fit output {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.muse-monitor-legend,
.eeg-spectrum-legend {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.muse-monitor-readout .eeg-spectrum-legend {
  display: none;
}

.muse-monitor-legend span,
.eeg-spectrum-legend span {
  display: grid;
  grid-template-columns: 9px 1fr;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.muse-monitor-legend i,
.eeg-spectrum-legend i {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--legend-color);
  box-shadow: 0 0 10px color-mix(in srgb, var(--legend-color) 55%, transparent);
}

.muse-monitor-legend b,
.eeg-spectrum-legend b {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.54rem;
  font-weight: 800;
  line-height: 1.22;
  text-transform: uppercase;
}

.muse-monitor-legend .signal {
  --legend-color: var(--green);
}

.muse-monitor-legend .calm {
  --legend-color: var(--blue);
}

.muse-monitor-legend .focus {
  --legend-color: var(--amber);
}

.muse-monitor-legend .stress {
  --legend-color: var(--red);
}

.muse-monitor-legend .artifacts {
  --legend-color: #ff9f43;
}

.muse-monitor-legend .meta {
  --legend-color: rgba(248, 251, 255, 0.72);
}

.eeg-spectrum-legend .low {
  --legend-color: #4098ff;
}

.eeg-spectrum-legend .mid {
  --legend-color: #b8f24f;
}

.eeg-spectrum-legend .high {
  --legend-color: #ff4f6a;
}

.eeg-spectrum-legend .depth {
  --legend-color: #38f3ff;
}

.eeg-spectrum-legend .axis {
  --legend-color: rgba(248, 251, 255, 0.72);
}

.visualizer.show-eeg-spectrum .muse-monitor-legend {
  display: none;
}

.visualizer.show-eeg-spectrum .eeg-spectrum-legend {
  display: grid;
}

.visualizer:not(.show-muse-monitor) .muse-monitor-ring,
.visualizer:not(.show-muse-monitor) .muse-monitor-readout,
.visualizer:not(.show-muse-monitor) .muse-state-panel {
  display: none;
}

.muse-state-panel {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  display: grid;
  gap: 7px;
  width: 168px;
  padding: 10px;
  transform: translateY(-50%);
  border: 1px solid color-mix(in srgb, var(--state-color, var(--cyan)) 42%, rgba(255, 255, 255, 0.14));
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--state-color, var(--cyan)) 12%, transparent), transparent 64%),
    rgba(8, 9, 13, 0.68);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
}

.muse-state-panel > span {
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 900;
  text-transform: uppercase;
}

.muse-state-panel strong {
  color: var(--state-color, var(--cyan));
  font-size: 0.92rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.muse-state-panel output {
  width: fit-content;
  min-width: 42px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #061014;
  background: var(--state-color, var(--cyan));
  font-size: 0.7rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.hemisphere-balance {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 7px 0 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hemisphere-balance-header,
.hemisphere-balance-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.hemisphere-balance-header span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.54rem;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.hemisphere-balance-header output {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: var(--cyan);
  background: transparent;
  font-size: 0.58rem;
  text-align: right;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.hemisphere-balance-track {
  position: relative;
  display: grid;
  grid-template-columns: var(--muse-left-activity, 50%) 1fr;
  overflow: hidden;
  height: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(248, 251, 255, 0.08);
}

.hemisphere-balance-track::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -2px;
  bottom: -2px;
  width: 1px;
  background: rgba(248, 251, 255, 0.42);
}

.hemisphere-left {
  background: linear-gradient(90deg, rgba(64, 201, 255, 0.92), rgba(56, 243, 255, 0.76));
}

.hemisphere-right {
  background: linear-gradient(90deg, rgba(165, 109, 255, 0.78), rgba(255, 61, 154, 0.88));
}

.hemisphere-balance-values output {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
  color: var(--muted);
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muse-state-breakdown {
  display: grid;
  gap: 4px;
  padding: 6px 0 2px;
}

.muse-state-breakdown .state-share {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  color: var(--text);
  font-size: 0.58rem;
  font-weight: 850;
  line-height: 1.15;
}

.muse-state-breakdown .state-share::before {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--share-color, var(--state-color, var(--cyan)));
  box-shadow: 0 0 10px color-mix(in srgb, var(--share-color, var(--cyan)) 70%, transparent);
  content: "";
}

.muse-state-breakdown .state-share span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muse-state-breakdown .state-share b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.muse-state-panel dl {
  display: grid;
  gap: 6px;
  margin: 2px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.muse-state-panel div {
  display: grid;
  gap: 2px;
}

.muse-state-panel dt {
  color: var(--muted);
  font-size: 0.54rem;
  font-weight: 900;
  text-transform: uppercase;
}

.muse-state-panel dd {
  margin: 0;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.muse-spectrum-toggle {
  min-height: 30px;
  margin-top: 2px;
  padding: 0 10px;
  border-color: color-mix(in srgb, var(--state-color, var(--cyan)) 48%, var(--line));
  color: var(--state-color, var(--cyan));
  background: rgba(8, 9, 13, 0.5);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.muse-spectrum-toggle.active {
  border-color: transparent;
  color: #061014;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: 0 0 20px rgba(56, 243, 255, 0.2);
}

html[data-edition="audio"] #testButton,
html[data-edition="audio"] label:has(#outputEnabled),
html[data-edition="audio"] .remote-settings,
html[data-edition="audio"] .session-analysis-actions,
html[data-edition="audio"] .muse-monitor-ring,
html[data-edition="audio"] .muse-monitor-readout,
html[data-edition="audio"] .muse-state-panel,
html[data-edition="audio"] .eeg-spectrum-plot,
html[data-edition="audio"] .light-only,
html[data-edition="audio"] .audio-light-only,
html[data-edition="audio"] #lightSafetyNote,
html[data-edition="audio"] .session-white-light-option,
html[data-edition="audio"] .wave-ring,
html[data-edition="audio"] .beam,
html[data-edition="audio"] .flash,
html[data-edition="audio"] #statusDot,
html[data-edition="audio"] #statusText {
  display: none;
}

html[data-edition="audio"] .connection {
  min-width: auto;
}

html[data-edition="audio"] .app-version {
  width: auto;
}

.screen-light-label {
  display: none;
}

html:not([data-edition="personal"]) .personal-only {
  display: none;
}

html[data-edition="audio"] .lighting-panel .physical-light-label,
html[data-edition="audio"] .lighting-panel .white-flash-control,
html[data-edition="audio"] .lighting-panel .session-white-light-option,
html[data-edition="audio"] .lighting-panel .aurora-control,
html[data-edition="audio"] .lighting-panel .ganzfeld-control {
  display: none;
}

html[data-edition="audio"] .lighting-panel .screen-light-label {
  display: inline;
}

html[data-edition="personal"] #testButton,
html[data-edition="personal"] label:has(#outputEnabled),
html[data-edition="personal"] .remote-settings,
html[data-edition="personal"] .session-analysis-actions,
html[data-edition="personal"] .muse-monitor-ring,
html[data-edition="personal"] .muse-monitor-readout,
html[data-edition="personal"] .muse-state-panel,
html[data-edition="personal"] .eeg-spectrum-plot,
html[data-edition="personal"] .light-only,
html[data-edition="personal"] .audio-light-only,
html[data-edition="personal"] .audio-reverb-only,
html[data-edition="personal"] #lightSafetyNote,
html[data-edition="personal"] .session-white-light-option,
html[data-edition="personal"] .band-panel,
html[data-edition="personal"] .audio-panel,
html[data-edition="personal"] .wave-ring,
html[data-edition="personal"] .beam,
html[data-edition="personal"] .flash,
html[data-edition="personal"] #statusDot,
html[data-edition="personal"] #statusText {
  display: none;
}

html[data-edition="personal"] .connection {
  min-width: auto;
}

html[data-edition="personal"] .app-version {
  width: auto;
}

html[data-edition="personal"] .lighting-panel .physical-light-label,
html[data-edition="personal"] .lighting-panel .white-flash-control,
html[data-edition="personal"] .lighting-panel .session-white-light-option,
html[data-edition="personal"] .lighting-panel .color-field,
html[data-edition="personal"] .lighting-panel .rgb-intensity-control,
html[data-edition="personal"] .lighting-panel .aurora-control,
html[data-edition="personal"] .lighting-panel .ganzfeld-control {
  display: none;
}

html[data-edition="personal"] .lighting-panel .screen-light-label {
  display: inline;
}

.visualizer.flash-on .flash {
  animation: flash 80ms ease-out;
}

@keyframes flash {
  from { opacity: 0.65; }
  to { opacity: 0; }
}

.actions {
  flex-wrap: wrap;
}

button {
  position: relative;
  isolation: isolate;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 18px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

button::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
}

button:disabled::after {
  pointer-events: none;
}

button > * {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

button:hover {
  border-color: var(--muted);
}

button.primary {
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #061014;
  border-color: transparent;
  font-weight: 800;
  box-shadow: 0 0 26px rgba(56, 243, 255, 0.24);
}

.toggle {
  gap: 8px;
  min-height: 44px;
  color: var(--muted);
}

.controls {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 20px;
  background: rgba(5, 7, 12, 0.32);
}

.controls[data-control-ui="tabs"] {
  grid-template-columns: 84px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-items: start;
  column-gap: 18px;
  row-gap: 18px;
  padding: 18px;
}

.control-sidebar {
  position: sticky;
  top: 12px;
  z-index: 20;
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.control-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 9px;
  border: 1px solid rgba(239, 202, 108, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    linear-gradient(145deg, rgba(10, 13, 20, 0.96), rgba(4, 6, 11, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(239, 202, 108, 0.08),
    0 18px 44px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.control-tab {
  position: relative;
  min-width: 0;
  min-height: 42px;
  padding: 0 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
    rgba(12, 15, 23, 0.78);
  color: rgba(222, 230, 238, 0.82);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 8px 18px rgba(0, 0, 0, 0.16);
  transition:
    border-color 140ms ease,
    color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.control-tab::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.16), transparent 38%, transparent 100%);
  opacity: 0;
  transition: opacity 140ms ease;
}

.control-tab:hover,
.control-tab:focus-visible {
  border-color: rgba(239, 202, 108, 0.42);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.026)),
    rgba(17, 21, 31, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 10px 24px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(239, 202, 108, 0.06);
  transform: translateY(-1px);
}

.control-tab:hover::before,
.control-tab:focus-visible::before {
  opacity: 1;
}

.control-tab.active,
.control-tab.transport-linked {
  border-color: rgba(255, 218, 132, 0.78);
  background:
    linear-gradient(180deg, rgba(255, 238, 180, 0.34), rgba(170, 124, 38, 0.16)),
    linear-gradient(145deg, #1b1a18, #0a0d12 64%);
  color: #fff7dc;
  text-shadow: 0 1px 8px rgba(255, 209, 112, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(255, 210, 106, 0.18),
    0 0 0 1px rgba(255, 213, 117, 0.12),
    0 12px 28px rgba(0, 0, 0, 0.28),
    0 0 24px rgba(239, 202, 108, 0.16);
}

.control-tab.active::before,
.control-tab.transport-linked::before {
  opacity: 1;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 232, 168, 0.26), transparent 60%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.14), transparent 42%);
}

.control-tab:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  color: rgba(222, 230, 238, 0.48);
  border-color: rgba(255, 255, 255, 0.075);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(9, 12, 18, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.control-tab:disabled::before {
  opacity: 0;
}

.control-status-icons {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-content: center;
  justify-items: center;
  gap: 7px;
  margin-top: 8px;
  padding: 9px 6px;
  border: 1px solid rgba(239, 202, 108, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.016)),
    rgba(3, 5, 10, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 22px rgba(0, 0, 0, 0.16);
}

.control-status-icons[hidden],
.control-status-icon[hidden] {
  display: none !important;
}

.control-status-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 218, 132, 0.42);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 232, 168, 0.24), transparent 54%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.026)),
    rgba(11, 14, 21, 0.92);
  color: #ffe7a0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(255, 213, 117, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.24),
    0 0 18px rgba(239, 202, 108, 0.14);
}

.control-status-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.transport-panel {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 9px 7px;
  border: 1px solid rgba(64, 201, 255, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.068), rgba(255, 255, 255, 0.018)),
    linear-gradient(145deg, rgba(8, 12, 19, 0.96), rgba(4, 6, 11, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 18px 44px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px);
}

.transport-panel[hidden] {
  display: none !important;
}

.transport-group {
  display: none;
  grid-template-columns: 1fr;
  gap: 8px;
}

.transport-group.active {
  display: grid;
}

.transport-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at 50% 6%, rgba(255, 255, 255, 0.18), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.026)),
    rgba(14, 18, 27, 0.9);
  color: rgba(240, 248, 255, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 8px 18px rgba(0, 0, 0, 0.22);
}

.transport-button:hover:not(:disabled),
.transport-button:focus-visible {
  border-color: rgba(64, 201, 255, 0.58);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 0 1px rgba(64, 201, 255, 0.12),
    0 10px 24px rgba(0, 0, 0, 0.26),
    0 0 20px rgba(64, 201, 255, 0.18);
}

.transport-button:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.transport-button.active {
  border-color: rgba(255, 218, 132, 0.72);
  color: #ffe7a0;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 232, 168, 0.26), transparent 56%),
    linear-gradient(180deg, rgba(255, 238, 180, 0.22), rgba(170, 124, 38, 0.14)),
    rgba(18, 17, 14, 0.94);
}

.transport-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.transport-play svg,
.transport-stop svg {
  fill: currentColor;
  stroke: none;
}

#transportMusicShuffle .icon-loop {
  display: none;
}

#transportMusicShuffle.loop-mode .icon-shuffle {
  display: none;
}

#transportMusicShuffle.loop-mode .icon-loop {
  display: block;
}

.control-tab-panel {
  display: none;
  gap: 14px;
  min-width: 0;
}

.controls[data-control-ui="tabs"] .control-tab-panel {
  grid-column: 2;
  grid-row: 1 / span 20;
  align-self: start;
}

.control-tab[hidden],
.control-tab-panel[hidden] {
  display: none !important;
}

.controls[data-control-ui="tabs"] .control-tab-panel.active {
  display: grid;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 17px;
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.settings-menu summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 32px;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.settings-menu summary::-webkit-details-marker {
  display: none;
}

.settings-menu summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--band);
  font-size: 1.1rem;
  line-height: 1;
}

.settings-menu[open] summary::after {
  content: "-";
}

.settings-links {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
}

.settings-resource-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease;
}

.settings-community-link {
  background: rgba(24, 119, 242, 0.08);
}

.settings-community-link:hover,
.settings-community-link:focus-visible {
  border-color: #1877f2;
  background: rgba(24, 119, 242, 0.15);
  outline: none;
}

.settings-whatsapp-link {
  background: rgba(37, 211, 102, 0.08);
}

.settings-whatsapp-link:hover,
.settings-whatsapp-link:focus-visible {
  border-color: #25d366;
  background: rgba(37, 211, 102, 0.15);
  outline: none;
}

.settings-manual-link {
  background: rgba(56, 243, 255, 0.06);
}

.settings-manual-link:hover,
.settings-manual-link:focus-visible {
  border-color: var(--cyan);
  background: rgba(56, 243, 255, 0.12);
  outline: none;
}

.manual-icon {
  display: grid;
  flex: 0 0 26px;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  color: #061015;
  background: var(--cyan);
}

.manual-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.facebook-icon {
  display: grid;
  flex: 0 0 26px;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  background: #1877f2;
  font-family: Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
}

.whatsapp-icon {
  display: grid;
  flex: 0 0 26px;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #061015;
  background: #25d366;
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
}

.presenter-settings {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.ai-settings {
  display: grid;
  gap: 10px;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.ai-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-settings-actions button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 6px;
}

.ai-settings-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 0.78rem;
}

.affiliate-settings {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 201, 77, 0.32);
  border-radius: 8px;
  background: rgba(255, 201, 77, 0.06);
}

.affiliate-settings-header {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.affiliate-toggle-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  gap: 7px;
  align-items: center;
  width: 100%;
  min-height: 24px;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.affiliate-toggle-button:hover,
.affiliate-toggle-button:focus-visible {
  color: var(--accent);
}

.affiliate-toggle-icon {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid rgba(255, 201, 77, 0.48);
  border-radius: 50%;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1;
}

.affiliate-toggle-button strong {
  color: var(--text);
  font-size: 0.9rem;
}

.affiliate-settings-body {
  display: grid;
  gap: 10px;
}

.affiliate-settings-body[hidden] {
  display: none;
}

.affiliate-email-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.affiliate-email-field input {
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
}

.affiliate-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.affiliate-link-row input {
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
}

.affiliate-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.affiliate-settings button {
  justify-self: start;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 6px;
}

.affiliate-terms-info {
  display: inline-grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 201, 77, 0.52);
  border-radius: 50%;
  color: var(--accent);
  background: rgba(255, 201, 77, 0.09);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.affiliate-terms-info:hover,
.affiliate-terms-info:focus-visible {
  color: #101827;
  background: var(--accent);
  outline: 0;
}

.affiliate-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.affiliate-summary div {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.affiliate-summary dt {
  margin: 0 0 3px;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.affiliate-summary dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 800;
}

.remote-settings,
.screen-light-settings {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px 14px;
  align-items: center;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(56, 243, 255, 0.05);
}

.remote-settings > div,
.screen-light-settings > div {
  display: grid;
  gap: 4px;
  grid-column: 2;
  grid-row: 1;
  color: var(--muted);
  font-size: 0.78rem;
}

.remote-settings strong,
.screen-light-settings strong {
  color: var(--text);
  font-size: 0.9rem;
}

.remote-settings img,
.screen-light-settings img {
  grid-column: 1;
  grid-row: 1 / span 3;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: #fff;
}

.remote-settings a,
.screen-light-settings a {
  overflow-wrap: anywhere;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 700;
}

.remote-settings button,
.screen-light-settings button {
  justify-self: start;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 6px;
}

.screen-light-session-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.screen-light-session-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
}

.shortcut-reference {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.76rem;
}

.shortcut-reference > strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 0.8rem;
}

.shortcut-reference dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.shortcut-reference dl div {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
}

.shortcut-reference dt {
  color: var(--cyan);
  font-weight: 800;
}

.shortcut-reference dd {
  margin: 0;
}

.session-panel {
  border-color: color-mix(in srgb, var(--cyan) 48%, var(--line));
}

.session-details,
.music-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  min-width: 0;
  max-width: 100%;
}

.panel-title-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.session-body,
.music-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.panel-title-bar span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-title-bar output {
  min-width: 0;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-body,
.music-body {
  margin-top: 4px;
}

.session-body #sessionCategory,
.session-body #sessionSubcategory,
.session-body #sessionSelect,
.session-body #sessionSearch,
.session-body #sessionPreBaselineSelect,
.session-body #sessionAdaptiveGoal {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 0 16px;
  font-size: 1.05rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-body #sessionSearch {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(5, 8, 13, 0.72);
}

.session-body #sessionSearch::placeholder {
  color: var(--muted);
  font-weight: 700;
}

.session-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  gap: 8px;
  align-items: end;
}

.session-search-row .session-search-field {
  min-width: 0;
}

.session-search-row #sessionAskAiButton {
  min-width: 78px;
  min-height: 56px;
  padding: 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.session-search-status {
  min-height: 18px;
  margin-top: -6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.session-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px 44px;
  gap: 8px;
  align-items: stretch;
}

.session-select-row:has(.session-info-button[hidden]):has(.session-inline-delete[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}

.session-select-row:has(.session-info-button:not([hidden])):has(.session-inline-delete[hidden]) {
  grid-template-columns: minmax(0, 1fr) 40px;
}

.session-select-row:has(.session-info-button[hidden]):has(.session-inline-delete:not([hidden])) {
  grid-template-columns: minmax(0, 1fr) 44px;
}

.session-select-row #sessionSelect {
  width: 100%;
}

.session-info-button {
  width: 40px;
  min-width: 40px;
  min-height: 56px;
  padding: 0;
  border-radius: 999px;
  color: var(--cyan);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1;
}

.session-info-button span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.session-info-button[hidden] {
  display: none;
}

.session-inline-delete {
  width: 44px;
  min-width: 44px;
  min-height: 56px;
  padding: 0;
  color: var(--muted);
}

.session-inline-delete[hidden] {
  display: none;
}

.session-inline-delete svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.session-inline-delete:hover:not(:disabled) {
  color: var(--pink);
  border-color: var(--pink);
}

.session-category-purpose {
  margin: 8px 0 2px;
  border-left: 3px solid var(--cyan);
  padding-left: 11px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.session-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  margin-top: 16px;
}

.session-summary div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

#sessionTitle,
#sessionPhaseName,
#sessionPhasePurpose,
#sessionMusicCategory {
  display: block;
  min-width: 0;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#sessionGoal {
  display: -webkit-box;
  min-width: 0;
  max-width: 100%;
  min-height: 5.6em;
  overflow: hidden;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.session-summary span,
.session-phase-readout span,
.session-phase-readout small {
  color: var(--muted);
}

.session-summary output {
  min-width: 0;
  overflow: hidden;
  max-width: 100%;
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-progress {
  overflow: hidden;
  height: 7px;
  margin-top: 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.session-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--band);
  transition: width 250ms linear;
}

.session-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  margin-top: 14px;
}

.adaptive-session-control {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  border: 1px solid color-mix(in srgb, var(--cyan) 26%, var(--line));
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(64, 201, 255, 0.08), rgba(105, 240, 174, 0.04)),
    rgba(255, 255, 255, 0.025);
}

.adaptive-session-control[hidden] {
  display: none !important;
}

.muse-connection-status {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 201, 77, 0.35);
  border-radius: 8px;
  background: rgba(255, 201, 77, 0.08);
  color: var(--text);
}

.muse-connection-status[hidden] {
  display: none !important;
}

.muse-connection-status strong {
  font-size: 0.78rem;
  color: var(--muted);
}

.muse-connection-status span {
  font-size: 0.92rem;
  line-height: 1.35;
}

.muse-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.muse-search-button {
  justify-self: start;
  min-height: 38px;
  padding: 0 16px;
  border-color: rgba(255, 201, 77, 0.42);
  background: rgba(255, 201, 77, 0.1);
}

.muse-search-button[hidden] {
  display: none !important;
}

.muse-radar {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 201, 77, 0.5);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 201, 77, 0.22) 0 2px, transparent 3px),
    radial-gradient(circle, transparent 0 38%, rgba(255, 201, 77, 0.2) 39% 41%, transparent 42% 62%, rgba(255, 201, 77, 0.16) 63% 65%, transparent 66%),
    rgba(255, 201, 77, 0.06);
  box-shadow: 0 0 18px rgba(255, 201, 77, 0.18);
  overflow: hidden;
}

.muse-radar[hidden] {
  display: none !important;
}

.muse-radar::before {
  content: "";
  position: absolute;
  inset: 50% 50% 0 50%;
  width: 50%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 201, 77, 0.95), transparent);
  transform-origin: 0 50%;
  animation: muse-radar-sweep 1.15s linear infinite;
}

.muse-radar span {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 201, 77, 0.34);
  border-radius: 50%;
  animation: muse-radar-pulse 1.15s ease-out infinite;
}

@keyframes muse-radar-sweep {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes muse-radar-pulse {
  0% {
    opacity: 0.85;
    transform: scale(0.55);
  }
  100% {
    opacity: 0;
    transform: scale(1.55);
  }
}

.adaptive-session-control .toggle {
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-weight: 800;
}

.adaptive-session-control .select-field {
  margin-top: 0;
}

.adaptive-session-control .adaptive-choice-field {
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 201, 77, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 201, 77, 0.12), rgba(64, 201, 255, 0.07)),
    rgba(255, 255, 255, 0.035);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.adaptive-session-control .adaptive-choice-field > span {
  font-size: 0.9rem;
  font-weight: 850;
  color: rgba(255, 231, 179, 0.95);
}

.adaptive-session-control #sessionPreBaselineSelect,
.adaptive-session-control #sessionAdaptiveGoal {
  min-height: 54px;
  border-color: rgba(255, 201, 77, 0.5);
  padding: 0 14px;
  background:
    linear-gradient(180deg, rgba(255, 201, 77, 0.09), rgba(64, 201, 255, 0.04)),
    #14171d;
  color: #fff7df;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 0 0 1px rgba(255, 201, 77, 0.08);
}

.adaptive-session-control #sessionPreBaselineSelect:hover,
.adaptive-session-control #sessionPreBaselineSelect:focus-visible,
.adaptive-session-control #sessionAdaptiveGoal:hover,
.adaptive-session-control #sessionAdaptiveGoal:focus-visible {
  border-color: rgba(255, 201, 77, 0.82);
  box-shadow:
    0 0 0 3px rgba(255, 201, 77, 0.12),
    0 0 20px rgba(255, 201, 77, 0.12);
}

.adaptive-session-control output {
  min-height: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.session-analysis-actions {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  max-width: 100%;
}

.session-analysis-actions[hidden] {
  display: none !important;
}

.session-analysis-actions button {
  min-height: 38px;
  padding: 0 12px;
  border-color: color-mix(in srgb, var(--cyan) 38%, var(--line));
  color: var(--cyan);
  font-size: 0.78rem;
}

.session-analysis-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.session-analysis-actions output {
  min-width: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

#analysisCreditsStatus {
  color: var(--text);
  font-weight: 700;
}

#sessionAnalysisStatus {
  grid-column: 1 / -1;
}

.session-library-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.session-library-actions[hidden] {
  display: none;
}

.session-library-actions button {
  min-width: 0;
  padding: 0 8px;
  font-size: 0.75rem;
}

.marketplace-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border: 1px solid rgba(56, 243, 255, 0.35);
  border-radius: 14px;
  padding: 0;
  background: #11151f;
  color: var(--text);
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.7);
}

.marketplace-dialog::backdrop {
  background: rgba(2, 4, 8, 0.82);
  backdrop-filter: blur(8px);
}

.marketplace-dialog > section {
  display: grid;
  max-height: calc(100vh - 34px);
  overflow: auto;
  padding: 22px;
}

.marketplace-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.marketplace-dialog h2 {
  margin-top: 3px;
  font-size: 1.35rem;
}

.marketplace-eyebrow {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.marketplace-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr);
  gap: 12px;
}

.marketplace-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.marketplace-toolbar input,
.marketplace-toolbar select {
  width: 100%;
}

.marketplace-toolbar select {
  min-height: 48px;
  border: 1px solid rgba(64, 201, 255, 0.42);
  border-radius: 8px;
  padding: 0 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02)),
    #11151d;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 800;
}

.marketplace-intro,
.marketplace-status {
  color: var(--muted);
  font-size: 0.8rem;
}

.marketplace-publish {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.marketplace-status {
  display: block;
  min-height: 1.4em;
  margin: 10px 0;
}

.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.marketplace-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.marketplace-card__meta,
.marketplace-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.marketplace-card__meta {
  color: var(--cyan);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.marketplace-card h3 {
  overflow: hidden;
  max-width: 100%;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.marketplace-card__footer span {
  color: var(--muted);
  font-size: 0.72rem;
}

.marketplace-card button {
  min-height: 36px;
  padding: 0 14px;
}

.marketplace-upload-dialog {
  width: min(720px, calc(100vw - 32px));
}

.marketplace-upload-dialog form {
  display: grid;
  max-height: calc(100vh - 34px);
  overflow: auto;
  padding: 22px;
}

.marketplace-upload-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.marketplace-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.marketplace-upload-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.marketplace-upload-grid small {
  color: var(--muted);
  line-height: 1.35;
}

.marketplace-upload-grid .wide {
  grid-column: 1 / -1;
}

.marketplace-upload-grid input,
.marketplace-upload-grid select,
.marketplace-upload-grid textarea {
  width: 100%;
}

.marketplace-upload-grid select,
.music-library-tools select {
  min-height: 48px;
  border: 1px solid rgba(64, 201, 255, 0.42);
  border-radius: 8px;
  padding: 0 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02)),
    #11151d;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(64, 201, 255, 0.05);
}

.marketplace-upload-grid select:hover,
.marketplace-upload-grid select:focus-visible,
.music-library-tools select:hover,
.music-library-tools select:focus-visible {
  border-color: rgba(64, 201, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 0 3px rgba(64, 201, 255, 0.13);
}

.marketplace-upload-grid [aria-invalid="true"] {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 2px rgb(255 107 107 / 24%);
}

.marketplace-code-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.marketplace-code-input button {
  min-width: 90px;
}

.marketplace-upload-grid textarea {
  resize: vertical;
}

.marketplace-upload-grid .marketplace-consent {
  grid-template-columns: auto 1fr;
  align-items: start;
}

.marketplace-upload-grid .marketplace-consent input {
  width: auto;
  margin-top: 2px;
}

@media (max-width: 700px) {
  .marketplace-toolbar,
  .marketplace-grid,
  .marketplace-upload-grid {
    grid-template-columns: 1fr;
  }
}

button.danger {
  border-color: rgba(255, 79, 106, 0.45);
  color: #ff8799;
}

.session-library-status {
  display: block;
  min-height: 1.2em;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.75rem;
}

.session-editor {
  width: min(940px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border: 1px solid rgba(56, 243, 255, 0.35);
  border-radius: 14px;
  padding: 0;
  background: #11151f;
  color: var(--text);
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.7);
}

.session-editor::backdrop {
  background: rgba(2, 4, 8, 0.82);
  backdrop-filter: blur(8px);
}

.session-editor form {
  display: grid;
  max-height: calc(100vh - 34px);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.session-editor header,
.session-editor footer,
.session-editor-phase-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.session-editor header,
.session-editor footer {
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.025);
}

.session-editor header {
  border-bottom: 1px solid var(--line);
}

.session-editor footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.session-editor header span,
.session-editor-phase-heading span {
  color: var(--muted);
  font-size: 0.76rem;
}

.session-editor header h2 {
  margin-top: 3px;
  font-size: 1.2rem;
}

.dialog-close {
  width: 38px;
  min-width: 38px;
  padding: 0;
  font-size: 1.5rem;
}

.session-delete-dialog {
  width: min(480px, calc(100vw - 32px));
}

.session-delete-dialog section {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.session-delete-dialog header,
.session-delete-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.session-delete-dialog h2,
.session-delete-dialog p {
  margin: 0;
}

.session-delete-dialog header span,
.session-delete-dialog p {
  color: var(--muted);
}

.session-delete-dialog footer {
  justify-content: flex-end;
}

.ask-ai-dialog,
.session-description-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border: 1px solid rgba(56, 243, 255, 0.35);
  border-radius: 14px;
  padding: 0;
  background: #11151f;
  color: var(--text);
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.7);
}

.session-description-dialog {
  width: min(920px, calc(100vw - 32px));
}

.ask-ai-dialog::backdrop,
.session-description-dialog::backdrop {
  background: rgba(2, 4, 8, 0.82);
  backdrop-filter: blur(8px);
}

.ask-ai-dialog section,
.session-description-dialog section {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 34px);
  overflow: auto;
  padding: 22px;
}

.ask-ai-dialog header,
.ask-ai-dialog footer,
.session-description-dialog header,
.session-description-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ask-ai-dialog footer,
.session-description-dialog footer {
  justify-content: flex-end;
}

.ask-ai-dialog h2,
.session-description-dialog h2 {
  margin-top: 3px;
  font-size: 1.2rem;
}

.ask-ai-question {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.8rem;
}

.ask-ai-question textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
}

.ask-ai-note,
.ask-ai-status {
  color: var(--muted);
  font-size: 0.78rem;
}

.ask-ai-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 1.3em;
  color: var(--muted);
}

.ask-ai-progress[hidden] {
  display: none;
}

.ask-ai-spinner {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: ask-ai-spin 0.8s linear infinite;
}

.ask-ai-progress:not(.is-searching) .ask-ai-spinner {
  display: none;
}

@keyframes ask-ai-spin {
  to {
    transform: rotate(360deg);
  }
}

.ask-ai-status {
  min-height: 1.3em;
}

.ask-ai-source {
  justify-self: start;
  width: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.68rem;
  line-height: 1.2;
}

.ask-ai-results {
  display: grid;
  gap: 10px;
}

.ask-ai-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.ask-ai-card__meta,
.ask-ai-card small {
  color: var(--muted);
  font-size: 0.72rem;
}

.ask-ai-card h3,
.ask-ai-card p,
.ask-ai-card small {
  min-width: 0;
  margin: 0;
}

.ask-ai-card h3 {
  overflow: hidden;
  font-size: 0.96rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ask-ai-card p,
.ask-ai-card small {
  grid-column: 1 / -1;
  line-height: 1.4;
}

.ask-ai-card p {
  color: var(--text);
  font-size: 0.78rem;
}

.ask-ai-card button {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.76rem;
}

.session-description-output {
  overflow: auto;
  min-height: min(48vh, 420px);
  max-height: min(62vh, 620px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: #111827;
  font-size: 0.92rem;
  line-height: 1.6;
}

.session-description-output:empty {
  display: none;
}

.session-description-output h3 {
  margin: 1.1em 0 0.4em;
  color: #0f172a;
  font-size: 1rem;
}

.session-description-output h3:first-child {
  margin-top: 0;
}

.session-description-output p,
.session-description-output ul,
.session-description-output ol {
  margin: 0 0 0.85em;
}

.session-description-output li {
  margin-bottom: 0.35em;
}

.analysis-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border: 1px solid rgba(56, 243, 255, 0.35);
  border-radius: 14px;
  padding: 0;
  background: #11151f;
  color: var(--text);
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.7);
}

.analysis-dialog::backdrop {
  background: rgba(2, 4, 8, 0.82);
  backdrop-filter: blur(8px);
}

.analysis-dialog > section {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 34px);
  padding: 22px;
}

.analysis-dialog > section > header,
.analysis-dialog > section > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.analysis-dialog > section > header h2,
.analysis-dialog > section > p {
  margin: 0;
}

.analysis-dialog > section > header span,
.analysis-dialog > section > p {
  color: var(--muted);
}

.analysis-report-output {
  overflow: auto;
  min-height: min(56vh, 520px);
  max-height: min(62vh, 620px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: #111827;
  font-size: 0.9rem;
  line-height: 1.55;
}

.analysis-report-output,
.analysis-report-output * {
  box-sizing: border-box;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

.analysis-report-output * {
  line-height: 1.5 !important;
  white-space: normal !important;
  position: static !important;
  float: none !important;
}

.analysis-report-output:empty::before {
  color: #6b7280;
  content: "...";
}

.analysis-report-output h1,
.analysis-report-output h2,
.analysis-report-output h3 {
  margin: 1em 0 0.4em;
  color: #0f172a;
  line-height: 1.18;
}

.analysis-report-output p,
.analysis-report-output ul,
.analysis-report-output ol {
  margin: 0.65em 0 !important;
}

.analysis-report-output pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
}

.analysis-report-output a {
  color: #0369a1;
}

.analysis-incomplete-warning {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  background: #fffbeb;
  color: #92400e;
  font-weight: 700;
}

.analysis-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 0.8em 0;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.analysis-report-output table {
  width: max-content;
  min-width: 100%;
  table-layout: auto !important;
  border-collapse: collapse;
  display: table;
  margin: 0;
}

.analysis-report-output th,
.analysis-report-output td {
  border: 1px solid #d1d5db;
  padding: 5px 7px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  font-size: 0.84rem;
}

.analysis-report-output th {
  background: #f3f4f6;
}

.analysis-dialog > section > footer {
  justify-content: flex-end;
}

@media print {
  body.printing-analysis-report {
    background: #fff;
  }

  body.printing-analysis-report > :not(.analysis-dialog),
  body.printing-analysis-report .analysis-dialog > section > header,
  body.printing-analysis-report .analysis-dialog > section > p,
  body.printing-analysis-report .analysis-dialog > section > footer {
    display: none !important;
  }

  body.printing-analysis-report .analysis-dialog {
    display: block !important;
    position: static;
    width: auto;
    max-height: none;
    border: 0;
    padding: 0;
    background: #fff;
    color: #111;
    box-shadow: none;
  }

  body.printing-analysis-report .analysis-dialog > section {
    display: block;
    max-height: none;
    padding: 0;
  }

  body.printing-analysis-report .analysis-report-output {
    overflow: visible;
    min-height: 0;
    max-height: none;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: #fff;
    color: #111;
    font-size: 11pt;
  }
}

.session-editor-content {
  overflow: auto;
  padding: 22px;
}

.session-editor-basics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.session-editor label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.session-editor label.wide {
  grid-column: 1 / -1;
}

.session-editor-basics .session-editor-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(50, 200, 255, 0.22);
  border-radius: 10px;
  color: var(--text);
  background: rgba(50, 200, 255, 0.055);
}

.session-editor-basics .session-editor-checkbox input {
  width: auto;
  min-width: 18px;
}

.session-editor textarea {
  resize: vertical;
}

.session-editor input,
.session-editor select,
.session-editor textarea {
  width: 100%;
}

.session-editor-phase-heading {
  margin: 24px 0 10px;
}

.session-editor-phase-heading[hidden] {
  display: none;
}

.session-editor-phase-heading > div {
  display: grid;
  gap: 3px;
}

.session-editor-phases {
  display: grid;
  gap: 12px;
}

.session-editor-timeline {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.session-editor-timeline > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.session-editor-timeline > header > div {
  display: grid;
  gap: 4px;
}

.session-editor-timeline > header strong {
  color: var(--cyan);
}

.session-editor-timeline-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
}

.session-editor-timeline-actions button {
  min-height: 36px;
  padding: 8px 12px;
  border-color: color-mix(in srgb, var(--cyan) 55%, var(--line));
  white-space: nowrap;
}

.session-editor-chart {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    rgba(7, 10, 16, 0.82);
  background-size: 100% 25%, 12.5% 100%, auto;
}

.session-editor-chart-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  background: rgba(5, 8, 13, 0.78);
}

.session-editor-chart-heading strong {
  flex: 0 0 auto;
  padding-top: 8px;
  font-size: 0.78rem;
}

.session-editor-chart-heading-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  flex: 1 1 560px;
  min-width: 0;
  gap: 8px;
}

.session-editor-chart-help {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.session-editor-point-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(5, 8, 13, 0.82);
  backdrop-filter: blur(8px);
}

.session-editor-point-nav button {
  width: 22px;
  min-height: 22px;
  padding: 0;
  border-color: color-mix(in srgb, #ffd166 48%, var(--line));
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.session-editor-point-nav button:disabled {
  cursor: not-allowed;
  opacity: 0.34;
}

.session-editor-marker-name,
.session-editor-color-picker,
.session-editor-color-controls,
.session-editor-effect-toggle,
.session-editor-effect-select,
.session-editor-effect-number,
.session-editor-noise-type,
.session-editor-reverb-preset,
.session-editor-audio-mode,
.session-editor-pulse-shape,
.session-editor-music-category {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
}

.session-editor-marker-name,
.session-editor-color-controls {
  min-width: min(360px, 100%);
}

.session-editor-color-controls {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.session-editor-marker-name span,
.session-editor-color-picker span,
.session-editor-effect-toggle span,
.session-editor-effect-select span,
.session-editor-effect-number span,
.session-editor-noise-type span,
.session-editor-reverb-preset span,
.session-editor-audio-mode span,
.session-editor-pulse-shape span,
.session-editor-music-category span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.session-editor-marker-name input {
  width: 190px;
  min-height: 30px;
  border: 1px solid color-mix(in srgb, #ffd166 48%, var(--line));
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
}

.session-editor-color-picker {
  min-width: auto;
}

.session-editor-color-picker input {
  width: 46px;
  height: 30px;
  padding: 2px;
  border: 1px solid color-mix(in srgb, #38f3ff 48%, var(--line));
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.session-editor-effect-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #ffd166;
}

.session-editor-effect-select select,
.session-editor-noise-type select,
.session-editor-reverb-preset select,
.session-editor-audio-mode select,
.session-editor-pulse-shape select,
.session-editor-music-category select,
.session-editor-effect-number input {
  min-height: 38px;
  border: 1px solid color-mix(in srgb, #38f3ff 46%, var(--line));
  border-radius: 8px;
  padding: 0 10px;
  background:
    linear-gradient(180deg, rgba(56, 243, 255, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.session-editor-effect-select select {
  width: 118px;
}

.session-editor-noise-type select {
  width: 154px;
}

.session-editor-reverb-preset select,
.session-editor-audio-mode select,
.session-editor-pulse-shape select {
  width: 178px;
}

.session-editor-music-category select {
  width: 196px;
}

.session-editor-effect-number input {
  width: 64px;
}

.session-editor-chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1 1 100%;
  gap: 6px;
}

.session-editor-chart-legend button {
  min-height: 28px;
  padding: 4px 8px;
  border-color: color-mix(in srgb, var(--curve-color) 55%, var(--line));
  color: var(--text);
  font-size: 0.68rem;
}

.session-editor-chart-legend button::before {
  display: inline-block;
  width: 12px;
  height: 3px;
  margin-right: 6px;
  border-radius: 2px;
  background: var(--curve-color);
  content: "";
  vertical-align: middle;
}

.session-editor-chart-legend button.inactive {
  opacity: 0.38;
}

.session-editor-chart-legend button.active {
  background: color-mix(in srgb, var(--curve-color) 18%, rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--curve-color) 70%, transparent);
}

.session-editor-chart svg {
  display: block;
  width: 100%;
  min-width: 620px;
  height: 210px;
  touch-action: none;
  user-select: none;
}

.session-editor-chart:not(.session-editor-marker-chart) svg {
  padding-right: 44px;
}

.session-editor-marker-chart svg {
  height: 104px;
}

.session-editor-chart text {
  fill: var(--muted);
  font-size: 9px;
  font-weight: 800;
  pointer-events: none;
}

.session-editor-chart .editor-chart-axis,
.session-editor-chart .editor-chart-grid {
  stroke: rgba(255, 255, 255, 0.17);
  stroke-width: 1;
}

.session-editor-chart .editor-chart-grid {
  stroke-dasharray: 4 5;
  opacity: 0.55;
}

.session-editor-chart .editor-chart-phase {
  fill-opacity: 0.055;
  stroke: rgba(255, 255, 255, 0.09);
  stroke-width: 1;
}

.session-editor-chart .editor-chart-line {
  fill: none;
  stroke: var(--curve-color);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.75;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--curve-color) 48%, transparent));
  pointer-events: none;
}

.session-editor-chart .editor-chart-point {
  fill: #11151f;
  stroke: var(--curve-color);
  stroke-width: 3;
  cursor: ns-resize;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--curve-color) 60%, transparent));
}

.session-editor-chart .editor-chart-point:hover,
.session-editor-chart .editor-chart-point.dragging {
  fill: var(--curve-color);
  stroke: #fff;
}

.session-editor-chart .editor-keyframe-point {
  cursor: grab;
}

.session-editor-chart .editor-chart-hitarea {
  fill: transparent;
  pointer-events: all;
}

.session-editor-chart .editor-keyframe-point.selected {
  fill: var(--curve-color);
  stroke: #fff;
  stroke-width: 4;
}

.session-editor-chart .editor-marker-track {
  stroke: rgba(255, 209, 102, 0.48);
  stroke-linecap: round;
  stroke-width: 3;
}

.session-editor-chart .editor-marker-stem {
  stroke: rgba(255, 209, 102, 0.3);
  stroke-dasharray: 4 5;
  stroke-width: 1;
}

.session-editor-chart .editor-marker-point {
  cursor: grab;
}

.session-editor-chart .editor-marker-point.selected {
  fill: #ffd166;
  stroke: #fff;
  stroke-width: 4;
}

.session-editor-chart .editor-color-gradient {
  stroke: rgba(255, 255, 255, 0.34);
  stroke-width: 1;
  filter: drop-shadow(0 0 8px rgba(56, 243, 255, 0.18));
}

.session-editor-chart .editor-color-stem {
  stroke: rgba(255, 255, 255, 0.28);
  stroke-dasharray: 4 5;
  stroke-width: 1;
}

.session-editor-chart .editor-color-point {
  cursor: grab;
}

.session-editor-chart .editor-color-point.selected {
  fill: var(--curve-color);
  stroke: #fff;
  stroke-width: 4;
}

.session-editor-chart .editor-color-effect-badge {
  fill: #ffd166;
  font-size: 10px;
  font-weight: 900;
  text-anchor: middle;
  pointer-events: none;
  paint-order: stroke;
  stroke: rgba(4, 7, 12, 0.9);
  stroke-width: 3px;
}

.session-editor-chart .editor-color-effect-badge.aurora {
  fill: #38f3ff;
}

.session-editor-chart .editor-time-tooltip {
  pointer-events: none;
}

.session-editor-chart .editor-time-tooltip-bg {
  fill: rgba(4, 7, 12, 0.86);
  stroke: rgba(255, 209, 102, 0.72);
  stroke-width: 1;
}

.session-editor-chart .editor-time-tooltip text {
  fill: #ffd166;
  font-size: 9px;
  font-weight: 900;
  text-anchor: middle;
}

.session-editor-chart .editor-time-tooltip .editor-tooltip-value {
  fill: #f8fbff;
  font-size: 13px;
  paint-order: stroke;
  stroke: rgba(3, 6, 12, 0.95);
  stroke-linejoin: round;
  stroke-width: 4px;
}

.session-editor-chart .editor-time-tooltip .editor-tooltip-time {
  fill: #ffd166;
  font-size: 8px;
}

.session-editor-chart .editor-time-step {
  cursor: pointer;
  pointer-events: all;
}

.session-editor-chart .editor-time-step rect {
  fill: rgba(255, 209, 102, 0.15);
  stroke: rgba(255, 209, 102, 0.8);
  stroke-width: 1;
}

.session-editor-chart .editor-time-step:hover rect {
  fill: rgba(255, 209, 102, 0.32);
}

.session-editor-chart .editor-chart-boundary-hit {
  fill: transparent;
  cursor: ew-resize;
}

.session-editor-chart .editor-chart-boundary {
  stroke: rgba(255, 255, 255, 0.44);
  stroke-dasharray: 5 5;
  stroke-width: 1.4;
  pointer-events: none;
}

.session-editor-chart .editor-chart-boundary-grip {
  fill: none;
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  pointer-events: none;
  filter: drop-shadow(0 0 5px rgba(56, 243, 255, 0.55));
}

.session-editor-chart .editor-chart-boundary-hit:hover + .editor-chart-boundary,
.session-editor-chart .editor-chart-boundary-hit.dragging + .editor-chart-boundary {
  stroke: var(--cyan);
  stroke-width: 2;
}

.session-editor-chart .editor-chart-value {
  fill: #f8fbff;
  font-size: 9px;
  font-weight: 900;
  paint-order: stroke;
  pointer-events: none;
  stroke: rgba(3, 6, 12, 0.94);
  stroke-linejoin: round;
  stroke-width: 4px;
  text-anchor: middle;
}

.session-editor-chart .editor-chart-value.crowded {
  font-size: 9.5px;
}

.session-editor-chart .editor-chart-value.selected {
  fill: #ffd166;
  font-size: 11px;
  stroke-width: 5px;
}

.session-editor-chart-scroll {
  overflow-x: auto;
}

.session-phase-editor-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.session-phase-editor-card > header {
  padding: 0 0 12px;
  border: 0;
  background: transparent;
}

.session-phase-editor-card > header strong {
  color: var(--cyan);
}

.session-phase-editor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.session-phase-editor-grid .wide {
  grid-column: span 2;
}

.session-phase-editor-grid .full {
  grid-column: 1 / -1;
}

.session-phase-editor-grid .session-phase-checkbox {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(50, 200, 255, 0.22);
  border-radius: 10px;
  color: var(--text);
  background: rgba(50, 200, 255, 0.055);
}

.session-phase-editor-grid .session-phase-checkbox input {
  width: auto;
  min-width: 18px;
}

.session-phase-editor-card .phase-remove-button {
  min-width: 0;
  min-height: 32px;
  padding: 0 10px;
}

.session-editor-error {
  display: block;
  min-height: 1.2em;
  margin-top: 12px;
  color: #ff8799;
}

.music-library-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: rgba(56, 243, 255, 0.05);
}

.music-library-status > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.music-library-status strong {
  font-size: 0.8rem;
}

.music-library-status span {
  color: var(--muted);
  font-size: 0.76rem;
}

.music-library-status.installed {
  border-color: rgba(105, 240, 174, 0.45);
  background: rgba(105, 240, 174, 0.06);
}

.music-library-status.installed span {
  color: #69f0ae;
}

.music-library-status button {
  flex: 0 0 auto;
}

.breathing-guide {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.breathing-guide .toggle {
  white-space: nowrap;
}

.breathing-guide output {
  min-width: 58px;
  color: var(--cyan);
  font-weight: 900;
  text-align: right;
}

.session-white-light-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.session-white-light-option .toggle {
  white-space: nowrap;
}

.session-phase-readout {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  border-left: 3px solid var(--band);
  padding-left: 12px;
}

.session-phases {
  display: grid;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.session-phases li {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 9px;
  color: var(--muted);
  font-size: 0.78rem;
}

.session-phases li i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.session-phases li strong {
  color: var(--text);
  font-size: 0.82rem;
}

.session-phases li.active {
  border-color: var(--band);
  background: color-mix(in srgb, var(--band) 12%, transparent);
}

.session-graph {
  position: relative;
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    rgba(9, 12, 18, 0.72);
  background-size: 100% 25%, 12.5% 100%, auto;
}

.graph-pulse-indicator {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 11px 14px;
  background: rgba(5, 8, 13, 0.72);
}

.graph-pulse-indicator span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  transition: color 180ms ease;
}

.graph-pulse-indicator i {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.graph-pulse-indicator span.active {
  color: var(--text);
}

.graph-pulse-indicator span.active i {
  border-color: var(--cyan);
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(60, 225, 255, 0.72);
}

.graph-pulse-indicator .smr-indicator {
  margin-left: auto;
}

.graph-pulse-indicator .smr-indicator.smr-active {
  color: var(--text);
}

.graph-pulse-indicator .smr-indicator.smr-active i {
  border-color: #69f0ae;
  background: #69f0ae;
  animation: smr-indicator-pulse 900ms ease-in-out infinite;
}

@keyframes smr-indicator-pulse {
  0%,
  100% {
    opacity: 0.35;
    box-shadow: 0 0 4px rgba(105, 240, 174, 0.35);
    transform: scale(0.82);
  }

  50% {
    opacity: 1;
    box-shadow: 0 0 15px rgba(105, 240, 174, 0.9);
    transform: scale(1.18);
  }
}

.session-graph svg {
  display: block;
  width: 100%;
  height: 178px;
}

.session-graph text {
  fill: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.session-graph .graph-axis {
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1;
}

.session-graph .graph-phase {
  fill: rgba(255, 255, 255, 0.025);
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.session-graph .graph-light {
  fill: none;
  stroke: #f8fbff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  filter: drop-shadow(0 0 6px rgba(248, 251, 255, 0.55));
}

.session-graph .graph-audio {
  fill: none;
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  filter: drop-shadow(0 0 6px rgba(60, 225, 255, 0.5));
}

.session-graph .graph-breathing {
  fill: none;
  stroke: #69f0ae;
  stroke-dasharray: 7 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 5px rgba(105, 240, 174, 0.45));
}

.session-graph .graph-breathing-label {
  fill: #69f0ae;
  font-size: 8px;
}

.session-graph .graph-cursor {
  stroke: var(--pink);
  stroke-width: 2;
  opacity: 0.9;
}

.session-graph .graph-reverb-preset-marker {
  pointer-events: none;
}

.session-graph .graph-reverb-preset-marker line {
  stroke: rgba(105, 240, 174, 0.48);
  stroke-width: 1.2;
  stroke-dasharray: 3 3;
}

.session-graph .graph-reverb-preset-marker rect {
  fill: rgba(7, 25, 20, 0.92);
  stroke: rgba(105, 240, 174, 0.68);
  stroke-width: 1;
}

.session-graph .graph-reverb-preset-marker text {
  fill: #baffd7;
  font-size: 7.8px;
  font-weight: 900;
  text-anchor: middle;
}

.session-graph .graph-reverb-preset-marker.off line {
  stroke: rgba(255, 255, 255, 0.28);
}

.session-graph .graph-reverb-preset-marker.off rect {
  fill: rgba(12, 14, 20, 0.92);
  stroke: rgba(255, 255, 255, 0.26);
}

.session-graph .graph-reverb-preset-marker.off text {
  fill: var(--muted);
}

.session-graph .graph-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
  padding: 0 12px 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.session-graph .graph-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.session-graph .graph-legend i {
  width: 18px;
  height: 3px;
  border-radius: 2px;
}

.session-graph .graph-legend .light-key {
  background: #f8fbff;
  box-shadow: 0 0 10px rgba(248, 251, 255, 0.5);
}

.session-graph .graph-legend .audio-key {
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(60, 225, 255, 0.45);
}

.session-graph .graph-legend .reverb-preset-key {
  background: #69f0ae;
  box-shadow: 0 0 10px rgba(105, 240, 174, 0.45);
}

.session-graph .graph-legend .breathing-key {
  background: #69f0ae;
  box-shadow: 0 0 10px rgba(105, 240, 174, 0.45);
}

.session-intensity-graph {
  margin-top: 10px;
}

.intensity-graph-title {
  border-bottom: 1px solid var(--line);
  padding: 11px 14px;
  background: rgba(5, 8, 13, 0.72);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.session-graph .graph-rgb-intensity {
  fill: none;
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  filter: drop-shadow(0 0 6px rgba(60, 225, 255, 0.5));
}

.session-graph .graph-white-intensity {
  fill: none;
  stroke: #f8fbff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  filter: drop-shadow(0 0 6px rgba(248, 251, 255, 0.55));
}

.session-graph .graph-music-volume {
  fill: none;
  stroke: #ff9f43;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 6px rgba(255, 159, 67, 0.48));
}

.session-graph .graph-noise-volume {
  fill: none;
  stroke: #b89cff;
  stroke-dasharray: 4 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 6px rgba(184, 156, 255, 0.48));
}

.session-graph .graph-reverb-mix {
  fill: none;
  stroke: #69f0ae;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  filter: drop-shadow(0 0 8px rgba(105, 240, 174, 0.72));
}

.session-graph .graph-pulse-volume {
  fill: none;
  stroke: #ff5ca8;
  stroke-dasharray: 7 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 6px rgba(255, 92, 168, 0.48));
}

.session-graph .graph-legend .rgb-intensity-key {
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(60, 225, 255, 0.45);
}

.session-graph .graph-legend .white-intensity-key {
  background: #f8fbff;
  box-shadow: 0 0 10px rgba(248, 251, 255, 0.5);
}

.session-graph .graph-legend .music-volume-key {
  background: #ff9f43;
  box-shadow: 0 0 10px rgba(255, 159, 67, 0.45);
}

.session-graph .graph-legend .noise-volume-key {
  background: #b89cff;
  box-shadow: 0 0 10px rgba(184, 156, 255, 0.45);
}

.session-graph .graph-legend .reverb-mix-key {
  background: #69f0ae;
  box-shadow: 0 0 10px rgba(105, 240, 174, 0.45);
}

.session-graph .graph-legend .pulse-volume-key {
  background: #ff5ca8;
  box-shadow: 0 0 10px rgba(255, 92, 168, 0.45);
}

.session-music-category {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  border: 1px solid color-mix(in srgb, var(--cyan) 38%, var(--line));
  border-radius: 8px;
  padding: 11px 14px;
  background: rgba(9, 12, 18, 0.72);
}

.session-music-category span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.session-music-category strong {
  color: var(--cyan);
  font-size: 0.9rem;
}

.band-panel {
  border-color: color-mix(in srgb, var(--band) 72%, rgba(255, 255, 255, 0.16));
  box-shadow:
    inset 0 0 38px color-mix(in srgb, var(--band) 14%, transparent),
    0 18px 44px rgba(0, 0, 0, 0.24);
}

.subtle,
output {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.control-row {
  display: grid;
  grid-template-columns: 110px 1fr 48px;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
}

.control-row output {
  text-align: right;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--band);
}

.band-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid color-mix(in srgb, var(--band) 60%, rgba(255, 255, 255, 0.16));
  border-radius: 8px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--band) 22%, transparent), rgba(255, 255, 255, 0.04));
}

.band-name {
  font-size: 1.45rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--band);
  text-shadow: 0 0 18px color-mix(in srgb, var(--band) 60%, transparent);
}

.band-range {
  color: var(--text);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.band-purpose,
.safety-note {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.warning-label {
  color: #FF0000;
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.preset-button {
  border-color: color-mix(in srgb, var(--band) 38%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--band) 16%, transparent), rgba(255, 255, 255, 0.04)),
    var(--panel-2);
}

.preset-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  color: var(--text);
  font-weight: 800;
}

.preset-button strong {
  color: var(--band);
  font-variant-numeric: tabular-nums;
}

.band-overview {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.band-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.band-strip span {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 6px;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.band-strip span.active {
  border-color: color-mix(in srgb, var(--band) 78%, white 10%);
  color: var(--text);
  background: color-mix(in srgb, var(--band) 28%, transparent);
  box-shadow: 0 0 22px color-mix(in srgb, var(--band) 28%, transparent);
}

.color-field {
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  color: var(--muted);
}

.ganzfeld-control,
.aurora-control {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  border: 1px solid color-mix(in srgb, var(--cyan) 36%, var(--line));
  border-radius: 8px;
  padding: 11px 12px;
  background: rgba(56, 243, 255, 0.045);
}

.ganzfeld-control > span,
.aurora-control > span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.ganzfeld-control.active,
.aurora-control.active {
  border-color: color-mix(in srgb, var(--cyan) 72%, var(--line));
  background: rgba(56, 243, 255, 0.1);
  box-shadow: inset 0 0 18px rgba(56, 243, 255, 0.06);
}

.aurora-control .control-row {
  grid-template-columns: 110px 1fr 82px;
}

.select-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  margin-top: 14px;
  color: var(--muted);
}

.select-field[hidden] {
  display: none !important;
}

.select-field select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 50px;
  border: 1px solid rgba(64, 201, 255, 0.42);
  border-radius: 8px;
  padding: 0 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02)),
    #11151d;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(64, 201, 255, 0.05);
}

.select-field select:hover,
.select-field select:focus-visible,
.marketplace-toolbar select:hover,
.marketplace-toolbar select:focus-visible {
  border-color: rgba(64, 201, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 0 3px rgba(64, 201, 255, 0.13);
}

.audio-toggle {
  width: 100%;
  margin-top: 14px;
}

.audio-actions {
  display: grid;
  grid-template-columns: 1fr 128px;
  gap: 10px;
  margin-top: 14px;
}

.audio-actions .audio-toggle {
  margin-top: 0;
}

.audio-panel {
  border-color: color-mix(in srgb, #ff8a24 68%, var(--line));
}

.music-panel {
  border-color: color-mix(in srgb, var(--pink) 42%, var(--line));
}

.lighting-panel {
  border-color: color-mix(in srgb, var(--cyan) 34%, var(--line));
}

.master-audio-panel {
  border-color: color-mix(in srgb, #ff8a24 68%, var(--line));
}

.master-audio-panel .control-row {
  grid-template-columns: 110px 1fr 82px;
}

.spatial-reverb {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.spatial-reverb .control-row {
  grid-template-columns: 110px 1fr 82px;
}

.mini-heading {
  display: grid;
  gap: 3px;
}

.mini-heading strong {
  color: #ff9d4d;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mini-heading span {
  color: var(--muted);
  font-size: 0.78rem;
}

.compact-button {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 0.76rem;
}

.equalizer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.equalizer label {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.equalizer input {
  grid-column: 1 / -1;
}

.equalizer output {
  color: #ff9d4d;
  font-weight: 800;
}

.audio-settings-graph {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.audio-settings-graph svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.audio-settings-graph .audio-grid {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}

.audio-settings-graph .audio-zero {
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 1;
}

.audio-settings-graph .audio-curve {
  fill: none;
  stroke: #ff9d4d;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.audio-settings-graph .audio-curve-fill {
  fill: rgba(255, 138, 36, 0.12);
}

.audio-settings-graph .audio-label {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.audio-settings-graph .master-track,
.audio-settings-graph .balance-track {
  fill: rgba(255, 255, 255, 0.1);
}

.audio-settings-graph .master-level {
  fill: #ff9d4d;
}

.audio-settings-graph .balance-marker {
  fill: var(--cyan);
  stroke: rgba(255, 255, 255, 0.65);
  stroke-width: 1;
}

.music-now-playing {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  margin-top: 16px;
}

.music-now-playing span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.music-now-playing strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-light-code-indicator {
  justify-self: start;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, #ffd166 58%, var(--line));
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.12);
  color: #ffd166;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.music-progress {
  margin-top: 10px;
}

.music-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.music-actions button {
  min-width: 0;
  padding: 0 8px;
}

.music-actions button.active {
  border-color: var(--pink);
  background: color-mix(in srgb, var(--pink) 22%, var(--panel-2));
}

.music-category-filter {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 13px;
  border: 1px solid rgba(64, 201, 255, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(64, 201, 255, 0.09), rgba(255, 255, 255, 0.018)),
    rgba(5, 9, 15, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 10px 24px rgba(0, 0, 0, 0.18);
}

.music-category-filter span {
  color: color-mix(in srgb, var(--cyan) 72%, #ffffff);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.music-category-filter select {
  min-height: 50px;
  border-color: rgba(64, 201, 255, 0.46);
  border-radius: 8px;
  padding: 0 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.022)),
    #10141c;
  color: #f6fbff;
  font-size: 1rem;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(64, 201, 255, 0.06);
}

.music-category-filter select:hover,
.music-category-filter select:focus-visible {
  border-color: rgba(64, 201, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 0 3px rgba(64, 201, 255, 0.14);
}

.music-library-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--panel-2) 82%, transparent);
}

.music-library-tools label {
  display: grid;
  gap: 7px;
}

.music-library-tools label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.music-library-tools button {
  min-width: 150px;
}

.music-import-status {
  grid-column: 1 / -1;
  min-height: 1.1em;
  color: var(--muted);
  font-size: 0.78rem;
}

.music-playlist {
  display: grid;
  gap: 6px;
  max-height: 220px;
  margin: 16px 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.music-playlist:empty {
  display: none;
}

.music-playlist li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px 44px;
  align-items: center;
  gap: 8px;
}

.music-track-select {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  grid-column: 1;
  min-width: 0;
  box-sizing: border-box;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 5px 10px;
  text-align: left;
}

.music-session-toggle {
  grid-column: 2;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--pink);
  cursor: pointer;
}

.music-track-delete {
  grid-column: 3;
  position: relative;
  z-index: 2;
  justify-self: end;
  width: 44px;
  min-width: 44px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  color: var(--muted);
  pointer-events: auto;
}

.music-track-delete svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.music-track-delete:hover {
  color: var(--pink);
  border-color: var(--pink);
}

.music-track-delete-placeholder {
  grid-column: 3;
  width: 44px;
}

.music-playlist li.session-disabled .music-track-select {
  opacity: 0.55;
}

.music-playlist li.light-code-track .music-track-select {
  border-color: color-mix(in srgb, #ffd166 52%, var(--line));
  background: color-mix(in srgb, #ffd166 8%, rgba(255, 255, 255, 0.03));
}

.music-playlist li.light-code-track .music-session-toggle {
  opacity: 0.42;
  cursor: not-allowed;
}

.music-playlist img {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
}

.music-playlist strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-playlist small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.music-playlist li.active .music-track-select {
  border-color: var(--pink);
  background: color-mix(in srgb, var(--pink) 18%, var(--panel-2));
}

input[type="color"] {
  width: 72px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px;
  background: transparent;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.channel-grid[hidden] {
  display: none !important;
}

.network-grid {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
  margin-top: 16px;
}

.network-grid[hidden] {
  display: none !important;
}

.network-settings {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.channel-grid label,
.network-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.channel-grid input,
.network-grid input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #111317;
  color: var(--text);
}

.channel-grid .sent-color-field {
  grid-column: 1 / -1;
}

.sent-color-field input[readonly] {
  border-color: color-mix(in srgb, var(--band) 55%, var(--line));
  color: var(--band);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 800;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .stage {
    position: static;
    height: auto;
    min-height: 480px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .visualizer {
    width: min(calc(100vw - 36px), 520px);
  }

  .remote-settings {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .screen-light-settings {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .remote-settings img,
  .screen-light-settings img {
    width: 96px;
    height: 96px;
  }

  .stage:has(.visualizer.show-muse-monitor) {
    padding-bottom: 210px;
  }

  .muse-monitor-readout {
    left: calc(50% - 78px);
    top: calc(100% + 14px);
    right: auto;
    bottom: auto;
    width: min(46vw, 220px);
    transform: translateX(-50%);
  }

  .muse-state-panel {
    left: calc(50% + 132px);
    top: calc(100% + 14px);
    width: min(40vw, 190px);
    transform: translateX(-50%);
  }
}

@media (max-width: 560px) {
  .shell,
  .stage,
  .controls,
  .panel,
  .control-tabs,
  .control-sidebar,
  .control-tab-panel,
  .panel-title-bar,
  .session-body,
  .music-body,
  .session-search-row,
  .session-select-row,
  .select-field,
  .control-row,
  .session-summary,
  .session-progress,
  .session-actions,
  .session-library-actions {
    min-width: 0;
    width: 100%;
  }

  .stage,
  .controls {
    padding: 18px;
  }

  .actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .panel-title-bar {
    flex-wrap: wrap;
  }

  .control-sidebar {
    position: static;
    grid-column: auto;
    grid-row: auto;
  }

  .control-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .transport-panel {
    justify-items: stretch;
  }

  .transport-group.active {
    grid-template-columns: repeat(6, minmax(38px, 1fr));
  }

  .controls[data-control-ui="tabs"] {
    grid-template-columns: 1fr;
  }

  .controls[data-control-ui="tabs"] .control-tab-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .topbar {
    min-width: 0;
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .hero-logo {
    width: min(92vw, 640px);
  }

  .stage:has(.visualizer.show-muse-monitor) {
    padding-bottom: 405px;
  }

  .muse-monitor-readout,
  .muse-state-panel {
    left: 50%;
    width: min(86vw, 300px);
    transform: translateX(-50%);
  }

  .muse-state-panel {
    top: calc(100% + 285px);
  }

  .control-row,
  .preset-row,
  .session-actions,
  .session-library-actions,
  .audio-actions,
  .music-actions,
  .music-library-tools,
  .equalizer,
  .affiliate-link-row,
  .affiliate-summary,
  .network-grid,
  .channel-grid {
    grid-template-columns: 1fr;
  }

  .session-search-row #sessionAskAiButton {
    width: 100%;
  }

  .session-editor-basics,
  .session-phase-editor-grid {
    grid-template-columns: 1fr;
  }

  .session-phase-editor-grid .wide,
  .session-phase-editor-grid .full {
    grid-column: 1;
  }

  .music-library-tools button {
    width: 100%;
  }

  .music-import-status {
    grid-column: 1;
  }

  .breathing-guide {
    grid-template-columns: 1fr;
  }

  .session-white-light-option {
    align-items: flex-start;
    flex-direction: column;
  }

  .breathing-guide output {
    text-align: left;
  }

  .shortcut-reference dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .control-row output {
    text-align: left;
  }

  .frequency-orb {
    width: 170px;
    min-height: 170px;
  }

  .orb-reading strong {
    font-size: 1.25rem;
  }
}
