/* ══════════════════════════════════════════════════════
   暗房工作室 · DARKROOM STUDIO
   Black & White Minimalist Photography Portfolio
   ══════════════════════════════════════════════════════ */

/* ─── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ─── Variables ─── */
:root {
    --black: #000000;
    --black-soft: #0a0a0a;
    --gray-900: #111111;
    --gray-800: #1a1a1a;
    --gray-700: #2a2a2a;
    --gray-600: #444444;
    --gray-500: #666666;
    --gray-400: #888888;
    --gray-300: #aaaaaa;
    --gray-200: #cccccc;
    --gray-100: #e6e6e6;
    --white: #ffffff;

    --font-serif-cn: 'Noto Serif SC', 'Songti SC', serif;
    --font-serif-en: 'Playfair Display', 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, 'PingFang SC', sans-serif;

    --nav-height: 64px;
    --section-pad: min(120px, 10vh);
    --content-max: 1400px;
    --transition: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    --amber: #d4a037;
}

/* ─── Base ─── */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--black);
    color: var(--white);
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 15px;
    line-height: 1.8;
    overflow-x: hidden;
    cursor: none;
}
body * {
    cursor: none;
}

::selection {
    background: var(--white);
    color: var(--black);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity var(--transition);
}

/* ─── Vignette ─── */
.vignette-overlay {
    position: fixed;
    inset: 0;
    z-index: 9997;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.5) 100%);
}

/* ─── Light Leak ─── */
.light-leak {
    position: fixed;
    inset: 0;
    z-index: 9996;
    pointer-events: none;
    opacity: 0.04;
    background: linear-gradient(
        135deg,
        transparent 0%,
        transparent 30%,
        rgba(200, 120, 50, 0.3) 40%,
        transparent 50%,
        transparent 60%,
        rgba(50, 150, 200, 0.2) 70%,
        transparent 80%
    );
    background-size: 200% 200%;
    animation: lightLeak 12s ease-in-out infinite alternate;
    mix-blend-mode: screen;
}

/* ─── Safelight ─── */
.safelight {
    position: fixed;
    inset: 0;
    z-index: 9994;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 100%, rgba(58, 16, 16, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse at 0% 50%, rgba(40, 10, 10, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 50%, rgba(40, 10, 10, 0.08) 0%, transparent 50%);
    animation: safelightPulse 6s ease-in-out infinite alternate;
}
@keyframes safelightPulse {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

@keyframes lightLeak {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(5%, 3%) rotate(2deg); }
    50%  { transform: translate(-3%, 5%) rotate(-1deg); }
    75%  { transform: translate(4%, -2%) rotate(3deg); }
    100% { transform: translate(-2%, -4%) rotate(-2deg); }
}

/* ─── Noise Overlay ─── */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.030;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    transition: opacity 0.6s ease;
}

/* ─── Viewfinder Cursor ─── */
.crosshair {
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
    mix-blend-mode: difference;
}
.crosshair.visible {
    opacity: 1;
}
/* Outer frame (subtle full border) */
.crosshair-frame {
    position: absolute;
    top: 50%; left: 50%;
    width: 40px; height: 28px;
    border: 0.5px solid rgba(255,255,255,0.12);
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease;
}
/* Corner brackets */
.crosshair-corner {
    position: absolute;
    width: 8px; height: 8px;
    border-color: rgba(255,255,255,0.55);
    border-style: solid;
    transition: border-color 0.15s ease;
}
.crosshair-corner.tl { top: -14px; left: -20px; border-width: 1px 0 0 1px; }
.crosshair-corner.tr { top: -14px; right: -20px; border-width: 1px 1px 0 0; }
.crosshair-corner.bl { bottom: -14px; left: -20px; border-width: 0 0 1px 1px; }
.crosshair-corner.br { bottom: -14px; right: -20px; border-width: 0 1px 1px 0; }

