:root {
    --page-bg: #edf5fb;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-strong: #ffffff;
    --line: rgba(82, 118, 159, 0.18);
    --text: #253241;
    --muted: #66758a;
    --brand: #2f5fa8;
    --brand-dark: #1f4f8f;
    --mint: #3a9b75;
    --sun: #f2aa4c;
    --sakura: #de6f86;
    --shadow: 0 10px 28px rgba(38, 67, 98, 0.12);
    --shadow-soft: 0 6px 18px rgba(38, 67, 98, 0.1);
    --shadow-lift: 0 18px 46px rgba(35, 65, 102, 0.16);
    --shadow-glow: 0 0 0 1px rgba(255, 255, 255, 0.64), 0 18px 56px rgba(47, 95, 168, 0.15);
    --surface-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(247, 251, 255, 0.66));
    --nav-bg: rgba(255, 255, 255, 0.72);
    --field-bg: rgba(255, 255, 255, 0.88);
    --panel-bg: rgba(255, 255, 255, 0.58);
    --panel-bg-soft: rgba(255, 255, 255, 0.34);
    --media-bg: #f7f9ff;
    --spot-core: rgba(255, 255, 255, 0.3);
    --spot-ring: rgba(255, 255, 255, 0.08);
    --spot-opacity: 0.55;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --radius: 8px;
}

