@font-face {
  font-family: Millik;
  font-weight: 700;
  src: url(./assets/font/Millik.c3f91cb.ttf) format("truetype");
  text-rendering: optimizeLegibility;
  font-display: swap;
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

:root {
  color-scheme: light;
  --post-spacing: 1.78vw;
  --post-size: 25vw;
  --mask-size: 100vw;
  --ink: #171717;
}

* {
  padding: 0;
  margin: 0;
  font-family: Millik, "SF Pro Display", "PingFang SC", Arial, sans-serif;
  font-size: 62.5%;
  -webkit-text-size-adjust: 100%;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100svh;
  background: #ffffff;
  background-image: url(./assets/image/backgrounds/grid.svg);
  background-repeat: repeat;
  background-size: 300px 300px;
}

/* Top Scroll Progress Indicator (modern-web-guidance: scroll-progress-indicator) */
#page-scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 2.5px;
  background: #171717;
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 2500;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    @keyframes grow-home-progress {
      from { transform: scaleX(0); }
      to { transform: scaleX(1); }
    }
    #page-scroll-progress {
      animation: grow-home-progress auto linear;
      animation-timeline: scroll(root block);
    }
  }
}

/* Startup Splash */
.startup-splash {
  position: fixed;
  inset: 0;
  z-index: 2600;
  background: #ffffff;
  display: grid;
  place-items: center;
  opacity: 1;
  transition: opacity 0.62s cubic-bezier(0.22, 1, 0.36, 1);
}
.startup-splash.is-fading-out { opacity: 0; pointer-events: none; }
.startup-splash-inner {
  width: min(460px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.startup-splash.is-white-stage .startup-splash-inner { opacity: 0; }

.startup-video-shell {
  width: min(400px, 82vw);
  aspect-ratio: var(--startup-video-ratio, 16 / 9);
  max-height: min(760px, 72vh);
  border: 1px solid #000000;
  overflow: hidden;
  background: #fafafa;
}
.startup-video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  opacity: 0; transform: scale(0.985);
  transition: opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1), transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}
.startup-splash.is-playing .startup-video { opacity: 1; transform: scale(1); }
.startup-splash.is-video-leaving .startup-video { opacity: 0; transform: scale(1.01); }

.startup-greeting {
  width: min(900px, 92vw);
  text-align: center;
  color: #000000;
  font-size: clamp(2.4rem, 3.8vw, 3.9rem);
  font-weight: 700;
  line-height: 1.16;
}
.startup-greeting-line { display: block; font-size: inherit; }
.startup-greeting-line + .startup-greeting-line { margin-top: 0.14em; }

.startup-progress {
  width: min(380px, 84vw);
  display: grid;
  gap: 10px;
  justify-items: center;
}
.startup-progress-track {
  width: 100%; height: 11px;
  border: 1px solid #000000;
  border-radius: 999px;
  background: #ffffff;
  overflow: hidden;
}
.startup-progress-fill {
  width: 100%; height: 100%;
  background: #000000;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.startup-bottom-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.startup-progress-text {
  color: #000000;
  font-family: "SF Pro Display", "PingFang SC", sans-serif;
  font-size: 1.3rem;
  font-weight: 500;
}
.startup-skip-btn {
  border: 1px solid #171717;
  background: #ffffff;
  color: #171717;
  border-radius: 999px;
  padding: 5px 13px;
  font-family: "SF Pro Text", "PingFang SC", sans-serif;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.startup-skip-btn:hover { background: #171717; color: #ffffff; }

/* Canvases & Top-Right Floating Actions */
#flow-canvas {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 0; opacity: 0.82;
}
#snow-canvas {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 8;
}

.top-floating-controls {
  position: fixed;
  top: max(14px, env(safe-area-inset-top, 0px));
  right: max(14px, env(safe-area-inset-right, 0px));
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 8px;
}