/* Center cross */
.crosshair-cross-h {
    position: absolute;
    top: 50%; left: 50%;
    width: 12px; height: 0.5px;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%);
}
.crosshair-cross-v {
    position: absolute;
    top: 50%; left: 50%;
    width: 0.5px; height: 12px;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%);
}
/* Center dot (focus point) */
.crosshair-dot {
    position: absolute;
    top: 50%; left: 50%;
    width: 2px; height: 2px;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
/* Edge tick marks */
.crosshair-tick {
    position: absolute;
    background: rgba(255,255,255,0.15);
}
.crosshair-tick.top    { top: -18px; left: 50%; width: 6px; height: 0.5px; transform: translateX(-50%); }
.crosshair-tick.bottom { bottom: -18px; left: 50%; width: 6px; height: 0.5px; transform: translateX(-50%); }
.crosshair-tick.left   { top: 50%; left: -24px; width: 0.5px; height: 6px; transform: translateY(-50%); }
.crosshair-tick.right  { top: 50%; right: -24px; width: 0.5px; height: 6px; transform: translateY(-50%); }

/* Click animation: frame pulses + corners brighten */
.crosshair.click .crosshair-frame {
    width: 34px; height: 22px;
}
.crosshair.click .crosshair-corner {
    border-color: rgba(255,255,255,0.9);
}

/* ─── Film Strip Progress ─── */
.film-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9995;
    height: 3px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.film-progress.visible {
    opacity: 1;
}
.film-progress-track {
    position: relative;
    height: 100%;
    background: var(--gray-900);
    overflow: visible;
}
.film-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--gray-600), var(--amber, #d4a037), var(--gray-600));
    transition: width 0.1s linear;
    position: relative;
}
.film-progress-sprocket {
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gray-700);
    transform: translateY(-50%);
}
.film-progress-sprocket.left {
    left: -3px;
}
.film-progress-sprocket.right {
    right: -3px;
}

/* ─── Mouse Trail ─── */
.mouse-trail {
    position: fixed;
    inset: 0;
    z-index: 9994;
    pointer-events: none;
    overflow: hidden;
}
.trail-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--amber, #d4a037);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.trail-dot.fade {
    opacity: 0;
    transform: scale(0.3);
}

/* ─── 3D Room Reflection ─── */
.room-reflection {
    max-width: 800px;
    height: 40px;
    margin: 0 auto;
    margin-top: -2px;
    background: linear-gradient(to bottom, rgba(26,24,22,0.6) 0%, transparent 100%);
    opacity: 0.5;
    pointer-events: none;
    transform: scaleY(-1);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 100%);
}

/* ─── Film Counter ─── */
.film-counter {
    position: fixed;
    top: 80px;
    left: 30px;
    z-index: 9980;
    font-family: 'Inter', monospace;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    display: flex;
    align-items: baseline;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}
.film-counter.visible {
    opacity: 1;
}
.film-counter .counter-num {
    font-size: 20px;
    font-weight: 200;
    color: var(--gray-300);
    font-variant-numeric: tabular-nums;
    min-width: 2ch;
    text-align: right;
}
.film-counter .counter-divider {
    font-size: 12px;
    color: var(--gray-600);
}
.film-counter .counter-total {
    font-size: 12px;
    color: var(--gray-600);
}

/* ─── Development Reveal Overlay ─── */
@keyframes developOverlay {
    0%   { opacity: 1; clip-path: circle(0% at 50% 50%); }
    20%  { opacity: 1; clip-path: circle(15% at 50% 50%); }
    60%  { opacity: 0.6; clip-path: circle(60% at 50% 50%); }
    100% { opacity: 0; clip-path: circle(100% at 50% 50%); }
}
.dev-overlay {
    position: absolute;
    inset: 0;
    background: #000;
    z-index: 1;
    pointer-events: none;
    animation: developOverlay 2.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-play-state: paused;
}
.dev-overlay.visible {
    animation-play-state: running;
}
/* Shorter duration for gallery grid */
.gallery-item .dev-overlay {
    animation-duration: 2.2s;
}

/* ─── Shutter ─── */
.shutter {
    position: fixed;
    inset: 0;
    z-index: 99999;
    pointer-events: none;
    visibility: hidden;
}
.shutter.active {
    visibility: visible;
}
.shutter-blind {
    position: absolute;
    left: 0;
    right: 0;
    height: 50%;
    background: var(--black);
    transition: transform 0.3s cubic-bezier(0.76, 0, 0.24, 1);
}
.shutter-blind.top {
    top: 0;
    transform: translateY(-100%);
}
.shutter-blind.bottom {
    bottom: 0;
    transform: translateY(100%);
}
.shutter.active .shutter-blind.top {
    transform: translateY(0);
}
.shutter.active .shutter-blind.bottom {
    transform: translateY(0);
}
.shutter.release .shutter-blind.top {
    transform: translateY(-100%);
    transition-delay: 0s;
}
.shutter.release .shutter-blind.bottom {
    transform: translateY(100%);
    transition-delay: 0s;
}

/* ─── Loading Screen ─── */
/* ─── Safelight Loading Pulse ─── */
.safelight.loading {
    animation: safelightLoad 1.2s ease-in-out infinite;
}
@keyframes safelightLoad {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}

