:root {
    --void: #030407;
    --deep-space: #061421;
    --matrix-green: #68ff92;
    --pulse-lime: #bcff48;
    --circuit-teal: #03e7ff;
    --sky-blue: #4aa3ff;
    --neo-violet: #8f7dff;
    --hot-pink: #ff4fd8;
    --sun-amber: #ffd166;
    --route-orange: #ff9f1c;
    --signal-red: #ff5f6d;
    --aero-white: #f7fdff;
    --text-main: #f4fdff;
    --text-muted: #b2c8d6;
    --panel-bg: rgba(6, 18, 28, 0.72);
    --panel-strong: rgba(8, 24, 38, 0.9);
    --panel-border: rgba(3, 231, 255, 0.52);
    --glass-line: rgba(255, 209, 102, 0.3);
    --shadow-cyan: rgba(3, 231, 255, 0.35);
    --shadow-green: rgba(104, 255, 146, 0.25);
    --font-header: 'Orbitron', 'Yu Gothic', 'Meiryo', sans-serif;
    --font-mono: 'Share Tech Mono', 'Yu Gothic', 'Meiryo', monospace;
}

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

html {
    min-height: 100%;
    background: var(--void);
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--void);
    color: var(--text-main);
    font-family: var(--font-mono);
    position: relative;
}

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

h1,
h2,
h3 {
    font-family: var(--font-header);
    letter-spacing: 0;
}

.hidden {
    display: none !important;
}

html.catalog-return #jack-in-screen {
    display: none;
}

html.catalog-return #cyber-world.hidden {
    display: block !important;
}

.language-control {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem;
    background:
        linear-gradient(135deg, rgba(3, 231, 255, 0.18), transparent 34%),
        rgba(3, 8, 10, 0.92);
    border: 1px solid var(--panel-border);
    box-shadow: 0 0 18px rgba(3, 231, 255, 0.24), inset 0 0 18px rgba(104, 255, 146, 0.08);
    clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
    backdrop-filter: blur(12px);
}

.language-control span {
    color: var(--matrix-green);
    font-family: var(--font-header);
    font-size: 0.75rem;
    padding: 0 0.35rem;
    white-space: nowrap;
}

.language-btn {
    min-width: 3rem;
    min-height: 2rem;
    border: 1px solid rgba(74, 163, 255, 0.65);
    background: rgba(74, 163, 255, 0.12);
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-header);
    font-size: 0.8rem;
    padding: 0.3rem 0.65rem;
    text-transform: uppercase;
    transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.language-btn:hover,
.language-btn.active {
    background: var(--circuit-teal);
    color: #001115;
    box-shadow: 0 0 12px var(--shadow-cyan);
    transform: translateY(-1px);
}

.catchphrase-logo {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    display: grid;
    gap: 0.06rem;
    max-width: min(12.5rem, calc(100vw - 9rem));
    padding: 0.55rem 0.8rem 0.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 209, 102, 0.46);
    background:
        linear-gradient(135deg, rgba(255, 209, 102, 0.2), transparent 38%),
        linear-gradient(315deg, rgba(255, 79, 216, 0.16), transparent 48%),
        rgba(3, 8, 10, 0.9);
    box-shadow: 0 0 18px rgba(255, 209, 102, 0.2), inset 0 0 18px rgba(3, 231, 255, 0.08);
    clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
    pointer-events: none;
    text-transform: uppercase;
    backdrop-filter: blur(12px);
}

.catchphrase-logo::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0.65rem;
    left: 0.65rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(104, 255, 146, 0.7), transparent);
}

.catchphrase-logo span,
.catchphrase-logo strong {
    display: block;
    overflow-wrap: anywhere;
    line-height: 1.05;
}

.catchphrase-logo span {
    color: var(--matrix-green);
    font-family: var(--font-mono);
    font-size: 0.68rem;
}

.catchphrase-logo strong {
    color: var(--sun-amber);
    font-family: var(--font-header);
    font-size: 0.86rem;
    text-shadow: 0 0 12px rgba(255, 209, 102, 0.42);
}

/* =========================================
   ATMOSPHERE
   ========================================= */
.scanlines {
    position: fixed;
    inset: 0;
    z-index: 999;
    pointer-events: none;
    opacity: 0.16;
    background:
        linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 58%, rgba(3, 231, 255, 0.08) 58%, rgba(3, 231, 255, 0.08)),
        radial-gradient(ellipse at center, transparent 64%, rgba(0, 0, 0, 0.28));
    background-size: 100% 5px, 100% 100%;
}

/* =========================================
   JACK IN SCREEN
   ========================================= */
#jack-in-screen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--void);
}

.jack-in-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse at 50% 38%, rgba(3, 231, 255, 0.18), transparent 34%),
        radial-gradient(ellipse at 50% 82%, rgba(104, 255, 146, 0.16), transparent 28%),
        linear-gradient(180deg, #041014 0%, #05070a 52%, #030407 100%);
}

.jack-in-bg::before {
    content: '';
    position: absolute;
    inset: -18% -10% 20%;
    background:
        linear-gradient(rgba(104, 255, 146, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(3, 231, 255, 0.1) 1px, transparent 1px);
    background-size: 42px 42px;
    transform: perspective(900px) rotateX(62deg);
    transform-origin: center bottom;
    animation: introGrid 7s linear infinite;
}

.jack-in-bg::after {
    content: '';
    position: absolute;
    width: 18rem;
    height: 18rem;
    left: calc(50% - 9rem);
    top: calc(42% - 9rem);
    border: 2px solid rgba(3, 231, 255, 0.52);
    border-radius: 50%;
    box-shadow:
        0 0 42px rgba(3, 231, 255, 0.28),
        inset 0 0 36px rgba(104, 255, 146, 0.16);
    background:
        conic-gradient(from 30deg, transparent 0 12%, rgba(104, 255, 146, 0.4) 12% 14%, transparent 14% 32%, rgba(255, 209, 102, 0.42) 32% 34%, transparent 34% 65%, rgba(3, 231, 255, 0.42) 65% 68%, transparent 68% 100%);
    animation: gateSpin 13s linear infinite;
}

.jack-in-content {
    z-index: 10;
    width: min(92vw, 760px);
    padding: 2rem;
    text-align: center;
    background:
        linear-gradient(135deg, rgba(255, 209, 102, 0.1), transparent 28%),
        linear-gradient(315deg, rgba(255, 79, 216, 0.1), transparent 30%),
        rgba(2, 9, 10, 0.68);
    border: 1px solid rgba(3, 231, 255, 0.42);
    box-shadow: 0 0 60px rgba(3, 231, 255, 0.16), inset 0 0 30px rgba(3, 231, 255, 0.08);
    clip-path: polygon(22px 0, calc(100% - 22px) 0, 100% 22px, 100% calc(100% - 22px), calc(100% - 22px) 100%, 22px 100%, 0 calc(100% - 22px), 0 22px);
    backdrop-filter: blur(10px);
}

.glitch-text {
    position: relative;
    margin-bottom: 1rem;
    color: var(--circuit-teal);
    font-size: 4rem;
    text-shadow: 0 0 14px rgba(3, 231, 255, 0.86), 0 0 32px rgba(104, 255, 146, 0.22);
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    background: rgba(3, 4, 7, 0.4);
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 var(--signal-red);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitchAnim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 var(--sky-blue);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitchAnimTwo 5s infinite linear alternate-reverse;
}

.status-text {
    margin-bottom: 3rem;
    color: var(--matrix-green);
    font-size: 1.5rem;
    animation: blink 1s infinite;
}

#jack-in-btn {
    position: relative;
    min-height: 3.75rem;
    overflow: hidden;
    border: 2px solid var(--circuit-teal);
    background:
        linear-gradient(90deg, rgba(3, 231, 255, 0.08), rgba(104, 255, 146, 0.14), rgba(255, 209, 102, 0.08));
    color: var(--circuit-teal);
    cursor: pointer;
    font-family: var(--font-header);
    font-size: 1.45rem;
    padding: 1rem 3rem;
    text-transform: uppercase;
    transition: transform 0.3s ease, color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

#jack-in-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
    transform: translateX(-110%);
    transition: transform 0.45s ease;
}

#jack-in-btn:hover {
    background: var(--circuit-teal);
    color: #001115;
    box-shadow: 0 0 26px rgba(3, 231, 255, 0.6), 0 0 52px rgba(104, 255, 146, 0.22);
    transform: translateY(-2px);
}

#jack-in-btn:hover::before {
    transform: translateX(110%);
}

.jack-in-flash {
    position: fixed;
    inset: 0;
    z-index: 2000;
    opacity: 0;
    background: white;
}

.jack-in-tunnel {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 1500;
    width: 10px;
    height: 10px;
    border: 5px solid var(--circuit-teal);
    border-radius: 50%;
    background: transparent;
    opacity: 0;
    transform: translate(-50%, -50%);
}

.anim-tunnel {
    animation: expandTunnel 0.8s ease-in forwards;
}

.anim-flash {
    animation: flashScreen 1s ease-out forwards;
    animation-delay: 0.5s;
}

/* =========================================
   CYBERWORLD UI
   ========================================= */
#cyber-world {
    position: relative;
    z-index: 1;
    isolation: isolate;
    width: 100%;
    min-height: 100vh;
}

