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

:root {
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.78);
    --glass: rgba(255, 255, 255, 0.14);
    --glass-strong: rgba(255, 255, 255, 0.86);
    --line: rgba(255, 255, 255, 0.28);
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
    --dark: #1f2933;
    --nav-bg: rgba(10, 18, 28, 0.42);
    --overlay-bg: linear-gradient(to bottom, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.18));
    --panel-bg: rgba(255, 255, 255, 0.18);
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-text: #1f2933;
    --card-muted: #5f6b76;
}

:root[data-theme="dark"] {
    --overlay-bg: linear-gradient(to bottom, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.58));
    --panel-bg: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(255, 255, 255, 0.88);
}

html {
    min-height: 100%;
    min-height: 100dvh;
    background: #18212f;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: #18212f;
    overflow-x: hidden;
}

a {
    color: inherit;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: 10px;
    color: #102a43;
    background: #fff;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

button,
input {
    font: inherit;
}

.site-bg {
    position: fixed;
    inset: calc(env(safe-area-inset-top) * -1) 0 calc(env(safe-area-inset-bottom) * -1) 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: saturate(1.08) brightness(1.02);
    pointer-events: none;
    z-index: 0;
}

.site-overlay {
    position: fixed;
    inset: calc(env(safe-area-inset-top) * -1) 0 calc(env(safe-area-inset-bottom) * -1) 0;
    background: var(--overlay-bg);
    backdrop-filter: blur(8px);
    pointer-events: none;
    z-index: 1;
}

.dashboard-page .site-bg {
    opacity: 0.72;
}

.dashboard-page .site-overlay {
    background:
        radial-gradient(circle at 50% 12%, rgba(110, 231, 249, 0.16), transparent 30%),
        linear-gradient(to bottom, rgba(10, 18, 28, 0.38), rgba(10, 18, 28, 0.62));
    backdrop-filter: blur(4px);
}

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: calc(12px + env(safe-area-inset-top)) clamp(18px, 4vw, 42px) 12px;
    background: linear-gradient(to bottom, rgba(10, 18, 28, 0.22), rgba(10, 18, 28, 0));
    border-bottom: 0;
    backdrop-filter: none;
}

.site-nav img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.site-nav a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s ease, background 0.2s ease;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.site-nav a:hover,
.site-nav a.active {
    color: #fff;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.nav-link.active {
    color: #ff6bb5;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.icon-toggle,
.float-button {
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.icon-toggle {
    width: 34px;
    padding: 0;
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
    box-shadow: none;
}

.lang-menu {
    position: relative;
}

.lang-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 146px;
    display: grid;
    gap: 2px;
    padding: 8px 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.lang-panel[hidden] {
    display: none;
}

.lang-menu:hover .lang-panel,
.lang-menu:focus-within .lang-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-panel button {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    border: 0;
    padding: 0 12px;
    color: #4b5563;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.lang-panel button:hover,
.lang-panel button.active {
    background: rgba(31, 111, 235, 0.08);
    color: #1f2933;
}

.flag-emoji {
    width: 24px;
    flex: 0 0 24px;
    font-size: 18px;
    line-height: 1;
}

.nav-spacer {
    height: 72px;
}

.glass-button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.glass-button:hover,
.btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.24);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.home-page {
    overflow-x: hidden;
}

.home-center {
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    z-index: 3;
    display: grid;
    place-items: center;
    padding: 96px 20px 48px;
    text-align: center;
}

.home-card {
    position: relative;
    z-index: 1;
}

.avatar-wrap {
    display: inline-block;
    padding: 4px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff66cc, #66ccff, #ff66cc);
    background-size: 300% 300%;
    animation: rotateGlow 6s linear infinite;
}

.avatar,
.profile-avatar {
    border-radius: 50%;
    object-fit: cover;
}

.avatar {
    display: block;
    width: 110px;
    height: 110px;
    animation: glow 2.5s ease-in-out infinite;
}

@keyframes glow {
    0% { box-shadow: 0 0 5px #ff66cc; }
    50% { box-shadow: 0 0 25px #ff66cc; }
    100% { box-shadow: 0 0 5px #ff66cc; }
}

@keyframes rotateGlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

.home-title {
    margin: 16px 0 8px;
    font-size: clamp(32px, 8vw, 48px);
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.45);
}

.home-subtitle {
    color: var(--muted);
}

.time-widget {
    position: relative;
    width: min(340px, calc(100vw - 48px));
    margin: 24px auto 0;
    padding: 14px 18px 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    background: rgba(4, 10, 20, 0.22);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
}

.time-widget::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.24) 1px, transparent 1.5px);
    background-size: 8px 8px;
    opacity: 0.28;
    pointer-events: none;
}

.time-widget::after {
    content: "";
    position: absolute;
    inset: -40% -20%;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.18), transparent 70%);
    animation: timeSweep 4.5s ease-in-out infinite;
    pointer-events: none;
}

.time-label,
.time-date {
    position: relative;
    z-index: 1;
    display: block;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

.pixel-time {
    position: relative;
    z-index: 1;
    display: block;
    margin: 6px 0 4px;
    font-family: "Courier New", Consolas, monospace;
    font-size: clamp(36px, 9vw, 56px);
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1;
    color: #8ee7ff;
    text-shadow:
        0 0 6px rgba(0, 194, 255, 0.8),
        0 0 16px rgba(255, 105, 180, 0.44),
        0 0 28px rgba(255, 216, 102, 0.28);
    background: linear-gradient(90deg, #42d9ff, #8df7b5, #ffd166, #ff70c8, #42d9ff);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: timeColorFlow 6s linear infinite, timePulse 2.4s ease-in-out infinite;
}

@keyframes timeColorFlow {
    to {
        background-position: 220% 0;
    }
}

@keyframes timePulse {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.22);
    }
}

@keyframes timeSweep {
    0%, 45% {
        transform: translateX(-65%);
        opacity: 0;
    }
    55% {
        opacity: 1;
    }
    100% {
        transform: translateX(65%);
        opacity: 0;
    }
}

.button-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

/* Home: Lake Dock */
.home-page {
    --home-cyan: #83ddff;
    --home-cyan-strong: #45c8ff;
    --home-pink: #ff6fba;
    --home-panel: rgba(24, 62, 91, 0.3);
    --home-line: rgba(210, 239, 255, 0.4);
    overflow: hidden;
    background: #0b2b49;
}

.home-page .site-bg {
    background-position: center center;
    filter: saturate(0.92) contrast(1.04) brightness(0.83);
    transform: scale(1.015);
}

.home-page .site-overlay {
    background:
        linear-gradient(to bottom, rgba(7, 35, 65, 0.08) 0%, rgba(5, 30, 55, 0.02) 43%, rgba(3, 21, 41, 0.38) 100%),
        linear-gradient(to right, rgba(7, 30, 54, 0.16), transparent 35%, rgba(8, 28, 50, 0.08));
    backdrop-filter: none;
}

.home-status {
    position: fixed;
    z-index: 5;
    top: calc(24px + env(safe-area-inset-top));
    left: clamp(22px, 4vw, 64px);
    right: clamp(22px, 4vw, 64px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgba(238, 249, 255, 0.78);
    font-family: Consolas, "SFMono-Regular", monospace;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-shadow: 0 2px 12px rgba(0, 20, 38, 0.65);
}

.home-status-item {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--home-cyan);
    box-shadow: 0 0 12px var(--home-cyan);
    animation: statusPulse 2.4s ease-in-out infinite;
}

.home-center {
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    width: min(1380px, calc(100% - clamp(32px, 7vw, 112px)));
    margin: 0 auto;
    padding: 18vh 0 clamp(62px, 10vh, 110px);
    text-align: left;
}

.home-eyebrow {
    margin: 0 0 14px 24px;
    color: rgba(230, 247, 255, 0.72);
    font-family: Consolas, "SFMono-Regular", monospace;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-shadow: 0 2px 12px rgba(0, 20, 38, 0.7);
}

.home-dock {
    --pointer-x: 50%;
    --pointer-y: 50%;
    position: relative;
    display: grid;
    grid-template-columns: minmax(300px, 1.1fr) minmax(260px, 0.82fr) minmax(450px, 1.8fr) minmax(164px, 0.62fr);
    align-items: center;
    min-height: 174px;
    padding: 20px 24px;
    border: 1px solid var(--home-line);
    border-radius: 42px;
    background: var(--home-panel);
    box-shadow:
        0 28px 70px rgba(0, 18, 38, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(166, 224, 255, 0.14),
        0 0 34px rgba(80, 198, 255, 0.1);
    backdrop-filter: blur(26px) saturate(1.3) brightness(0.94);
    -webkit-backdrop-filter: blur(26px) saturate(1.3) brightness(0.94);
    overflow: hidden;
    isolation: isolate;
    animation: dockEnter 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.home-dock::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: radial-gradient(420px circle at var(--pointer-x) var(--pointer-y), rgba(128, 222, 255, 0.17), transparent 58%);
    pointer-events: none;
}

.home-dock::after {
    content: "";
    position: absolute;
    left: 46%;
    bottom: -1px;
    width: 8%;
    height: 3px;
    border-radius: 999px;
    background: #c5f3ff;
    box-shadow: 0 0 14px var(--home-cyan-strong);
}

.identity-panel {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 20px;
    padding-right: 24px;
}

.avatar-wrap {
    position: relative;
    flex: 0 0 auto;
    display: block;
    padding: 3px;
    border-radius: 50%;
    background: rgba(229, 248, 255, 0.92);
    box-shadow:
        0 0 0 7px rgba(102, 211, 255, 0.12),
        0 0 28px rgba(102, 211, 255, 0.46);
    animation: none;
}

.avatar {
    display: block;
    width: clamp(88px, 7.2vw, 112px);
    height: clamp(88px, 7.2vw, 112px);
    border: 2px solid rgba(78, 173, 218, 0.52);
    animation: none;
}

.avatar-status {
    position: absolute;
    right: 4px;
    bottom: 12px;
    width: 13px;
    height: 13px;
    border: 3px solid #174568;
    border-radius: 50%;
    background: #8fffc1;
    box-shadow: 0 0 12px rgba(143, 255, 193, 0.9);
}

.identity-copy {
    min-width: 0;
}

.home-title {
    margin: 0;
    color: #f6fbff;
    font-size: clamp(32px, 3.2vw, 48px);
    font-weight: 760;
    letter-spacing: 0.03em;
    line-height: 1.05;
    text-shadow: 0 3px 22px rgba(31, 145, 209, 0.34);
    white-space: nowrap;
}

.home-subtitle {
    margin-top: 10px;
    color: rgba(225, 242, 250, 0.74);
    font-size: clamp(12px, 1.05vw, 15px);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.home-subtitle span {
    margin: 0 5px;
    color: var(--home-pink);
}

.time-widget {
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 7px clamp(14px, 1.5vw, 22px);
    border: 0;
    border-right: 1px solid rgba(189, 230, 250, 0.36);
    border-left: 1px solid rgba(189, 230, 250, 0.36);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    text-align: center;
}

.time-widget::before,
.time-widget::after {
    display: none;
}

.time-label,
.time-date {
    color: rgba(229, 245, 253, 0.76);
    font-size: 12px;
    letter-spacing: 0.08em;
}

.pixel-time {
    margin: 8px 0 7px;
    color: #f3fbff;
    background: none;
    -webkit-text-fill-color: currentColor;
    font-family: Consolas, "SFMono-Regular", monospace;
    max-width: 100%;
    overflow: hidden;
    font-size: clamp(31px, 2.25vw, 38px);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.025em;
    white-space: nowrap;
    text-shadow: 0 0 14px rgba(129, 222, 255, 0.7);
    animation: none;
}

.home-nav {
    display: grid;
    grid-template-columns: repeat(6, minmax(72px, 1fr));
    align-items: stretch;
    gap: 3px;
    padding: 0 clamp(14px, 1.7vw, 26px);
}

.home-nav-link,
.home-feature-link {
    color: rgba(240, 249, 255, 0.88);
    text-decoration: none;
}

.home-nav-link {
    position: relative;
    min-width: 0;
    min-height: 104px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 11px;
    border-radius: 20px;
    transition: color 0.24s ease, background 0.24s ease, transform 0.24s ease;
}

.home-nav-link i {
    font-size: clamp(27px, 2.4vw, 34px);
    color: rgba(223, 245, 255, 0.9);
    filter: drop-shadow(0 0 8px rgba(101, 203, 255, 0.34));
    transition: color 0.24s ease, transform 0.24s ease;
}

.home-nav-link span {
    overflow: hidden;
    font-size: clamp(12px, 1vw, 15px);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-nav-link:hover,
.home-nav-link:focus-visible {
    color: #fff;
    background: rgba(134, 221, 255, 0.1);
    transform: translateY(-4px);
}

.home-nav-link:hover i,
.home-nav-link:focus-visible i {
    color: var(--home-cyan);
    transform: scale(1.08);
}

.home-feature-link {
    min-height: 118px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    padding: 12px;
    border: 1px solid rgba(255, 127, 190, 0.32);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(255, 111, 186, 0.1), rgba(104, 203, 255, 0.08));
    box-shadow: inset 0 0 24px rgba(255, 111, 186, 0.06);
    text-align: center;
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.home-feature-link > i:first-child {
    color: #ff89c5;
    font-size: 38px;
    filter: drop-shadow(0 0 10px rgba(255, 111, 186, 0.5));
}

.home-feature-link span {
    color: #ff91c9;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.home-feature-arrow {
    position: absolute;
    opacity: 0;
}

.home-feature-link:hover,
.home-feature-link:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(255, 145, 201, 0.68);
    background: linear-gradient(145deg, rgba(255, 111, 186, 0.17), rgba(104, 203, 255, 0.12));
}

.home-nav-link:focus-visible,
.home-feature-link:focus-visible {
    outline: 2px solid #c9f3ff;
    outline-offset: 3px;
}

.home-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    color: rgba(224, 242, 251, 0.54);
    font-family: Consolas, "SFMono-Regular", monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
}

.home-hint span {
    width: 26px;
    height: 1px;
    background: var(--home-pink);
    box-shadow: 0 0 8px rgba(255, 111, 186, 0.7);
}

@keyframes dockEnter {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes statusPulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

@media (max-width: 1280px) {
    .home-page {
        overflow-y: auto;
    }

    .home-center {
        justify-content: center;
        width: min(900px, calc(100% - 40px));
        padding-top: 100px;
        padding-bottom: 44px;
    }

    .home-dock {
        grid-template-columns: minmax(280px, 1fr) minmax(230px, 0.8fr);
        gap: 20px 0;
        border-radius: 36px;
    }

    .identity-panel {
        justify-content: center;
    }

    .home-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        border-top: 1px solid rgba(189, 230, 250, 0.18);
        padding-top: 12px;
    }

    .home-feature-link {
        grid-column: 2;
        grid-row: 1;
        min-height: 118px;
    }

    .time-widget {
        grid-column: 1;
        grid-row: 2;
        display: none;
    }
}

@media (max-width: 680px) {
    .home-page {
        overflow-y: auto;
    }

    .home-page .site-bg {
        background-position: 57% center;
    }

    .home-status {
        top: calc(16px + env(safe-area-inset-top));
        left: 18px;
        right: 18px;
    }

    .home-status-location {
        display: none;
    }

    .home-center {
        justify-content: flex-end;
        width: min(100% - 24px, 520px);
        padding: calc(86px + env(safe-area-inset-top)) 0 calc(24px + env(safe-area-inset-bottom));
    }

    .home-eyebrow {
        margin-left: 12px;
        font-size: 9px;
    }

    .home-dock {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 0;
        padding: 22px 16px 16px;
        border-radius: 30px;
        background: rgba(20, 58, 86, 0.36);
    }

    .home-dock::after {
        left: 41%;
        width: 18%;
    }

    .identity-panel {
        justify-content: flex-start;
        min-width: 0;
        overflow: hidden;
        padding: 0 4px;
    }

    .avatar {
        width: 78px;
        height: 78px;
    }

    .home-title {
        font-size: 33px;
    }

    .home-subtitle {
        font-size: 12px;
    }

    .time-widget {
        grid-column: 1;
        grid-row: auto;
        display: grid;
        grid-template-columns: minmax(0, 92px) minmax(0, 1fr);
        min-width: 0;
        align-items: center;
        gap: 2px 12px;
        padding: 12px 8px;
        border: 0;
        border-top: 1px solid rgba(189, 230, 250, 0.18);
        border-bottom: 1px solid rgba(189, 230, 250, 0.18);
        text-align: left;
    }

    .pixel-time {
        grid-column: 2;
        grid-row: 1 / span 2;
        min-width: 0;
        margin: 0;
        font-size: clamp(24px, 7vw, 28px);
        letter-spacing: 0.025em;
        text-align: right;
    }

    .time-label,
    .time-date {
        font-size: 10px;
    }

    .home-nav {
        grid-column: 1;
        grid-row: auto;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        min-width: 0;
        gap: 6px;
        padding: 0;
        border: 0;
    }

    .home-nav-link {
        min-height: 78px;
        gap: 6px;
        border: 1px solid rgba(173, 225, 250, 0.1);
        border-radius: 18px;
        background: rgba(154, 219, 249, 0.045);
    }

    .home-nav-link i {
        font-size: 25px;
    }

    .home-nav-link span {
        font-size: 12px;
    }

    .home-feature-link {
        grid-column: 1;
        grid-row: auto;
        min-width: 0;
        min-height: 56px;
        grid-template-columns: auto 1fr auto;
        align-content: center;
        justify-items: start;
        gap: 10px;
        padding: 10px 18px;
        border-radius: 18px;
    }

    .home-feature-link > i:first-child {
        font-size: 27px;
    }

    .home-feature-link span {
        font-size: 13px;
    }

    .home-feature-arrow {
        position: static;
        justify-self: end;
        color: #ff91c9;
        opacity: 1;
    }

    .home-hint {
        margin-top: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-dock,
    .status-dot {
        animation: none;
    }

    .home-nav-link,
    .home-feature-link,
    .home-nav-link i {
        transition: none;
    }
}

#particles-js {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.profile-page {
    overflow-x: hidden;
}

.profile-main {
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(32px, 8vw, 80px);
    padding: 110px 24px 56px;
}

.profile-left {
    text-align: center;
    animation: riseIn 0.8s ease both;
}

.profile-avatar {
    width: 140px;
    height: 140px;
    margin-bottom: 20px;
    border: 3px solid rgba(255, 255, 255, 0.42);
    animation: floatAvatar 4.5s ease-in-out infinite;
}

.profile-name {
    font-size: 28px;
    font-weight: 700;
}

.profile-tagline {
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
}

.profile-panel {
    width: 100%;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    animation: riseIn 0.9s ease 0.12s both;
}

.profile-content {
    width: min(462px, 100%);
    display: grid;
    gap: 18px;
}

.uptime-card {
    position: relative;
    padding: 14px 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
    animation: riseIn 0.85s ease both;
}

.uptime-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 10%, rgba(110, 231, 249, 0.28), transparent 32%),
        linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.16), transparent 72%);
    opacity: 0.9;
    pointer-events: none;
}

