:root {
  --bg0: #f4f7fb;
  --bg1: #e8f0f7;
  --ink: #1a2433;
  --muted: #5b6b7c;
  --line: #d5e0eb;
  --teal: #0f7a8a;
  --teal-deep: #0a5c68;
  --mint: #2f9e8a;
  --sand: #f0c75e;
  --coral: #e07a5f;
  --card: #ffffff;
  --shadow: 0 18px 50px rgba(26, 36, 51, 0.08);
  --radius: 18px;
  --max: 1080px;
  --font: "Manrope", system-ui, sans-serif;
  --display: "Literata", Georgia, serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #d9eef5 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #e7f5ef 0%, transparent 50%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  background-attachment: fixed;
}

body {
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: rgba(244, 247, 251, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar__brand {
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--teal-deep);
}
.topbar__progress {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.topbar__bar {
  width: 160px;
  height: 8px;
  border-radius: 99px;
  background: #dbe6ef;
  overflow: hidden;
}
.topbar__bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--mint));
  transition: width 0.35s ease;
}
.topbar__score {
  justify-self: end;
  color: var(--muted);
}
.topbar__score strong { color: var(--ink); font-size: 1.1rem; }

.stage {
  flex: 1;
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2.5rem;
}

.hintbar {
  padding: 0.65rem 1.25rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

/* —— screens —— */
.screen { animation: rise 0.45s ease; }
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.hero {
  min-height: calc(100vh - 2rem);
  display: grid;
  align-content: end;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #dfeaf2 url("../assets/hero-heart-map.png") center / cover no-repeat;
  box-shadow: var(--shadow);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(244,247,251,0.15) 20%, rgba(244,247,251,0.92) 72%, #f4f7fb 100%);
}
.hero__content {
  position: relative;
  z-index: 1;
  padding: 2rem 2rem 2.4rem;
  max-width: 36rem;
}
.brand-mark {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--teal-deep);
  margin: 0 0 0.35rem;
  line-height: 1.05;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(1.45rem, 3.2vw, 2rem);
  font-weight: 700;
  margin: 0 0 0.75rem;
  line-height: 1.2;
}
.hero p {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 1.05rem;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn--primary {
  background: linear-gradient(135deg, var(--teal), var(--mint));
  color: #fff;
  box-shadow: 0 10px 28px rgba(15, 122, 138, 0.28);
}
.btn--primary:hover { filter: brightness(1.05); }
.btn--ghost {
  background: #fff;
  color: var(--teal-deep);
  border: 1px solid var(--line);
}
.btn--ghost:hover { border-color: var(--teal); }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.5rem;
}
.panel + .panel { margin-top: 1rem; }

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--teal);
  margin: 0 0 0.35rem;
}
h2 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin: 0 0 0.6rem;
  line-height: 1.2;
}
.lead { color: var(--muted); margin: 0 0 1.1rem; }

.roles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}
@media (max-width: 800px) {
  .roles { grid-template-columns: 1fr; }
  .topbar { grid-template-columns: 1fr; gap: 0.4rem; }
  .topbar__score { justify-self: start; }
}

.role {
  text-align: left;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fbfcfe;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.role:hover, .role.is-on {
  border-color: var(--teal);
  box-shadow: 0 8px 24px rgba(15,122,138,0.12);
  transform: translateY(-2px);
}
.role strong { display: block; margin-bottom: 0.25rem; font-size: 1.05rem; }
.role span { color: var(--muted); font-size: 0.92rem; }

.map {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}
@media (max-width: 700px) { .map { grid-template-columns: 1fr; } }

.station {
  position: relative;
  padding: 1.1rem 1.15rem 1.15rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: left;
  transition: 0.15s ease;
}
.station:disabled { opacity: 0.55; cursor: not-allowed; }
.station:not(:disabled):hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(26,36,51,0.08);
}
.station__num {
  display: inline-flex;
  width: 1.7rem; height: 1.7rem;
  align-items: center; justify-content: center;
  border-radius: 50%;
  background: #e5f3f5;
  color: var(--teal-deep);
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 0.55rem;
}
.station.is-done .station__num {
  background: var(--mint);
  color: #fff;
}
.station h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.station p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.media {
  width: 100%;
  border-radius: 14px;
  display: block;
  margin: 0.85rem 0 1rem;
  border: 1px solid var(--line);
  background: #eef4f8;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.75rem 0 1rem;
}
.chip {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px dashed var(--line);
  background: #f7fafc;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
}
.chip.is-picked {
  border-style: solid;
  border-color: var(--teal);
  background: #e7f5f4;
}
.chip.is-wrong {
  border-color: var(--coral);
  background: #fdece8;
}
.chip.is-right {
  border-color: var(--mint);
  background: #e6f7f1;
}

