:root {
    --bg: #0a0a0a;
    --crypt: #0f2c1f;
    --crypt-soft: #173d2b;
    --glow: #4ade80;
    --glow-soft: rgba(74, 222, 128, 0.24);
    --crimson: #8b1e2f;
    --gold: #d4af77;
    --gold-soft: rgba(212, 175, 119, 0.22);
    --text: #f7f1e8;
    --muted: rgba(247, 241, 232, 0.72);
    --panel: rgba(8, 10, 9, 0.56);
    --panel-strong: rgba(9, 12, 10, 0.82);
    --border: rgba(212, 175, 119, 0.18);
    --shadow: 0 30px 100px rgba(0, 0, 0, 0.56);
    --footer-height: 56px;
    --top-safe: max(1rem, env(safe-area-inset-top));
    --right-safe: max(1rem, env(safe-area-inset-right));
    --bottom-safe: max(1rem, env(safe-area-inset-bottom));
    --left-safe: max(1rem, env(safe-area-inset-left));
    --app-height: 100vh;
    --pointer-x: 50;
    --pointer-y: 50;
    --font-display: "Cinzel", Georgia, serif;
    --font-body: "Inter", Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow-x: hidden;
}

body {
    min-height: var(--app-height);
    position: relative;
    font-family: var(--font-body);
    color: var(--text);
    background:
        radial-gradient(circle at top, rgba(15, 44, 31, 0.35), transparent 42%),
        linear-gradient(180deg, #050505 0%, #0a0a0a 100%);
    isolation: isolate;
    overscroll-behavior: none;
    overflow-y: hidden;
}

a,
button,
input {
    font: inherit;
}

button {
    border: 0;
    background: transparent;
}

a,
button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

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

.video-background {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -5;
    filter: brightness(0.5) contrast(1.1) saturate(0.88);
    transform: scale(1.03);
}

.top-controls {
    position: fixed;
    top: calc(var(--top-safe) + 0.4rem);
    right: var(--right-safe);
    z-index: 24;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.8rem;
    pointer-events: none;
}

.top-controls > * {
    pointer-events: auto;
}

.overlay,
.atmosphere {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.overlay {
    z-index: -4;
    background:
        radial-gradient(circle at calc(var(--pointer-x) * 1%) calc(var(--pointer-y) * 1%), rgba(74, 222, 128, 0.18) 0%, rgba(74, 222, 128, 0.06) 16%, transparent 34%),
        linear-gradient(180deg, rgba(2, 4, 3, 0.12) 0%, rgba(4, 4, 4, 0.48) 52%, rgba(2, 2, 2, 0.88) 100%);
}

.atmosphere--vignette {
    z-index: -3;
    background:
        radial-gradient(circle at center, transparent 22%, rgba(0, 0, 0, 0.16) 50%, rgba(0, 0, 0, 0.78) 100%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.56) 0%, transparent 18%, transparent 82%, rgba(0, 0, 0, 0.52) 100%);
}

.atmosphere--fog {
    z-index: -2;
    opacity: 0.72;
    filter: blur(20px);
}

.atmosphere--fog-a {
    background:
        radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.14) 0%, transparent 28%),
        radial-gradient(circle at 78% 34%, rgba(74, 222, 128, 0.16) 0%, transparent 24%),
        radial-gradient(circle at 48% 82%, rgba(212, 175, 119, 0.12) 0%, transparent 30%);
    animation: fogDriftA 28s ease-in-out infinite alternate;
}

.atmosphere--fog-b {
    background:
        radial-gradient(circle at 74% 48%, rgba(255, 255, 255, 0.12) 0%, transparent 26%),
        radial-gradient(circle at 20% 70%, rgba(74, 222, 128, 0.14) 0%, transparent 24%),
        radial-gradient(circle at 56% 18%, rgba(139, 30, 47, 0.14) 0%, transparent 22%);
    opacity: 0.54;
    animation: fogDriftB 34s ease-in-out infinite alternate;
}

.atmosphere--particles {
    z-index: -1;
    opacity: 0.45;
    background-image:
        radial-gradient(circle, rgba(212, 175, 119, 0.8) 0 1px, transparent 1.8px),
        radial-gradient(circle, rgba(74, 222, 128, 0.82) 0 1px, transparent 1.6px),
        radial-gradient(circle, rgba(255, 255, 255, 0.65) 0 1px, transparent 1.4px);
    background-size: 240px 240px, 320px 320px, 180px 180px;
    background-position: 10% 100%, 70% 80%, 40% 90%;
    animation: particlesRise 26s linear infinite;
}

.atmosphere--glyphs {
    z-index: 0;
    opacity: 0.32;
    background:
        radial-gradient(circle at center, rgba(212, 175, 119, 0.1) 0%, transparent 20%),
        radial-gradient(circle at center, transparent 0 32%, rgba(212, 175, 119, 0.08) 33%, transparent 34%),
        linear-gradient(90deg, transparent 49.5%, rgba(212, 175, 119, 0.08) 50%, transparent 50.5%),
        linear-gradient(transparent 49.5%, rgba(74, 222, 128, 0.08) 50%, transparent 50.5%);
    mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.86) 18%, rgba(0, 0, 0, 0) 48%);
    animation: glyphPulse 10s ease-in-out infinite;
}

