.page-head {
  max-width: 900px;
  margin: 6px auto 0;
  padding: 0 20px;
}

.page-head h2 {
  font-size: clamp(24px, 4vw, 34px);
  color: var(--silver);
}

.page-head p {
  color: var(--silver2);
  margin-top: 6px;
  line-height: 1.5;
}

.journey {
  position: relative;
  max-width: 900px;
  margin: 26px auto 60px;
  padding: 8px 20px;
}

.journey::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(226, 31, 42, 0.15), var(--red) 12%, var(--red) 88%, rgba(226, 31, 42, 0.15));
  box-shadow: 0 0 16px rgba(226, 31, 42, 0.5);
}

.jcap {
  text-align: center;
  font-family: var(--mono);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(255, 46, 58, 0.8);
  margin: 6px 0;
  position: relative;
  z-index: 2;
}

.node {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 66px 1fr;
  align-items: center;
  margin: 4px 0;
}

.node .dot {
  grid-column: 2;
  justify-self: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 27px;
  background: radial-gradient(circle at 50% 30%, #1b2029, #0a0d12);
  border: 2px solid var(--line2);
  z-index: 2;
}

.node.active .dot {
  border-color: var(--red);
  animation: pulseDot 1.8s ease-in-out infinite;
}

.node.done .dot {
  border-color: var(--ok);
  box-shadow: 0 0 18px rgba(46, 224, 107, 0.5);
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 18px rgba(226, 31, 42, 0.5); }
  50% { box-shadow: 0 0 34px 6px rgba(226, 31, 42, 0.72); }
}

.node .card {
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  border: 1px solid var(--line2);
  border-radius: 14px;
  padding: 15px 18px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.node.left .card {
  grid-column: 1;
  text-align: right;
}

.node.right .card {
  grid-column: 3;
}

.node.locked .card {
  opacity: 0.5;
}

.node.active .card {
  border-color: var(--red);
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(226, 31, 42, 0.18);
}

.node.active .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(226, 31, 42, 0.28);
}

.node.done .card {
  border-color: rgba(46, 224, 107, 0.5);
}

.card .name {
  font-family: var(--display);
  font-style: italic;
  text-transform: uppercase;
  color: var(--silver);
  font-size: 18px;
}

.card .teach {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin-top: 4px;
}

.card .cbadge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.node.active .card .cbadge {
  color: var(--red2);
}

.node.done .card .cbadge {
  color: var(--ok);
}

@media (max-width: 720px) {
  .journey::before {
    left: 29px;
  }
  .node {
    grid-template-columns: 58px 1fr;
  }
  .node .dot {
    grid-column: 1;
  }
  .node.left .card,
  .node.right .card {
    grid-column: 2;
    text-align: left;
  }
}

.level {
  max-width: 900px;
  margin: 8px auto 60px;
  padding: 0 20px;
}

.collapse {
  margin: 10px 0 12px;
}

.collapse-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 6px;
}

.collapse-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.collapse-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--ok), var(--warn), var(--red));
  transition: width 0.4s linear;
}