.uptime-card::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(110, 231, 249, 0.9), rgba(255, 112, 200, 0.65), transparent);
    animation: uptimeLine 3.2s ease-in-out infinite;
}

.uptime-card span {
    position: relative;
    z-index: 1;
    display: block;
    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
}

.uptime-card strong {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 6px;
    font-size: clamp(20px, 4vw, 28px);
    color: #fff;
    letter-spacing: 0;
    text-shadow: 0 0 14px rgba(110, 231, 249, 0.42), 0 0 28px rgba(255, 112, 200, 0.18);
    animation: uptimeGlow 2.8s ease-in-out infinite;
}

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

@keyframes uptimeLine {
    0%, 100% {
        opacity: 0.22;
        transform: scaleX(0.6);
    }
    50% {
        opacity: 0.9;
        transform: scaleX(1);
    }
}

.profile-actions {
    width: 100%;
    margin-top: 0;
    justify-content: center;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatAvatar {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.profile-panel h1 {
    font-size: 24px;
    margin-bottom: 14px;
}

.profile-panel p {
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.7;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.tag-pill {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.15);
}

.qr-modal,
.post-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 50;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(5, 10, 18, 0.66);
}

.qr-modal.show,
.post-modal.show {
    display: flex;
}

.qr-box,
.post-dialog {
    max-width: min(760px, 100%);
    max-height: min(720px, calc(100vh - 44px));
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--dark);
    box-shadow: var(--shadow);
}

.qr-box {
    padding: 22px;
    text-align: center;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    backdrop-filter: blur(14px);
}

.qr-box img {
    width: 200px;
    max-width: 70vw;
    margin-bottom: 10px;
}

.social-box {
    width: min(420px, calc(100vw - 44px));
}

.social-box h2 {
    margin-bottom: 12px;
    font-size: 24px;
}

.social-box p {
    margin-bottom: 18px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.86);
}

.social-box img {
    display: block;
    margin: 4px auto 18px;
}

.social-link {
    width: 100%;
}

.blog-page {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

.blog-main {
    width: min(1120px, calc(100% - 32px));
    position: relative;
    z-index: 3;
    margin: 0 auto;
    padding: 112px 0 56px;
    text-align: center;
}

.blog-hero h1 {
    font-size: clamp(34px, 7vw, 48px);
    color: #fff;
}

.blog-hero p {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.9);
}

.blog-tools {
    display: grid;
    gap: 16px;
    justify-items: center;
    margin-top: 24px;
}