.cyber-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    perspective: 1100px;
    background:
        radial-gradient(ellipse at 18% 18%, rgba(255, 79, 216, 0.2), transparent 30%),
        radial-gradient(ellipse at 82% 20%, rgba(143, 125, 255, 0.18), transparent 28%),
        radial-gradient(ellipse at 50% 54%, rgba(3, 231, 255, 0.2), transparent 34%),
        radial-gradient(ellipse at 48% 82%, rgba(188, 255, 72, 0.15), transparent 34%),
        linear-gradient(180deg, #07162a 0%, #071525 38%, #031016 68%, #030407 100%);
}

#world-canvas {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    opacity: 0.94;
}

.sky-matrix {
    position: absolute;
    inset: -8% -8% 34%;
    z-index: 1;
    opacity: 0.62;
    background:
        linear-gradient(rgba(188, 255, 72, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(3, 231, 255, 0.1) 1px, transparent 1px),
        repeating-linear-gradient(90deg, transparent 0 88px, rgba(255, 79, 216, 0.08) 88px 90px),
        repeating-linear-gradient(120deg, transparent 0 132px, rgba(255, 209, 102, 0.08) 132px 135px);
    background-size: 44px 44px, 44px 44px, 180px 100%, 260px 100%;
    mask-image: linear-gradient(to bottom, black, transparent);
    animation: matrixDrift 18s linear infinite;
}

.portal-gate {
    position: absolute;
    top: 62vh;
    left: 50%;
    z-index: 2;
    width: clamp(23rem, 52vw, 47rem);
    height: clamp(23rem, 52vw, 47rem);
    border: 0;
    border-radius: 50%;
    opacity: 0.86;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(circle at 50% 50%, rgba(247, 253, 255, 0.9) 0 1.1%, rgba(3, 231, 255, 0.36) 1.1% 5.8%, transparent 6%),
        radial-gradient(circle at 50% 50%, rgba(143, 125, 255, 0.2), transparent 42%),
        conic-gradient(from 24deg, transparent 0 7%, rgba(3, 231, 255, 0.3) 7% 10%, transparent 10% 19%, rgba(255, 79, 216, 0.26) 19% 22%, transparent 22% 37%, rgba(188, 255, 72, 0.26) 37% 40%, transparent 40% 62%, rgba(255, 159, 28, 0.25) 62% 65%, transparent 65% 100%);
    box-shadow:
        0 0 70px rgba(3, 231, 255, 0.28),
        0 0 120px rgba(255, 79, 216, 0.14),
        inset 0 0 58px rgba(104, 255, 146, 0.16);
    filter: saturate(1.18);
}

.portal-gate::before,
.portal-gate::after,
.portal-gate .gate-ring,
.portal-gate .hub-core,
.portal-gate .hub-spark {
    content: '';
    position: absolute;
    display: block;
    border-radius: 50%;
    pointer-events: none;
}

.portal-gate::before {
    inset: 0.45rem;
    border: 1px solid rgba(247, 253, 255, 0.34);
    box-shadow: inset 0 0 34px rgba(3, 231, 255, 0.1);
}

.portal-gate::after {
    inset: 3.1rem;
    border: 1px dashed rgba(255, 209, 102, 0.62);
    animation: gateSpin 20s linear infinite reverse;
}

.portal-gate .ring-a {
    inset: 1.1rem;
    border: 12px solid transparent;
    border-top-color: rgba(3, 231, 255, 0.42);
    border-right-color: rgba(255, 79, 216, 0.3);
    border-bottom-color: rgba(143, 125, 255, 0.24);
    animation: gateSpin 13s linear infinite;
}

.portal-gate .ring-b {
    inset: 5rem;
    border: 8px solid transparent;
    border-bottom-color: rgba(188, 255, 72, 0.48);
    border-left-color: rgba(255, 209, 102, 0.42);
    animation: gateSpin 17s linear infinite reverse;
}

.portal-gate .ring-c {
    inset: 8.4rem;
    border: 1px solid rgba(3, 231, 255, 0.34);
    box-shadow: inset 0 0 32px rgba(3, 231, 255, 0.12);
}

.portal-gate .ring-d {
    inset: 11rem;
    border: 2px solid rgba(255, 79, 216, 0.28);
    box-shadow: 0 0 24px rgba(255, 79, 216, 0.2);
    animation: corePulse 4.6s ease-in-out infinite;
}

.portal-gate .hub-core {
    top: 50%;
    left: 50%;
    width: clamp(6rem, 13vw, 10.5rem);
    height: clamp(6rem, 13vw, 10.5rem);
    border: 1px solid rgba(247, 253, 255, 0.6);
    background:
        radial-gradient(circle at 38% 32%, rgba(247, 253, 255, 0.95), rgba(3, 231, 255, 0.56) 18%, rgba(143, 125, 255, 0.34) 42%, rgba(255, 79, 216, 0.12) 68%, rgba(3, 8, 14, 0.3) 100%);
    box-shadow:
        0 0 26px rgba(247, 253, 255, 0.5),
        0 0 58px rgba(3, 231, 255, 0.48),
        0 0 96px rgba(255, 79, 216, 0.26),
        inset 0 0 20px rgba(247, 253, 255, 0.3);
    transform: translate(-50%, -50%);
    animation: corePulse 3.4s ease-in-out infinite;
}

.portal-gate .hub-spark {
    top: 50%;
    left: 50%;
    width: 0.7rem;
    height: 0.7rem;
    margin: -0.35rem 0 0 -0.35rem;
    background: var(--aero-white);
    box-shadow: 0 0 14px var(--circuit-teal), 0 0 28px var(--hot-pink);
}

.portal-gate .spark-a {
    animation: sparkOrbit 6s linear infinite;
}

.portal-gate .spark-b {
    animation: sparkOrbit 7.8s linear infinite reverse;
}

.portal-gate .spark-c {
    animation: sparkOrbit 9.5s linear infinite;
    animation-delay: -3s;
}

.hub-spokes {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}

.hub-spoke {
    position: absolute;
    top: 62vh;
    left: 50%;
    width: min(44vw, 33rem);
    height: 0.22rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(247, 253, 255, 0.72), rgba(3, 231, 255, 0.44), rgba(255, 79, 216, 0));
    box-shadow: 0 0 18px rgba(3, 231, 255, 0.38);
    opacity: 0.64;
    transform-origin: left center;
    animation: routePulse 3.6s ease-in-out infinite;
}

.spoke-a { transform: rotate(2deg); }
.spoke-b { transform: rotate(57deg); animation-delay: -0.6s; }
.spoke-c { transform: rotate(116deg); animation-delay: -1.2s; }
.spoke-d { transform: rotate(182deg); animation-delay: -1.8s; }
.spoke-e { transform: rotate(238deg); animation-delay: -2.4s; }
.spoke-f { transform: rotate(304deg); animation-delay: -3s; }

.route-lattice {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}

.lattice-route {
    position: absolute;
    height: 0.18rem;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(var(--route-rgb), 0.58), rgba(247, 253, 255, 0.4), rgba(var(--route-rgb), 0.2), transparent);
    box-shadow: 0 0 16px rgba(var(--route-rgb), 0.22);
    opacity: 0.58;
    overflow: hidden;
    transform-origin: left center;
}

.lattice-route::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 0.7rem;
    height: 0.28rem;
    border-radius: 999px;
    background: rgba(247, 253, 255, 0.9);
    box-shadow: 0 0 10px rgba(var(--route-rgb), 0.7), 0 0 18px rgba(247, 253, 255, 0.26);
    transform: translate(-120%, -50%);
    animation: latticePacket 4.6s linear infinite;
}

.route-a {
    --route-rgb: 3, 231, 255;
    top: 33vh;
    left: 12vw;
    width: 33vw;
    transform: rotate(24deg);
}

.route-b {
    --route-rgb: 104, 255, 146;
    top: 38vh;
    right: 10vw;
    width: 30vw;
    transform: rotate(154deg);
}

.route-c {
    --route-rgb: 143, 125, 255;
    top: 69vh;
    left: 16vw;
    width: 36vw;
    transform: rotate(-20deg);
}

.route-d {
    --route-rgb: 255, 209, 102;
    top: 70vh;
    right: 14vw;
    width: 32vw;
    transform: rotate(202deg);
}

.route-e {
    --route-rgb: 3, 231, 255;
    top: 48vh;
    left: 20vw;
    width: 60vw;
    opacity: 0.42;
    transform: rotate(1deg);
}

.route-b::after { animation-delay: -1s; }
.route-c::after { animation-delay: -2s; }
.route-d::after { animation-delay: -3s; }
.route-e::after { animation-delay: -1.7s; }

.access-grid {
    position: relative;
    z-index: 11;
    margin: 0 0 1rem;
}

.access-grid-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
    color: var(--sun-amber);
    font-family: var(--font-header);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 209, 102, 0.3);
}

.access-grid-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 209, 102, 0.6), rgba(3, 231, 255, 0.28), transparent);
}

.district-map {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(7.75rem, 1fr));
    gap: 0.55rem;
}