.loading {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 1rem;
    background:
        radial-gradient(circle at center, rgba(15, 44, 31, 0.62) 0%, rgba(5, 7, 6, 0.96) 46%, #020202 100%);
    z-index: 3000;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading__sigil {
    position: relative;
    width: 130px;
    height: 130px;
    display: grid;
    place-items: center;
}

.loading__ring,
.loading__core {
    position: absolute;
    border-radius: 50%;
}

.loading__ring--outer {
    inset: 0;
    border: 1px solid rgba(212, 175, 119, 0.64);
    box-shadow: inset 0 0 28px rgba(212, 175, 119, 0.14), 0 0 30px rgba(74, 222, 128, 0.18);
    animation: rotateClockwise 10s linear infinite;
}

.loading__ring--inner {
    inset: 20px;
    border: 1px solid rgba(74, 222, 128, 0.62);
    box-shadow: inset 0 0 24px rgba(74, 222, 128, 0.16);
    animation: rotateCounter 6s linear infinite;
}

.loading__core {
    inset: 46px;
    background: radial-gradient(circle, rgba(247, 241, 232, 0.9) 0%, rgba(74, 222, 128, 0.64) 35%, rgba(15, 44, 31, 0.16) 100%);
    box-shadow: 0 0 28px rgba(74, 222, 128, 0.46), 0 0 60px rgba(212, 175, 119, 0.24);
    animation: corePulse 2.4s ease-in-out infinite;
}

.loading__label {
    font-family: var(--font-display);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text);
    font-size: 0.82rem;
}

.password-modal {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    background: rgba(2, 2, 2, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2500;
}

.modal-content {
    position: relative;
    width: min(92vw, 540px);
    padding: clamp(2rem, 4vw, 3rem);
    overflow: hidden;
    border-radius: 28px;
    background:
        radial-gradient(circle at top, rgba(15, 44, 31, 0.42) 0%, transparent 34%),
        linear-gradient(145deg, rgba(10, 13, 11, 0.98) 0%, rgba(8, 10, 9, 0.94) 100%);
    border: 1px solid rgba(212, 175, 119, 0.34);
    box-shadow: var(--shadow);
    text-align: center;
}

.modal-content::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 119, 0.1);
    pointer-events: none;
}

.modal-runes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.modal-rune {
    position: absolute;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 119, 0.16);
}

.modal-rune:nth-child(1) {
    top: 16px;
    left: 16px;
}

.modal-rune:nth-child(2) {
    top: 16px;
    right: 16px;
}

.modal-rune:nth-child(3) {
    bottom: 16px;
    left: 16px;
}

.modal-rune:nth-child(4) {
    bottom: 16px;
    right: 16px;
}

.modal-kicker {
    margin-bottom: 0.8rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-size: 0.72rem;
    color: var(--gold);
}

.modal-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.2vw, 2.8rem);
    line-height: 1.05;
}

.modal-subtitle {
    margin: 1rem auto 1.4rem;
    max-width: 28rem;
    color: var(--muted);
    line-height: 1.65;
}

.password-input {
    width: 100%;
    padding: 1rem 1.15rem;
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 119, 0.22);
    background: rgba(7, 9, 8, 0.86);
    color: var(--text);
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.05);
}

.password-input::placeholder {
    color: rgba(247, 241, 232, 0.36);
}

.password-input:focus {
    border-color: rgba(74, 222, 128, 0.74);
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.12), inset 0 0 0 1px rgba(74, 222, 128, 0.12);
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-top: 1.3rem;
}

.modal-btn {
    min-width: 180px;
    padding: 0.95rem 1.2rem;
    border-radius: 999px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.enter-btn {
    color: #081009;
    background: linear-gradient(135deg, #f2d8ab 0%, var(--gold) 46%, #e6c184 100%);
    box-shadow: 0 16px 36px rgba(212, 175, 119, 0.26);
}

.cancel-btn {
    color: var(--text);
    background: rgba(10, 10, 10, 0.7);
    border: 1px solid rgba(139, 30, 47, 0.36);
}

.modal-btn:hover,
.modal-btn:focus-visible {
    transform: translateY(-2px);
}

.sound-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 118px;
    padding: 0.85rem 1rem;
    border-radius: 999px;
    color: var(--text);
    background: linear-gradient(135deg, rgba(10, 12, 11, 0.95) 0%, rgba(19, 20, 16, 0.72) 100%);
    border: 1px solid rgba(212, 175, 119, 0.24);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(74, 222, 128, 0.05);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.68rem;
    transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease, color 0.26s ease;
}

.sound-toggle__state {
    color: var(--gold);
}

.sound-toggle.is-active {
    border-color: rgba(74, 222, 128, 0.36);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34), 0 0 24px rgba(74, 222, 128, 0.12);
}

.sound-toggle.is-active .sound-toggle__state {
    color: var(--glow);
}

body.sound-active .atmosphere--glyphs {
    opacity: 0.42;
}

body.sound-active .nexus-ring--inner {
    box-shadow: 0 0 44px rgba(74, 222, 128, 0.18);
}

body.save-data .atmosphere--particles,
body.save-data .atmosphere--glyphs {
    animation: none;
    opacity: 0.18;
}

body.save-data .nexus-ring--outer,
body.save-data .nexus-ring--mid {
    animation-duration: 40s;
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
    transform: translateY(-2px);
}

.site-shell {
    position: relative;
    z-index: 10;
    min-height: var(--app-height);
    padding:
        calc(var(--top-safe) + 3rem)
        max(1.5rem, var(--right-safe))
        calc(var(--footer-height) + var(--bottom-safe) + 1.4rem)
        max(1.5rem, var(--left-safe));
    display: grid;
    place-items: center;
}

