:root {
  --bg-0: #050b16;
  --bg-1: #081328;
  --bg-2: #0b1a32;
  --bg-3: #0d203b;

  --panel: rgba(10, 24, 43, 0.82);
  --panel-strong: rgba(8, 19, 35, 0.93);
  --panel-border: rgba(92, 146, 205, 0.38);

  --text: #e8f1ff;
  --muted: #9db2d0;
  --accent: #2fc8f6;
  --accent-2: #61e4b3;
  --ok: #67f7a8;
  --warn: #ffd561;

  --shadow-lg: 0 16px 44px rgba(0, 0, 0, 0.42);
  --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.34);
  --trainer-pane-h: clamp(620px, 78vh, 760px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  color: var(--text);
  font-family: "Manrope", "Inter", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(1000px 520px at 6% -16%, rgba(61, 150, 255, 0.16), transparent 56%),
    radial-gradient(780px 460px at 96% -2%, rgba(47, 200, 246, 0.12), transparent 58%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 38%, var(--bg-2) 72%, var(--bg-3));
}

body {
  overflow-x: hidden;
  overflow-y: auto;
}

#appShell {
  width: min(1660px, 97vw);
  min-height: calc(100vh - 0.8rem);
  height: auto;
  margin: 0.4rem auto;
  display: grid;
  grid-template-rows: auto auto;
  gap: 0.7rem;
}

.appHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.brandKicker {
  margin: 0;
  color: #7f9dc5;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
}

h1 {
  margin: 0;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(1.5rem, 1.1vw + 1.05rem, 2.05rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.headphoneNotice {
  white-space: nowrap;
  border: 1px solid rgba(97, 228, 179, 0.58);
  border-radius: 999px;
  background: rgba(19, 86, 71, 0.36);
  color: #d7fff1;
  font-size: 0.83rem;
  padding: 0.48rem 0.82rem;
  box-shadow: var(--shadow-md);
}

.appLayout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 410px);
  gap: 0.86rem;
  align-items: stretch;
  min-height: 0;
}

.stageColumn {
  position: relative;
  min-height: 0;
  height: var(--trainer-pane-h);
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(86, 136, 195, 0.52);
  background: linear-gradient(170deg, rgba(8, 20, 38, 0.78), rgba(6, 14, 28, 0.86));
  box-shadow: var(--shadow-lg);
}

#sceneContainer {
  position: absolute;
  inset: 0;
}

#centerCrosshair {
  position: absolute;
  z-index: 9;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

#centerCrosshair::before,
#centerCrosshair::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(245, 250, 255, 0.96);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.55);
  border-radius: 2px;
}

#centerCrosshair::before {
  width: 14px;
  height: 2px;
}

#centerCrosshair::after {
  width: 2px;
  height: 14px;
}

#sceneContainer canvas {
  display: block;
}

.sceneTopBar {
  position: absolute;
  z-index: 8;
  top: 0.72rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem;
  border-radius: 0.74rem;
  border: 1px solid rgba(131, 176, 226, 0.27);
  background: linear-gradient(160deg, rgba(7, 17, 31, 0.76), rgba(7, 15, 28, 0.72));
  backdrop-filter: blur(6px);
}

.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(98, 141, 190, 0.7);
  border-radius: 0.5rem;
  background: rgba(13, 27, 46, 0.92);
  color: #d9e8ff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.34rem 0.5rem;
}

.chip.subtle {
  border-color: rgba(98, 141, 190, 0.34);
  font-weight: 500;
}

.startOverlay {
  position: absolute;
  z-index: 9;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.startOverlayInner {
  min-width: min(560px, 88vw);
  max-width: 90vw;
  text-align: center;
  border-radius: 0.78rem;
  border: 1px solid rgba(138, 177, 220, 0.5);
  background: rgba(7, 17, 30, 0.2);
  box-shadow: inset 0 0 0 1px rgba(117, 169, 226, 0.12);
  padding: 0.56rem 0.82rem;
}

.startLine {
  margin: 0;
  color: #e5f0ff;
  font-size: 0.9rem;
  font-weight: 600;
}

.startMeta {
  margin: 0.3rem 0 0;
  color: #b7cbe6;
  font-size: 0.8rem;
}

.floatingCard {
  position: absolute;
  z-index: 8;
  border-radius: 0.76rem;
  border: 1px solid rgba(132, 170, 211, 0.22);
  background: linear-gradient(165deg, rgba(7, 16, 30, 0.78), rgba(7, 16, 28, 0.72));
  backdrop-filter: blur(5px);
  box-shadow: var(--shadow-md);
}

.spectrumCard {
  left: 0.72rem;
  top: 3rem;
  width: 334px;
  padding: 0.5rem;
}

.spectrumHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.34rem;
}