.search-input {
    width: min(420px, 100%);
    padding: 14px 20px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    outline: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.tab {
    border: 1px solid rgba(255, 255, 255, 0.28);
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.tab:hover,
.tab.active {
    transform: translateY(-1px);
    background: #fff;
    color: #24313f;
}

.post-grid {
    margin-top: 42px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.comments-panel {
    margin-top: 46px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(16px);
    text-align: left;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.comments-panel h2 {
    margin-bottom: 18px;
    font-size: 24px;
}

.post-card {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background: var(--card-bg);
    color: var(--card-text);
    text-align: left;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.post-card:hover,
.post-card:focus-visible {
    transform: translateY(-8px);
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.24);
    outline: none;
}

.post-card[hidden] {
    display: none;
}

.post-card img {
    width: 100%;
    height: 154px;
    display: block;
    object-fit: cover;
}

.post-category {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.58);
    color: white;
    font-size: 12px;
}

.post-content {
    padding: 16px;
}

.post-content h2 {
    font-size: 18px;
    margin-bottom: 8px;
}

.post-content p {
    color: var(--card-muted);
    font-size: 14px;
    line-height: 1.6;
}

.post-meta {
    margin-top: 14px;
    font-size: 12px;
    color: #8a96a3;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.empty-state {
    display: none;
    margin-top: 34px;
    padding: 22px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.9);
}

.empty-state.show {
    display: block;
}

.post-dialog {
    text-align: left;
}

.post-dialog img {
    width: 100%;
    height: 250px;
    display: block;
    object-fit: cover;
}

.post-detail-body {
    padding: 26px;
}

.post-detail-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.post-detail-category {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef2f7;
    color: #4c5968;
    font-size: 13px;
}

.close-button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #eef2f7;
    color: #1f2933;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.post-detail-title {
    font-size: clamp(26px, 5vw, 36px);
    margin-bottom: 10px;
}

.post-detail-meta {
    color: #718096;
    font-size: 14px;
    margin-bottom: 20px;
}

.post-detail-content {
    color: #394555;
    line-height: 1.85;
}

.post-detail-content p + p {
    margin-top: 14px;
}

.post-link {
    width: fit-content;
    margin-top: 22px;
    color: #fff;
    background: #1f6feb;
    border-color: #1f6feb;
}

.post-link[hidden] {
    display: none;
}

.floating-actions {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 25;
    display: grid;
    gap: 12px;
}

.float-button {
    width: 48px;
    height: 48px;
    padding: 0;
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
}

.mobile-url {
    margin: 12px 0 18px;
    word-break: break-all;
    color: rgba(255, 255, 255, 0.78);
}

.games-page {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

.games-main {
    width: min(980px, calc(100% - 32px));
    min-height: 100vh;
    position: relative;
    z-index: 3;
    display: grid;
    place-items: center;
    margin: 0 auto;
    padding: 108px 0 56px;
}

.portal-page {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

.dashboard-page,
.terminal-page {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

.portal-main {
    width: min(1180px, calc(100% - 32px));
    position: relative;
    z-index: 3;
    margin: 0 auto;
    padding: 112px 0 56px;
}

.dashboard-main {
    width: min(1180px, calc(100% - 32px));
    position: relative;
    z-index: 3;
    margin: 0 auto;
    padding: 112px 0 56px;
}

.dash-hero {
    margin-bottom: 24px;
    text-align: center;
}

.dash-hero p {
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.dash-hero h1 {
    margin-top: 8px;
    font-size: clamp(38px, 8vw, 64px);
    text-shadow: 0 0 24px rgba(110, 231, 249, 0.34);
}

.dash-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.dash-card {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
        radial-gradient(circle at top right, rgba(110, 231, 249, 0.18), transparent 34%);
    backdrop-filter: blur(18px);
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.2);
}

.dash-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.22;
    pointer-events: none;
}

.dash-card > * {
    position: relative;
    z-index: 1;
}

.dash-card span {
    display: block;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.72);
}

.dash-card strong {
    display: block;
    font-size: clamp(30px, 5vw, 44px);
}

.weather,
.quote,
.regions,
.music,
.network-check,
.ip-check {
    grid-column: span 2;
}

.network-check,
.ip-check {
    grid-column: 1 / -1;
    display: grid;
    align-content: start;
    gap: 16px;
}

.check-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.check-heading h2 {
    margin: 5px 0 0;
    font-size: clamp(20px, 3vw, 26px);
}

.check-heading > div > span {
    margin-bottom: 0;
}

.network-sites,
.ip-sources {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.ip-sources {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.network-site,
.ip-source {
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(10, 30, 55, 0.24);
}

.probe-heading,
.probe-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.probe-heading h3 {
    font-size: 14px;
    font-weight: 600;
}

.probe-badge {
    padding: 2px 7px;
    border: 1px solid rgba(165, 208, 255, 0.5);
    border-radius: 20px;
    color: #d7ebff;
    font-size: 11px;
    white-space: nowrap;
}

.probe-badge.international {
    border-color: rgba(103, 232, 206, 0.5);
    color: #adffed;
}

.probe-result {
    margin-top: 14px;
}

.probe-value {
    font: 600 14px Consolas, monospace;
}

.probe-value[data-level="good"] { color: #80ffb5; }
.probe-value[data-level="medium"] { color: #ffe09a; }
.probe-value[data-level="slow"] { color: #ffb0b0; }
.probe-value[data-level="failed"] { color: #d1d7e0; }

.probe-history {
    display: flex;
    align-items: center;
    gap: 3px;
}

.probe-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: #a0adba;
}

.probe-dot.empty { background: rgba(255, 255, 255, 0.18); }
.probe-dot.good { background: #45e28f; }
.probe-dot.medium { background: #f5c64a; }
.probe-dot.slow { background: #ff7777; }

.ip-source-value {
    margin: 14px 0 10px;
    overflow-wrap: anywhere;
    font: 600 clamp(18px, 3vw, 24px) Consolas, monospace;
}

.ip-source-location,
.ip-source-network {
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.6;
}

.ip-source-network {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.75);
}

.check-heading .btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.protocol-check {
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 12px;
    min-width: 0;
}

.protocol-check > span { margin-bottom: 0; }
.protocol-check strong {
    max-width: 100%;
    overflow-wrap: anywhere;
    font: 600 20px Consolas, monospace;
}
.protocol-check .check-note {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
}

.network-check .check-note,
.ip-check .check-note {
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    line-height: 1.6;
}

.ip-check-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 2px;
}

.ip-check-links a {
    color: #a7f3ff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 1000px) {
    .network-sites {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .ip-sources {
        grid-template-columns: 1fr;
    }

    .network-site {
        padding: 12px;
    }
}

.boot {
    grid-column: span 2;
    min-height: 260px;
}

.quote p {
    font-size: 22px;
    line-height: 1.7;
}

.regions ul {
    display: grid;
    gap: 8px;
    list-style: none;
}

.regions li {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
}

.boot-log,
.terminal-output {
    height: 210px;
    overflow: auto;
    padding: 14px;
    border-radius: 14px;
    background: rgba(4, 10, 20, 0.68);
    color: #8df7b5;
    font-family: Consolas, "Courier New", monospace;
    line-height: 1.7;
}

.music {
    display: grid;
    align-content: start;
    gap: 14px;
}

.music strong {
    font-size: clamp(24px, 3vw, 32px);
    overflow-wrap: anywhere;
}

.music p {
    margin: 0;
}

.music-picker {
    display: grid;
    gap: 8px;
}

.music-picker select {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 12px;
    background: rgba(20, 45, 70, 0.4);
    color: inherit;
    font: inherit;
}

.music-picker option {
    color: #172b45;
    background: #fff;
}

.music-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.music .music-credit {
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.music-credit span {
    display: inline;
    margin: 0;
    color: inherit;
}

.music-credit a {
    color: inherit;
    text-decoration: underline;
}

.music-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.2);
}

.music .btn {
    width: fit-content;
}

.terminal-main {
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    z-index: 3;
    display: grid;
    place-items: center;
    padding: 90px 18px 42px;
}

.terminal-window {
    width: min(900px, 100%);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    background: rgba(4, 10, 20, 0.76);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
}

.terminal-window header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
}

.terminal-window header span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-window header span:nth-child(1) { background: #ff5f57; }
.terminal-window header span:nth-child(2) { background: #ffbd2e; }
.terminal-window header span:nth-child(3) { background: #28c840; }

.terminal-window header strong {
    margin-left: 8px;
}

.terminal-window header a {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
}

.terminal-output {
    height: min(520px, 58vh);
    border-radius: 0;
    background: transparent;
}

.terminal-input {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #8df7b5;
    font-family: Consolas, "Courier New", monospace;
}

.terminal-input input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
    font-family: inherit;
}

.portal-hero {
    margin-bottom: 28px;
    text-align: center;
}

.portal-hero p {
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.portal-hero h1 {
    margin-top: 8px;
    font-size: clamp(38px, 8vw, 68px);
    text-shadow: 0 0 24px rgba(110, 231, 249, 0.36);
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}

.portal-category {
    grid-column: span 2;
    position: relative;
    overflow: hidden;
    min-height: 250px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08)),
        radial-gradient(circle at top right, rgba(110, 231, 249, 0.18), transparent 34%);
    backdrop-filter: blur(18px);
    box-shadow: 0 20px 46px rgba(15, 23, 42, 0.2);
}

.portal-category::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: 0.28;
    pointer-events: none;
}

.portal-category-wide {
    grid-column: span 4;
}

.portal-category-full {
    grid-column: span 6;
}

.portal-category h2 {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 22px;
}

.portal-cat-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.08);
}

.portal-links {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.portal-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.11);
    text-decoration: none;
    backdrop-filter: blur(10px);
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.portal-links a:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

/* Game controls stay in the panel flow instead of covering the board. */
.games-shell {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(180px, 240px) 1fr;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.games-list {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 22px 0;
    border-right: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.12);
}

.game-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    border: 0;
    padding: 0 22px;
    color: #fff;
    background: transparent;
    cursor: pointer;
    font-size: 17px;
    font-weight: 700;
    text-align: left;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.game-item:hover,
.game-item.active {
    background: rgba(255, 255, 255, 0.18);
}

.game-panel {
    display: none;
    padding: 26px;
}

.game-panel.active {
    display: grid;
    justify-items: center;
    gap: 18px;
}

.game-head {
    width: min(460px, 100%);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.game-head h1 {
    font-size: 28px;
    margin-bottom: 6px;
}

.game-head p,
.game-head strong {
    color: rgba(255, 255, 255, 0.82);
}

.game-panel canvas,
.board-2048,
.mines-board,
.grid-game {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    background: rgba(5, 12, 22, 0.72);
    box-shadow: inset 0 0 28px rgba(110, 231, 249, 0.08), 0 18px 36px rgba(15, 23, 42, 0.2);
}

.tetris-stage {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
}

.tetris-next {
    display: grid;
    justify-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 800;
}

.tetris-next canvas {
    width: 100px;
    height: 80px;
    border-radius: 12px;
}

.game-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.game-message {
    min-width: 180px;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    text-align: center;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(12px);
}

.game-message[hidden] {
    display: none;
}

.board-2048 {
    width: min(360px, calc(100vw - 72px));
    aspect-ratio: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 10px;
}

.portal-links a span {
    width: 24px;
    flex: 0 0 24px;
    display: inline-grid;
    place-items: center;
    font-size: 17px;
}

.mines-board {
    width: min(384px, calc(100vw - 72px));
    aspect-ratio: 1;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 6px;
    padding: 10px;
}

.mines-board button,
.grid-game > div,
.grid-game > button {
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 800;
    cursor: pointer;
    box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.08);
    aspect-ratio: 1;
    min-width: 0;
    min-height: 0;
}

.mines-board button.open {
    background: rgba(255, 255, 255, 0.32);
    color: #1f2933;
}

.grid-game {
    width: min(340px, calc(100vw - 72px));
    aspect-ratio: 1;
    display: grid;
    gap: 8px;
    padding: 10px;
    grid-auto-rows: 1fr;
}

.grid-game .wall {
    background: rgba(31, 41, 55, 0.78);
}

.grid-game .target {
    background: rgba(141, 247, 181, 0.26);
}

.huarong-board > button {
    font-size: clamp(26px, 10vw, 44px);
    background: linear-gradient(135deg, rgba(110, 231, 249, 0.36), rgba(255, 112, 200, 0.28));
}

.huarong-board > button.empty {
    opacity: 0.25;
}

.mobile-gamepad {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 35;
    width: 156px;
    display: grid;
    grid-template-columns: repeat(3, 48px);
    grid-template-areas:
        ". up ."
        "left action right"
        ". down .";
    gap: 6px;
}

.mobile-gamepad button {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    font-weight: 800;
}

.mobile-gamepad [data-control="up"] { grid-area: up; }
.mobile-gamepad [data-control="down"] { grid-area: down; }
.mobile-gamepad [data-control="left"] { grid-area: left; }
.mobile-gamepad [data-control="right"] { grid-area: right; }
.mobile-gamepad [data-control="action"] { grid-area: action; }

.tile {
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: clamp(22px, 7vw, 36px);
    font-weight: 800;
    box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.08);
}

.tile-2,
.tile-4 {
    background: rgba(110, 231, 249, 0.28);
}

.tile-8,
.tile-16 {
    background: rgba(255, 209, 102, 0.32);
}

.tile-32,
.tile-64 {
    background: rgba(255, 112, 200, 0.34);
}

.tile-128,
.tile-256,
.tile-512 {
    background: rgba(141, 247, 181, 0.34);
}

.tile-1024,
.tile-2048 {
    background: linear-gradient(135deg, rgba(66, 217, 255, 0.72), rgba(255, 112, 200, 0.68));
}

@media (max-width: 820px) {
    .site-nav {
        gap: 16px;
        align-items: center;
        padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
        overflow-x: auto;
        overflow-y: visible;
        white-space: nowrap;
        scrollbar-width: none;
    }

    .site-nav::-webkit-scrollbar {
        display: none;
    }

    .nav-spacer {
        height: 64px;
    }

    .profile-main {
        flex-direction: column;
        text-align: center;
        padding-top: 96px;
    }

    .profile-panel {
        padding: 24px;
    }

    .tag-list,
    .button-row {
        justify-content: center;
    }

    .post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .games-shell {
        grid-template-columns: 1fr;
    }

    .games-list {
        grid-template-columns: repeat(3, 1fr);
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.18);
        padding: 10px;
        max-height: 180px;
        overflow: auto;
    }

    .game-item {
        justify-content: center;
        padding: 0 10px;
        font-size: 14px;
    }

    .portal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portal-category,
    .portal-category-wide,
    .portal-category-full {
        grid-column: span 1;
    }

    .portal-links {
        grid-template-columns: 1fr;
    }

    .dash-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .weather,
    .quote,
    .regions,
    .music,
    .network-check,
    .ip-check,
    .boot {
        grid-column: span 2;
    }
}

@media (min-width: 821px) {
    .mobile-gamepad {
        display: none;
    }
}

@media (max-width: 560px) {
    .site-nav {
        justify-content: flex-start;
    }

    .site-nav img {
        display: none;
    }

    .nav-controls {
        width: auto;
        justify-content: center;
        margin-left: 0;
        padding-right: env(safe-area-inset-right);
    }

    .nav-link {
        font-size: 15px;
    }

    .home-center {
        padding: calc(58px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
        align-items: center;
    }

    .home-title {
        font-size: clamp(34px, 11vw, 48px);
    }

    .profile-main {
        padding: calc(86px + env(safe-area-inset-top)) 18px calc(34px + env(safe-area-inset-bottom));
    }

    .blog-main {
        width: min(100% - 24px, 1120px);
        padding-top: calc(88px + env(safe-area-inset-top));
    }

    .post-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .post-card img {
        height: 180px;
    }

    .post-detail-body {
        padding: 20px;
    }

    .post-dialog img {
        height: 190px;
    }

    .games-main {
        width: min(100% - 20px, 980px);
        padding-top: calc(104px + env(safe-area-inset-top));
        padding-bottom: calc(120px + env(safe-area-inset-bottom));
    }

    .game-panel {
        padding: 18px 12px 22px;
    }

    .game-head {
        display: grid;
        text-align: center;
        justify-items: center;
    }

    .game-panel canvas {
        max-width: calc(100vw - 56px);
        height: auto;
    }

    .tetris-stage {
        display: grid;
        justify-items: center;
    }

    .mobile-gamepad {
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        transform: scale(0.88);
        transform-origin: bottom right;
    }

    .portal-main {
        width: min(100% - 22px, 1180px);
        padding: calc(96px + env(safe-area-inset-top)) 0 calc(32px + env(safe-area-inset-bottom));
    }

    .portal-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .portal-category {
        min-height: auto;
        padding: 18px;
    }

    .dashboard-main {
        width: min(100% - 22px, 1180px);
        padding: calc(96px + env(safe-area-inset-top)) 0 calc(32px + env(safe-area-inset-bottom));
    }

    .dash-grid {
        grid-template-columns: 1fr;
    }

    .dash-card,
    .weather,
    .quote,
    .regions,
    .music,
    .network-check,
    .ip-check,
    .boot {
        grid-column: span 1;
    }

    .terminal-main {
        padding: calc(30px + env(safe-area-inset-top)) 12px calc(24px + env(safe-area-inset-bottom));
    }
}

/* Keep the redesigned home layout authoritative over legacy mobile rules. */
@media (max-width: 560px) {
    .home-page .home-center {
        width: min(100% - 24px, 520px);
        padding: calc(86px + env(safe-area-inset-top)) 0 calc(24px + env(safe-area-inset-bottom));
        align-items: stretch;
    }

    .home-page .home-title {
        font-size: 33px;
    }
}

/* Profile: Lakeside Command Deck */
.profile-page {
    --profile-cyan: #75dcff;
    --profile-pink: #ff77b8;
    --profile-green: #64f0b3;
    --profile-line: rgba(151, 221, 255, 0.3);
    --profile-panel: rgba(7, 35, 61, 0.66);
    min-height: 100vh;
    background: #082844;
    overflow-x: hidden;
}

.profile-page .site-bg {
    background-position: center center;
    filter: saturate(0.9) contrast(1.06) brightness(0.65);
    transform: scale(1.015);
}

.profile-page .site-overlay {
    background:
        linear-gradient(90deg, rgba(4, 24, 44, 0.22), rgba(4, 24, 44, 0.04) 46%, rgba(4, 24, 44, 0.18)),
        linear-gradient(180deg, rgba(5, 29, 52, 0.16), rgba(4, 23, 42, 0.48));
    backdrop-filter: none;
}

.profile-grid {
    position: fixed;
    z-index: 2;
    inset: 0;
    pointer-events: none;
    opacity: 0.15;
    background-image:
        linear-gradient(rgba(117, 220, 255, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(117, 220, 255, 0.12) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, transparent 5%, #000 42%, transparent 96%);
}

.profile-page .site-nav {
    top: 20px;
    left: clamp(18px, 2.6vw, 40px);
    right: clamp(18px, 2.6vw, 40px);
    width: auto;
    min-height: 66px;
    padding: 0 18px 0 24px;
    border: 1px solid rgba(169, 224, 251, 0.24);
    border-radius: 23px;
    background: rgba(10, 45, 75, 0.52);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 18px 45px rgba(0, 20, 38, 0.18);
    backdrop-filter: blur(20px) saturate(1.15);
    -webkit-backdrop-filter: blur(20px) saturate(1.15);
}

.profile-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    color: rgba(241, 250, 255, 0.9);
    font: 12px/1 Consolas, "SFMono-Regular", monospace;
    letter-spacing: 0.12em;
    text-decoration: none;
}

.profile-nav-links {
    display: flex;
    align-self: stretch;
    justify-content: center;
    gap: clamp(4px, 1.1vw, 18px);
    margin: 0 auto;
}

.profile-page .nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    color: rgba(229, 244, 252, 0.72);
    font-size: 14px;
    font-weight: 500;
    text-shadow: none;
}

.profile-page .nav-link i {
    color: rgba(205, 237, 252, 0.9);
    font-size: 19px;
}

.profile-page .nav-link::after {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 0;
    height: 2px;
    opacity: 0;
    background: var(--profile-pink);
    box-shadow: 0 0 10px var(--profile-pink);
}

.profile-page .nav-link:hover,
.profile-page .nav-link.active {
    color: #fff;
}

.profile-page .nav-link.active::after {
    opacity: 1;
}

.profile-page .nav-controls {
    margin-left: 0;
}

.profile-location {
    margin-right: 8px;
    color: rgba(224, 243, 252, 0.7);
    font: 10px/1 Consolas, monospace;
    letter-spacing: 0.12em;
    white-space: nowrap;
}

.profile-page .icon-toggle {
    border-color: rgba(176, 226, 250, 0.2);
    background: rgba(133, 213, 250, 0.06);
}

.profile-main {
    width: min(1376px, calc(100% - clamp(36px, 5.2vw, 80px)));
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(300px, 0.9fr) minmax(680px, 1.75fr);
    align-items: center;
    gap: clamp(34px, 4.5vw, 70px);
    margin: 0 auto;
    padding: 122px 0 44px;
}

.profile-identity {
    position: relative;
    min-width: 0;
    padding: 30px 32px 34px 28px;
    border-right: 1px solid rgba(255, 119, 184, 0.5);
    animation: none;
}

.profile-index {
    position: absolute;
    top: 0;
    left: 0;
    color: rgba(226, 243, 252, 0.48);
    font: 44px/1 Consolas, monospace;
    letter-spacing: 0.04em;
}

.profile-index small {
    display: block;
    margin-top: 7px;
    font-size: 10px;
    letter-spacing: 0.12em;
}

.profile-avatar-shell {
    position: relative;
    width: 184px;
    height: 184px;
    margin: 18px auto 34px;
    padding: 8px;
    border: 2px solid rgba(137, 224, 255, 0.82);
    border-radius: 50%;
    background: rgba(13, 60, 94, 0.34);
    box-shadow:
        0 0 0 10px rgba(107, 211, 250, 0.08),
        0 0 36px rgba(91, 206, 255, 0.34),
        inset 0 0 26px rgba(122, 222, 255, 0.18);
}

.profile-avatar-shell::before,
.profile-avatar-shell::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.profile-avatar-shell::before {
    inset: -22px;
    border: 1px dashed rgba(120, 218, 255, 0.18);
    animation: profileOrbit 24s linear infinite;
}

.profile-avatar-shell::after {
    inset: -10px;
    border-right: 3px solid var(--profile-pink);
    border-bottom: 3px solid transparent;
    transform: rotate(-30deg);
}

.profile-avatar {
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    border-radius: 50%;
    object-fit: cover;
    animation: none;
}

.profile-online-dot {
    position: absolute;
    z-index: 2;
    right: 2px;
    bottom: 22px;
    width: 20px;
    height: 20px;
    border: 4px solid #174c6f;
    border-radius: 50%;
    background: var(--profile-green);
    box-shadow: 0 0 16px rgba(100, 240, 179, 0.9);
}

.profile-name-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-name {
    color: #f7fbff;
    font-size: clamp(42px, 4vw, 62px);
    font-weight: 760;
    line-height: 1;
    letter-spacing: 0.02em;
    text-shadow: 0 5px 28px rgba(33, 145, 205, 0.3);
}

.online-badge {
    padding: 6px 11px;
    border: 1px solid rgba(100, 240, 179, 0.38);
    border-radius: 8px;
    color: #8cf6c5;
    background: rgba(100, 240, 179, 0.08);
    font-size: 11px;
    white-space: nowrap;
}

.profile-tagline {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 18px;
    color: rgba(238, 248, 253, 0.9);
    font-size: 18px;
    letter-spacing: 0.08em;
}

.profile-tagline::before {
    content: "";
    width: 28px;
    height: 2px;
    background: var(--profile-pink);
    box-shadow: 0 0 8px rgba(255, 119, 184, 0.65);
}

.profile-identity blockquote {
    margin-top: 34px;
    padding: 16px 0 16px 22px;
    border-left: 1px solid rgba(130, 218, 255, 0.26);
    color: rgba(226, 242, 250, 0.78);
    font-size: 14px;
    line-height: 1.8;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: 24px;
    color: rgba(220, 239, 248, 0.67);
    font-size: 12px;
}

.profile-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.profile-social-mini {
    display: flex;
    gap: 13px;
    margin-top: 28px;
}

.profile-social-mini a,
.profile-social-mini button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(156, 219, 248, 0.26);
    border-radius: 50%;
    color: rgba(231, 246, 253, 0.84);
    background: rgba(89, 177, 221, 0.07);
    cursor: pointer;
    font-size: 19px;
    text-decoration: none;
    transition: 0.22s ease;
}

.profile-social-mini a:hover,
.profile-social-mini button:hover,
.profile-social-mini a:focus-visible,
.profile-social-mini button:focus-visible {
    color: #fff;
    border-color: var(--profile-cyan);
    background: rgba(117, 220, 255, 0.14);
    transform: translateY(-3px);
}

.profile-content {
    width: 100%;
    display: grid;
    gap: 14px;
    animation: none;
}

.command-panel {
    --mx: 50%;
    --my: 50%;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--profile-line);
    border-radius: 14px;
    background:
        radial-gradient(380px circle at var(--mx) var(--my), rgba(117, 220, 255, 0.11), transparent 56%),
        linear-gradient(135deg, rgba(20, 69, 104, 0.72), rgba(7, 35, 61, 0.7));
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 16px 40px rgba(0, 19, 37, 0.18);
    backdrop-filter: blur(18px) saturate(1.08);
    -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

.command-panel::after {
    content: "";
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 42px;
    height: 1px;
    background: var(--profile-cyan);
    box-shadow: 0 0 9px var(--profile-cyan);
}

.module-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.module-heading h2 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #eef9ff;
    font-size: 16px;
    font-weight: 650;
}

.module-heading h2 i {
    color: var(--profile-pink);
    font-size: 21px;
}

.module-code {
    color: var(--profile-green);
    font: 18px Consolas, monospace;
}

.about-module {
    padding: 20px 24px;
}

.about-layout {
    display: grid;
    grid-template-columns: 1.4fr minmax(210px, 0.9fr);
    gap: 22px;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid rgba(163, 221, 249, 0.18);
}

.about-layout p {
    max-width: 560px;
    color: rgba(224, 241, 249, 0.82);
    font-size: 14px;
    line-height: 1.9;
}

.about-layout img {
    width: 100%;
    height: 128px;
    border: 1px solid rgba(178, 226, 249, 0.24);
    border-radius: 10px;
    object-fit: cover;
}

.about-layout .about-motto {
    margin-top: 22px;
    color: rgba(218, 236, 246, 0.65);
    font: 12px/1.6 Consolas, monospace;
    letter-spacing: 0.04em;
}

.about-motto span {
    color: var(--profile-pink);
}

.interests-module {
    padding: 17px 20px 20px;
}

.interest-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.interest-item {
    min-height: 102px;
    display: grid;
    grid-template-columns: 36px 1fr;
    align-content: center;
    gap: 3px 10px;
    padding: 14px;
    border: 1px solid rgba(168, 222, 248, 0.18);
    border-radius: 10px;
    background: rgba(121, 203, 239, 0.045);
    transition: 0.22s ease;
}

.interest-item:hover {
    border-color: rgba(117, 220, 255, 0.45);
    background: rgba(117, 220, 255, 0.1);
    transform: translateY(-3px);
}

.interest-item > i {
    grid-row: 1 / span 2;
    align-self: center;
    color: var(--profile-cyan);
    font-size: 29px;
}

.interest-item:nth-child(4) > i {
    color: var(--profile-pink);
}

.interest-item strong {
    color: #f0f9ff;
    font-size: 15px;
}

.interest-item span {
    color: rgba(217, 237, 247, 0.58);
    font-size: 10px;
    line-height: 1.45;
}

.profile-stats-row {
    display: grid;
    grid-template-columns: 0.95fr 1.12fr 1.16fr;
    gap: 14px;
}

.profile-stats-row .command-panel {
    min-height: 174px;
    padding: 18px 20px;
}

.profile-stats-row .uptime-card {
    border-radius: 14px;
    animation: none;
}

.profile-stats-row .uptime-card::before {
    display: none;
}

.profile-stats-row .uptime-card::after {
    left: auto;
    width: 42px;
    height: 1px;
    animation: none;
}

.profile-stats-row .uptime-card > strong {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 24px;
    color: #f2fbff;
    font: 22px/1.2 Consolas, "Microsoft YaHei", monospace;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    text-shadow: 0 0 14px rgba(117, 220, 255, 0.5);
    animation: none;
}

.profile-stats-row .uptime-card .uptime-segment {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    color: inherit;
    font-size: inherit;
}

.profile-stats-row .uptime-card .uptime-number {
    color: #f2fbff;
    font: inherit;
    letter-spacing: -0.03em;
}

.profile-stats-row .uptime-card .uptime-unit {
    color: rgba(226, 244, 255, 0.82);
    font: 15px/1 "Microsoft YaHei", sans-serif;
}

.stat-caption {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: rgba(218, 237, 247, 0.58) !important;
    font-size: 10px !important;
}

.stat-caption b {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--profile-green);
    box-shadow: 0 0 9px var(--profile-green);
}

.current-status ul {
    display: grid;
    gap: 10px;
    padding-left: 16px;
    color: rgba(225, 241, 249, 0.75);
    font-size: 11px;
    line-height: 1.4;
}

.current-status li::marker {
    color: var(--profile-cyan);
}

.project-focus h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #eef9ff;
    font-size: 14px;
}

