:root {
    --ink: #07051a;
    --ink-2: #0d0a2c;
    --text: #f6f3ff;
    --muted: rgba(246, 243, 255, 0.62);
    --lime: #c6ff3b;
    --pink: #ff3df2;
    --red: #ff2d55;
    --cyan: #22e1ff;
    --yellow: #ffe23b;
    --pulse: 0;
    --lvl: 0;
    --mx: 0;
    --my: 0;
    --hue: 0deg;
    --sat: 1.15;
    --con: 1;
    --bri: 1;
    --ground: 0px;
    --gray: 0;
    --sep: 0;
    color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--ink); }

body {
    margin: 0;
    min-height: 100svh;
    background: var(--ink);
    color: var(--text);
    font-family: Inter, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.locked { overflow: hidden; }

body.locked .world,
body.locked .mono,
body.locked .bands,
body.locked .stage,
body.locked .deck { visibility: hidden; }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

[hidden] { display: none !important; }

/* ---------- world (everything that recolours with the beat) ---------- */

.world {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    filter: grayscale(var(--gray)) sepia(var(--sep)) hue-rotate(var(--hue)) saturate(var(--sat)) contrast(var(--con)) brightness(var(--bri));
    will-change: filter;
}

/* colour script, switched per beat like the level: hard cuts between looks,
   smooth rainbow spin (S/M/C) inside them */
[data-look="B"] {
    --sat: 0;
    --con: 1.55;
    --bri: 0.62;
}

[data-look="R"] {
    --hue: -52deg;
    --gray: 1;
    --sep: 1;
    --sat: 2.6;
    --con: 1.05;
    --bri: 1.04;
}

.cam {
    position: absolute;
    inset: 0;
    will-change: transform;
}

.swarm {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.fog {
    position: absolute;
    top: 6%;
    left: 0;
    width: 72vw;
    height: 88%;
    background: radial-gradient(closest-side, rgba(8, 6, 26, 0.94) 0 52%, rgba(8, 6, 26, 0.7) 72%, transparent);
    transform: translate3d(110vw, 0, 0);
    pointer-events: none;
}

.fog svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.85; }

.beams i {
    position: absolute;
    top: -30%;
    left: 0;
    width: 16vw;
    height: 160%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3) 45%, rgba(255, 255, 255, 0.3) 55%, transparent);
    animation: sweep 9s linear infinite;
}

.beams i:nth-child(2) { width: 9vw; animation-duration: 6.5s; animation-delay: -3s; }
.beams i:nth-child(3) { width: 24vw; animation-duration: 13s; animation-delay: -8s; opacity: 0.6; }

.sky {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(55% 45% at 20% 16%, rgba(255, 255, 255, 0.78), transparent 62%),
        radial-gradient(65% 60% at 86% 88%, rgba(110, 0, 100, 0.55), transparent 72%),
        linear-gradient(165deg, #ff94e9 0%, #ff45d6 36%, #e11fc2 66%, #a3148e 100%);
}

.rays {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 240vmax;
    height: 240vmax;
    margin: -120vmax 0 0 -120vmax;
    background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.24) 0deg 6deg, transparent 6deg 20deg);
    -webkit-mask-image: radial-gradient(circle, #000 8%, transparent 46%);
    mask-image: radial-gradient(circle, #000 8%, transparent 46%);
    opacity: 0.45;
    animation: spin 80s linear infinite;
}

[data-mode="drop"] .rays { opacity: 0.75; }


.track {
    position: absolute;
    top: 0;
    left: 0;
    width: 200vw;
    height: 100%;
    animation: scroll var(--dur, 60s) linear infinite;
    transform-origin: 25% 50%;
}

.track.far {
    --dur: 64s;
    opacity: 0.9;
    translate: calc(var(--mx) * -10px) calc(var(--my) * -8px);
}

.track.near {
    --dur: 26s;
    translate: calc(var(--mx) * -26px) calc(var(--my) * -18px);
    scale: calc(1 + var(--pulse) * 0.025);
}

.m {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--w);
    height: var(--h);
    overflow: visible;
}

