/* ==========================================================================
   (주)디자인인트로 (Designintro Co.,Ltd.) - V3 Splash & 3D Cylinder Showcase
   - 1일 1회 스플래시 스크린 (중심점 좌우 선 확장 -> 상하 분할 블랙 확장)
   - 헤더 다크모드 반전 & 갤러리 밀림 연출
   - 텍스트 타이포그래피 카피라이트 순차 노출
   - 스크롤 시 카피라이트 원근 퇴장 & 최신 8개 작품 열차식 진입
   - 3D 실린더 쇼케이스 (ring-section / cylinder-showcase, rotateY, Lerp)
   - 360도 완료 후 접힘(Collapse) 및 일반 갤러리 복귀
   ========================================================================== */

html, body {
  overflow-x: hidden;
}

/* ==========================================================================
   Viewport & Page Scroll Lock during Splash
   - 스플래시 효과 영역이 활성화되어 있는 동안 브라우저 화면 스크롤을 원천 차단
   ========================================================================== */
html.splash-locked,
html:not(.splash-skipped) body.splash-locked {
  overflow: hidden !important;
  height: 100% !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
}

/* Body Full Viewport Theme during Splash */
html.splash-skipped .splash-master-stage {
  display: none;
}

body.splash-active {
  background-color: #08080a !important;
  transition: background-color 0.5s ease;
  overflow: hidden !important;
}

/* 1. Header Dark Mode Override during Splash (200ms 지연 후 부드럽게 반전) */
.site-header-row {
  transition: color 0.4s ease;
}

.site-header-row .brand-text,
.site-header-row .nav-item-btn,
.site-header-row .nav-filter-btn,
.site-header-row .sort-link,
.site-header-row .theme-link {
  transition: color 0.45s ease;
}

.site-header-row .brand-logo-img {
  transition: filter 0.45s ease;
}

.site-header-row .mobile-menu-trigger span {
  transition: background-color 0.45s ease;
}

.site-header-row.splash-dark {
  background-color: transparent !important;
  position: relative;
  z-index: 120;
}

.site-header-row.splash-dark .brand-text,
.site-header-row.splash-dark .nav-item-btn,
.site-header-row.splash-dark .nav-filter-btn {
  color: #f0f0f2 !important;
}

.site-header-row.splash-dark .brand-logo-img {
  filter: invert(1) hue-rotate(180deg);
}

.site-header-row.splash-dark .sort-link,
.site-header-row.splash-dark .theme-link {
  color: #777780 !important;
}

.site-header-row.splash-dark .sort-link.selected,
.site-header-row.splash-dark .theme-link.selected {
  color: #ffffff !important;
}

.site-header-row.splash-dark .mobile-menu-trigger span {
  background-color: #ffffff !important;
}

/* 2. Gallery & Footer Lock during Splash (문서 높이를 100vh로 제한하여 스크롤 생성 원천 차단) */
.gallery-section.splash-pushed {
  display: none !important;
}

.site-footer.splash-hidden {
  display: none !important;
}