html[data-theme="night"] {
    --page-bg: #0d151d;
    --surface: rgba(18, 29, 39, 0.82);
    --surface-strong: #172330;
    --line: rgba(174, 205, 232, 0.16);
    --text: #e7edf4;
    --muted: #9baec1;
    --brand: #91c4ff;
    --brand-dark: #c8ddff;
    --mint: #6ed3a6;
    --sun: #efc46f;
    --sakura: #ef9caf;
    --shadow: 0 14px 34px rgba(2, 8, 14, 0.34);
    --shadow-soft: 0 10px 26px rgba(2, 8, 14, 0.28);
    --shadow-lift: 0 20px 52px rgba(0, 0, 0, 0.42);
    --shadow-glow: 0 0 0 1px rgba(156, 196, 235, 0.13), 0 20px 60px rgba(18, 98, 151, 0.2);
    --surface-glass: linear-gradient(145deg, rgba(22, 34, 47, 0.9), rgba(12, 22, 33, 0.72));
    --nav-bg: rgba(11, 19, 28, 0.72);
    --field-bg: rgba(14, 24, 35, 0.88);
    --panel-bg: rgba(22, 35, 48, 0.68);
    --panel-bg-soft: rgba(20, 32, 45, 0.5);
    --media-bg: #0f1723;
    --spot-core: rgba(154, 206, 255, 0.18);
    --spot-ring: rgba(116, 215, 167, 0.06);
    --spot-opacity: 0.48;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

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

html {
    scroll-behavior: smooth;
}

html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
    transition:
        background-color 0.48s ease,
        background 0.48s ease,
        color 0.48s ease,
        border-color 0.48s ease,
        box-shadow 0.48s ease,
        filter 0.48s ease !important;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
    min-height: 100vh;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(circle at 16% 12%, rgba(96, 166, 126, 0.18), transparent 28%),
        radial-gradient(circle at 88% 4%, rgba(242, 170, 76, 0.16), transparent 26%),
        linear-gradient(180deg, #f7fbff 0%, var(--page-bg) 100%);
}

html[data-theme="night"] body {
    background:
        radial-gradient(circle at 16% 10%, rgba(110, 211, 166, 0.1), transparent 28%),
        radial-gradient(circle at 88% 3%, rgba(239, 196, 111, 0.1), transparent 25%),
        linear-gradient(180deg, #111f2b 0%, var(--page-bg) 100%);
}

img {
    max-width: 100%;
}

a {
    color: inherit;
}

body.home-page {
    background-color: #101923;
    background-image: url("../images/bg_overlay.jpg");
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

html[data-theme="night"] body.home-page {
    background-color: #091018;
}

body.about-page {
    background:
        linear-gradient(rgba(247, 251, 255, 0.5), rgba(237, 245, 251, 0.52)),
        url("../images/about_bg.jpg") center/cover fixed no-repeat;
}

html[data-theme="night"] body.about-page {
    background:
        linear-gradient(rgba(9, 16, 24, 0.72), rgba(13, 21, 29, 0.78)),
        url("../images/about_bg.jpg") center/cover fixed no-repeat;
}

.theme-toggle {
    position: fixed;
    top: 78px;
    right: 14px;
    z-index: 20000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(48, 78, 108, 0.18);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 22px rgba(16, 31, 46, 0.12);
    opacity: 0.68;
    cursor: pointer;
    image-rendering: pixelated;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: opacity 0.22s ease, transform 0.22s var(--ease-out), border-color 0.22s ease, box-shadow 0.22s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    opacity: 0.95;
    border-color: rgba(58, 155, 117, 0.34);
    box-shadow: 0 10px 26px rgba(16, 31, 46, 0.18);
    transform: translateY(-1px);
}

.theme-toggle:focus-visible {
    outline: 2px solid rgba(58, 155, 117, 0.46);
    outline-offset: 3px;
}

.theme-toggle-track {
    position: relative;
    width: 46px;
    height: 22px;
    overflow: hidden;
    border-radius: 5px;
    background:
        linear-gradient(180deg, #7ec9f1 0 55%, #8ed26f 55% 100%);
    box-shadow:
        inset 0 0 0 2px rgba(255, 255, 255, 0.22),
        inset 0 -4px 0 rgba(45, 111, 66, 0.2);
    transition: background 0.38s ease, box-shadow 0.38s ease;
}

.theme-toggle-track::before,
.theme-toggle-track::after {
    content: "";
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 1px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow:
        12px 2px 0 rgba(255, 255, 255, 0.54),
        25px 6px 0 rgba(255, 255, 255, 0.5);
    transition: opacity 0.28s ease, transform 0.38s ease;
}

.theme-toggle-track::before {
    top: 5px;
    left: 8px;
}

.theme-toggle-track::after {
    right: 5px;
    bottom: 4px;
    width: 6px;
    background: rgba(62, 126, 65, 0.48);
    box-shadow:
        -11px 2px 0 rgba(62, 126, 65, 0.36),
        -22px -1px 0 rgba(62, 126, 65, 0.28);
}

.theme-toggle-orb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    background: #ffd86d;
    box-shadow:
        0 0 0 2px rgba(164, 109, 32, 0.24),
        0 0 0 5px rgba(255, 216, 109, 0.22),
        9px 0 0 -5px rgba(255, 244, 157, 0.9),
        -5px 0 0 -3px rgba(255, 244, 157, 0.72),
        0 8px 12px rgba(124, 78, 20, 0.18);
    transition: transform 0.48s var(--ease-out), background 0.38s ease, box-shadow 0.38s ease;
}

html[data-theme="night"] .theme-toggle {
    border-color: rgba(166, 198, 226, 0.18);
    background: rgba(9, 16, 24, 0.24);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

html[data-theme="night"] .theme-toggle-track {
    background:
        linear-gradient(180deg, #112238 0 58%, #223248 58% 100%);
    box-shadow:
        inset 0 0 0 2px rgba(166, 198, 226, 0.13),
        inset 0 -4px 0 rgba(4, 9, 16, 0.42);
}

html[data-theme="night"] .theme-toggle-track::before {
    background: rgba(210, 232, 255, 0.72);
    box-shadow:
        10px 1px 0 rgba(210, 232, 255, 0.56),
        24px 7px 0 rgba(210, 232, 255, 0.48);
    transform: translateY(2px);
}

html[data-theme="night"] .theme-toggle-track::after {
    opacity: 0;
    transform: translateY(7px);
}

html[data-theme="night"] .theme-toggle-orb {
    background: #d9e8f4;
    box-shadow:
        0 0 0 2px rgba(75, 98, 122, 0.36),
        -4px -3px 0 -2px #a8bccc,
        5px 4px 0 -3px #9db2c2,
        0 0 0 5px rgba(145, 196, 255, 0.12),
        0 8px 14px rgba(0, 0, 0, 0.24);
    transform: translateX(24px);
}

.theme-transition-veil {
    position: fixed;
    inset: -20vmax;
    z-index: 19990;
    pointer-events: none;
    opacity: 0;
    background:
        radial-gradient(circle at 92% 8%, rgba(255, 216, 109, 0.22), transparent 18vmax),
        radial-gradient(circle at 82% 16%, rgba(145, 196, 255, 0.16), transparent 22vmax);
    animation: themeVeil 0.62s var(--ease-out) forwards;
}

.theme-transition-veil.to-night {
    background:
        radial-gradient(circle at 92% 8%, rgba(145, 196, 255, 0.18), transparent 18vmax),
        radial-gradient(circle at 82% 16%, rgba(11, 19, 28, 0.5), transparent 24vmax);
}

.navbar {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    width: 100%;
    padding: 10px clamp(18px, 4vw, 44px);
    background: var(--nav-bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(54, 86, 122, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 9999;
    transition: background 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.navbar img {
    width: auto;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 3px 8px rgba(30, 79, 145, 0.16));
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

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

.nav-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 8px;
    color: var(--brand);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.24s ease, background 0.24s ease, transform 0.24s var(--ease-out), box-shadow 0.24s ease;
}

.nav-links a:hover {
    color: var(--brand-dark);
    background: rgba(47, 95, 168, 0.08);
    transform: translateY(-1px);
}

.nav-links a[aria-current="page"] {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--mint));
    box-shadow: 0 6px 16px rgba(47, 95, 168, 0.18);
}

.nav-links a:active {
    transform: translateY(1px);
}

.content {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 38px 0 58px;
}

.card,
.profile-card,
.player-avatar-card,
.thumb,
.project-card,
.gallery-item,
.projection-panel,
.music-panel {
    position: relative;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface-glass);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.34s var(--ease-out), box-shadow 0.34s ease, border-color 0.34s ease, background 0.34s ease;
}

.card {
    padding: clamp(20px, 3vw, 30px);
    margin-bottom: 22px;
    overflow: hidden;
}

.card:hover {
    border-color: rgba(47, 95, 168, 0.24);
    box-shadow: var(--shadow-glow);
}

.card::before,
.player-avatar-card::before,
.project-card::before,
.gallery-item::before,
.profile-card::before,
.ranking-item::before,
.profile-fact::before,
.uptime-block::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        circle at var(--spot-x, 50%) var(--spot-y, 0%),
        var(--spot-core),
        var(--spot-ring) 20%,
        transparent 42%
    );
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.card:hover::before,
.player-avatar-card:hover::before,
.project-card:hover::before,
.gallery-item:hover::before,
.profile-card:hover::before,
.ranking-item:hover::before,
.profile-fact:hover::before,
.uptime-block:hover::before {
    opacity: var(--spot-opacity);
}

h1,
h2 {
    color: var(--brand);
    letter-spacing: 0;
}

.section-kicker {
    margin: 0 0 8px;
    color: var(--mint);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-align: center;
}

.section-note {
    max-width: 680px;
    margin: 0 auto;
    color: var(--muted);
    text-align: center;
}

.compact-hero-card {
    display: grid;
    gap: 8px;
    align-items: center;
    min-height: 0;
    padding-block: clamp(14px, 2vw, 20px);
    margin-bottom: 16px;
}

.compact-hero-card h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.08;
}

.compact-hero-card .section-kicker {
    margin-bottom: 4px;
}

.compact-hero-card .section-note {
    max-width: 640px;
    margin-top: 4px;
    line-height: 1.5;
}

.project-hero-card {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-right: clamp(16px, 3vw, 26px);
}

.project-hero-card .section-kicker,
.project-hero-card h1,
.project-hero-card .section-note {
    text-align: left;
    margin-left: 0;
}

.project-hero-mascot {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    min-width: 0;
    gap: 10px;
}

.project-hero-gif {
    width: clamp(92px, 12vw, 142px);
    flex: 0 0 auto;
    max-height: 112px;
    object-fit: contain;
    image-rendering: auto;
    filter: drop-shadow(0 8px 16px rgba(38, 67, 98, 0.14));
    pointer-events: none;
}

.project-hero-caption {
    color: var(--muted);
    font-size: 12px;
    font-style: italic;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
}

.join-btn,
.ghost-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.24s var(--ease-out), box-shadow 0.24s ease, background 0.24s ease, border-color 0.24s ease;
}

.join-btn::after,
.ghost-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.35) 46%, transparent 72%);
    transform: translateX(-120%);
    transition: transform 0.58s var(--ease-out);
    pointer-events: none;
}

.join-btn {
    background: linear-gradient(135deg, var(--brand), var(--mint));
    color: #fff;
    box-shadow: 0 10px 20px rgba(47, 95, 168, 0.22);
}

.join-btn:hover {
    background: linear-gradient(135deg, var(--brand-dark), #2f8f6d);
    box-shadow: 0 14px 30px rgba(47, 95, 168, 0.28);
    transform: translateY(-2px);
}

.join-btn.is-copied {
    border-color: rgba(174, 225, 200, 0.72);
    background: linear-gradient(135deg, var(--mint), #2f8f6d);
    box-shadow: 0 0 0 4px rgba(58, 155, 117, 0.13), 0 12px 28px rgba(58, 155, 117, 0.24);
}

.join-btn.is-copied::after {
    transform: translateX(120%);
}

.ghost-btn {
    color: var(--brand-dark);
    background: var(--surface);
    border-color: var(--line);
}

.ghost-btn:hover {
    background: var(--surface-strong);
    border-color: rgba(47, 95, 168, 0.28);
    box-shadow: 0 10px 24px rgba(38, 67, 98, 0.1);
    transform: translateY(-2px);
}

.join-btn:hover::after,
.ghost-btn:hover::after {
    transform: translateX(120%);
}

.home-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: clamp(380px, 54vh, 540px);
    padding: clamp(28px, 6vw, 70px);
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #111c29;
    isolation: isolate;
}

.hero-carousel {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #111c29;
}

.hero-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    background: #111c29;
    will-change: transform;
}