.spectrumHead h2 {
  margin: 0;
  font-size: 0.88rem;
}

#spectrumCanvas {
  width: 100%;
  height: 136px;
  border-radius: 0.5rem;
  border: 1px solid rgba(121, 156, 196, 0.36);
  background: rgba(11, 24, 42, 0.84);
}


.resultsCard {
  right: 0.72rem;
  top: 0.72rem;
  width: 238px;
  padding: 0.42rem;
}

.resultsGridCompact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.26rem;
}

.resultsGridCompact > div {
  padding: 0.28rem;
}

.resultsGridCompact .value {
  font-size: 0.9rem;
}

.resultsGridCompact .label {
  font-size: 0.64rem;
}

.feedbackCard {
  left: 0.72rem;
  bottom: 0.72rem;
  width: min(360px, 54%);
  padding: 0.72rem 0.78rem;
}

.feedbackCard h2,
.mapCard h2,
.resultsCard h2,
.panel h2,
.endSessionPopup h3 {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
}

.feedbackCard p {
  margin: 0.3rem 0;
  color: #dce9ff;
}

.mapCard {
  right: 0.72rem;
  top: auto;
  bottom: 0.72rem;
  width: 288px;
  padding: 0.7rem;
}

.mapHint {
  margin: 0 0 0.54rem;
  color: var(--muted);
  font-size: 0.83rem;
}

#mapCanvas {
  width: 258px;
  height: 258px;
  border-radius: 0.56rem;
  border: 1px solid rgba(132, 165, 201, 0.34);
  background: rgba(13, 27, 44, 0.74);
  cursor: crosshair;
}

.mapLegend {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem 0.84rem;
  color: #d3e4ff;
  font-size: 0.76rem;
}

.dot {
  display: inline-block;
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  margin-right: 0.26rem;
  vertical-align: middle;
}

.dot.user {
  background: #49a9ff;
}

.dot.correct {
  background: var(--ok);
}

.dot.candidate {
  background: var(--warn);
}

.roundCountdownPopup {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.56rem;
  border-radius: 0.64rem;
  border: 1px solid rgba(130, 168, 208, 0.45);
  background: rgba(8, 16, 29, 0.94);
  padding: 0.44rem 0.72rem;
  color: #e7f0ff;
  font-size: 0.83rem;
  font-weight: 600;
  animation: pulse 860ms ease-in-out infinite;
}

.roundCountdownPopup .hint {
  color: #99b2d4;
  font-size: 0.77rem;
}

.endSessionPopup {
  position: absolute;
  z-index: 10;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  min-width: min(510px, 88vw);
  border-radius: 0.76rem;
  border: 1px solid rgba(131, 169, 213, 0.5);
  background: linear-gradient(165deg, rgba(7, 16, 30, 0.94), rgba(7, 14, 24, 0.92));
  box-shadow: var(--shadow-lg);
  padding: 0.76rem 0.92rem;
}

.endSessionPopup p {
  margin: 0.28rem 0 0;
  color: #dbe9ff;
  font-size: 0.86rem;
}

.endSessionPopup .hint {
  color: #aac1de;
  font-size: 0.8rem;
}

@keyframes pulse {
  0% {
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.34);
  }
  50% {
    box-shadow: 0 7px 22px rgba(71, 129, 197, 0.34);
  }
  100% {
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.34);
  }
}

.sideColumn {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  min-height: 0;
  height: var(--trainer-pane-h);
  max-height: var(--trainer-pane-h);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.12rem;
}

.panel {
  border-radius: 0.8rem;
  border: 1px solid var(--panel-border);
  background: linear-gradient(165deg, var(--panel), var(--panel-strong));
  backdrop-filter: blur(7px);
  box-shadow: var(--shadow-md);
  padding: 0.48rem;
}

.panelWarning {
  border-color: rgba(255, 127, 147, 0.64);
  background: linear-gradient(165deg, rgba(72, 26, 39, 0.58), rgba(31, 13, 19, 0.66));
}

.panelSession {
  position: relative;
  padding: 0.46rem;
  border-color: rgba(93, 162, 225, 0.48);
  background: linear-gradient(165deg, rgba(14, 31, 54, 0.9), rgba(9, 21, 40, 0.94));
  box-shadow:
    inset 0 0 0 1px rgba(92, 153, 213, 0.1),
    0 8px 20px rgba(0, 0, 0, 0.3);
}