/* ─── Navigation ─── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    padding: 0 40px;
    height: var(--nav-height);
    transition: background var(--transition), backdrop-filter var(--transition);
}
.navbar.scrolled {
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.nav-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    display: flex;
    align-items: baseline;
    gap: 8px;
    letter-spacing: 0.15em;
}
.logo-cn {
    font-family: var(--font-serif-cn);
    font-weight: 400;
    font-size: 18px;
    letter-spacing: 0.3em;
}
.logo-en {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.35em;
    color: var(--gray-500);
}
.nav-links {
    display: flex;
    list-style: none;
    gap: 36px;
}
.nav-link {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gray-400);
    transition: color 0.3s ease;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--white);
    transition: width 0.4s ease;
}
.nav-link:hover {
    color: var(--white);
}
.nav-link:hover::after {
    width: 100%;
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 28px;
    height: 20px;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
}
.nav-toggle span {
    display: block;
    width: 100%;
    height: 1px;
    background: var(--white);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ─── Hero ─── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    -webkit-touch-callout: none;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: grayscale(100%) blur(3px) brightness(0.3) contrast(1.2);
    transform: scale(1.1);
    transition: transform 0.1s ease;
    -webkit-touch-callout: none;
}
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(0,0,0,0.2) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 60%, rgba(0,0,0,0.3) 0%, transparent 50%);
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255,255,255,0.003) 2px,
        rgba(255,255,255,0.003) 4px
    );
}
.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 24px;
}
.hero-label {
    font-family: var(--font-serif-cn);
    font-size: clamp(14px, 2vw, 20px);
    letter-spacing: 0.6em;
    color: var(--gray-400);
    margin-bottom: 40px;
    font-weight: 200;
}
.hero-title {
    font-family: var(--font-serif-en);
    font-size: clamp(48px, 12vw, 140px);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: 0.05em;
    color: var(--white);
    margin-bottom: 32px;
}
.hero-subtitle {
    font-size: clamp(13px, 1.5vw, 17px);
    font-weight: 200;
    letter-spacing: 0.4em;
    color: var(--gray-400);
}
.hero-marquee {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    font-size: 12px;
    letter-spacing: 0.3em;
    color: var(--gray-700);
    display: flex;
    gap: 0;
    animation: marquee 40s linear infinite;
}
.hero-marquee span {
    flex-shrink: 0;
    padding-right: 0;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    text-align: center;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--gray-600);
    animation: scrollFade 2s ease-in-out infinite;
}
.scroll-arrow {
    display: block;
    font-size: 16px;
    margin-top: 4px;
    animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollFade {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* ─── Reveal Text Animation ─── */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    animation: revealUp 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-label.reveal-text { animation-delay: 0.3s; }
.hero-title.reveal-text { animation-delay: 0.6s; }
.hero-subtitle.reveal-text { animation-delay: 1.0s; }

@keyframes revealUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ─── Section Common ─── */
.section {
    padding: var(--section-pad) 40px;
    max-width: var(--content-max);
    margin: 0 auto;
    position: relative;
}
.section-header {
    display: flex;
    align-items: baseline;
    gap: 24px;
    margin-bottom: 80px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-800);
}
.section-number {
    font-family: var(--font-serif-en);
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 400;
    font-style: italic;
    flex-shrink: 0;
}
.section-title-group {
    flex: 1;
}
.section-title {
    font-family: var(--font-serif-cn);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 200;
    letter-spacing: 0.3em;
    color: var(--white);
}
.section-subtitle {
    font-size: 11px;
    letter-spacing: 0.35em;
    color: var(--gray-600);
    margin-top: 4px;
}

/* ─── Fade-in Animation ─── */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── About ─── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-bottom: 80px;
}
.about-text {
    min-width: 0;
}
.about-cn {
    font-family: var(--font-serif-cn);
    font-size: clamp(15px, 1.6vw, 19px);
    font-weight: 200;
    line-height: 2;
    letter-spacing: 0.05em;
    color: var(--gray-200);
    margin-bottom: 32px;
}
.about-en {
    font-size: clamp(12px, 1.2vw, 14px);
    font-weight: 300;
    line-height: 2;
    letter-spacing: 0.03em;
    color: var(--gray-500);
}
.about-image-wrap {
    position: relative;
}
.about-image-frame {
    position: relative;
    overflow: hidden;
}
.about-image-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid var(--gray-800);
    z-index: 1;
    pointer-events: none;
}
.about-image {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    filter: grayscale(100%) contrast(1.1);
    transition: transform 0.8s ease, filter 0.8s ease;
}
.about-image-wrap:hover .about-image {
    transform: scale(1.03);
    filter: none;
}
.about-filmstrip {
    margin-top: 16px;
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.5em;
    color: var(--gray-600);
    font-weight: 300;
}
.about-credits {
    display: flex;
    justify-content: center;
    gap: 80px;
    padding: 60px 0;
    border-top: 1px solid var(--gray-900);
}
.credit-item {
    text-align: center;
}
.credit-num {
    display: block;
    font-family: var(--font-serif-en);
    font-size: 48px;
    font-weight: 200;
    color: var(--white);
    line-height: 1;
    margin-bottom: 8px;
}
.credit-label {
    font-size: 11px;
    letter-spacing: 0.3em;
    color: var(--gray-500);
}

