/* NullSpace: deep-blue glass, alias tags, pie timers, glitch deaths.
   Every font is bundled. Nothing loads from another domain. */

@font-face { font-family: "Oswald"; font-weight: 300; font-display: swap; src: url("../fonts/oswald-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-weight: 500; font-display: swap; src: url("../fonts/oswald-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Heebo"; font-weight: 300; font-display: swap; src: url("../fonts/heebo-hebrew-300-normal.woff2") format("woff2"); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Heebo"; font-weight: 400; font-display: swap; src: url("../fonts/heebo-hebrew-400-normal.woff2") format("woff2"); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Heebo"; font-weight: 700; font-display: swap; src: url("../fonts/heebo-hebrew-700-normal.woff2") format("woff2"); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Heebo"; font-weight: 300; font-display: swap; src: url("../fonts/heebo-latin-300-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Heebo"; font-weight: 400; font-display: swap; src: url("../fonts/heebo-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Heebo"; font-weight: 700; font-display: swap; src: url("../fonts/heebo-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }

:root {
  --bg-center: #0b2be0;
  --bg-mid: #0a1fa8;
  --bg-edge: #030a45;
  --cyan: #7fe3ff;
  --cyan-dim: rgba(127, 227, 255, 0.35);
  --tag: #ddf4ff;
  --tag-text: #06123a;
  --text: #b5e2ff;
  --danger: #ff3b5c;
  --ok: #6dffc1;
  --glass: rgba(10, 30, 140, 0.42);
  --glass-strong: rgba(4, 14, 80, 0.86);
  --line: rgba(127, 227, 255, 0.18);
  --font-ui: "Heebo", system-ui, sans-serif;
  --font-caps: "Oswald", "Heebo", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overscroll-behavior: none; }
body {
  background: var(--bg-edge);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
bdi.ltr, .ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- the room itself: gradient, dot texture, glass shards ---------- */
.bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(rgba(255, 255, 255, 0.07) 0.6px, transparent 0.9px) 0 0 / 7px 7px,
    radial-gradient(ellipse 85% 70% at 55% 42%, var(--bg-center) 0%, var(--bg-mid) 45%, var(--bg-edge) 100%);
}
.bg::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 6px);
}
.shards { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.shard {
  position: absolute; width: var(--w); height: var(--h); top: var(--y); left: var(--x);
  clip-path: polygon(0 0, 100% 35%, 30% 100%);
  background: linear-gradient(140deg, rgba(160, 210, 255, 0.55), rgba(40, 90, 255, 0.18) 60%, rgba(255, 255, 255, 0.05));
  filter: blur(var(--blur, 1.2px));
  opacity: var(--o, 0.6);
  animation: drift var(--d, 60s) ease-in-out infinite alternate;
}
.shard:nth-child(2n) { clip-path: polygon(10% 0, 100% 60%, 0 100%); }
.shard:nth-child(3n) { clip-path: polygon(0 20%, 100% 0, 60% 100%); }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) rotate(var(--r0, 0deg)); }
  to { transform: translate3d(var(--dx, 40px), var(--dy, -60px), 0) rotate(var(--r1, 25deg)); }
}
.shards.surge { animation: surge 1.4s ease-out; }
@keyframes surge {
  0% { transform: translateX(0); filter: none; }
  25% { transform: translateX(-26px) scale(1.04); filter: blur(2px) brightness(1.6); }
  100% { transform: translateX(0); filter: none; }
}

/* ---------- frame ---------- */
#app {
  position: relative; z-index: 1; height: 100%; max-width: 560px; margin: 0 auto;
  display: flex; flex-direction: column; padding-top: var(--safe-top);
}
.topbar {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px 8px; direction: ltr;
}
.wordmark {
  font-family: var(--font-caps); font-weight: 300; letter-spacing: 0.32em; font-size: 0.95rem;
  color: #e9f7ff; text-transform: uppercase; user-select: none; touch-action: none;
}
.spinner { width: 18px; height: 18px; flex: none; }
.spinner circle { fill: none; stroke: var(--cyan); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 34 60; transform-origin: 50% 50%; }
.spinner.connecting circle { animation: spin 0.9s linear infinite; }
.spinner.live circle { stroke-dasharray: 60 0; opacity: 0.9; }
.spinner.offline circle, .spinner.denied circle { stroke: var(--danger); stroke-dasharray: 6 4; }
@keyframes spin { to { transform: rotate(360deg); } }
.topbar .grow { flex: 1; }
.iconbtn {
  background: none; border: 0; padding: 8px; margin: -8px; display: inline-flex; color: var(--cyan);
  border-radius: 10px;
}
.iconbtn:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 2px;
}
.iconbtn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.glowline {
  height: 1px; margin: 0 12px; background: var(--cyan);
  box-shadow: 0 0 6px 1px rgba(127, 227, 255, 0.85), 0 0 18px 2px rgba(127, 227, 255, 0.35);
}
.hashbar {
  display: flex; align-items: baseline; gap: 10px; padding: 6px 16px 4px; direction: ltr;
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--cyan); letter-spacing: 0.08em;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.hashbar .num { text-shadow: 0 0 8px rgba(127, 227, 255, 0.6); overflow: hidden; white-space: nowrap; text-overflow: clip; }
.hashbar .lbl { font-family: var(--font-caps); font-weight: 500; letter-spacing: 0.25em; opacity: 0.9; }
.hashbar .epoch { margin-inline-start: auto; opacity: 0.55; }