.hero-slide {
    position: relative;
    flex: 0 0 calc(100% + 2px);
    min-width: calc(100% + 2px);
    margin-right: -2px;
    overflow: hidden;
    will-change: transform;
}

.hero-slide img {
    display: block;
    width: 100%;
    height: 108%;
    object-fit: cover;
    object-position: center 44%;
    transform: scaleX(1.004) translateZ(0);
    transform-origin: center center;
}

.hero-carousel-nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 56px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: var(--radius);
    color: #ffffff;
    background: rgba(12, 25, 42, 0.34);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: opacity 0.22s ease, background 0.22s ease, transform 0.22s var(--ease-out), border-color 0.22s ease;
}

.hero-carousel-prev {
    left: clamp(14px, 3vw, 34px);
}

.hero-carousel-next {
    right: clamp(14px, 3vw, 34px);
}

.home-hero:hover .hero-carousel-nav,
.home-hero:focus-within .hero-carousel-nav {
    opacity: 0.86;
}

.hero-carousel-nav:hover,
.hero-carousel-nav:focus-visible {
    border-color: rgba(174, 225, 200, 0.76);
    background: rgba(12, 25, 42, 0.56);
    opacity: 1;
    transform: translateY(-50%) scale(1.03);
}

.hero-carousel-nav:focus-visible {
    outline: 2px solid rgba(174, 225, 200, 0.8);
    outline-offset: 3px;
}

.hero-carousel-dots {
    position: absolute;
    right: clamp(18px, 4vw, 46px);
    bottom: clamp(14px, 3vw, 28px);
    z-index: 3;
    display: flex;
    gap: 8px;
    align-items: center;
}

.hero-carousel-dot {
    width: 34px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition:
        width 0.26s var(--ease-out),
        background 0.26s ease,
        transform 0.26s var(--ease-out);
}

.hero-carousel-dot:hover,
.hero-carousel-dot:focus-visible {
    background: rgba(255, 255, 255, 0.74);
    transform: translateY(-1px);
}

.hero-carousel-dot:focus-visible {
    outline: 2px solid rgba(174, 225, 200, 0.8);
    outline-offset: 4px;
}

.hero-carousel-dot.is-active {
    width: 46px;
    background: #aee1c8;
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(12, 25, 42, 0.7), rgba(12, 25, 42, 0.28) 48%, rgba(12, 25, 42, 0.1)),
        linear-gradient(0deg, rgba(10, 20, 32, 0.35), transparent 48%);
    z-index: 1;
    pointer-events: none;
}

.home-hero::after {
    content: "";
    position: absolute;
    top: 0;
    right: -28%;
    bottom: 0;
    left: -28%;
    z-index: 1;
    background:
        linear-gradient(115deg, transparent 18%, rgba(255, 255, 255, 0.13) 34%, transparent 50%),
        linear-gradient(180deg, transparent 68%, rgba(237, 245, 251, 0.12));
    mix-blend-mode: screen;
    opacity: 0.54;
    transform: translateX(-8%);
    animation: heroLightSweep 9s ease-in-out infinite alternate;
    pointer-events: none;
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 680px;
    padding-bottom: 24px;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
}

.hero-kicker {
    margin: 0 0 12px;
    color: #aee1c8;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
}

.hero-copy h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(48px, 9vw, 92px);
    line-height: 0.98;
    text-align: left;
}

.hero-copy p {
    max-width: 560px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(16px, 2.2vw, 20px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.join-actions {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.uptime-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 32px;
    width: min(1100px, calc(100% - 40px));
    margin: 24px auto;
    padding: 20px 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.uptime-title {
    appearance: none;
    border: 0;
    border-radius: var(--radius);
    padding: 6px 10px;
    color: var(--brand-dark);
    background: rgba(47, 95, 168, 0.08);
    font-size: 15px;
    font-weight: 800;
    font: inherit;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.22s ease, background 0.22s ease, transform 0.22s var(--ease-out), box-shadow 0.22s ease;
}

.uptime-title::before {
    content: "⏱ ";
}

.uptime-title:hover,
.uptime-title:focus-visible {
    color: var(--brand);
    background: rgba(58, 155, 117, 0.12);
    box-shadow: 0 0 0 3px rgba(58, 155, 117, 0.12);
    transform: translateY(-1px);
}

.uptime-title:focus-visible {
    outline: 2px solid rgba(58, 155, 117, 0.42);
    outline-offset: 3px;
}

.uptime-blocks {
    display: flex;
    gap: 12px;
}

.uptime-block {
    position: relative;
    overflow: hidden;
    min-width: 64px;
    padding: 10px 18px;
    border: 1px solid rgba(47, 95, 168, 0.12);
    border-radius: var(--radius);
    background: var(--panel-bg);
    text-align: center;
}

.uptime-block:hover {
    transform: translateY(-2px);
    border-color: rgba(47, 95, 168, 0.2);
    box-shadow: 0 12px 30px rgba(38, 67, 98, 0.12);
}

.uptime-num {
    color: var(--brand);
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
}

.uptime-label {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.uptime-quote {
    grid-column: 1 / -1;
    flex-basis: 100%;
    max-width: 780px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid rgba(58, 155, 117, 0.18);
    border-radius: var(--radius);
    color: var(--brand-dark);
    background: rgba(58, 155, 117, 0.09);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.55;
    text-align: center;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.24s ease, transform 0.24s var(--ease-out);
}

.uptime-quote.show {
    opacity: 1;
    transform: translateY(0);
}

.player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.players-card {
    background: var(--panel-bg-soft);
    box-shadow: 0 10px 30px rgba(38, 67, 98, 0.08);
}

.player-avatar-card {
    width: auto;
    min-height: 146px;
    padding: 14px 10px;
    background: var(--panel-bg-soft);
    box-shadow: 0 8px 22px rgba(38, 67, 98, 0.08);
    text-align: center;
    overflow: hidden;
    transition: transform 0.18s ease-out, box-shadow 0.28s ease, background 0.24s ease, border-color 0.28s ease;
    transform-style: preserve-3d;
    will-change: transform;
    cursor: pointer;
}

.player-avatar-card:hover,
.player-avatar-card:focus-visible {
    background: var(--panel-bg);
    border-color: rgba(47, 95, 168, 0.24);
    box-shadow: 0 16px 36px rgba(38, 67, 98, 0.16);
}

.player-avatar-card:focus-visible {
    outline: 3px solid rgba(58, 155, 117, 0.42);
    outline-offset: 3px;
}

.player-avatar-card img {
    display: block;
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    border-radius: 8px;
    image-rendering: pixelated;
}

img.is-littleskin-avatar {
    background-image:
        var(--minecraft-avatar-texture),
        var(--minecraft-avatar-texture);
    background-position:
        71.428571% 14.285714%,
        14.285714% 14.285714%;
    background-repeat: no-repeat;
    background-size: 800% 800%;
}

.player-avatar-card p {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
}

.copy-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 12000;
    max-width: min(420px, calc(100vw - 32px));
    padding: 10px 16px;
    border-radius: 8px;
    color: #fff;
    background: rgba(31, 79, 143, 0.96);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translate(-50%, 14px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.copy-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.projects-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 18px;
}

.search-field {
    display: grid;
    gap: 6px;
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 800;
}

.search-field input {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid rgba(47, 95, 168, 0.22);
    border-radius: 8px;
    color: var(--text);
    background: var(--field-bg);
    font: inherit;
    outline: none;
}

.search-field input:focus {
    border-color: var(--mint);
    box-shadow: 0 0 0 3px rgba(58, 155, 117, 0.16);
}

.project-count {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--brand-dark);
    background: rgba(58, 155, 117, 0.12);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid rgba(47, 95, 168, 0.12);
    border-radius: var(--radius);
    background: rgba(47, 95, 168, 0.08);
}

html[data-theme="night"] .filter-group {
    background: rgba(145, 196, 255, 0.08);
}

.filter-group-label {
    margin-right: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.filter-tag {
    padding: 6px 14px;
    border: 1px solid rgba(47, 95, 168, 0.22);
    border-radius: 8px;
    color: var(--brand);
    background: var(--surface);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-tag:hover {
    background: var(--surface-strong);
    border-color: rgba(47, 95, 168, 0.36);
}

.filter-tag.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #ffffff;
}

.project-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
    margin-top: 16px;
}

.project-card {
    appearance: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lift);
    border-color: rgba(58, 155, 117, 0.36);
}

.project-card:focus-visible,
.thumb:focus-visible,
.viewer-close:focus-visible,
.viewer-nav:focus-visible {
    outline: 3px solid rgba(58, 155, 117, 0.42);
    outline-offset: 3px;
}

.project-image-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--media-bg);
}

