/* ==========================================================================
   影記 · LAPERGRAPHY — rebuilt site
   Pure CSS, no framework. Two themes, two galleries, one draggable rail.
   ========================================================================== */

/* ---------- Fonts ------------------------------------------------------- */
@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/Outfit.woff2?v=20261113-1") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans SC";
  src: url("../assets/fonts/NotoSansSC.woff2?v=20261113-1") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans TC";
  src: url("../assets/fonts/NotoSansTC.woff2?v=20261113-1") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------------------------------------------- */
:root {
  --bg: #14171b;
  --bg-elev: #1a1e23;
  --ink: #eef3f8;
  --ink-soft: #b3bfcb;
  --muted: #7c8895;
  --accent: #a8c6e0;
  --accent-strong: #d9ebfa;
  --accent-ink: #0f171e;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.22);
  --glass: rgba(20, 23, 27, 0.66);
  --glass-strong: rgba(20, 23, 27, 0.86);
  --photo-bg: #1e2329;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);

  --about-bg: #b6d1e7;
  --about-ink: #0e171f;
  --about-muted: #40586b;
  --about-line: rgba(10, 20, 30, 0.16);
  --about-card: rgba(255, 255, 255, 0.26);

  --font-sans: "Outfit", "Noto Sans SC", "Noto Sans TC", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  --font-cn: "Noto Sans SC", "Noto Sans TC", "PingFang SC", "Microsoft YaHei",
    sans-serif;

  --photo-h: 35vh;
  --gap: 2vh;
  --intro-w: 33vw;
  --pad-left: 30px;
  --pad-right: 100px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-strong: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html[data-theme="light"] {
  --bg: #edf2f7;
  --bg-elev: #e5ecf2;
  --ink: #131d26;
  --ink-soft: #3f4e5c;
  --muted: #6d7b88;
  --accent: #315977;
  --accent-strong: #1f425d;
  --accent-ink: #f2f7fb;
  --line: rgba(16, 35, 52, 0.12);
  --line-strong: rgba(16, 35, 52, 0.26);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.88);
  --photo-bg: #dce5ed;
  --shadow: 0 30px 80px rgba(26, 45, 64, 0.18);

  --about-bg: #2d5471;
  --about-ink: #f1f7fc;
  --about-muted: #b9d0e2;
  --about-line: rgba(255, 255, 255, 0.22);
  --about-card: rgba(255, 255, 255, 0.08);
}

/* ---------- Base -------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: none;
  scrollbar-width: none;
  -webkit-text-size-adjust: 100%;
}

html::-webkit-scrollbar {
  width: 0;
  height: 0;
}

html.lb-open {
  overflow: hidden;
}

html.about-open {
  overflow: hidden;
}

html.rail-dragging {
  cursor: grabbing;
  user-select: none;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html.theme-ready body,
html.theme-ready .date-hud,
html.theme-ready .icon-btn,
html.theme-ready .version-pill {
  transition: background-color 0.55s var(--ease), color 0.55s var(--ease),
    border-color 0.55s var(--ease);
}

/* ---------- Language modes --------------------------------------------- */
html[data-lang="zh"] [data-en],
html[data-lang="en"] [data-zh] {
  display: none !important;
}

html[data-lang="both"] .i18n-sep {
  display: inline;
}

html:not([data-lang="both"]) .i18n-sep {
  display: none !important;
}

html[data-lang="zh"] .lang-mode-en,
html[data-lang="zh"] .lang-mode-both,
html[data-lang="en"] .lang-mode-zh,
html[data-lang="en"] .lang-mode-both,
html[data-lang="both"] .lang-mode-zh,
html[data-lang="both"] .lang-mode-en {
  display: none;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  text-decoration: none;
  transition: top 0.24s var(--ease);
}

.skip-link:focus {
  top: 16px;
}

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

/* ---------- Boot overlay ------------------------------------------------ */
.boot {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: var(--bg);
  transition: opacity 0.7s var(--ease), visibility 0.7s var(--ease);
}