.panelSession::before {
  content: none;
}

.panelSession .panelHead {
  margin-bottom: 0.24rem;
}

.panelSession h2 {
  font-size: 0.96rem;
}

.panelSession .panelTag {
  font-size: 0.62rem;
  padding: 0.16rem 0.34rem;
}

.panelSession .controlsRow {
  margin-bottom: 0.2rem;
}

.panelSession .modeSwitchRow .btn {
  font-size: 0.78rem;
  padding: 0.34rem 0.48rem;
}

.panelSession .sessionPrimaryRow .btn {
  font-size: 0.8rem;
  padding: 0.34rem 0.58rem;
}

.panelSession .roundPill,
.panelSession #roundLabel {
  font-size: 0.76rem;
  padding: 0.2rem 0.45rem;
}

.controlsRow {
  display: flex;
  gap: 0.42rem;
  margin-bottom: 0.36rem;
}

.controlsRow:last-child {
  margin-bottom: 0;
}

.controlsRowTight {
  gap: 0.4rem;
}

.sessionPrimaryRow {
  align-items: center;
}

.sessionPrimaryRow .roundPill,
.sessionPrimaryRow #roundLabel {
  margin: 0 0 0 auto;
  white-space: nowrap;
}

.btn {
  appearance: none;
  border: 1px solid rgba(93, 138, 190, 0.72);
  background: rgba(23, 47, 74, 0.82);
  color: var(--text);
  border-radius: 0.54rem;
  padding: 0.44rem 0.7rem;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 650;
  transition: 130ms ease;
}

.btn:hover:enabled {
  transform: translateY(-1px);
  border-color: rgba(101, 148, 203, 0.95);
  background: rgba(33, 62, 95, 0.95);
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.btnPrimary {
  border: none;
  color: #052337;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.btnPrimary:hover:enabled {
  background: linear-gradient(135deg, #43d4ff, #76ebc0);
}

/* Trainer-specific primary actions: use calmer blue tone (not cyan). */
#startBtn.btnPrimary,
#premiumHeaderUpgradeBtn.btnPrimary {
  border: 1px solid rgba(109, 156, 210, 0.92);
  background: linear-gradient(160deg, rgba(58, 96, 145, 0.98), rgba(41, 73, 116, 0.98));
  color: #eaf3ff;
  box-shadow: inset 0 0 0 1px rgba(162, 198, 240, 0.08);
}

#startBtn.btnPrimary:hover:enabled,
#premiumHeaderUpgradeBtn.btnPrimary:hover:enabled {
  border-color: rgba(132, 178, 229, 0.98);
  background: linear-gradient(160deg, rgba(70, 112, 165, 0.98), rgba(49, 84, 132, 0.98));
}

.btnGhost {
  background: rgba(9, 21, 37, 0.62);
}

.fieldLabel {
  display: block;
  color: #d7e8ff;
  margin: 0.26rem 0 0.16rem;
  font-size: 0.8rem;
}

.checkRow {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 0.42rem;
  margin: 0.16rem 0 0.1rem;
  font-size: 0.8rem;
  color: #d8e8ff;
}

.checkRow input[type="checkbox"] {
  accent-color: #32d8c4;
  width: auto !important;
  min-width: 0;
  flex: 0 0 auto;
  margin: 0;
}

.checkRow span {
  flex: 1 1 auto;
  min-width: 0;
}

.smallNote {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.localPackActions {
  margin-top: 0.34rem;
}

.localPackStatus {
  margin-top: 0.34rem;
}

.fieldLabel[for="volumeRange"] {
  margin-top: 0.12rem;
  margin-bottom: 0.03rem;
}

#volumeRange {
  margin-top: 0;
}

.localPackStatus.isSuccess {
  color: #8ff2c6;
}

.localPackStatus.isError {
  color: #ffb4ba;
}
select,
input[type="range"] {
  width: 100%;
}

select {
  border: 1px solid rgba(81, 125, 176, 0.82);
  border-radius: 0.5rem;
  background: #0d2038;
  color: var(--text);
  padding: 0.41rem;
}

.roundPill,
#roundLabel {
  margin: 0.34rem 0 0;
  color: #d7e8ff;
  font-size: 0.81rem;
  border: 1px solid rgba(115, 153, 196, 0.34);
  border-radius: 999px;
  background: rgba(9, 21, 38, 0.6);
  padding: 0.24rem 0.5rem;
  display: inline-flex;
}

.panelHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.42rem;
  margin-bottom: 0.38rem;
}

.panelTag {
  border: 1px solid rgba(117, 159, 205, 0.4);
  border-radius: 999px;
  background: rgba(12, 28, 50, 0.72);
  color: #c6daf5;
  font-size: 0.7rem;
  line-height: 1;
  padding: 0.2rem 0.4rem;
}

.settingGroup + .settingGroup {
  margin-top: 0.26rem;
  padding-top: 0.24rem;
  border-top: 1px solid rgba(99, 138, 183, 0.24);
}

.panelTraining .settingGroup + .settingGroup {
  margin-top: 0.16rem;
  padding-top: 0.14rem;
}

.panelTraining .settingGroup {
  display: grid;
  row-gap: 0.04rem;
}

.groupTitle {
  margin: 0 0 0.1rem;
  color: #9dbde4;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  font-weight: 700;
}

.panelTraining .groupTitle {
  margin: 0 0 0.01rem;
  font-size: 0.63rem;
}

.panelTraining .fieldLabel {
  margin: 0.02rem 0 0.01rem;
  font-size: 0.78rem;
  line-height: 1.08;
}

.panelTraining .groupTitle + .fieldLabel {
  margin-top: 0;
}

.panelTraining input[type="range"] {
  margin: 0;
}

.panelTraining .fieldLabel + input[type="range"] {
  margin-top: -0.03rem;
}

.panelTraining .checkRow {
  margin: 0.01rem 0 0.01rem;
  font-size: 0.78rem;
}

.panelTraining .controlsRow {
  margin-bottom: 0.04rem;
}

.panelTraining .smallNote {
  margin: 0.01rem 0 0;
  font-size: 0.69rem;
  line-height: 1.22;
}

.panelTraining .localPackActions {
  margin-top: 0.08rem;
}

.panelTraining .btn {
  font-size: 0.8rem;
  padding: 0.34rem 0.58rem;
}

.panelTraining select {
  font-size: 0.79rem;
  padding: 0.34rem 0.42rem;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 16px;
  padding: 0;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1493e7, #1fbcff);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(14, 30, 52, 0.65);
  margin-top: -4px;
}

input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1493e7, #1fbcff);
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(14, 30, 52, 0.65);
}

.premiumLockedAccent {
  color: #e8c36f !important;
  border-color: rgba(214, 168, 75, 0.58) !important;
  text-shadow: 0 0 10px rgba(214, 168, 75, 0.18);
}

.checkStack {
  margin-top: 0.24rem;
}

.checkStack .checkRow {
  margin-bottom: 0;
}

.resultsGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.48rem;
}

.resultsGrid > div {
  border-radius: 0.5rem;
  border: 1px solid rgba(132, 165, 200, 0.3);
  background: linear-gradient(170deg, rgba(10, 19, 33, 0.78), rgba(8, 16, 27, 0.62));
  padding: 0.44rem;
}

.resultsGrid .value {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
}

.resultsGrid .label {
  font-size: 0.74rem;
  color: var(--muted);
}

kbd {
  border: 1px solid rgba(139, 168, 201, 0.5);
  background: rgba(11, 23, 39, 0.9);
  border-radius: 0.3rem;
  padding: 0.04rem 0.32rem;
  font-size: 0.73rem;
  color: #d5e6ff;
}

#isolationGroup[hidden],
#helpModal[hidden],
#firstStartModal[hidden],
#spectrumCard[hidden],
.sessionSecondaryRow[hidden],
.roundCountdownPopup[hidden],
.endSessionPopup[hidden],
.startOverlay[hidden],
#compatPanel[hidden],
#topStartHint[hidden],
#controlsReminderTop[hidden] {
  display: none !important;
}

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

  .stageColumn {
    min-height: 68vh;
  }

  .sideColumn {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .panel:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1500px) {
  .appLayout {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 370px);
  }
}

@media (max-width: 840px) {
  #appShell {
    width: 98vw;
    height: auto;
    margin: 0.55rem auto;
  }

  .appHeader {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.42rem;
  }

  .sceneTopBar {
    flex-wrap: wrap;
    max-width: calc(100% - 1.44rem);
    justify-content: center;
  }

  .feedbackCard {
    width: calc(100% - 1.44rem);
    max-width: none;
  }

  .resultsCard {
    top: 3.7rem;
    right: 0.72rem;
    width: auto;
    max-width: calc(100% - 1.44rem);
  }

  .mapCard {
    right: 0.72rem;
    top: auto;
    bottom: 0.72rem;
    width: auto;
    max-width: calc(100% - 1.44rem);
  }

  #mapCanvas {
    width: 224px;
    height: 224px;
  }

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

  .spectrumCard {
    width: min(330px, calc(100% - 1.44rem));
    top: 3.4rem;
  }

  .sideColumn {
    display: flex;
  }
}