.nexus-stage {
    position: relative;
    width: min(1180px, 100%);
    min-height: min(calc(var(--app-height) - var(--footer-height) - 7rem), 820px);
    display: grid;
    align-items: center;
}

.nexus-backdrop {
    position: absolute;
    inset: 50%;
    width: min(560px, 60vw);
    aspect-ratio: 1 / 1;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.nexus-ring,
.nexus-star {
    position: absolute;
    inset: 0;
    border-radius: 50%;
}

.nexus-symbol-orbit {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
}

.nexus-symbol-orbit--outer {
    inset: 3.5%;
    animation: orbitSymbolsClockwise 44s linear infinite;
}

.nexus-symbol-orbit--inner {
    inset: 12%;
    animation: orbitSymbolsCounter 34s linear infinite;
}

.nexus-symbol-anchor {
    position: absolute;
    inset: 0;
}

.nexus-symbol-orbit--outer .nexus-symbol-anchor {
    transform: rotate(var(--symbol-angle));
}

.nexus-symbol-orbit--inner .nexus-symbol-anchor {
    transform: rotate(var(--symbol-angle));
}

.nexus-symbol {
    position: absolute;
    top: 3%;
    left: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25em;
    transform: translate(-50%, -50%);
    font-family: "Times New Roman", Georgia, serif;
    font-size: clamp(1.05rem, 1.7vw, 1.48rem);
    line-height: 1;
    color: rgba(244, 241, 232, 0.62);
    opacity: 0.82;
    text-shadow:
        0 0 1px rgba(255, 255, 255, 0.7),
        0 0 12px rgba(74, 222, 128, 0.08),
        1px 1px 0 rgba(255, 255, 255, 0.12),
        -1px 0 0 rgba(212, 175, 119, 0.08);
    filter: blur(0.18px);
    animation: keepSymbolUpright 44s linear infinite;
}

.nexus-symbol::after {
    content: attr(data-symbol);
    position: absolute;
    inset: 0;
    transform: translate(0.5px, 0.65px);
    color: rgba(255, 255, 255, 0.16);
    filter: blur(0.8px);
    opacity: 0.85;
}

.nexus-symbol--small {
    font-size: clamp(0.92rem, 1.35vw, 1.14rem);
    opacity: 0.72;
}

.nexus-symbol-orbit--inner .nexus-symbol {
    top: 6%;
}

.nexus-symbol-orbit--inner .nexus-symbol {
    animation-duration: 34s;
    animation-direction: reverse;
}

.nexus-ring--outer {
    border: 1px solid rgba(212, 175, 119, 0.2);
    box-shadow: inset 0 0 80px rgba(74, 222, 128, 0.06), 0 0 80px rgba(74, 222, 128, 0.08);
    animation: rotateClockwise 22s linear infinite;
}

.nexus-ring--mid {
    inset: 9%;
    border: 1px solid rgba(74, 222, 128, 0.16);
    animation: rotateCounter 16s linear infinite;
}

.nexus-ring--inner {
    inset: 23%;
    background:
        radial-gradient(circle, rgba(74, 222, 128, 0.18) 0%, rgba(74, 222, 128, 0.04) 34%, transparent 65%),
        radial-gradient(circle at center, rgba(212, 175, 119, 0.1) 0%, transparent 70%);
    border: 1px solid rgba(212, 175, 119, 0.16);
    animation: corePulse 8s ease-in-out infinite;
}

.nexus-star {
    inset: 12%;
    background:
        linear-gradient(90deg, transparent 49.6%, rgba(212, 175, 119, 0.14) 50%, transparent 50.4%),
        linear-gradient(transparent 49.6%, rgba(212, 175, 119, 0.14) 50%, transparent 50.4%);
    mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0) 0 42%, rgba(0, 0, 0, 1) 42.5% 57.5%, rgba(0, 0, 0, 0) 58%);
}

.nexus-star--one {
    transform: rotate(0deg);
}

.nexus-star--two {
    transform: rotate(60deg);
}

.nexus-star--three {
    transform: rotate(120deg);
}

.nexus-core {
    position: relative;
    z-index: 2;
    width: min(380px, 90vw);
    margin: 0 auto;
    padding: 2.4rem 2rem;
    border-radius: 32px;
    text-align: center;
    background:
        radial-gradient(circle at top, rgba(15, 44, 31, 0.42) 0%, transparent 44%),
        linear-gradient(145deg, rgba(8, 10, 9, 0.78) 0%, rgba(12, 16, 13, 0.52) 100%);
    border: 1px solid rgba(212, 175, 119, 0.18);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transform: translate3d(calc((var(--pointer-x) - 50) * -0.12px), calc((var(--pointer-y) - 50) * -0.08px), 0);
}

@supports not ((backdrop-filter: blur(14px)) or (-webkit-backdrop-filter: blur(14px))) {
    .nexus-core,
    .ritual-tab,
    .modal-content,
    .site-footer,
    .sound-toggle {
        background:
            linear-gradient(145deg, rgba(9, 11, 10, 0.95) 0%, rgba(12, 16, 13, 0.9) 100%);
    }
}

.nexus-core::before {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 24px;
    border: 1px solid rgba(212, 175, 119, 0.08);
    pointer-events: none;
}

.nexus-core__kicker {
    margin-bottom: 0.8rem;
    font-size: 0.74rem;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--gold);
}

.nexus-core__title {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5vw, 4.6rem);
    line-height: 0.95;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.54);
}

.staggered-text {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.04em;
}