.district-node {
    --district-rgb: 3, 231, 255;
    position: relative;
    display: block;
    min-width: 0;
    min-height: 2.9rem;
    overflow: hidden;
    padding: 0.78rem 0.62rem 0.7rem 1.85rem;
    border: 1px solid rgba(var(--district-rgb), 0.5);
    background:
        linear-gradient(135deg, rgba(var(--district-rgb), 0.19), rgba(5, 17, 29, 0.72)),
        linear-gradient(315deg, rgba(247, 253, 255, 0.06), transparent 44%),
        rgba(6, 17, 31, 0.74);
    color: var(--text-main);
    text-decoration: none;
    box-shadow:
        0 0 18px rgba(var(--district-rgb), 0.14),
        inset 0 0 14px rgba(247, 253, 255, 0.05);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    cursor: pointer;
    opacity: 0.86;
    animation: districtScan 5.8s ease-in-out infinite;
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.district-node::before {
    content: '';
    position: absolute;
    left: 0.62rem;
    top: calc(50% - 0.32rem);
    width: 0.62rem;
    height: 0.62rem;
    border: 1px solid rgba(247, 253, 255, 0.66);
    background: rgba(var(--district-rgb), 0.4);
    box-shadow: 0 0 12px rgba(var(--district-rgb), 0.46);
    transform: rotate(45deg);
}

.district-node::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(var(--district-rgb), 0.76), rgba(247, 253, 255, 0.34), transparent);
    transform: translateX(-18%);
    animation: districtTrace 4.8s ease-in-out infinite;
}

.district-node b {
    display: block;
    color: rgba(247, 253, 255, 0.86);
    font-family: var(--font-header);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.1;
    overflow-wrap: anywhere;
    text-shadow: 0 0 8px rgba(var(--district-rgb), 0.34);
}

.district-node:hover,
.district-node:focus-visible,
.district-node.active {
    opacity: 1;
    border-color: rgba(var(--district-rgb), 0.86);
    transform: translateY(-2px);
    box-shadow:
        0 0 24px rgba(var(--district-rgb), 0.26),
        inset 0 0 18px rgba(var(--district-rgb), 0.1);
    outline: none;
}

.district-node.active::before {
    background: var(--aero-white);
    box-shadow: 0 0 18px rgba(var(--district-rgb), 0.76);
}

.district-party {
    --district-rgb: 255, 209, 102;
}

.district-quest {
    --district-rgb: 3, 231, 255;
    animation-delay: -1.1s;
}

.district-archive {
    --district-rgb: 143, 125, 255;
    animation-delay: -2.2s;
}

.district-loadout {
    --district-rgb: 143, 125, 255;
    animation-delay: -2.2s;
}

.district-guild {
    --district-rgb: 104, 255, 146;
    animation-delay: -3.1s;
}

.district-signal {
    --district-rgb: 255, 79, 216;
    animation-delay: -3.6s;
}

.district-review {
    --district-rgb: 74, 163, 255;
    animation-delay: -4.4s;
}

.district-shop {
    --district-rgb: 255, 159, 28;
    animation-delay: -5s;
}

.skyway-network {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}

.skyway {
    position: absolute;
    height: 0.34rem;
    border: 1px solid rgba(247, 253, 255, 0.2);
    border-radius: 999px;
    background:
        linear-gradient(90deg, transparent, rgba(3, 231, 255, 0.76), rgba(255, 79, 216, 0.62), rgba(188, 255, 72, 0.5), transparent);
    box-shadow: 0 0 18px rgba(3, 231, 255, 0.32);
    opacity: 0.74;
    overflow: hidden;
    transform-origin: left center;
    animation: skywayPulse 4.8s ease-in-out infinite;
}

.skyway::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 1.15rem;
    height: 0.44rem;
    border-radius: 999px;
    background: var(--aero-white);
    box-shadow: 0 0 14px var(--aero-white), 0 0 28px var(--circuit-teal);
    transform: translate(-120%, -50%);
    animation: packetRun 3.1s linear infinite;
}

.lane-a {
    top: 29vh;
    left: 4vw;
    width: 38vw;
    transform: rotate(13deg);
}

.lane-b {
    top: 24vh;
    right: 4vw;
    width: 34vw;
    transform: rotate(166deg);
    animation-delay: -1.4s;
}

.lane-c {
    top: 64vh;
    left: 8vw;
    width: 36vw;
    transform: rotate(-15deg);
    animation-delay: -2.2s;
}

.lane-d {
    top: 62vh;
    right: 6vw;
    width: 36vw;
    transform: rotate(195deg);
    animation-delay: -0.8s;
}

.lane-e {
    top: 43vh;
    left: 27vw;
    width: 46vw;
    background:
        linear-gradient(90deg, transparent, rgba(255, 209, 102, 0.68), rgba(3, 231, 255, 0.7), rgba(143, 125, 255, 0.52), transparent);
    transform: rotate(1deg);
    animation-delay: -3s;
}

.skyway-node {
    position: absolute;
    width: 1.2rem;
    height: 1.2rem;
    border: 1px solid rgba(247, 253, 255, 0.58);
    background: rgba(3, 231, 255, 0.24);
    box-shadow: 0 0 16px rgba(3, 231, 255, 0.42), inset 0 0 10px rgba(247, 253, 255, 0.18);
    transform: rotate(45deg);
    animation: nodePing 2.6s ease-in-out infinite;
}

.node-a { top: 27vh; left: 26vw; }
.node-b { top: 23vh; right: 27vw; animation-delay: -0.6s; }
.node-c { top: 61vh; left: 35vw; animation-delay: -1.2s; }
.node-d { top: 60vh; right: 32vw; animation-delay: -1.8s; }

.net-skyline {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}

.data-tower {
    position: absolute;
    bottom: 28vh;
    width: 5rem;
    min-height: 10rem;
    border: 1px solid rgba(247, 253, 255, 0.24);
    background:
        linear-gradient(180deg, rgba(143, 125, 255, 0.2), rgba(3, 231, 255, 0.06)),
        repeating-linear-gradient(to bottom, rgba(104, 255, 146, 0.24) 0 3px, transparent 3px 18px),
        linear-gradient(90deg, rgba(247, 253, 255, 0.08), transparent 28%, rgba(255, 79, 216, 0.08) 70%, transparent),
        rgba(3, 13, 24, 0.74);
    box-shadow: 0 0 24px rgba(3, 231, 255, 0.16), inset 0 0 22px rgba(143, 125, 255, 0.1);
    clip-path: polygon(16% 0, 84% 0, 100% 14%, 100% 100%, 0 100%, 0 14%);
    animation: towerSignal 3.5s ease-in-out infinite;
}

.data-tower::before {
    content: '';
    position: absolute;
    inset: 0.55rem;
    border: 1px solid rgba(255, 209, 102, 0.26);
    background:
        linear-gradient(90deg, transparent 0 40%, rgba(247, 253, 255, 0.14) 40% 44%, transparent 44%),
        linear-gradient(180deg, transparent 0 54%, rgba(3, 231, 255, 0.14) 54% 58%, transparent 58%);
}

.data-tower::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -5.8rem;
    width: 1px;
    height: 5.8rem;
    background: linear-gradient(to bottom, rgba(104, 255, 146, 0.68), transparent);
    box-shadow: 0 0 12px rgba(104, 255, 146, 0.35);
}

.data-tower span {
    position: absolute;
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.75rem;
    color: rgba(255, 209, 102, 0.85);
    font-size: 0.72rem;
    text-align: center;
    text-shadow: 0 0 8px rgba(255, 209, 102, 0.4);
}

.tower-a {
    left: 7%;
    min-height: 13rem;
}

.tower-b {
    left: 22%;
    bottom: 34vh;
    width: 6rem;
    min-height: 18rem;
    animation-delay: -0.7s;
}

.tower-c {
    right: 25%;
    bottom: 32vh;
    width: 4.5rem;
    min-height: 15rem;
    animation-delay: -1.3s;
}

.tower-d {
    right: 11%;
    min-height: 20rem;
    animation-delay: -2s;
}

.tower-e {
    left: 46%;
    bottom: 38vh;
    width: 4rem;
    min-height: 10rem;
    opacity: 0.74;
    animation-delay: -2.6s;
}

.tower-f {
    left: 34%;
    bottom: 23vh;
    width: 4.6rem;
    min-height: 12.5rem;
    animation-delay: -1.7s;
}

.tower-g {
    right: 39%;
    bottom: 22vh;
    width: 5.4rem;
    min-height: 11rem;
    animation-delay: -2.9s;
}

.tower-h {
    right: 3%;
    bottom: 40vh;
    width: 4.2rem;
    min-height: 13.8rem;
    opacity: 0.78;
    animation-delay: -3.3s;
}