/* ─── Gallery ─── */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 48px;
}
.filter-btn {
    background: none;
    border: 1px solid var(--gray-800);
    color: var(--gray-400);
    padding: 8px 20px;
    font-size: 12px;
    letter-spacing: 0.15em;
    font-family: var(--font-sans);
    font-weight: 300;
    cursor: pointer;
    transition: all 0.4s ease;
    border-radius: 0;
}
.filter-btn:hover {
    color: var(--white);
    border-color: var(--gray-500);
}
.filter-btn.active {
    color: var(--black);
    background: var(--white);
    border-color: var(--white);
}
.sort-btn {
    background: none;
    border: 1px solid var(--gray-800);
    color: var(--gray-500);
    padding: 8px 18px;
    font-size: 11px;
    letter-spacing: 0.12em;
    font-family: var(--font-sans);
    font-weight: 300;
    cursor: pointer;
    transition: all 0.4s ease;
    border-radius: 0;
    margin-left: auto;
}
.sort-btn:hover {
    color: var(--white);
    border-color: var(--gray-500);
}
.sort-btn.clicked {
    animation: sortPulse 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes sortPulse {
    0%   { transform: scale(1); border-color: var(--gray-800); }
    30%  { transform: scale(0.94); border-color: var(--white); }
    100% { transform: scale(1); border-color: var(--gray-800); }
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 3 / 4;
    background: var(--gray-900);
}

/* ─── Gallery Photo (CSS background-image — no <img> tag) ─── */
.gallery-photo {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(20px) grayscale(100%) contrast(1.05);
    opacity: 0.55;
    transform: scale(1.08);
    transition: filter 0.7s ease-out, opacity 0.7s ease-out, transform 0.7s ease-out;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none;
    user-select: none;
}
.gallery-photo.loaded {
    filter: grayscale(100%) contrast(1.05);
    opacity: 1;
    transform: scale(1);
}
.gallery-item:hover .gallery-photo {
    transform: scale(1.05);
    filter: none;
}

/* Shimmer placeholder while loading */
.gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.03) 50%, transparent 100%);
    animation: shimmer 1.8s ease-in-out infinite;
    pointer-events: none;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    z-index: 2;
}
.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}
.gallery-item-label {
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--white);
    font-weight: 300;
}

/* ─── Grouped Gallery (for "all" view) ─── */
.gallery-grid.grouped {
    display: block;
}

.gallery-group {
    margin-bottom: 48px;
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}
.gallery-group:last-child {
    margin-bottom: 0;
}

.gallery-group-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-800);
    position: sticky;
    top: 64px;
    z-index: 10;
    background: #000;
    padding-top: 8px;
}

.gallery-group-name {
    font-family: var(--font-serif-cn);
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 0.2em;
    color: var(--gray-200);
}

.gallery-group-sub {
    font-size: 11px;
    letter-spacing: 0.15em;
    color: var(--gray-600);
    font-weight: 300;
}

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

.gallery-item.collapsed {
    display: none;
}

.gallery-group-toggle {
    margin-left: auto;
    padding: 4px 14px;
    background: none;
    border: 1px solid var(--gray-800);
    color: var(--gray-500);
    font-size: 11px;
    letter-spacing: 0.1em;
    font-family: var(--font-sans);
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.gallery-group-toggle:hover {
    color: var(--white);
    border-color: var(--gray-500);
}

.toggle-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

/* ══════════════════════════════════════════════════════
   Floating Series Nav (right side dots)
   ══════════════════════════════════════════════════════ */
.series-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}
.series-nav.visible {
    opacity: 1;
    pointer-events: auto;
}
.series-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 7px;
    background: rgba(10,10,10,0.65);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.series-nav-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}
.series-nav-dot:hover {
    background: rgba(255,255,255,0.5);
    transform: scale(1.5);
}
.series-nav-dot.active {
    background: var(--white);
    transform: scale(1.35);
}
/* ─── Responsive nav ─── */
@media (max-width: 768px) {
    .series-nav {
        right: 8px;
    }
    .series-nav-dot {
        width: 6px;
        height: 6px;
    }
    .series-nav-list {
        gap: 8px;
        padding: 8px 6px;
    }
}
@media (max-width: 480px) {
    .series-nav {
        right: 4px;
    }
    .series-nav-dot {
        width: 5px;
        height: 5px;
    }
    .series-nav-list {
        gap: 7px;
        padding: 7px 5px;
    }
}