.gallery-section.fade-in {
  animation: gallerySectionFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes gallerySectionFadeIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 3. Splash Master Stage Container (Full-Screen 100vw Breakout) */
.splash-master-stage {
  position: relative;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  overflow: visible; /* 상단 커튼이 위로 뻗어나갈 수 있도록 visible */
  z-index: 110;
  background-color: transparent !important;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

/* 3-1. Top Expanding Black Curtain: 선(Hairline) 위치에서 화면 위쪽(헤더 방향)으로 퍼지는 애니메이션 (원래속도 100%: 0.85초) */
.splash-curtain-top {
  position: absolute;
  top: 0; /* 분할선(Hairline) 위치에 기준점 고정 */
  left: 50%;
  transform: translateX(-50%) translateY(-100%); /* 하단이 분할선에 완벽히 밀착되어 위쪽으로만 확장 */
  width: 100vw;
  height: 0;
  background-color: #08080a;
  transition: height 0.85s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 105;
  pointer-events: none;
}

.splash-curtain-top.open {
  /* 선(Hairline) 위치에서 화면 최상단까지 틈새 없이 100% 꽉 차도록 충분한 높이 확보 */
  height: calc(var(--hairline-top, 160px) + 80px);
}

/* 4. Hairline Center Expansion across Full Screen (100vw) (원래속도 100%: 0.8초)
   - 초기 흰색 배경에서는 짙은 선으로 좌우로 길어짐
   - 블랙 커튼이 위아래로 퍼진 후에는 밝은 선으로 자연스럽게 전환 */
.splash-hairline {
  position: relative;
  width: 100vw;
  height: 1.5px;
  background: linear-gradient(
    90deg, 
    rgba(20, 20, 24, 0) 0%, 
    rgba(20, 20, 24, 0.5) 15%, 
    rgba(20, 20, 24, 0.95) 50%, 
    rgba(20, 20, 24, 0.5) 85%, 
    rgba(20, 20, 24, 0) 100%
  );
  transform: scaleX(0);
  transform-origin: center center;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), background 0.6s ease;
  margin-bottom: 0;
  z-index: 125;
}

.splash-hairline.expanded {
  transform: scaleX(1);
}

.splash-hairline.curtain-opened {
  background: linear-gradient(
    90deg, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.25) 15%, 
    rgba(255, 255, 255, 0.85) 50%, 
    rgba(255, 255, 255, 0.25) 85%, 
    rgba(255, 255, 255, 0) 100%
  );
}

/* 5. Splash Bottom Curtain: 선(Hairline) 위치에서 화면 아래쪽으로 퍼지는 애니메이션 (원래속도 100%: 0.85초) */
.splash-curtain-bottom {
  position: relative;
  width: 100vw;
  height: 0;
  background-color: #08080a;
  border-radius: 0;
  overflow: hidden;
  transition: height 0.85s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 110;
}

.splash-curtain-bottom.open {
  height: calc(100vh - var(--hairline-top, 136px));
  height: calc(100dvh - var(--hairline-top, 136px));
}

/* 6. Skip Button */
.splash-skip-btn {
  position: absolute;
  top: 24px;
  right: 28px;
  z-index: 130;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.25s ease;
}

.splash-skip-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

/* 7. Typography Presentation Layer (원래속도 100%: 0.8초 페이드인) */
.splash-typo-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 3rem;
  text-align: center;
  color: #ffffff;
  z-index: 115;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
  pointer-events: none;
}

.splash-typo-layer.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Intro -> 3D Cylinder Seamless Glide Mode (카피라이트는 페이드아웃되지 않고 실린더 상단으로 자연스럽게 이동) */
.splash-typo-layer.to-cylinder {
  opacity: 1 !important;
  pointer-events: none;
  z-index: 125; /* 3D 실린더 카드 위에서 실시간 difference 색상 반전 수행 */
}

.splash-typo-layer.to-cylinder .typo-desc-1,
.splash-typo-layer.to-cylinder .typo-desc-2,
.splash-typo-layer.to-cylinder .scroll-cue {
  opacity: 0 !important;
  transform: translateY(35px) !important;
  transition: opacity 0.4s ease, transform 0.4s ease !important;
  pointer-events: none !important;
}

.splash-typo-layer.to-cylinder .typo-headline {
  opacity: 1 !important;
  mix-blend-mode: difference;
}

.typo-inner {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* 문단 자체는 화면 중앙이지만 내부 요소는 좌측 정렬 */
  text-align: left;         /* 내부 텍스트 좌측 정렬 */
  gap: 1.85rem;
  position: relative;
}