.floating-district {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

.district-block {
    position: absolute;
    width: 9rem;
    height: 4rem;
    border: 1px solid rgba(247, 253, 255, 0.24);
    background:
        linear-gradient(135deg, rgba(255, 209, 102, 0.24), rgba(3, 231, 255, 0.1)),
        linear-gradient(315deg, rgba(255, 79, 216, 0.16), transparent 46%),
        repeating-linear-gradient(90deg, transparent 0 18px, rgba(188, 255, 72, 0.16) 18px 20px);
    box-shadow: 0 0 26px rgba(255, 209, 102, 0.16), inset 0 0 16px rgba(247, 253, 255, 0.08);
    transform: skewX(-18deg);
    animation: floatDistrict 6s ease-in-out infinite;
}

.district-block::after {
    content: '';
    position: absolute;
    left: 16%;
    right: 16%;
    bottom: -4.2rem;
    height: 4.2rem;
    background: linear-gradient(to bottom, rgba(255, 209, 102, 0.18), transparent);
}

.district-block::before {
    content: '';
    position: absolute;
    inset: 0.45rem;
    border: 1px solid rgba(3, 231, 255, 0.24);
    background:
        linear-gradient(90deg, transparent, rgba(247, 253, 255, 0.16), transparent);
}

.block-a {
    top: 18vh;
    left: 13%;
}

.block-b {
    top: 25vh;
    right: 16%;
    width: 11rem;
    animation-delay: -2s;
}

.block-c {
    top: 47vh;
    left: 58%;
    width: 7rem;
    opacity: 0.72;
    animation-delay: -3.4s;
}

.block-d {
    top: 36vh;
    left: 5%;
    width: 12rem;
    border-color: rgba(3, 231, 255, 0.44);
    animation-delay: -1.1s;
}

.block-e {
    top: 39vh;
    right: 5%;
    width: 10rem;
    border-color: rgba(255, 79, 216, 0.4);
    animation-delay: -2.7s;
}

.block-f {
    top: 70vh;
    left: 43%;
    width: 8.5rem;
    opacity: 0.68;
    animation-delay: -4.2s;
}

.grid-plane {
    position: absolute;
    left: -55%;
    bottom: -54%;
    z-index: 6;
    width: 210%;
    height: 160%;
    background-image:
        linear-gradient(rgba(3, 231, 255, 0.22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(143, 125, 255, 0.18) 1px, transparent 1px),
        linear-gradient(45deg, transparent 49.35%, rgba(255, 209, 102, 0.16) 49.35% 50.65%, transparent 50.65%),
        linear-gradient(135deg, transparent 49.35%, rgba(188, 255, 72, 0.08) 49.35% 50.65%, transparent 50.65%);
    background-size: 58px 58px, 58px 58px, 116px 116px, 116px 116px;
    transform: rotateX(62deg);
    transform-origin: center center;
    animation: moveGrid 6s linear infinite;
}

.grid-plane::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 8%, rgba(3, 4, 7, 0.26) 56%, rgba(3, 4, 7, 0.92) 82%),
        linear-gradient(to top, rgba(3, 4, 7, 0.9), transparent 44%);
}

.data-river {
    position: absolute;
    left: -8%;
    right: -8%;
    bottom: 8vh;
    z-index: 8;
    height: 9rem;
    pointer-events: none;
    transform: perspective(800px) rotateX(64deg);
}

.data-river span {
    position: absolute;
    left: 0;
    width: 140%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(3, 231, 255, 0.95), rgba(255, 79, 216, 0.7), rgba(188, 255, 72, 0.72), transparent);
    box-shadow: 0 0 14px rgba(3, 231, 255, 0.32);
    animation: riverFlow 3s linear infinite;
}

.data-river span:nth-child(1) {
    top: 24%;
}

.data-river span:nth-child(2) {
    top: 52%;
    animation-delay: -1s;
}

.data-river span:nth-child(3) {
    top: 80%;
    animation-delay: -2s;
}

.data-river span:nth-child(4) {
    top: 38%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 209, 102, 0.82), rgba(3, 231, 255, 0.82), transparent);
    animation-delay: -1.5s;
}

.data-river span:nth-child(5) {
    top: 66%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(143, 125, 255, 0.84), rgba(255, 79, 216, 0.7), transparent);
    animation-delay: -2.5s;
}

.pet-container {
    position: relative;
    z-index: 10;
    max-width: 1240px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 4.8rem 2rem 2.5rem;
}

.cyber-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 8.5rem;
    margin-bottom: 1rem;
    padding: 1.15rem 2rem;
    border: 2px solid var(--panel-border);
    background:
        linear-gradient(90deg, rgba(3, 231, 255, 0.2), transparent 28%, rgba(255, 79, 216, 0.14) 64%, rgba(255, 209, 102, 0.12)),
        rgba(5, 15, 31, 0.72);
    box-shadow:
        0 0 32px rgba(3, 231, 255, 0.16),
        inset 0 0 28px rgba(104, 255, 146, 0.08);
    clip-path: polygon(24px 0, calc(100% - 24px) 0, 100% 24px, 100% calc(100% - 24px), calc(100% - 24px) 100%, 24px 100%, 0 calc(100% - 24px), 0 24px);
    backdrop-filter: blur(13px);
}

.cyber-header::before {
    content: '';
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: -1rem;
    height: 1rem;
    background: linear-gradient(90deg, transparent, rgba(104, 255, 146, 0.36), rgba(3, 231, 255, 0.3), transparent);
    filter: blur(8px);
}

.header-center {
    text-align: center;
}

.header-center h1 {
    margin-bottom: 0.25rem;
    color: #ffffff;
    font-size: 3rem;
    line-height: 1;
    text-transform: uppercase;
    text-shadow: 0 0 22px rgba(3, 231, 255, 0.3);
}

.header-center .highlight {
    color: var(--sun-amber);
    text-shadow: 0 0 12px rgba(255, 209, 102, 0.65), 0 0 30px rgba(255, 79, 216, 0.28);
}

.subtitle {
    color: var(--matrix-green);
    font-size: 1rem;
}

.header-edge {
    width: 3rem;
    height: 3rem;
    border: 3px solid var(--circuit-teal);
    filter: drop-shadow(0 0 8px rgba(3, 231, 255, 0.45));
}

.left-edge {
    border-right: none;
    border-bottom: none;
}

.right-edge {
    border-left: none;
    border-top: none;
}

.hub-console {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.hub-console-shell {
    position: relative;
    z-index: 20;
}

.console-cell {
    position: relative;
    min-height: 4rem;
    padding: 0.8rem 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 209, 102, 0.28);
    background:
        linear-gradient(135deg, rgba(255, 209, 102, 0.14), transparent 44%),
        linear-gradient(315deg, rgba(143, 125, 255, 0.12), transparent 50%),
        rgba(6, 17, 31, 0.72);
    box-shadow: inset 0 0 18px rgba(3, 231, 255, 0.05);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    backdrop-filter: blur(9px);
}

.console-trigger {
    width: 100%;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.console-trigger:hover,
.console-trigger:focus-visible,
.console-trigger[aria-expanded="true"] {
    border-color: rgba(3, 231, 255, 0.72);
    background-color: rgba(8, 28, 42, 0.9);
    box-shadow: 0 0 22px rgba(3, 231, 255, 0.18), inset 0 0 18px rgba(104, 255, 146, 0.08);
    outline: none;
    transform: translateY(-1px);
}

.console-cell::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 2px;
    background: linear-gradient(90deg, var(--matrix-green), var(--circuit-teal), var(--hot-pink));
    transform: translateX(-100%);
    animation: statusSweep 4s linear infinite;
}

.console-cell span {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.console-cell strong {
    display: block;
    overflow-wrap: anywhere;
    color: var(--text-main);
    font-family: var(--font-header);
    font-size: 1rem;
    line-height: 1.15;
    text-transform: uppercase;
}

.console-cell small {
    display: block;
    margin-top: 0.3rem;
    overflow: hidden;
    color: var(--matrix-green);
    font-size: 0.68rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.console-value-line {
    display: flex !important;
    min-width: 0;
    align-items: center;
    gap: 0.55rem;
    margin: 0 !important;
}

.console-value-line strong {
    min-width: 0;
}

.time-signal {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--sun-amber);
    border-radius: 50%;
    background: var(--sun-amber);
    box-shadow: 0 0 12px rgba(255, 209, 102, 0.56);
}

.time-signal[data-period="morning"] {
    border-color: var(--route-orange);
    background: linear-gradient(180deg, transparent 46%, var(--route-orange) 47%);
}

.time-signal[data-period="evening"] {
    border-color: var(--hot-pink);
    background: linear-gradient(0deg, transparent 46%, var(--hot-pink) 47%);
    box-shadow: 0 0 12px rgba(255, 79, 216, 0.42);
}

.time-signal[data-period="night"] {
    border-color: var(--neo-violet);
    background: transparent;
    box-shadow: inset 0.35rem -0.1rem 0 var(--neo-violet), 0 0 12px rgba(143, 125, 255, 0.46);
}

.time-signal.large {
    width: 3.5rem;
    height: 3.5rem;
    border-width: 3px;
}

.presence-light {
    display: block;
    flex: 0 0 auto;
    width: 0.72rem;
    height: 0.72rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
}

.presence-light.is-online {
    background: var(--matrix-green);
    box-shadow: 0 0 13px rgba(104, 255, 146, 0.78);
}

.presence-light.is-offline {
    background: var(--signal-red);
    box-shadow: 0 0 10px rgba(255, 95, 109, 0.46);
}

.presence-light.is-connecting {
    background: var(--sun-amber);
    box-shadow: 0 0 10px rgba(255, 209, 102, 0.5);
    animation: nodePing 1.4s ease-in-out infinite;
}

.gate-chevron {
    width: 0.65rem;
    height: 0.65rem;
    margin: 0 0.2rem 0.25rem auto;
    border-right: 2px solid var(--circuit-teal);
    border-bottom: 2px solid var(--circuit-teal);
    transform: rotate(45deg);
}

.grid-gates-menu {
    position: absolute;
    z-index: 60;
    top: calc(100% - 0.4rem);
    right: 0;
    width: min(31rem, 100%);
    max-height: min(70vh, calc(100vh - 19.75rem));
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid rgba(3, 231, 255, 0.7);
    background: rgba(3, 12, 20, 0.97);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7), 0 0 30px rgba(3, 231, 255, 0.18);
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

.grid-gates-menu header,
.system-window-header,
.system-section-heading,
.staff-session-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.grid-gates-menu header {
    margin-bottom: 0.8rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(3, 231, 255, 0.28);
}

.grid-gates-menu header span,
.system-window-header span,
.staff-intro > span {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--matrix-green);
    font-family: var(--font-header);
    font-size: 0.66rem;
    text-transform: uppercase;
}