.panelHeadActions {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
}

.iconBtn {
  appearance: none;
  border: 1px solid rgba(120, 165, 214, 0.55);
  background: rgba(11, 25, 44, 0.9);
  color: #d7ebff;
  border-radius: 0.44rem;
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: 120ms ease;
}

.iconBtn:hover {
  border-color: rgba(150, 194, 241, 0.78);
  background: rgba(18, 37, 62, 0.95);
}

.firstStartModal {
  position: fixed;
  inset: 0;
  z-index: 125;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(3, 10, 20, 0.66);
  backdrop-filter: blur(4px);
}

.firstStartCard {
  width: min(520px, 94vw);
  border: 1px solid rgba(100, 146, 196, 0.5);
  border-radius: 0.84rem;
  background: linear-gradient(165deg, rgba(9, 22, 39, 0.97), rgba(7, 15, 28, 0.97));
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.48);
  padding: 0.82rem;
}

.firstStartHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.firstStartHead h3 {
  margin: 0;
  font-size: 1rem;
}

.firstStartCard p {
  margin: 0.42rem 0 0.2rem;
  color: #c6d8f2;
  font-size: 0.84rem;
}

.firstStartActions {
  margin-top: 0.52rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.46rem;
}

.helpModal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(3, 10, 20, 0.72);
  backdrop-filter: blur(5px);
}

.helpCard {
  width: min(900px, 95vw);
  max-height: min(84vh, 860px);
  overflow: auto;
  border: 1px solid rgba(100, 146, 196, 0.46);
  border-radius: 0.9rem;
  background: linear-gradient(165deg, rgba(9, 22, 39, 0.97), rgba(7, 15, 28, 0.97));
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5);
}

.helpHead {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.8rem 0.95rem;
  border-bottom: 1px solid rgba(102, 143, 188, 0.3);
  background: linear-gradient(180deg, rgba(10, 22, 39, 0.98), rgba(10, 21, 37, 0.94));
}

.helpHead h3 {
  margin: 0;
  font-size: 1.05rem;
}

.helpBody {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.74rem;
  padding: 0.86rem;
}

.helpBody section {
  border: 1px solid rgba(103, 144, 188, 0.22);
  border-radius: 0.72rem;
  background: rgba(11, 24, 42, 0.64);
  padding: 0.7rem 0.75rem;
}

.helpBody h4 {
  margin: 0 0 0.42rem;
  color: #d9ecff;
  font-size: 0.9rem;
}

.helpBody p,
.helpBody li {
  color: #c6d8f2;
  font-size: 0.81rem;
  line-height: 1.45;
}

.helpBody ol {
  margin: 0;
  padding-left: 1.1rem;
}




@media (max-width: 980px) {
  .helpBody {
    grid-template-columns: 1fr;
  }

  .helpCard {
    max-height: 88vh;
  }
}



.sceneHelpBtn {
  position: absolute;
  z-index: 9;
  top: 0.72rem;
  left: 0.72rem;
}

.helpFoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem 0.9rem;
  border-top: 1px solid rgba(102, 143, 188, 0.24);
  background: rgba(8, 18, 31, 0.78);
}

.helpFoot .btn {
  margin: 0;
}

.helpFoot .btn:first-child {
  background: rgba(19, 35, 56, 0.92);
}




@media (max-height: 830px) {
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  #appShell {
    height: auto;
    min-height: calc(100vh - 0.8rem);
  }

  .appLayout {
    align-items: start;
  }

  .stageColumn {
    height: min(70vh, 640px);
    min-height: 520px;
  }
}




#builderControls[hidden] {
  display: none !important;
}





.modeSwitchRow {
  margin-bottom: 0.48rem;
}

.sessionModeBlock + .sessionModeBlock {
  margin-top: 0.22rem;
}

.modeSwitchRow .btn {
  flex: 1;
}

.modeSwitchRow .btn.isActive {
  border-color: rgba(104, 154, 210, 0.95);
  background: rgba(34, 62, 94, 0.96);
  color: #eaf3ff;
}

