@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-greek.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #060606;
  --red: #8a2f2f;
  --red-bright: #c23a3a;
  --red-soft: #a83a3a;
  --red-dim: #5c2020;
  --red-glow: rgba(190, 50, 50, .55);
  --text: #d8d4d4;
  --text-dim: #8f8787;
  --muted: #5e5656;
  --line: rgba(138, 47, 47, .22);
  --line-strong: rgba(160, 55, 55, .48);
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, "SFMono-Regular", ui-monospace, monospace;
}

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(1100px 720px at 50% -10%, rgba(80, 16, 16, .20), transparent 60%),
    radial-gradient(900px 680px at 50% 110%, rgba(50, 10, 10, .18), transparent 62%),
    var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #1c1c1c; color: #d24a4a; }

* { scrollbar-width: thin; scrollbar-color: #3a1616 #060606; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: #060606; }
*::-webkit-scrollbar-thumb { background: #3a1616; border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: #5c2020; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

#rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: .5;
  pointer-events: none;
  transition: opacity .5s ease;
}
body.matrix #rain { opacity: .85; }

.fx-glow {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 50% 6%, rgba(140, 30, 30, .16), transparent 65%),
    radial-gradient(760px 520px at 50% 106%, rgba(90, 20, 20, .14), transparent 65%);
}

.fx-vignette {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(125% 105% at 50% 50%, transparent 52%, rgba(0, 0, 0, .88) 100%);
}

.fx-scanlines {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, .38) 3px,
    rgba(0, 0, 0, .38) 4px
  );
  opacity: .32;
  mix-blend-mode: multiply;
  animation: scanFlicker 8s linear infinite;
}

body.booting { overflow: hidden; }

.boot {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  padding: clamp(22px, 6vw, 64px);
  background:
    radial-gradient(700px 500px at 50% 0%, rgba(90, 18, 18, .18), transparent 65%),
    #060606;
  opacity: 1;
  transition: opacity .42s ease, visibility .42s ease;
  animation: bootAutoHide .4s 9s forwards;
}
.boot.done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot[hidden] { display: none; }

.boot-inner { width: min(640px, 100%); }

.boot-log {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: clamp(10.5px, 1.5vw, 13px);
  line-height: 1.85;
  color: var(--text-dim);
  text-shadow: 0 0 10px rgba(170, 45, 45, .28);
}
.boot-log::after {
  content: "\258B";
  margin-left: 2px;
  color: var(--red-bright);
  text-shadow: 0 0 8px var(--red-glow);
  animation: blink 1s steps(1) infinite;
}

.boot-skip {
  margin-top: clamp(20px, 5vh, 42px);
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  user-select: none;
  animation: pulse 2.8s ease-in-out infinite;
}

.stage {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.5vh, 16px);
  padding: clamp(34px, 4.5vh, 56px) 18px;
  text-align: center;
}

.hud-top {
  position: fixed;
  top: 16px;
  left: 20px;
  z-index: 5;
  display: flex;
  align-items: baseline;
  gap: 1px;
  font-size: 11px;
  letter-spacing: .05em;
  color: var(--muted);
  user-select: none;
  pointer-events: none;
}
.hud-prompt { color: var(--red-soft); }
.hud-sep { color: var(--red-dim); }
.hud-path { color: var(--text-dim); }
.hud-cmd { color: var(--muted); margin-left: 1px; }

.avatar-wrap {
  position: relative;
  width: clamp(92px, 13vw, 116px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  flex: none;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 1;
  filter: grayscale(.22) contrast(1.06) brightness(.95) saturate(.92);
  border: 1px solid var(--line-strong);
  box-shadow:
    0 0 0 4px rgba(6, 6, 6, .65),
    0 0 30px rgba(160, 40, 40, .35),
    inset 0 0 22px rgba(0, 0, 0, .55);
  transition: filter .35s ease, box-shadow .35s ease;
}
.avatar-wrap:hover .avatar {
  filter: grayscale(0) contrast(1.04) brightness(1) saturate(1.05);
  box-shadow:
    0 0 0 4px rgba(6, 6, 6, .65),
    0 0 42px rgba(190, 50, 50, .5),
    inset 0 0 22px rgba(0, 0, 0, .45);
}

.avatar-ring {
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1px dashed rgba(160, 55, 55, .55);
  z-index: 0;
  animation: spin 26s linear infinite;
}
.avatar-ring::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(138, 47, 47, .16);
}