/* ─── Lightbox ─── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    cursor: zoom-out;
}
.lightbox.open {
    opacity: 1;
    visibility: visible;
}
.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    cursor: default;
}
.lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    filter: blur(15px) brightness(0.7);
    opacity: 0.6;
    transform: scale(0.97);
    transition: filter 0.5s ease-out, opacity 0.5s ease-out, transform 0.5s ease-out;
}
.lightbox-image.loaded {
    filter: none;
    opacity: 1;
    transform: scale(1);
}
.lightbox-image.transitioning {
    opacity: 0;
}
/* ─── Lightbox Watermark ─── */
.lightbox-watermark {
    position: absolute;
    bottom: 34px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 200;
    letter-spacing: 0.25em;
    color: rgba(255,255,255,0.12);
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .lightbox-watermark {
        bottom: 20px;
        font-size: 9px;
    }
}
@media (max-width: 480px) {
    .lightbox-watermark {
        bottom: 14px;
        font-size: 8px;
    }
}
.lightbox-caption {
    text-align: center;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: var(--gray-400);
    margin-top: 16px;
}
.lightbox-counter {
    position: absolute;
    bottom: 30px;
    right: 40px;
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 200;
}
.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 2;
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s ease;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-close:hover {
    color: var(--white);
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 40px;
    cursor: pointer;
    padding: 20px;
    transition: color 0.3s ease;
    font-weight: 100;
}
.lightbox-nav:hover {
    color: var(--white);
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ─── 3D Cube Gallery Room ─── */
.room-3d-wrap {
    position: relative;
    max-width: 800px;
    height: 520px;
    margin: 0 auto;
    border: 1px solid var(--gray-800);
    background: radial-gradient(ellipse at 50% 30%, #1a1a1a 0%, #080808 70%);
    overflow: hidden;
    cursor: grab;
    perspective: 900px;
    perspective-origin: 50% 50%;
    user-select: none;
}
.room-3d-wrap.grabbing { cursor: grabbing; }

.room-3d-stage {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
    transform: rotateY(0deg);
}

/* ─── Wall ─── */
.cube-wall {
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -260px;  /* half-side */
    margin-top: -260px;
    width: 520px;
    height: 520px;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    cursor: pointer;
    overflow: hidden;
}
.cube-wall-surface {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, #1a1816 0%, #22201c 50%, #1a1816 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border: 1px solid #2a2824;
}

/* ─── Picture Rail ─── */
.cube-rail {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 0 12px;
    position: relative;
    width: 100%;
    justify-content: center;
}
.cube-rail::before,
.cube-rail::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #3a3730, transparent);
}
.cube-rail-dot {
    width: 4px;
    height: 4px;
    background: #5a5548;
    border-radius: 50%;
    flex-shrink: 0;
}
.cube-rail-name {
    font-size: 15px;
    font-weight: 300;
    letter-spacing: 0.25em;
    color: #d0c8b8;
    white-space: nowrap;
}
.cube-rail-sub {
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: #6a6558;
    white-space: nowrap;
}

/* ─── Photos ─── */
.cube-photos {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}
.cube-photo-frame {
    width: 100px;
    height: 128px;
    padding: 4px;
    background: #1c1a16;
    border: 1px solid #3a3730;
    transition: border-color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cube-photo-frame:hover {
    border-color: #7a7568;
    transform: scale(1.05);
}
.cube-photo-frame.empty {
    border-color: transparent;
    background: transparent;
}
.cube-photo-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: grayscale(100%) contrast(1.05) brightness(0.95);
    transition: filter 0.6s ease, opacity 0.4s ease;
    -webkit-touch-callout: none;
}
.cube-photo-frame:hover .cube-photo-img {
    filter: grayscale(0%) contrast(1.0) brightness(1.1);
}

/* ─── Section divider (dual-series walls) ─── */
.cube-section-divider {
    width: 60%;
    height: 1px;
    background: linear-gradient(to right, transparent, #3a3730, transparent);
    margin: 6px auto;
}

/* ─── Overlays ─── */

.room-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--gray-500);
    background: rgba(0,0,0,0.35);
    cursor: pointer;
    transition: color 0.3s ease, background 0.3s ease;
    user-select: none;
    border: none;
    outline: none;
}
.room-nav:hover {
    color: var(--white);
    background: rgba(0,0,0,0.55);
}
.room-nav.left  { left: 8px; }
.room-nav.right { right: 8px; }