.grid-gates-menu h2,
.system-window-header h2,
.staff-intro h3 {
    color: var(--aero-white);
    font-size: 1.15rem;
    line-height: 1.2;
    text-transform: uppercase;
}

.icon-btn {
    display: grid;
    flex: 0 0 auto;
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 95, 109, 0.58);
    background: rgba(255, 95, 109, 0.1);
    color: var(--aero-white);
    cursor: pointer;
    font: 1.45rem/1 var(--font-mono);
}

.icon-btn:hover,
.icon-btn:focus-visible {
    background: var(--signal-red);
    color: var(--void);
    outline: none;
}

#grid-gates-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.gate-option {
    min-width: 0;
    min-height: 3.4rem;
    padding: 0.62rem 0.75rem;
    border: 1px solid rgba(74, 163, 255, 0.38);
    background: rgba(74, 163, 255, 0.08);
    color: var(--text-main);
    cursor: pointer;
    font-family: var(--font-mono);
    text-align: left;
}

.gate-option:hover,
.gate-option:focus-visible,
.gate-option.active {
    border-color: var(--matrix-green);
    background: rgba(104, 255, 146, 0.12);
    outline: none;
}

.gate-option span,
.gate-option small {
    display: block;
    overflow-wrap: anywhere;
}

.gate-option span {
    font-family: var(--font-header);
    font-size: 0.78rem;
}

.gate-option small {
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.64rem;
    text-transform: uppercase;
}

.grid-gates-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(3, 231, 255, 0.2);
}

body.system-open {
    overflow: hidden;
}

.hub-system-overlay {
    position: fixed;
    z-index: 1400;
    inset: 0;
    display: grid;
    padding: 3vh 1rem;
    place-items: center;
}

.system-scrim {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(0, 3, 8, 0.82);
    cursor: default;
    backdrop-filter: blur(8px);
}

.system-window {
    position: relative;
    z-index: 1;
    width: min(64rem, 96vw);
    max-height: 94vh;
    overflow-y: auto;
    padding: 1.25rem;
    border: 1px solid rgba(3, 231, 255, 0.72);
    background:
        linear-gradient(rgba(3, 231, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(3, 231, 255, 0.045) 1px, transparent 1px),
        rgba(4, 14, 24, 0.98);
    background-size: 32px 32px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.74), 0 0 42px rgba(3, 231, 255, 0.18);
    clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%, 0 16px);
}

.system-window-header {
    position: sticky;
    z-index: 5;
    top: -1.25rem;
    margin: -1.25rem -1.25rem 1.2rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(3, 231, 255, 0.36);
    background: rgba(3, 12, 20, 0.97);
}

.system-view {
    min-width: 0;
}

.area-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    min-height: 8.5rem;
    margin: 0 -1.25rem 1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 209, 102, 0.24);
    background: rgba(255, 209, 102, 0.06);
}

.area-hero span,
.presence-count > span,
.creator-presence span,
.sync-season-copy > span {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
}

.area-hero strong {
    display: block;
    color: var(--aero-white);
    font-family: var(--font-header);
    font-size: 2rem;
}

.area-hero p {
    color: var(--sun-amber);
}

.segmented-control {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 18rem;
    margin: 0 auto 1rem;
    border: 1px solid rgba(74, 163, 255, 0.46);
}

.segmented-control button,
.staff-tabs button,
.editor-language-tabs button {
    min-height: 2.6rem;
    border: 0;
    background: rgba(74, 163, 255, 0.08);
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-header);
}

.segmented-control button + button,
.editor-language-tabs button + button {
    border-left: 1px solid rgba(74, 163, 255, 0.36);
}

.segmented-control button.active,
.segmented-control button:hover,
.segmented-control button:focus-visible,
.staff-tabs button.active,
.staff-tabs button:hover,
.staff-tabs button:focus-visible,
.editor-language-tabs button.active,
.editor-language-tabs button:hover,
.editor-language-tabs button:focus-visible {
    background: var(--circuit-teal);
    color: #001115;
    outline: none;
}

.area-detail-list {
    margin-bottom: 1rem;
    border-top: 1px solid rgba(3, 231, 255, 0.24);
}

.area-detail-list > div {
    display: grid;
    grid-template-columns: minmax(8rem, 0.4fr) 1fr;
    gap: 1rem;
    padding: 0.78rem 0;
    border-bottom: 1px solid rgba(3, 231, 255, 0.18);
}

.area-detail-list dt {
    color: var(--text-muted);
}

.area-detail-list dd {
    color: var(--aero-white);
    overflow-wrap: anywhere;
}

.switch-control {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 0.9rem 0;
    cursor: pointer;
}

.switch-control strong,
.switch-control small {
    display: block;
}

.switch-control strong {
    margin-bottom: 0.22rem;
    color: var(--aero-white);
    font-family: var(--font-header);
    font-size: 0.84rem;
}

.switch-control small {
    color: var(--text-muted);
    line-height: 1.35;
}

.switch-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch-control i {
    position: relative;
    width: 3.2rem;
    height: 1.7rem;
    border: 1px solid rgba(178, 200, 214, 0.58);
    background: rgba(178, 200, 214, 0.12);
}

.switch-control i::after {
    content: '';
    position: absolute;
    top: 0.21rem;
    left: 0.23rem;
    width: 1.15rem;
    height: 1.15rem;
    background: var(--text-muted);
    transition: transform 0.2s ease, background 0.2s ease;
}

.switch-control input:checked + i {
    border-color: var(--matrix-green);
    background: rgba(104, 255, 146, 0.15);
}

.switch-control input:checked + i::after {
    background: var(--matrix-green);
    transform: translateX(1.45rem);
}

.switch-control input:focus-visible + i {
    outline: 2px solid var(--circuit-teal);
    outline-offset: 2px;
}

.system-notice,
.data-attribution,
.presence-privacy {
    margin-top: 0.8rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.system-notice:not(:empty) {
    padding: 0.7rem 0.8rem;
    border-left: 3px solid var(--sun-amber);
    background: rgba(255, 209, 102, 0.08);
    color: var(--sun-amber);
}

.sync-overview {
    display: grid;
    grid-template-columns: 10rem 1fr;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(3, 231, 255, 0.24);
}

.sync-dial {
    display: grid;
    width: 9rem;
    height: 9rem;
    place-content: center;
    border: 1px solid rgba(3, 231, 255, 0.52);
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(3, 12, 20, 0.98) 57%, transparent 59%), conic-gradient(var(--matrix-green) calc(var(--sync-value) * 1%), rgba(74, 163, 255, 0.14) 0);
    box-shadow: 0 0 28px rgba(104, 255, 146, 0.12);
    text-align: center;
}

.sync-dial strong,
.presence-count > strong {
    display: block;
    color: var(--aero-white);
    font-family: var(--font-header);
    font-size: 1.55rem;
}

.sync-dial span {
    margin-top: 0.2rem;
    color: var(--matrix-green);
    font-size: 0.62rem;
}

.sync-season-copy h3 {
    margin: 0.25rem 0;
    color: var(--aero-white);
    font-size: 1.3rem;
}

.sync-season-copy p {
    margin-top: 0.28rem;
    color: var(--text-muted);
}

.sync-category-section,
.sync-item-section {
    margin-top: 1rem;
}

.sync-category-section > h3,
.system-section-heading h3,
.system-form h3 {
    margin-bottom: 0.75rem;
    color: var(--aero-white);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.sync-category-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.sync-category {
    min-width: 0;
}

.sync-category > div:first-child,
.sync-item > div:first-child,
.review-item > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: baseline;
}

.sync-category span,
.sync-category strong {
    overflow-wrap: anywhere;
    font-size: 0.76rem;
}

.sync-category strong {
    color: var(--matrix-green);
}

.sync-track {
    height: 0.5rem;
    margin-top: 0.4rem;
    overflow: hidden;
    background: rgba(74, 163, 255, 0.12);
}

.sync-track i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--matrix-green), var(--circuit-teal));
}

.system-section-heading {
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(3, 231, 255, 0.24);
}

.system-section-heading span {
    color: var(--matrix-green);
    font-family: var(--font-header);
}

.sync-item-list,
.review-queue {
    display: grid;
    gap: 0.65rem;
}

.sync-item,
.review-item {
    padding: 0.85rem;
    border: 1px solid rgba(74, 163, 255, 0.28);
    border-radius: 4px;
    background: rgba(4, 18, 30, 0.72);
}