.circle-action-btn {
  width: 42px; height: 42px;
  border: 1px solid rgba(23, 23, 23, 0.75);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  color: #171717;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}
.circle-action-btn:hover {
  transform: translateY(-1px) scale(1.05);
  background: #171717;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(23, 23, 23, 0.16);
}
.circle-action-btn.is-active {
  background: #171717;
  color: #ffffff;
}
.circle-action-btn svg {
  width: 18px; height: 18px; display: block;
}

/* Main Hero & Panoramic Curved Gallery */
.hero-shell {
  position: relative;
  z-index: 1;
  min-height: 100svh;
}

.title {
  position: absolute;
  left: 50%;
  top: 4.6%;
  transform: translate(-50%, 0);
  width: min(92vw, 1340px);
  padding-inline: 110px;
  text-align: center;
  z-index: 3;
}
.title p {
  font-size: clamp(2.1rem, 3.6vw, 3.85rem);
  font-weight: 800;
  line-height: 1.15;
  color: #111111;
}
.section-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 4px 14px;
  border: 1px solid rgba(23, 23, 23, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(6px);
  font-family: "SF Pro Text", "PingFang SC", sans-serif;
  font-size: 1.22rem;
  color: #333333;
  letter-spacing: 0.04em;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.section-status-pill[hidden] { display: none; }

#banner {
  overflow: hidden;
  position: absolute;
  top: 11.5%;
  width: 100vw;
  height: calc(var(--post-size) / 0.72);
  -webkit-mask: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNDQwIiBoZWlnaHQ9IjUwMCIgdmlld0JveD0iMCAwIDE0NDAgNTAwIj48cGF0aCBmaWxsPSJyZ2IoMjAwLDIwMCwyMDApIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0wIDBzMjc1LjA0IDEwMCA3MjAgMTAwUzE0NDAgMCAxNDQwIDB2NTAwcy0yNzUuMDQtMTAwLTcyMC0xMDBTMCA1MDAgMCA1MDBWMHoiLz48L3N2Zz4=);
  mask: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNDQwIiBoZWlnaHQ9IjUwMCIgdmlld0JveD0iMCAwIDE0NDAgNTAwIj48cGF0aCBmaWxsPSJyZ2IoMjAwLDIwMCwyMDApIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0wIDBzMjc1LjA0IDEwMCA3MjAgMTAwUzE0NDAgMCAxNDQwIDB2NTAwcy0yNzUuMDQtMTAwLTcyMC0xMDBTMCA1MDAgMCA1MDBWMHoiLz48L3N2Zz4=);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: var(--mask-size);
  mask-size: var(--mask-size);
  touch-action: pan-x pinch-zoom;
  z-index: 1;
}

#banner .img-wrapper {
  display: flex;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding-left: calc((100vw - var(--post-size)) / 2);
  padding-right: calc((100vw - var(--post-size)) / 2);
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
#banner .img-wrapper::-webkit-scrollbar { display: none; }

#banner .img-wrapper .img-box {
  height: 100%;
  display: block;
  margin-right: var(--post-spacing);
  position: relative;
  cursor: pointer;
  flex: 0 0 auto;
  text-decoration: none;
  color: inherit;
  scroll-snap-align: center;
  overflow: hidden;
  border-inline: 1px solid rgba(23, 23, 23, 0.16);
  view-transition-class: gallery-card;
}

#banner .img-wrapper .img-box img {
  width: var(--post-size);
  height: 100%;
  object-position: var(--parallax-x, 50%) center;
  object-fit: cover;
  display: block;
  transform: scale(var(--card-img-scale, 1.02));
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
}

#banner .img-wrapper .img-box:hover img,
#banner .img-wrapper .img-box:focus-visible img {
  transform: scale(1.075);
}

#banner .img-wrapper .img-box .info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.4rem 1.8rem;
  background: rgba(23, 23, 23, var(--veil-alpha, 0.46));
  text-align: center;
  color: #fff9f1;
  transition: background-color 0.38s ease;
}

#banner .img-wrapper .img-box:hover .info {
  background: rgba(17, 17, 17, 0.34);
}

/* Artistic Printmaker Corner Registration Marks */
#banner .img-wrapper .img-box .info::before,
#banner .img-wrapper .img-box .info::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: rgba(255, 249, 241, 0.85);
  border-style: solid;
  opacity: 0;
  transform: scale(0.86);
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
#banner .img-wrapper .img-box .info::before {
  top: 22%; left: 16px;
  border-width: 1.5px 0 0 1.5px;
}
#banner .img-wrapper .img-box .info::after {
  bottom: 22%; right: 16px;
  border-width: 0 1.5px 1.5px 0;
}
#banner .img-wrapper .img-box:hover .info::before,
#banner .img-wrapper .img-box:hover .info::after,
#banner .img-wrapper .img-box.is-focal .info::before,
#banner .img-wrapper .img-box.is-focal .info::after {
  opacity: 0.88;
  transform: scale(1);
}