body.is-ready .boot {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.has-error .boot {
  opacity: 1;
  visibility: visible;
}

.boot-mark {
  width: 84px;
  height: 84px;
  color: var(--accent);
}

.boot-text {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-align: center;
}

.boot-error {
  max-width: min(420px, 80vw);
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.8;
  text-align: center;
}

.boot-error a {
  color: var(--accent);
}

/* ---------- Rotating arcs ----------------------------------------------- */
.arcs {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.arc {
  transform-origin: 200px 200px;
}

.arc-0 {
  animation: arc-spin var(--arc0-duration, 8s) linear infinite;
}
.arc-1 {
  animation: arc-spin var(--arc1-duration, 16s) linear infinite reverse;
}
.arc-2 {
  animation: arc-spin var(--arc2-duration, 32s) linear infinite;
}
.arc-3 {
  animation: arc-spin var(--arc3-duration, 64s) linear infinite reverse;
}

/* The intro mark is driven by requestAnimationFrame so speed changes never
 * reset the current rotation angle. Other arc marks keep the CSS animation. */
.intro-logo .arc {
  animation: none;
  will-change: transform;
}

.arcs-small {
  width: 44px;
  height: 44px;
}

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

/* ---------- Layout shell ------------------------------------------------ */
.app {
  display: flex;
  width: max-content;
  min-width: 100vw;
  height: 100vh;
  height: 100dvh;
}

.stage {
  display: flex;
  height: 100%;
  width: max-content;
}

/* ---------- Top chrome -------------------------------------------------- */
.chrome {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  height: 76px;
  padding: 18px 30px 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s var(--ease) 0.2s;
}

body.is-ready .chrome {
  opacity: 1;
}

.chrome > * {
  pointer-events: auto;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 2px;
  color: var(--ink);
  text-decoration: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

body.is-scrolled .brand {
  opacity: 1;
  transform: none;
}

.brand-cn {
  font-family: var(--font-cn);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.brand-en {
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.32em;
}

.rail-wrap {
  position: absolute;
  top: 20px;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transform: translateX(-50%);
}

.rail {
  position: relative;
  width: clamp(190px, 26vw, 460px);
  height: 30px;
  cursor: grab;
  touch-action: none;
  border-radius: 99px;
}

.rail:active,
.rail.is-dragging {
  cursor: grabbing;
}

.rail-track {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--line-strong);
  transform: translateY(-50%);
}

.rail-thumb {
  position: absolute;
  top: calc(50% - 1.5px);
  left: 0;
  width: 40px;
  height: 3px;
  border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(168, 198, 224, 0.35);
  will-change: transform;
  transition: height 0.2s var(--ease), top 0.2s var(--ease),
    background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

html[data-theme="light"] .rail-thumb {
  box-shadow: 0 0 10px rgba(49, 89, 119, 0.25);
}

.rail:hover .rail-thumb,
.rail:focus-visible .rail-thumb,
.rail.is-dragging .rail-thumb {
  top: calc(50% - 2.5px);
  height: 5px;
  background: var(--accent-strong);
  box-shadow: 0 0 18px rgba(168, 198, 224, 0.55);
}

.rail-grip {
  position: absolute;
  top: 50%;
  right: 0;
  width: 9px;
  height: 9px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--accent-strong);
  transform: translate(50%, -50%) scale(0);
  transition: transform 0.2s var(--ease);
}

.rail:hover .rail-grip,
.rail.is-dragging .rail-grip,
.rail:focus-visible .rail-grip {
  transform: translate(50%, -50%) scale(1);
}

.rail-tip {
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.24em;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

body.is-ready:not(.is-scrolled) .rail-tip {
  opacity: 0.62;
  transform: none;
}

.rail-tip.is-dismissed {
  opacity: 0 !important;
}

.chrome-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--glass);
  color: var(--ink-soft);
  cursor: pointer;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
    background-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.icon-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ---------- Language switch -------------------------------------------- */
.lang-switch {
  position: relative;
  display: flex;
  align-items: center;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 38px;
  padding: 0 10px;
  gap: 6px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.lang-btn svg {
  width: 15px;
  height: 15px;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 176px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

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

.lang-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-soft);
  font-family: "Outfit", var(--font-cn);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.lang-option-label {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.lang-menu button:hover {
  color: var(--ink);
  background: var(--bg-elev);
}

.lang-menu button[aria-selected="true"] {
  color: var(--accent-ink);
  background: var(--accent);
}

.lang-menu button::after {
  content: "✓";
  opacity: 0;
  font-size: 11px;
}

.lang-menu button[aria-selected="true"]::after {
  opacity: 1;
}

.icon-btn.is-theme-ticking svg {
  animation: theme-tick 0.55s var(--ease-spring);
}

@keyframes theme-tick {
  0% {
    opacity: 0.3;
    transform: rotate(-24deg) scale(0.78);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

.icon-btn .icon-sun,
.icon-btn .icon-moon {
  grid-area: 1 / 1;
}

html[data-theme="dark"] .icon-btn .icon-moon {
  display: none;
}

html[data-theme="light"] .icon-btn .icon-sun {
  display: none;
}

.version-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--glass);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
    background-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.version-pill:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.version-pill svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.version-pill small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

/* ---------- Intro column ------------------------------------------------ */
.intro {
  position: relative;
  flex: none;
  width: var(--intro-w);
  min-width: var(--intro-w);
  height: 100%;
  padding: 0 3.4vw;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-main {
  position: relative;
  top: clamp(10px, 2vh, 24px);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.intro-logo {
  position: relative;
  width: clamp(68px, 6vw, 100px);
  height: clamp(68px, 6vw, 100px);
  margin-bottom: clamp(1.4rem, 3vh, 2.6rem);
  color: var(--accent);
  cursor: pointer;
}

.intro-logo::before {
  content: "";
  position: absolute;
  inset: -16px;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--accent) 38%, transparent) 0%,
    transparent 68%
  );
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.65s var(--ease-soft), transform 0.65s var(--ease-soft);
  pointer-events: none;
}

.intro-logo.is-poked::before {
  opacity: 1;
  transform: none;
}

.intro-logo > svg {
  position: relative;
  z-index: 1;
}

.intro-logo:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 6px;
  border-radius: 50%;
}

.intro-main > * {
  opacity: 0;
  transform: translateX(26px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}

body.is-ready .intro-main > * {
  opacity: 1;
  transform: none;
}

body.is-ready .intro-main > :nth-child(1) {
  transition-delay: 0.1s;
}
body.is-ready .intro-main > :nth-child(2) {
  transition-delay: 0.18s;
}
body.is-ready .intro-main > :nth-child(3) {
  transition-delay: 0.26s;
}
body.is-ready .intro-main > :nth-child(4) {
  transition-delay: 0.34s;
}
body.is-ready .intro-main > :nth-child(5) {
  transition-delay: 0.42s;
}
body.is-ready .intro-main > :nth-child(6) {
  transition-delay: 0.5s;
}

.hero-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-cn);
  font-size: clamp(4.6rem, 7vw, 8.2rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: 0.04em;
  writing-mode: vertical-rl;
  text-orientation: upright;
  text-indent: 0.06em;
}

.hero-bracket {
  color: var(--accent);
  font-weight: 200;
  font-size: 0.78em;
}

.hero-en {
  margin: clamp(1.2rem, 2.6vh, 2rem) 0 0;
  color: var(--muted);
  font-family: "Outfit", sans-serif;
  font-size: clamp(0.62rem, 0.75vw, 0.74rem);
  font-weight: 600;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
}

.hero-cn {
  margin: clamp(2rem, 4vh, 3.2rem) 0 0;
  color: var(--ink-soft);
  font-family: var(--font-cn);
  font-size: clamp(0.76rem, 0.95vw, 0.9rem);
  font-weight: 400;
  letter-spacing: 0.2em;
}

.hero-en2 {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: clamp(0.64rem, 0.8vw, 0.72rem);
  font-weight: 300;
  letter-spacing: 0.04em;
}

.about-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(2.2rem, 4.6vh, 3.6rem);
  padding: 9px 16px 9px 18px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  cursor: pointer;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease),
    background-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.about-toggle:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--glass);
  transform: translateY(-1px);
}

.about-toggle svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
  transition: transform 0.5s var(--ease);
}