.project-focus h3 i {
    color: var(--profile-cyan);
    font-size: 22px;
}

.project-focus p {
    margin: 9px 0 13px;
    color: rgba(217, 237, 247, 0.62);
    font-size: 10px;
    line-height: 1.55;
}

.project-focus > a {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(255, 119, 184, 0.6);
    border-radius: 8px;
    color: #ff91c6;
    font-size: 11px;
    text-decoration: none;
    transition: 0.2s ease;
}

.project-focus > a:hover,
.project-focus > a:focus-visible {
    color: #fff;
    background: rgba(255, 119, 184, 0.12);
}

.launch-module {
    z-index: 5;
    overflow: visible;
    padding: 16px 20px 18px;
}

.launch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.launch-grid a,
.launch-grid button {
    position: relative;
    min-height: 64px;
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid rgba(165, 222, 249, 0.2);
    border-radius: 9px;
    color: #effaff;
    background: rgba(121, 203, 239, 0.045);
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    transition: 0.22s ease;
}

.launch-grid a:hover,
.launch-grid button:hover,
.launch-grid a:focus-visible,
.launch-grid button:focus-visible {
    border-color: rgba(117, 220, 255, 0.48);
    background: rgba(117, 220, 255, 0.1);
    transform: translateY(-2px);
}

.launch-grid > * > i:first-child {
    color: var(--profile-cyan);
    font-size: 29px;
}

.launch-grid > *:nth-child(2) > i:first-child {
    color: #df8cff;
}

.launch-grid > *:nth-child(3) > i:first-child {
    color: #fff;
}

.launch-grid span {
    display: grid;
    gap: 3px;
}

.launch-grid strong {
    font-size: 13px;
}

.launch-grid small {
    color: rgba(216, 236, 246, 0.55);
    font-size: 9px;
}

.launch-grid > * > i:last-child {
    color: var(--profile-cyan);
}