.avatar-status {
  position: absolute;
  right: 5%;
  bottom: 5%;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #2ea043;
  border: 2px solid #060606;
  box-shadow: 0 0 10px rgba(46, 160, 67, .85);
  z-index: 2;
  animation: pulse 2.4s ease-in-out infinite;
}

.name-wrap {
  position: relative;
  width: min(920px, 94vw);
  max-width: 100%;
  display: flex;
  justify-content: center;
}

.ascii-name {
  margin: 0;
  width: 100%;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--red-soft);
  text-shadow:
    0 0 14px rgba(170, 45, 45, .45),
    0 0 2px rgba(255, 90, 90, .22);
  white-space: pre;
  line-height: 1;
  letter-spacing: 0;
  user-select: none;
  overflow: hidden;
  animation: nameGlitch 9s steps(1, end) infinite;
  will-change: transform;
}

.name-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(100deg, transparent 42%, rgba(255, 70, 70, .13) 50%, transparent 58%);
  background-size: 220% 100%;
  animation: scanX 5.5s linear infinite;
  mix-blend-mode: screen;
}

.bio {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .55ch;
  min-height: 1.5em;
  font-size: clamp(12px, 1.5vw, 14px);
  letter-spacing: .02em;
  color: var(--text-dim);
}
.bio-prompt { color: var(--red-soft); }
.bio-text { color: var(--text-dim); }

.caret {
  display: inline-block;
  width: .62ch;
  height: 1.05em;
  margin-left: 2px;
  background: var(--red-soft);
  box-shadow: 0 0 8px var(--red-glow);
  transform: translateY(1px);
  animation: blink 1.05s steps(1) infinite;
}

.links-label {
  width: min(430px, 92vw);
  margin: 0 0 -6px;
  text-align: left;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  user-select: none;
}
.links-label .hash { color: var(--red-dim); }

.links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(430px, 92vw);
}

.link {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  font-family: inherit;
  font-size: clamp(12.5px, 1.5vw, 14px);
  color: var(--text);
  text-align: left;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .018), rgba(255, 255, 255, .006));
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease,
    color .18s ease;
}
.link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--red-bright);
  opacity: 0;
  transition: opacity .18s ease;
}
.link:hover {
  transform: translateX(4px);
  border-color: var(--line-strong);
  background: linear-gradient(90deg, rgba(138, 47, 47, .16), rgba(138, 47, 47, .04));
  box-shadow: 0 0 24px rgba(150, 40, 40, .18), inset 0 0 18px rgba(120, 30, 30, .12);
  color: #fff;
}
.link:hover::before { opacity: 1; }
.link:active { transform: translateX(2px) scale(.995); }
.link:focus-visible { outline: 1px solid var(--red-bright); outline-offset: 3px; }

.link-idx { font-size: .8em; color: var(--red-dim); transition: color .18s ease; }
.link:hover .link-idx { color: var(--red-soft); }

.link-label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  letter-spacing: .04em;
  color: var(--text);
}

.link-ico {
  width: 16px;
  height: 16px;
  flex: none;
  opacity: .82;
  transition: opacity .18s ease, filter .18s ease;
}
.link:hover .link-ico {
  opacity: 1;
  filter: brightness(1.35) drop-shadow(0 0 3px rgba(190, 50, 50, .55));
}

.link-handle {
  justify-self: end;
  font-size: .86em;
  color: var(--muted);
  letter-spacing: .02em;
  white-space: nowrap;
  transition: color .18s ease;
}
.link:hover .link-handle { color: var(--red-soft); }

.link-arrow {
  width: 14px;
  height: 14px;
  flex: none;
  opacity: .8;
  transition: transform .2s ease, opacity .2s ease, filter .2s ease;
}
.link:hover .link-arrow {
  transform: translate(2px, -2px);
  opacity: 1;
  filter: brightness(1.5) drop-shadow(0 0 4px rgba(190, 50, 50, .6));
}

.link.copied .link-handle { color: #57d06a; }

.player {
  width: min(430px, 92vw);
  margin-top: clamp(2px, .6vh, 8px);
  padding: 12px 14px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .018), rgba(0, 0, 0, .14));
  text-align: left;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.player:hover {
  border-color: var(--line-strong);
  box-shadow: 0 0 24px rgba(150, 40, 40, .12);
}
.player.playing {
  border-color: rgba(160, 55, 55, .4);
  box-shadow: 0 0 32px rgba(160, 40, 40, .15);
}