.staggered-word {
    display: inline-flex;
    margin-right: 0.22em;
}

.staggered-space {
    width: 0.12em;
}

.staggered-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(18px) scale(0.96);
    filter: blur(8px);
    animation: staggerReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.nexus-core__copy {
    margin-top: 1rem;
    color: var(--muted);
    line-height: 1.78;
    font-size: clamp(0.95rem, 1.6vw, 1.04rem);
}

.blur-highlight {
    position: relative;
    color: rgba(247, 241, 232, 0.48);
    filter: blur(6px);
    transition: filter 0.65s ease, color 0.65s ease, text-shadow 0.65s ease;
}

.blur-highlight.is-visible {
    color: var(--text);
    filter: blur(0);
    text-shadow: 0 0 18px rgba(74, 222, 128, 0.12);
}

.ritual-grid {
    position: absolute;
    inset: 0;
    z-index: 3;
}

.ritual-tab {
    position: absolute;
    width: min(260px, 28vw);
    min-height: 108px;
    padding: 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-start;
    justify-content: center;
    border-radius: 26px;
    text-decoration: none;
    color: var(--text);
    background:
        linear-gradient(145deg, rgba(10, 12, 11, 0.94) 0%, rgba(15, 24, 19, 0.74) 100%);
    border: 1px solid rgba(212, 175, 119, 0.18);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.32),
        inset 0 0 0 1px rgba(74, 222, 128, 0.05);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    cursor: pointer;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.32s ease, box-shadow 0.32s ease, border-color 0.32s ease, background 0.32s ease;
    overflow: hidden;
}

.ritual-tab::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(255, 255, 255, 0.24) 0%, transparent 24%),
        linear-gradient(130deg, rgba(255, 255, 255, 0.12) 0%, transparent 28%, transparent 72%, rgba(74, 222, 128, 0.1) 100%);
    opacity: 0.72;
    pointer-events: none;
}

.ritual-tab::after {
    content: "";
    position: absolute;
    inset: auto 16% -30%;
    height: 90px;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.2) 0%, rgba(74, 222, 128, 0) 72%);
    filter: blur(22px);
    opacity: 0;
    transition: opacity 0.32s ease;
    pointer-events: none;
}

.ritual-tab:hover,
.ritual-tab:focus-visible {
    transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-10px) scale(1.02);
    border-color: rgba(74, 222, 128, 0.38);
    box-shadow:
        0 32px 78px rgba(0, 0, 0, 0.38),
        0 0 30px rgba(74, 222, 128, 0.1);
}

.ritual-tab:hover::after,
.ritual-tab:focus-visible::after {
    opacity: 1;
}

.ritual-tab__index,
.ritual-tab__label {
    position: relative;
    z-index: 1;
}

.ritual-tab__index {
    font-family: var(--font-display);
    font-size: 0.82rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold);
}

.ritual-tab__label {
    font-family: var(--font-display);
    font-size: 1.28rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ritual-tab--treasury {
    --tab-accent: var(--gold);
    --tab-accent-glow: rgba(212, 175, 119, 0.2);
}

.ritual-tab--members {
    --tab-accent: var(--glow);
    --tab-accent-glow: rgba(74, 222, 128, 0.22);
}

.ritual-tab--graveyard {
    --tab-accent: #f87171;
    --tab-accent-glow: rgba(248, 113, 113, 0.22);
}

.ritual-tab--join {
    --tab-accent: #86efac;
    --tab-accent-glow: rgba(134, 239, 172, 0.22);
}

.ritual-tab--tribute {
    --tab-accent: #fca5a5;
    --tab-accent-glow: rgba(239, 68, 68, 0.28);
}

.ritual-tab--signal {
    --tab-accent: #93c5fd;
    --tab-accent-glow: rgba(147, 197, 253, 0.22);
}

.ritual-tab--announcements {
    --tab-accent: #d4af77;
    --tab-accent-glow: rgba(212, 175, 119, 0.24);
}

.ritual-tab {
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.32),
        inset 0 0 0 1px rgba(74, 222, 128, 0.05),
        inset 0 0 26px var(--tab-accent-glow, rgba(74, 222, 128, 0.18));
}

.ritual-tab:hover,
.ritual-tab:focus-visible {
    box-shadow:
        0 32px 78px rgba(0, 0, 0, 0.38),
        0 0 30px var(--tab-accent-glow, rgba(74, 222, 128, 0.22)),
        inset 0 0 42px var(--tab-accent-glow, rgba(74, 222, 128, 0.22));
}

.ritual-tab--treasury {
    top: 8%;
    left: 4%;
    animation: floatA 8s ease-in-out infinite;
}

.ritual-tab--members {
    top: 6%;
    right: 4%;
    animation: floatB 9s ease-in-out infinite;
}

.ritual-tab--graveyard {
    top: 37%;
    right: 2%;
    animation: floatC 8.6s ease-in-out infinite;
}

.ritual-tab--join {
    bottom: 8%;
    right: 8%;
    animation: floatA 9.4s ease-in-out infinite reverse;
}

.ritual-tab--tribute {
    bottom: 10%;
    left: 7%;
    animation: floatB 8.8s ease-in-out infinite reverse;
}

.ritual-tab--tribute::before {
    background:
        radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(255, 255, 255, 0.16) 0%, transparent 24%),
        linear-gradient(130deg, rgba(255, 255, 255, 0.08) 0%, transparent 28%, transparent 66%, rgba(239, 68, 68, 0.24) 100%);
}