.m.spin { animation: spin var(--t, 14s) linear infinite; }
.m.spin.rev { animation-direction: reverse; }
.m.bob { animation: bob var(--t, 3.2s) ease-in-out infinite alternate; }
.m.blink { animation: blink var(--t, 4.6s) ease-in-out infinite; }
.m.throb { scale: calc(1 + var(--pulse) * 0.22); }
.m.glow { filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.55)); }
.m.faint { opacity: 0.3; }
.track.near .m:not(.blink) { scale: calc(1 + var(--pulse) * 0.16); }

.checker {
    --c: #ff6ad8;
    --cell: 2.6vmin;
    background: conic-gradient(#05040f 25%, var(--c) 0 50%, #05040f 0 75%, var(--c) 0) 0 0 / calc(var(--cell) * 2) calc(var(--cell) * 2);
    clip-path: polygon(0 100%, 0 26%, 18% 26%, 30% 0, 42% 26%, 58% 26%, 70% 0, 82% 26%, 100% 26%, 100% 100%);
    opacity: 0.92;
}

.checker.mono { --c: #ffffff; }
.checker.step { clip-path: polygon(0 100%, 0 60%, 25% 60%, 25% 30%, 50% 30%, 50% 0, 100% 0, 100% 100%); }

/* ---------- red/white layer that stays in colour during the black & white parts ---------- */

.mono {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.ecg {
    position: absolute;
    left: 0;
    top: 30vh;
    width: 100%;
    height: 16vh;
    overflow: visible;
    opacity: 0;
}

.ecg-line {
    fill: none;
    stroke: #ff1f3d;
    stroke-width: 3px;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 260 740;
    animation: ecg 2s linear infinite;
    filter: drop-shadow(0 0 4px rgba(255, 31, 61, 0.9));
}

[data-look="R"] .ecg,
[data-look="B"] .ecg { opacity: 1; }
[data-look="R"] .ecg-line { stroke: #8a0016; filter: none; }

.cry {
    position: absolute;
    left: 4vw;
    top: 7vh;
    margin: 0;
    font: 400 clamp(30px, 6.4vw, 92px) / 1 Oswald, "Arial Narrow", sans-serif;
    letter-spacing: -0.01em;
    white-space: nowrap;
    color: #fff;
    transform: scaleY(1.5);
    transform-origin: 0 0;
    text-shadow: 3px 0 0 rgba(255, 0, 60, 0.75), -3px 0 0 rgba(0, 255, 255, 0.6);
    opacity: 0.16;
}

[data-look="B"] .cry { opacity: 0.96; }

.bands {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.bands i {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--y, 40%);
    height: var(--h, 4%);
    -webkit-backdrop-filter: hue-rotate(170deg) saturate(2.6) contrast(1.3);
    backdrop-filter: hue-rotate(170deg) saturate(2.6) contrast(1.3);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    opacity: 0;
}

.bands i.on { opacity: 1; }

/* ---------- profile card ---------- */

.stage {
    position: relative;
    z-index: 3;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 28px 16px calc(var(--ground) + 24px);
}

.card {
    position: relative;
    width: min(400px, 100%);
    padding: 26px 24px 14px;
    text-align: center;
    background: rgba(6, 4, 22, 0.76);
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 22px;
    box-shadow:
        -4px 0 0 rgba(255, 45, 85, 0.85),
        4px 0 0 rgba(34, 225, 255, 0.85),
        0 0 0 7px rgba(7, 5, 26, 0.45),
        0 30px 80px rgba(0, 0, 0, 0.55);
}

.card::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: inherit;
    box-shadow: 0 0 46px 8px rgba(255, 61, 242, 0.9);
    opacity: calc(var(--pulse) * 0.7);
    pointer-events: none;
}

.card.jolt { animation: jolt 0.2s steps(3) both; }

.avatar-wrap {
    position: relative;
    width: 124px;
    height: 124px;
    margin: 0 auto;
    padding: 6px;
    border-radius: 50%;
}

.avatar-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(#ff2d55, #ff8a1c, #ffe23b, #3dff73, #22e1ff, #4d63ff, #c04dff, #ff2d55);
    animation: spin 6s linear infinite;
}

.avatar {
    position: relative;
    display: block;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    border: 4px solid var(--ink);
    background: #1b1645;
    object-fit: cover;
}

.status-dot {
    position: absolute;
    right: 6px;
    bottom: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 4px solid var(--ink);
    background: #6b6880;
}

.status-dot.online { background: #3dff73; }
.status-dot.idle { background: #ffd23b; }
.status-dot.dnd { background: var(--red); }

.name {
    margin: 14px 0 0;
    font: 700 64px / 1 Oswald, "Arial Narrow", sans-serif;
    letter-spacing: 0.02em;
    text-shadow: -3px 0 0 var(--red), 3px 0 0 var(--cyan);
    overflow-wrap: anywhere;
}

.glitch { position: relative; display: inline-block; }

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
    text-shadow: none;
}

.glitch::before {
    color: var(--cyan);
    clip-path: inset(0 0 100% 0);
    animation: slice-a 3.4s steps(1) infinite;
}

.glitch::after {
    color: var(--pink);
    clip-path: inset(100% 0 0 0);
    animation: slice-b 2.9s steps(1) infinite;
}

.handle {
    margin: 6px 0 0;
    font: 400 24px / 1 VT323, ui-monospace, monospace;
    color: var(--lime);
}

.presence { margin: 10px 0 0; }

.state {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 12px 4px;
    font: 400 20px / 1 VT323, ui-monospace, monospace;
    letter-spacing: 0.04em;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
}

.state::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.state.online { color: #3dff73; }
.state.idle { color: #ffd23b; }
.state.dnd { color: #ff5a78; }
.state.offline { color: #a9a6c0; }

.bio {
    margin: 10px auto 0;
    max-width: 32ch;
    font-size: 14px;
    line-height: 1.45;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 20px 0 16px;
}

.btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    font: 600 15px / 1 Oswald, "Arial Narrow", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: #fff;
    background: #0d0a2c;
    border: 2px solid #fff;
    border-radius: 10px;
    box-shadow: 0 4px 0 #000;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover {
    transform: translateY(-2px);
    background: var(--pink);
    box-shadow: 0 6px 0 #000;
}

.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #000; }

.btn.primary { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.btn.primary:hover { background: #fff; border-color: #fff; }
.btn.ghost { border-style: dashed; }
.btn.copied { background: #3dff73; border-color: #3dff73; color: var(--ink); }

.btn:focus-visible,
.deck-btn:focus-visible,
.vol:focus-visible,
.bot-links a:focus-visible,
.gate:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 3px;
}

.bot {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    text-align: left;
    border: 2px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.bot-av {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 12px;
    background: #1b1645;
}

.bot-id { display: grid; gap: 2px; min-width: 0; flex: 1; }
.bot-id strong { font-size: 15px; }
.bot-id span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ping {
    font: 400 20px / 1 VT323, ui-monospace, monospace;
    color: var(--lime);
}

.bot-links {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--muted);
}

.bot-links a { color: #9fe8ff; text-decoration: none; }
.bot-links a:hover { text-decoration: underline; }

.radio { margin-top: 14px; text-align: left; }

.radio h2 {
    margin: 0 0 6px;
    font: 400 18px / 1 VT323, ui-monospace, monospace;
    letter-spacing: 0.08em;
    color: var(--pink);
}

.radio-item {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border-left: 3px solid var(--pink);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 0 10px 10px 0;
}

.radio-item + .radio-item { margin-top: 6px; }
.radio-item strong { font-size: 14px; overflow-wrap: anywhere; }
.radio-item span { font-size: 12px; color: var(--muted); }

.card-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.22);
    font: 400 17px / 1 VT323, ui-monospace, monospace;
    color: var(--muted);
}

.card-foot time { color: var(--text); }

/* ---------- music deck ---------- */

.deck {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 5;
    width: 224px;
    padding: 10px 12px 12px;
    background: rgba(6, 4, 22, 0.88);
    border: 2px solid #fff;
    border-radius: 14px;
    box-shadow: -3px 0 0 rgba(255, 45, 85, 0.85), 3px 0 0 rgba(34, 225, 255, 0.85);
}

.deck-top { display: flex; align-items: center; gap: 10px; min-width: 0; }

.deck-title {
    font: 400 19px / 1 VT323, ui-monospace, monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 18px; flex: none; }

.eq i {
    width: 4px;
    height: calc(3px + 15px * var(--pulse) * var(--k, 1));
    background: var(--lime);
    border-radius: 1px;
}

.eq i:nth-child(2) { --k: 0.6; background: var(--cyan); }
.eq i:nth-child(3) { --k: 0.85; background: var(--pink); }
.eq i:nth-child(4) { --k: 0.45; background: var(--yellow); }
.eq i:nth-child(5) { --k: 0.7; background: var(--red); }

.deck.silent .eq i { height: 3px; }

.deck-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }

.deck-btn {
    appearance: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: none;
    padding: 0;
    color: #fff;
    background: #0d0a2c;
    border: 2px solid #fff;
    border-radius: 10px;
    cursor: pointer;
}

.deck-btn:hover { background: var(--pink); }
.deck-btn .ic { width: 20px; height: 20px; }
.deck-btn .ic-off { display: none; }
.deck-btn[aria-pressed="true"] .ic-on { display: none; }
.deck-btn[aria-pressed="true"] .ic-off { display: block; }

.vol {
    --fill: 40%;
    appearance: none;
    -webkit-appearance: none;
    flex: 1;
    min-width: 0;
    height: 6px;
    margin: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--lime) var(--fill), rgba(255, 255, 255, 0.22) 0);
    cursor: pointer;
}

.vol::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--ink);
}

.vol::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--ink);
}

.deck-note {
    margin: 8px 0 0;
    font: 400 16px / 1.1 VT323, ui-monospace, monospace;
    color: var(--yellow);
}

.yt-host {
    position: fixed;
    left: -420px;
    top: 0;
    width: 200px;
    height: 200px;
    overflow: hidden;
    pointer-events: none;
}

/* ---------- screen effects ---------- */

.fx {
    position: fixed;
    inset: 0;
    z-index: 8;
    pointer-events: none;
    overflow: hidden;
}

.scan {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0 1px, transparent 1px 3px);
    opacity: 0.55;
}