.sync-item h4,
.review-item h4 {
    min-width: 0;
    color: var(--aero-white);
    font-family: var(--font-header);
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.sync-item strong,
.review-item > div:first-child span {
    flex: 0 0 auto;
    color: var(--sun-amber);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.sync-item p,
.review-item p {
    margin-top: 0.38rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.empty-state {
    padding: 1.4rem 1rem;
    border: 1px dashed rgba(178, 200, 214, 0.32);
    color: var(--text-muted);
    text-align: center;
}

.presence-count {
    padding: 1.4rem 1rem;
    border-bottom: 1px solid rgba(3, 231, 255, 0.24);
    text-align: center;
}

.presence-count > strong {
    margin: 0.35rem 0;
    font-size: 3rem;
}

.presence-count p,
.creator-presence p {
    color: var(--text-muted);
}

.creator-presence {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 28rem;
    margin: 1.2rem auto;
    padding: 1rem 0;
}

.creator-presence .presence-light {
    width: 1.25rem;
    height: 1.25rem;
}

.creator-presence strong {
    display: block;
    margin: 0.2rem 0;
    color: var(--aero-white);
    font-family: var(--font-header);
    font-size: 1.2rem;
}

.presence-privacy {
    max-width: 38rem;
    margin-right: auto;
    margin-left: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(3, 231, 255, 0.2);
    text-align: center;
}

.staff-intro {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(3, 231, 255, 0.24);
}

.staff-intro p {
    margin-top: 0.35rem;
    color: var(--text-muted);
}

.system-form {
    display: grid;
    gap: 0.85rem;
}

.system-form.compact {
    max-width: 28rem;
    margin: 0 auto;
}

.system-form label,
.system-form label > span {
    display: block;
}

.system-form label > span {
    margin-bottom: 0.3rem;
    color: var(--text-muted);
    font-size: 0.76rem;
    text-transform: uppercase;
}

.system-form input,
.system-form select,
.system-form textarea,
.review-item textarea {
    width: 100%;
    min-height: 2.65rem;
    border: 1px solid rgba(74, 163, 255, 0.44);
    border-radius: 0;
    background: rgba(2, 9, 17, 0.86);
    color: var(--text-main);
    font: 0.9rem var(--font-mono);
    padding: 0.62rem 0.7rem;
}

.system-form textarea,
.review-item textarea {
    min-height: 5rem;
    resize: vertical;
}

.system-form input:focus,
.system-form select:focus,
.system-form textarea:focus,
.review-item textarea:focus {
    border-color: var(--circuit-teal);
    box-shadow: 0 0 0 2px rgba(3, 231, 255, 0.13);
    outline: none;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.system-action {
    min-height: 2.7rem;
    padding: 0.58rem 0.85rem;
    border: 1px solid rgba(74, 163, 255, 0.5);
    background: rgba(74, 163, 255, 0.1);
    color: var(--text-main);
    cursor: pointer;
    font-family: var(--font-header);
    font-size: 0.7rem;
    overflow-wrap: anywhere;
    text-transform: uppercase;
}

.system-action.primary {
    border-color: var(--matrix-green);
    background: rgba(104, 255, 146, 0.12);
}

.system-action.danger {
    border-color: var(--signal-red);
    background: rgba(255, 95, 109, 0.1);
}

.system-action:hover,
.system-action:focus-visible {
    background: var(--circuit-teal);
    color: #001115;
    outline: none;
}

.system-action.danger:hover,
.system-action.danger:focus-visible {
    background: var(--signal-red);
}

.staff-session-bar {
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(3, 231, 255, 0.24);
}

.staff-session-bar span,
.staff-session-bar strong {
    display: block;
}

.staff-session-bar span {
    color: var(--matrix-green);
    font-size: 0.68rem;
}

.staff-session-bar strong {
    color: var(--aero-white);
    font-family: var(--font-header);
}

.staff-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 1rem;
    border: 1px solid rgba(74, 163, 255, 0.4);
}

.staff-tabs button + button {
    border-left: 1px solid rgba(74, 163, 255, 0.3);
}

.editor-language-tabs {
    display: grid;
    grid-template-columns: 4rem 5rem 1fr;
    align-items: center;
    border: 1px solid rgba(74, 163, 255, 0.4);
}

.localized-editor {
    display: grid;
    gap: 0.8rem;
}

.editor-language-panel {
    display: grid;
    gap: 0.85rem;
}

.staff-tab-view[data-staff-view="settings"] > form + form {
    margin-top: 1.1rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(3, 231, 255, 0.24);
}

.editor-language-tabs span {
    padding: 0.5rem 0.75rem;
    color: var(--sun-amber);
    font-size: 0.7rem;
    text-align: right;
}

#staff-mfa-enroll {
    display: grid;
    gap: 0.6rem;
    justify-items: center;
    margin: 1rem auto;
}

#staff-mfa-enroll img {
    width: min(15rem, 72vw);
    aspect-ratio: 1;
    background: white;
}

#staff-mfa-enroll code {
    max-width: 100%;
    padding: 0.5rem;
    overflow-wrap: anywhere;
    color: var(--sun-amber);
}

.review-item textarea {
    margin-top: 0.7rem;
}

.review-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.55rem;
}

.ui-panel {
    position: relative;
    overflow: hidden;
    padding: 1.4rem;
    border: 1px solid var(--panel-border);
    background:
        linear-gradient(rgba(3, 231, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(143, 125, 255, 0.06) 1px, transparent 1px),
        linear-gradient(135deg, rgba(3, 231, 255, 0.18), transparent 28%),
        linear-gradient(315deg, rgba(255, 79, 216, 0.12), transparent 24%),
        linear-gradient(180deg, rgba(8, 24, 42, 0.76), rgba(3, 10, 16, 0.82));
    background-size: 38px 38px, 38px 38px, auto, auto, auto;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.42),
        0 0 38px rgba(3, 231, 255, 0.14),
        inset 0 0 32px rgba(104, 255, 146, 0.06);
    clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%, 0 18px);
    backdrop-filter: blur(15px);
}

.ui-panel::before,
.ui-panel::after {
    content: '';
    position: absolute;
    z-index: 2;
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--circuit-teal);
    pointer-events: none;
}

.ui-panel::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.ui-panel::after {
    right: -1px;
    bottom: -1px;
    border-top: none;
    border-left: none;
}

.terminal-rail,
.terminal-depth,
.terminal-signal {
    position: absolute;
    display: block;
    pointer-events: none;
}

.terminal-rail {
    z-index: 1;
    background: linear-gradient(90deg, transparent, rgba(247, 253, 255, 0.34), rgba(3, 231, 255, 0.42), transparent);
    box-shadow: 0 0 18px rgba(3, 231, 255, 0.18);
    opacity: 0.72;
}

.rail-top,
.rail-bottom {
    left: 2.1rem;
    right: 2.1rem;
    height: 1px;
}

.rail-top {
    top: 0.78rem;
}

.rail-bottom {
    bottom: 0.78rem;
}

.rail-left,
.rail-right {
    top: 2rem;
    bottom: 2rem;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(247, 253, 255, 0.26), rgba(3, 231, 255, 0.34), transparent);
}

.rail-left {
    left: 0.85rem;
}

.rail-right {
    right: 0.85rem;
}

.terminal-depth {
    z-index: 0;
    width: 18rem;
    height: 130%;
    top: -15%;
    background:
        linear-gradient(90deg, rgba(3, 231, 255, 0.14), transparent 66%),
        repeating-linear-gradient(180deg, transparent 0 32px, rgba(247, 253, 255, 0.04) 32px 33px);
    opacity: 0.5;
    transform: skewX(-16deg);
}

.depth-left {
    left: -12rem;
}

.depth-right {
    right: -12rem;
    transform: skewX(16deg) scaleX(-1);
}

.terminal-signal {
    z-index: 2;
    width: 7rem;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(104, 255, 146, 0.8), rgba(3, 231, 255, 0.65), transparent);
    box-shadow: 0 0 12px rgba(104, 255, 146, 0.3);
    animation: terminalSignal 5s linear infinite;
}

.signal-a {
    top: 1.12rem;
    left: 12%;
}

.signal-b {
    right: 12%;
    bottom: 1.12rem;
    animation-delay: -2.5s;
}

.gate-panel-header {
    position: relative;
    z-index: 4;
    margin-bottom: 1rem;
    padding: 0.15rem 0.25rem 1rem;
    border-bottom: 1px solid rgba(3, 231, 255, 0.26);
}

.gate-panel-header span {
    display: block;
    margin-bottom: 0.32rem;
    color: var(--matrix-green);
    font-family: var(--font-header);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    text-shadow: 0 0 9px rgba(104, 255, 146, 0.28);
}

.gate-panel-header h2 {
    margin-bottom: 0.35rem;
    color: var(--aero-white);
    font-size: clamp(1.35rem, 2.6vw, 2.35rem);
    line-height: 1;
    text-transform: uppercase;
    text-shadow: 0 0 14px rgba(3, 231, 255, 0.28);
}

.gate-panel-header p {
    max-width: 52rem;
    color: var(--text-muted);
    font-size: 0.94rem;
    line-height: 1.45;
}

.cyber-nav {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    gap: 0.55rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(3, 231, 255, 0.26);
}

.cyber-nav.hidden {
    display: none;
}

.loadout-zone-nav {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.55rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(3, 231, 255, 0.26);
}

.loadout-zone-btn {
    position: relative;
    min-height: 3rem;
    overflow: hidden;
    border: 1px solid rgba(255, 79, 216, 0.42);
    background:
        linear-gradient(135deg, rgba(255, 79, 216, 0.16), transparent 52%),
        linear-gradient(315deg, rgba(255, 209, 102, 0.12), transparent 48%),
        rgba(4, 14, 25, 0.66);
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-header);
    font-size: 0.82rem;
    line-height: 1.1;
    padding: 0.75rem 0.85rem 0.75rem 2.1rem;
    text-align: left;
    text-transform: uppercase;
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}

.loadout-zone-btn::before {
    content: '';
    position: absolute;
    left: 0.8rem;
    top: calc(50% - 0.28rem);
    width: 0.56rem;
    height: 0.56rem;
    border: 1px solid currentColor;
    background: rgba(255, 79, 216, 0.16);
    transform: rotate(45deg);
}