.ritual-tab--tribute:hover,
.ritual-tab--tribute:focus-visible {
    border-color: rgba(239, 68, 68, 0.48);
    box-shadow:
        0 32px 78px rgba(0, 0, 0, 0.38),
        0 0 34px rgba(239, 68, 68, 0.22),
        inset 0 0 46px rgba(239, 68, 68, 0.18);
}

.ritual-tab--tribute.is-pressed {
    transform: scale(0.985) !important;
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow:
        0 20px 38px rgba(0, 0, 0, 0.34),
        0 0 24px rgba(239, 68, 68, 0.2),
        inset 0 0 54px rgba(239, 68, 68, 0.22);
}

.ritual-tab--signal {
    top: 39%;
    left: 2%;
    animation: floatC 9.2s ease-in-out infinite reverse;
}

.ritual-tab--announcements {
    top: auto;
    bottom: 6%;
    left: 0;
    right: 0;
    margin-inline: auto;
    animation: floatA 10.2s ease-in-out infinite;
}

.graveyard-popup {
    position: fixed;
    top: 70%;
    left: calc(50% + 220px);
    display: none;
    z-index: 30;
    align-items: center;
    gap: 1rem;
    flex-direction: row-reverse;
    transform: translateY(-50%);
    animation: popupFadeIn 0.35s ease-out;
}

.popup-sleepy-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(212, 175, 119, 0.4);
    box-shadow: 0 0 26px rgba(74, 222, 128, 0.14), 0 14px 34px rgba(0, 0, 0, 0.3);
}

.graveyard-speech-bubble {
    position: relative;
    max-width: 320px;
    padding: 1rem 1.15rem;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(9, 12, 10, 0.96) 0%, rgba(15, 24, 18, 0.92) 100%);
    border: 1px solid rgba(212, 175, 119, 0.22);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32);
}

.graveyard-speech-bubble p {
    color: var(--text);
    line-height: 1.65;
    font-size: 0.95rem;
}

.speaker {
    color: var(--gold);
    font-family: var(--font-display);
    letter-spacing: 0.04em;
}

.graveyard-arrow {
    position: absolute;
    left: -13px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    border-right: 13px solid rgba(212, 175, 119, 0.22);
}

.graveyard-speech-bubble::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
    border-right: 11px solid rgba(10, 12, 11, 0.98);
}

.site-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    min-height: var(--footer-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem max(1rem, var(--left-safe)) calc(0.85rem + var(--bottom-safe));
    background: linear-gradient(180deg, rgba(2, 2, 2, 0.15) 0%, rgba(2, 2, 2, 0.9) 46%, rgba(1, 1, 1, 0.98) 100%);
    border-top: 1px solid rgba(212, 175, 119, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.site-footer p {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(247, 241, 232, 0.62);
    text-align: center;
}

.site-footer a {
    color: var(--glow);
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: var(--gold);
}

@keyframes rotateClockwise {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes rotateCounter {
    from {
        transform: rotate(360deg);
    }
    to {
        transform: rotate(0deg);
    }
}

@keyframes orbitSymbolsClockwise {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes orbitSymbolsCounter {
    from {
        transform: rotate(360deg);
    }
    to {
        transform: rotate(0deg);
    }
}

@keyframes keepSymbolUpright {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(-360deg);
    }
}

@keyframes corePulse {
    0%,
    100% {
        transform: scale(0.96);
        opacity: 0.82;
    }
    50% {
        transform: scale(1.02);
        opacity: 1;
    }
}

@keyframes fogDriftA {
    0% {
        transform: translate3d(-2%, 0, 0) scale(1);
    }
    100% {
        transform: translate3d(3%, -2%, 0) scale(1.08);
    }
}

@keyframes fogDriftB {
    0% {
        transform: translate3d(2%, 1%, 0) scale(1.02);
    }
    100% {
        transform: translate3d(-3%, -1%, 0) scale(1.1);
    }
}

@keyframes particlesRise {
    0% {
        background-position: 10% 100%, 70% 80%, 40% 90%;
    }
    100% {
        background-position: 10% 0%, 70% 10%, 40% 20%;
    }
}

@keyframes glyphPulse {
    0%,
    100% {
        opacity: 0.2;
        transform: scale(0.96);
    }
    50% {
        opacity: 0.36;
        transform: scale(1.02);
    }
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(calc(-50% + 18px));
    }
    to {
        opacity: 1;
        transform: translateY(-50%);
    }
}

@keyframes floatA {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -10px, 0);
    }
}

@keyframes floatB {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, 12px, 0);
    }
}

@keyframes floatC {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -12px, 0);
    }
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-8px);
    }
    40% {
        transform: translateX(8px);
    }
    60% {
        transform: translateX(-5px);
    }
    80% {
        transform: translateX(5px);
    }
}

@keyframes staggerReveal {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.96);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@media (max-width: 1120px) {
    .nexus-stage {
        width: min(980px, 100%);
    }

    .ritual-tab {
        width: min(230px, 26vw);
    }
}