.noise {
    position: absolute;
    inset: -50%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.07;
    animation: grain 0.9s steps(5) infinite;
}

.lens {
    position: absolute;
    inset: 0;
    background: radial-gradient(125% 100% at 50% 50%, transparent 56%, rgba(0, 0, 0, 0.5) 82%, rgba(0, 0, 0, 0.85) 100%);
}

.lens::before,
.lens::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 14vh;
    transform: scaleY(0);
    transition: transform 0.5s ease;
}

.lens::before {
    top: 0;
    transform-origin: top;
    background: radial-gradient(60% 92% at 50% 100%, transparent 98.5%, #000 100%);
}

.lens::after {
    bottom: 0;
    transform-origin: bottom;
    background: radial-gradient(60% 92% at 50% 0%, transparent 98.5%, #000 100%);
}

/* lens bulge right after every cut */
.warp .lens::before,
.warp .lens::after { transform: scaleY(1); }

.shock {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 22vmin;
    height: 22vmin;
    margin: -11vmin 0 0 -11vmin;
    border-radius: 50%;
    border: 1vmin solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 3vmin rgba(255, 255, 255, 0.7), inset 0 0 3vmin rgba(255, 255, 255, 0.5);
    opacity: 0;
}

.flash {
    position: absolute;
    inset: 0;
    background: #fff;
    opacity: 0;
}


/* ---------- click-to-enter gate ---------- */

.gate {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 6px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    background:
        radial-gradient(55% 45% at 20% 16%, rgba(255, 255, 255, 0.5), transparent 62%),
        linear-gradient(165deg, #ff94e9 0%, #ff45d6 36%, #e11fc2 66%, #a3148e 100%);
    transition: opacity 0.6s ease, transform 0.6s ease;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.gate::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.25) 0 1px, transparent 1px 3px);
    pointer-events: none;
}

body:not(.locked) .gate {
    opacity: 0;
    transform: scale(1.25);
    pointer-events: none;
}

.gate-wheel {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.gate-kyo {
    position: relative;
    margin: 0;
    font: 700 clamp(84px, 18vmin, 170px) / 1 Oswald, "Arial Narrow", sans-serif;
    letter-spacing: 0.02em;
    text-shadow: -4px 0 0 var(--red), 4px 0 0 var(--cyan), 0 6px 24px rgba(0, 0, 0, 0.55);
}

.gate-cta {
    position: relative;
    margin: 6px 0 0;
    font: 400 28px / 1 VT323, ui-monospace, monospace;
    letter-spacing: 0.06em;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
}

.caret { color: var(--lime); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6); animation: caret 1s steps(1) infinite; }

.gate-sub {
    position: relative;
    margin: 0;
    font: 400 19px / 1 VT323, ui-monospace, monospace;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
}

/* ---------- keyframes ---------- */

@keyframes spin { to { rotate: 360deg; } }
@keyframes scroll { to { transform: translate3d(-100vw, 0, 0); } }
@keyframes sweep { from { transform: translate3d(-40vw, 0, 0) skewX(-24deg); } to { transform: translate3d(140vw, 0, 0) skewX(-24deg); } }
@keyframes ecg { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
@keyframes bob { from { translate: 0 -7%; } to { translate: 0 7%; } }
@keyframes blink { 0%, 90%, 100% { scale: 1 1; } 94% { scale: 1 0.08; } }
@keyframes caret { 50% { opacity: 0; } }
@keyframes grain {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-7%, 4%); }
    40% { transform: translate(5%, -6%); }
    60% { transform: translate(-3%, 8%); }
    80% { transform: translate(8%, -2%); }
}
@keyframes jolt {
    0% { translate: -5px 0; }
    33% { translate: 6px 1px; }
    66% { translate: -2px -1px; }
    100% { translate: 0 0; }
}
@keyframes slice-a {
    0%, 100% { clip-path: inset(0 0 100% 0); translate: 0 0; }
    6% { clip-path: inset(10% 0 62% 0); translate: -6px 0; }
    9% { clip-path: inset(58% 0 20% 0); translate: 5px 0; }
    12% { clip-path: inset(0 0 100% 0); translate: 0 0; }
    61% { clip-path: inset(34% 0 44% 0); translate: 7px 0; }
    64% { clip-path: inset(0 0 100% 0); translate: 0 0; }
}
@keyframes slice-b {
    0%, 100% { clip-path: inset(100% 0 0 0); translate: 0 0; }
    18% { clip-path: inset(70% 0 8% 0); translate: 6px 0; }
    21% { clip-path: inset(22% 0 60% 0); translate: -7px 0; }
    24% { clip-path: inset(100% 0 0 0); translate: 0 0; }
    80% { clip-path: inset(46% 0 30% 0); translate: -5px 0; }
    83% { clip-path: inset(100% 0 0 0); translate: 0 0; }
}