.launch-preview {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: calc(100% + 12px);
    display: grid;
    justify-items: center;
    gap: 7px;
    width: min(250px, calc(100vw - 40px));
    padding: 15px;
    border: 1px solid rgba(117, 220, 255, 0.48);
    border-radius: 16px;
    color: #effaff;
    background: rgba(7, 35, 61, 0.97);
    box-shadow: 0 20px 40px rgba(0, 15, 30, 0.46);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.launch-preview strong {
    font-size: 14px;
}

.launch-preview p {
    margin: 0;
    color: rgba(216, 236, 246, 0.8);
    font-size: 11px;
    text-align: center;
}

.launch-preview img {
    width: 128px;
    height: 128px;
    object-fit: contain;
    border: 6px solid #fff;
    border-radius: 9px;
    background: #fff;
}

.launch-grid a:hover .launch-preview,
.launch-grid a:focus-visible .launch-preview {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.profile-page .qr-modal {
    backdrop-filter: blur(10px);
    background: rgba(2, 12, 24, 0.76);
}

.profile-page .social-box {
    position: relative;
    width: min(440px, calc(100vw - 44px));
    padding: 28px;
    border-color: rgba(117, 220, 255, 0.42);
    border-radius: 22px;
    background:
        radial-gradient(circle at 50% 0, rgba(74, 194, 255, 0.12), transparent 42%),
        rgba(6, 29, 51, 0.96);
    box-shadow:
        0 28px 70px rgba(0, 10, 24, 0.58),
        0 0 32px rgba(69, 200, 255, 0.08),
        inset 0 1px rgba(255, 255, 255, 0.09);
}

.profile-page .social-box h2 {
    margin: 2px 36px 10px;
    color: #f4fbff;
    font-size: clamp(22px, 4vw, 26px);
}

.profile-page .social-box p {
    margin: 0 auto 18px;
    max-width: 350px;
    color: rgba(216, 236, 246, 0.78);
    font-size: 14px;
}

.social-qr-stage {
    display: grid;
    place-items: center;
    width: min(258px, 72vw);
    min-height: 226px;
    margin: 0 auto 20px;
    padding: 14px;
    border: 1px solid rgba(117, 220, 255, 0.18);
    border-radius: 20px;
    background:
        linear-gradient(145deg, rgba(117, 220, 255, 0.08), rgba(15, 62, 96, 0.03)),
        rgba(2, 19, 35, 0.56);
    box-shadow:
        inset 0 1px rgba(255, 255, 255, 0.05),
        0 12px 30px rgba(0, 13, 28, 0.28);
}

.social-box .social-qr {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    margin: 0;
    object-fit: contain;
}

.social-box .social-qr-square {
    width: 202px;
    aspect-ratio: 1;
    image-rendering: crisp-edges;
    filter: drop-shadow(0 10px 18px rgba(0, 8, 18, 0.3));
}

.profile-page .social-link {
    min-height: 46px;
    border-color: rgba(117, 220, 255, 0.34);
    color: #effaff;
    background: linear-gradient(135deg, rgba(56, 150, 205, 0.48), rgba(36, 101, 151, 0.58));
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
}

.profile-page .social-link:hover {
    border-color: rgba(142, 229, 255, 0.62);
    background: linear-gradient(135deg, rgba(67, 173, 231, 0.6), rgba(42, 119, 176, 0.7));
    box-shadow: 0 10px 24px rgba(27, 139, 202, 0.2), inset 0 1px rgba(255, 255, 255, 0.16);
}

.profile-page .mobile-url {
    color: rgba(216, 236, 246, 0.76);
    font-size: 12px;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(167, 222, 248, 0.24);
    border-radius: 50%;
    color: #fff;
    background: rgba(117, 220, 255, 0.08);
    cursor: pointer;
    font-size: 19px;
}

.modal-close:hover {
    border-color: rgba(167, 222, 248, 0.5);
    background: rgba(117, 220, 255, 0.16);
}

@media (max-width: 520px) {
    .profile-page .social-box {
        padding: 24px 18px 20px;
    }

    .social-qr-stage {
        min-height: 210px;
        padding: 12px;
    }

    .social-box .social-qr-square {
        width: 188px;
    }
}

@keyframes profileRise {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@media (max-width: 1160px) {
    .profile-location,
    .profile-brand span:last-child {
        display: none;
    }

    .profile-page .site-nav {
        left: 18px;
        right: 18px;
    }

    .profile-main {
        grid-template-columns: 290px minmax(0, 1fr);
        gap: 28px;
        width: min(100% - 40px, 1040px);
    }

    .profile-identity {
        padding-left: 14px;
        padding-right: 24px;
    }

    .profile-avatar-shell {
        width: 154px;
        height: 154px;
    }

    .profile-name {
        font-size: 42px;
    }

    .profile-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-focus {
        grid-column: 1 / -1;
        min-height: 142px !important;
    }
}

@media (max-width: 820px) {
    .profile-page {
        overflow-y: auto;
    }

    .profile-page .site-nav {
        position: fixed;
        top: auto;
        bottom: calc(10px + env(safe-area-inset-bottom));
        left: 12px;
        right: auto;
        width: calc(100% - 24px);
        min-height: 64px;
        padding: 0 7px;
        overflow: visible;
        border-radius: 22px;
        background: rgba(7, 35, 61, 0.9);
    }

    .profile-brand,
    .profile-page .nav-controls {
        display: none;
    }

    .profile-nav-links {
        position: static;
        width: 100%;
        min-width: 0;
        height: 62px;
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 2px;
        margin: 0;
    }

    .profile-page .nav-link {
        min-width: 0;
        justify-content: center;
        padding: 0;
    }

    .profile-page .nav-link span {
        display: none;
    }

    .profile-page .nav-link i {
        font-size: 21px;
    }

    .profile-main {
        display: grid;
        grid-template-columns: 1fr;
        align-items: start;
        gap: 22px;
        width: min(100% - 24px, 680px);
        padding: 22px 0 calc(98px + env(safe-area-inset-bottom));
    }

    .profile-identity {
        display: grid;
        grid-template-columns: 128px 1fr;
        gap: 0 22px;
        padding: 24px 20px;
        border: 1px solid var(--profile-line);
        border-radius: 20px;
        background: rgba(7, 35, 61, 0.78);
        backdrop-filter: blur(16px);
    }

    .command-panel {
        background:
            radial-gradient(380px circle at var(--mx) var(--my), rgba(117, 220, 255, 0.12), transparent 56%),
            linear-gradient(135deg, rgba(20, 69, 104, 0.84), rgba(7, 35, 61, 0.84));
    }

    .profile-index {
        display: none;
    }

    .profile-avatar-shell {
        grid-row: 1 / span 4;
        width: 128px;
        height: 128px;
        margin: 0;
    }

    .profile-name-row {
        align-self: end;
    }

    .profile-name {
        font-size: 38px;
    }

    .profile-tagline {
        align-self: start;
        margin-top: 12px;
        font-size: 14px;
    }

    .profile-identity blockquote {
        grid-column: 1 / -1;
        margin-top: 22px;
    }

    .profile-meta,
    .profile-social-mini {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .profile-main {
        width: min(100% - 20px, 520px);
    }

    .profile-identity {
        grid-template-columns: 88px 1fr;
        gap: 0 16px;
        padding: 20px 16px;
    }

    .profile-avatar-shell {
        width: 88px;
        height: 88px;
        padding: 5px;
    }

    .profile-online-dot {
        width: 16px;
        height: 16px;
        right: -2px;
        bottom: 8px;
        border-width: 3px;
    }

    .profile-name {
        font-size: 32px;
    }

    .online-badge {
        display: none;
    }

    .profile-tagline {
        font-size: 12px;
        letter-spacing: 0.03em;
    }

    .profile-identity blockquote {
        margin-top: 18px;
        font-size: 12px;
    }

    .profile-meta {
        gap: 9px 14px;
        font-size: 10px;
    }

    .about-layout {
        grid-template-columns: 1fr;
    }

    .about-layout img {
        height: 150px;
    }

    .interest-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .project-focus {
        grid-column: auto;
    }

    .launch-grid {
        grid-template-columns: 1fr;
    }

    .profile-page .lang-menu {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-identity,
    .profile-content,
    .profile-avatar-shell::before {
        animation: none;
    }

    .profile-social-mini *,
    .interest-item,
    .launch-grid > * {
        transition: none;
    }
}

/* Blog: Cloud Editorial */
.blog-page {
    --blog-ink: #143f67;
    --blog-muted: #527493;
    --blog-cyan: #37bce7;
    --blog-pink: #ff6dac;
    --blog-line: rgba(43, 126, 176, 0.2);
    --blog-glass: rgba(232, 247, 255, 0.52);
    min-height: 100vh;
    background: #9ed8f6;
    overflow-x: hidden;
}

.blog-page .site-bg {
    background-position: center center;
    filter: saturate(0.98) contrast(1.01) brightness(0.98);
}

.blog-page .site-overlay {
    background:
        linear-gradient(90deg, rgba(222, 243, 255, 0.22), rgba(255, 255, 255, 0.02) 55%, rgba(225, 245, 255, 0.16)),
        linear-gradient(180deg, rgba(212, 241, 255, 0.03), rgba(224, 244, 255, 0.18));
    backdrop-filter: none;
}

.blog-page .site-nav {
    top: 20px;
    left: clamp(18px, 2.6vw, 40px);
    right: clamp(18px, 2.6vw, 40px);
    width: auto;
    min-height: 66px;
    padding: 0 18px 0 24px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 23px;
    background: rgba(125, 198, 235, 0.28);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.34), 0 18px 45px rgba(45, 111, 151, 0.1);
    backdrop-filter: blur(18px) saturate(1.08);
    -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

.blog-page .profile-brand {
    color: rgba(245, 252, 255, 0.96);
    text-shadow: 0 1px 10px rgba(31, 91, 130, 0.2);
}

.blog-page .profile-nav-links {
    display: flex;
    align-self: stretch;
    justify-content: center;
    gap: clamp(4px, 1.1vw, 18px);
    margin: 0 auto;
}

.blog-page .nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    color: rgba(247, 252, 255, 0.86);
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 1px 8px rgba(38, 101, 141, 0.22);
}

.blog-page .nav-link i {
    font-size: 19px;
}

.blog-page .nav-link::after {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 0;
    height: 2px;
    opacity: 0;
    background: var(--blog-pink);
    box-shadow: 0 0 9px rgba(255, 109, 172, 0.7);
}

.blog-page .nav-link.active::after {
    opacity: 1;
}

.blog-page .nav-controls {
    margin-left: 0;
}

.blog-page .profile-location {
    color: rgba(245, 252, 255, 0.78);
}

.blog-page .icon-toggle {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.12);
    text-shadow: none;
}

.blog-main {
    width: min(1320px, calc(100% - clamp(34px, 6vw, 92px)));
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(245px, 0.7fr) minmax(690px, 2.15fr);
    gap: clamp(34px, 4vw, 62px);
    margin: 0 auto;
    padding: 112px 0 70px;
    text-align: left;
}

.blog-sidebar {
    position: sticky;
    top: 110px;
    align-self: start;
    min-width: 0;
    padding: 22px 28px 26px 2px;
    border-right: 1px solid rgba(42, 119, 165, 0.22);
}

.blog-kicker {
    color: rgba(35, 105, 151, 0.58) !important;
    font: 10px/1.2 Consolas, monospace;
    letter-spacing: 0.16em;
}

.blog-hero h1 {
    margin-top: 17px;
    color: var(--blog-ink);
    font-size: clamp(38px, 4vw, 56px);
    font-weight: 780;
    letter-spacing: 0.03em;
    text-shadow: 0 4px 24px rgba(70, 151, 197, 0.14);
}

.blog-hero > p:last-child {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    color: rgba(29, 78, 113, 0.78);
    font-size: 13px;
    line-height: 1.6;
}

.blog-hero > p:last-child::before {
    content: "";
    width: 24px;
    height: 2px;
    flex: 0 0 auto;
    background: var(--blog-pink);
}

.blog-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 26px;
}

.blog-stats > span {
    min-width: 0;
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 2px 8px;
    padding: 10px 0;
    color: var(--blog-ink);
}

.blog-stats i {
    grid-row: 1 / span 2;
    align-self: center;
    color: var(--blog-pink);
    font-size: 23px;
}

.blog-stats strong {
    overflow: hidden;
    font: 13px/1.2 Consolas, monospace;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.blog-stats small {
    color: var(--blog-muted);
    font-size: 9px;
}

.blog-tools {
    display: grid;
    gap: 14px;
    justify-items: stretch;
    margin-top: 18px;
}

.search-shell {
    min-height: 44px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 13px;
    background: rgba(231, 247, 255, 0.36);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.38);
    backdrop-filter: blur(14px);
}

.search-shell > i {
    color: var(--blog-cyan);
    font-size: 18px;
}

.search-shell kbd {
    min-width: 23px;
    padding: 3px 6px;
    border: 1px solid rgba(34, 108, 153, 0.2);
    border-radius: 6px;
    color: var(--blog-muted);
    background: rgba(255, 255, 255, 0.32);
    font: 11px Consolas, monospace;
    text-align: center;
}

.blog-page .search-input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: 0;
    color: var(--blog-ink);
    background: transparent;
    backdrop-filter: none;
    font-size: 12px;
}

.blog-page .search-input::placeholder {
    color: rgba(44, 99, 135, 0.52);
}

.blog-page .tabs {
    display: grid;
    gap: 6px;
}

.blog-page .tab {
    min-height: 40px;
    display: grid;
    grid-template-columns: 24px 1fr auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: var(--blog-ink);
    background: transparent;
    text-align: left;
}

.blog-page .tab i {
    color: var(--blog-cyan);
    font-size: 18px;
}

.blog-page .tab b {
    color: rgba(40, 92, 127, 0.55);
    font: 10px Consolas, monospace;
}

.blog-page .tab:hover,
.blog-page .tab.active {
    color: var(--blog-ink);
    border-color: rgba(255, 255, 255, 0.64);
    background: rgba(236, 249, 255, 0.4);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.4);
    transform: none;
}

.blog-page .tab.active i {
    color: var(--blog-pink);
}

.blog-page .video-snapshot-note {
    margin: 12px 4px 0;
    color: rgba(40, 92, 127, 0.72);
    font-size: 11px;
    line-height: 1.5;
}

.blog-page .video-snapshot-note a {
    color: var(--blog-cyan);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.blog-tags {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(39, 110, 153, 0.16);
}

.blog-tags h2 {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--blog-ink);
    font-size: 12px;
}

.blog-tags h2 i {
    color: var(--blog-pink);
}

.blog-tags > div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.blog-tags span {
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 999px;
    color: #3e7194;
    background: rgba(235, 249, 255, 0.34);
    font-size: 9px;
}

.blog-sidebar blockquote {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.44);
    border-radius: 14px;
    color: rgba(32, 78, 111, 0.68);
    background: rgba(234, 249, 255, 0.25);
    font-size: 11px;
    line-height: 1.8;
    backdrop-filter: blur(10px);
}

.blog-sidebar cite {
    display: block;
    margin-top: 9px;
    color: var(--blog-pink);
    font-style: normal;
    font-weight: 700;
}

.blog-socials {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.blog-socials a,
.blog-socials button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 50%;
    color: var(--blog-ink);
    background: rgba(234, 248, 255, 0.3);
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s ease;
}

.blog-socials a:hover,
.blog-socials button:hover,
.blog-socials a:focus-visible,
.blog-socials button:focus-visible {
    color: #fff;
    border-color: var(--blog-cyan);
    background: var(--blog-cyan);
    transform: translateY(-2px);
}

.blog-editorial {
    min-width: 0;
}

.featured-post {
    min-height: 300px;
}

.featured-post[hidden] {
    display: none;
}

.featured-post > button {
    position: relative;
    width: 100%;
    height: 300px;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 22px;
    color: #fff;
    background: rgba(181, 222, 242, 0.36);
    cursor: pointer;
    text-align: left;
    box-shadow: 0 20px 48px rgba(58, 117, 151, 0.14);
}

.featured-post img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.featured-post button:hover img,
.featured-post button:focus-visible img {
    transform: scale(1.035);
}

.featured-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 24%, rgba(7, 35, 58, 0.08) 48%, rgba(7, 35, 58, 0.86) 100%);
}

.featured-post .post-category {
    top: 18px;
    left: 18px;
    background: rgba(17, 66, 98, 0.72);
    backdrop-filter: blur(8px);
}

.featured-copy {
    position: absolute;
    z-index: 2;
    left: 28px;
    right: 100px;
    bottom: 24px;
    display: grid;
    gap: 9px;
}

.featured-copy strong {
    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.08;
    text-shadow: 0 3px 18px rgba(0, 25, 42, 0.32);
}

.featured-copy em {
    color: rgba(245, 252, 255, 0.86);
    font-size: 13px;
    font-style: normal;
    line-height: 1.6;
}

.featured-copy small {
    display: flex;
    align-items: center;
    gap: 7px;
    color: rgba(242, 251, 255, 0.74);
    font: 10px Consolas, monospace;
}

.featured-copy small i:nth-of-type(2) {
    margin-left: 14px;
}

.featured-index {
    position: absolute;
    z-index: 2;
    right: 22px;
    bottom: 22px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--blog-pink);
    font: 10px Consolas, monospace;
}

.feed-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 25px 0 8px;
    padding-bottom: 11px;
    border-bottom: 1px solid rgba(34, 105, 149, 0.18);
}

.feed-heading h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--blog-ink);
    font-size: 15px;
}

.feed-heading h2 i {
    color: var(--blog-pink);
}

.feed-sort {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.64);
    border-radius: 12px;
    background: rgba(231, 247, 255, 0.42);
}

.feed-sort button {
    min-height: 30px;
    padding: 5px 12px;
    border: 0;
    border-radius: 8px;
    color: var(--blog-muted);
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.feed-sort button:hover,
.feed-sort button:focus-visible {
    color: var(--blog-ink);
    background: rgba(255, 255, 255, 0.55);
}

.feed-sort button[aria-pressed="true"] {
    color: var(--blog-ink);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 2px 9px rgba(42, 99, 135, 0.12);
}

.feed-heading > span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--blog-muted);
    font: 9px Consolas, monospace;
}

.feed-heading > span i {
    color: var(--blog-pink);
    font-size: 16px;
}

@media (max-width: 680px) {
    .feed-heading {
        flex-wrap: wrap;
        gap: 10px;
    }

    .feed-sort {
        order: 3;
        width: 100%;
    }

    .feed-sort button {
        flex: 1;
        padding-inline: 6px;
    }
}

.blog-page .post-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 0;
}

.blog-page .feed-more {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: min(100%, 240px);
    margin: 24px auto 8px;
    padding: 8px 18px;
    border: 1px solid rgba(34, 105, 149, 0.3);
    border-radius: 12px;
    color: var(--blog-ink);
    background: rgba(231, 247, 255, 0.55);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.blog-page .feed-more:hover,
.blog-page .feed-more:focus-visible {
    border-color: var(--blog-pink);
    background: rgba(255, 255, 255, 0.8);
}

.blog-page .feed-more:focus-visible {
    outline: 2px solid var(--blog-pink);
    outline-offset: 3px;
}

.blog-page .feed-more[hidden] {
    display: none;
}

.blog-page .post-card {
    min-height: 0;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 20px;
    padding: 10px 0;
    overflow: visible;
    border: 0;
    border-bottom: 1px solid rgba(34, 105, 149, 0.14);
    border-radius: 0;
    color: var(--blog-ink);
    background: transparent;
    box-shadow: none;
    transition: padding 0.22s ease, background 0.22s ease;
}

.blog-page .post-card:hover,
.blog-page .post-card:focus-visible {
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 12px;
    outline: 2px solid transparent;
    background: rgba(237, 249, 255, 0.35);
    box-shadow: none;
    transform: none;
}

.post-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 13px;
}

