/* CORESURGE — REACTOR theme. --heat (0..1) and --hot (tier colour) are driven live from app.js. */
:root {
  --bg: #030507;
  --ink: #e8f4ff;
  --dim: #6f8597;
  --line: rgba(120, 200, 255, .18);
  --cyan: #38e1ff;
  --blue: #2f7bff;
  --amber: #ffb000;
  --red: #ff2a3a;
  --hot: #38e1ff;
  --heat: 0;
  --shake-x: 0px;
  --shake-y: 0px;
  --ab: 0px;              /* chromatic aberration offset */
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --disp: "Chakra Petch", "Eurostile", "Bank Gothic", var(--mono);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------- background canvas + screen FX ---------------- */
#reactor {
  position: fixed; inset: -24px;
  width: calc(100% + 48px); height: calc(100% + 48px);
  transform: translate(var(--shake-x), var(--shake-y));
  z-index: 0;
}
.fx { position: fixed; inset: 0; pointer-events: none; }
.fx-vignette {
  z-index: 2;
  background: radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(0,0,0,.55) 75%, rgba(0,0,0,.92) 100%);
}
.fx-scan {
  z-index: 3;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.035) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
  animation: scanroll 100s linear infinite; /* 3px/s: each scanline passes a pixel once a second */
}
.fx-scan::after { /* rolling CRT refresh bar */
  content: ""; position: absolute; left: 0; right: 0; height: 18vh; top: -20vh;
  background: linear-gradient(to bottom, transparent, rgba(160,230,255,.05), transparent);
  animation: crtbar 5.5s linear infinite;
}
@keyframes scanroll { to { background-position: 0 300px; } }
@keyframes crtbar { to { top: 110vh; } }
.fx-grain {
  z-index: 3; opacity: calc(.05 + var(--heat) * .12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}
@keyframes grain { 0%{transform:translate(0,0)} 25%{transform:translate(-3%,2%)} 50%{transform:translate(2%,-3%)} 75%{transform:translate(-2%,-1%)} }

/* ---------------- layout frame ---------------- */
.frame {
  position: fixed; inset: 0; z-index: 5;
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr minmax(220px, 300px);
  grid-template-rows: auto 1fr auto;
  grid-template-areas: "top top top" "left mid right" "left bottom right";
  gap: 0 24px;
  padding: max(14px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}
.top { grid-area: top; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  transform: translate(calc(var(--shake-x) * .45), calc(var(--shake-y) * .45)); }
.brand { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; min-width: 0; }
.trefoil { color: var(--amber); font-size: 26px; line-height: 1; text-shadow: 0 0 12px rgba(255,176,0,.7); align-self: center; animation: spin 12s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand-name { font-family: var(--disp); font-weight: 700; font-size: 26px; letter-spacing: .28em; position: relative;
  text-shadow: calc(var(--ab) * -1) 0 rgba(255,40,60,.85), var(--ab) 0 rgba(40,220,255,.85), 0 0 18px rgba(56,225,255,.35); }
.brand-sub { font-size: 10.5px; letter-spacing: .22em; color: var(--dim); }
.toggles { display: flex; gap: 8px; flex-shrink: 0; }
.tog {
  background: rgba(6,12,18,.7); border: 1px solid var(--line); border-radius: 2px;
  padding: 8px 12px; font-size: 11px; letter-spacing: .16em; color: var(--dim);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: color .2s, border-color .2s, background .2s;
}
.tog b { color: var(--ink); font-weight: 800; margin-left: 4px; }
.tog[aria-pressed="true"] { border-color: var(--amber); color: var(--amber); background: rgba(255,176,0,.08); }
.tog[aria-pressed="true"] b { color: var(--amber); }
.tog:focus-visible, .ignite:focus-visible, .btn-hazard:focus-visible, .btn-ghost:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* glitch title: two clipped copies jitter when hot */
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; opacity: 0; pointer-events: none;
}
.glitch::before { color: #ff2a3a; transform: translateX(-2px); clip-path: inset(10% 0 55% 0); }
.glitch::after  { color: #38e1ff; transform: translateX(2px);  clip-path: inset(60% 0 8% 0); }
body.hot .glitch::before, body.hot .glitch::after { opacity: .35; animation: glitchy 4.5s ease-in-out infinite; }
body.hot .glitch::after { animation-delay: -2s; }
@keyframes glitchy {
  0%, 100% { clip-path: inset(12% 0 60% 0); transform: translate(-1px, 0); }
  50% { clip-path: inset(40% 0 38% 0); transform: translate(1px, 0); }
}

/* ---------------- side panels ---------------- */
.panel {
  align-self: center;
  background: linear-gradient(180deg, rgba(6,14,22,.78), rgba(4,8,12,.62));
  border: 1px solid var(--line);
  padding: 14px 16px 16px;
  backdrop-filter: blur(3px);
  position: relative;
  transform: translate(calc(var(--shake-x) * .35), calc(var(--shake-y) * .35));
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.panel::before { /* hot edge */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--hot); box-shadow: 0 0 12px var(--hot);
}
.panel-right::before { left: auto; right: 0; }
.panel-left { grid-area: left; }
.panel-right { grid-area: right; }
.ptitle { font-size: 10px; letter-spacing: .26em; color: var(--dim); margin: 2px 0 8px; display: flex; justify-content: space-between; gap: 8px; }
.ptitle:not(:first-child) { margin-top: 16px; }
.tele { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; margin: 0; font-size: 12px; }
.tele dt { color: var(--dim); letter-spacing: .08em; }
.tele dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#t-cont.bad, #t-temp.bad { color: var(--red); text-shadow: 0 0 8px rgba(255,42,58,.6); }
.log { list-style: none; margin: 0; padding: 0; font-size: 10.5px; line-height: 1.5; height: 132px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%); mask-image: linear-gradient(to bottom, transparent, #000 30%);
  display: flex; flex-direction: column; justify-content: flex-end; }
.log li { color: #9fb6c8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log li time { color: var(--dim); margin-right: 6px; }
.log li.warn { color: var(--amber); }
.log li.crit { color: var(--red); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 12px; letter-spacing: .08em; }
.steps li { display: flex; align-items: baseline; gap: 10px; color: var(--dim); padding: 6px 8px; border: 1px solid transparent; }
.steps li i { font-style: normal; font-size: 10px; color: #3d5263; }
.steps li small { margin-left: auto; font-size: 9.5px; color: #3d5263; letter-spacing: .05em; }
.steps li.active { color: var(--ink); border-color: var(--hot); background: rgba(56,225,255,.06); box-shadow: inset 3px 0 0 var(--hot); }
.steps li.active i { color: var(--hot); }
.steps li.done { color: #8aa3b5; }
.steps li.done i::after { content: " \2713"; color: #38ff9c; }
#dosimeter { width: 100%; height: 70px; display: block; background: rgba(0,0,0,.35); border: 1px solid var(--line); }
#geiger-count { color: #38ff9c; }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 11px; }
.ladder li { display: flex; justify-content: space-between; padding: 4px 8px; color: #3d5263; border-left: 3px solid #1a2630; letter-spacing: .1em; }
.ladder li span { font-size: 10px; }
.ladder li.lit[data-tier="NOMINAL"]  { color: var(--cyan);  border-color: var(--cyan); }
.ladder li.lit[data-tier="ELEVATED"] { color: var(--amber); border-color: var(--amber); }
.ladder li.lit[data-tier="CRITICAL"] { color: #ff7a1a;      border-color: #ff7a1a; }
.ladder li.lit[data-tier="MELTDOWN"] { color: var(--red);   border-color: var(--red); background: rgba(255,42,58,.12); }
.ladder li.now { background: rgba(255,255,255,.05); }
.ladder li.now b::before { content: "\25B6  "; }

/* ---------------- central readout (always legible) ---------------- */
.readout {
  grid-area: mid; align-self: center; justify-self: center;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 22px clamp(18px, 4vw, 48px) 20px;
  position: relative;
  transform: translate(calc(var(--shake-x) * .12), calc(var(--shake-y) * .12));
  max-width: 100%;
}
.readout::before { /* containment-glass plate that keeps the number readable over the core */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(2,4,7,.80) 0%, rgba(2,4,7,.68) 55%, rgba(2,4,7,0) 78%);
  border-radius: 50%;
  transform: scale(1.35, 1.25);
}
.phase-label {
  font-family: var(--disp); font-weight: 700; font-size: clamp(13px, 1.6vw, 17px); letter-spacing: .42em;
  color: var(--hot); text-shadow: 0 0 10px var(--hot); margin-bottom: 2px; padding-left: .42em;
}
.big-wrap { position: relative; }
.big { display: flex; align-items: baseline; justify-content: center; gap: .18em; line-height: .92; white-space: nowrap; }
.num {
  font-family: var(--mono); font-weight: 800;
  font-size: clamp(64px, 17vw, 210px);
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  color: #fff;
  /* dark halo first (legibility), then capped aberration + glow */
  text-shadow:
    0 0 2px #000, 0 2px 18px rgba(0,0,0,.95),
    calc(var(--ab) * -1) 0 0 rgba(255,40,70,.75), var(--ab) 0 0 rgba(40,230,255,.75),
    0 0 calc(20px + var(--heat) * 40px) var(--hot);
  min-width: 3.2ch; text-align: right;
}
.unit { font-family: var(--disp); font-weight: 700; font-size: clamp(18px, 3vw, 34px); color: var(--hot); letter-spacing: .1em; text-shadow: 0 0 2px #000, 0 0 12px rgba(0,0,0,.9); }
.phase-bar { width: min(420px, 70vw); height: 4px; background: rgba(255,255,255,.08); margin: 14px 0 10px; position: relative; overflow: hidden; }
.phase-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--hot); box-shadow: 0 0 10px var(--hot); transition: width .1s linear; }
.sub { font-size: clamp(11px, 1.2vw, 13px); letter-spacing: .2em; color: #b9cad8; text-shadow: 0 1px 6px #000; min-height: 1.3em; }
.minis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; width: min(560px, 92vw); }
.mini { background: rgba(3,7,11,.78); border: 1px solid var(--line); padding: 8px 6px 7px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.mini span { font-size: 9.5px; letter-spacing: .22em; color: var(--dim); }
.mini b { font-size: clamp(16px, 2.2vw, 22px); font-weight: 800; font-variant-numeric: tabular-nums; }
.mini em { font-style: normal; font-size: 9.5px; color: var(--dim); }
.mini.set { border-color: rgba(56,255,156,.4); }
.mini.live { border-color: var(--hot); box-shadow: 0 0 14px -4px var(--hot); }

/* ---------------- ignite / SCRAM ---------------- */
.bottom { grid-area: bottom; display: flex; justify-content: center; padding-top: 8px;
  transform: translate(calc(var(--shake-x) * .3), calc(var(--shake-y) * .3)); }
.ignite {
  position: relative; width: 148px; height: 148px; border-radius: 50%; border: 0; padding: 0; background: transparent;
  display: grid; place-items: center; touch-action: manipulation;
}
.ig-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(#ffb000 0 12deg, #111 12deg 24deg);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%); mask: radial-gradient(circle, transparent 60%, #000 61%);
  animation: spin 20s linear infinite; /* 15 stripe pairs: <1 Hz light/dark per point */
  filter: drop-shadow(0 0 10px rgba(255,176,0,.45));
}
.ig-core {
  position: relative; width: 112px; height: 112px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ffcf4a, #ff8a00 45%, #a33a00 85%);
  box-shadow: 0 0 0 3px #000, 0 0 0 5px rgba(255,176,0,.5), 0 0 40px rgba(255,140,0,.55), inset 0 -8px 18px rgba(0,0,0,.45), inset 0 6px 12px rgba(255,255,255,.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center; color: #1a0a00;
  transition: transform .12s, box-shadow .2s;
  animation: breathe 2.4s ease-in-out infinite;
}
.ig-label { font-family: var(--disp); font-weight: 700; font-size: 22px; letter-spacing: .14em; padding-left: .14em; }
.ig-hint { font-size: 9px; letter-spacing: .2em; font-weight: 800; opacity: .75; }
.ignite:hover .ig-core { transform: scale(1.04); }
.ignite:active .ig-core { transform: scale(.94); }
@keyframes breathe { 50% { box-shadow: 0 0 0 3px #000, 0 0 0 5px rgba(255,176,0,.7), 0 0 70px rgba(255,140,0,.85), inset 0 -8px 18px rgba(0,0,0,.45), inset 0 6px 12px rgba(255,255,255,.35); } }
body.running .ig-ring { background: repeating-conic-gradient(#ff2a3a 0 12deg, #111 12deg 24deg); animation-duration: 16s; filter: drop-shadow(0 0 12px rgba(255,42,58,.6)); }
body.running .ig-core { background: radial-gradient(circle at 40% 35%, #ff6a6a, #e0101e 50%, #5a0008 90%); color: #fff; animation: none; box-shadow: 0 0 0 3px #000, 0 0 0 5px rgba(255,42,58,.6), 0 0 40px rgba(255,42,58,.6), inset 0 -8px 18px rgba(0,0,0,.45); }

/* ---------------- tier banner ---------------- */
.banner {
  position: fixed; left: 0; right: 0; top: 22%; z-index: 8; pointer-events: none;
  display: grid; grid-template-rows: 14px auto 14px;
  transform: skewY(-4deg) scaleY(0); opacity: 0;
  transition: transform .25s cubic-bezier(.2,1.6,.4,1), opacity .2s;
}
.banner.show { transform: skewY(-4deg) scaleY(1); opacity: 1; }
.banner-stripe { background: repeating-linear-gradient(-45deg, var(--bcol, #ffb000) 0 18px, #0a0a0a 18px 36px); animation: stripes 3s linear infinite; }
@keyframes stripes { to { background-position: 51px 0; } }
.banner-text { background: rgba(5,5,5,.9); display: flex; flex-direction: column; align-items: center; padding: 8px 12px 10px; }
.banner-text span { font-family: var(--disp); font-weight: 700; font-size: clamp(40px, 9vw, 104px); letter-spacing: .2em; padding-left: .2em; line-height: 1; color: var(--bcol, #ffb000); text-shadow: 0 0 24px var(--bcol, #ffb000); }
.banner-text small { font-size: clamp(10px, 1.3vw, 14px); letter-spacing: .3em; color: #ddd; margin-top: 4px; text-align: center; }
@keyframes glowPulse { 0%, 100% { text-shadow: 0 0 14px var(--hot); } 50% { text-shadow: 0 0 30px var(--hot); } }

/* ---------------- states ---------------- */
body.tier-ELEVATED { --hot: #ffb000; }
body.tier-CRITICAL { --hot: #ff7a1a; }
body.tier-MELTDOWN { --hot: #ff2a3a; }
body.tier-MELTDOWN .fx-vignette { background: radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(90,0,0,.5) 72%, rgba(20,0,0,.95) 100%); }
body.tier-MELTDOWN .phase-label { animation: glowPulse 2.8s ease-in-out infinite; }

/* calm mode: no shake and no glitch */
body.calm { --shake-x: 0px !important; --shake-y: 0px !important; --ab: 0px !important; }
body.calm .fx-scan, body.calm .fx-scan::after, body.calm .fx-grain, body.calm .trefoil, body.calm .ig-ring, body.calm .ig-core, body.calm .banner-stripe, body.calm .glitch::before, body.calm .glitch::after { animation: none !important; }
body.calm .glitch::before, body.calm .glitch::after { display: none; }
body.calm.tier-MELTDOWN .phase-label { animation: none !important; }
body.calm .banner { transition: opacity .3s; transform: skewY(-4deg); }

/* ---------------- report card ---------------- */
.report {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.55), rgba(0,0,0,.88));
  backdrop-filter: blur(4px);
  overflow-y: auto;
}
.report[hidden] { display: none; }
.rep-card {
  width: min(680px, 100%); position: relative;
  background: linear-gradient(180deg, #0b1219, #06090d);
  border: 1px solid rgba(255,176,0,.35);
  box-shadow: 0 0 0 1px #000, 0 30px 90px rgba(0,0,0,.8), 0 0 80px -20px var(--hot);
  padding: 22px clamp(16px, 4vw, 30px) 22px;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  animation: repin .45s cubic-bezier(.2,1.3,.4,1);
  margin: auto;
}
.rep-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: repeating-linear-gradient(-45deg, #ffb000 0 12px, #0a0a0a 12px 24px); }
@keyframes repin { from { transform: scale(.85) translateY(20px); opacity: 0; } }
body.calm .rep-card { animation: none; }
.rep-head { display: flex; align-items: center; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.rep-head h2 { font-family: var(--disp); font-size: clamp(20px, 4vw, 28px); letter-spacing: .22em; margin: 0; }
.rep-id { margin-left: auto; font-size: 11px; color: var(--dim); letter-spacing: .15em; }
.rep-stamp {
  position: absolute; right: clamp(12px, 4vw, 30px); top: 74px; transform: rotate(-12deg);
  font-family: var(--disp); font-weight: 700; font-size: clamp(20px, 4.4vw, 32px); letter-spacing: .14em;
  color: var(--hot); border: 3px solid var(--hot); padding: 2px 12px; opacity: .85;
  text-shadow: 0 0 10px var(--hot); box-shadow: 0 0 14px -2px var(--hot), inset 0 0 14px -4px var(--hot);
  pointer-events: none;
}
.rep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0 16px; }
.rep-big, .rep-small { background: rgba(0,0,0,.4); border: 1px solid var(--line); padding: 12px 14px; display: flex; flex-direction: column; }
.rep-big span, .rep-small span { font-size: 10.5px; letter-spacing: .24em; color: var(--dim); }
.rep-big b { font-size: clamp(44px, 10vw, 72px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; margin-top: 6px; letter-spacing: -.03em; }
.rep-small b { font-size: clamp(26px, 6vw, 36px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; margin-top: 4px; }
.rep-big em, .rep-small em { font-style: normal; color: var(--dim); font-size: 11px; margin-top: 2px; }
.rep-meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 12.5px; }
.rep-meta dt { color: var(--dim); letter-spacing: .14em; font-size: 11px; padding-top: 1px; }
.rep-meta dd { margin: 0; font-weight: 700; word-break: break-word; }
.rep-flavor {
  margin: 18px 0 18px; padding: 12px 14px; border-left: 3px solid var(--hot);
  background: rgba(255,255,255,.03); font-family: var(--disp); font-size: clamp(15px, 2.4vw, 19px); line-height: 1.35; letter-spacing: .02em;
}
.rep-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-hazard, .btn-ghost {
  padding: 12px 18px; font-size: 12px; font-weight: 800; letter-spacing: .2em; text-decoration: none; display: inline-flex; align-items: center;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.btn-hazard { background: #ffb000; color: #120800; border: 0; }
.btn-hazard:hover { background: #ffc640; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------------- responsive ---------------- */
@media (max-width: 1080px) {
  .frame { grid-template-columns: 1fr; grid-template-areas: "top" "mid" "bottom"; }
  .panel { display: none; }
}
@media (max-width: 640px) {
  .frame { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .brand-sub { display: none; }
  .brand-name { font-size: 18px; letter-spacing: .18em; }
  .trefoil { font-size: 20px; }
  .tog { padding: 7px 8px; font-size: 10px; letter-spacing: .1em; }
  .minis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ignite { width: 124px; height: 124px; }
  .ig-core { width: 94px; height: 94px; }
  .ig-label { font-size: 19px; }
  .readout::before { transform: scale(1.15, 1.15); }
  .rep-meta { grid-template-columns: 1fr; gap: 0; }
  .rep-meta dd { margin-bottom: 8px; }
  .rep-stamp { top: 64px; }
}
@media (max-height: 640px) and (min-width: 641px) {
  .num { font-size: clamp(56px, 22vh, 160px); }
  .minis { margin-top: 10px; }
}

/* ---------------- screen cracks (static, no flicker) ---------------- */
.fx-cracks { z-index: 7; width: 100%; height: 100%; }
.fx-cracks path {
  fill: none; stroke: #e9fbff; stroke-width: 1.2; opacity: .45; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 2px #000) drop-shadow(0 0 4px rgba(255,42,58,.5));
}
body.calm .fx-cracks { display: none; }