#banner .img-wrapper .img-box .info h3 {
  font-size: clamp(2.4rem, 2.7vw, 3.8rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.02em;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.34);
  width: fit-content;
}

#banner .img-wrapper .img-box .card-meta-pill {
  margin-top: 1rem;
  padding: 0.45rem 1.2rem;
  border: 1px solid rgba(255, 249, 241, 0.72);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.42);
  backdrop-filter: blur(4px);
  font-family: "SF Pro Text", "PingFang SC", sans-serif;
  font-size: 1.18rem;
  letter-spacing: 0.08em;
  color: #fff9f1;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
#banner .img-wrapper .img-box:hover .card-meta-pill,
#banner .img-wrapper .img-box.is-focal .card-meta-pill {
  opacity: 1;
  transform: translateY(0);
}

::view-transition-group(.gallery-card) {
  animation-duration: 0.42s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Navigation & Progress Controls */
.section-back-btn {
  position: absolute;
  left: max(18px, env(safe-area-inset-left, 0px));
  top: clamp(108px, 20vh, 186px);
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid #171717;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  color: #171717;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.94);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.24s ease, color 0.24s ease;
}
.section-back-btn.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.section-back-btn.is-hidden { opacity: 0 !important; pointer-events: none; }
.section-back-btn:hover { background: #171717; color: #ffffff; transform: scale(1.08); }
.section-back-icon { width: 26px; height: 26px; }

.btn-group {
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translate(-50%, -20%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.36s ease, transform 0.36s ease;
  opacity: 0;
  z-index: 3;
}
.btn-group .btn {
  width: 58px; height: 58px;
  border-radius: 50%;
  border: 1px solid #171717;
  background-color: rgba(255, 255, 255, 0.94);
  margin: 0 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.28s ease;
}
.btn-group .btn:hover { transform: scale(1.16); background-color: #000000; }
.btn-group .btn:hover .icon { fill: #ffffff; }
.btn-group .btn .icon { width: 28px; height: 28px; transition: fill 0.24s ease; }
.btn-group .btn .right { transform: rotate(180deg); }

.carousel-progress {
  position: absolute;
  left: 50%;
  bottom: max(1.8vh, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(80vw, 820px);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.carousel-progress.is-ready { opacity: 1; }
.btn-group.is-hidden, .carousel-progress.is-hidden { opacity: 0 !important; pointer-events: none; }
.carousel-progress-track {
  position: relative;
  flex: 1 1 auto;
  height: 9px;
  border: 1px solid #171717;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  overflow: hidden;
}
.carousel-progress-fill {
  width: 100%; height: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, #171717 0%, #4a4a4a 100%);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.carousel-progress-text {
  min-width: 72px;
  text-align: right;
  font-size: 1.4rem;
  color: #171717;
}

/* Unified Support & Author Contact Section ("轻舟已过万重山") */
.support-panel {
  position: relative;
  z-index: 1;
  width: min(90vw, 1120px);
  margin: 2vh auto 9vh;
  padding: 2rem 0 4rem;
}
.support-title {
  min-height: clamp(180px, 34vh, 380px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}
.support-title-image {
  width: min(88vw, 1080px);
  height: auto;
  display: block;
}
.support-copy {
  width: min(88vw, 980px);
  margin: 0 auto;
  padding: clamp(2rem, 3vw, 3.2rem);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(23, 23, 23, 0.14);
  backdrop-filter: blur(6px);
}
.support-copy p {
  font-family: "PingFang SC", "Noto Serif SC", "Microsoft YaHei", sans-serif;
  color: #3d3d3d;
  font-size: clamp(1.38rem, 1.25vw, 1.58rem);
  line-height: 1.95;
}
.support-copy p + p { margin-top: 1.1rem; }
.support-copy .support-copy-final {
  color: #111111;
  font-weight: 700;
  padding-left: 1.2rem;
  border-left: 3px solid #171717;
  margin-top: 1.6rem;
}
.support-contacts {
  margin-top: 2.4rem;
  padding-top: 1.8rem;
  border-top: 1px dashed rgba(23, 23, 23, 0.22);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.4rem;
}
.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.3rem;
  border: 1px solid rgba(23, 23, 23, 0.45);
  border-radius: 999px;
  background: #ffffff;
  color: #171717;
  text-decoration: none;
  font-family: "SF Pro Text", "PingFang SC", sans-serif;
  font-size: 1.28rem;
  transition: background-color 0.22s ease, color 0.22s ease, transform 0.22s ease;
}
.contact-pill span { font-size: inherit; }
.contact-pill:hover {
  background: #171717;
  color: #ffffff;
  transform: translateY(-1px);
}

.support-panel [data-reveal] {
  --reveal-progress: 1;
  opacity: calc(0.22 + var(--reveal-progress) * 0.78);
  transform: translate3d(0, calc((1 - var(--reveal-progress)) * 24px), 0);
  transition: opacity 0.2s linear, transform 0.2s linear;
}

/* Quick Index / Search Palette Dialog (modern-web-guidance: light-dismiss-a-dialog) */
dialog.index-dialog {
  width: min(92vw, 760px);
  max-height: 84svh;
  margin: auto;
  padding: 0;
  border: 1px solid #171717;
  background: #ffffff;
  color: #171717;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
}
dialog.index-dialog::backdrop {
  background: rgba(17, 17, 17, 0.52);
  backdrop-filter: blur(4px);
}
.index-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(23, 23, 23, 0.14);
}
.index-dialog-head h2 {
  font-size: 1.7rem;
  font-weight: 700;
}
.index-dialog-close {
  border: 1px solid #171717;
  background: #ffffff;
  color: #171717;
  border-radius: 999px;
  padding: 5px 13px;
  font-family: "SF Pro Text", "PingFang SC", sans-serif;
  font-size: 1.25rem;
  cursor: pointer;
}
.index-dialog-close:hover { background: #171717; color: #ffffff; }
.index-search-wrap {
  padding: 12px 20px;
  border-bottom: 1px dashed rgba(23, 23, 23, 0.16);
}
.index-search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #171717;
  font-family: "SF Pro Text", "PingFang SC", sans-serif;
  font-size: 1.4rem;
  outline: none;
}
.index-dialog-body {
  padding: 16px 20px 22px;
  overflow-y: auto;
  max-height: calc(84svh - 126px);
}
.index-group + .index-group { margin-top: 18px; }
.index-group-title {
  font-family: "SF Pro Text", "PingFang SC", sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #666666;
  margin-bottom: 8px;
}
.index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.index-card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(23, 23, 23, 0.22);
  text-decoration: none;
  color: #171717;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.index-card-link:hover {
  background: #171717;
  color: #ffffff;
  border-color: #171717;
}
.index-card-link strong { font-size: 1.35rem; font-family: "SF Pro Text", "PingFang SC", sans-serif; }
.index-card-link small { font-size: 1.12rem; opacity: 0.68; font-family: "SF Pro Text", "PingFang SC", sans-serif; }

@media (max-width: 1024px) {
  :root {
    --post-spacing: 2.2vw;
    --post-size: 32vw;
    --mask-size: 120vw;
  }
}

@media (max-width: 768px) {
  :root {
    --post-spacing: 2vw;
    --post-size: 56vw;
    --mask-size: 190vw;
  }
  .top-floating-controls {
    top: max(10px, env(safe-area-inset-top, 0px));
    right: max(10px, env(safe-area-inset-right, 0px));
    gap: 6px;
  }
  .circle-action-btn { width: 38px; height: 38px; }
  .title {
    top: 62px;
    width: 92vw;
    padding-inline: 12px;
  }
  .title p {
    font-size: clamp(1.85rem, 6.4vw, 2.7rem);
    line-height: 1.18;
    white-space: normal;
  }
  #banner { top: 20%; }
  .btn-group {
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 74px);
    transform: translate(-50%, 0);
    z-index: 4;
  }
  .btn-group .btn { width: 52px; height: 52px; margin: 0 8px; }
  .section-back-btn {
    position: fixed;
    left: max(10px, env(safe-area-inset-left, 0px));
    top: clamp(118px, 19vh, 154px);
    width: 48px; height: 48px;
  }
  .carousel-progress {
    width: min(88vw, 660px);
    bottom: max(10px, env(safe-area-inset-bottom, 0px));
  }
  .hero-shell { min-height: max(92svh, 640px); }
  #banner .img-wrapper { scroll-snap-type: x proximity; }
  .support-title { min-height: 120px; margin-top: 2rem; }
  .support-copy { width: 92vw; padding: 1.8rem 1.5rem; }
}

@media (max-width: 480px) {
  :root {
    --post-spacing: 2.2vw;
    --post-size: 74vw;
    --mask-size: 240vw;
  }
  #banner { top: 22%; }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
  .support-panel [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