/* protocol log scrolling on the left edge */
.syslog {
  position: fixed; left: 0; top: 120px; bottom: 90px; width: 92px; z-index: 0; overflow: hidden; pointer-events: none;
  font-family: var(--font-mono); font-size: 7.5px; line-height: 1.5; color: rgba(160, 225, 255, 0.4);
  direction: ltr; text-align: left; padding-left: 6px;
  mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent);
}
.syslog div { white-space: nowrap; overflow: hidden; text-overflow: clip; }
@media (min-width: 900px) { .syslog { width: 220px; font-size: 9px; left: max(0px, calc(50% - 520px)); } }

main.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }

/* ---------- room header ---------- */
.roomhead {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px 8px;
  font-family: var(--font-caps); font-weight: 300; letter-spacing: 0.12em; font-size: 0.9rem; color: #dff3ff;
}
.roomhead .rname { white-space: nowrap; }
.roomhead .rname b { font-weight: 500; letter-spacing: 0.2em; }
.roomhead .users { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; overflow: hidden; }
.roomhead .users .list { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; opacity: 0.9; }
.roomhead .plus {
  flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--cyan-dim);
  background: rgba(127, 227, 255, 0.08); color: var(--cyan); font-size: 1.1rem; line-height: 1; display: grid; place-items: center;
}
.pulse-count { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ok); }

/* ---------- the feed: a self-cleaning terminal ---------- */
.feed {
  flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px 12px 10px 104px;
  display: flex; flex-direction: column; gap: 0; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 520px) { .feed { padding-left: 14px; } }