.loadout-zone-btn:hover,
.loadout-zone-btn.active {
    border-color: rgba(255, 79, 216, 0.86);
    background:
        linear-gradient(135deg, rgba(255, 79, 216, 0.26), rgba(255, 209, 102, 0.16)),
        linear-gradient(315deg, rgba(3, 231, 255, 0.12), transparent 46%),
        rgba(6, 20, 34, 0.86);
    color: var(--text-main);
    box-shadow: 0 0 20px rgba(255, 79, 216, 0.18), inset 0 0 18px rgba(3, 231, 255, 0.1);
    transform: translateY(-1px);
}

.loadout-zone-btn.active::before {
    background: var(--sun-amber);
    border-color: var(--sun-amber);
    box-shadow: 0 0 12px rgba(255, 209, 102, 0.56);
}

.filter-btn {
    position: relative;
    min-height: 3rem;
    overflow: hidden;
    border: 1px solid rgba(74, 163, 255, 0.58);
    background:
        linear-gradient(135deg, rgba(74, 163, 255, 0.18), transparent 54%),
        linear-gradient(315deg, rgba(143, 125, 255, 0.1), transparent 50%),
        rgba(4, 14, 25, 0.62);
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-header);
    font-size: 0.86rem;
    line-height: 1.1;
    padding: 0.75rem 0.85rem 0.75rem 2.1rem;
    text-align: left;
    text-transform: uppercase;
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}

.filter-btn::before {
    content: '';
    position: absolute;
    left: 0.8rem;
    top: calc(50% - 0.28rem);
    width: 0.56rem;
    height: 0.56rem;
    border: 1px solid currentColor;
    background: rgba(255, 209, 102, 0.12);
    transform: rotate(45deg);
}

.filter-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
    transform: translateX(-120%);
    transition: transform 0.34s ease;
}

.filter-btn:hover {
    border-color: var(--circuit-teal);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 0 16px rgba(3, 231, 255, 0.18);
}

.filter-btn:hover::after {
    transform: translateX(120%);
}

.filter-btn.active {
    border-color: var(--sun-amber);
    background:
        linear-gradient(135deg, rgba(255, 209, 102, 0.28), rgba(3, 231, 255, 0.2)),
        linear-gradient(315deg, rgba(255, 79, 216, 0.14), transparent 46%),
        rgba(6, 20, 34, 0.86);
    color: var(--text-main);
    box-shadow: 0 0 20px rgba(255, 209, 102, 0.18), inset 0 0 18px rgba(3, 231, 255, 0.12);
}

.filter-btn.active::before {
    background: var(--matrix-green);
    border-color: var(--matrix-green);
    box-shadow: 0 0 12px rgba(104, 255, 146, 0.56);
}

.cyber-grid-container {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
    gap: 1rem;
}

.gate-detail {
    position: relative;
    z-index: 4;
    min-height: 13.5rem;
    padding: 1.2rem;
    border: 1px solid rgba(3, 231, 255, 0.32);
    background:
        linear-gradient(rgba(3, 231, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(143, 125, 255, 0.05) 1px, transparent 1px),
        linear-gradient(135deg, rgba(3, 231, 255, 0.13), transparent 42%),
        rgba(5, 17, 29, 0.7);
    background-size: 26px 26px, 26px 26px, auto, auto;
    clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
    box-shadow: inset 0 0 24px rgba(104, 255, 146, 0.06);
}

.gate-detail h3 {
    margin-bottom: 0.55rem;
    color: var(--sun-amber);
    font-size: 1rem;
    text-transform: uppercase;
}

.gate-detail p {
    max-width: 58rem;
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.45;
}

.gate-detail ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 0.65rem;
    margin-top: 1rem;
    list-style: none;
}

.gate-detail li {
    position: relative;
    min-height: 3rem;
    padding: 0.72rem 0.72rem 0.72rem 2rem;
    border: 1px solid rgba(74, 163, 255, 0.24);
    background: rgba(4, 14, 25, 0.56);
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.25;
    text-transform: uppercase;
}

.gate-detail li::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 0.95rem;
    width: 0.48rem;
    height: 0.48rem;
    border: 1px solid var(--matrix-green);
    background: rgba(104, 255, 146, 0.18);
    box-shadow: 0 0 10px rgba(104, 255, 146, 0.3);
    transform: rotate(45deg);
}

.project-card {
    --card-accent-rgb: 3, 231, 255;
    --card-secondary-rgb: 143, 125, 255;
    position: relative;
    display: flex;
    min-height: 13.5rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2.45rem 1rem 1.35rem;
    border: 1px solid rgba(var(--card-accent-rgb), 0.34);
    background:
        linear-gradient(rgba(var(--card-accent-rgb), 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--card-secondary-rgb), 0.05) 1px, transparent 1px),
        linear-gradient(135deg, rgba(var(--card-accent-rgb), 0.16), transparent 42%),
        linear-gradient(315deg, rgba(var(--card-secondary-rgb), 0.1), transparent 34%),
        linear-gradient(180deg, rgba(143, 125, 255, 0.07), transparent 62%),
        rgba(5, 17, 29, 0.72);
    background-size: 24px 24px, 24px 24px, auto, auto, auto, auto;
    color: var(--text-main);
    text-decoration: none;
    transition: transform 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease, background 0.26s ease;
    clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
    animation: cardBoot 0.45s ease both;
}

.project-card--card-games {
    --card-accent-rgb: 255, 209, 102;
    --card-secondary-rgb: 143, 125, 255;
}

.project-card--misc {
    --card-accent-rgb: 104, 255, 146;
    --card-secondary-rgb: 3, 231, 255;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background:
        linear-gradient(90deg, rgba(var(--card-accent-rgb), 0.13), transparent 18% 82%, rgba(var(--card-accent-rgb), 0.1)),
        linear-gradient(180deg, rgba(247, 253, 255, 0.035), transparent 28% 72%, rgba(var(--card-secondary-rgb), 0.07));
    pointer-events: none;
}

.project-card::after {
    content: 'ACCESS';
    position: absolute;
    top: 0.65rem;
    right: 0.75rem;
    color: rgba(104, 255, 146, 0.74);
    font-size: 0.72rem;
}

.project-card:hover {
    border-color: rgba(var(--card-accent-rgb), 0.78);
    background:
        linear-gradient(rgba(var(--card-accent-rgb), 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--card-secondary-rgb), 0.07) 1px, transparent 1px),
        linear-gradient(135deg, rgba(var(--card-accent-rgb), 0.22), rgba(104, 255, 146, 0.1)),
        linear-gradient(315deg, rgba(var(--card-secondary-rgb), 0.17), transparent 36%),
        linear-gradient(180deg, rgba(143, 125, 255, 0.1), transparent 62%),
        rgba(6, 22, 34, 0.9);
    background-size: 24px 24px, 24px 24px, auto, auto, auto, auto;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.46), 0 0 24px rgba(var(--card-accent-rgb), 0.16);
    transform: translateY(-0.35rem);
}

.project-card--linked {
    border-color: rgba(var(--card-accent-rgb), 0.92);
    box-shadow: 0 0 0 2px rgba(255, 209, 102, 0.62), 0 0 34px rgba(var(--card-accent-rgb), 0.34);
}

.project-card--linked::after {
    color: var(--sun-amber);
}

.card-icon-wrapper {
    position: relative;
    display: flex;
    width: 5rem;
    height: 5rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    border: 2px solid rgba(var(--card-secondary-rgb), 0.64);
    background:
        linear-gradient(135deg, rgba(var(--card-secondary-rgb), 0.12), rgba(var(--card-accent-rgb), 0.14)),
        rgba(3, 4, 7, 0.82);
    box-shadow: inset 0 0 16px rgba(var(--card-secondary-rgb), 0.22), 0 0 14px rgba(var(--card-secondary-rgb), 0.12);
    transform: rotate(45deg);
    transition: border-color 0.26s ease, box-shadow 0.26s ease, transform 0.26s ease;
}

.card-icon-wrapper::before,
.card-icon-wrapper::after {
    content: '';
    position: absolute;
    background: rgba(3, 231, 255, 0.4);
}

.card-icon-wrapper::before {
    left: -0.75rem;
    right: -0.75rem;
    top: 50%;
    height: 1px;
}

.card-icon-wrapper::after {
    top: -0.75rem;
    bottom: -0.75rem;
    left: 50%;
    width: 1px;
}

.project-card:hover .card-icon-wrapper {
    border-color: rgba(var(--card-accent-rgb), 0.84);
    box-shadow: inset 0 0 18px rgba(var(--card-accent-rgb), 0.36), 0 0 18px rgba(var(--card-accent-rgb), 0.26);
    transform: rotate(45deg) scale(1.05);
}

.card-icon {
    position: relative;
    z-index: 2;
    font-size: 2.3rem;
    line-height: 1;
    transform: rotate(-45deg);
}

.card-title {
    max-width: 100%;
    margin-bottom: 0.5rem;
    color: #ffffff;
    font-family: var(--font-header);
    font-size: 1rem;
    line-height: 1.18;
    overflow-wrap: anywhere;
    text-align: center;
    text-transform: uppercase;
}

.card-category {
    color: var(--matrix-green);
    font-size: 0.82rem;
    overflow-wrap: anywhere;
    text-align: center;
}

@keyframes introGrid {
    from { background-position: 0 0, 0 0; }
    to { background-position: 0 42px, 42px 0; }
}