.player-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  font-size: 10.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.player-icon { width: 13px; height: 13px; flex: none; opacity: .9; }
.player-track {
  margin-left: auto;
  max-width: 62%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--text-dim);
}

.player-body { display: flex; align-items: center; gap: 12px; }

.player-btn {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-family: inherit;
  font-size: 12px;
  line-height: 1;
  color: var(--red-soft);
  background: rgba(138, 47, 47, .08);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .12s ease;
}
.player-btn:hover {
  background: rgba(138, 47, 47, .2);
  color: #fff;
  box-shadow: 0 0 18px rgba(160, 40, 40, .3);
}
.player-btn:active { transform: scale(.95); }
.player-btn:focus-visible { outline: 1px solid var(--red-bright); outline-offset: 3px; }
.player-btn .ico-play,
.player-btn .ico-pause { width: 14px; height: 14px; }
.player-btn .ico-pause { display: none; }
.player.playing .player-btn .ico-play { display: none; }
.player.playing .player-btn .ico-pause { display: block; }
.player-btn[disabled] { opacity: .35; cursor: not-allowed; }

.player-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }

.player-bar {
  position: relative;
  height: 4px;
  border-radius: 99px;
  background: rgba(138, 47, 47, .2);
  cursor: pointer;
  touch-action: none;
}
.player-bar:focus-visible { outline: 1px solid var(--red-bright); outline-offset: 4px; }
.player-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--red), var(--red-bright));
  box-shadow: 0 0 10px rgba(190, 50, 50, .55);
}
.player-knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  border-radius: 50%;
  background: var(--red-bright);
  box-shadow: 0 0 8px var(--red-glow);
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}
.player-bar:hover .player-knob,
.player-bar:focus-visible .player-knob { opacity: 1; }

.player-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  letter-spacing: .05em;
  color: var(--muted);
}
.player-time { font-variant-numeric: tabular-nums; color: var(--text-dim); }

.player-eq {
  position: relative;
  display: block;
  width: calc(100% + 4px);
  height: 50px;
  margin: 8px -2px 0;
  padding: 5px 0 0;
  font-family: inherit;
  text-align: left;
  color: inherit;
  background: none;
  border: 0;
  border-top: 1px solid rgba(138, 47, 47, .13);
  border-radius: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.player-eq:focus-visible { outline: 1px solid var(--red-bright); outline-offset: 3px; }
.player-eq canvas { display: block; width: 100%; height: 100%; }
.player-eq::after {
  content: "";
  position: absolute;
  inset: 5px 0 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px);
  opacity: .5;
}
.eq-tag {
  position: absolute;
  top: 4px;
  right: 2px;
  z-index: 1;
  font-size: 7.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--red-soft);
  opacity: .38;
  pointer-events: none;
  user-select: none;
}
.eq-tag::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 1px;
  opacity: .7;
}
.player.playing .eq-tag { color: var(--red-bright); opacity: .8; }
.player.playing .eq-tag::before { animation: pulse 1.8s ease-in-out infinite; }
.player:not(.playing) .player-eq { opacity: .62; }
.player.no-track .player-eq { opacity: .3; }