.project-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    height: auto;
    object-fit: cover;
    background: var(--media-bg);
    transition: transform 0.46s var(--ease-out), filter 0.32s ease;
}

.project-image-wrap::after,
.thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 36%, rgba(8, 18, 31, 0.42)),
        linear-gradient(120deg, rgba(255, 255, 255, 0.1), transparent 42%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-zoom-label,
.thumb::before {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 1;
    padding: 8px 13px;
    border-radius: var(--radius);
    color: #ffffff;
    background: rgba(18, 34, 54, 0.78);
    box-shadow: 0 8px 22px rgba(5, 10, 18, 0.28);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.project-card:hover img,
.project-card:focus-visible img,
.thumb:hover img,
.thumb:focus-visible img {
    transform: scale(1.06);
    filter: saturate(1.08) contrast(1.03);
}

.project-card:hover .project-image-wrap::after,
.project-card:focus-visible .project-image-wrap::after,
.project-card:hover .project-zoom-label,
.project-card:focus-visible .project-zoom-label,
.thumb:hover::after,
.thumb:focus-visible::after,
.thumb:hover::before,
.thumb:focus-visible::before {
    opacity: 1;
    transform: translateY(0);
}

.project-card .project-info {
    display: grid;
    gap: 8px;
    padding: 12px 14px 14px;
}

.project-name {
    margin: 0;
    color: var(--brand);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
}

.project-author,
.project-desc {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.project-desc {
    display: -webkit-box;
    min-height: 38px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.project-tags .ptag,
.modal-body .ptag {
    border-radius: 8px;
    color: var(--brand-dark);
    background: rgba(47, 95, 168, 0.09);
}

html[data-theme="night"] .project-tags .ptag,
html[data-theme="night"] .modal-body .ptag {
    background: rgba(145, 196, 255, 0.12);
}

.project-tags .ptag:nth-child(2),
.modal-body .ptag:nth-child(2) {
    color: #7b4c04;
    background: rgba(242, 170, 76, 0.18);
}

html[data-theme="night"] .project-tags .ptag:nth-child(2),
html[data-theme="night"] .modal-body .ptag:nth-child(2) {
    color: #f6d792;
    background: rgba(239, 196, 111, 0.14);
}

.project-tags,
.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ptag {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: var(--radius);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
}

.modal-wrapper {
    position: fixed;
    inset: 0;
    z-index: 30000;
    display: block;
    padding: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    color: var(--text);
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
    isolation: isolate;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    background: transparent;
}

.modal-wrapper::backdrop {
    background: transparent;
}

.modal-stage {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: 14px;
    overflow: hidden;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 10, 18, 0.82);
    animation: fadeIn 0.2s ease forwards;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    z-index: 1;
    display: block;
    width: calc(100vw - 28px);
    height: calc(100vh - 28px);
    height: calc(100dvh - 28px);
    overflow: hidden;
    background: var(--surface-strong);
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.34);
    animation: modalIn 0.34s var(--ease-out) forwards;
    transform-origin: center center;
}

.modal-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: #0f1724;
}

html[data-theme="night"] .modal-media {
    background: #060b12;
}

.modal-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: none;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
    transform-origin: center center;
}