@keyframes glitchAnim {
    0% { clip: rect(21px, 9999px, 83px, 0); }
    20% { clip: rect(61px, 9999px, 12px, 0); }
    40% { clip: rect(32px, 9999px, 51px, 0); }
    60% { clip: rect(89px, 9999px, 2px, 0); }
    80% { clip: rect(11px, 9999px, 42px, 0); }
    100% { clip: rect(78px, 9999px, 99px, 0); }
}

@keyframes glitchAnimTwo {
    0% { clip: rect(31px, 9999px, 13px, 0); }
    20% { clip: rect(91px, 9999px, 82px, 0); }
    40% { clip: rect(12px, 9999px, 71px, 0); }
    60% { clip: rect(59px, 9999px, 22px, 0); }
    80% { clip: rect(81px, 9999px, 52px, 0); }
    100% { clip: rect(8px, 9999px, 69px, 0); }
}

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

@keyframes expandTunnel {
    0% {
        opacity: 1;
        box-shadow: 0 0 12px var(--circuit-teal), inset 0 0 12px var(--circuit-teal);
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        border-width: 50px;
        transform: translate(-50%, -50%) scale(200);
    }
}

@keyframes flashScreen {
    0% { opacity: 0; }
    20% { opacity: 1; }
    100% { opacity: 0; display: none; }
}

@keyframes matrixDrift {
    from { background-position: 0 0, 0 0, 0 0, 0 0; }
    to { background-position: 44px 44px, -44px 44px, 180px 0, -260px 0; }
}

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

@keyframes corePulse {
    0%, 100% {
        filter: brightness(0.96);
        opacity: 0.82;
    }
    50% {
        filter: brightness(1.28);
        opacity: 1;
    }
}

@keyframes routePulse {
    0%, 100% {
        filter: brightness(0.9);
        opacity: 0.42;
    }
    50% {
        filter: brightness(1.22);
        opacity: 0.78;
    }
}

@keyframes latticePacket {
    from { transform: translate(-120%, -50%); }
    to { transform: translate(5600%, -50%); }
}

@keyframes districtScan {
    0%, 100% {
        filter: brightness(0.94);
        opacity: 0.72;
    }
    50% {
        filter: brightness(1.12);
        opacity: 0.92;
    }
}

@keyframes districtTrace {
    0%, 100% {
        opacity: 0.38;
        transform: translateX(-36%);
    }
    50% {
        opacity: 0.82;
        transform: translateX(8%);
    }
}

@keyframes skywayPulse {
    0%, 100% {
        filter: hue-rotate(0deg) brightness(0.96);
    }
    50% {
        filter: hue-rotate(14deg) brightness(1.18);
    }
}

@keyframes packetRun {
    from { transform: translate(-120%, -50%); }
    to { transform: translate(6200%, -50%); }
}

@keyframes sparkOrbit {
    from { transform: rotate(0deg) translateX(clamp(5.4rem, 12vw, 9.8rem)) rotate(0deg); }
    to { transform: rotate(360deg) translateX(clamp(5.4rem, 12vw, 9.8rem)) rotate(-360deg); }
}

@keyframes nodePing {
    0%, 100% {
        opacity: 0.58;
        box-shadow: 0 0 16px rgba(3, 231, 255, 0.36), inset 0 0 10px rgba(247, 253, 255, 0.16);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 22px rgba(255, 79, 216, 0.42), 0 0 38px rgba(3, 231, 255, 0.26), inset 0 0 12px rgba(247, 253, 255, 0.24);
    }
}

@keyframes terminalSignal {
    0% {
        opacity: 0;
        transform: translateX(-18%);
    }
    18%, 62% {
        opacity: 0.74;
    }
    100% {
        opacity: 0;
        transform: translateX(36%);
    }
}

@keyframes towerSignal {
    0%, 100% { filter: brightness(0.88); }
    50% { filter: brightness(1.18); }
}

@keyframes floatDistrict {
    0%, 100% { transform: translateY(0) skewX(-18deg); }
    50% { transform: translateY(-0.8rem) skewX(-18deg); }
}

@keyframes moveGrid {
    from { background-position: 0 0, 0 0, 0 0, 0 0; }
    to { background-position: 0 58px, 58px 0, 116px 116px, -116px 116px; }
}

@keyframes riverFlow {
    from { transform: translateX(-28%); }
    to { transform: translateX(12%); }
}

@keyframes statusSweep {
    0% { transform: translateX(-100%); }
    55%, 100% { transform: translateX(100%); }
}

@keyframes cardBoot {
    from {
        opacity: 0;
        transform: translateY(0.8rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .hub-console {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .district-map {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .route-lattice {
        opacity: 0.48;
    }

    .tower-a,
    .tower-c,
    .tower-e,
    .tower-f,
    .tower-g,
    .tower-h,
    .block-d,
    .block-e,
    .block-f,
    .block-c {
        display: none;
    }

    .tower-b {
        left: 6%;
    }

    .tower-d {
        right: 6%;
    }
}

@media (max-width: 768px) {
    .language-control {
        top: 0.75rem;
        right: 0.75rem;
        gap: 0.25rem;
        padding: 0.25rem;
    }

    .language-control span {
        display: none;
    }

    .language-btn {
        min-width: 2.75rem;
        min-height: 1.9rem;
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .catchphrase-logo {
        top: 0.75rem;
        left: 0.75rem;
        max-width: calc(100vw - 8.25rem);
        padding: 0.44rem 0.62rem 0.4rem;
    }

    .catchphrase-logo span {
        font-size: 0.58rem;
    }

    .catchphrase-logo strong {
        font-size: 0.72rem;
    }

    .jack-in-content {
        padding: 1.4rem 1rem;
    }

    .glitch-text {
        font-size: 2.25rem;
        padding: 0 1rem;
    }

    .status-text {
        font-size: 1.15rem;
    }

    #jack-in-btn {
        max-width: calc(100vw - 2rem);
        padding: 0.85rem 1.25rem;
        font-size: 1rem;
    }

    .portal-gate {
        top: 60vh;
        width: 23rem;
        height: 23rem;
    }

    .hub-spoke {
        top: 60vh;
        width: 45vw;
    }

    .skyway {
        opacity: 0.44;
    }

    .pet-container {
        padding: 4.4rem 1rem 1rem;
    }

    .cyber-header {
        min-height: 7.25rem;
        padding: 1rem;
    }

    .header-center h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .header-edge {
        width: 2rem;
        height: 2rem;
    }

    .hub-console {
        grid-template-columns: 1fr;
    }

    .district-map {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
        margin-bottom: 0.85rem;
    }

    .district-node {
        min-height: 2.55rem;
        padding: 0.54rem 0.6rem 0.5rem 1.8rem;
    }

    .district-shop {
        grid-column: 1 / -1;
    }

    .ui-panel {
        padding: 1rem;
    }

    .terminal-depth {
        opacity: 0.32;
    }

    .terminal-signal {
        width: 4.5rem;
    }

    .cyber-nav {
        grid-template-columns: 1fr;
    }

    .cyber-grid-container {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .project-card {
        min-height: 12.4rem;
    }
}

@media (max-width: 480px) {
    .cyber-header {
        gap: 0.75rem;
    }

    .header-center h1 {
        font-size: 1.65rem;
    }

    .portal-gate,
    .route-lattice,
    .floating-district,
    .net-skyline {
        opacity: 0.46;
    }

    .terminal-rail,
    .terminal-signal {
        opacity: 0.44;
    }

    .district-node {
        opacity: 0.72;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}

@media (max-width: 768px) {
    .hub-console {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .console-cell {
        min-height: 5.25rem;
        padding: 0.7rem 0.75rem;
    }

    .grid-gates-menu {
        position: fixed;
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-height: 82vh;
        padding: 1rem;
        clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%, 0 14px);
    }

    .hub-system-overlay {
        align-items: end;
        padding: 0;
    }

    .system-window {
        width: 100%;
        max-height: 92vh;
        padding: 1rem;
        clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%, 0 14px);
    }

    .system-window-header {
        top: -1rem;
        margin: -1rem -1rem 1rem;
        padding: 0.85rem 1rem;
    }

    .area-hero {
        margin: 0 -1rem 1rem;
    }

    .sync-overview {
        grid-template-columns: 8rem 1fr;
        gap: 1rem;
    }

    .sync-dial {
        width: 7.5rem;
        height: 7.5rem;
    }

    .sync-category-list {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .review-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .hub-console {
        grid-template-columns: 1fr;
    }

    .console-cell {
        min-height: 4.6rem;
    }

    #grid-gates-options,
    .grid-gates-actions {
        grid-template-columns: 1fr;
    }

    .system-window-header h2,
    .grid-gates-menu h2 {
        font-size: 0.98rem;
    }

    .area-hero {
        min-height: 7rem;
    }

    .area-hero strong {
        font-size: 1.45rem;
    }

    .area-detail-list > div {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .sync-overview {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .staff-tabs {
        grid-template-columns: 1fr;
    }

    .staff-tabs button + button {
        border-top: 1px solid rgba(74, 163, 255, 0.3);
        border-left: 0;
    }

    .editor-language-tabs {
        grid-template-columns: 1fr 1fr;
    }

    .editor-language-tabs span {
        grid-column: 1 / -1;
        border-top: 1px solid rgba(74, 163, 255, 0.3);
        text-align: left;
    }

    .switch-control {
        align-items: start;
    }
}