@media (max-width: 900px) {
    html,
    body {
        height: auto;
        min-height: 100%;
    }

    body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: auto;
    }

    .site-shell {
        min-height: auto;
        display: block;
        padding:
            calc(var(--top-safe) + 4.8rem)
            max(1rem, var(--right-safe))
            max(1.4rem, calc(var(--bottom-safe) + 1.4rem))
            max(1rem, var(--left-safe));
    }

    .nexus-stage {
        min-height: auto;
        display: flex;
        flex-direction: column;
        gap: 1.4rem;
        justify-content: flex-start;
        align-items: center;
    }

    .nexus-backdrop {
        position: relative;
        inset: auto;
        width: min(440px, 90vw);
        transform: none;
        top: auto;
        margin: 0 auto -6.5rem;
    }

    .nexus-symbol {
        font-size: clamp(0.96rem, 2.3vw, 1.18rem);
    }

    .nexus-symbol--small {
        font-size: clamp(0.84rem, 1.9vw, 1rem);
    }

    .nexus-core {
        width: min(420px, 100%);
        margin-bottom: 1rem;
    }

    .ritual-grid {
        position: relative;
        inset: auto;
        width: min(520px, 100%);
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
        margin-top: 0.25rem;
    }

    .ritual-tab {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: 100%;
        min-height: 104px;
        animation: none;
        transform: none !important;
    }

    .graveyard-popup {
        top: auto;
        left: 50%;
        right: auto;
        bottom: calc(var(--footer-height) + 6.2rem);
        transform: translateX(-50%);
        max-width: calc(100vw - 2rem);
    }

    .site-footer {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        margin-top: 1rem;
    }

    @keyframes popupFadeIn {
        from {
            opacity: 0;
            transform: translateX(-50%) translateY(18px);
        }
        to {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }
    }
}

@media (max-width: 640px) {
    .top-controls {
        top: calc(var(--top-safe) + 0.35rem);
        gap: 0.5rem;
    }

    .sound-toggle {
        min-width: 104px;
        padding: 0.78rem 0.9rem;
        font-size: 0.62rem;
    }

    .site-shell {
        padding:
            calc(var(--top-safe) + 4.1rem)
            max(0.85rem, var(--right-safe))
            max(0.85rem, calc(var(--bottom-safe) + 0.85rem))
            max(0.85rem, var(--left-safe));
    }

    .nexus-stage {
        gap: 1rem;
    }

    .nexus-backdrop {
        width: min(360px, 96vw);
        margin: 0 auto -5.4rem;
    }

    .nexus-symbol-orbit--outer {
        inset: 5%;
    }

    .nexus-symbol-orbit--inner {
        inset: 13.5%;
    }

    .nexus-symbol {
        font-size: 0.92rem;
    }

    .nexus-symbol--small {
        font-size: 0.8rem;
    }

    .nexus-core {
        padding: 1.75rem 1.2rem;
        border-radius: 24px;
    }

    .nexus-core__kicker {
        font-size: 0.66rem;
        letter-spacing: 0.24em;
    }

    .nexus-core__title {
        font-size: clamp(2rem, 11vw, 3rem);
    }

    .nexus-core__copy {
        font-size: 0.92rem;
        line-height: 1.68;
    }

    .ritual-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .ritual-tab {
        min-height: 96px;
        padding: 1rem;
        border-radius: 22px;
    }

    .ritual-tab__label {
        font-size: 1.08rem;
    }

    .popup-sleepy-image {
        width: 64px;
        height: 64px;
    }

    .graveyard-speech-bubble {
        max-width: min(240px, calc(100vw - 6rem));
        padding: 0.82rem 0.9rem;
    }

    .graveyard-speech-bubble p {
        font-size: 0.82rem;
    }

    .modal-content {
        padding: 2rem 1.2rem;
        border-radius: 24px;
    }

    .modal-buttons {
        flex-direction: column;
    }

    .modal-btn {
        width: 100%;
        min-width: 0;
    }

    .site-footer p {
        font-size: 0.62rem;
        line-height: 1.6;
    }
}

@media (max-height: 740px) and (min-width: 901px) {
    .nexus-stage {
        min-height: min(calc(var(--app-height) - var(--footer-height) - 6rem), 700px);
    }

    .ritual-tab {
        min-height: 96px;
        width: min(236px, 26vw);
        padding: 0.95rem 1rem;
    }

    .ritual-tab__label {
        font-size: 1.14rem;
    }
}

@media (hover: none), (pointer: coarse) {
    .video-background {
        transform: scale(1.01);
    }

    .atmosphere--fog {
        filter: blur(14px);
    }

    .ritual-tab,
    .sound-toggle {
        transition-duration: 0.22s;
    }

    .ritual-tab:hover,
    .ritual-tab:focus-visible,
    .sound-toggle:hover,
    .sound-toggle:focus-visible {
        transform: none;
    }
}

@supports (height: 100dvh) {
    :root {
        --app-height: 100dvh;
    }
}