.modal-body {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    width: min(340px, calc(100% - 36px));
    max-height: min(46vh, 360px);
    min-width: 0;
    overflow-y: auto;
    padding: 16px 18px 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 14px 36px rgba(5, 10, 18, 0.28);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.modal-body h2 {
    margin: 0 0 10px;
    color: var(--brand);
    font-size: 26px;
    text-align: left;
}

.modal-desc {
    color: var(--text);
    font-size: 16px;
    line-height: 1.75;
    white-space: pre-line;
}

.modal-meta {
    margin-top: auto;
    padding-top: 18px;
    color: var(--muted);
    font-size: 14px;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    color: var(--text);
    background: var(--surface);
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.modal-close:hover {
    background: var(--surface-strong);
}

.modal-nav {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 62px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    color: #ffffff;
    background: rgba(18, 34, 54, 0.54);
    font-size: 32px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-nav:hover {
    background: rgba(18, 34, 54, 0.78);
}

.modal-nav:active {
    transform: translateY(-50%) scale(0.96);
}

.modal-nav:disabled {
    opacity: 0.35;
    cursor: default;
}

.modal-prev {
    left: 18px;
}

.modal-next {
    right: 18px;
}

.modal-count {
    width: max-content;
    margin-bottom: 10px;
    padding: 4px 8px;
    border-radius: var(--radius);
    color: var(--brand-dark);
    background: rgba(58, 155, 117, 0.12);
    font-size: 12px;
    font-weight: 900;
}

html[data-theme="night"] .modal-count {
    background: rgba(110, 211, 166, 0.12);
}

.modal-loading,
.viewer-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ffffff;
    border-radius: 50%;
    opacity: 0;
    animation: spin 0.8s linear infinite;
    pointer-events: none;
}

.modal-wrapper.is-loading .modal-loading,
.viewer-backdrop.is-loading .viewer-loading {
    opacity: 1;
}

.no-result,
.projection-empty {
    color: var(--muted);
    font-size: 15px;
    text-align: center;
}

.no-result {
    padding: 40px 0;
}

.projection-panel {
    position: fixed;
    top: 50%;
    right: 16px;
    z-index: 9990;
    width: 280px;
    overflow: hidden;
    transform: translateY(-50%);
}

.projection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    color: var(--brand);
    background: rgba(47, 95, 168, 0.08);
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.projection-header:hover {
    background: rgba(47, 95, 168, 0.12);
}

.projection-arrow {
    color: var(--muted);
    font-size: 13px;
    transition: transform 0.2s ease;
}

.projection-body {
    max-height: 320px;
    overflow-y: auto;
    padding: 10px 12px 12px;
    transition: max-height 0.25s ease, padding 0.25s ease;
}

.projection-panel.collapsed .projection-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.projection-panel.collapsed .projection-arrow {
    transform: rotate(-90deg);
}

.projection-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.projection-item {
    appearance: none;
    display: block;
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(47, 95, 168, 0.16);
    background: var(--panel-bg);
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.projection-item:hover {
    background: var(--surface);
    border-color: rgba(47, 95, 168, 0.32);
}

.projection-item .name {
    margin-bottom: 4px;
    color: var(--brand);
    font-size: 14px;
    font-weight: 800;
}

.projection-item .meta {
    color: var(--muted);
    font-size: 12px;
}

.projection-empty {
    padding: 14px 0;
}

.modal-content,
.modal-close,
.projection-item,
.viewer-image {
    border-radius: var(--radius);
}

.modal-media {
    border-radius: var(--radius);
}

.modal-close {
    font-size: 18px;
}

.nav-links a[aria-current="page"]::after {
    display: none;
}

.exhibition-page .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
    gap: 16px;
    align-items: start;
    margin-top: 16px;
}

.thumb {
    appearance: none;
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: zoom-in;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease, border-color 0.3s ease;
}

.thumb:hover {
    transform: translateY(-5px);
    border-color: rgba(58, 155, 117, 0.36);
    box-shadow: var(--shadow-lift);
}

.thumb img {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--media-bg);
    transition: transform 0.28s ease;
}

.thumb::before {
    content: "查看大图";
}

.viewer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: block;
    padding: 26px;
    overflow: hidden;
    background: rgba(5, 10, 18, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.viewer-image {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
    background: #111827;
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.45);
    transform: translate(-50%, -50%);
    transform-origin: center center;
    transition: opacity 0.2s ease;
    animation: viewerImageIn 0.34s var(--ease-out) forwards;
}

.viewer-backdrop.is-loading .viewer-image,
.modal-wrapper.is-loading .modal-image {
    opacity: 0.42;
}

.viewer-close,
.viewer-nav {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.viewer-close:hover,
.viewer-nav:hover {
    background: rgba(255, 255, 255, 0.24);
}

.viewer-close:active,
.viewer-nav:active {
    transform: scale(0.96);
}

.viewer-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    font-size: 20px;
}

.viewer-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 48px;
    height: 64px;
    font-size: 28px;
    transform: translateY(-50%);
}

.viewer-nav:active {
    transform: translateY(-50%) scale(0.96);
}

.viewer-prev {
    left: 26px;
}

.viewer-next {
    right: 26px;
}

.viewer-meta {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: min(680px, calc(100vw - 52px));
    padding: 7px 12px;
    border-radius: var(--radius);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 13px;
    transform: translateX(-50%);
}

.viewer-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.viewer-counter {
    color: rgba(255, 255, 255, 0.76);
    white-space: nowrap;
}

html.lightbox-open,
body.lightbox-open {
    overflow: hidden;
}

body.lightbox-open {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

.bible-page .gallery {
    width: 100%;
    column-count: 3;
    column-gap: 16px;
    column-fill: balance;
}

.gallery-item {
    display: inline-block;
    width: 100%;
    margin: 0 0 16px;
    overflow: hidden;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.28s ease;
}

.gallery-item:hover img {
    transform: scale(1.035);
}

.gallery-item .caption {
    padding: 12px;
    color: var(--text);
    font-size: 14px;
    text-align: center;
}

.music-player {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10000;
}

.music-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: 0 8px 20px rgba(47, 95, 168, 0.32);
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.music-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 28px rgba(47, 95, 168, 0.4);
}

.music-btn.playing {
    animation: pulse 1.5s ease-in-out infinite;
}

.music-panel {
    position: absolute;
    right: 0;
    bottom: 60px;
    display: none;
    min-width: 240px;
    padding: 16px;
}

.music-panel.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.music-panel h3 {
    margin: 0 0 12px;
    color: var(--brand);
    font-size: 14px;
}

.song-list {
    max-height: 220px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.song-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.song-list li:hover {
    background: rgba(47, 95, 168, 0.08);
}

html[data-theme="night"] .song-list li:hover {
    background: rgba(145, 196, 255, 0.08);
}

.song-list li.active {
    color: var(--brand-dark);
    background: rgba(47, 95, 168, 0.12);
    font-weight: 800;
}

html[data-theme="night"] .song-list li.active {
    background: rgba(145, 196, 255, 0.12);
}

.song-list li .icon {
    font-size: 12px;
}

.now-playing {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.about-text {
    color: var(--text);
    line-height: 1.75;
    white-space: pre-line;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 22px;
    align-items: start;
}

.auth-card h1,
.auth-side h2,
.member-state h2 {
    text-align: center;
}

.auth-form {
    display: grid;
    gap: 10px;
    max-width: 440px;
    margin: 24px auto 0;
}

.auth-form label {
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 800;
}

.auth-form input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid rgba(47, 95, 168, 0.22);
    border-radius: 8px;
    color: var(--text);
    background: var(--field-bg);
    font: inherit;
    outline: none;
}

.auth-form input:focus {
    border-color: var(--mint);
    box-shadow: 0 0 0 3px rgba(58, 155, 117, 0.16);
}

.auth-code-form {
    margin-top: 18px;
}

.auth-code-target {
    padding: 10px 12px;
    border: 1px solid rgba(58, 155, 117, 0.18);
    border-radius: var(--radius);
    color: var(--brand-dark);
    background: rgba(58, 155, 117, 0.1);
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

html[data-theme="night"] .auth-code-target,
html[data-theme="night"] .checkin-box {
    background: rgba(110, 211, 166, 0.1);
}

.auth-code-input {
    font-size: 22px !important;
    font-weight: 900 !important;
    letter-spacing: 0.18em !important;
    text-align: center;
}

.auth-status {
    min-height: 24px;
    margin-top: 14px;
    color: var(--muted);
    text-align: center;
}

.auth-status.success {
    color: var(--mint);
    font-weight: 800;
}

.auth-status.error {
    color: #b03a48;
    font-weight: 800;
}

.auth-status.warn {
    color: #8a5a06;
    font-weight: 800;
}

html[data-theme="night"] .auth-status.error,
html[data-theme="night"] .profile-edit-status.error {
    color: #ff9bab;
}

html[data-theme="night"] .auth-status.warn {
    color: #f3cc79;
}

.auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
}

.join-btn:disabled,
.ghost-btn:disabled {
    opacity: 0.62;
    cursor: wait;
}

.members-shell {
    display: grid;
    gap: 22px;
}

.personal-shell {
    width: min(1320px, calc(100% - 36px));
    padding-top: 28px;
}

.member-state {
    display: grid;
    justify-items: center;
    gap: 12px;
    text-align: center;
}

.members-content {
    display: grid;
    gap: 22px;
}

.personal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: clamp(20px, 3vw, 34px);
    align-items: start;
}