.blog-page .post-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.blog-page .post-card:hover img {
    transform: scale(1.04);
}

.post-thumb .post-category {
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    background: rgba(14, 59, 89, 0.68);
    font-size: 9px;
}

.blog-page .post-content {
    min-width: 0;
    display: grid;
    gap: 6px;
    padding: 0;
}

.blog-page .post-content strong {
    color: var(--blog-ink);
    font-size: 17px;
    line-height: 1.28;
}

.blog-page .post-content em {
    overflow: hidden;
    color: var(--blog-muted);
    font-size: 11px;
    font-style: normal;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.blog-page .post-meta {
    display: flex;
    justify-content: flex-start;
    gap: 18px;
    margin-top: 2px;
    color: rgba(51, 99, 133, 0.62);
    font-size: 9px;
}

.blog-page .post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.post-arrow {
    color: var(--blog-cyan);
    font-size: 20px;
    transition: transform 0.2s ease;
}

.post-card:hover .post-arrow {
    transform: translateX(4px);
}

.blog-page .empty-state {
    color: var(--blog-ink);
    background: rgba(235, 249, 255, 0.42);
}

.blog-page .comments-panel {
    margin-top: 38px;
    padding: clamp(20px, 3vw, 32px);
    border-color: rgba(255, 255, 255, 0.76);
    border-radius: 22px;
    background: rgba(250, 253, 255, 0.88);
    box-shadow: 0 16px 42px rgba(37, 100, 140, 0.1);
    -webkit-backdrop-filter: blur(18px);
}

.blog-page .comments-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px 24px;
    padding-bottom: 19px;
    border-bottom: 1px solid var(--blog-line);
}

.blog-page .comments-kicker {
    color: var(--blog-muted);
    font: 700 10px/1.4 Consolas, monospace;
    letter-spacing: 0.15em;
}

.blog-page .comments-panel h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 6px 0 0;
    color: var(--blog-ink);
    font-size: 20px;
    line-height: 1.35;
}

.blog-page .comments-panel h2 i {
    color: var(--blog-pink);
}

.blog-page .comments-heading p {
    margin: 0 0 2px;
    color: var(--blog-muted);
    font-size: 12px;
    line-height: 1.6;
}

.blog-page .comments-panel .giscus {
    padding-top: 20px;
}

.blog-page .comments-panel .giscus-frame {
    display: block;
    width: 100%;
}

@media (max-width: 600px) {
    .blog-page .comments-heading {
        align-items: flex-start;
        flex-direction: column;
        padding-bottom: 16px;
    }

    .blog-page .comments-panel .giscus {
        padding-top: 16px;
    }
}

.blog-page .post-modal,
.blog-page .qr-modal {
    backdrop-filter: blur(12px);
}

.blog-page .post-dialog,
.blog-page .social-box {
    position: relative;
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(235, 248, 255, 0.94);
    color: var(--blog-ink);
    box-shadow: 0 28px 70px rgba(29, 79, 110, 0.28);
}

.blog-page .post-detail-content,
.blog-page .social-box p {
    color: #375d79;
}

.blog-page .social-qr-stage {
    border-color: rgba(61, 162, 212, 0.28);
    background: rgba(255, 255, 255, 0.74);
}

.blog-page .social-box .social-link {
    color: #fff;
    background: var(--blog-cyan);
}

.blog-page .social-box .mobile-url {
    color: #375d79;
    font-size: 12px;
}

.blog-page .post-detail-category,
.blog-page .close-button {
    color: var(--blog-ink);
    background: rgba(61, 162, 212, 0.12);
}

.blog-page .post-link {
    border-color: var(--blog-cyan);
    background: var(--blog-cyan);
}

.blog-page .post-modal {
    padding: 16px;
    background: rgba(5, 22, 36, 0.78);
}

.blog-page .post-dialog {
    width: min(880px, 100%);
    max-width: 100%;
    max-height: calc(100dvh - 32px);
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 24px;
    background: #f2f8fc;
    box-shadow: 0 38px 110px rgba(4, 26, 44, 0.42);
    scrollbar-width: thin;
    scrollbar-color: rgba(58, 114, 148, 0.45) transparent;
}

.blog-page .post-dialog::-webkit-scrollbar {
    width: 6px;
}

.blog-page .post-dialog::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(58, 114, 148, 0.45);
}

.post-detail-hero {
    position: relative;
    overflow: hidden;
    background: #123955;
}

.blog-page .post-detail-hero img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    display: block;
    object-fit: cover;
}

.post-detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(4, 24, 39, 0.18), transparent 30%, rgba(4, 24, 39, 0.88) 100%);
    pointer-events: none;
}

.blog-page .post-detail-close {
    position: absolute;
    z-index: 3;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 50%;
    color: #fff;
    background: rgba(5, 30, 48, 0.64);
    backdrop-filter: blur(10px);
}

.blog-page .post-detail-close:hover,
.blog-page .post-detail-close:focus-visible {
    color: #113b57;
    background: #fff;
}

.post-detail-heading {
    position: absolute;
    z-index: 2;
    right: 56px;
    bottom: 32px;
    left: 42px;
}

.blog-page .post-detail-category {
    margin-bottom: 14px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    color: #fff;
    background: rgba(9, 52, 78, 0.55);
    backdrop-filter: blur(8px);
}

.blog-page .post-detail-title {
    max-width: 19em;
    margin: 0;
    color: #fff;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.22;
    text-wrap: balance;
    text-shadow: 0 3px 22px rgba(0, 17, 31, 0.38);
}

.blog-page .post-detail-meta {
    margin: 13px 0 0;
    color: rgba(245, 251, 255, 0.85);
    font-size: 13px;
    letter-spacing: 0.03em;
}

.blog-page .post-detail-body {
    padding: 42px clamp(26px, 7vw, 76px) 34px;
    background: linear-gradient(160deg, #f6fbfd, #eaf5fa);
}

.blog-page .post-detail-content {
    max-width: 66ch;
    margin: 0 auto;
    color: #365a72;
    font-size: 16px;
    line-height: 1.95;
    letter-spacing: 0.015em;
}

.blog-page .post-detail-content p {
    margin: 0;
}

.blog-page .post-detail-content p:first-child {
    color: #173f5d;
    font-size: 18px;
    font-weight: 500;
}

.blog-page .post-detail-content p + p {
    margin-top: 1.5em;
}

.post-detail-footer {
    max-width: 66ch;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    margin: 34px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(37, 104, 145, 0.18);
}

.post-endmark {
    color: rgba(33, 96, 136, 0.48);
    font: 10px Consolas, monospace;
    letter-spacing: 0.12em;
}

.blog-page .post-detail-footer .post-link {
    margin: 0;
}

@media (max-width: 640px) {
    .blog-page .post-modal {
        padding: 10px;
    }

    .blog-page .post-dialog {
        max-height: calc(100dvh - 20px);
        border-radius: 18px;
    }

    .blog-page .post-detail-close {
        top: 12px;
        right: 12px;
    }

    .post-detail-shade {
        display: none;
    }

    .post-detail-heading {
        position: static;
        padding: 24px 24px 0;
        background: #f6fbfd;
    }

    .blog-page .post-detail-category {
        color: var(--blog-ink);
        border-color: rgba(37, 104, 145, 0.18);
        background: rgba(61, 162, 212, 0.12);
    }

    .blog-page .post-detail-title {
        color: var(--blog-ink);
        font-size: clamp(26px, 7vw, 34px);
        text-shadow: none;
    }

    .blog-page .post-detail-meta {
        color: var(--blog-muted);
    }

    .blog-page .post-detail-body {
        padding: 28px 24px 30px;
    }

    .blog-page .post-detail-content {
        font-size: 15px;
    }

    .blog-page .post-detail-content p:first-child {
        font-size: 17px;
    }
}

.blog-page .modal-close {
    color: var(--blog-ink);
    border-color: rgba(40, 119, 165, 0.24);
    background: rgba(61, 162, 212, 0.12);
}

.blog-page .float-button {
    color: var(--blog-ink);
    border-color: rgba(255, 255, 255, 0.72);
    background: rgba(230, 247, 255, 0.68);
    box-shadow: 0 12px 30px rgba(41, 101, 138, 0.18);
    text-shadow: none;
}

@media (max-width: 1060px) {
    .blog-page .profile-location,
    .blog-page .profile-brand span:last-child {
        display: none;
    }

    .blog-main {
        grid-template-columns: 230px minmax(0, 1fr);
        gap: 30px;
        width: min(100% - 36px, 960px);
    }

    .blog-page .post-card {
        grid-template-columns: 170px minmax(0, 1fr) 26px;
    }
}

@media (max-width: 820px) {
    .blog-page .site-nav {
        position: fixed;
        top: auto;
        bottom: calc(10px + env(safe-area-inset-bottom));
        left: 12px;
        right: auto;
        width: calc(100% - 24px);
        min-height: 64px;
        padding: 0 7px;
        overflow: visible;
        border-radius: 22px;
        background: rgba(75, 158, 202, 0.78);
    }

    .blog-page .profile-brand,
    .blog-page .nav-controls {
        display: none;
    }

    .blog-page .profile-nav-links {
        width: 100%;
        min-width: 0;
        height: 62px;
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 2px;
        margin: 0;
    }

    .blog-page .nav-link {
        min-width: 0;
        justify-content: center;
        padding: 0;
    }

    .blog-page .nav-link span {
        display: none;
    }

    .blog-page .nav-link i {
        font-size: 21px;
    }

    .blog-main {
        display: grid;
        grid-template-columns: 1fr;
        gap: 22px;
        width: min(100% - 22px, 700px);
        padding: 24px 0 calc(98px + env(safe-area-inset-bottom));
    }

    .blog-sidebar {
        position: static;
        padding: 20px;
        border: 1px solid rgba(255, 255, 255, 0.68);
        border-radius: 22px;
        background: rgba(229, 247, 255, 0.38);
        backdrop-filter: blur(16px);
    }

    .blog-kicker,
    .blog-sidebar blockquote {
        display: none;
    }

    .blog-socials {
        justify-content: center;
    }

    .blog-hero h1 {
        margin-top: 0;
        font-size: 38px;
    }

    .blog-stats {
        margin-top: 14px;
    }

    .blog-page .tabs {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 5px;
    }

    .blog-page .tab {
        min-height: 54px;
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 2px;
        padding: 5px;
        text-align: center;
    }

    .blog-page .tab b {
        display: none;
    }

    .blog-page .tab span {
        overflow: hidden;
        max-width: 100%;
        font-size: 10px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .blog-tags {
        display: none;
    }
}

@media (max-width: 560px) {
    .blog-main {
        width: min(100% - 18px, 520px);
    }

    .blog-sidebar {
        padding: 18px 14px;
    }

    .blog-hero h1 {
        font-size: 34px;
    }

    .blog-hero > p:last-child {
        font-size: 12px;
    }

    .blog-stats {
        grid-template-columns: 1fr 1.25fr;
    }

    .featured-post,
    .featured-post > button {
        min-height: 290px;
        height: 290px;
    }

    .featured-copy {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }

    .featured-copy strong {
        font-size: 27px;
    }

    .featured-copy em {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .featured-index {
        top: 18px;
        right: 18px;
        bottom: auto;
    }

    .blog-page .post-card {
        grid-template-columns: 112px minmax(0, 1fr) 20px;
        gap: 12px;
        min-height: 102px;
    }

    .post-thumb {
        height: auto;
    }

    .blog-page .post-content strong {
        display: -webkit-box;
        overflow: hidden;
        font-size: 14px;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .blog-page .post-content em {
        display: none;
    }

    .blog-page .post-meta {
        gap: 9px;
        font-size: 8px;
    }

    .blog-page .comments-panel {
        padding: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .featured-post img,
    .blog-page .post-card img,
    .blog-socials *,
    .post-arrow {
        transition: none;
    }
}

/* Shared site navigation: desktop glass bar + mobile bottom dock */
:is(.profile-page, .blog-page, .games-page, .portal-page, .dashboard-page, .projects-page) {
    --dock-accent: #ff77b8;
    --dock-icon: rgba(205, 237, 252, 0.9);
    --dock-text: rgba(229, 244, 252, 0.76);
    --dock-border: rgba(169, 224, 251, 0.24);
    --dock-bg: rgba(10, 45, 75, 0.58);
    --dock-mobile-bg: rgba(7, 35, 61, 0.92);
}

.blog-page {
    --dock-accent: var(--blog-pink);
    --dock-icon: rgba(247, 252, 255, 0.94);
    --dock-text: rgba(247, 252, 255, 0.88);
    --dock-border: rgba(255, 255, 255, 0.58);
    --dock-bg: rgba(125, 198, 235, 0.28);
    --dock-mobile-bg: rgba(75, 158, 202, 0.82);
}

.unified-nav.site-nav {
    position: fixed;
    top: 20px;
    left: clamp(18px, 2.6vw, 40px);
    right: clamp(18px, 2.6vw, 40px);
    z-index: 40;
    width: auto;
    min-height: 66px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 18px 0 24px;
    overflow: visible;
    border: 1px solid var(--dock-border);
    border-radius: 23px;
    background: var(--dock-bg);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.12), 0 18px 45px rgba(0, 20, 38, 0.18);
    backdrop-filter: blur(20px) saturate(1.15);
    -webkit-backdrop-filter: blur(20px) saturate(1.15);
    white-space: normal;
}

.unified-nav .profile-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    color: rgba(241, 250, 255, 0.94);
    font: 12px/1 Consolas, "SFMono-Regular", monospace;
    letter-spacing: 0.12em;
    text-decoration: none;
    text-shadow: none;
}

.unified-nav .status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--dock-icon);
    box-shadow: 0 0 12px var(--dock-icon);
}

.unified-nav .profile-nav-links {
    min-width: 0;
    display: flex;
    align-self: stretch;
    align-items: stretch;
    justify-content: center;
    gap: clamp(4px, 1.1vw, 18px);
    margin: 0 auto;
}

.unified-nav .nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    color: var(--dock-text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-shadow: none;
}

.unified-nav .nav-link i {
    color: var(--dock-icon);
    font-size: 19px;
}

.unified-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 0;
    height: 2px;
    opacity: 0;
    background: var(--dock-accent);
    box-shadow: 0 0 10px var(--dock-accent);
    transition: opacity 0.2s ease;
}

.unified-nav .nav-link:hover,
.unified-nav .nav-link.active {
    color: #fff;
}

.unified-nav .nav-link.active::after {
    opacity: 1;
}

.unified-nav .nav-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    margin-left: 0;
}