/* ─── Zoom Modal (wall click → enlarged series view) ─── */
.room-zoom-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.room-zoom-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.room-zoom-panel {
    background: #141210;
    border: 1px solid #2a2824;
    max-width: 680px;
    width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    padding: 32px 28px 24px;
    position: relative;
    transform: scale(0.92);
    transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
}
.room-zoom-overlay.active .room-zoom-panel {
    transform: scale(1);
}
.room-zoom-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 22px;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 2;
}
.room-zoom-close:hover { color: var(--white); }
.room-zoom-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 18px;
    font-weight: 400;
    color: #d0c8b8;
    letter-spacing: 0.2em;
    text-align: center;
    margin-bottom: 4px;
}
.room-zoom-subtitle {
    font-size: 11px;
    color: var(--gray-500);
    text-align: center;
    letter-spacing: 0.15em;
    margin-bottom: 24px;
}
.room-zoom-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    justify-items: center;
}
.room-zoom-photo {
    width: 100%;
    aspect-ratio: 4 / 5;
    max-width: 190px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    border: 1px solid #2a2824;
    transition: transform 0.25s ease, border-color 0.25s ease, filter 0.4s ease;
    filter: grayscale(100%) contrast(1.05) brightness(0.9);
}
.room-zoom-photo:hover {
    transform: scale(1.06);
    border-color: #7a7568;
    filter: grayscale(0%) contrast(1.0) brightness(1.05);
}

/* ─── Tour Caption ─── */
.tour-caption {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform: translateX(-50%) translateY(12px);
}
.tour-caption.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.tour-caption-num {
    font-size: 9px;
    letter-spacing: 0.2em;
    color: #6a6558;
}
.tour-caption-name {
    font-family: 'Noto Serif SC', serif;
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 0.2em;
    color: #d0c8b8;
}
.tour-caption-sub {
    font-size: 10px;
    letter-spacing: 0.15em;
    color: #5a5548;
}

/* ─── Tour Progress Dots ─── */
.tour-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.tour-dots.active { opacity: 1; }
.tour-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #2a2824;
    transition: all 0.4s ease;
}
.tour-dot.current {
    background: #c0a060;
    box-shadow: 0 0 6px rgba(192,160,96,0.4);
}

/* ─── Subscribe (inside Contact) ─── */
.subscribe-box {
    text-align: center;
}
.subscribe-divider {
    width: 60px;
    height: 1px;
    background: var(--gray-700);
    margin: 48px auto;
}
.subscribe-desc {
    font-size: 13px;
    color: var(--gray-500);
    letter-spacing: 0.12em;
    margin-bottom: 20px;
    font-weight: 300;
}
.subscribe-quote {
    font-family: var(--font-serif-cn);
    font-size: 14px;
    color: var(--gray-600);
    letter-spacing: 0.15em;
    margin-top: 22px;
    font-style: italic;
    opacity: 0.7;
}
.newsletter-form {
    display: flex;
    max-width: 380px;
    margin: 0 auto;
    gap: 0;
}
.newsletter-form input {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid var(--gray-700);
    color: var(--gray-300);
    font-size: 12px;
    letter-spacing: 0.08em;
    font-family: var(--font-sans);
    outline: none;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    caret-color: var(--white);
}
.newsletter-form input:focus {
    border-color: var(--gray-400);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.04), 0 0 16px rgba(255,255,255,0.03);
}
.newsletter-form input::placeholder {
    color: var(--gray-700);
    transition: color 0.3s ease;
}
.newsletter-form input:focus::placeholder {
    color: var(--gray-600);
}
.newsletter-form button {
    padding: 10px 20px;
    background: var(--white);
    color: var(--black);
    border: none;
    font-size: 11px;
    letter-spacing: 0.15em;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.3s ease;
}
.newsletter-form button:hover {
    opacity: 0.85;
}
.newsletter-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─── Toast ─── */
.toast {
    position: fixed;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--white);
    color: var(--black);
    padding: 12px 28px;
    font-size: 12px;
    letter-spacing: 0.1em;
    z-index: 10000;
    transition: transform 0.45s cubic-bezier(0.22,1,0.36,1);
    pointer-events: none;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ─── Game ─── */
.game-intro {
    text-align: center;
    margin-bottom: 48px;
    font-size: 15px;
    color: var(--gray-300);
    font-weight: 200;
    letter-spacing: 0.1em;
}
.game-intro-sub {
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 8px;
}
.game-wrapper {
    max-width: 660px;
    margin: 0 auto;
    position: relative;
}
.game-wrapper::before {
    content: '';
    position: absolute;
    inset: -2px;
    border: 1px solid var(--gray-800);
    pointer-events: none;
    z-index: 1;
}
.game-frame {
    width: 100%;
    height: 496px;
    border: none;
    display: block;
    background: #000;
}