.intro.is-about-open .about-toggle svg {
  transform: rotate(180deg);
}

/* ---------- About panel ------------------------------------------------- */
.about-panel {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  background: var(--about-bg);
  color: var(--about-ink);
  transform: translateY(101%);
  transition: transform 0.75s var(--ease-strong),
    background-color 0.55s var(--ease), color 0.55s var(--ease);
  overflow: hidden;
  will-change: transform;
}

.intro.is-about-open .about-panel {
  transform: translateY(0);
}

.about-close {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--about-line);
  border-radius: 50%;
  background: transparent;
  color: var(--about-ink);
  cursor: pointer;
  transition: background-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.about-close:hover {
  background: var(--about-card);
  transform: rotate(90deg);
}

.about-close svg {
  width: 17px;
  height: 17px;
}

.about-scroll {
  height: 100%;
  overflow-y: auto;
  padding: clamp(3.4rem, 6vh, 5rem) clamp(1.8rem, 3.4vw, 3.4rem)
    clamp(2.6rem, 5vh, 4rem);
  scrollbar-width: thin;
  scrollbar-color: var(--about-muted) transparent;
  overscroll-behavior: contain;
}

.about-scroll > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.intro.is-about-open .about-scroll > * {
  opacity: 1;
  transform: none;
}