.personal-card,
.ranking-card {
    margin-bottom: 0;
}

.ranking-card {
    justify-self: end;
    width: 100%;
}

.profile-background-preview {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 176px;
    margin: calc(clamp(20px, 3vw, 30px) * -1) calc(clamp(20px, 3vw, 30px) * -1) 20px;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
    color: rgba(255, 255, 255, 0.9);
    background:
        linear-gradient(135deg, rgba(47, 95, 168, 0.84), rgba(58, 155, 117, 0.72)),
        url("../images/home_banner.jpg") center/cover no-repeat;
    background-size: cover;
    background-position: center;
    text-align: center;
}

.profile-background-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 18, 31, 0.08), rgba(8, 18, 31, 0.28));
}

.profile-background-preview span {
    position: relative;
    z-index: 1;
    padding: 6px 10px;
    border-radius: var(--radius);
    background: rgba(20, 37, 58, 0.42);
    font-size: 13px;
    font-weight: 800;
}

.profile-background-preview.has-background {
    background-color: #dbe8f4;
}

.member-profile {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

.personal-profile {
    grid-template-columns: auto minmax(0, 1fr);
}

.member-avatar {
    width: 76px;
    height: 76px;
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--media-bg);
    image-rendering: pixelated;
}

.member-profile h2 {
    margin: 0;
    text-align: left;
}

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

.member-muted,
.member-role {
    margin: 4px 0 0;
    color: var(--muted);
}

.profile-level {
    width: min(240px, 100%);
    margin-top: 8px;
}

.profile-level-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.level-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(90deg, #8fd8ff, var(--level-color, #f4a3c7));
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 6px 16px rgba(143, 216, 255, 0.24);
}

.level-exp-text {
    min-width: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-align: right;
    overflow-wrap: anywhere;
}

.level-bar {
    overflow: hidden;
    height: 8px;
    margin-top: 6px;
    border-radius: 999px;
    background: rgba(143, 216, 255, 0.22);
    box-shadow: inset 0 0 0 1px rgba(47, 95, 168, 0.08);
}

.level-bar-fill {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8fd8ff, var(--level-color, #f4a3c7));
    transition: width 0.35s var(--ease-out);
}

.profile-signature {
    margin: 8px 0 0;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
}

.profile-signature.is-empty {
    color: var(--muted);
}

.member-signout {
    width: 100%;
    margin-top: 14px;
}

.profile-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.profile-fact {
    position: relative;
    overflow: hidden;
    min-width: 0;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel-bg);
}

.profile-fact:hover,
.ranking-item:hover {
    transform: translateY(-2px);
    border-color: rgba(47, 95, 168, 0.2);
    box-shadow: 0 12px 30px rgba(38, 67, 98, 0.1);
}

.profile-fact span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.profile-fact strong {
    display: block;
    margin-top: 4px;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 15px;
}

.checkin-box {
    display: grid;
    gap: 5px;
    justify-items: center;
    margin-top: 16px;
    padding: 12px;
    border: 1px solid rgba(58, 155, 117, 0.18);
    border-radius: var(--radius);
    background: rgba(58, 155, 117, 0.1);
}

.checkin-box .join-btn {
    min-height: 34px;
    padding: 7px 14px;
    font-size: 14px;
}

.checkin-box .member-muted {
    margin-top: 0;
    font-size: 13px;
}

.checkin-total {
    margin: 0;
    color: var(--brand);
    font-size: 18px;
    font-weight: 900;
}

.profile-edit-form {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.profile-edit-form label {
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 800;
}

.profile-edit-form textarea {
    width: 100%;
    min-height: 58px;
    resize: vertical;
    padding: 8px 10px;
    border: 1px solid rgba(47, 95, 168, 0.22);
    border-radius: var(--radius);
    color: var(--text);
    background: var(--field-bg);
    font: inherit;
    outline: none;
}

.profile-edit-form textarea:focus {
    border-color: var(--mint);
    box-shadow: 0 0 0 3px rgba(58, 155, 117, 0.16);
}

.profile-upload-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.profile-file-button {
    margin: 0;
}

.profile-upload-row input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.profile-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-edit-actions .join-btn,
.profile-edit-actions .ghost-btn,
.profile-file-button {
    min-height: 34px;
    padding: 7px 14px;
    font-size: 14px;
}

.profile-edit-status {
    min-height: 20px;
    margin-top: 0;
    font-size: 13px;
}

.profile-edit-status.success {
    color: var(--mint);
    font-weight: 800;
}

.profile-edit-status.error {
    color: #b03a48;
    font-weight: 800;
}

.public-profile-shell {
    width: min(980px, calc(100% - 36px));
}

.public-profile-content {
    display: block;
}

.public-profile-card {
    margin-bottom: 0;
}

.public-member-profile .member-avatar {
    width: 88px;
    height: 88px;
}

.public-profile-facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.public-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.ranking-card h2 {
    margin-top: 0;
    text-align: center;
}

.ranking-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.ranking-item {
    position: relative;
    display: grid;
    grid-template-columns: 44px 42px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-bg);
    overflow: hidden;
    transition: transform 0.28s var(--ease-out), border-color 0.28s ease, box-shadow 0.28s ease;
}

.ranking-position {
    color: var(--brand);
    font-size: 16px;
    font-weight: 900;
    text-align: center;
}

.ranking-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--media-bg);
    image-rendering: pixelated;
}

.ranking-main {
    min-width: 0;
}

.ranking-name {
    overflow-wrap: anywhere;
    color: var(--text);
    font-weight: 900;
    line-height: 1.25;
}

.ranking-meta {
    color: var(--muted);
    font-size: 12px;
}