/* ---------- small screens ---------- */

@media (max-width: 700px) {

    .stage { padding: 20px 16px calc(var(--ground) + 84px); }
    .card { padding: 22px 16px 12px; background: rgba(6, 4, 22, 0.62); }
    .card .name,
    .card .handle,
    .card .bio,
    .card .bot-links,
    .card .card-foot { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }
    .card .name { text-shadow: -3px 0 0 var(--red), 3px 0 0 var(--cyan), 0 2px 6px rgba(0, 0, 0, 0.9); }
    .bot { background: rgba(6, 4, 22, 0.55); }
    .name { font-size: 54px; }

    .deck {
        left: 50%;
        right: auto;
        bottom: 12px;
        translate: -50% 0;
        width: min(calc(100vw - 32px), 360px);
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 10px;
    }

    .deck-top { flex: 1; }
    .deck-row { margin: 0; flex: 1.1; }
    .deck-note { display: none; }
}

@media (max-height: 640px) and (min-width: 701px) {
    .avatar-wrap { width: 100px; height: 100px; }
    .avatar { width: 88px; height: 88px; }
    .name { font-size: 50px; margin-top: 8px; }
    .links { margin: 14px 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .rays,
    .track,
    .m,
    .noise,
    .beams i,
    .ecg-line,
    .avatar-wrap::before,
    .glitch::before,
    .glitch::after,
    .caret { animation: none !important; }

    .track.near,
    .m.throb { scale: none; }

    .card::before { opacity: 0; }
    .gate { transition: opacity 0.3s ease; }
    body:not(.locked) .gate { transform: none; }
}