.term {
  width: min(430px, 92vw);
  margin-top: clamp(2px, .6vh, 8px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(4, 4, 4, .74);
  text-align: left;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.term:focus-within {
  border-color: var(--line-strong);
  box-shadow: 0 0 28px rgba(150, 40, 40, .16);
}

.term-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(138, 47, 47, .12), rgba(0, 0, 0, .22));
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  user-select: none;
}
.term-dots { display: flex; gap: 4px; flex: none; }
.term-dots i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red-dim);
}
.term-dots i:nth-child(1) { background: #5c2020; }
.term-dots i:nth-child(2) { background: #7a2a2a; }
.term-dots i:nth-child(3) { background: var(--red-soft); }
.term-title { color: var(--text-dim); letter-spacing: .03em; text-transform: none; }
.term-badge { margin-left: auto; color: var(--red-dim); }

.term-log {
  height: 90px;
  padding: 10px 12px 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: 11px;
  line-height: 1.62;
  color: var(--text-dim);
  scrollbar-width: thin;
  scrollbar-color: #3a1616 transparent;
}
.term-log::-webkit-scrollbar { width: 6px; }
.term-log::-webkit-scrollbar-track { background: transparent; }
.term-log::-webkit-scrollbar-thumb { background: #3a1616; border-radius: 6px; }

.term-line { white-space: pre-wrap; word-break: break-word; }
.term-line.greet { color: var(--red-soft); }
.term-line.cmd { color: var(--text); }
.term-line.cmd .term-sigil { color: var(--red-soft); }
.term-line.dim { color: var(--muted); }
.term-line.err { color: #b65454; }
.term-line.ok { color: #6fae7a; }

.term-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 1px 14px;
  margin: 1px 0;
}
.term-grid > span:nth-child(odd) { color: var(--red-soft); }
.term-grid > span:nth-child(even) { color: var(--muted); }

.term-a,
.term-copy {
  font: inherit;
  color: var(--red-soft);
  text-decoration: none;
  background: none;
  border: 0;
  border-bottom: 1px dotted rgba(168, 58, 58, .55);
  padding: 0;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.term-a:hover,
.term-copy:hover { color: var(--red-bright); border-bottom-color: var(--red-bright); }
.term-a:focus-visible,
.term-copy:focus-visible { outline: 1px solid var(--red-bright); outline-offset: 2px; }

.term-form {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 1px 12px 9px;
}
.term-prompt {
  flex: none;
  font-size: 11px;
  letter-spacing: .01em;
  color: var(--red-soft);
  user-select: none;
}
.term-input {
  flex: 1;
  min-width: 0;
  padding: 0;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: .02em;
  color: var(--text);
  caret-color: var(--red-bright);
  background: transparent;
  border: 0;
  outline: none;
}
.term-input::placeholder { color: var(--muted); opacity: .7; }
.term:focus-within .term-prompt { color: var(--red-bright); }

.term-chips {
  display: flex;
  gap: 6px;
  padding: 8px 12px 10px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  scrollbar-width: none;
}
.term-chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 3px 8px 4px;
  font-family: inherit;
  font-size: 9.5px;
  letter-spacing: .07em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.chip:hover {
  color: var(--red-soft);
  border-color: var(--line-strong);
  background: rgba(138, 47, 47, .12);
}
.chip:active { transform: translateY(1px); }
.chip:focus-visible { outline: 1px solid var(--red-bright); outline-offset: 2px; }

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 11px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  user-select: none;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red-bright);
  box-shadow: 0 0 10px var(--red-glow);
  animation: pulse 2s ease-in-out infinite;
}
.status-div { color: var(--red-dim); }
.status-clock { color: var(--text-dim); font-variant-numeric: tabular-nums; letter-spacing: .06em; }

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes bootAutoHide { to { opacity: 0; visibility: hidden; } }

@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.8); }
}

@keyframes scanX {
  0% { background-position: 130% 0; }
  100% { background-position: -130% 0; }
}

@keyframes scanFlicker {
  0%, 100% { opacity: .30; }
  48% { opacity: .30; }
  50% { opacity: .40; }
  52% { opacity: .30; }
}

@keyframes nameGlitch {
  0%, 90%, 100% {
    transform: none;
    text-shadow: 0 0 14px rgba(170, 45, 45, .45), 0 0 2px rgba(255, 90, 90, .22);
  }
  91% {
    transform: translate(-2px, 1px) skewX(-1.5deg);
    text-shadow: 2px 0 rgba(70, 15, 15, .85), -2px 0 rgba(190, 50, 50, .5), 0 0 20px rgba(190, 50, 50, .7);
  }
  92% { transform: translate(2px, -1px); }
  93% { transform: translate(-1px, 0) skewX(1deg); }
  94% { transform: none; }
}

@media (max-width: 560px) {
  .hud-top { font-size: 9.5px; left: 12px; top: 12px; }
  .stage { padding: 68px 14px 44px; gap: 16px; }
  .links, .links-label, .player, .term { width: min(400px, 90vw); }
  .link { padding: 12px 13px; gap: 10px; }
  .link-handle { font-size: .82em; }
  .avatar-ring { inset: -7px; }
  .player { padding: 11px 12px 8px; }
  .player-btn { width: 38px; height: 38px; }
  .player-eq { height: 46px; }
  .term-log { height: 100px; font-size: 10.5px; }
  .term-form { padding-bottom: 8px; }
  .term-prompt, .term-input { font-size: 10.5px; }
  .boot { padding: 22px 18px; }
  .boot-log { font-size: 10px; line-height: 1.8; }
}

@media (prefers-reduced-motion: reduce) {
  .ascii-name,
  .name-scan,
  .fx-scanlines,
  .avatar-ring,
  .avatar-status,
  .status-dot,
  .caret {
    animation: none !important;
  }
  .caret { opacity: 1; }
}