.bins {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.bin {
  min-height: 120px;
  border: 2px dashed var(--line);
  border-radius: 14px;
  padding: 0.75rem;
  background: #fafcfd;
}
.bin h4 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.bin.is-target { border-color: var(--teal); background: #eef8f7; }

.torso {
  position: relative;
  width: min(420px, 100%);
  margin: 0.5rem auto 1rem;
  aspect-ratio: 3 / 4;
  border-radius: 40% 40% 36% 36%;
  background: linear-gradient(180deg, #e8f1f6, #d4e4ee);
  border: 1px solid var(--line);
}
.dot {
  position: absolute;
  width: 28px; height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #9bb0c0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: 0.15s;
}
.dot.is-on { background: var(--teal); transform: scale(1.15); }
.dot.is-good { background: var(--mint); }
.dot.is-bad { background: var(--coral); }
.heart-glow {
  position: absolute;
  left: 58%; top: 42%;
  width: 42px; height: 42px;
  margin: -21px 0 0 -21px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47,158,138,0.55), transparent 70%);
  pointer-events: none;
}

.props {
  display: grid;
  gap: 0.85rem;
  margin: 0.75rem 0 1rem;
}
.prop {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.75rem;
  align-items: center;
}
@media (max-width: 600px) { .prop { grid-template-columns: 1fr; } }
.prop label { font-weight: 700; font-size: 0.92rem; }
.prop select, .prop input[type="range"] {
  width: 100%;
  font: inherit;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}
.meter {
  height: 10px;
  border-radius: 99px;
  background: #e2ebf2;
  overflow: hidden;
}
.meter > i {
  display: block;
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, var(--coral), var(--sand), var(--mint));
}

.spot-board {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0d2a30 url("../assets/us-kidney.png") center / cover;
  cursor: crosshair;
  margin: 0.75rem 0 1rem;
}
.spot-board::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,40,48,0.25), rgba(10,40,48,0.45));
}
.twinkle {
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  margin: -11px;
  background: radial-gradient(circle, #ff6b6b, #4dabf7 55%, transparent 70%);
  animation: blink 0.45s infinite alternate;
  z-index: 2;
  pointer-events: none;
}
@keyframes blink {
  from { opacity: 0.35; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1.2); }
}
.decoy {
  position: absolute;
  width: 14px; height: 14px;
  margin: -7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  z-index: 1;
  pointer-events: none;
}

.chart-wrap {
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem;
  margin: 0.75rem 0 1rem;
}
.chart-wrap svg { width: 100%; height: auto; display: block; }
.chart-caption { margin: 0.45rem 0 0; font-size: 0.85rem; color: var(--muted); text-align: center; }

.args {
  display: grid;
  gap: 0.55rem;
  margin: 0.75rem 0 1rem;
}
.arg {
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 600;
}
.arg.is-on {
  border-color: var(--teal);
  background: #e8f6f4;
}
.arg.is-false.is-on {
  border-color: var(--coral);
  background: #fdece8;
}

.finale {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}
.finale .brand-mark { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
}
.badge {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #e8f3f1;
  color: var(--teal-deep);
  font-weight: 700;
  font-size: 0.88rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  z-index: 50;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
  animation: rise 0.25s ease;
}

.nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.feedback {
  margin: 0.5rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: #eef8f4;
  color: var(--teal-deep);
  font-weight: 600;
}
.feedback.is-bad { background: #fdece8; color: #8a3a2a; }

.proj-list {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
  max-height: min(58vh, 560px);
  overflow: auto;
  padding-right: 0.25rem;
}
.proj {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
}
.proj__num {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e5f3f5;
  color: var(--teal-deep);
  font-weight: 800;
  font-size: 0.85rem;
}
.proj__dir {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
}
.proj h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font);
  font-size: 1.02rem;
  font-weight: 800;
}
.proj p {
  margin: 0.35rem 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
.proj strong { color: var(--ink); }
.proj__mpei {
  margin: 0.55rem 0 !important;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: #eef6f8;
  border: 1px solid #cfe3e8;
  color: var(--ink) !important;
  line-height: 1.45;
}
.proj__road-title { margin-top: 0.75rem !important; }
.proj__road {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.proj__road > li {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: #f4faf9;
  border: 1px solid #d7ebe8;
}
.proj__step-num {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--teal);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  margin-top: 0.1rem;
}
.proj__step-idea {
  margin: 0 0 0.25rem !important;
  color: var(--ink) !important;
  font-weight: 600;
}
.proj__step-res {
  margin: 0 !important;
  font-size: 0.88rem !important;
}
.proj-list {
  max-height: min(68vh, 720px);
}

.lab-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.85rem 0 1.1rem;
}
.lab-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  text-align: left;
}
.lab-card img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
}
.lab-card figcaption {
  display: grid;
  gap: 0.25rem;
  padding: 0.65rem 0.75rem 0.8rem;
}
.lab-card strong {
  font-size: 0.88rem;
  color: var(--ink);
}
.lab-card span {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}
@media (max-width: 720px) {
  .lab-strip { grid-template-columns: 1fr; }
  .lab-card img { height: 140px; }
}