.ranking-chip {
    padding: 3px 8px;
    border-radius: var(--radius);
    color: #1f6d52;
    background: rgba(58, 155, 117, 0.14);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

html[data-theme="night"] .ranking-chip {
    color: #9ee8c7;
    background: rgba(110, 211, 166, 0.13);
}

.link-list {
    margin-top: 12px;
    padding-left: 18px;
}

.link-list li {
    margin: 6px 0;
    opacity: 0;
    transform: translateX(-16px);
    animation: linkSlideIn 0.4s ease forwards;
}

.link-list li:nth-child(1) {
    animation-delay: 0.3s;
}

.link-list li:nth-child(2) {
    animation-delay: 0.45s;
}

.link-list li:nth-child(3) {
    animation-delay: 0.6s;
}

.link-list li:nth-child(4) {
    animation-delay: 0.75s;
}

.link-list a {
    color: var(--brand);
    text-decoration: none;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.link-list a:hover {
    color: var(--brand-dark);
    padding-left: 4px;
    text-decoration: underline;
}

.help-btn {
    position: fixed;
    right: 5px;
    bottom: 5px;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    color: rgba(150, 150, 150, 0.3);
    background: rgba(180, 180, 180, 0.2);
    font-size: 9px;
    text-decoration: none;
    opacity: 0.25;
    cursor: default;
    transition: all 0.3s ease;
}

.help-btn:hover {
    width: 24px;
    height: 24px;
    color: #ffffff;
    background: var(--brand);
    font-size: 14px;
    opacity: 1;
    cursor: pointer;
}

.motion-ready .navbar,
.motion-ready .home-hero,
.motion-ready .hero-copy,
.motion-ready .hero-copy > *,
.motion-ready .fade-up,
.motion-ready .project-card,
.motion-ready .gallery-item,
.motion-ready .thumb,
.motion-ready .ranking-item,
.motion-ready .profile-fact {
    will-change: transform, opacity;
}

.navbar::after {
    content: "";
    position: absolute;
    right: clamp(16px, 4vw, 44px);
    bottom: -1px;
    left: clamp(16px, 4vw, 44px);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(58, 155, 117, 0.42), transparent);
    opacity: 0.62;
    pointer-events: none;
}

.home-hero {
    background-position: center 44%;
}

.hero-copy {
    padding-top: 2px;
}

.hero-copy h1 {
    text-shadow:
        0 2px 0 rgba(58, 155, 117, 0.26),
        0 18px 42px rgba(0, 0, 0, 0.36);
}

.hero-copy p {
    text-wrap: balance;
}

.hero-actions .join-btn,
.hero-actions .ghost-btn,
.join-actions .join-btn {
    min-width: 148px;
}

.card,
.project-card,
.gallery-item,
.thumb,
.profile-card,
.ranking-item,
.profile-fact,
.uptime-block {
    transform-style: preserve-3d;
}

.project-card,
.gallery-item,
.thumb,
.ranking-item,
.profile-fact,
.uptime-block {
    backface-visibility: hidden;
}

.player-avatar-card img,
.member-avatar,
.ranking-avatar {
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.38),
        0 8px 20px rgba(33, 59, 85, 0.12);
}

.project-card:hover,
.gallery-item:hover,
.thumb:hover,
.ranking-item:hover,
.profile-fact:hover,
.uptime-block:hover {
    border-color: rgba(58, 155, 117, 0.28);
}

.project-card::after,
.gallery-item::after,
.thumb::after {
    transition:
        opacity 0.28s ease,
        transform 0.34s var(--ease-out),
        background 0.28s ease;
}

.filter-tag,
.project-count,
.auth-code-target,
.ranking-chip,
.ptag {
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.34);
}

html[data-theme="night"] .filter-tag,
html[data-theme="night"] .project-count,
html[data-theme="night"] .auth-code-target,
html[data-theme="night"] .ranking-chip,
html[data-theme="night"] .ptag {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sakana-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10000;
    width: 150px;
    height: 150px;
    cursor: pointer;
    filter: drop-shadow(0 8px 18px rgba(36, 50, 65, 0.18));
}

#sakana-widget {
    width: 100%;
    height: 100%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes heroLightSweep {
    from {
        transform: translateX(-8%);
        opacity: 0.34;
    }

    to {
        transform: translateX(8%);
        opacity: 0.62;
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.985) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes viewerImageIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes linkSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%,
    100% {
        box-shadow: 0 8px 20px rgba(47, 95, 168, 0.32);
    }

    50% {
        box-shadow: 0 10px 30px rgba(47, 95, 168, 0.54);
    }
}

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

@keyframes themeVeil {
    0% {
        opacity: 0;
        transform: scale(0.9);
        filter: blur(0);
    }

    38% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: scale(1.08);
        filter: blur(12px);
    }
}