.feed .spacer { flex: 1; }
.row {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 2px 11px; position: relative;
  border-bottom: 1px solid var(--line);
  animation: rowin 0.28s ease-out;
}
@keyframes rowin { from { opacity: 0; transform: translateY(8px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
.tag {
  flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px 2px 7px; border-radius: 3px;
  background: var(--tag); color: var(--tag-text); font-family: var(--font-caps); font-weight: 500;
  font-size: 0.82rem; letter-spacing: 0.06em; direction: ltr; border: 0; line-height: 1.35;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
}
.tag .dots { font-size: 0.8rem; letter-spacing: 0; opacity: 0.6; padding-left: 2px; }
.tag.verified { box-shadow: 0 0 0 1px #fff, 0 0 10px 2px rgba(127, 227, 255, 0.95), 0 0 22px 4px rgba(127, 227, 255, 0.45); }
.tag.me { background: #b9e8ff; }
.tag.sys { background: transparent; color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan-dim); }
.pie {
  flex: none; width: 15px; height: 15px; margin-top: 3px; border-radius: 50%;
  background: conic-gradient(var(--cyan) calc(var(--p, 1) * 360deg), #f4fbff 0);
  box-shadow: 0 0 6px rgba(127, 227, 255, 0.55);
  transform: scaleX(-1);
}
.pie.forever { background: #f4fbff; opacity: 0.5; }
.pie.burn { background: conic-gradient(var(--danger) calc(var(--p, 1) * 360deg), #f4fbff 0); }
.body { flex: 1; min-width: 0; }
.msgtext {
  color: var(--text); text-shadow: 0 0 6px rgba(127, 227, 255, 0.55), 0 0 1px rgba(181, 226, 255, 0.9);
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.02rem; font-weight: 300;
  unicode-bidi: plaintext; text-align: start;
}
.row.sys .msgtext { font-family: var(--font-mono); font-size: 0.74rem; color: var(--cyan); opacity: 0.8; text-shadow: none; }
.reply-ref { font-size: 0.75rem; opacity: 0.6; border-inline-start: 2px solid var(--cyan-dim); padding-inline-start: 6px; margin-bottom: 3px; }
.meta { font-family: var(--font-mono); font-size: 0.62rem; opacity: 0.45; margin-top: 2px; direction: ltr; text-align: right; }
.held { filter: blur(9px); transition: filter 0.12s; user-select: none; -webkit-user-select: none; }
.holdable { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.holdable.peek .held, .holdable.peek.held { filter: none; }
.hold-hint { font-size: 0.7rem; opacity: 0.6; font-family: var(--font-caps); letter-spacing: 0.15em; }
.media { position: relative; display: inline-block; max-width: 100%; border-radius: 4px; overflow: hidden; border: 1px solid var(--cyan-dim); }
.media img, .media video { display: block; max-width: 100%; max-height: 52vh; }
.media .wm {
  position: absolute; inset: 0; pointer-events: none; display: flex; flex-wrap: wrap; align-content: space-around; justify-content: space-around;
  overflow: hidden; font-family: var(--font-caps); font-size: 0.8rem; color: rgba(255, 255, 255, 0.16); transform: rotate(-24deg) scale(1.4);
}
.media .placeholder { width: 220px; height: 150px; display: grid; place-items: center; background: rgba(0, 10, 60, 0.6); font-size: 0.8rem; }
audio { width: 230px; height: 36px; }
.fileref { display: inline-flex; gap: 8px; align-items: center; padding: 6px 10px; border: 1px solid var(--cyan-dim); border-radius: 4px; background: rgba(0, 20, 90, 0.4); }

/* death by glitch: 300 ms */
.row.dying { animation: glitch 0.3s steps(6) forwards; pointer-events: none; }
.row.dying::before, .row.dying::after {
  content: ""; position: absolute; left: 0; right: 0; height: 30%; mix-blend-mode: screen;
  background: linear-gradient(90deg, transparent, rgba(255, 59, 92, 0.7), rgba(127, 227, 255, 0.8), transparent);
  animation: tear 0.3s steps(4) forwards;
}
.row.dying::after { top: 55%; height: 18%; animation-direction: reverse; }
@keyframes glitch {
  0% { clip-path: inset(0 0 0 0); transform: none; opacity: 1; }
  20% { clip-path: inset(10% 0 55% 0); transform: translateX(-14px) skewX(12deg); filter: hue-rotate(80deg) saturate(3); }
  40% { clip-path: inset(60% 0 8% 0); transform: translateX(18px); }
  60% { clip-path: inset(25% 0 40% 0); transform: translateX(-8px) skewX(-20deg); filter: contrast(3) brightness(1.8); }
  80% { clip-path: inset(80% 0 0 0); transform: translateX(26px); opacity: 0.6; }
  100% { clip-path: inset(50% 0 50% 0); transform: translateX(-30px); opacity: 0; }
}
@keyframes tear { 0% { top: 0; } 50% { top: 70%; } 100% { top: 20%; opacity: 0; } }
.row.zap { animation: zap 0.45s steps(5); }
@keyframes zap { 30% { transform: translateX(6px) skewX(10deg); filter: hue-rotate(120deg) saturate(4); } 60% { transform: translateX(-5px); } }
.big-glitch { position: fixed; inset: 0; z-index: 60; pointer-events: none; animation: bigglitch 0.9s steps(8) forwards; background: repeating-linear-gradient(0deg, rgba(255, 59, 92, 0.25) 0 3px, rgba(127, 227, 255, 0.25) 3px 6px, transparent 6px 14px); }
@keyframes bigglitch { 0% { opacity: 1; transform: translateX(0); } 50% { transform: translateX(-30px) skewX(20deg); } 100% { opacity: 0; transform: translateX(40px); } }

/* ---------- composer ---------- */
.composer {
  display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line);
  background: linear-gradient(transparent, rgba(3, 10, 69, 0.55));
}
.composer textarea {
  flex: 1; resize: none; min-height: 40px; max-height: 140px; padding: 9px 12px; border-radius: 6px;
  background: rgba(2, 10, 60, 0.55); border: 1px solid var(--cyan-dim); color: #e8f7ff; font-weight: 300;
  unicode-bidi: plaintext;
}
.composer textarea::placeholder { color: rgba(181, 226, 255, 0.45); }
.chip {
  flex: none; height: 40px; min-width: 44px; padding: 0 9px; border-radius: 6px; border: 1px solid var(--cyan-dim);
  background: rgba(127, 227, 255, 0.07); color: var(--cyan); font-family: var(--font-mono); font-size: 0.72rem; direction: ltr;
}
.chip.on { background: var(--cyan); color: var(--tag-text); }
.chip.burn.on { background: var(--danger); color: #fff; border-color: var(--danger); }
.send { background: var(--cyan); color: var(--tag-text); border: 0; font-family: var(--font-caps); letter-spacing: 0.15em; padding: 0 14px; }
.replying { display: flex; gap: 8px; align-items: center; padding: 4px 14px; font-size: 0.75rem; opacity: 0.8; }

/* ---------- bottom bar ---------- */
.bottombar {
  display: flex; justify-content: space-around; align-items: center; padding: 10px 10px calc(10px + var(--safe-bottom));
  background: var(--bg-edge); border-top: 1px solid rgba(127, 227, 255, 0.12);
}
.bottombar .iconbtn { margin: 0; padding: 10px 18px; }
.bottombar .iconbtn.active { background: rgba(127, 227, 255, 0.12); }

/* ---------- lists, sheets, forms ---------- */
.scroll { flex: 1; overflow-y: auto; padding: 10px 16px 24px; }
.h1 { font-family: var(--font-caps); font-weight: 300; letter-spacing: 0.25em; font-size: 1.1rem; color: #eaf8ff; margin: 10px 0 14px; text-transform: uppercase; }
.h2 { font-family: var(--font-caps); font-weight: 500; letter-spacing: 0.18em; font-size: 0.8rem; color: var(--cyan); margin: 20px 0 8px; text-transform: uppercase; }
.card {
  background: var(--glass); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.roomitem { display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 8px; width: 100%; text-align: start; color: inherit; }
.roomitem .rn { font-family: var(--font-caps); font-weight: 500; letter-spacing: 0.24em; font-size: 1.05rem; color: #eaf8ff; direction: ltr; }
.roomitem .sub { font-size: 0.78rem; opacity: 0.7; }
.roomitem .grow { flex: 1; min-width: 0; }
.unread { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.badge { font-family: var(--font-mono); font-size: 0.68rem; padding: 2px 6px; border-radius: 3px; border: 1px solid var(--cyan-dim); direction: ltr; }
.badge.warn { border-color: var(--danger); color: var(--danger); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 6px;
  border: 1px solid var(--cyan-dim); background: rgba(127, 227, 255, 0.08); color: var(--cyan);
  font-family: var(--font-caps); letter-spacing: 0.14em; font-weight: 500; text-transform: uppercase; font-size: 0.85rem;
}
.btn.primary { background: var(--cyan); color: var(--tag-text); border-color: var(--cyan); }
.btn.danger { border-color: var(--danger); color: var(--danger); background: rgba(255, 59, 92, 0.08); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.4; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.field { display: block; margin: 10px 0; }
.field span { display: block; font-size: 0.78rem; opacity: 0.75; margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--cyan-dim);
  background: rgba(2, 10, 60, 0.6); color: #eaf8ff;
}
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.toggle .t { font-size: 0.92rem; }
.toggle .d { font-size: 0.74rem; opacity: 0.65; }
.switch { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 13px; background: rgba(127, 227, 255, 0.15); border: 1px solid var(--cyan-dim); position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 20px; height: 20px; border-radius: 50%; background: #cfefff; transition: inset-inline-start 0.15s; }
.switch:checked { background: var(--cyan); }
.switch:checked::after { inset-inline-start: 20px; background: var(--tag-text); }
.note { font-size: 0.78rem; opacity: 0.75; line-height: 1.5; }
.mono { font-family: var(--font-mono); font-size: 0.74rem; direction: ltr; overflow-wrap: anywhere; }
.err { color: var(--danger); font-size: 0.85rem; min-height: 1.2em; margin-top: 6px; }
.member { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.member .grow { flex: 1; min-width: 0; }
.member .pet { font-size: 0.82rem; opacity: 0.85; }
.member .role { font-family: var(--font-mono); font-size: 0.66rem; opacity: 0.7; }

.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(1, 5, 30, 0.6); display: flex; align-items: flex-end; justify-content: center; animation: fade 0.15s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--glass-strong); border-top: 1px solid var(--cyan-dim);
  border-radius: 14px 14px 0 0; padding: 16px 18px calc(22px + var(--safe-bottom));
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); animation: up 0.2s ease-out;
}
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet .close { float: left; }
.menu button { display: block; width: 100%; text-align: start; padding: 14px 6px; background: none; border: 0; border-bottom: 1px solid var(--line); color: #eaf8ff; }
.menu button.danger { color: var(--danger); }

.qr { display: block; margin: 10px auto; width: 220px; height: 220px; image-rendering: pixelated; background: #fff; border-radius: 6px; padding: 8px; }
.words { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; direction: ltr; margin: 10px 0; }
.words span { font-family: var(--font-mono); font-size: 0.85rem; text-align: center; padding: 6px 0; border: 1px solid var(--line); border-radius: 4px; background: rgba(2, 10, 60, 0.5); }
.scanner { position: relative; width: 100%; aspect-ratio: 1; background: #000; border-radius: 8px; overflow: hidden; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; inset: 18%; border: 2px solid var(--cyan); border-radius: 10px; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35); }

.knock {
  margin: 6px 12px; padding: 10px 12px; border: 1px solid var(--cyan); border-radius: 8px; background: rgba(127, 227, 255, 0.1);
  display: flex; align-items: center; gap: 10px;
}
.knock .grow { flex: 1; }
.alarm {
  position: fixed; inset: 0; z-index: 70; background: rgba(120, 0, 20, 0.92); display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 28px; text-align: center; color: #fff; animation: alarm 0.8s steps(2) 3;
}
.alarm h2 { font-family: var(--font-caps); letter-spacing: 0.2em; font-weight: 500; font-size: 1.4rem; margin: 0 0 12px; }
@keyframes alarm { 50% { background: rgba(255, 59, 92, 0.95); } }
.banner-warn { margin: 6px 12px; padding: 8px 12px; border: 1px solid var(--danger); color: #ffd0d8; border-radius: 6px; font-size: 0.8rem; background: rgba(255, 59, 92, 0.12); }

/* lock and install */
.center { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px; }
.biglogo { font-family: var(--font-caps); font-weight: 300; letter-spacing: 0.5em; font-size: 1.7rem; color: #eaf8ff; text-align: center; direction: ltr; text-shadow: 0 0 18px rgba(127, 227, 255, 0.6); margin-bottom: 6px; }
.tagline { text-align: center; font-size: 0.8rem; opacity: 0.7; margin-bottom: 26px; }
.step { display: flex; gap: 14px; align-items: center; margin: 14px 0; animation: rowin 0.5s both; }
.step:nth-child(2) { animation-delay: 0.25s; } .step:nth-child(3) { animation-delay: 0.5s; }
.step .n { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--tag); color: var(--tag-text); font-family: var(--font-caps); font-weight: 500; }

/* inspector */
.inspector .kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-family: var(--font-mono); font-size: 0.72rem; direction: ltr; }
.inspector .kv b { color: var(--cyan); font-weight: 400; }
.inspector .log { font-family: var(--font-mono); font-size: 0.66rem; direction: ltr; max-height: 34vh; overflow-y: auto; background: rgba(0, 0, 0, 0.3); padding: 8px; border-radius: 6px; white-space: pre; }
.tree { width: 100%; height: 170px; direction: ltr; }
.tree line { stroke: var(--cyan-dim); stroke-width: 1; }
.tree circle { fill: rgba(127, 227, 255, 0.15); stroke: var(--cyan); }
.tree rect { fill: var(--tag); }
.tree text { font-family: var(--font-caps); font-size: 10px; fill: var(--tag-text); text-anchor: middle; }
.tree .blank { fill: none; stroke-dasharray: 2 2; }

/* backgrounded: nothing readable in the app switcher snapshot */
.veil { position: fixed; inset: 0; z-index: 100; background: var(--bg-edge); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); display: grid; place-items: center; }
.veil .biglogo { opacity: 0.4; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 80; background: var(--glass-strong); border: 1px solid var(--cyan-dim); padding: 10px 16px; border-radius: 8px; font-size: 0.85rem; animation: up 0.2s; max-width: 90vw; text-align: center; }

/* reduce motion: no shards, no glitches, no log scroll */
.reduce-motion .shards, .reduce-motion .syslog { display: none; }
.reduce-motion .row, .reduce-motion .row.dying, .reduce-motion .row.zap, .reduce-motion .step, .reduce-motion .sheet { animation: none !important; }
.reduce-motion .row.dying { opacity: 0; transition: opacity 0.2s; }
.reduce-motion .big-glitch { display: none; }
@media (prefers-reduced-motion: reduce) {
  .shards, .syslog { display: none; }
  .row, .step, .sheet, .row.zap { animation: none !important; }
  .row.dying { animation: none !important; opacity: 0; }
  .big-glitch { display: none; }
}