/* 메인 카피라이트: 훨씬 더 크고 웅장한 타이포그래피 */
.typo-headline {
  font-size: clamp(2.4rem, 4.6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: #ffffff;
  margin: 0;
  text-align: left;
  align-self: flex-start;
  word-break: keep-all;
  will-change: transform;
  mix-blend-mode: difference;
}

/* 1글자씩 튀어오르듯 pop & 장평(가로)·길이(세로) 탄성 복원 키네틱 효과 */
.pop-word {
  display: inline-block;
  white-space: nowrap;
}

.pop-space {
  display: inline-block;
}

.pop-char {
  display: inline-block;
  opacity: 0;
  transform-origin: 50% 90%;
  will-change: transform, opacity;
}

.splash-typo-layer.visible .pop-char {
  animation: kineticCharPop 0.85s cubic-bezier(0.2, 0.85, 0.35, 1.25) forwards;
  animation-delay: calc(var(--ci, 0) * 45ms);
}

.splash-typo-layer.to-cylinder .pop-char {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

@keyframes kineticCharPop {
  0% {
    opacity: 0;
    /* 바닥에서 솟구치며: 세로 길이(scaleY)는 1.8배 늘어나고, 장평(scaleX)은 0.45배 홀쭉 */
    transform: translateY(50px) scale(0.45, 1.8);
  }
  38% {
    opacity: 1;
    /* 정점 도달: 장평(scaleX)이 1.35배로 떡 벌어지고, 세로 길이(scaleY)는 0.7배로 찌그러짐 (Squash & Stretch Pop) */
    transform: translateY(-22px) scale(1.35, 0.7);
  }
  65% {
    /* 1차 리바운드: 탄성 반동 */
    transform: translateY(6px) scale(0.92, 1.15);
  }
  82% {
    /* 2차 미세 흔들림 */
    transform: translateY(-2px) scale(1.04, 0.96);
  }
  100% {
    opacity: 1;
    /* 제자리 안착: 정확한 본래 비율 1:1 */
    transform: translateY(0) scale(1, 1);
  }
}

.typo-desc-1 {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  font-weight: 500;
  color: #e2e2e8;
  letter-spacing: -0.02em;
  line-height: 1.65;
  margin: 0;
  word-break: keep-all;
  text-align: left;
  align-self: flex-start;
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.8s ease 0.6s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s;
}

.typo-desc-2 {
  font-size: clamp(0.9rem, 1.15vw, 1.05rem);
  font-weight: 300;
  color: #9c9ca6;
  letter-spacing: -0.015em;
  line-height: 1.85;
  margin: 0;
  max-width: 860px;
  word-break: keep-all;
  text-align: left;
  align-self: flex-start;
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.8s ease 0.8s, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s;
}

.desc-line-break {
  display: block;
  margin-top: 0.65rem;
}

.splash-typo-layer.visible .typo-desc-1,
.splash-typo-layer.visible .typo-desc-2 {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll Cue */
.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: center; /* 박스 내부 중앙 정렬 */
  gap: 8px;
  margin-top: 2rem;
  opacity: 0;
  transition: opacity 0.8s ease 1.0s;
}

.splash-typo-layer.visible .scroll-cue {
  opacity: 1;
}

.scroll-cue-mouse {
  width: 20px;
  height: 32px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  position: relative;
}

.scroll-cue-mouse::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  width: 3px;
  height: 6px;
  background-color: #ffffff;
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollMouseWheel 1.6s infinite ease-in-out;
}

@keyframes scrollMouseWheel {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, 12px); opacity: 0; }
}

.scroll-cue-text {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
}

/* 8. 3D Cylinder Showcase Section (ring-section) */
.cylinder-showcase-section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 108;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  background: #08080a;
  isolation: isolate; /* mix-blend-mode difference 격리 */
}

.cylinder-showcase-section.active {
  opacity: 1;
  pointer-events: auto;
}

/* Giant Background Typography in 3D: 상단 배치 + 축소 + 이미지 오버랩 반전(difference) */
.cylinder-bg-typo-wrap {
  position: absolute;
  top: 52px; /* 상단 HUD 바로 아래 위치 */
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  text-align: center;
  pointer-events: none;
  z-index: 15; /* 3D 카드 위에 레이어링되어 겹치는 부분 반전 */
  user-select: none;
}

