/* v37 — loetavamad valikuaknad, tume fikseeritud HUD, eraldi tagasinupp ja laeva lähiskänn. */

/* Alumised infokaardid kasutavad sama tumedat holograafilist keelt kui ülejäänud mäng. */
.fixed-hud-card {
  color: #effcff !important;
  background:
    linear-gradient(rgba(69, 216, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69, 216, 255, .035) 1px, transparent 1px),
    linear-gradient(145deg, rgba(3, 31, 58, .985), rgba(0, 13, 33, .99)) !important;
  background-size: .72cqw .72cqw, .72cqw .72cqw, auto !important;
  box-shadow: 0 .28cqw 1.05cqw rgba(0, 5, 16, .52), inset 0 0 1.15cqw rgba(65, 205, 255, .09) !important;
  text-shadow: none !important;
}
.contact-info-card {
  border-color: #21c8ff !important;
  box-shadow: 0 .28cqw 1.05cqw rgba(0, 5, 16, .52), inset 0 0 1.15cqw rgba(33, 200, 255, .11), 0 0 .5cqw rgba(33, 200, 255, .16) !important;
}
.contract-info-card {
  border-color: #ffc928 !important;
  box-shadow: 0 .28cqw 1.05cqw rgba(0, 5, 16, .52), inset 0 0 1.15cqw rgba(255, 201, 40, .09), 0 0 .5cqw rgba(255, 201, 40, .14) !important;
}
.fixed-hud-heading p,
.contact-info-card .fixed-hud-heading p { color: #55dcff !important; }
.contract-info-card .fixed-hud-heading p { color: #ffd34f !important; }
.fixed-hud-heading h2 { color: #ffffff !important; font-size: clamp(14px, .94cqw, 18px) !important; }
.contract-info-card .fixed-hud-heading h2 { color: #ffe487 !important; }
.fixed-hud-heading > span { color: #58ddff !important; background: rgba(4, 42, 70, .82); }
.contract-info-card .fixed-hud-heading > span { color: #ffd34f !important; background: rgba(58, 42, 4, .78); }
.fixed-contact-grid dt,
.fixed-contact-metrics span { color: #83dff5 !important; font-size: clamp(8px, .49cqw, 10px) !important; }
.fixed-contact-grid dd { color: #f6fdff !important; font-size: clamp(9px, .61cqw, 12px) !important; }
.fixed-contract-grid dt { color: #e6b936 !important; font-size: clamp(8px, .49cqw, 10px) !important; }
.fixed-contract-grid dd { color: #ffeaa3 !important; font-size: clamp(9px, .61cqw, 12px) !important; }
.fixed-contract-grid div { border-bottom-color: rgba(255, 205, 64, .24) !important; }
.fixed-contact-metrics span {
  border-color: rgba(50, 205, 255, .34) !important;
  background: rgba(2, 28, 53, .82) !important;
}
.fixed-contact-metrics b { color: #65e2ff !important; font-size: clamp(10px, .68cqw, 13px) !important; }
.fixed-contact-avatar-wrap {
  border-color: rgba(46, 205, 255, .72) !important;
  background: radial-gradient(circle at 50% 36%, rgba(37, 167, 224, .23), rgba(1, 20, 43, .96) 72%) !important;
}

/* Otsuse mõju kuvatakse ülemise valge statistikareana, mitte tegelase või nuppude peal. */
.effect-toast {
  z-index: 48 !important;
  left: 50% !important;
  top: .65% !important;
  right: auto !important;
  bottom: auto !important;
  width: auto !important;
  max-width: 76% !important;
  min-height: 2.35cqw;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: .34cqw .55cqw !important;
  border: 1px solid rgba(55, 197, 235, .72) !important;
  border-radius: .42cqw !important;
  background: rgba(255, 255, 255, .97) !important;
  color: #082033 !important;
  font-size: clamp(10px, .64cqw, 12px) !important;
  box-shadow: 0 .2cqw .8cqw rgba(0, 8, 22, .34) !important;
  transform: translate(-50%, -.65cqw) !important;
}
.effect-toast.visible { transform: translate(-50%, 0) !important; }
.effect-toast .effect-list { display: flex; flex-wrap: wrap; justify-content: center; gap: .24cqw; }
.effect-toast .stat-delta,
.effect-toast .effect-note {
  min-height: 1.42cqw;
  padding: .14cqw .28cqw !important;
  border-radius: 999px;
  text-shadow: none !important;
  font-size: clamp(9px, .58cqw, 11px) !important;
}
.effect-toast .effect-note { color: #0a2c43 !important; background: #edf9ff !important; border-color: #9adcf1 !important; }
.effect-toast.bad { border-color: #ff8b86 !important; }

/* Tagasinupp on omaette hõljuv juhtnupp suure otsustusakna välisküljel. */
.back-button {
  z-index: 47 !important;
  left: auto !important;
  right: 1.2% !important;
  top: auto !important;
  bottom: 23.25% !important;
  min-width: 6.8cqw;
  padding: .42cqw .62cqw !important;
  border: 1px solid rgba(103, 225, 255, .82) !important;
  border-radius: .48cqw !important;
  background: linear-gradient(145deg, rgba(5, 48, 78, .97), rgba(1, 20, 43, .98)) !important;
  color: #f2fdff !important;
  font-size: clamp(10px, .65cqw, 12px) !important;
  box-shadow: 0 0 .62cqw rgba(55, 211, 255, .25), inset 0 0 .65cqw rgba(55, 211, 255, .09) !important;
}
.back-button:disabled { opacity: .24 !important; }

/* Taasta varasemate versioonide suurem tüpograafia ja selgemad valikukaardid. */
.holo-console h2 {
  font-size: clamp(17px, 1.13cqw, 22px) !important;
  line-height: 1.08 !important;
}
.console-role { font-size: clamp(9px, .57cqw, 11px) !important; }
.prompt-copy {
  display: block !important;
  font-size: clamp(10px, .68cqw, 13px) !important;
  line-height: 1.2 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
.choice-grid { gap: .38cqw !important; }
.choice-button {
  min-height: 0 !important;
  padding: .48cqw .56cqw !important;
  gap: .18cqw .42cqw !important;
  border-radius: .48cqw !important;
  overflow: hidden;
  background-image:
    linear-gradient(145deg, rgba(5, 48, 83, .92), rgba(1, 20, 44, .97)),
    var(--hud-panel-card) !important;
}
.choice-button strong {
  font-size: clamp(13px, .86cqw, 17px) !important;
  line-height: 1.12 !important;
}
.choice-button span {
  font-size: clamp(10px, .64cqw, 12.5px) !important;
  line-height: 1.22 !important;
}
.choice-button small {
  font-size: clamp(9px, .57cqw, 11px) !important;
  line-height: 1.15 !important;
}
.choice-icon {
  width: 2.05cqw !important;
  height: 2.05cqw !important;
  min-width: 25px !important;
  min-height: 25px !important;
}

/* Kolme rolli koherentsuse valikud jäävad loetavaks ilma sisemise kerimiseta. */
.coherence-grid { gap: .42cqw !important; }
.coherence-choice { padding: .48cqw !important; gap: .22cqw !important; }
.coherence-choice strong { font-size: clamp(12px, .8cqw, 16px) !important; }
.coherence-choice span { font-size: clamp(9px, .61cqw, 12px) !important; line-height: 1.18 !important; }
.coherence-choice small { font-size: clamp(9px, .56cqw, 11px) !important; }
.coherence-intro { font-size: clamp(10px, .66cqw, 13px) !important; line-height: 1.22 !important; }

/* Keerukate vaadete tekst ei tohi olla 7–8 px. */
.timeline-readout span,
.booking-card span,
.booking-card small,
.timeline-hint,
.memory-filter-instruction span,
.segment-toggle span,
.segment-meta,
.segment-status,
.fear-layer-metrics span,
.fear-packet-field span,
.fear-packet-field > div,
.scan-warning span,
.scan-stat span,
.scan-finding span,
.scan-finding em {
  font-size: clamp(9px, .55cqw, 11px) !important;
  line-height: 1.15 !important;
}
.timeline-readout b,
.booking-card b,
.memory-filter-instruction strong,
.segment-toggle strong,
.fear-layer-metrics b,
.scan-warning strong,
.scan-stat b,
.scan-finding strong {
  font-size: clamp(11px, .7cqw, 14px) !important;
}
.timeline-actions strong { font-size: clamp(10px, .65cqw, 13px) !important; }
.timeline-actions .primary-button { font-size: clamp(10px, .64cqw, 12px) !important; }

/* Terviseskänn toimub laevas lähidistantsilt. Keskosa jääb hilisema kontaktisiku sprite'i jaoks vabaks. */
.scene[data-step-type="healthScan"] .holo-console {
  left: 54.2% !important;
  top: 12.2% !important;
  width: 42.1% !important;
  height: 61.5% !important;
  padding: .58cqw .66cqw .62cqw !important;
}
.scene[data-step-type="healthScan"] .health-scan-workstation {
  grid-template-columns: minmax(0, 1fr) !important;
  height: 100% !important;
}
.scene[data-step-type="healthScan"] .scan-visual-panel { display: none !important; }
.scene[data-step-type="healthScan"] .scan-control-panel {
  grid-template-rows: auto auto minmax(0, 1fr) auto !important;
  gap: .42cqw !important;
  padding: .46cqw !important;
  overflow: hidden !important;
}
.scene[data-step-type="healthScan"] .scan-stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: .34cqw !important;
}
.scene[data-step-type="healthScan"] .scan-stat { padding: .35cqw .42cqw !important; }
.scene[data-step-type="healthScan"] .scan-warning { padding: .38cqw .46cqw !important; }
.scene[data-step-type="healthScan"] .scan-finding { padding: .42cqw !important; }
.scene[data-step-type="healthScan"] .scan-start,
.scene[data-step-type="healthScan"] .scan-control-panel .primary-button {
  min-height: 2.55cqw !important;
  padding: .42cqw .55cqw !important;
  font-size: clamp(11px, .72cqw, 14px) !important;
}

/* Väiksematel ekraanidel säilib sama loogika; teksti ei peideta. */
@container (max-width: 980px) {
  .prompt-copy { display: block !important; font-size: clamp(9px, .64cqw, 11px) !important; }
  .fixed-contact-grid dd,
  .fixed-contract-grid dd { font-size: clamp(8px, .55cqw, 10px) !important; }
  .scene[data-step-type="healthScan"] .holo-console {
    left: 51.5% !important;
    width: 45.2% !important;
  }
}

/* Rohkem vertikaalruumi töövaadetele, kuid alumine HUD jääb eraldi kihiks. */
.scene,
.scene[data-room-owner="white"],
.scene[data-room-owner="oversoul"],
.scene[data-room-owner="grey"] {
  --screen-h: 58.2%;
}
.scene[data-room-owner="mantis"] { --screen-h: 62.1%; }
.back-button { bottom: 24.4% !important; }

/* Koherentsuskaardid algavad kohe selgituse alt, mitte suure tühja ploki järel. */
.coherence-picker {
  grid-template-rows: auto auto !important;
  align-content: start !important;
  height: auto !important;
}
.coherence-grid {
  height: auto !important;
  align-self: start !important;
}
.coherence-choice {
  min-height: 11.4cqw !important;
  align-content: center !important;
}

/* Mälufilter: eemalda korduv mikrotekst ja kasuta vabanenud ruumi suurema fondi jaoks. */
.segment-effect-title { display: none !important; }
.memory-filter-choice strong { font-size: clamp(11px, .74cqw, 14px) !important; }
.memory-filter-choice .segment-meta { font-size: clamp(9px, .57cqw, 11px) !important; }
.memory-filter-choice .segment-status { font-size: clamp(8px, .52cqw, 10px) !important; }
.memory-filter-choice .stat-delta { font-size: clamp(8px, .5cqw, 10px) !important; }
.memory-filter-footer-actions > span { font-size: clamp(9px, .57cqw, 11px) !important; }

/* Hirmuskänni põhitekst peab jääma loetavaks ka 16:9 tavavaates. */
.thought-layer header span,
.thought-layer header b,
.thought-current span,
.fear-layer-metrics span,
.fear-packet-title,
.fear-packet-field span,
.fear-packet-field > div {
  font-size: clamp(10px, .62cqw, 12px) !important;
}
.fear-layer-metrics b { font-size: clamp(12px, .76cqw, 15px) !important; }
.contact-fear-packet { gap: .16cqw !important; }