/* ─── Game Levels Panel ─── */
.game-levels {
    max-width: 660px;
    margin: 0 auto;
    margin-top: 16px;
}

.game-levels-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: none;
    border: 1px solid var(--gray-800);
    color: var(--gray-400);
    font-size: 13px;
    letter-spacing: 0.15em;
    font-family: var(--font-sans);
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.game-levels-toggle:hover {
    color: var(--white);
    border-color: var(--gray-500);
}

.game-levels-toggle.open {
    border-color: var(--gray-700);
}

.toggle-icon {
    font-size: 16px;
}

.toggle-arrow-down {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.game-levels-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    opacity: 0;
    border-left: 1px solid var(--gray-800);
    border-right: 1px solid var(--gray-800);
}

.game-levels-panel.open {
    max-height: 2000px;
    opacity: 1;
    border-bottom: 1px solid var(--gray-800);
}

.level-card {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-900);
    transition: background 0.3s ease;
}

.level-card:last-child {
    border-bottom: none;
}

.level-card:hover {
    background: var(--gray-900);
}

.level-card-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}

.level-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.level-name {
    font-family: var(--font-serif-cn);
    font-size: 14px;
    font-weight: 400;
    color: var(--gray-200);
    letter-spacing: 0.05em;
}

.level-sub {
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--gray-600);
    font-weight: 300;
}

.level-card-body {
    font-size: 13px;
    font-weight: 300;
    color: var(--gray-400);
    line-height: 1.7;
    letter-spacing: 0.03em;
    padding-left: 26px;
}

.level-badge {
    display: inline-block;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--gray-500);
    border: 1px solid var(--gray-700);
    padding: 1px 8px;
    margin-right: 8px;
    font-weight: 400;
}

.level-card-body .highlight {
    color: var(--amber, #d4a037);
}

/* ─── Contact ─── */
.contact-content {
    text-align: center;
    padding: 80px 0;
}
.contact-text {
    font-family: var(--font-serif-cn);
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 200;
    letter-spacing: 0.3em;
    color: var(--gray-200);
    margin-bottom: 64px;
}
.contact-links {
    display: flex;
    justify-content: center;
    gap: 48px;
}
.contact-link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--gray-500);
    transition: color 0.4s ease;
}
.contact-link:hover { color: var(--white); }
.link-line {
    width: 24px;
    height: 1px;
    background: var(--gray-600);
    transition: width 0.4s ease, background 0.4s ease;
}
.contact-link:hover .link-line {
    width: 48px;
    background: var(--white);
}
.link-text {
    font-size: 13px;
    letter-spacing: 0.25em;
    font-weight: 300;
    text-align: center;
    line-height: 1.6;
}

/* ─── Footer ─── */
.footer {
    border-top: 1px solid var(--gray-900);
    padding: 32px 40px;
}
.footer-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.15em;
    color: var(--gray-600);
}
.footer-tagline {
    color: var(--gray-700);
    margin-top: 4px;
    font-style: italic;
}
.footer-stats {
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--gray-600);
    margin-top: 10px;
}

/* ─── Keyboard Help ─── */
.kbd-help {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.85);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.kbd-help.active { opacity: 1; pointer-events: auto; }