@media (max-width: 900px) {
    .navbar {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 8px;
        padding: 10px 14px;
    }

    .theme-toggle {
        top: 72px;
        right: 10px;
        width: 48px;
        height: 27px;
        opacity: 0.62;
    }

    .theme-toggle-track {
        width: 40px;
        height: 19px;
    }

    .theme-toggle-orb {
        top: 3px;
        left: 3px;
        width: 13px;
        height: 13px;
    }

    html[data-theme="night"] .theme-toggle-orb {
        transform: translateX(21px);
    }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
        padding-bottom: 2px;
    }

    .content {
        width: min(100% - 28px, 760px);
        padding-top: 26px;
    }

    .compact-hero-card {
        padding-block: 14px;
    }

    .project-hero-card {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
    }

    .project-hero-mascot {
        gap: 8px;
    }

    .project-hero-gif {
        width: 86px;
        max-height: 86px;
    }

    .project-hero-caption {
        font-size: 11px;
    }

    body.home-page {
        background-size: auto 100vh;
        background-position: center top;
    }

    body.about-page {
        background-attachment: scroll;
    }

    .home-hero {
        min-height: 430px;
        padding: 34px 24px;
    }

    .hero-slide img {
        object-position: center top;
    }

    .hero-copy h1 {
        font-size: clamp(46px, 16vw, 72px);
    }

    .hero-carousel-nav {
        opacity: 0.72;
    }

    .uptime-bar {
        flex-direction: column;
        gap: 14px;
        padding: 18px;
    }

    .uptime-blocks {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .uptime-block {
        min-width: 0;
        padding: 10px 8px;
    }

    .uptime-num {
        font-size: 23px;
    }

    .projects-toolbar {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .auth-layout,
    .member-profile,
    .personal-grid {
        grid-template-columns: 1fr;
    }

    .member-profile {
        justify-items: center;
        text-align: center;
    }

    .member-profile h2 {
        text-align: center;
    }

    .profile-level {
        margin-inline: auto;
    }

    .member-signout {
        width: 100%;
    }

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

    .public-profile-actions {
        justify-content: stretch;
    }

    .public-profile-actions .join-btn,
    .public-profile-actions .ghost-btn {
        width: 100%;
    }

    .project-count {
        justify-content: flex-start;
    }

    .filter-bar {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .filter-group {
        flex: 0 0 auto;
    }

    .projection-panel {
        top: auto;
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: auto;
        transform: none;
    }

    .projection-body {
        max-height: 220px;
    }

    .modal-stage {
        padding: 10px;
    }

    .modal-content {
        width: calc(100vw - 20px);
        height: calc(100vh - 20px);
        height: calc(100dvh - 20px);
        max-height: none;
        overflow: hidden;
    }

    .modal-media {
        min-height: 0;
        border-radius: var(--radius);
    }

    .modal-image {
        max-height: 100%;
    }

    .modal-next {
        right: 18px;
    }

    .modal-body {
        right: 14px;
        bottom: 14px;
        width: min(340px, calc(100% - 28px));
        max-height: 34vh;
    }

    .viewer-backdrop {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        gap: 10px;
        padding: 14px;
    }

    .viewer-image {
        max-height: calc(100vh - 104px);
        max-height: calc(100dvh - 104px);
    }

    .viewer-nav {
        width: 42px;
        height: 56px;
        font-size: 24px;
    }

    .viewer-close {
        top: 12px;
        right: 12px;
    }

    .bible-page .gallery {
        column-count: 2;
    }

    .music-player {
        right: 12px;
        bottom: 12px;
    }

    .music-panel {
        right: 0;
        min-width: min(300px, calc(100vw - 28px));
        max-width: calc(100vw - 28px);
    }

    .sakana-container {
        width: 108px;
        height: 108px;
        right: 10px;
        bottom: 10px;
    }
}

@media (max-width: 560px) {
    .nav-links a {
        min-height: 34px;
        padding: 5px 10px;
        font-size: 14px;
    }

    .compact-hero-card h1 {
        font-size: 28px;
    }

    .compact-hero-card .section-note {
        font-size: 14px;
        line-height: 1.45;
    }

    .project-hero-card {
        grid-template-columns: minmax(0, 1fr) auto;
        padding-right: 14px;
    }

    .project-hero-mascot {
        gap: 6px;
    }

    .project-hero-gif {
        width: 68px;
        max-height: 68px;
    }

    .project-hero-caption {
        max-width: 78px;
        font-size: 10px;
        line-height: 1.2;
        white-space: normal;
        text-align: right;
    }

    .theme-toggle {
        top: 82px;
        right: 8px;
        transform: scale(0.92);
        transform-origin: top right;
    }

    .theme-toggle:hover,
    .theme-toggle:focus-visible {
        transform: scale(0.92) translateY(-1px);
    }

    .home-hero {
        min-height: clamp(400px, 108vw, 520px);
        align-items: flex-end;
        padding: 24px 18px;
        background-color: #111c29;
    }

    .hero-carousel-dots {
        right: 18px;
        bottom: 12px;
        gap: 6px;
    }

    .hero-carousel-dot {
        width: 22px;
        height: 4px;
    }

    .hero-carousel-dot.is-active {
        width: 32px;
    }

    .hero-carousel-nav {
        display: none;
        top: auto;
        bottom: 12px;
        width: 34px;
        height: 34px;
        font-size: 24px;
        opacity: 0.72;
        transform: none;
    }

    .hero-carousel-nav:hover,
    .hero-carousel-nav:focus-visible {
        transform: scale(1.03);
    }

    .hero-carousel-prev {
        right: 94px;
        left: auto;
    }

    .hero-carousel-next {
        right: 56px;
    }

    .hero-slide img {
        object-position: center center;
    }

    .home-hero::before {
        background:
            linear-gradient(0deg, rgba(10, 20, 32, 0.78), rgba(10, 20, 32, 0.16) 58%, rgba(10, 20, 32, 0.06)),
            linear-gradient(90deg, rgba(12, 25, 42, 0.28), rgba(12, 25, 42, 0.08));
    }

    .hero-kicker {
        margin-bottom: 8px;
        font-size: 12px;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

    .hero-copy p {
        margin-top: 10px;
        font-size: 15px;
        line-height: 1.55;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-top: 16px;
    }

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

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

    .player-grid {
        gap: 12px;
    }

    .player-avatar-card {
        min-height: 136px;
        padding: 14px 8px 12px;
    }

    .player-avatar-card img {
        width: 72px !important;
        height: 72px !important;
        margin-bottom: 10px;
    }

    .player-avatar-card p {
        font-size: 12px;
        line-height: 1.25;
    }

    .project-grid,
    .exhibition-page .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .project-list-card {
        padding-inline: clamp(16px, 4vw, 24px);
    }

    .project-card .project-info {
        gap: 7px;
        padding: 12px;
    }

    .project-image-wrap,
    .thumb {
        aspect-ratio: 16 / 10;
    }

    .project-card img,
    .thumb img {
        height: 100%;
        aspect-ratio: auto;
        object-fit: cover;
    }

    .project-name {
        font-size: 14px;
    }

    .project-author,
    .project-desc {
        font-size: 12px;
        line-height: 1.4;
    }

    .project-desc {
        min-height: 34px;
    }

    .project-tags {
        gap: 4px;
    }

    .ptag {
        min-height: 21px;
        padding: 2px 7px;
        font-size: 10px;
    }

    .filter-group {
        width: max-content;
    }

    .ranking-item {
        grid-template-columns: 36px 38px minmax(0, 1fr);
    }

    .ranking-chip {
        grid-column: 3;
        width: max-content;
    }

    .modal-stage {
        padding: 10px;
    }

    .modal-content {
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
    }

    .modal-media {
        min-height: 0;
    }

    .modal-body {
        padding: 18px;
        max-height: 32vh;
    }

    .modal-nav {
        width: 42px;
        height: 50px;
        font-size: 26px;
    }

    .modal-prev {
        left: 10px;
    }

    .modal-next {
        right: 10px;
    }

    .viewer-backdrop {
        padding: 10px;
    }

    .viewer-image {
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
    }

    .viewer-prev {
        right: calc(50% + 6px);
        bottom: 58px;
        left: auto;
    }

    .viewer-next {
        right: auto;
        bottom: 58px;
        left: calc(50% + 6px);
    }

    .viewer-nav {
        top: auto;
        width: min(132px, calc(50vw - 18px));
        height: 44px;
        font-size: 22px;
        transform: none;
    }

    .viewer-nav:active {
        transform: scale(0.96);
    }

    .viewer-meta {
        bottom: 10px;
        max-width: calc(100vw - 20px);
    }

    .bible-page .gallery {
        column-count: 1;
    }

    .sakana-container {
        width: 86px;
        height: 86px;
        opacity: 0.82;
    }
}

@media (max-width: 360px) {
    .project-grid,
    .exhibition-page .gallery {
        gap: 10px;
    }

    .project-list-card {
        padding-inline: 10px;
    }
}

@media (hover: none), (max-width: 760px) {
    .card,
    .profile-card,
    .player-avatar-card,
    .thumb,
    .project-card,
    .gallery-item,
    .projection-panel,
    .music-panel,
    .uptime-bar {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .card::before,
    .player-avatar-card::before,
    .project-card::before,
    .gallery-item::before,
    .profile-card::before,
    .ranking-item::before,
    .profile-fact::before,
    .uptime-block::before {
        display: none;
    }

    .project-card:hover img,
    .project-card:focus-visible img,
    .thumb:hover img,
    .thumb:focus-visible img {
        filter: none;
    }
}

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

    body,
    .fade-up {
        opacity: 1 !important;
        transform: none !important;
    }
}