.unified-nav .profile-location {
    margin-right: 8px;
    color: var(--dock-text);
    font: 10px/1 Consolas, monospace;
    letter-spacing: 0.12em;
    white-space: nowrap;
}

.unified-nav .icon-toggle {
    color: #fff;
    border-color: var(--dock-border);
    background: rgba(133, 213, 250, 0.07);
    text-shadow: none;
}

.unified-nav .nav-link:focus-visible,
.unified-nav .profile-brand:focus-visible,
.unified-nav .icon-toggle:focus-visible {
    outline: 2px solid var(--dock-accent);
    outline-offset: 3px;
}

@media (max-width: 1280px) {
    .unified-nav .profile-location,
    .unified-nav .profile-brand span:last-child {
        display: none;
    }
}

@media (max-width: 820px) {
    .unified-nav.site-nav {
        top: auto;
        bottom: calc(10px + env(safe-area-inset-bottom));
        left: 12px;
        right: auto;
        width: calc(100% - 24px);
        min-height: 64px;
        padding: 0 7px;
        overflow: visible;
        border-radius: 22px;
        background: var(--dock-mobile-bg);
    }

    .unified-nav .profile-brand,
    .unified-nav .nav-controls {
        display: none;
    }

    .unified-nav .profile-nav-links {
        position: static;
        width: 100%;
        min-width: 0;
        height: 62px;
        display: grid;
        grid-template-columns: repeat(8, minmax(0, 1fr));
        gap: 2px;
        margin: 0;
    }

    .unified-nav .nav-link {
        min-width: 0;
        justify-content: center;
        padding: 0;
    }

    .unified-nav .nav-link span {
        display: none;
    }

    .unified-nav .nav-link i {
        font-size: 21px;
    }

    .games-main,
    .portal-main,
    .dashboard-main {
        padding-top: 24px;
        padding-bottom: calc(100px + env(safe-area-inset-bottom));
    }

    .mobile-gamepad {
        bottom: calc(92px + env(safe-area-inset-bottom));
    }
}

/* Soft cross-page navigation */
@view-transition {
    navigation: auto;
}

::view-transition-group(root) {
    background: #18212f;
    animation-duration: 420ms;
}

::view-transition-old(root),
::view-transition-new(root) {
    mix-blend-mode: normal;
}

::view-transition-old(root) {
    animation: 180ms cubic-bezier(0.4, 0, 1, 1) both softPageExit;
}

::view-transition-new(root) {
    animation: 420ms cubic-bezier(0.16, 1, 0.3, 1) both softPageEnter;
}

@keyframes softPageExit {
    from {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }
    to {
        opacity: 0;
        filter: blur(3px);
        transform: scale(0.99);
    }
}

@keyframes softPageEnter {
    from {
        opacity: 0;
        filter: blur(4px);
        transform: scale(1.012);
    }
    to {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }
}

@supports not (view-transition-name: root) {
    body {
        animation: 380ms cubic-bezier(0.16, 1, 0.3, 1) both softFallbackEnter;
    }

    html.page-is-leaving {
        pointer-events: none;
    }

    html.page-is-leaving body {
        animation: 180ms ease-in both softFallbackExit;
    }
}

@keyframes softFallbackEnter {
    from {
        opacity: 0;
        filter: blur(3px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes softFallbackExit {
    from {
        opacity: 1;
        filter: blur(0);
    }
    to {
        opacity: 0;
        filter: blur(2px);
    }
}

@media (prefers-reduced-motion: reduce) {
    #particles-js {
        display: none;
    }

    ::view-transition-old(root),
    ::view-transition-new(root),
    body,
    html.page-is-leaving body {
        animation: none !important;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-height: 700px) and (min-width: 681px) {
    .home-page {
        overflow-y: auto;
    }

    .home-center {
        justify-content: center;
        padding-top: 86px;
        padding-bottom: 36px;
    }
}

@media (max-width: 820px) {
    .unified-nav .nav-controls,
    .profile-page .unified-nav .nav-controls,
    .blog-page .unified-nav .nav-controls {
        position: absolute;
        right: 0;
        bottom: calc(100% + 8px);
        display: flex;
        gap: 8px;
        padding: 7px;
        border: 1px solid var(--dock-border);
        border-radius: 18px;
        background: var(--dock-mobile-bg);
    }

    .profile-page .unified-nav .lang-menu {
        display: block;
    }

    .unified-nav .lang-panel {
        top: auto;
        bottom: calc(100% + 8px);
    }
}

/* Projects / work */
.projects-page .site-bg {
    filter: saturate(0.82) brightness(0.44);
}

.projects-page .site-overlay {
    background: linear-gradient(180deg, rgba(4, 20, 35, 0.66), rgba(5, 18, 33, 0.89));
    backdrop-filter: blur(5px);
}

.projects-main {
    position: relative;
    z-index: 3;
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
    padding: 120px 0 100px;
}

.projects-hero {
    max-width: 850px;
    margin-bottom: 0;
}

.projects-kicker,
.projects-section-heading span,
.projects-site-card > div > span {
    color: #80dff4;
    font: 700 11px/1.5 Consolas, "SFMono-Regular", monospace;
    letter-spacing: 0.2em;
}

.projects-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.projects-kicker .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #75e6de;
    box-shadow: 0 0 14px #75e6de;
}

.projects-hero h1 {
    max-width: 780px;
    font-size: clamp(44px, 6.2vw, 80px);
    font-weight: 750;
    line-height: 1.1;
    letter-spacing: -0.07em;
}

.projects-hero h1 span {
    display: block;
    color: #8ce7f6;
}

.projects-intro {
    max-width: 620px;
    margin-top: 20px;
    color: rgba(229, 244, 252, 0.77);
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.8;
}

.projects-github,
.project-action,
.projects-site-card a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #bff7ff;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.projects-github {
    margin-top: 22px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(173, 241, 251, 0.45);
}

.projects-github:hover,
.project-action:hover,
.projects-site-card a:hover {
    color: #fff;
    transform: translateX(3px);
}

.projects-github:focus-visible,
.project-action:focus-visible,
.projects-site-card a:focus-visible {
    outline: 2px solid #bff7ff;
    outline-offset: 5px;
}

.projects-section {
    margin-top: 72px;
}

.projects-hero + .projects-section {
    margin-top: 40px;
}

.projects-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.projects-section-heading h2 {
    margin-top: 9px;
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: -0.04em;
}

.projects-section-heading > p {
    padding-bottom: 4px;
    color: rgba(224, 240, 251, 0.62);
    font-size: 13px;
}

.projects-feature-grid,
.projects-more-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.project-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(164, 225, 246, 0.19);
    border-radius: 28px;
    background: rgba(13, 39, 59, 0.75);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.08), 0 20px 50px rgba(0, 8, 20, 0.16);
    backdrop-filter: blur(20px);
}

.project-card-feature {
    display: flex;
    flex-direction: column;
}

.project-art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 45%, rgba(119, 234, 242, 0.27), transparent 34%), linear-gradient(135deg, #123d56, #081b33);
}

.project-card-nes .project-art {
    background: radial-gradient(circle at 50% 45%, rgba(247, 146, 201, 0.28), transparent 34%), linear-gradient(135deg, #403454, #131b38);
}

.project-art::before,
.project-art::after {
    content: "";
    position: absolute;
    width: 110%;
    height: 1px;
    background: rgba(188, 241, 252, 0.14);
    transform: rotate(-21deg);
}

.project-art::before { top: 31%; }
.project-art::after { bottom: 25%; }

.project-art-orbit {
    position: absolute;
    width: 195px;
    height: 195px;
    border: 1px solid rgba(194, 244, 251, 0.35);
    border-radius: 50%;
    box-shadow: 0 0 0 28px rgba(183, 234, 248, 0.035), 0 0 0 60px rgba(183, 234, 248, 0.025);
}

.project-art > i {
    z-index: 1;
    color: #c3f8ff;
    font-size: 90px;
    line-height: 1;
    filter: drop-shadow(0 0 25px rgba(146, 236, 250, 0.58));
}

.project-card-nes .project-art > i { color: #ffd6ea; }

.project-art-code {
    position: absolute;
    z-index: 1;
    right: 25px;
    bottom: 22px;
    color: rgba(233, 250, 255, 0.73);
    font: 11px Consolas, monospace;
    letter-spacing: 0.12em;
}

.project-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 29px;
}

.project-eyebrow {
    display: flex;
    gap: 13px;
    color: #8ce7f6;
    font: 700 11px/1.4 Consolas, monospace;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.project-eyebrow span { color: rgba(215, 238, 249, 0.56); }

.project-card h3 {
    margin-top: 13px;
    font-size: clamp(24px, 2.8vw, 33px);
    letter-spacing: -0.04em;
}

.project-summary {
    margin-top: 14px;
    color: rgba(228, 243, 251, 0.76);
    line-height: 1.75;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    list-style: none;
}

.project-tags li {
    padding: 6px 10px;
    border: 1px solid rgba(147, 222, 241, 0.25);
    border-radius: 100px;
    color: #cbf4fc;
    background: rgba(128, 224, 244, 0.07);
    font-size: 11px;
}

.project-availability {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin-top: 23px;
    color: rgba(227, 242, 248, 0.6);
    font-size: 12px;
    line-height: 1.65;
}

.project-action {
    margin-top: auto;
    padding-top: 21px;
    font-size: 14px;
}

.project-card-small {
    display: flex;
    gap: 4px;
    min-height: 230px;
}

.project-card-small .project-card-body { padding: 25px 22px 24px 6px; }
.project-card-small h3 { font-size: 22px; }
.project-card-small .project-summary { margin-top: 10px; font-size: 13px; }
.project-card-small .project-availability { margin-top: 12px; }
.project-card-small .project-action { padding-top: 12px; }

.project-small-icon {
    flex: 0 0 80px;
    padding-top: 27px;
    color: #93ecf5;
    font-size: 34px;
    text-align: center;
}

.projects-site-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 72px;
    padding: 32px;
    border: 1px solid rgba(164, 225, 246, 0.19);
    border-radius: 28px;
    background: linear-gradient(115deg, rgba(18, 66, 88, 0.87), rgba(31, 38, 70, 0.78));
}

.projects-site-card h2 { margin-top: 10px; font-size: 23px; }
.projects-site-card p { max-width: 580px; margin-top: 9px; color: rgba(228, 243, 251, 0.7); line-height: 1.7; }
.projects-site-card a { flex: 0 0 auto; font-size: 13px; }

@media (max-width: 820px) {
    .projects-main { width: min(100% - 30px, 680px); padding: 48px 0 calc(125px + env(safe-area-inset-bottom)); }
    .projects-hero h1 { font-size: clamp(39px, 9vw, 62px); }
    .projects-feature-grid, .projects-more-grid { grid-template-columns: 1fr; }
    .projects-section { margin-top: 56px; }
    .project-art { min-height: 210px; }
    .projects-site-card { margin-top: 56px; }
}

@media (max-width: 520px) {
    .projects-main { width: calc(100% - 24px); }
    .projects-section-heading { align-items: start; flex-direction: column; gap: 6px; }
    .projects-section-heading > p { padding: 0; }
    .project-card-body { padding: 23px; }
    .project-card-small { min-height: 0; }
    .project-small-icon { flex-basis: 61px; padding-top: 24px; font-size: 26px; }
    .project-card-small .project-card-body { padding: 22px 16px 22px 0; }
    .projects-site-card { align-items: start; flex-direction: column; padding: 25px; }
}
.dash-grid > .network-tool { grid-column: 1 / -1; min-width: 0; }
.network-tool h2 { margin: 8px 0; font-size: 24px; }
.tool-field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; flex: 1; min-width: 0; }
.tool-field input, .tool-field select { box-sizing: border-box; width: 100%; min-width: 0; border: 1px solid rgba(255,255,255,.45); border-radius: 12px; padding: 12px; font: inherit; color: inherit; background: rgba(20,45,70,.4); }
.tool-field select option { color: #172b45; background: #fff; }
.speed-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin: 24px 0 12px; }
.speed-metrics > div { display: flex; flex-direction: column; gap: 8px; background: rgba(255,255,255,.12); padding: 16px; border-radius: 16px; min-width: 0; }
.dash-card .speed-metrics strong { font-size: clamp(22px,3vw,34px); overflow-wrap: anywhere; }
.speed-metrics small { opacity: .8; }
#speedChart { width: 100%; height: 100px; border-radius: 12px; background: rgba(20,45,70,.15); }
#speedCurve { stroke: #67e8f9; stroke-width: 2; fill: none; }
.route-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.route-presets .btn { padding: 8px 12px; font-size: 14px; }
.route-controls { display: flex; gap: 16px; }
.route-controls .tool-field:last-child { flex: 0 0 130px; }
#routeHelp { margin: 16px 0; font-size: 14px; line-height: 1.7; }
#routeHelp summary { cursor: pointer; }
#routeMap { height: 340px; border-radius: 16px; overflow: hidden; margin: 20px 0; z-index: 0; background: rgba(20,45,70,.15); }
#routeMap:empty::after { content: '开始追踪后显示跳点地图'; display: flex; height: 100%; align-items: center; justify-content: center; }
#routeMap[data-empty-label]:empty::after { content: attr(data-empty-label); }