.monitor {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  background: rgba(3, 5, 8, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  align-items: center;
}

.vital {
  min-width: 96px;
}

.vital .k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.vital .v {
  font-family: var(--display);
  font-size: 28px;
  color: var(--red2);
  transition: color 0.6s ease;
}

.vital.norm .v {
  color: var(--ok);
}

.ecg {
  flex: 1;
  min-width: 180px;
  height: 62px;
  background: rgba(3, 5, 8, 0.6);
  border-radius: 8px;
}

.step-indicator {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.step-indicator .dot {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.step-indicator .dot.on {
  background: var(--red);
}

.step-indicator .dot.done {
  background: var(--ok);
}

.puzzle {
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  border: 1px solid var(--line2);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.puzzle h3 {
  color: var(--silver);
  font-size: 19px;
  margin-bottom: 6px;
}

.hint-line {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
  line-height: 1.45;
}

.hint-line b {
  color: var(--red2);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.chip {
  padding: 11px 16px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: rgba(20, 24, 30, 0.8);
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
  transition: transform 0.1s ease, border-color 0.15s ease, background 0.15s ease;
}

.chip:hover {
  border-color: var(--silver2);
}

.chip.selected {
  border-color: var(--red);
  background: var(--red-soft);
  transform: translateY(-2px);
}

.chip.used {
  opacity: 0.22;
  pointer-events: none;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option {
  text-align: left;
  padding: 12px 15px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: rgba(20, 24, 30, 0.8);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
}

.option:hover {
  border-color: var(--silver2);
}

.option.bad {
  border-color: var(--red);
  animation: shake 0.3s;
}

.option.good {
  border-color: var(--ok);
  background: rgba(46, 224, 107, 0.14);
}

@keyframes shake {
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.heart-board {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 360px;
  margin: 12px auto;
  padding: 16px;
  border: 2px dashed var(--line);
  border-radius: 50% 50% 46% 46%;
  background: rgba(226, 31, 42, 0.05);
}

.slot {
  height: 74px;
  border-radius: 10px;
  border: 1px dashed var(--line2);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 6px;
}

.slot.filled {
  border-style: solid;
  border-color: var(--ok);
  background: rgba(46, 224, 107, 0.12);
  color: var(--text);
}

.slot.bad {
  border-color: var(--red);
  animation: shake 0.3s;
}

.bins {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 12px;
}

.bin {
  border: 1px solid var(--line2);
  border-radius: 12px;
  padding: 14px;
  min-height: 120px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.bin:hover {
  border-color: var(--silver2);
}

.bin h4 {
  font-family: var(--display);
  font-style: italic;
  text-transform: uppercase;
  color: var(--silver);
  margin-bottom: 10px;
  font-size: 15px;
}

.bin-item {
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(46, 224, 107, 0.12);
  border: 1px solid var(--ok);
  margin-bottom: 8px;
  font-size: 14px;
}

.seq-track {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.seq-pos {
  min-width: 128px;
  height: 46px;
  border-radius: 10px;
  border: 1px dashed var(--line2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
}

.seq-pos.filled {
  border-style: solid;
  border-color: var(--ok);
  background: rgba(46, 224, 107, 0.12);
  color: var(--text);
}

.heart-final {
  font-size: 120px;
  text-align: center;
  margin: 10px 0;
  animation: beat 0.86s ease-in-out infinite;
  filter: drop-shadow(0 0 34px rgba(226, 31, 42, 0.7));
}

.heart-final-ic {
  width: 120px;
  height: 120px;
  display: inline-block;
}

@keyframes beat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.16); }
  30% { transform: scale(1); }
  45% { transform: scale(1.1); }
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 8, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 60;
  animation: pageIn 0.4s ease;
}

.debrief-card {
  max-width: 480px;
  width: 100%;
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  border: 1px solid var(--ok);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow);
}

.debrief-card h2 {
  color: var(--ok);
  font-size: 24px;
  margin-bottom: 8px;
}

.learn-list {
  list-style: none;
  text-align: left;
  margin: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.learn-list li {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(20, 24, 30, 0.8);
  border: 1px solid var(--line2);
  font-size: 14px;
  line-height: 1.5;
}

.learn-list li::before {
  content: "✓ ";
  color: var(--ok);
  font-weight: 700;
}

.manual {
  max-width: 820px;
  margin: 8px auto 60px;
  padding: 0 20px;
}

.manual-intro {
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  border: 1px solid var(--line2);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}

.manual-intro h2 {
  color: var(--silver);
  font-size: 21px;
  margin-bottom: 8px;
}

.manual-intro p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.manual-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tab {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: rgba(20, 24, 30, 0.75);
  color: var(--silver2);
  cursor: pointer;
  font-family: var(--display);
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 14px;
}

.tab.active {
  border-color: var(--red);
  color: #fff;
  background: var(--red-soft);
}

.rule-card {
  background: rgba(20, 24, 30, 0.75);
  border: 1px solid var(--line2);
  border-left: 3px solid var(--red);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.rule-when {
  color: var(--silver);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.rule-then {
  color: var(--silver2);
  font-size: 14px;
  line-height: 1.5;
}

.rule-line {
  background: rgba(20, 24, 30, 0.75);
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 13px 16px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--silver2);
}

.hgame {
  display: grid;
  grid-template-columns: minmax(300px, 430px) 1fr;
  gap: 26px;
  align-items: start;
  margin-top: 10px;
}

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

.heart-stage {
  position: relative;
  width: 100%;
  max-width: 430px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

.heart-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}

.heart-stage.beating {
  animation: beat 0.86s ease-in-out infinite;
  filter: drop-shadow(0 0 34px rgba(226, 31, 42, 0.7));
}

.fog {
  position: absolute;
  border-radius: 50%;
  overflow: hidden;
  background: #010204;
  box-shadow: 0 0 12px 7px #010204;
  transition: opacity 0.7s ease;
  z-index: 2;
  pointer-events: none;
}

.fog.cleared {
  opacity: 0;
}

.web {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.bulb {
  position: absolute;
  transform: translateX(-50%);
  transform-origin: top center;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  text-align: center;
}

.bulb .cord {
  width: 2px;
  height: 24px;
  margin: 0 auto;
  background: linear-gradient(#5a5a5a, #2a2a2a);
}

.bulb .glass {
  width: 16px;
  height: 16px;
  margin: -1px auto 0;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fff7d3, #ffcf5a 58%, #e0a020);
  box-shadow: 0 0 22px 9px rgba(255, 200, 90, 0.6), 0 0 60px 22px rgba(255, 190, 70, 0.22);
}

.bulb.on {
  opacity: 1;
  animation: sway 3s ease-in-out infinite;
}

@keyframes sway {
  0%, 100% { transform: translateX(-50%) rotate(-3.5deg); }
  50% { transform: translateX(-50%) rotate(3.5deg); }
}

.stick {
  position: absolute;
  width: 34px;
  height: 48px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.9));
  transition: left 0.6s cubic-bezier(0.22, 1, 0.36, 1), top 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 4;
}

.stickfig {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.stickfig .leg-l,
.stickfig .leg-r {
  transform-box: view-box;
  transform-origin: 20px 40px;
}

.stick.walking {
  animation: bob 0.3s ease-in-out infinite;
}

.stick.walking .leg-l {
  animation: legA 0.3s ease-in-out infinite;
}

.stick.walking .leg-r {
  animation: legB 0.3s ease-in-out infinite;
}

@keyframes legA {
  0%, 100% { transform: rotate(22deg); }
  50% { transform: rotate(-22deg); }
}

@keyframes legB {
  0%, 100% { transform: rotate(-22deg); }
  50% { transform: rotate(22deg); }
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, -54%); }
}

.clabel {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: #fff;
  background: rgba(4, 6, 10, 0.72);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 3;
  pointer-events: none;
}

.clabel.shown {
  opacity: 1;
}

.fact {
  color: var(--silver);
  background: var(--red-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 15px;
  font-size: 14.5px;
  line-height: 1.5;
}

.keybar {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--silver2);
  background: rgba(20, 24, 30, 0.7);
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.keybar b {
  color: var(--red2);
}

.lab {
  display: grid;
  grid-template-columns: minmax(340px, 460px) 1fr;
  gap: 22px;
  align-items: start;
}

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

.plan {
  background: radial-gradient(ellipse at 50% 40%, rgba(14, 18, 24, 0.9), rgba(6, 9, 13, 0.95));
  border: 1px solid var(--line2);
  border-radius: 14px;
  padding: 10px;
}

.plan-svg {
  width: 100%;
  height: auto;
  display: block;
}

.proof {
  fill: rgba(226, 31, 42, 0.06);
  stroke: rgba(226, 31, 42, 0.45);
  stroke-width: 2;
  stroke-linejoin: round;
}

.phouse {
  fill: none;
  stroke: rgba(226, 231, 236, 0.18);
  stroke-width: 3;
}

.proom rect {
  fill: rgba(20, 24, 30, 0.55);
  stroke: var(--line2);
  stroke-width: 2;
  transition: fill 0.15s ease, stroke 0.15s ease;
}

.proom-ic {
  font-size: 32px;
  text-anchor: middle;
  dominant-baseline: central;
}

.proom-nm {
  font-size: 18px;
  fill: var(--silver2);
  text-anchor: middle;
  dominant-baseline: central;
  font-family: var(--display);
  font-style: italic;
  text-transform: uppercase;
}

.proom-you {
  font-size: 22px;
  text-anchor: middle;
  dominant-baseline: central;
}

.proom.far {
  opacity: 0.4;
}

.proom.go {
  cursor: pointer;
}

.proom.go rect {
  stroke: var(--silver2);
}

.proom.go:hover rect {
  stroke: var(--red);
  fill: rgba(226, 31, 42, 0.08);
}

.proom.solved rect {
  fill: rgba(46, 224, 107, 0.12);
  stroke: rgba(46, 224, 107, 0.7);
}

.proom.solved .proom-nm {
  fill: var(--silver);
}

.proom.cur rect {
  fill: rgba(226, 31, 42, 0.14);
  stroke: var(--red);
  stroke-width: 3;
}

.proom.exit rect {
  stroke-dasharray: 7 5;
}

.pdoor-gap {
  fill: #0a0d12;
}

.pdoor-ic {
  font-size: 16px;
  text-anchor: middle;
  dominant-baseline: central;
}

.roomview {
  background: linear-gradient(160deg, var(--panel2), var(--panel));
  border: 1px solid var(--line2);
  border-radius: var(--radius);
  padding: 18px 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.roomview h3 {
  color: var(--silver);
  font-size: 19px;
  margin-bottom: 10px;
}

.roombody {
  margin-bottom: 16px;
}

.keyline {
  color: var(--warn);
  font-family: var(--mono);
  font-size: 14px;
  margin-top: 8px;
}

.match-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.match-cols .chips {
  flex-direction: column;
}

.doors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--line2);
  padding-top: 14px;
}

.doors-lbl {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-right: 4px;
}

.door-btn {
  appearance: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid var(--line2);
  background: rgba(20, 24, 30, 0.8);
  color: var(--silver);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.door-btn:hover {
  border-color: var(--red);
  transform: translateY(-2px);
}

.chart {
  background: rgba(3, 5, 8, 0.72);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 6px 0 12px;
}

.chart-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.chart-row:last-of-type {
  border-bottom: 0;
}

.chart .ck {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.chart .cv {
  font-family: var(--display);
  font-style: italic;
  font-size: 20px;
  color: var(--red2);
}

.chart-signs {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line2);
  font-size: 13px;
  color: var(--silver);
  line-height: 1.45;
}

.chart-signs b {
  color: var(--silver2);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.diag-ok {
  color: var(--ok);
  font-family: var(--display);
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.house {
  position: relative;
  max-width: 840px;
  margin: 14px auto 60px;
  padding: 18px;
  border: 2px solid rgba(226, 31, 42, 0.5);
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(17, 21, 28, 0.85), rgba(10, 12, 16, 0.9));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 0 70px rgba(226, 31, 42, 0.05);
}

.house::before {
  content: "CARTIERUL CORPUS";
  position: absolute;
  top: -10px;
  left: 22px;
  background: var(--bg);
  padding: 0 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(255, 46, 58, 0.85);
}

.house-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  grid-template-rows: 152px 152px 152px;
  grid-template-areas:
    "entrance heart lungs"
    "brain heart digestive"
    "muscles immune dna";
  gap: 8px;
}

.entrance {
  grid-area: entrance;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--silver2);
}

.entrance .e-arrow {
  font-size: 26px;
  color: var(--red2);
}

.entrance .e-lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.room {
  border: 1px solid var(--line2);
  border-radius: 6px;
  background: rgba(20, 24, 30, 0.5);
  padding: 12px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
}

.room .r-ic {
  font-size: 42px;
  line-height: 1;
}

.room .r-name {
  font-family: var(--display);
  font-style: italic;
  text-transform: uppercase;
  color: var(--silver);
  font-size: 16px;
}

.room .r-sys {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.room .r-teach {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.room .r-status {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.room.locked {
  opacity: 0.5;
}

.room.open {
  border-color: var(--red);
  background: rgba(226, 31, 42, 0.08);
  cursor: pointer;
  box-shadow: 0 0 22px rgba(226, 31, 42, 0.35), inset 0 0 34px rgba(226, 31, 42, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.room.open .r-status {
  color: var(--red2);
}

.room.open:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 36px rgba(226, 31, 42, 0.55), inset 0 0 34px rgba(226, 31, 42, 0.12);
}

@media (max-width: 680px) {
  .house-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "entrance"
      "heart"
      "lungs"
      "brain"
      "digestive"
      "muscles"
      "immune"
      "dna";
  }
}

.map-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px 14px;
}

.city {
  position: relative;
  container-type: inline-size;
  width: min(94vw, calc((100vh - 180px) * 1000 / 640), 1040px);
  aspect-ratio: 1000 / 640;
  margin: 0 auto;
  border: 2px solid rgba(226, 31, 42, 0.4);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(14, 17, 22, 0.9), rgba(8, 10, 14, 0.94));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.city::before {
  content: "CARTIERUL CORPUS";
  position: absolute;
  top: 10px;
  left: 16px;
  z-index: 3;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 3px;
  color: rgba(255, 46, 58, 0.85);
}

.city-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.spot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 9.6cqw;
  z-index: 2;
  text-align: center;
}

.emoji-ic {
  font-size: 3cqw;
  line-height: 1;
  display: block;
}

.organ-ic {
  width: 3.4cqw;
  height: 3.4cqw;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

.h-cap {
  margin-top: 1cqw;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.h-name {
  font-family: var(--display);
  font-style: italic;
  text-transform: uppercase;
  color: var(--silver);
  font-size: clamp(10px, 1.2cqw, 12px);
  line-height: 1.1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.h-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: clamp(8px, 1cqw, 10px);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok), 0 0 3px var(--ok);
  animation: livePulse 1.3s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.spot.locked {
  opacity: 0.72;
  cursor: not-allowed;
}

.spot.open {
  cursor: pointer;
  transition: transform 0.15s ease;
}

.spot.open .emoji-ic,
.spot.open .organ-ic {
  filter: drop-shadow(0 0 9px rgba(226, 31, 42, 0.85));
}

.spot.open .h-name {
  color: #fff;
}

.spot.open .h-status {
  color: var(--ok);
}

.spot.open:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

body.fixed .level {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 4px auto 10px;
}

body.fixed .collapse {
  margin: 4px 0 8px;
}

body.fixed .keybar {
  margin-bottom: 8px;
}

body.fixed .lab {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
}

body.fixed .plan {
  align-self: start;
}

@media (max-width: 820px) {
  .map-stage {
    display: block;
    overflow-x: auto;
    padding: 0 10px 24px;
  }

  .city {
    width: max(96vw, 600px);
    margin: 0 auto;
  }

  body.fixed .level {
    display: block;
    margin: 6px auto 20px;
  }

  body.fixed .lab {
    display: block;
  }

  .plan {
    margin-bottom: 16px;
  }

  body.fixed .roomview {
    overflow: visible;
  }

  .options .option {
    font-size: 15px;
    padding: 13px 15px;
  }
}

@media (max-width: 620px) {
  .map-stage {
    overflow-x: hidden;
    padding: 0 6px 24px;
  }

  .city {
    width: 96vw;
  }
}

body.fixed .roomview {
  min-height: 0;
  overflow-y: auto;
}

.collapse-over {
  background: radial-gradient(ellipse at 50% 40%, rgba(60, 6, 10, 0.9), rgba(3, 5, 8, 0.95));
}

.collapse-card {
  max-width: 480px;
  width: 100%;
  background: linear-gradient(160deg, rgba(30, 10, 12, 0.95), rgba(10, 6, 8, 0.96));
  border: 1px solid var(--red);
  border-radius: var(--radius);
  padding: 24px 28px 28px;
  text-align: center;
  box-shadow: 0 0 60px rgba(226, 31, 42, 0.35), inset 0 0 40px rgba(226, 31, 42, 0.08);
  animation: collapseIn 0.4s ease;
}

@keyframes collapseIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: none; }
}

.flat-wrap {
  height: 58px;
  margin-bottom: 12px;
  overflow: hidden;
}

.flatline {
  width: 100%;
  height: 100%;
}

.flatline polyline {
  fill: none;
  stroke: var(--red2);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(255, 46, 58, 0.85));
  stroke-dasharray: 760;
  stroke-dashoffset: 760;
  animation: flatDraw 1.3s ease-out forwards, flatPulse 1.6s ease-in-out 1.3s infinite;
}

@keyframes flatDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes flatPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.collapse-tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--red2);
  margin-bottom: 6px;
  animation: blink 1s steps(1) infinite;
}

.collapse-card h2 {
  color: #fff;
  font-size: 26px;
  margin-bottom: 10px;
  text-shadow: 0 0 22px rgba(255, 46, 58, 0.5);
}

.collapse-card p {
  color: var(--silver2);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 14px;
}

.collapse-card p b {
  color: var(--silver);
}

.collapse-stat {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--silver);
  background: rgba(226, 31, 42, 0.1);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 18px;
}

.collapse-stat b {
  color: var(--red2);
}