.intro.is-about-open .about-scroll > :nth-child(1) {
  transition-delay: 0.12s;
}
.intro.is-about-open .about-scroll > :nth-child(2) {
  transition-delay: 0.17s;
}
.intro.is-about-open .about-scroll > :nth-child(3) {
  transition-delay: 0.22s;
}
.intro.is-about-open .about-scroll > :nth-child(4) {
  transition-delay: 0.27s;
}
.intro.is-about-open .about-scroll > :nth-child(5) {
  transition-delay: 0.32s;
}
.intro.is-about-open .about-scroll > :nth-child(6) {
  transition-delay: 0.37s;
}
.intro.is-about-open .about-scroll > :nth-child(7) {
  transition-delay: 0.42s;
}
.intro.is-about-open .about-scroll > :nth-child(8) {
  transition-delay: 0.47s;
}

.about-scroll::-webkit-scrollbar {
  width: 4px;
}

.about-scroll::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: var(--about-muted);
}

.about-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 clamp(2.3rem, 4.5vh, 3.2rem);
  color: var(--about-muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.28em;
}

.about-kicker .about-kicker-badge {
  padding: 2px 7px;
  border: 1px solid var(--about-line);
  border-radius: 99px;
  font-size: 7px;
  letter-spacing: 0.1em;
}

.about-logos {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(1.4rem, 2.6vh, 2rem);
  opacity: 0.9;
}

.about-logos img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

html[data-theme="dark"] .logo-when-light,
html[data-theme="light"] .logo-when-dark {
  display: none !important;
}

.about-scroll h2 {
  margin: 0;
  font-family: "Outfit", var(--font-cn);
  font-size: clamp(1.7rem, 2.5vw, 2.3rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.about-scroll p {
  margin: 0.42rem 0 0;
  font-family: "Outfit", var(--font-cn);
  font-size: clamp(0.78rem, 0.95vw, 0.9rem);
  line-height: 1.75;
  letter-spacing: 0.02em;
}

/* `p` above would otherwise reset the kicker's bottom margin. */
.about-scroll > .about-kicker {
  margin: 0 0 clamp(2.3rem, 4.5vh, 3.2rem);
}

.about-en {
  color: var(--about-muted) !important;
  font-family: "Outfit", var(--font-cn) !important;
  font-size: 0.76rem !important;
  font-weight: 300 !important;
  letter-spacing: 0.02em !important;
}

/* In English-only mode the English lines become the primary copy. */
html[data-lang="en"] .about-scroll p.about-en:not(.about-title-en) {
  color: var(--about-ink) !important;
  font-size: clamp(0.78rem, 0.95vw, 0.9rem) !important;
  font-weight: 400 !important;
  line-height: 1.75;
}

html[data-lang="en"] .about-scroll .about-title-en {
  margin-top: 0;
  color: var(--about-ink) !important;
  font-family: "Outfit", var(--font-cn) !important;
  font-size: clamp(1.7rem, 2.5vw, 2.3rem) !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em !important;
}

.about-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: clamp(1.6rem, 3vh, 2.4rem) 0;
  border: 1px solid var(--about-line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--about-line);
}

.about-links > * {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--about-bg);
  color: var(--about-ink);
  text-decoration: none;
  transition: background-color 0.25s var(--ease);
}

.about-links a:hover {
  background: var(--about-card);
}