/* Fit the added language controls without changing page palettes. */
.terminal-window header .flag-emoji { width: auto; height: auto; border-radius: 0; background: none; }
.terminal-window header:has(.nav-controls) { flex-wrap: wrap; }
.terminal-window header .nav-controls { margin-left: 0; }
.home-status .nav-controls { margin-left: auto; }
.route-table-wrap { max-width: 100%; overflow-x: auto; }
.route-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.route-table th, .route-table td { padding: 12px 8px; border-bottom: 1px solid rgba(255,255,255,.2); vertical-align: top; }
.route-table td:nth-child(2) { overflow-wrap: anywhere; min-width: 110px; }
.route-table td:nth-child(3) { min-width: 150px; font-variant-numeric: tabular-nums; }
.hop-marker { background: #0284c7; color: #fff; border: 2px solid white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: bold 12px sans-serif; }
#routeMap .leaflet-control-zoom a, #routeMap .leaflet-control-attribution, #routeMap .leaflet-control-attribution a, #routeMap .leaflet-popup-content { color: #172b45; }
.route-map-link { display: block; cursor: pointer; color: inherit; border: 0; background: transparent; text-decoration: underline; padding: 8px 0 0; }
.network-tool button:disabled { opacity: .55; cursor: not-allowed; }
#routeExit[hidden] { display: none; }
@media(max-width:560px) { .speed-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; } .route-controls { flex-direction: column; } .route-controls .tool-field:last-child { flex-basis: auto; } #routeMap { height: 280px; } }

/* Games: readable panels and controls that never cover the board. */
.games-page .games-shell {
    background: rgba(12, 30, 49, 0.86);
}
.games-page .game-head,
.games-page .game-head h1,
.games-page .game-head p,
.games-page .game-head strong,
.games-page .tetris-next {
    color: #f3f7fc;
}
.games-page .game-item.active {
    background: rgba(110, 231, 249, 0.2);
    box-shadow: inset 3px 0 #6ee7f9;
}
.games-page .game-panel { min-width: 0; }
.games-page .game-panel:focus { outline: none; }
.games-page :is(button, canvas, .board-2048):focus-visible {
    outline: 3px solid #6ee7f9;
    outline-offset: 3px;
}
.games-page .game-actions .btn {
    color: #fff;
    background: rgba(18, 49, 72, 0.95);
    min-height: 44px;
}
.games-page button:disabled { opacity: 0.5; cursor: default; }
.games-page .mobile-gamepad {
    position: static;
    inset: auto;
    z-index: auto;
    display: grid;
    transform: none;
    margin: 0 auto;
    width: 168px;
    grid-template-columns: repeat(3, 52px);
    grid-template-rows: repeat(3, 52px);
}
.games-page .mobile-gamepad button {
    width: 52px;
    height: 52px;
    color: #fff;
    background: #173d55;
    font-size: 16px;
    touch-action: manipulation;
}
.games-page .mobile-gamepad[hidden],
.games-page .mobile-gamepad button[hidden] { display: none; }
.games-page .mobile-gamepad.flight-controls {
    display: flex;
    justify-content: center;
    width: 100%;
}
.games-page .flight-controls [data-control="action"] {
    width: 140px;
    border-radius: 26px;
}
.games-page :is(.board-2048, .huarong-board) { touch-action: none; }
.games-page .mines-board { touch-action: pan-y; user-select: none; -webkit-touch-callout: none; }
.games-page #flappyCanvas { cursor: pointer; touch-action: manipulation; }
.games-page .game-panel canvas { max-width: 100%; height: auto; }
@media (max-width: 820px) {
    .games-page .games-list { max-height: none; overflow: visible; }
}
@media (min-width: 821px) {
    .games-page .mobile-gamepad:not(.flight-controls) { display: none; }
}
@media (max-width: 560px) {
    .games-page .games-main {
        padding-bottom: calc(164px + env(safe-area-inset-bottom));
    }
}

/* Per-page day/night refinements confirmed on 2026-10-10.
   Keep each page's glass, gradients and illustration colors. */

/* Home: existing appearance is the day mode. */
:root[data-theme="dark"] .home-page { --home-panel: rgba(7, 30, 51, .7); --home-line: rgba(157, 213, 243, .3); }
:root[data-theme="dark"] .home-page .site-bg { filter: saturate(.85) contrast(1.04) brightness(.58); }
:root[data-theme="dark"] .home-page .site-overlay {
    background: linear-gradient(180deg, rgba(3, 18, 34, .28), rgba(3, 18, 34, .62)), linear-gradient(90deg, rgba(5, 24, 44, .15), transparent);
}

/* Profile: a modest lift for day, deeper blue glass for night. */
:root[data-theme="light"] .profile-page .site-bg { filter: saturate(.94) contrast(1.04) brightness(.82); }
:root[data-theme="light"] .profile-page .site-overlay {
    background: linear-gradient(90deg, rgba(13, 47, 74, .12), transparent 46%, rgba(13, 47, 74, .1)), linear-gradient(180deg, rgba(10, 42, 69, .04), rgba(9, 37, 60, .26));
}
:root[data-theme="light"] .profile-page .command-panel {
    background: radial-gradient(380px circle at var(--mx) var(--my), rgba(143, 224, 255, .14), transparent 56%), linear-gradient(135deg, rgba(35, 89, 124, .72), rgba(19, 61, 91, .68));
}
:root[data-theme="dark"] .profile-page .site-bg { filter: saturate(.86) contrast(1.04) brightness(.57); }
:root[data-theme="dark"] .profile-page .site-overlay { background: linear-gradient(180deg, rgba(4, 24, 42, .28), rgba(4, 21, 37, .58)); }
:root[data-theme="dark"] .profile-page .command-panel {
    background: radial-gradient(380px circle at var(--mx) var(--my), rgba(117, 220, 255, .08), transparent 56%), linear-gradient(135deg, rgba(15, 48, 73, .82), rgba(7, 28, 48, .8));
}
@media (max-width: 1100px) {
    :root[data-theme="light"] .profile-page .profile-identity { background: rgba(26, 73, 107, .74); }
    :root[data-theme="dark"] .profile-page .profile-identity { background: rgba(7, 28, 48, .82); }
}

/* Blog: day stays intact; night uses its existing editorial variables. */
:root[data-theme="dark"] .blog-page {
    --blog-ink: #e1f1fb; --blog-muted: #aecadd; --blog-cyan: #79d8f4;
    --blog-line: rgba(153, 205, 235, .22); --blog-glass: rgba(15, 48, 72, .68);
    --dock-bg: rgba(10, 39, 63, .76); --dock-mobile-bg: rgba(9, 34, 55, .95); --dock-border: rgba(169, 224, 251, .25);
    background: #12344e;
}
:root[data-theme="dark"] .blog-page .site-bg { filter: saturate(.87) contrast(1.02) brightness(.7); }
:root[data-theme="dark"] .blog-page .site-overlay { background: linear-gradient(180deg, rgba(6, 29, 49, .38), rgba(6, 26, 44, .64)); }
:root[data-theme="dark"] .blog-page :is(.blog-hero > p:last-child, .video-snapshot-note, .tab b, .post-meta, .social-box p, .mobile-url) { color: var(--blog-muted); }
:root[data-theme="dark"] .blog-page :is(.search-shell, .blog-sidebar blockquote, .blog-tags span, .blog-socials button, .feed-sort, .search-shell kbd) {
    color: var(--blog-ink); background: rgba(20, 57, 82, .64); border-color: var(--blog-line);
}
:root[data-theme="dark"] .blog-page :is(.tab.active, .tab:hover, .feed-sort button[aria-pressed="true"], .feed-sort button:hover, .post-card:hover, .post-card:focus-visible) {
    color: var(--blog-ink); background: rgba(83, 150, 187, .22); border-color: var(--blog-line); box-shadow: inset 0 1px rgba(192, 231, 251, .1);
}
:root[data-theme="dark"] .blog-page .search-input::placeholder { color: #a2bfd1; }
:root[data-theme="dark"] .blog-page :is(.post-card, .blog-tags, .blog-sidebar, .feed-heading) { border-color: var(--blog-line); }
:root[data-theme="dark"] .blog-page :is(.comments-panel, .post-dialog, .social-box) { color: var(--blog-ink); background: rgba(13, 40, 61, .94); border-color: var(--blog-line); }
:root[data-theme="dark"] .blog-page .post-detail-body { background: linear-gradient(160deg, #173d58, #112f47); }
:root[data-theme="dark"] .blog-page .post-detail-content { color: #c7ddea; }
:root[data-theme="dark"] .blog-page .post-detail-content p:first-child { color: var(--blog-ink); }
:root[data-theme="dark"] .blog-page .social-box .social-link { color: #102f45; }
:root[data-theme="dark"] .blog-page .empty-state { background: rgba(20, 57, 82, .64); }

/* Projects: lift the over-dark original first, then add translucent day glass. */
:root[data-theme="dark"] .projects-page .site-bg { filter: saturate(.9) brightness(.76); }
:root[data-theme="dark"] .projects-page .site-overlay { background: linear-gradient(180deg, rgba(7, 32, 51, .3), rgba(6, 27, 46, .62)); }
:root[data-theme="dark"] .projects-page .project-card { background: rgba(21, 59, 84, .8); border-color: rgba(164, 225, 246, .28); }
:root[data-theme="dark"] .projects-page .projects-site-card { background: linear-gradient(115deg, rgba(28, 78, 102, .82), rgba(40, 52, 82, .82)); }
:root[data-theme="light"] .projects-page { color: #153e5c; --dock-bg: rgba(29, 77, 112, .6); }
:root[data-theme="light"] .projects-page .site-bg { filter: saturate(.96) brightness(.98); }
:root[data-theme="light"] .projects-page .site-overlay { background: linear-gradient(180deg, rgba(210, 234, 248, .2), rgba(210, 234, 248, .55) 45%, rgba(170, 210, 235, .48)); }
:root[data-theme="light"] .projects-page :is(.project-card, .projects-site-card) {
    background: linear-gradient(135deg, rgba(213, 236, 249, .84), rgba(178, 212, 233, .82)); border-color: rgba(236, 249, 255, .65);
    box-shadow: inset 0 1px rgba(255, 255, 255, .5), 0 20px 50px rgba(22, 61, 89, .16);
}
:root[data-theme="light"] .projects-page :is(.projects-intro, .projects-section-heading > p, .project-summary, .project-availability, .project-eyebrow span, .projects-site-card p) { color: #3c6079; }
:root[data-theme="light"] .projects-page .projects-intro { color: #21445f; }
:root[data-theme="light"] .projects-page :is(.projects-kicker, .projects-section-heading span, .projects-site-card > div > span, .projects-hero h1 span, .projects-github, .project-action, .projects-site-card a, .project-eyebrow, .project-small-icon) { color: #096b8d; }
:root[data-theme="light"] .projects-page :is(.projects-kicker, .projects-section-heading span, .projects-github) { color: #0c4e6a; }
:root[data-theme="light"] .projects-page .project-tags li { color: #26546e; background: rgba(78, 136, 171, .1); border-color: rgba(59, 116, 152, .26); }
:root[data-theme="light"] .projects-page :is(.projects-github:hover, .project-action:hover, .projects-site-card a:hover) { color: #164e70; }

/* Games: only the framed interface changes; keep the page background untouched. */
:root[data-theme="light"] .games-page { --game-canvas: #dceaf3; --game-snake: #087b83; --game-food: #c72f7c; --game-pipe: #258b69; }
:root[data-theme="dark"] .games-page { --game-canvas: #081321; --game-snake: #6ee7f9; --game-food: #ff70c8; --game-pipe: #8df7b5; }
:root[data-theme="light"] .games-page .games-shell { color: #193e58; background: rgba(198, 225, 241, .88); border-color: rgba(231, 246, 255, .7); }
:root[data-theme="light"] .games-page .games-list { background: rgba(68, 116, 147, .16); border-color: rgba(49, 104, 139, .24); }
:root[data-theme="light"] .games-page :is(.game-item, .game-head, .game-head h1, .game-head p, .game-head strong, .tetris-next) { color: #193e58; text-shadow: none; }
:root[data-theme="light"] .games-page :is(.game-item.active, .game-item:hover) { background: rgba(48, 120, 159, .2); }
:root[data-theme="light"] .games-page .game-item.active { box-shadow: inset 3px 0 #14728d; }
:root[data-theme="light"] .games-page :is(.game-message, .game-actions .btn, .mobile-gamepad button) { color: #193e58; background: rgba(231, 244, 251, .8); border-color: rgba(51, 104, 137, .34); }
:root[data-theme="light"] .games-page :is(.game-panel canvas, .board-2048, .mines-board, .grid-game) { background: var(--game-canvas); border-color: rgba(55, 112, 148, .28); box-shadow: inset 0 0 28px rgba(93, 154, 188, .08), 0 18px 36px rgba(28, 71, 100, .14); }
:root[data-theme="light"] .games-page .tile-0 { background: rgba(86, 134, 165, .2); }
:root[data-theme="light"] .games-page .mines-board button { color: #224b64; background: rgba(72, 127, 163, .2); }
:root[data-theme="light"] .games-page .mines-board button.open { background: rgba(246, 252, 255, .9); }
:root[data-theme="light"] .games-page .huarong-board > button { color: #244962; background: linear-gradient(135deg, rgba(94, 186, 209, .42), rgba(227, 147, 191, .35)); }
:root[data-theme="light"] .games-page :is(button, canvas, .board-2048):focus-visible { outline-color: #14728d; }

/* Links: improve day contrast with darker glass; night stays exactly as before. */
:root[data-theme="light"] .portal-page .portal-category { background: rgba(24, 65, 95, .4); border-color: rgba(211, 237, 251, .5); }
:root[data-theme="light"] .portal-page .portal-links a { color: #f3faff; background: rgba(10, 44, 72, .28); border-color: rgba(220, 242, 255, .24); }
:root[data-theme="light"] .portal-page .portal-links a:hover { background: rgba(36, 99, 136, .72); }
:root[data-theme="light"] .portal-page .portal-hero { text-shadow: 0 2px 14px rgba(15, 54, 84, .55); }

/* Dashboard: gently brighten day; retain the technical glass in night. */
:root[data-theme="light"] .dashboard-page .site-bg { opacity: .88; }
:root[data-theme="light"] .dashboard-page .site-overlay { background: radial-gradient(circle at 50% 12%, rgba(110, 231, 249, .18), transparent 30%), linear-gradient(180deg, rgba(10, 32, 51, .26), rgba(10, 31, 49, .44)); }
:root[data-theme="light"] .dashboard-page .dash-card { background: linear-gradient(135deg, rgba(102, 160, 193, .32), rgba(31, 75, 106, .32)), radial-gradient(circle at top right, rgba(110, 231, 249, .18), transparent 34%); }
:root[data-theme="dark"] .dashboard-page .site-bg { opacity: .78; filter: saturate(.94) brightness(.8); }
:root[data-theme="dark"] .dashboard-page .site-overlay { background: radial-gradient(circle at 50% 12%, rgba(110, 231, 249, .09), transparent 30%), linear-gradient(180deg, rgba(5, 24, 41, .48), rgba(5, 23, 39, .72)); }
:root[data-theme="dark"] .dashboard-page .dash-card { background: linear-gradient(135deg, rgba(27, 62, 88, .75), rgba(12, 37, 59, .76)), radial-gradient(circle at top right, rgba(110, 231, 249, .12), transparent 34%); }
:root[data-theme="dark"] .dashboard-page :is(.music-picker option, .tool-field select option) { color: #e6f3fa; background: #15394f; }

/* Language menus remain readable on the brighter photo backgrounds. */
:root[data-theme="light"] :is(.home-page, .profile-page, .projects-page, .dashboard-page) .lang-panel { background: rgba(17, 53, 80, .96); }
@media (max-width: 700px) {
    .games-page .game-item { min-width: 0; overflow-wrap: anywhere; }
    .games-page .game-head { flex-wrap: wrap; }
    .games-page .game-head > div { min-width: 0; }
}