.kbd-help-inner {
    background: #141210;
    border: 1px solid #2a2824;
    padding: 28px 32px 24px;
    width: 340px;
    max-width: 90vw;
}
.kbd-help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #1e1c18;
}
.kbd-help-title {
    font-size: 13px;
    letter-spacing: 0.2em;
    color: #b0a888;
}
.kbd-help-close {
    font-size: 9px;
    letter-spacing: 0.15em;
    color: #5a5548;
}
.kbd-help-grid { display: flex; flex-direction: column; gap: 8px; }
.kbd-row {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 11px;
    letter-spacing: 0.08em;
}
.kbd-row span { color: #888; font-weight: 300; }
.kbd-row kbd {
    display: inline-block;
    min-width: 54px;
    padding: 2px 8px;
    text-align: center;
    font-family: 'Inter', monospace;
    font-size: 10px;
    color: #c0a060;
    background: #1a1816;
    border: 1px solid #2a2824;
    letter-spacing: 0.05em;
}

/* ─── Back to Top ─── */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9990;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10,10,10,0.85);
    border: 1px solid var(--gray-700);
    color: var(--gray-500);
    font-size: 18px;
    font-family: var(--font-sans);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, border-color 0.3s ease, color 0.3s ease;
    border-radius: 0;
    backdrop-filter: blur(6px);
}
.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}
.back-to-top:hover {
    color: var(--white);
    border-color: var(--white);
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .about-image {
        height: 400px;
    }
    .gallery-grid,
    .gallery-group-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --section-pad: 60px;
    }
    .navbar {
        padding: 0 20px;
    }
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(0,0,0,0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 24px 40px;
        gap: 20px;
        transform: translateY(-100%);
        opacity: 0;
        transition: transform 0.4s ease, opacity 0.4s ease;
        pointer-events: none;
    }
    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    .nav-toggle {
        display: flex;
    }
    .section {
        padding: var(--section-pad) 20px;
    }
    .section-header {
        margin-bottom: 48px;
    }
    .about-credits {
        gap: 40px;
    }
    .credit-num {
        font-size: 36px;
    }
    .gallery-grid,
    .gallery-group-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2px;
    }
    .game-frame {
        height: 400px;
    }
    .room-3d-wrap {
        height: 380px;
    }
    .cube-wall {
        margin-left: -180px !important;
        margin-top: -180px !important;
        width: 360px !important;
        height: 360px !important;
    }
    .cube-wall-surface {
        padding: 12px 14px !important;
    }
    .cube-photo-frame {
        width: 75px !important;
        height: 100px !important;
        padding: 3px !important;
    }
    .cube-rail-name {
        font-size: 11px !important;
    }
    .cube-rail {
        margin-bottom: 8px !important;
        gap: 8px !important;
    }
    .cube-rail-sub {
        display: none !important;
    }
    .tour-caption { bottom: 44px; }
    .tour-caption-name { font-size: 14px; }
    .contact-links {
        flex-direction: column;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .gallery-grid,
    .gallery-group-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2px;
    }
    .about-credits {
        flex-wrap: wrap;
        gap: 32px;
    }
    .hero-title {
        letter-spacing: 0;
    }
}

/* ─── Lightbox Save Button ─── */
.lightbox-save {
    position: absolute;
    bottom: 24px;
    right: 130px;
    z-index: 2;
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    color: var(--gray-400);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
    opacity: 0.6;
}
.lightbox-save:hover {
    color: var(--white);
    border-color: rgba(255,255,255,0.4);
    opacity: 1;
}
@media (max-width: 768px) {
    .lightbox-save {
        right: 72px;
        bottom: 12px;
        width: 36px;
        height: 36px;
    }
}
@media (max-width: 480px) {
    .lightbox-save {
        right: 58px;
        bottom: 8px;
        width: 32px;
        height: 32px;
    }
}

/* ══════════════════════════════════════════════════════
   Swipe Hint
   ══════════════════════════════════════════════════════ */
.swipe-hint {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(255,255,255,0.35);
    font-size: 12px;
    letter-spacing: 0.1em;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}
.swipe-hint.visible {
    opacity: 1;
}
.swipe-hint-arrow {
    font-size: 18px;
    animation: swipeHintPulse 1.8s ease-in-out infinite;
}
.swipe-hint-arrow:last-child {
    animation-delay: 0.4s;
}
@keyframes swipeHintPulse {
    0%, 100% { opacity: 0.3; transform: translateX(0); }
    50% { opacity: 0.8; transform: translateX(3px); }
}

/* ══════════════════════════════════════════════════════
   Lightbox Touch States
   ══════════════════════════════════════════════════════ */
.lightbox-image.swiping {
    transition: none !important;
}
.lightbox-image.snapping {
    transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), opacity 0.25s ease !important;
}
.lightbox-image.zoomed {
    cursor: move;
}
.lightbox-content.panning {
    cursor: move;
}

/* ─── Lightbox Scroll Lock Helper ─── */
.lightbox-scroll-lock {
    touch-action: none;
    overscroll-behavior: none;
}

/* ══════════════════════════════════════════════════════
   Lightbox — Responsive
   ══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .lightbox-close {
        top: 12px;
        right: 12px;
        font-size: 26px;
        width: 44px;
        height: 44px;
    }
    .lightbox-nav {
        font-size: 32px;
        padding: 10px;
    }
    .lightbox-prev {
        left: 2px;
    }
    .lightbox-next {
        right: 2px;
    }
    .lightbox-counter {
        bottom: 16px;
        right: 16px;
        font-size: 11px;
    }
    .lightbox-caption {
        font-size: 12px;
        margin-top: 10px;
    }
    .lightbox-content {
        max-width: 96vw;
        max-height: 88vh;
    }
    .lightbox-image {
        max-width: 96vw;
        max-height: 80vh;
    }
}

@media (max-width: 480px) {
    .lightbox-nav {
        font-size: 28px;
        padding: 6px;
    }
    .lightbox-close {
        top: 8px;
        right: 8px;
        font-size: 22px;
        width: 40px;
        height: 40px;
    }
    .lightbox-counter {
        bottom: 12px;
        right: 12px;
        font-size: 10px;
    }
    .swipe-hint {
        bottom: 64px;
    }
}
