/* v12: stseenipõhine 4:3 ruumisüsteem, väiksem HUD ja kontaktisiku sprite */
.top-actions { display:flex; gap:.45cqw; justify-content:flex-end; }
.game-board { grid-template-rows: 6.2% 4.2% minmax(0,1fr) 9.4%; gap:.55cqw; }
.topbar { padding:.35cqw .6cqw; grid-template-columns: 1.15fr .95fr 1.45fr auto; }
.role-progress { gap:.45cqw; }
.role-segment { padding:.22cqw .45cqw; }
.bottom-strip { min-height:0; }
.scene { --console-x: 39%; --console-y: 5%; --console-w: 58%; --console-h: 89%; --actor-x: 2.6%; --actor-y: 3%; --actor-w: 31%; --actor-h: 86%; --contact-x: 15%; --contact-y: 42%; --contact-w: 18%; --contact-h: 50%; }
.character-stage { left:var(--actor-x); bottom:var(--actor-y); width:var(--actor-w); height:var(--actor-h); }
.holo-console { left:var(--console-x); top:var(--console-y); right:auto; width:var(--console-w); height:var(--console-h); background-color:rgba(1,13,31,.78); backdrop-filter:blur(2px); }
.console-grey,.console-oversoul { left:var(--console-x); right:auto; top:var(--console-y); width:var(--console-w); height:var(--console-h); }
.scene-background { image-rendering:pixelated; filter:saturate(1.05) contrast(1.08) brightness(.82); }
.scene-vignette { background:radial-gradient(circle at 52% 44%,transparent 25%,rgba(0,5,14,.12) 58%,rgba(0,3,10,.67) 100%); }
.contact-stage { position:absolute; z-index:4; left:var(--contact-x); bottom:var(--contact-y); width:var(--contact-w); height:var(--contact-h); display:none; place-items:end center; pointer-events:none; }
.contact-stage.visible { display:grid; }
.contact-sprite { max-width:100%; max-height:100%; object-fit:contain; filter:drop-shadow(0 0 1.2cqw rgba(79,224,255,.64)); }
.contact-name { position:absolute; left:50%; bottom:-.2cqw; transform:translateX(-50%); padding:.2cqw .55cqw; border:1px solid var(--line-soft); border-radius:999px; background:rgba(1,12,28,.9); font-size:var(--small); font-weight:900; white-space:nowrap; }
.incoming-actions { display:none; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.35cqw; margin-top:.45cqw; }
.incoming-contact-panel.visible.actionable .incoming-actions { display:grid; }
.incoming-actions .tiny-button { padding:.36cqw .3cqw; }
.mission-type-label { display:block; margin-top:.2cqw; color:#8ff5cb; font-size:var(--small); font-weight:850; }
.consciousness-components { display:grid; gap:.55cqw; }
.component-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.5cqw; align-items:center; }
.component-row span { color:#d8f6ff; font-weight:800; }
.component-row b { color:#fff; }
.component-bar { grid-column:1/-1; height:.48cqw; min-height:5px; border-radius:999px; background:rgba(93,165,193,.18); overflow:hidden; }
.component-bar i { display:block; height:100%; background:linear-gradient(90deg,#55dfff,#68f2af); }
.scene[data-scene-group="white"] .holo-console { border-color:#62dfff; }
.scene[data-scene-group="mantis"] .holo-console { border-color:#9d73ff; box-shadow:0 0 1.25cqw rgba(154,110,255,.56),inset 0 0 1.8cqw rgba(92,51,190,.23); }
.scene[data-scene-group="memory"] .holo-console { border-color:#67e7ff; }
.scene[data-scene-group="oversoul"] .holo-console { border-color:#86f4cf; box-shadow:0 0 1.35cqw rgba(87,240,190,.42),inset 0 0 1.8cqw rgba(42,139,127,.22); }
.scene.scene-wide-console { --console-x:31%; --console-w:66%; }
.scene.scene-narrow-console { --console-x:52%; --console-w:44%; }
.scene.scene-center-console { --console-x:27%; --console-w:69%; --actor-w:24%; }
.scene.scene-contact-focus { --console-x:49%; --console-w:48%; --contact-x:15%; --contact-w:25%; --contact-y:10%; --contact-h:76%; --actor-x:1%; --actor-w:18%; }
.scene.scene-memory-focus { --console-x:42%; --console-w:55%; --contact-x:10%; --contact-w:28%; --contact-y:4%; --contact-h:83%; }
.game-board.minimal-hud { grid-template-rows:5.7% 0 minmax(0,1fr) 0; }
.game-board.minimal-hud .role-progress,.game-board.minimal-hud .bottom-strip { opacity:0; pointer-events:none; overflow:hidden; }
.game-board.minimal-hud .scene { border-radius:.75cqw; }
.game-board.minimal-hud .brand-block .eyebrow,.game-board.minimal-hud .schedule-alert { display:none; }
.game-board.minimal-hud .topbar { grid-template-columns:1fr 1fr 1.2fr auto; }
.game-board.minimal-hud .character-name,.game-board.minimal-hud .contact-name { opacity:.65; }

@media (max-width:900px) {
  .top-actions #hudToggle { display:none; }
  .game-board { grid-template-rows:7% 4.4% minmax(0,1fr) 10.6%; }
  .incoming-actions { grid-template-columns:1fr; }
}


/* v13 — terviseskänn, ligikaudsed näitajad ja telepaatilised terviselaused */
.estimated-metric b,
.metric-card.estimated b,
.drawer-stat.estimated b,
.component-row.estimated b { color:#ffd86b !important; }
.estimated-metric::after { content:"HINNANG"; margin-left:.25em; color:#ffd86b; font-size:.68em; font-weight:900; letter-spacing:.06em; }
.drawer-stat.estimated,
.component-row.estimated,
.coherence-profile > div.estimated { border-style:dashed; opacity:.88; }
.component-row.estimated .component-bar i { background:repeating-linear-gradient(90deg,#ffd86b 0 8px,rgba(255,216,107,.28) 8px 13px); }

.health-scan-workstation {
  display:grid;
  grid-template-columns:minmax(190px,.82fr) minmax(0,1.45fr);
  gap:.72cqw;
  height:100%;
  min-height:0;
}
.scan-visual-panel,
.scan-control-panel {
  min-height:0;
  border:1px solid rgba(92,225,255,.55);
  border-radius:.78cqw;
  background:linear-gradient(155deg,rgba(2,28,56,.94),rgba(1,10,27,.96));
  box-shadow:inset 0 0 1.2cqw rgba(45,180,230,.12);
}
.scan-visual-panel { position:relative; overflow:hidden; display:grid; place-items:center; padding:.7cqw; }
.scan-visual-panel::before { content:""; position:absolute; inset:0; background:linear-gradient(180deg,transparent 0 48%,rgba(81,231,255,.13) 49%,transparent 51%); background-size:100% 2.6cqw; animation:scanPanelSweep 2.4s linear infinite; pointer-events:none; }
@keyframes scanPanelSweep { from{background-position-y:-6cqw} to{background-position-y:22cqw} }
.scan-mode-badge { position:absolute; top:.55cqw; left:.55cqw; z-index:2; padding:.28cqw .48cqw; border:1px solid rgba(92,225,255,.5); border-radius:999px; background:rgba(0,13,31,.88); color:#9cf3ff; font-size:var(--small); font-weight:950; letter-spacing:.07em; }
.health-body-svg { width:min(100%,13.5cqw); max-height:82%; overflow:visible; filter:drop-shadow(0 0 .8cqw rgba(76,220,255,.55)); }
.body-wire { opacity:.72; }
.organ-lines { opacity:.35; }
.scan-hotspot { fill:rgba(255,194,77,.36); stroke:#ffd76a; stroke-width:2; opacity:.18; }
.scan-hotspot-ring { fill:none; stroke:#ffd76a; stroke-width:2; stroke-dasharray:7 5; opacity:.18; transform-origin:center; }
.health-body-svg.active .scan-hotspot { opacity:1; animation:organPulse 1.15s ease-in-out infinite alternate; }
.health-body-svg.active .scan-hotspot-ring { opacity:.95; animation:organRing 3s linear infinite; }
.scan-sweep { stroke:#6df4ff; stroke-width:3; filter:drop-shadow(0 0 5px #6df4ff); animation:bodySweep 2.2s ease-in-out infinite alternate; }
@keyframes organPulse { to{r:29;fill:rgba(255,112,93,.54)} }
@keyframes organRing { to{transform:rotate(360deg)} }
@keyframes bodySweep { from{transform:translateY(0)} to{transform:translateY(265px)} }
.scan-organ-label { position:absolute; left:.55cqw; right:.55cqw; bottom:.55cqw; padding:.45cqw .55cqw; border:1px solid rgba(92,225,255,.38); border-radius:.55cqw; background:rgba(0,10,27,.88); }
.scan-organ-label span,.scan-organ-label b { display:block; }
.scan-organ-label span { color:var(--muted); font-size:var(--small); }
.scan-organ-label b { margin-top:.12cqw; color:#fff; font-size:var(--font); }
.scan-control-panel { display:grid; grid-template-rows:auto auto minmax(0,1fr) auto; gap:.58cqw; padding:.72cqw; overflow:auto; }
.scan-warning { display:grid; grid-template-columns:auto 1fr; gap:.55cqw; align-items:center; padding:.52cqw .6cqw; border:1px solid rgba(255,216,107,.42); border-radius:.62cqw; background:rgba(61,47,8,.38); }
.scan-warning img { width:2.1cqw; min-width:25px; aspect-ratio:1; object-fit:contain; }
.scan-warning strong,.scan-warning span { display:block; }
.scan-warning strong { color:#fff; }
.scan-warning span { margin-top:.08cqw; color:#e8f7fb; font-size:var(--small); line-height:1.3; }
.scan-stat-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.42cqw; }
.scan-stat { padding:.48cqw .55cqw; border:1px solid rgba(79,215,255,.35); border-radius:.55cqw; background:rgba(1,20,43,.82); }
.scan-stat span,.scan-stat b { display:block; }
.scan-stat span { color:var(--muted); font-size:var(--small); }
.scan-stat b { margin-top:.1cqw; color:#fff; font-size:var(--font); }
.scan-stat.locked { border-style:dashed; }
.scan-stat.locked b { color:#ffd86b; }
.scan-stat.revealed { border-color:rgba(103,244,187,.58); box-shadow:inset 0 0 .65cqw rgba(67,235,174,.1); }
.scan-finding { display:grid; align-content:start; gap:.25cqw; padding:.62cqw; border:1px solid rgba(103,244,187,.42); border-radius:.62cqw; background:rgba(7,56,53,.38); }
.scan-finding span { color:#8ff7d1; font-size:var(--small); font-weight:900; letter-spacing:.06em; }
.scan-finding strong { color:#fff; font-size:var(--choice); line-height:1.18; }
.scan-finding em { color:#d7f6ff; font-size:var(--small); font-style:normal; }
.scan-progress-shell { align-self:center; display:grid; gap:.35cqw; }
.scan-progress { height:.72cqw; min-height:8px; overflow:hidden; border-radius:999px; background:rgba(91,172,200,.17); }
.scan-progress i { display:block; width:0; height:100%; background:linear-gradient(90deg,#53cfff,#62f2ae,#fff17b); box-shadow:0 0 .8cqw rgba(90,239,255,.55); transition:width .08s linear; }
.scan-progress-shell span { color:#d8f7ff; font-size:var(--small); }
.scan-start { min-height:3.1cqw; }

.health-guidance-shell,.phrase-editor { display:grid; gap:.65cqw; }
.guidance-summary { display:grid; gap:.16cqw; padding:.58cqw .68cqw; border:1px solid rgba(103,244,187,.45); border-radius:.65cqw; background:rgba(5,45,49,.56); }
.guidance-summary span { color:#8ff7d1; font-size:var(--small); font-weight:900; letter-spacing:.05em; }
.guidance-summary b { color:#fff; font-size:var(--choice); }
.guidance-summary small { color:#d0edf3; font-size:var(--small); line-height:1.3; }
.guidance-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.guidance-choice { min-height:5.8cqw; }
.guidance-choice.trauma-option { border-color:rgba(204,129,255,.68); background:linear-gradient(135deg,rgba(59,24,78,.92),rgba(14,13,46,.95)); }
.phrase-grid { display:grid; gap:.5cqw; }
.phrase-choice { display:grid; gap:.18cqw; padding:.7cqw .75cqw; text-align:left; border:1px solid rgba(83,219,255,.52); border-radius:.65cqw; background:rgba(2,25,50,.88); cursor:pointer; }
.phrase-choice:hover,.phrase-choice.selected { border-color:#68f2ae; background:rgba(6,61,58,.78); }
.phrase-choice span { color:#fff; font-size:var(--choice); font-weight:900; }
.phrase-choice small { color:var(--muted); font-size:var(--small); }
.phrase-actions { display:flex; gap:.55cqw; justify-content:flex-end; }

.scan-summary-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.45cqw; }
.scan-summary-grid > div { padding:.5cqw .58cqw; border:1px solid rgba(84,218,255,.3); border-radius:.55cqw; background:rgba(1,19,42,.76); }
.scan-summary-grid .wide { grid-column:1/-1; }
.scan-summary-grid .trauma { border-color:rgba(204,129,255,.45); }
.scan-summary-grid span,.scan-summary-grid b { display:block; }
.scan-summary-grid span { color:var(--muted); font-size:var(--small); }
.scan-summary-grid b { margin-top:.12cqw; color:#fff; line-height:1.28; }
.scan-locked-summary { display:grid; grid-template-columns:auto 1fr; gap:.62cqw; align-items:center; padding:.65cqw; border:1px dashed rgba(255,216,107,.5); border-radius:.62cqw; background:rgba(58,45,9,.28); }
.scan-locked-summary img { width:2.5cqw; min-width:32px; }
.scan-locked-summary b,.scan-locked-summary span { display:block; }
.scan-locked-summary b { color:#ffd86b; }
.scan-locked-summary span { margin-top:.12cqw; color:#e5f5f8; font-size:var(--small); line-height:1.3; }

@container (max-width:820px){
  .health-scan-workstation{grid-template-columns:1fr;overflow:auto}.scan-visual-panel{min-height:260px}.scan-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.guidance-grid{grid-template-columns:1fr}
}


/* v14 — hingelepingu mälutsüklid ja terviseskänni tausta täielik vaade */
.scene[data-scene-id="scene-13"] .scene-background,
.scene[data-scene-id="scene-14"] .scene-background {
  object-fit: contain;
  object-position: center;
  background: radial-gradient(circle at center, #06172a 0, #020914 72%);
}
.opening-contract-card {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:.7cqw;
  align-items:center;
  padding:.65cqw .72cqw;
  border:1px solid rgba(255,214,92,.55);
  border-radius:.68cqw;
  background:linear-gradient(135deg,rgba(63,45,6,.68),rgba(3,22,46,.9));
  box-shadow:inset 0 0 1cqw rgba(255,205,62,.08),0 0 .7cqw rgba(255,205,62,.08);
}
.opening-contract-card span,.opening-contract-card strong,.opening-contract-card em { display:block; }
.opening-contract-card span { color:#ffe16d; font-size:var(--small); font-weight:950; letter-spacing:.07em; }
.opening-contract-card strong { margin-top:.13cqw; color:#fff; font-size:var(--font); }
.opening-contract-card em { margin-top:.18cqw; color:#d8f2f8; font-size:var(--small); font-style:normal; line-height:1.3; }
.opening-metrics { grid-template-columns:repeat(5,minmax(0,1fr)); }
.opening-cycle-markers { position:absolute; inset:0; pointer-events:none; }
.cycle-marker {
  position:absolute;
  top:calc(56% - .34cqw);
  width:.68cqw;
  height:.68cqw;
  min-width:7px;
  min-height:7px;
  transform:translateX(-50%) rotate(45deg);
  border:1px solid #6feeff;
  background:#08283e;
  box-shadow:0 0 .42cqw rgba(75,228,255,.75);
}
.cycle-marker.contract-cycle { border-color:#ffe16d; background:#8a6813; box-shadow:0 0 .65cqw rgba(255,220,82,.88); }
.contract-opening-window {
  position:absolute;
  top:calc(56% - 1.05cqw);
  height:2.1cqw;
  min-height:20px;
  border:1px solid rgba(255,221,94,.85);
  border-radius:999px;
  background:linear-gradient(90deg,rgba(255,210,54,.08),rgba(255,225,104,.30),rgba(255,210,54,.08));
  box-shadow:0 0 .8cqw rgba(255,216,71,.22),inset 0 0 .7cqw rgba(255,229,126,.12);
}
.opening-legend {
  position:absolute;
  right:.65cqw;
  top:.55cqw;
  display:flex;
  gap:.65cqw;
  color:#d8f4fa;
  font-size:var(--small);
}
.opening-legend span { display:inline-flex; align-items:center; gap:.25cqw; }
.opening-legend i { width:.72cqw; height:.72cqw; min-width:8px; min-height:8px; display:inline-block; }
.legend-cycle { transform:rotate(45deg); border:1px solid #6feeff; background:#08283e; }
.legend-contract { border:1px solid #ffe16d; border-radius:999px; background:rgba(255,220,82,.28); }
.opening-guidance {
  display:flex;
  justify-content:space-between;
  gap:.7cqw;
  padding:.48cqw .62cqw;
  border:1px solid rgba(107,220,255,.35);
  border-radius:.62cqw;
  background:rgba(2,22,46,.84);
  color:#e7f9ff;
  font-size:var(--small);
}
.opening-guidance strong { color:#fff; }
.opening-guidance.good { border-color:rgba(92,244,169,.58); background:rgba(4,58,47,.58); }
.opening-guidance.good strong { color:#78ffb6; }
.opening-guidance.medium { border-color:rgba(255,215,91,.52); background:rgba(64,48,8,.5); }
.opening-guidance.medium strong { color:#ffe16d; }
.opening-guidance.bad { border-color:rgba(255,103,103,.45); background:rgba(70,14,25,.46); }
.opening-guidance.bad strong { color:#ff8b86; }
@container (max-width: 900px) {
  .opening-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .opening-contract-card { grid-template-columns:1fr; }
  .opening-contract-card .tiny-button { justify-self:start; }
}

/* v15 — hirmuskänn, mõtte ookean ja kontaktist saadud hirmupaketid */
.scene.scene-thought-ocean { --console-x:43%; --console-y:4%; --console-w:54%; --console-h:91%; }
.scene.scene-thought-ocean .scene-background {
  object-fit:contain;
  object-position:center;
  background:radial-gradient(circle at 50% 45%,#092a47 0,#020914 72%);
  filter:saturate(1.1) contrast(1.08) brightness(.7);
}
.fear-scan-workstation {
  display:grid;
  grid-template-columns:minmax(0,1.65fr) minmax(16.5cqw,.78fr);
  gap:.62cqw;
  min-height:0;
  height:100%;
  overflow:hidden;
}
.thought-ocean-panel,
.fear-scan-side {
  position:relative;
  min-height:0;
  overflow:hidden;
  border:1px solid rgba(87,222,255,.38);
  border-radius:.72cqw;
  background:rgba(0,12,30,.86);
  box-shadow:inset 0 0 1.2cqw rgba(44,166,255,.08);
}
.thought-ocean-panel { isolation:isolate; }
.thought-ocean-art {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:.72;
  filter:saturate(1.15) contrast(1.04);
}
.thought-ocean-content {
  position:relative;
  z-index:2;
  display:grid;
  grid-template-rows:repeat(3,minmax(0,1fr));
  gap:.4cqw;
  height:100%;
  padding:.58cqw;
}
.thought-layer {
  position:relative;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  gap:.24cqw;
  min-height:0;
  padding:.44cqw .5cqw;
  border:1px solid rgba(92,225,255,.36);
  border-radius:.72cqw;
  background:linear-gradient(180deg,rgba(1,18,42,.7),rgba(1,9,24,.54));
  overflow:hidden;
}
.thought-layer::before {
  content:"";
  position:absolute;
  inset:-25% -8%;
  border-radius:50%;
  opacity:.18;
  animation:oceanDrift 8s ease-in-out infinite alternate;
  pointer-events:none;
}
.thought-layer.daily { border-color:rgba(71,201,255,.58); }
.thought-layer.daily::before { background:radial-gradient(ellipse,#28b6ff 0,transparent 66%); }
.thought-layer.fears { border-color:rgba(255,209,75,.58); }
.thought-layer.fears::before { background:radial-gradient(ellipse,#ffb300 0,transparent 66%); animation-delay:-2.6s; }
.thought-layer.trauma { border-color:rgba(255,92,91,.62); }
.thought-layer.trauma::before { background:radial-gradient(ellipse,#ff263d 0,transparent 66%); animation-delay:-5.1s; }
.thought-layer header {
  position:relative;
  z-index:2;
  display:flex;
  justify-content:space-between;
  gap:.6cqw;
  align-items:center;
}
.thought-layer header span { color:#fff; font-weight:950; letter-spacing:.055em; font-size:var(--small); }
.thought-layer header b { color:#e8fbff; font-size:var(--small); white-space:nowrap; }
.thought-layer.daily header span { color:#8beaff; }
.thought-layer.fears header span { color:#ffe37a; }
.thought-layer.trauma header span { color:#ff918c; }
.thought-current {
  position:relative;
  z-index:2;
  display:flex;
  flex-wrap:wrap;
  gap:.24cqw;
  align-content:center;
  overflow:hidden;
}
.thought-current span {
  padding:.2cqw .36cqw;
  border:1px solid rgba(255,255,255,.2);
  border-radius:999px;
  background:rgba(0,9,25,.7);
  color:#fff;
  font-size:clamp(9px,.68cqw,13px);
  line-height:1.1;
  transform:translateY(calc((var(--i) % 3 - 1) * .18cqw));
  animation:thoughtFloat calc(4.2s + var(--i) * .35s) ease-in-out infinite alternate;
}
.thought-layer.daily .thought-current span { border-color:rgba(83,211,255,.45); }
.thought-layer.fears .thought-current span { border-color:rgba(255,211,83,.45); }
.thought-layer.trauma .thought-current span { border-color:rgba(255,102,99,.48); }
.layer-meter { position:relative; z-index:2; height:.34cqw; min-height:4px; overflow:hidden; border-radius:999px; background:rgba(255,255,255,.08); }
.layer-meter i { display:block; height:100%; transition:width .45s ease; box-shadow:0 0 .65cqw currentColor; }
.thought-layer.daily .layer-meter i { background:#55dcff; color:#55dcff; }
.thought-layer.fears .layer-meter i { background:#ffd45c; color:#ffd45c; }
.thought-layer.trauma .layer-meter i { background:#ff655f; color:#ff655f; }
.fear-scan-side {
  display:grid;
  grid-template-rows:auto auto auto auto;
  align-content:start;
  gap:.46cqw;
  padding:.58cqw;
  overflow:hidden;
}
.fear-warning { border-color:rgba(204,135,255,.48); background:rgba(44,15,65,.36); }
.fear-layer-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.34cqw; }
.fear-layer-metrics > div {
  padding:.42cqw .48cqw;
  border:1px solid rgba(91,219,255,.3);
  border-radius:.52cqw;
  background:rgba(1,17,39,.82);
}
.fear-layer-metrics span,.fear-layer-metrics b { display:block; }
.fear-layer-metrics span { color:var(--muted); font-size:var(--small); line-height:1.16; }
.fear-layer-metrics b { margin-top:.1cqw; color:#fff; font-size:var(--choice); }
.fear-layer-metrics .blue { border-color:rgba(84,210,255,.52); }
.fear-layer-metrics .yellow { border-color:rgba(255,211,78,.54); }
.fear-layer-metrics .red { border-color:rgba(255,101,95,.58); }
.fear-layer-metrics .total { border-color:rgba(126,255,185,.54); }
.contact-fear-packet {
  display:grid;
  align-content:start;
  gap:.42cqw;
  min-height:0;
  padding:.52cqw;
  border:1px solid rgba(255,90,85,.62);
  border-radius:.62cqw;
  background:linear-gradient(135deg,rgba(78,10,19,.82),rgba(20,5,17,.9));
  box-shadow:inset 0 0 1cqw rgba(255,60,64,.09);
  overflow:hidden;
}
.contact-fear-packet.locked { opacity:.7; border-style:dashed; }
.fear-packet-title {
  display:block;
  color:#ff8b83;
  font-size:clamp(10px,.76cqw,14px);
  line-height:1.12;
  letter-spacing:.015em;
}
.fear-packet-fields {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,.72fr);
  gap:.36cqw;
}
.fear-packet-field {
  display:grid;
  gap:.18cqw;
  min-width:0;
}
.fear-packet-field span {
  color:#ffd05f;
  font-size:clamp(8px,.56cqw,11px);
  font-weight:950;
  letter-spacing:.06em;
  line-height:1.05;
}
.fear-packet-field > div {
  min-width:0;
  padding:.38cqw .46cqw;
  border:1px solid rgba(255,94,91,.78);
  border-radius:.34cqw;
  background:rgba(20,4,13,.74);
  color:#fff;
  font-size:clamp(10px,.72cqw,14px);
  font-weight:800;
  line-height:1.18;
  overflow-wrap:anywhere;
}
.fear-packet-field.work-field {
  grid-column:1 / -1;
}
.fear-packet-field.impact-field > div { color:#ffdfe0; }
.fear-packet-field.work-field > div {
  font-size:clamp(9px,.66cqw,13px);
  font-weight:700;
}
.fear-packet-placeholder {
  padding:.38cqw .46cqw;
  border:1px dashed rgba(255,112,106,.45);
  border-radius:.34cqw;
  color:#f4d7d5;
  font-size:var(--small);
  line-height:1.22;
}
.fear-progress i { background:linear-gradient(90deg,#49d5ff,#ffd34d,#ff5e5b); }
.scan-stat small { display:block; margin-top:.08cqw; color:#ffd86b; font-size:clamp(8px,.58cqw,11px); }
.fear-path-shell,.combined-message-review { display:grid; gap:.65cqw; }
.danger-summary { border-color:rgba(255,91,84,.58); background:rgba(73,11,20,.58); }
.danger-summary span,.danger-summary b { color:#ff938c; }
.bypass-summary { border-color:rgba(255,211,89,.55); background:rgba(68,48,7,.44); }
.fear-path-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.fear-path-grid .resolve { border-color:rgba(104,245,181,.58); }
.fear-path-grid .bypass { border-color:rgba(255,210,82,.58); }
.fear-channel-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.fear-channel-grid .choice-button { min-height:5.4cqw; }
.fear-payload-grid { grid-template-columns:1fr; }
.combined-review-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.58cqw; }
.combined-review-grid > div {
  padding:.65cqw;
  border:1px solid rgba(103,244,187,.44);
  border-radius:.65cqw;
  background:rgba(4,46,48,.54);
}
.combined-review-grid .fear-review { border-color:rgba(255,112,103,.46); background:rgba(66,12,23,.48); }
.combined-review-grid span,.combined-review-grid b,.combined-review-grid p { display:block; }
.combined-review-grid span { color:var(--muted); font-size:var(--small); font-weight:900; }
.combined-review-grid b { margin-top:.12cqw; color:#fff; font-size:var(--choice); }
.combined-review-grid p { margin-top:.32cqw; color:#e7f8fb; font-size:var(--small); line-height:1.35; }
.packet-resolution-note {
  display:grid;
  gap:.16cqw;
  padding:.58cqw .65cqw;
  border:1px solid rgba(255,102,96,.5);
  border-radius:.62cqw;
  background:rgba(65,10,20,.46);
}
.packet-resolution-note strong { color:#ff938c; }
.packet-resolution-note span { color:#fff; font-size:var(--small); line-height:1.28; }
.scan-summary-grid .fear { border-color:rgba(255,105,102,.44); }
@keyframes oceanDrift { from{transform:translate3d(-2%,0,0) scale(.98)} to{transform:translate3d(2%,1%,0) scale(1.04)} }
@keyframes thoughtFloat { from{transform:translateY(-.12cqw)} to{transform:translateY(.18cqw)} }
@container (max-width:900px){
  .fear-scan-workstation{grid-template-columns:1fr;overflow:auto}.thought-ocean-panel{min-height:480px}.fear-scan-side{overflow:visible}.fear-channel-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@container (max-width:620px){
  .fear-path-grid,.combined-review-grid,.fear-layer-metrics,.fear-channel-grid{grid-template-columns:1fr}.thought-current span{font-size:10px}
}


/* v16 — mälupaketi käsitsi filtreerimise selged helendavad valikud */
.memory-filter-editor { gap: .72cqw; }
.memory-filter-instruction {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.9cqw;
  padding:.48cqw .65cqw;
  border:1px solid rgba(91,226,255,.62);
  border-radius:.7cqw;
  background:linear-gradient(90deg,rgba(0,51,82,.82),rgba(1,18,42,.9));
  box-shadow:0 0 .8cqw rgba(33,207,255,.18), inset 0 0 .65cqw rgba(42,210,255,.1);
}
.memory-filter-instruction strong { color:#f4ffff; font-size:var(--font); letter-spacing:.04em; }
.memory-filter-instruction span { color:#d9f7ff; font-size:var(--small); text-align:right; }
.memory-filter-metrics .metric-card { min-height:4.1cqw; }
.memory-filter-metrics .metric-card small { margin-top:.18cqw; }
.memory-filter-choice {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  min-height:7.25cqw;
  padding:.62cqw;
  border:1px solid rgba(93,224,255,.78);
  background:
    linear-gradient(135deg,rgba(7,51,84,.88),rgba(0,12,31,.94)),
    var(--hud-panel-card);
  box-shadow:
    0 0 .78cqw rgba(33,211,255,.26),
    inset 0 0 .78cqw rgba(48,197,255,.14);
  transform:translateZ(0);
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.memory-filter-choice::before {
  content:"";
  position:absolute;
  z-index:-1;
  inset:-45% -30%;
  background:linear-gradient(110deg,transparent 36%,rgba(155,246,255,.17) 48%,transparent 60%);
  transform:translateX(-45%);
  animation:memory-choice-scan 4.5s linear infinite;
  pointer-events:none;
}
.memory-filter-choice:hover,
.memory-filter-choice:focus-visible {
  outline:none;
  transform:translateY(-2px) scale(1.012);
  border-color:#d8fbff;
  box-shadow:
    0 0 1.25cqw rgba(67,223,255,.58),
    inset 0 0 .95cqw rgba(76,217,255,.22);
}
.memory-filter-choice.selected {
  border-color:#6dffad;
  background:
    linear-gradient(135deg,rgba(7,78,62,.93),rgba(0,24,33,.96)),
    var(--hud-panel-card);
  box-shadow:
    0 0 1.05cqw rgba(78,255,158,.44),
    inset 0 0 .95cqw rgba(55,255,154,.2);
}
.memory-filter-choice.low-priority { border-style:solid; }
.memory-filter-choice.low-priority:not(.selected) {
  border-color:rgba(255,189,84,.7);
  box-shadow:0 0 .78cqw rgba(255,169,57,.18),inset 0 0 .75cqw rgba(255,183,70,.08);
}
.memory-filter-choice.low-priority.selected {
  border-color:#ff9a8e;
  background:linear-gradient(135deg,rgba(92,35,35,.9),rgba(23,14,29,.96));
  box-shadow:0 0 1.05cqw rgba(255,98,98,.34),inset 0 0 .95cqw rgba(255,105,105,.16);
}
.segment-glow-marker {
  position:absolute;
  top:.48cqw;
  right:.48cqw;
  width:.58cqw;
  height:.58cqw;
  min-width:7px;
  min-height:7px;
  border-radius:50%;
  background:#5de8ff;
  box-shadow:0 0 .7cqw #54e7ff;
}
.memory-filter-choice.selected .segment-glow-marker { background:#69ffa6; box-shadow:0 0 .8cqw #54ff9d; }
.memory-filter-choice > strong { color:#f5ffff; font-size:var(--choice); padding-right:1.05cqw; }
.segment-meta { color:#c9eaf1 !important; font-size:var(--small); }
.segment-effect-title {
  margin-top:.2cqw;
  color:#8fdff0;
  font-size:clamp(8px,.54cqw,10px);
  font-weight:900;
  letter-spacing:.09em;
}
.segment-effect-row {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.28cqw;
}
.memory-preview-chip {
  display:inline-flex;
  align-items:center;
  gap:.2cqw;
  min-height:1.55em;
  padding:.18cqw .34cqw;
  border:1px solid currentColor;
  border-radius:999px;
  background:rgba(1,8,18,.78);
  font-size:clamp(8px,.56cqw,11px);
  font-weight:900;
  line-height:1;
  white-space:nowrap;
  text-shadow:0 1px 2px rgba(0,0,0,.9);
}
.memory-preview-chip.up {
  color:#79ffab;
  background:rgba(7,70,45,.82);
  box-shadow:0 0 .5cqw rgba(72,255,145,.2);
}
.memory-preview-chip.down {
  color:#ff7a73;
  background:rgba(86,17,28,.84);
  box-shadow:0 0 .5cqw rgba(255,91,91,.2);
}
.memory-preview-chip > span:not(.memory-preview-arrow) { color:#f4fdff; }
.memory-preview-chip b { color:currentColor; }
.memory-preview-arrow {
  display:inline-grid;
  place-items:center;
  width:1.32em;
  height:1.32em;
  border-radius:50%;
  background:currentColor;
  color:#03110c;
  font-weight:1000;
}
.memory-preview-chip.down .memory-preview-arrow { color:#26050a; }
.segment-status {
  align-self:end;
  margin-top:.12cqw;
  padding:.26cqw .38cqw;
  border:1px solid rgba(99,227,255,.42);
  border-radius:.42cqw;
  background:rgba(0,22,45,.82);
  color:#dffaff !important;
  font-size:clamp(8px,.58cqw,11px) !important;
  font-weight:950;
  text-align:center;
  letter-spacing:.035em;
}
.memory-filter-choice.selected .segment-status {
  border-color:rgba(98,255,162,.62);
  background:rgba(6,67,43,.82);
  color:#baffd4 !important;
}
.memory-filter-live {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.6cqw;
  min-height:2.65cqw;
  padding:.42cqw .58cqw;
  border:1px solid rgba(109,221,255,.42);
  border-radius:.62cqw;
  background:rgba(0,16,37,.9);
  opacity:0;
  transform:translateY(.22cqw);
  transition:opacity .18s ease,transform .18s ease;
}
.memory-filter-live.visible { opacity:1; transform:none; }
.memory-filter-live > strong { color:#ecffff; font-size:var(--small); letter-spacing:.04em; }
#filterConfirm.warning {
  border-color:#ffb257;
  box-shadow:0 0 .85cqw rgba(255,166,70,.28),inset 0 0 .55cqw rgba(255,140,67,.12);
}
@keyframes memory-choice-scan {
  0% { transform:translateX(-48%); }
  52%,100% { transform:translateX(48%); }
}
@media (prefers-reduced-motion: reduce) {
  .memory-filter-choice::before { animation:none; }
  .memory-filter-choice { transition:none; }
}
@media (max-width: 900px) {
  .memory-filter-instruction,.memory-filter-live { align-items:flex-start; flex-direction:column; }
  .memory-filter-instruction span { text-align:left; }
  .memory-filter-choice { min-height:9.5cqw; }
}