.cylinder-bg-typo {
  font-size: clamp(2.2rem, 5.2vw, 4.8rem); /* 기존 대비 적당히 축소 */
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: #ffffff;
  text-transform: uppercase;
  font-family: var(--font-main);
  mix-blend-mode: difference; /* 이미지와 겹치는 부분 색상 반전 */
  opacity: 1;
  padding: 0 1rem;
}

/* HUD Overlay */
.cylinder-hud {
  position: absolute;
  width: 100%;
  padding: 1.5rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  pointer-events: none;
  font-family: var(--font-main);
}

.cylinder-hud.hud-top {
  top: 0;
  left: 0;
  padding-right: 120px;
}

.cylinder-hud.hud-bottom {
  bottom: 0;
  left: 0;
}

.hud-item {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.08em;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.hud-badge {
  color: #ff5722; /* High-end orange badge accent matching reference */
}

.hud-active-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 65%;
  pointer-events: auto;
}

.hud-active-category {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hud-active-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-explore-btn {
  pointer-events: auto;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  padding: 10px 18px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.hud-explore-btn:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  transform: translateY(-1px);
}

/* 3D Viewport & Cylinder Track */
.cylinder-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
  perspective-origin: 50% 50%;
  transform-style: preserve-3d;
  z-index: 5;
  overflow: hidden;
}

.cylinder-ring-track {
  position: relative;
  width: 320px;
  height: 420px;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.05s linear;
}

/* Cylinder Card Items */
.cylinder-card-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9), 0 0 1px rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transform-style: preserve-3d;
  backface-visibility: visible;
  transition: filter 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-color: #16161a;
  user-select: none;
}

.cylinder-card-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.cylinder-card-item .card-overlay-badge {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  color: #f0f0f2;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

.cylinder-card-item.active-front {
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.95), 0 0 25px rgba(255, 255, 255, 0.2);
  filter: brightness(1.08);
}

.cylinder-card-item:hover {
  filter: brightness(1.15);
  border-color: #ffffff;
}