.link-label {
  color: var(--about-muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.link-value {
  font-family: "Outfit", var(--font-cn);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.about-note {
  margin: clamp(1.4rem, 2.6vh, 2rem) 0;
  padding: 14px 16px;
  border-left: 2px solid var(--about-ink);
  background: var(--about-card);
  border-radius: 0 8px 8px 0;
}

.about-note p:first-child {
  margin-top: 0;
}

.about-thanks {
  color: var(--about-ink);
}

.about-scroll a {
  color: var(--about-ink);
  text-decoration-color: var(--about-muted);
  text-underline-offset: 3px;
}

.about-fine {
  margin-top: clamp(1.2rem, 2.4vh, 1.8rem) !important;
  color: var(--about-muted) !important;
  font-size: 0.7rem !important;
}

.about-version {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: clamp(2rem, 4vh, 3rem);
  padding-top: 1.2rem;
  border-top: 1px solid var(--about-line);
  color: var(--about-muted);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.about-version a {
  color: var(--about-ink);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.about-version a:hover {
  text-decoration: underline;
}

/* ---------- Gallery ----------------------------------------------------- */
.gallery {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: max-content;
  height: 100%;
  padding: 0 var(--pad-right) 0 var(--pad-left);
}

.gallery-inner {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  width: max-content;
}

.flow {
  display: flex;
  gap: var(--gap);
  width: max-content;
  height: var(--photo-h);
}

.photo {
  position: relative;
  flex: none;
  display: block;
  width: calc(var(--photo-h) * var(--ratio));
  height: 100%;
  overflow: hidden;
  background: var(--photo-bg);
  color: #fff;
  text-decoration: none;
  opacity: 1;
  transition: transform 0.55s var(--ease), box-shadow 0.55s var(--ease);
}

.photo:hover,
.photo:focus-visible {
  z-index: 2;
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

html[data-theme="light"] .photo:hover,
html[data-theme="light"] .photo:focus-visible {
  box-shadow: 0 18px 40px rgba(26, 45, 64, 0.16);
}

.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.photo-media {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}

.photo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.035);
  filter: blur(6px);
  transition: opacity 0.55s var(--ease), transform 0.9s var(--ease),
    filter 0.9s var(--ease);
  user-select: none;
  -webkit-user-drag: none;
}

.photo.is-loaded .photo-img {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

.photo:hover .photo-img,
.photo:focus-visible .photo-img {
  transform: scale(1.025);
}

.photo:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: -2px;
}

.photo-skeleton {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    100deg,
    var(--photo-bg) 20%,
    rgba(255, 255, 255, 0.06) 40%,
    var(--photo-bg) 60%
  );
  background-size: 250% 100%;
  animation: skeleton 2.2s var(--ease-soft) infinite;
}

.photo.is-loaded .photo-skeleton,
.photo.is-error .photo-skeleton {
  opacity: 0;
  animation: none;
  transition: opacity 0.4s var(--ease);
}

@keyframes skeleton {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

.photo-ui {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.62) 0%,
    rgba(0, 0, 0, 0.18) 34%,
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

.photo:hover .photo-ui,
.photo:focus-visible .photo-ui {
  opacity: 1;
}

.photo-caption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.45s var(--ease);
}

.photo:hover .photo-caption,
.photo:focus-visible .photo-caption {
  opacity: 1;
  transform: none;
}

.photo-date {
  font-family: "Outfit", sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.photo-name {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.62);
  font-family: "Outfit", sans-serif;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-expand {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(10, 14, 18, 0.28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease-spring);
}

.photo:hover .photo-expand,
.photo:focus-visible .photo-expand {
  opacity: 1;
  transform: none;
}

.photo-expand svg {
  width: 16px;
  height: 16px;
}

.photo-fallback {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 56px;
  height: 56px;
  color: var(--muted);
  opacity: 0;
  transform: translate(-50%, -50%);
}

.photo.is-error .photo-fallback {
  opacity: 0.7;
}

/* ---------- Scroll hint ------------------------------------------------- */
.scroll-hint {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 44;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.24em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  pointer-events: none;
}

body.is-ready:not(.is-scrolled) .scroll-hint {
  opacity: 0.62;
  transform: none;
}

.scroll-hint-line {
  display: block;
  width: 34px;
  height: 1px;
  background: var(--line-strong);
}

.scroll-hint svg {
  width: 12px;
  height: 12px;
  transform: rotate(-90deg);
  animation: hint-nudge 2.4s var(--ease-soft) infinite;
}

@keyframes hint-nudge {
  0%,
  100% {
    transform: translateX(0) rotate(-90deg);
  }
  50% {
    transform: translateX(6px) rotate(-90deg);
  }
}

/* ---------- Outro ------------------------------------------------------- */
.outro {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: var(--intro-w);
  min-width: var(--intro-w);
  height: 100%;
  padding: 0 3.4vw;
  text-align: center;
}

.outro > * {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
  pointer-events: none;
}

.outro.is-visible > * {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.outro.is-visible > :nth-child(1) {
  transition-delay: 0.04s;
}
.outro.is-visible > :nth-child(2) {
  transition-delay: 0.1s;
}
.outro.is-visible > :nth-child(3) {
  transition-delay: 0.16s;
}
.outro.is-visible > :nth-child(4) {
  transition-delay: 0.22s;
}
.outro.is-visible > :nth-child(5) {
  transition-delay: 0.28s;
}
.outro.is-visible > :nth-child(6) {
  transition-delay: 0.34s;
}
.outro.is-visible > :nth-child(7) {
  transition-delay: 0.4s;
}
.outro.is-visible > :nth-child(8) {
  transition-delay: 0.46s;
}

.outro-logo {
  width: clamp(64px, 5.4vw, 88px);
  height: clamp(64px, 5.4vw, 88px);
  margin-bottom: clamp(1.4rem, 3vh, 2.2rem);
  color: var(--accent);
}

.outro-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-cn);
  font-size: clamp(2.8rem, 4.4vw, 5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.06em;
}

.outro-en {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
}

.outro-line {
  margin: clamp(2rem, 4vh, 3rem) 0 0;
  color: var(--ink-soft);
  font-family: "Outfit", var(--font-cn);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
}

.outro-badges {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 68px;
  margin-top: clamp(1.6rem, 3vh, 2.4rem);
}

.outro-badges img {
  height: 58px;
  width: auto;
  object-fit: contain;
}

.back-to-start {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(2rem, 4vh, 3rem);
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: transparent;
  color: var(--ink-soft);
  font-family: "Outfit", var(--font-cn);
  font-size: 9px;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
    background-color 0.25s var(--ease), transform 0.3s var(--ease);
}

.back-to-start:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--glass);
  transform: translateY(-1px);
}

.back-to-start svg {
  width: 13px;
  height: 13px;
  color: var(--accent);
}

.outro-fine {
  margin: clamp(2rem, 4vh, 3.2rem) 0 0;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.1em;
}

/* ---------- Date HUD ---------------------------------------------------- */
.date-hud {
  position: fixed;
  bottom: max(20px, 3vh);
  left: 50%;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 99px;
  background: transparent;
  transform: translate(-50%, 14px);
  opacity: 0;
  transition: opacity 0.7s var(--ease) 0.25s,
    transform 0.7s var(--ease) 0.25s, background-color 0.3s var(--ease),
    border-color 0.3s var(--ease);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.date-hud,
.date-hud * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

body.is-ready .date-hud {
  opacity: 1;
  transform: translate(-50%, 0);
}

.date-hud:hover,
.date-hud:focus-within {
  border-color: var(--line);
  background: var(--glass);
}

.date-read {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 0 6px;
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.2rem, 1.7vw, 1.7rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.date-read.is-ticking {
  animation: hud-tick 0.45s var(--ease);
}

@keyframes hud-tick {
  0% {
    opacity: 0.35;
    transform: translateY(5px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

#dateYear {
  color: var(--ink-soft);
  font-weight: 300;
  font-size: 0.78em;
}

#dateMonth {
  color: var(--ink);
  font-weight: 800;
}

.date-arrow {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  opacity: 0.28;
  transition: opacity 0.25s var(--ease), background-color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.date-hud:hover .date-arrow,
.date-hud:focus-within .date-arrow {
  opacity: 0.9;
}

.date-arrow:hover:not(:disabled) {
  background: var(--glass-strong);
  transform: scale(1.06);
}

.date-arrow:disabled {
  cursor: default;
  opacity: 0.1 !important;
}

.date-arrow svg {
  width: 17px;
  height: 17px;
}

.counter {
  margin-left: 4px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-family: "Outfit", sans-serif;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

body.lightbox-open .date-hud,
body.about-open .date-hud,
body.lightbox-open .scroll-hint,
body.about-open .scroll-hint {
  opacity: 0 !important;
  pointer-events: none;
}

/* ---------- Lightbox ---------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lb-backdrop {
  position: absolute;
  inset: 0;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(34px) saturate(0.92);
  backdrop-filter: blur(34px) saturate(0.92);
}

.lb-close {
  position: fixed;
  top: max(20px, 3vh);
  right: max(20px, 3vw);
  z-index: 4;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--glass);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.25s var(--ease),
    transform 0.35s var(--ease-spring);
}

.lb-close:hover {
  background: var(--bg-elev);
  transform: rotate(90deg) scale(1.04);
}

.lb-close svg {
  width: 18px;
  height: 18px;
}

.lb-nav {
  position: fixed;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--glass);
  color: var(--ink-soft);
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
    background-color 0.25s var(--ease), opacity 0.25s var(--ease),
    transform 0.3s var(--ease-spring);
}

.lb-nav:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--bg-elev);
  transform: translateY(-50%) scale(1.06);
}

.lb-nav:disabled {
  opacity: 0.18;
  cursor: default;
}

.lb-nav svg {
  width: 22px;
  height: 22px;
}

.lb-prev {
  left: max(18px, 3vw);
}

.lb-next {
  right: max(18px, 3vw);
}

.lb-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 86vw;
  margin: 0;
  transform: translateY(16px) scale(0.99);
  transition: transform 0.55s var(--ease);
}

.lightbox.is-open .lb-stage {
  transform: none;
}

.lb-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: min(52vw, 640px);
  min-height: 36vh;
  max-width: 86vw;
  max-height: 72vh;
}

.lb-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 86vw;
  max-height: 72vh;
  opacity: 0;
  transform: scale(0.985);
  filter: blur(6px);
  box-shadow: var(--shadow);
  transition: opacity 0.55s var(--ease), transform 0.65s var(--ease),
    filter 0.65s var(--ease);
}

.lb-image.is-loaded {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

.lb-loader {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.3em;
  transition: opacity 0.4s var(--ease);
}

.lb-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.lb-arcs {
  width: 66px;
  height: 66px;
  color: var(--accent);
}

.lb-error {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 12px;
  text-align: center;
}

.lb-error a {
  color: var(--accent);
}

.lb-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 26px;
  width: 100%;
  max-width: 86vw;
  margin-top: 16px;
  padding: 0 2px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.lightbox.is-open .lb-caption {
  opacity: 1;
  transform: none;
  transition-delay: 0.12s;
}

.lb-headline {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.lb-date {
  color: var(--ink);
  font-family: "Outfit", sans-serif;
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.lb-time {
  color: var(--muted);
  font-family: "Outfit", sans-serif;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.lb-name {
  overflow: hidden;
  color: var(--muted);
  font-family: "Outfit", sans-serif;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-details {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 9px;
}

.lb-details span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.lb-details i {
  font-style: normal;
  font-size: 8px;
  letter-spacing: 0.12em;
  opacity: 0.7;
}

.lb-details b {
  color: var(--ink-soft);
  font-family: "Outfit", sans-serif;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.lb-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

.lb-action {
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-family: "Outfit", var(--font-cn);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.22s var(--ease);
}

.lb-action::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.25s var(--ease), transform 0.3s var(--ease);
}

.lb-action:hover {
  color: var(--ink);
}

.lb-action:hover::after {
  opacity: 0.6;
  transform: none;
}

/* ---------- Toast ------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 98px;
  left: 50%;
  z-index: 110;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--ink);
  color: var(--bg);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  pointer-events: none;
  white-space: nowrap;
}

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

/* ---------- Admin (visible only on the local helper) -------------------- */
.admin-only {
  display: none;
}

body.has-admin .admin-only {
  display: grid;
}

/* ---------- Noscript ---------------------------------------------------- */
.noscript {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 2;
  text-align: center;
}

/* ---------- Responsive -------------------------------------------------- */
@media (orientation: portrait) {
  :root {
    --photo-h: 32vh;
    --gap: 1.7vh;
    --intro-w: 62vw;
    --pad-left: 18px;
    --pad-right: 54px;
  }

  .chrome {
    height: auto;
    min-height: 66px;
    padding: 12px 16px 8px;
    flex-wrap: wrap;
    align-items: center;
  }

  .brand {
    display: none;
  }

  .rail-wrap {
    position: static;
    order: 3;
    flex: 0 0 100%;
    margin-top: 4px;
    transform: none;
  }

  .rail {
    width: 56vw;
    height: 26px;
  }

  .rail-tip {
    display: none;
  }

  .chrome-actions {
    gap: 7px;
  }

  .icon-btn {
    width: 34px;
    height: 34px;
  }

  .lang-btn {
    width: auto;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    gap: 4px;
    font-size: 8px;
  }

  .lang-btn svg {
    width: 13px;
    height: 13px;
  }

  .lang-menu {
    top: calc(100% + 8px);
    min-width: 176px;
  }

  .version-pill {
    height: 34px;
    padding: 0 11px 0 9px;
    font-size: 9px;
    gap: 5px;
  }

  .version-pill small {
    display: none;
  }

  .intro {
    padding: 0 7vw;
    overflow: visible;
  }

  .about-panel {
    position: fixed;
    inset: 0;
    z-index: 80;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
  }

  .about-panel .about-close {
    top: 16px;
    right: 16px;
    z-index: 82;
  }

  .about-scroll {
    max-width: 620px;
    margin: 0 auto;
    padding: 4.2rem 1.6rem 2.4rem;
  }

  .intro-logo {
    width: 62px;
    height: 62px;
    margin-bottom: 1.5rem;
  }

  .hero-title {
    font-size: clamp(3.6rem, 17vw, 5.4rem);
  }

  .hero-en {
    margin-top: 1.2rem;
    font-size: 0.58rem;
    letter-spacing: 0.34em;
    text-indent: 0.34em;
  }

  .hero-cn {
    margin-top: 1.8rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }

  .hero-en2 {
    font-size: 0.58rem;
    max-width: 48vw;
    line-height: 1.6;
  }

  .about-toggle {
    margin-top: 2rem;
    padding: 8px 13px;
    font-size: 8px;
  }

  .about-scroll {
    padding: 3.2rem 1.4rem 2rem;
  }

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

  .about-logos img {
    width: 32px;
    height: 32px;
  }

  .date-hud {
    bottom: 14px;
    gap: 2px;
    padding: 5px 6px;
  }

  .date-read {
    font-size: 1.2rem;
    gap: 5px;
    padding: 0 4px;
  }

  .date-arrow {
    width: 28px;
    height: 28px;
  }

  .counter {
    display: none;
  }

  .scroll-hint {
    display: none;
  }

  .lb-close {
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
  }

  .lb-nav {
    width: 40px;
    height: 40px;
  }

  .lb-prev {
    left: 10px;
  }

  .lb-next {
    right: 10px;
  }

  .lb-media,
  .lb-image {
    max-width: 92vw;
    max-height: 60vh;
  }

  .lb-media {
    min-width: 76vw;
  }

  .lb-caption {
    max-width: 92vw;
    gap: 8px 16px;
    margin-top: 12px;
  }

  .lb-details {
    display: none;
  }

  .lb-actions {
    gap: 14px;
  }

  .lb-action {
    font-size: 8px;
  }

  .toast {
    bottom: 76px;
    max-width: 86vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .outro-badges {
    gap: 10px;
  }

  .outro-badges img {
    height: 46px;
  }
}

@media (orientation: landscape) and (max-height: 620px) {
  .intro-main {
    top: 0;
  }

  .intro {
    padding: 0 2vw;
  }

  .intro-logo {
    width: clamp(38px, 5.5vw, 52px);
    height: clamp(38px, 5.5vw, 52px);
    margin-bottom: 0.7rem;
  }

  .hero-title {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
  }

  .hero-en {
    margin-top: 0.55rem;
    font-size: 0.52rem;
    letter-spacing: 0.3em;
    text-indent: 0.3em;
  }

  .hero-cn {
    margin-top: 0.9rem;
    font-size: 0.66rem;
    letter-spacing: 0.12em;
  }

  .hero-en2 {
    font-size: 0.55rem;
    line-height: 1.4;
  }

  .about-toggle {
    margin-top: 1rem;
    padding: 7px 13px;
    font-size: 8px;
  }

  .rail-tip,
  .scroll-hint {
    display: none;
  }

  .outro-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 0.8rem;
  }

  .outro-title {
    font-size: 2.2rem;
  }

  .outro-line {
    margin-top: 1rem;
  }

  .outro-badges {
    margin-top: 0.8rem;
  }

  .outro-badges img {
    height: 38px;
  }

  .back-to-start {
    margin-top: 1rem;
    padding: 7px 12px;
    font-size: 8px;
  }

  .outro-fine {
    margin-top: 1rem;
  }
}

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