@supports (height: 100svh) {
    :root {
        --app-height: 100svh;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .nexus-core,
    .overlay {
        transform: none !important;
    }

    .nexus-symbol-orbit,
    .nexus-symbol {
        animation: none !important;
    }
}

/* =============================================
   ZOMBIE DAO — UNDEAD MOTION LAYER
   Inspired by ReactBits: GlitchText, DecryptedText,
   SplashCursor, BorderGlow, ElectricBorder, ClickSpark
   All vanilla CSS/JS — no React required.
============================================= */

/* 1. PERSISTENT SOFT TITLE GLITCH PULSE */
@keyframes softGlitchPulse {
    0%, 78%, 100% {
        text-shadow: 0 10px 40px rgba(0, 0, 0, 0.54);
    }
    80% {
        text-shadow:
            -3px 0 rgba(74, 222, 128, 0.8),
            3px 0 rgba(139, 30, 47, 0.8),
            0 10px 40px rgba(0, 0, 0, 0.54);
    }
    82% {
        text-shadow: 0 10px 40px rgba(0, 0, 0, 0.54);
    }
    84% {
        text-shadow:
            -1px 0 rgba(212, 175, 119, 0.7),
            1px 0 rgba(74, 222, 128, 0.6),
            0 10px 40px rgba(0, 0, 0, 0.54);
    }
    86% {
        text-shadow: 0 10px 40px rgba(0, 0, 0, 0.54);
    }
}

.nexus-core__title {
    animation: softGlitchPulse 11s steps(1) infinite;
}

/* 2. JS-TRIGGERED HARD GLITCH CLASS */
@keyframes hardGlitch {
    0% {
        text-shadow:
            -5px 0 #4ade80,
            5px 0 #8b1e2f,
            0 0 28px rgba(139, 30, 47, 0.9);
        transform: skewX(-4deg);
    }
    18% {
        text-shadow:
            5px 0 #d4af77,
            -4px 0 #4ade80,
            0 0 20px rgba(74, 222, 128, 0.85);
        transform: skewX(3deg) scaleX(1.01);
    }
    36% {
        text-shadow:
            -3px 0 #8b1e2f,
            3px 0 #d4af77,
            0 0 14px rgba(212, 175, 119, 0.7);
        transform: skewX(-2deg);
    }
    54% {
        text-shadow:
            2px 0 #4ade80,
            -2px 0 #8b1e2f;
        transform: skewX(1deg);
    }
    72%, 100% {
        text-shadow: 0 10px 40px rgba(0, 0, 0, 0.54);
        transform: none;
    }
}

.nexus-core__title.is-glitching {
    animation: hardGlitch 0.44s steps(1) forwards !important;
}

/* 3. CRT SCANLINES overlay on nexus core */
.nexus-core::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 32px;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.052) 2px,
        rgba(0, 0, 0, 0.052) 4px
    );
    pointer-events: none;
    z-index: 3;
    animation: scanlineScroll 12s linear infinite;
}

@keyframes scanlineScroll {
    from { transform: translateY(0); }
    to   { transform: translateY(120px); }
}

/* 4. BLOOD PULSE on outer ring */
@keyframes bloodPulse {
    0%, 70%, 100% {
        box-shadow:
            inset 0 0 80px rgba(74, 222, 128, 0.06),
            0 0 80px rgba(74, 222, 128, 0.08);
        border-color: rgba(212, 175, 119, 0.2);
    }
    72% {
        box-shadow:
            inset 0 0 100px rgba(139, 30, 47, 0.26),
            0 0 100px rgba(139, 30, 47, 0.32),
            0 0 160px rgba(139, 30, 47, 0.14);
        border-color: rgba(139, 30, 47, 0.58);
    }
    74% {
        box-shadow:
            inset 0 0 80px rgba(74, 222, 128, 0.06),
            0 0 80px rgba(74, 222, 128, 0.08);
        border-color: rgba(212, 175, 119, 0.2);
    }
    76% {
        box-shadow:
            inset 0 0 90px rgba(139, 30, 47, 0.18),
            0 0 90px rgba(139, 30, 47, 0.22);
        border-color: rgba(139, 30, 47, 0.4);
    }
    78% {
        box-shadow:
            inset 0 0 80px rgba(74, 222, 128, 0.06),
            0 0 80px rgba(74, 222, 128, 0.08);
        border-color: rgba(212, 175, 119, 0.2);
    }
}

.nexus-ring--outer {
    animation: rotateClockwise 22s linear infinite, bloodPulse 15s ease-in-out infinite;
}

/* 5. MID RING — DECAY FLICKER */
@keyframes midRingDecay {
    0%, 78%, 100% {
        border-color: rgba(74, 222, 128, 0.16);
        opacity: 1;
    }
    80% {
        border-color: rgba(139, 30, 47, 0.34);
        opacity: 0.65;
    }
    82% {
        border-color: rgba(74, 222, 128, 0.16);
        opacity: 1;
    }
}

.nexus-ring--mid {
    animation: rotateCounter 16s linear infinite, midRingDecay 19s ease-in-out infinite;
}

/* 6. ORBITING SYMBOL CORRUPTION */
@keyframes symbolCorrupt {
    0%, 84%, 100% {
        opacity: 0.82;
        color: rgba(244, 241, 232, 0.62);
        filter: blur(0.18px);
        text-shadow: none;
    }
    86% {
        opacity: 0.22;
        color: rgba(139, 30, 47, 0.98);
        filter: blur(2px);
        text-shadow: 0 0 14px rgba(139, 30, 47, 0.95);
    }
    88% {
        opacity: 0.82;
        color: rgba(244, 241, 232, 0.62);
        filter: blur(0.18px);
        text-shadow: none;
    }
    90% {
        opacity: 0.42;
        color: rgba(74, 222, 128, 0.95);
        filter: blur(0.9px);
        text-shadow: 0 0 10px rgba(74, 222, 128, 0.85);
    }
    92% {
        opacity: 0.82;
        color: rgba(244, 241, 232, 0.62);
        filter: blur(0.18px);
        text-shadow: none;
    }
}

.nexus-symbol {
    animation: keepSymbolUpright 44s linear infinite, symbolCorrupt 13s steps(1) infinite;
}

.nexus-symbol-orbit--inner .nexus-symbol {
    animation-duration: 34s, 17s;
    animation-direction: reverse, normal;
}