/* 9. Collapse / Exit Animation */
.splash-master-stage.collapsing {
  transform: translateY(-40px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

.splash-master-stage.collapsed {
  display: none !important;
}

/* 10. Rotation Progress Cue */
.cylinder-progress-cue {
  position: absolute;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  background: rgba(18, 18, 22, 0.85);
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  white-space: nowrap;
}

.cylinder-progress-cue.visible {
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .cylinder-ring-track {
    width: 250px;
    height: 330px;
  }
  .cylinder-hud {
    padding: 1rem 1.25rem;
  }
  .hud-active-info {
    max-width: 50%;
  }
  .hud-active-title {
    font-size: 0.9rem;
  }
  .splash-curtain-bottom.open {
    height: calc(100vh - var(--hairline-top, 100px));
    height: calc(100dvh - var(--hairline-top, 100px));
  }
}

@media (max-width: 600px) {
  .cylinder-ring-track {
    width: 200px;
    height: 270px;
  }
  .cylinder-bg-typo {
    font-size: 3rem;
  }
  .hud-active-info {
    display: none;
  }
}
/* Scroll-scrubbed scene: no time-based transitions may advance its geometry. */
.splash-master-stage.scrubbing {
  position: fixed;
  top: var(--stage-top, 136px);
  transition: none;
}
.splash-master-stage.scrubbing .cylinder-showcase-section,
.splash-master-stage.scrubbing .cylinder-ring-track,
.splash-master-stage.scrubbing .cylinder-progress-cue,
.splash-typo-layer.scrubbing,
.splash-typo-layer.scrubbing .typo-headline,
.splash-typo-layer.scrubbing .typo-desc-1,
.splash-typo-layer.scrubbing .typo-desc-2,
.splash-typo-layer.scrubbing .scroll-cue {
  transition: none;
}
/* Blend the entire text stacking context with the card layer beneath it.
   Blending only the headline is trapped inside its positioned parent. */
.splash-typo-layer.scrubbing {
  opacity: 1;
  transform: none;
  pointer-events: none;
  mix-blend-mode: difference;
}
.splash-typo-layer.scrubbing .typo-headline {
  mix-blend-mode: normal;
}
.splash-typo-layer.scrubbing .pop-char {
  animation: none;
  opacity: 1;
  transform: none;
}
.splash-master-stage.scrubbing .cylinder-viewport {
  perspective: 2400px;
  perspective-origin: 50% 42%;
}
.splash-master-stage.scrubbing .cylinder-ring-track {
  width: min(33.8vw, 338px);
  height: min(44.2vw, 442px, 54.6dvh);
}
@media (max-width: 600px) {
  .splash-typo-layer .typo-copy-line {
    display: block;
    font-size: clamp(1.15rem, 6vw, 2rem);
    line-height: 1.25;
    white-space: nowrap;
  }
  .splash-typo-layer .typo-desc-2 {
    display: none;
  }
  .splash-master-stage.scrubbing .cylinder-ring-track {
    width: 33.8vw;
    height: min(44.2vw, 44.2dvh);
  }
  .cylinder-progress-cue {
    max-width: calc(100vw - 32px);
    white-space: normal;
    text-align: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .splash-master-stage *, .splash-master-stage {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .splash-typo-layer.visible .pop-char { opacity: 1; transform: none; }
  .scroll-cue-mouse::before { animation: none; }
}
.splash-master-stage.scrubbing .splash-curtain-bottom {
  transition: none;
}
.splash-master-stage.scrubbing .splash-curtain-bottom.open {
  height: calc(100dvh - var(--stage-top, 136px) - 1.5px);
}

/* A single-row glass navigation remains after the intro has finished. */
.header-compact .site-header-row {
  position: fixed;
  z-index: 150;
  top: 12px;
  left: 50%;
  width: calc(100% - 48px);
  max-width: 1280px;
  height: 56px;
  margin: 0;
  padding: 0 22px;
  align-items: center;
  gap: 24px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
  transform: translateX(-50%);
  transition: background-color 0.3s ease;
  animation: floatingHeaderEnter 0.5s ease both;
}
@keyframes floatingHeaderEnter {
  from { opacity: 0; }
  to { opacity: 1; }
}
.header-compact .site-header-row .brand-text,
.header-compact .site-header-row .nav-theme-group,
.header-compact .site-header-row .nav-sort-group,
.header-compact .site-header-row .nav-space {
  display: none;
}
.header-compact .site-header-row .brand-block { width: auto; flex-shrink: 0; }
.header-compact .site-header-row .brand-logo-img { height: 24px; }
.header-compact .site-header-row .nav-block {
  width: auto;
  min-width: 0;
  padding: 0;
  margin-left: auto;
  align-items: center;
}
.header-compact .site-header-row .nav-item-btn { width: auto; padding: 12px 14px; }
.header-compact .site-header-row .nav-space { width: 16px; }

.header-compact .hidden-nav-drawer.open {
  position: fixed;
  z-index: 145;
  top: 80px;
  left: 24px;
  width: calc(100% - 48px);
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
  margin: 0;
  padding: 24px;
  background: var(--bg-primary, #fff);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}
[data-theme="dark"] .header-compact .site-header-row { background: rgba(20, 20, 22, 0.8); }
[data-theme="dark"] .header-compact .site-header-row .nav-filter-btn { color: var(--text-primary); }
@media (max-width: 900px) {
  .header-compact .site-header-row { height: 50px; padding: 0 14px; }
  .header-compact .site-header-row .brand-logo-img { height: 22px; }
  .header-compact .hidden-nav-drawer.open { top: 74px; padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .header-compact .site-header-row {
    animation: none;
    transition: none;
    transform: translateX(-50%);
  }
}

/* The dismissed intro contributes neither layout space nor a scroll threshold. */
.splash-complete .splash-master-stage { display: none; }
.floating-header-spacer { display: none; overflow-anchor: none; }
.header-compact .floating-header-spacer { display: block; }