/* —— map 30 —— */
.map--dense {
  grid-template-columns: repeat(3, 1fr);
  max-height: min(62vh, 640px);
  overflow: auto;
  padding-right: 0.25rem;
}
@media (max-width: 900px) { .map--dense { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .map--dense { grid-template-columns: 1fr; } }

.station {
  animation: rise 0.4s ease both;
}
.station__tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.25rem;
}
.station.is-skip .station__num {
  background: #f0c75e;
  color: #1a2433;
}
.station.is-skip {
  border-color: #e6d39a;
  background: #fffdf5;
}

.btn--skip {
  background: #fff8e8;
  color: #7a5a10;
  border: 1px solid #e6d39a;
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  font-weight: 700;
}
.btn--skip:hover { border-color: #c9a84a; }

.mission-head { margin-bottom: 0.5rem; }
.mission-body { margin: 0.5rem 0 1rem; }
.mission-nav { align-items: center; }
.pop-in { animation: pop 0.35s ease; }
@keyframes pop {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.hero__fx {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 30%, rgba(15,122,138,0.18), transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(47,158,138,0.16), transparent 42%);
  animation: drift 12s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}
@keyframes drift {
  from { transform: translate(-2%, -1%) scale(1); }
  to { transform: translate(3%, 2%) scale(1.05); }
}

/* —— minigames —— */
.mg-meta { color: var(--muted); font-size: 0.92rem; margin: 0.5rem 0; }
.mg-fail { color: #8a3a2a; font-weight: 600; padding: 1rem; }

.mg-fifteen {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  width: min(300px, 100%);
  margin: 0.5rem auto;
}
.mg-tile {
  aspect-ratio: 1;
  border-radius: 12px;
  background: linear-gradient(145deg, #0f7a8a, #2f9e8a);
  color: #fff;
  font-weight: 800;
  font-size: 1.35rem;
  animation: rise 0.35s ease both;
  box-shadow: 0 6px 16px rgba(15,122,138,0.25);
  transition: transform 0.12s;
}
.mg-tile:active { transform: scale(0.96); }
.mg-tile.is-empty {
  background: #e2ebf2;
  box-shadow: none;
  pointer-events: none;
}

.mg-mines {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  width: min(320px, 100%);
  margin: 0.5rem auto;
}
.mg-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  background: #d5e4ee;
  font-weight: 800;
  transition: 0.12s;
}
.mg-cell.is-open { background: #fff; }
.mg-cell.is-mine { background: #fdece8; }
.mg-cell.is-flag { background: #fff4d6; color: #a67c00; }
.mg-cell[data-n="1"] { color: #0f7a8a; }
.mg-cell[data-n="2"] { color: #2f9e8a; }
.mg-cell[data-n="3"] { color: #c0392b; }
.mg-mines.is-boom { animation: shake 0.4s ease; }
@keyframes shake {
  0%,100% { transform: none; }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.mg-shoot__field {
  position: relative;
  height: 260px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #0d2a30, #1a4a52);
  overflow: hidden;
}
.mg-shoot__hud {
  font-weight: 700;
  margin-bottom: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  align-items: baseline;
}
.mg-shoot__hint {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
}
.mg-shoot--spec .mg-shoot__plots {
  display: grid;
  gap: 0.75rem;
}
.mg-shoot__plot {
  margin: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #0b1e24;
}
.mg-shoot__plot figcaption {
  margin: 0;
  padding: 0.4rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #d7ecea;
  background: rgba(15, 50, 58, 0.95);
  border-bottom: 1px solid rgba(126, 200, 192, 0.2);
}
.mg-shoot__plot canvas {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
  touch-action: manipulation;
}
.mg-shoot__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
  max-height: 7.5rem;
  overflow: auto;
}
.mg-shoot__chip {
  border: 1px solid #e07a5f;
  background: linear-gradient(180deg, #e07a5f, #c45d45);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  animation: pulseSoft 1.1s ease infinite alternate;
}
.mg-shoot__chip:hover {
  filter: brightness(1.08);
}
.mg-target {
  position: absolute;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.8rem;
  animation: floatIn 0.35s ease, pulseSoft 0.8s ease infinite alternate;
  color: #fff;
}
.mg-target.is-noise { background: #e07a5f; }
.mg-target.is-signal { background: #2f9e8a; }
@keyframes floatIn {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes pulseSoft {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.mg-plat canvas, .mg-flap canvas, .mg-run canvas, .mg-stack canvas, .mg-radar canvas {
  width: 100%;
  max-width: 640px;
  border-radius: 14px;
  border: 1px solid var(--line);
  display: block;
  margin: 0 auto;
  background: #eef4f8;
}
.mg-plat__ctrl {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 0.65rem 0;
}
.mg-plat__ctrl button {
  min-width: 4.5rem;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 800;
}

.mg-memory {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  max-width: 420px;
  margin: 0.5rem auto;
}
.mg-memory.is-mini { grid-template-columns: repeat(2, 1fr); max-width: 260px; }
.mg-card {
  aspect-ratio: 1.15;
  border-radius: 12px;
  background: #0f7a8a;
  color: #fff;
  font-weight: 800;
  transition: transform 0.2s, background 0.2s;
}
.mg-card.is-open { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.mg-card.is-done { background: #e6f7f1; color: var(--teal-deep); }

.mg-pulse {
  text-align: center;
  padding: 1rem 0;
}
.mg-pulse__ring {
  width: 140px; height: 140px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 6px solid var(--teal);
  transition: transform 0.04s linear, box-shadow 0.15s;
}
.mg-pulse__ring.is-hot { border-color: var(--mint); box-shadow: 0 0 0 10px rgba(47,158,138,0.2); }
.mg-pulse__ring.is-hit { background: rgba(47,158,138,0.25); }

.mg-wire {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.mg-wire__col { display: grid; gap: 0.5rem; }
.mg-wire__btn {
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
}
.mg-wire__btn.is-on { border-color: var(--teal); background: #e8f6f4; }
.mg-wire__btn.is-done { background: #e6f7f1; border-color: var(--mint); }
.mg-wire__btn.is-bad { background: #fdece8; }

.mg-catch {
  position: relative;
}
.mg-catch__field {
  position: relative;
  height: 240px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #e8f5ef, #dfeaf2);
  overflow: hidden;
  touch-action: none;
}
.mg-catch__pad {
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 64px; height: 18px;
  margin-left: -32px;
  border-radius: 8px;
  background: var(--teal);
  z-index: 2;
}
.mg-drop {
  position: absolute;
  top: 0;
  width: 18px; height: 18px;
  margin-left: -9px;
  border-radius: 50%;
}
.mg-drop.is-good { background: var(--mint); box-shadow: 0 0 12px rgba(47,158,138,0.6); }
.mg-drop.is-bad { background: var(--coral); }

.mg-timing__bar {
  position: relative;
  height: 28px;
  border-radius: 99px;
  background: #e2ebf2;
  margin: 1rem 0;
  overflow: hidden;
}
.mg-timing__zone {
  position: absolute;
  left: 42%; width: 16%; top: 0; bottom: 0;
  background: rgba(47,158,138,0.45);
}
.mg-timing__bar > i {
  position: absolute;
  top: 2px; bottom: 2px;
  width: 10px;
  margin-left: -5px;
  border-radius: 4px;
  background: var(--ink);
  z-index: 2;
}

.mg-maze {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
  width: min(360px, 100%);
  margin: 0.5rem auto;
}
.mg-maze__cell {
  aspect-ratio: 1;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
}
.mg-maze__cell.is-wall { background: #9bb0c0; }
.mg-maze__cell.is-here { background: var(--teal); box-shadow: 0 0 0 3px rgba(15,122,138,0.25); }
.mg-maze__cell.is-end { background: #f0c75e; }

.mg-sol__found, .mg-sol__deck {
  display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.5rem 0;
}
.mg-sol__pile, .mg-sol__card {
  width: 72px; min-height: 88px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.15rem;
  font-weight: 800;
}
.mg-sol__card.is-on { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,122,138,0.2); }
.mg-sol__pile small, .mg-sol__card span { font-size: 0.7rem; font-weight: 600; color: var(--muted); }

.mg-quiz__ans { display: grid; gap: 0.5rem; }
.mg-order__list { display: grid; gap: 0.45rem; margin-bottom: 0.75rem; }
.mg-order__item {
  text-align: left;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 600;
}
.mg-order__item.is-on { border-color: var(--teal); background: #e8f6f4; }

.mg-radar { text-align: center; }
.mg-filter__row {
  display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.75rem 0;
}
.mg-filter__ch {
  width: 2.4rem; height: 2.4rem;
  border-radius: 10px;
  font-weight: 800;
  border: 1px solid var(--line);
}
.mg-filter__ch.is-letter { background: #e8f6f4; color: var(--teal-deep); }
.mg-filter__ch.is-noise { background: #e2e6ea; color: #5b6b7c; animation: pulseSoft 1s infinite alternate; }

.mg-bal__row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0.5rem;
  align-items: center;
  margin: 0.55rem 0;
  position: relative;
}
.mg-bal__row input { width: 100%; }
.mg-bal__row > i {
  position: absolute;
  right: 0; top: -2px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--mint);
  pointer-events: none;
}

.mg-rot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  width: min(240px, 100%);
  margin: 0.5rem auto;
}
.mg-rot__tile {
  aspect-ratio: 1;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--teal);
  transition: transform 0.2s;
}

.mg-bub__field {
  position: relative;
  height: 260px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #eef6f8;
}
.mg-bub__ball {
  position: absolute;
  bottom: -40px;
  width: 36px; height: 36px;
  border-radius: 50%;
  animation: riseBubble linear forwards;
}
.mg-bub__ball.is-noise { background: #9bb0c0; }
.mg-bub__ball.is-sig { background: var(--mint); box-shadow: 0 0 14px rgba(47,158,138,0.5); }
@keyframes riseBubble {
  from { transform: translateY(0); }
  to { transform: translateY(-320px); }
}

.mg-m3__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  width: min(300px, 100%);
  margin: 0.5rem auto;
}
.mg-m3__cell {
  aspect-ratio: 1;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 1.2rem;
}
.mg-m3__cell.is-on { border-color: var(--teal); background: #e8f6f4; }

.mg-simon__pads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  width: min(260px, 100%);
  margin: 0.75rem auto;
}
.mg-simon__pad {
  aspect-ratio: 1;
  border-radius: 16px;
  opacity: 0.75;
  transition: opacity 0.15s, transform 0.15s;
}
.mg-simon__pad.is-lit { opacity: 1; transform: scale(1.05); box-shadow: 0 0 20px rgba(255,255,255,0.5); }

.mg-cal__gauge {
  width: 160px; height: 80px;
  margin: 1rem auto;
  border: 4px solid var(--line);
  border-bottom: 0;
  border-radius: 160px 160px 0 0;
  position: relative;
  overflow: hidden;
}
.mg-cal__gauge > i {
  position: absolute;
  left: 50%; bottom: 0;
  width: 4px; height: 70px;
  margin-left: -2px;
  background: var(--coral);
  transform-origin: bottom center;
  transition: transform 0.1s;
}

.mg-finale-run #frBox {
  position: relative;
  min-height: 200px;
  border-radius: 14px;
  border: 1px dashed var(--line);
  background: #f7fafc;
  padding: 0.75rem;
}
.mg-flash-btn {
  position: absolute;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), var(--mint));
  color: #fff;
  font-weight: 800;
  animation: pulseSoft 0.5s ease infinite alternate;
}

/* —— thematic media —— */
.mg-theme-note {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.75rem;
  align-items: center;
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.7rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}
.mg-theme-note img {
  width: 88px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
}
.mg-theme-note p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.35;
}

.mg-reveal {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin: 0 0 0.85rem;
  aspect-ratio: 16 / 9;
  background: #0d2a30;
}
.mg-reveal__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.85);
  transition: filter 0.4s;
}
.mg-reveal.is-clear .mg-reveal__img { filter: none; }
.mg-reveal__veil {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(10,40,48,0.35) 0 2px, transparent 2px 4px),
    linear-gradient(180deg, rgba(13,42,48,0.75), rgba(13,42,48,0.55));
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.mg-reveal__cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 0.45rem 0.7rem;
  background: rgba(10, 30, 36, 0.72);
  color: #e8f5f4;
  font-size: 0.82rem;
  font-weight: 600;
}

.mg-fifteen--pic {
  width: min(360px, 100%);
}
.mg-fifteen--pic .mg-tile {
  background-color: #e8f1f6;
  background-repeat: no-repeat;
  background-size: 100% 100% !important;
  position: relative;
  box-shadow: 0 6px 16px rgba(15,122,138,0.2);
  border: 2px solid #fff;
}
.mg-theme-note--ecg img {
  object-fit: contain;
  background: #f4faf9;
}
.mg-fifteen--pic .mg-tile__n {
  position: absolute;
  right: 4px; bottom: 3px;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.25rem;
  border-radius: 6px;
  background: rgba(10, 40, 48, 0.65);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mg-fifteen--pic.is-solved {
  box-shadow: 0 0 0 3px rgba(47,158,138,0.45);
  border-radius: 14px;
}

.mg-mines-stage {
  position: relative;
  width: min(360px, 100%);
  margin: 0.5rem auto;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.mg-mines-stage__bg {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: brightness(0.85);
}
.mg-mines-stage.is-clear .mg-mines-stage__bg { filter: none; }
.mg-mines--fog {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100%;
  margin: 0 !important;
  gap: 3px;
  padding: 3px;
  background: transparent;
}
.mg-mines--fog .mg-cell {
  background: rgba(15, 80, 95, 0.88);
  backdrop-filter: blur(1px);
  color: #fff;
}
.mg-mines--fog .mg-cell.is-open {
  background: rgba(255, 255, 255, 0.18);
  color: #0a5c68;
  font-weight: 800;
  text-shadow: 0 0 4px #fff;
}
.mg-mines--fog .mg-cell.is-mine { background: rgba(224, 122, 95, 0.85); color: #fff; }
.mg-mines--fog .mg-cell.is-flag { background: rgba(240, 199, 94, 0.9); color: #1a2433; }
.mg-mines-stage__cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 0.4rem 0.6rem;
  background: rgba(10,30,36,0.7);
  color: #e8f5f4;
  font-size: 0.8rem;
  font-weight: 600;
  pointer-events: none;
}

.mg-shoot__field { position: relative; }
.mg-shoot__organ {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.12;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}
.mg-shoot__field .mg-target { z-index: 2; }

.mg-memory--pic .mg-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.35rem;
  font-size: 0.78rem;
}
.mg-memory--pic .mg-card img {
  width: 100%;
  height: 58%;
  object-fit: cover;
  border-radius: 8px;
}
.mg-memory--pic .mg-card.is-open {
  background: #fff;
  color: var(--ink);
}

.mg-maze-wrap {
  width: min(360px, 100%);
  margin: 0.5rem auto;
  padding: 0.55rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 2000px rgba(244,247,251,0.72);
}
.mg-maze-wrap .mg-maze { width: 100%; margin: 0; }

.mg-bub__field {
  background-position: center;
  background-size: cover;
}
.mg-bub__field::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(238, 246, 248, calc(0.78 - var(--clear, 0) * 0.7));
  pointer-events: none;
  transition: background 0.3s;
}

/* ——— Сравнение эталон ↔ ваш результат ——— */
.cmp {
  margin-top: 1.1rem;
  padding: 1rem 1.1rem 1.15rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, #f7fbfc 0%, #eef5f8 55%, #f4f7fb 100%);
  box-shadow: 0 10px 28px rgba(15, 50, 70, 0.08);
  animation: cmp-in 0.45s ease both;
}
@keyframes cmp-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.cmp__head h3 {
  margin: 0.2rem 0 0.35rem;
  font-size: 1.15rem;
  color: var(--ink);
}
.cmp__lead {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}
.cmp__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 640px) {
  .cmp__grid { grid-template-columns: 1fr; }
}
.cmp__col {
  margin: 0;
}
.cmp__col figcaption {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.cmp__frame {
  position: relative;
  min-height: 140px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cmp__frame img,
.cmp__canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: contain;
}
.cmp__frame--wide { min-height: 160px; }
.cmp__overlay-wrap {
  margin-top: 0.9rem;
}
.cmp__overlay-title {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}
.cmp__blend {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #0a1e24;
}
.cmp__blend img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: none;
}
.cmp__blend-top {
  mix-blend-mode: multiply;
}
.cmp__hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.cmp__hot {
  position: absolute;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  border: 2px solid #2f9e8a;
  box-shadow: 0 0 0 6px rgba(47, 158, 138, 0.25);
  animation: cmp-pulse 1.4s ease-in-out infinite;
}
.cmp__hot.is-bad {
  border-color: #e07a5f;
  box-shadow: 0 0 0 6px rgba(224, 122, 95, 0.28);
  background: rgba(224, 122, 95, 0.15);
}
.cmp__hot.is-bad::before,
.cmp__hot.is-bad::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 2px;
  background: #e07a5f;
}
.cmp__hot.is-bad::before { transform: translate(-50%, -50%) rotate(45deg); }
.cmp__hot.is-bad::after { transform: translate(-50%, -50%) rotate(-45deg); }
@keyframes cmp-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.85; }
}
.cmp__diffs {
  margin: 0.75rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
.cmp__diffs li { margin-bottom: 0.25rem; }
.cmp__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}
.cmp__list {
  list-style: none;
  margin: 0;
  padding: 0.65rem 0.75rem;
  width: 100%;
  font-size: 0.88rem;
  line-height: 1.4;
}
.cmp__list li {
  padding: 0.35rem 0.45rem;
  margin-bottom: 0.25rem;
  border-radius: 8px;
  border-left: 3px solid transparent;
}
.cmp__list li.is-good {
  background: rgba(47, 158, 138, 0.12);
  border-left-color: #2f9e8a;
}
.cmp__list li.is-bad {
  background: rgba(224, 122, 95, 0.14);
  border-left-color: #e07a5f;
}
.cmp__list li.is-muted {
  background: rgba(150, 170, 185, 0.12);
  color: var(--muted);
}
.cmp__ok-note {
  margin: 0;
  padding: 0.85rem 1rem;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.45;
}
.cmp__signal { margin-top: 0.85rem; }
.cmp__grid--signal .cmp__frame { min-height: 100px; }
.mg-eeg {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.mg-eeg__stage {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0.75rem;
  align-items: stretch;
}
@media (max-width: 720px) {
  .mg-eeg__stage { grid-template-columns: 1fr; }
}
.mg-eeg__hero {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  object-fit: cover;
  min-height: 220px;
  max-height: 320px;
}
.mg-eeg__head {
  position: relative;
  min-height: 260px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 45%, #f2e6d8 0%, #e8d5c4 45%, #d9c4b0 100%);
  overflow: hidden;
}
.mg-eeg__head::before {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 8%;
  bottom: 6%;
  border-radius: 50% 50% 46% 46%;
  border: 3px solid rgba(80, 60, 50, 0.35);
  background: rgba(255, 250, 245, 0.35);
  pointer-events: none;
}
.mg-eeg__head-cap {
  position: relative;
  z-index: 1;
  margin: 0.5rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}
.mg-eeg__zone {
  position: absolute;
  z-index: 2;
  width: 18%;
  min-width: 3.2rem;
  height: 2.4rem;
  transform: translate(-50%, -50%);
  padding: 0.25rem;
  border-radius: 10px;
  border: 2px dashed #0f7a8a;
  background: rgba(255, 255, 255, 0.55);
  text-align: center;
  cursor: pointer;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mg-eeg__zone-mark {
  display: block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #0f7a8a;
  opacity: 0.55;
}
.mg-eeg__zone span { display: block; font-weight: 800; color: #0f7a8a; }
.mg-eeg__zone small { color: var(--muted); font-size: 0.68rem; }
.mg-eeg__zone.is-filled {
  border-style: solid;
  background: rgba(47, 158, 138, 0.2);
  height: auto;
  min-height: 2.4rem;
}
.mg-eeg__tray {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.mg-eeg__chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-weight: 700;
  cursor: grab;
  color: var(--ink);
}
.mg-eeg__chip.is-on { outline: 2px solid #0f7a8a; }
.mg-eeg__chip.is-done {
  background: rgba(47, 158, 138, 0.18);
  color: #0a5c68;
}
.mg-eeg__params {
  display: grid;
  gap: 0.45rem;
}
.mg-eeg__params label {
  display: grid;
  grid-template-columns: 7rem 1fr 2.5rem;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.9rem;
}
.mg-eeg__scope {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #f0d0c8;
  background: #fff8f6;
}

.mg-maze-wrap--robot {
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 2000px rgba(244, 247, 251, 0.78);
}
.mg-maze--tiles {
  display: grid;
  gap: 4px;
}
.mg-maze__cell.is-path {
  background: #e7f3f1 url("../assets/maze-tiles.png") left center / 200% 100%;
  border: 1px solid #b7d4ce;
}
.mg-maze__cell.is-wall {
  background: #8aa0b2 url("../assets/maze-tiles.png") right center / 200% 100%;
  opacity: 0.95;
  cursor: not-allowed;
}
.mg-maze__cell.is-here {
  background: #0f7a8a !important;
  box-shadow: 0 0 0 3px rgba(15, 122, 138, 0.35);
}
.mg-maze__cell.is-end {
  outline: 3px solid #f0c75e;
}
.mg-maze__cell.is-start {
  outline: 2px dashed #2f9e8a;
}
.mg-plat--vessel canvas {
  border-radius: 14px;
  border: 1px solid var(--line);
}
.mg-shoot__field {
  background-size: cover;
  background-position: center;
}
.metro {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.metro__case {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.metro__slides {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0.75rem;
  align-items: stretch;
}
@media (max-width: 720px) {
  .metro__slides { grid-template-columns: 1fr; }
}
.metro__img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  object-fit: cover;
  min-height: 200px;
  max-height: 280px;
  animation: metro-fade 0.45s ease both;
}
@keyframes metro-fade {
  from { opacity: 0.4; transform: scale(0.98); }
  to { opacity: 1; transform: none; }
}
.metro__card {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, #f7fbfc, #eef5f8);
}
.metro__card h3 { margin: 0.25rem 0 0.5rem; }
.metro__card p { margin: 0; color: var(--muted); line-height: 1.45; }
.metro__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.metro__gost {
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border-left: 4px solid #0f7a8a;
  background: rgba(15, 122, 138, 0.08);
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}
.metro__gost .kicker { margin: 0 0 0.35rem; }
.metro__gost p { margin: 0; }
.metro__nodes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.metro__node {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 0.55rem 0.8rem;
  font-weight: 650;
  cursor: pointer;
  color: var(--ink);
}
.metro__node.is-on {
  background: rgba(47, 158, 138, 0.18);
  border-color: #2f9e8a;
  color: #0a5c68;
}
.metro__params {
  display: grid;
  gap: 0.55rem;
}
.metro__param {
  display: grid;
  grid-template-columns: minmax(10rem, 1.4fr) 1fr 3.2rem;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.9rem;
}
.metro__hint-btn {
  align-self: flex-start;
  border: none;
  background: none;
  color: #0f7a8a;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 0;
  font-size: 0.95rem;
}
.metro__scheme {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.45rem;
}
.metro__block {
  flex: 1 1 140px;
  min-width: 140px;
  max-width: 200px;
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
  border: 2px dashed #9bb0c0;
  background: #fff;
}
.metro__block.is-set {
  border-style: solid;
  border-color: #2f9e8a;
  background: rgba(47, 158, 138, 0.08);
}
.metro__block-title {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.metro__select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.45rem;
  font: inherit;
  background: #f7fbfc;
}
.metro__arrow {
  align-self: center;
  font-size: 1.4rem;
  color: #0f7a8a;
  font-weight: 800;
}
.metro__viz {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
@media (max-width: 720px) {
  .metro__viz { grid-template-columns: 1fr; }
  .metro__arrow { display: none; }
}
.metro__viz figure { margin: 0; }
.metro__viz figcaption {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.metro__viz canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid #f0d0c8;
  background: #fff8f6;
}
.metro__viz--result {
  margin-top: 0.75rem;
}

.phantom-live {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0.85rem 0 1rem;
}
@media (max-width: 640px) {
  .phantom-live { grid-template-columns: 1fr; }
}
.phantom-live figure { margin: 0; }
.phantom-live figcaption {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.phantom-live canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0a1520;
}
.cmp__demo-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.65rem;
}
.cmp__demo-cell {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.55rem 0.6rem 0.7rem;
}
.cmp__demo-cap {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}
.cmp__demo-note {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--muted);
}
.cmp__canvas--mini {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #f0d0c8;
}
.cmp__spot {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.cmp__spot > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
}
.cmp__spot-mark {
  position: absolute;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  border: 2px solid #2f9e8a;
  box-shadow: 0 0 0 4px rgba(47, 158, 138, 0.3);
}
.cmp__spot-mark.is-ideal {
  border-style: dashed;
  background: rgba(47, 158, 138, 0.2);
}
.cmp__spot-mark.is-good {
  background: rgba(15, 122, 138, 0.35);
}
.cmp__spot-mark.is-bad {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
}
.cmp__spot-mark.is-bad::before,
.cmp__spot-mark.is-bad::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 3px;
  background: #e07a5f;
  border-radius: 2px;
}
.cmp__spot-mark.is-bad::before { transform: translate(-50%, -50%) rotate(45deg); }
.cmp__spot-mark.is-bad::after { transform: translate(-50%, -50%) rotate(-45deg); }

.cmp__hot.is-bad {
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  animation: none;
}
.cmp__hot.is-bad::before,
.cmp__hot.is-bad::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 3px;
  background: #e07a5f;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.35);
}
.cmp__hot.is-bad::before { transform: translate(-50%, -50%) rotate(45deg); }
.cmp__hot.is-bad::after { transform: translate(-50%, -50%) rotate(-45deg); }

[hidden] { display: none !important; }