/* 7. ROMAN NUMERAL NEON FLICKER */
@keyframes runeNeonFlicker {
    0%, 80%, 100% {
        color: var(--gold);
        text-shadow: none;
    }
    82% {
        color: #f5e2b8;
        text-shadow:
            0 0 6px var(--gold),
            0 0 18px rgba(212, 175, 119, 0.72),
            0 0 36px rgba(212, 175, 119, 0.32);
    }
    84% {
        color: var(--gold);
        text-shadow: none;
    }
    86% {
        color: #f5e2b8;
        text-shadow:
            0 0 4px var(--gold),
            0 0 12px rgba(212, 175, 119, 0.54);
    }
    88% {
        color: var(--gold);
        text-shadow: none;
    }
}

.ritual-tab__index {
    animation: runeNeonFlicker 7s steps(1) infinite;
}

.ritual-tab:nth-child(1) .ritual-tab__index { animation-delay: 0s; }
.ritual-tab:nth-child(2) .ritual-tab__index { animation-delay: -1.4s; }
.ritual-tab:nth-child(3) .ritual-tab__index { animation-delay: -2.8s; }
.ritual-tab:nth-child(4) .ritual-tab__index { animation-delay: -4.2s; }
.ritual-tab:nth-child(5) .ritual-tab__index { animation-delay: -5.6s; }
.ritual-tab:nth-child(6) .ritual-tab__index { animation-delay: -0.7s; }
.ritual-tab:nth-child(7) .ritual-tab__index { animation-delay: -2.1s; }

/* 8. TAB LABEL DEATH FLICKER on hover */
@keyframes labelDeath {
    0%, 86%, 94%, 100% { opacity: 1; }
    88% { opacity: 0.48; }
    90% { opacity: 1; }
    92% { opacity: 0.68; }
}

.ritual-tab:hover .ritual-tab__label,
.ritual-tab:focus-visible .ritual-tab__label {
    animation: labelDeath 2s steps(1) infinite;
}

/* 9. NEXUS CORE UNDEAD GLOW CORRUPTION */
@keyframes zombieCorePulse {
    0%, 100% {
        box-shadow: var(--shadow);
    }
    30% {
        box-shadow:
            var(--shadow),
            0 0 55px rgba(74, 222, 128, 0.09),
            0 0 110px rgba(74, 222, 128, 0.04);
    }
    65% {
        box-shadow:
            var(--shadow),
            0 0 55px rgba(139, 30, 47, 0.11),
            0 0 110px rgba(139, 30, 47, 0.05);
    }
}

.nexus-core {
    animation: zombieCorePulse 9s ease-in-out infinite;
}

/* 10. KICKER TEXT CORRUPTION PULSE */
@keyframes kickerCorrupt {
    0%, 83%, 100% {
        color: var(--gold);
        letter-spacing: 0.34em;
    }
    85% {
        color: rgba(212, 175, 119, 0.44);
        letter-spacing: 0.32em;
    }
    87% {
        color: var(--gold);
        letter-spacing: 0.34em;
    }
    89% {
        color: rgba(139, 30, 47, 0.85);
        letter-spacing: 0.36em;
    }
    91% {
        color: var(--gold);
        letter-spacing: 0.34em;
    }
}

.nexus-core__kicker {
    animation: kickerCorrupt 12s steps(1) infinite;
}

/* 11. LOADING LABEL UNDEAD STUTTER */
@keyframes loadingFlicker {
    0%, 86%, 92%, 100% { opacity: 1; }
    88% { opacity: 0.28; }
    90% { opacity: 0.78; }
}

.loading__label {
    animation: loadingFlicker 4s steps(1) infinite 0.6s;
}

/* 12. GRAVEYARD + TRIBUTE — CORRUPTED BORDER */
@keyframes tabBorderCorrupt {
    0%, 76%, 100% { border-color: rgba(212, 175, 119, 0.18); }
    78% { border-color: rgba(139, 30, 47, 0.58); }
    80% { border-color: rgba(212, 175, 119, 0.18); }
    82% { border-color: rgba(139, 30, 47, 0.35); }
    84% { border-color: rgba(212, 175, 119, 0.18); }
}

.ritual-tab--graveyard {
    animation: floatC 8.6s ease-in-out infinite, tabBorderCorrupt 17s steps(1) infinite;
}

.ritual-tab--tribute {
    animation: floatB 8.8s ease-in-out infinite reverse, tabBorderCorrupt 21s steps(1) infinite 3s;
}

/* 13. CURSOR TRAIL PARTICLE */
.zombie-particle {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    border-radius: 50%;
    animation: zombieParticleFade 0.9s ease-out forwards;
}

@keyframes zombieParticleFade {
    0%   { opacity: 0.88; transform: scale(1) translateY(0); }
    100% { opacity: 0;    transform: scale(0.08) translateY(12px); }
}

/* 14. CLICK SPARK */
.click-spark {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
    animation: clickSparkFly 0.68s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes clickSparkFly {
    0%   { opacity: 1;   transform: translate(0, 0) scale(1.5); }
    100% { opacity: 0;   transform: translate(var(--spark-x, 30px), var(--spark-y, -30px)) scale(0); }
}

/* 15. ELECTRIC BORDER on tab hover — ReactBits ElectricBorder concept */
@keyframes electricBorderFlow {
    0%   { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.ritual-tab:hover,
.ritual-tab:focus-visible {
    --electric-border: 1px;
}

.ritual-tab:hover::before,
.ritual-tab:focus-visible::before {
    animation: electricPulse 1.6s ease-in-out infinite;
}

@keyframes electricPulse {
    0%, 100% { opacity: 0.72; }
    50%       { opacity: 1; }
}
