:root,
[data-theme="dark"] {
  --bg: #0b0b0e;
  --header-bg: rgba(11, 11, 14, 0.78);
  --header-bg-solid: rgba(11, 11, 14, 0.94);
  --surface: #121217;
  --surface-elevated: #17171e;
  --surface-subtle: #0f0f13;
  --surface-hover: #1c1c24;
  --pedestal-bg: #14141a;
  --pedestal-dot: rgba(244, 242, 237, 0.1);
  --ink: #f4f2ed;
  --ink-secondary: #a7a298;
  --ink-muted: #706c64;
  --line: rgba(244, 242, 237, 0.1);
  --line-strong: rgba(244, 242, 237, 0.24);
  --accent: #e0a54e;
  --accent-soft: rgba(224, 165, 78, 0.14);
  --mythic: #e05a4d;
  --selection-bg: rgba(224, 165, 78, 0.28);
  --thumb-active-border: #e0a54e;
  --thumb-active-bg: rgba(224, 165, 78, 0.09);
  --thumb-active-shadow: none;
  --card-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
  --wrap: 1140px;
  --gutter: clamp(18px, 4vw, 40px);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

[data-theme="light"] {
  --bg: #f5f2eb;
  --header-bg: rgba(245, 242, 235, 0.84);
  --header-bg-solid: rgba(245, 242, 235, 0.96);
  --surface: #fcfbf8;
  --surface-elevated: #ffffff;
  --surface-subtle: #eeebe2;
  --surface-hover: #e5e0d4;
  --pedestal-bg: #fcfbf8;
  --pedestal-dot: rgba(22, 22, 24, 0.13);
  --ink: #161619;
  --ink-secondary: #524f48;
  --ink-muted: #7d7970;
  --line: rgba(22, 22, 25, 0.11);
  --line-strong: rgba(22, 22, 25, 0.26);
  --accent: #a66a14;
  --accent-soft: rgba(166, 106, 20, 0.12);
  --mythic: #b83a2d;
  --selection-bg: rgba(166, 106, 20, 0.18);
  --thumb-active-border: #161619;
  --thumb-active-bg: #fcfbf8;
  --thumb-active-shadow: inset 0 0 0 1px #161619;
  --card-shadow: 0 18px 46px rgba(22, 20, 15, 0.08);
}

/* Per-game signature accent tokens */
[data-game="cylinder"],
.hero-stage[data-active="cylinder"] { --game-accent: #e5a342; --game-accent-soft: rgba(229, 163, 66, 0.16); }

[data-game="jueming"],
.hero-stage[data-active="jueming"] { --game-accent: #e5584b; --game-accent-soft: rgba(229, 88, 75, 0.17); }

[data-game="changxingtang"],
.hero-stage[data-active="changxingtang"] { --game-accent: #c89b5a; --game-accent-soft: rgba(200, 155, 90, 0.18); }

[data-theme="light"] [data-game="cylinder"] { --game-accent: #b36f11; --game-accent-soft: rgba(179, 111, 17, 0.12); }

[data-theme="light"] [data-game="jueming"] { --game-accent: #c1392d; --game-accent-soft: rgba(193, 57, 45, 0.11); }

[data-theme="light"] [data-game="changxingtang"] { --game-accent: #8f6327; --game-accent-soft: rgba(143, 99, 39, 0.12); }

*,
*::before,
*::after { box-sizing: border-box; }

html {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--ink);
  overflow-x: clip;
  transition: background-color 0.22s ease, color 0.22s ease;
}

body.lightbox-open { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

::selection { background: var(--selection-bg); color: var(--ink); }

.logo-for-light { display: none; }
[data-theme="light"] .logo-for-dark { display: none; }
[data-theme="light"] .logo-for-light { display: block; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

.ext-arrow { display: inline-block; margin-left: 4px; font-size: 0.92em; transition: transform 0.2s ease; }

a:hover .ext-arrow { transform: translate(2px, -2px); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.site-header.is-scrolled { background: var(--header-bg-solid); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16); }

.header-inner {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.96;
  transition: opacity 0.2s ease;
}

.brand-link:hover { opacity: 1; }
.brand-link img { height: 38px; width: auto; }

.site-nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 28px); }

.site-nav a {
  font-size: 14px;
  letter-spacing: 0.03em;
  color: var(--ink-secondary);
  position: relative;
  padding-block: 4px;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.site-nav a:not(.nav-pill)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s ease;
}

.site-nav a:not(.nav-pill):hover { color: var(--ink); }
.site-nav a:not(.nav-pill):hover::after { transform: scaleX(1); }

.site-nav .nav-pill {
  padding: 6px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface-subtle);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.site-nav .nav-pill:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ink-secondary);
  flex-shrink: 0;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.theme-toggle:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface-hover); }

.theme-icon {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
  transition: transform 0.28s ease;
}

[data-theme="light"] .theme-icon { transform: rotate(180deg); }

/* Editorial dots */
.px-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  flex-shrink: 0;
}

.px-dot-accent,
.px-dot-game { background: var(--game-accent, #e5a342); }

/* Cinematic Full-Bleed Showcase Hero */
.hero-stage {
  position: relative;
  min-height: clamp(560px, 78vh, 720px);
  display: flex;
  align-items: stretch;
  background: #0a0a0d;
  color: #f6f4ef;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-backdrops { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.hero-bg-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), transform 7.5s linear;
}

.hero-bg-layer.is-active { opacity: 1; transform: scale(1); }

.hero-bg-layer img { width: 100%; height: 100%; object-fit: cover; object-position: center 44%; }

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 42%, rgba(9, 9, 12, 0.24) 0%, rgba(9, 9, 12, 0.82) 78%),
    linear-gradient(90deg, rgba(9, 9, 13, 0.92) 0%, rgba(9, 9, 13, 0.68) 46%, rgba(9, 9, 13, 0.32) 100%),
    linear-gradient(to top, rgba(9, 9, 13, 0.96) 0%, rgba(9, 9, 13, 0.22) 44%, rgba(9, 9, 13, 0.56) 100%);
}

.hero-grid-tex {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 24px 24px;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: clamp(26px, 4.2vh, 42px);
  padding-bottom: clamp(24px, 4vh, 36px);
  gap: clamp(28px, 4vh, 42px);
}

.hero-top-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.hero-studio-eyebrow {
  margin: 0;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: rgba(246, 244, 239, 0.78);
}

.hero-studio-eyebrow .sep { opacity: 0.45; }

.hero-slide-counter { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; color: rgba(246, 244, 239, 0.62); }

.hero-spotlight { max-width: 680px; transition: opacity 0.26s ease, transform 0.26s ease; }

.hero-spotlight.is-switching { opacity: 0.18; transform: translateY(6px); }

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.hero-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #111013;
  background: var(--game-accent, #e5a342);
  font-weight: 600;
}

.hero-genre-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(246, 244, 239, 0.24);
  background: rgba(12, 12, 16, 0.48);
  backdrop-filter: blur(8px);
  font-size: 12px;
  color: rgba(246, 244, 239, 0.88);
}

.hero-game-title {
  margin: 0;
  font-size: clamp(2.1rem, 4.9vw, 3.85rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.015em;
  color: #faf8f4;
  text-shadow: 0 6px 28px rgba(0, 0, 0, 0.6);
}

.hero-game-tagline {
  margin: 16px 0 0;
  max-width: 560px;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.82;
  color: rgba(246, 244, 239, 0.84);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 6px;
  background: var(--game-accent, #e5a342);
  color: #111013;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 14px 36px rgba(0, 0, 0, 0.48); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 6px;
  border: 1px solid rgba(246, 244, 239, 0.28);
  background: rgba(12, 12, 16, 0.5);
  backdrop-filter: blur(8px);
  color: #f6f4ef;
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.btn-ghost:hover { border-color: rgba(246, 244, 239, 0.65); background: rgba(246, 244, 239, 0.12); }

/* 3-Game Switcher Dock */
.hero-dock { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.hero-dock-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px 15px;
  border-radius: 8px;
  border: 1px solid rgba(246, 244, 239, 0.14);
  background: rgba(14, 14, 18, 0.66);
  backdrop-filter: blur(12px);
  text-align: left;
  color: rgba(246, 244, 239, 0.78);
  overflow: hidden;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.hero-dock-btn:hover { border-color: rgba(246, 244, 239, 0.34); background: rgba(22, 22, 28, 0.8); color: #faf8f4; }

.hero-dock-btn.is-active {
  border-color: var(--game-accent, #e5a342);
  background: rgba(24, 24, 30, 0.9);
  color: #faf8f4;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

.dock-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
  background: #141418;
}

.dock-icon img { width: 100%; height: 100%; object-fit: cover; }

.dock-copy { display: flex; flex-direction: column; min-width: 0; gap: 2px; }

.dock-meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: rgba(246, 244, 239, 0.56); }

.hero-dock-btn.is-active .dock-meta { color: var(--game-accent, #e5a342); }

.dock-name {
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dock-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.5px;
  background: rgba(255, 255, 255, 0.08);
}

.dock-progress i { display: block; width: 0; height: 100%; background: var(--game-accent, #e5a342); }

.hero-dock-btn.is-active .dock-progress i { animation: heroProgress 7s linear forwards; }

.hero-stage.is-paused .hero-dock-btn.is-active .dock-progress i { animation-play-state: paused; }

@keyframes heroProgress {
  from { width: 0%; }
  to { width: 100%; }
}

/* Studio Pulse Strip */
.pulse-band { border-bottom: 1px solid var(--line); background: var(--surface); }

.pulse-inner {
  padding-block: clamp(24px, 3.6vw, 36px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
}

.pulse-headline {
  margin: 0;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.pulse-sub { margin: 8px 0 0; font-size: 14px; line-height: 1.8; color: var(--ink-secondary); }

.pulse-stats {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.pulse-stats dt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.pulse-stats dd { margin: 0; display: flex; flex-direction: column; gap: 2px; }

.pulse-stats strong {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--accent);
}

.pulse-stats span { font-size: 12px; color: var(--ink-secondary); }

/* Sections */
.section { padding-top: clamp(56px, 7.5vw, 92px); scroll-margin-top: 72px; }

.section-studio { padding-bottom: clamp(64px, 8.5vw, 104px); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 24px;
  padding-top: 20px;
  margin-bottom: clamp(26px, 3.8vw, 40px);
  border-top: 1px solid var(--line);
}

.section-index {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 4px;
}

.section-title {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.works-quick-nav { display: flex; flex-wrap: wrap; gap: 8px; }

.works-quick-nav a {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12.5px;
  color: var(--ink-secondary);
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.works-quick-nav a:hover { border-color: var(--accent); color: var(--ink); background: var(--surface-hover); }

/* Scroll reveal */
.reveal { opacity: 1; transform: none; }

.js-reveal .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

/* Featured Work Card */
.project-feature {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  scroll-margin-top: 86px;
  transition: background-color 0.22s ease, border-color 0.22s ease;
}

.project-feature + .project-feature { margin-top: clamp(36px, 5vw, 60px); }

.keyart-frame {
  margin: 0;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 8.2;
  background: #0d0c10;
  border-bottom: 1px solid var(--line);
}

.keyart-frame > picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-feature:hover .keyart-frame > picture img { transform: scale(1.022); }

.keyart-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: clamp(34px, 5vw, 58px) clamp(20px, 3.4vw, 34px) clamp(18px, 2.8vw, 28px);
  background: linear-gradient(
    to top,
    rgba(10, 10, 13, 0.96) 0%,
    rgba(10, 10, 13, 0.72) 56%,
    rgba(10, 10, 13, 0) 100%
  );
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.keyart-identity { display: flex; align-items: center; gap: 16px; min-width: 0; }

.project-app-icon {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.52);
  flex-shrink: 0;
  background: #141418;
}

.project-app-icon img { width: 100%; height: 100%; object-fit: cover; }

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--game-accent, #e5a342);
  margin-bottom: 6px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}

.project-title {
  margin: 0;
  font-size: clamp(1.55rem, 2.9vw, 2.35rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.15;
  color: #faf8f4;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.72);
}

.keyart-genre {
  margin: 6px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(246, 244, 239, 0.72);
}

.keyart-cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: 6px;
  background: rgba(250, 248, 244, 0.12);
  border: 1px solid rgba(250, 248, 244, 0.28);
  backdrop-filter: blur(8px);
  color: #faf8f4;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.keyart-cta:hover { background: var(--game-accent, #e5a342); border-color: var(--game-accent, #e5a342); color: #111013; }

/* Dossier 2-column */
.dossier-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.96fr); }

.dossier-copy {
  padding: clamp(22px, 3.4vw, 34px);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.dossier-hook {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.65;
  color: var(--ink);
}

.dossier-desc { margin: 12px 0 0; font-size: 14.5px; line-height: 1.88; color: var(--ink-secondary); }

.dossier-bottom { display: flex; flex-direction: column; gap: 18px; }

.spec-table { margin: 0; border-top: 1px solid var(--line); }

.spec-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  align-items: baseline;
}

.spec-row dt { color: var(--ink-muted); }
.spec-row dd { margin: 0; color: var(--ink); }

.taptap-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 6px;
  border: 1px solid var(--game-accent, var(--line-strong));
  background: var(--game-accent-soft, transparent);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.taptap-action:hover { background: var(--game-accent, var(--ink)); border-color: var(--game-accent, var(--ink)); color: #111013; }

/* Interactive Archive */
.specimen-box {
  padding: clamp(22px, 3.4vw, 34px);
  background: var(--surface-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}

.specimen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.specimen-caption { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--ink-muted); }

.specimen-tabs { display: inline-flex; gap: 18px; }

.tab-btn {
  font-size: 13px;
  color: var(--ink-muted);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.tab-btn span { font-family: var(--font-mono); font-size: 11px; opacity: 0.72; margin-left: 4px; }

.tab-btn:hover { color: var(--ink-secondary); }

.tab-btn.is-active { color: var(--ink); font-weight: 600; border-bottom-color: var(--game-accent, var(--accent)); }

.specimen-stage {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  min-height: 146px;
}

.sprite-pedestal {
  width: 140px;
  height: 140px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background-color: var(--pedestal-bg);
  background-image: radial-gradient(var(--pedestal-dot) 1px, transparent 1px);
  background-size: 16px 16px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.sprite-pedestal img {
  width: 116px;
  height: 116px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.sprite-pedestal img.is-native-96 { width: 96px; height: 96px; }
.sprite-pedestal img.is-smooth { width: 124px; height: 124px; image-rendering: auto; border-radius: 6px; }

.specimen-meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.specimen-tag { font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; color: var(--game-accent, var(--accent)); }

.specimen-tag.is-mythic { color: var(--mythic); }

.specimen-code { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--ink-muted); }

.specimen-name { margin: 0 0 8px; font-size: 18px; font-weight: 600; color: var(--ink); }

.specimen-desc { margin: 0; font-size: 13.5px; line-height: 1.75; color: var(--ink-secondary); }

.specimen-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.specimen-strip[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.specimen-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 9px 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  min-width: 0;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.specimen-thumb img { width: 58px; height: 58px; image-rendering: pixelated; image-rendering: crisp-edges; }

.specimen-thumb img.is-smooth { image-rendering: auto; border-radius: 4px; object-fit: cover; }

.specimen-thumb span { font-size: 12px; color: var(--ink-secondary); white-space: nowrap; }

.specimen-thumb:hover { border-color: var(--line-strong); background: var(--surface-hover); }

.specimen-thumb.is-active { border-color: var(--game-accent, var(--thumb-active-border)); background: var(--game-accent-soft, var(--thumb-active-bg)); }

.specimen-thumb.is-active span { color: var(--ink); font-weight: 600; }

/* Gameplay Screenshots Band */
.gallery-band {
  padding: clamp(20px, 3vw, 28px) clamp(22px, 3.4vw, 34px) clamp(24px, 3.4vw, 34px);
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.gallery-label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.14em; color: var(--ink-muted); }

.gallery-hint { font-size: 12px; color: var(--ink-muted); }

.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 20px); }

.shot-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-subtle);
  transition: transform 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.shot-card:hover { transform: translateY(-3px); border-color: var(--game-accent, var(--line-strong)); background: var(--surface-hover); }

.shot-frame {
  position: relative;
  display: block;
  border-radius: 7px;
  overflow: hidden;
  aspect-ratio: 9 / 13.5;
  background: #0c0c10;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.shot-frame picture,
.shot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.shot-card:hover .shot-frame img { transform: scale(1.03); }

.shot-zoom-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10, 10, 14, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #faf8f4;
  font-size: 11.5px;
  backdrop-filter: blur(6px);
  opacity: 0.86;
  transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.shot-card:hover .shot-zoom-badge { opacity: 1; background: var(--game-accent, #e5a342); border-color: var(--game-accent, #e5a342); color: #111013; }

.shot-caption { display: flex; flex-direction: column; gap: 2px; padding-inline: 2px; }

.shot-caption strong { font-size: 14px; font-weight: 600; color: var(--ink); }

.shot-caption span { font-size: 12.5px; color: var(--ink-secondary); line-height: 1.5; }

/* Upcoming quiet row */
.upcoming-row {
  margin-top: 22px;
  padding: 18px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 42px 120px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: baseline;
  color: var(--ink-muted);
  font-size: 13.5px;
}

.upcoming-index,
.upcoming-status { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; }

.upcoming-name { color: var(--ink); font-weight: 600; }

/* Community Section */
.channel-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: clamp(22px, 3.2vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 6px;
}

.panel-header h3 { margin: 0; font-size: 19px; font-weight: 600; color: var(--ink); }

.panel-header p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.75; color: var(--ink-secondary); }

.channel-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.channel-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-subtle);
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.channel-card.is-live:hover { border-color: var(--accent); background: var(--surface-hover); transform: translateY(-1px); }

.channel-card.is-soon { cursor: default; opacity: 0.86; }

.channel-badge {
  display: grid;
  place-items: center;
  height: 36px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}

.channel-card.is-live .channel-badge { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.channel-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.channel-body strong { font-size: 14px; font-weight: 600; color: var(--ink); }

.channel-body span { font-size: 12.5px; color: var(--ink-secondary); }

.channel-state { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-muted); white-space: nowrap; }

.channel-card.is-live .channel-state { color: var(--accent); font-weight: 600; }

/* Studio section */
.studio-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(28px, 5.5vw, 72px); align-items: start; }

.studio-mark { width: 56px; height: auto; margin-bottom: 22px; opacity: 0.94; }

.studio-statement { margin: 0; font-size: 17.5px; line-height: 1.85; color: var(--ink); }

.studio-subnote { margin: 16px 0 0; font-size: 13.5px; color: var(--ink-muted); }

.principles { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }

.principle-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding-block: 20px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.principle-num { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; color: var(--accent); }

.principle-body h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: var(--ink); }

.principle-body p { margin: 0; font-size: 14px; line-height: 1.82; color: var(--ink-secondary); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }

.footer-inner {
  padding-block: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.footer-copy,
.footer-meta {
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-sep { opacity: 0.45; }
.site-footer a:hover { color: var(--ink); }

/* Lightbox Modal */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 28px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.lightbox.is-open { opacity: 1; visibility: visible; pointer-events: auto; }

.lightbox-backdrop { position: absolute; inset: 0; background: rgba(7, 7, 10, 0.88); backdrop-filter: blur(10px); }

.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #111116;
  color: #f6f4ef;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.65);
}

.lightbox-topbar,
.lightbox-bottombar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-bottombar { border-bottom: 0; border-top: 1px solid rgba(255, 255, 255, 0.1); }

.lightbox-meta { display: flex; align-items: center; gap: 12px; }

.lightbox-game { font-size: 13.5px; font-weight: 600; color: #faf8f4; }

.lightbox-counter { font-family: var(--font-mono); font-size: 12px; color: rgba(246, 244, 239, 0.6); }

.lightbox-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  color: #faf8f4;
  font-size: 15px;
  transition: background-color 0.18s ease;
}

.lightbox-close:hover { background: rgba(255, 255, 255, 0.14); }

.lightbox-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 56px;
  background: #0a0a0d;
}

.lightbox-figure {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: calc(92vh - 140px);
}

.lightbox-figure img {
  max-height: calc(92vh - 150px);
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 54px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(16, 16, 22, 0.78);
  color: #faf8f4;
  font-size: 26px;
  display: grid;
  place-items: center;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.lightbox-nav:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.4); }

.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }

.lightbox-caption { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.lightbox-caption strong { font-size: 14.5px; color: #faf8f4; }
.lightbox-caption span { font-size: 12.5px; color: rgba(246, 244, 239, 0.72); }

.lightbox-cta {
  padding: 8px 15px;
  border-radius: 6px;
  background: #e5a342;
  color: #111013;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.lightbox-cta:hover { filter: brightness(1.08); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-bg-layer,
  .dock-progress i,
  .js-reveal .reveal { transition: none !important; animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* Responsive */
@media (max-width: 960px) {
  .pulse-inner,
  .dossier-grid,
  .studio-grid { grid-template-columns: 1fr; }

  .pulse-stats { padding-left: 0; padding-top: 18px; border-left: 0; border-top: 1px solid var(--line); }

  .dossier-copy { border-right: 0; border-bottom: 1px solid var(--line); }

  .keyart-frame { aspect-ratio: 16 / 9.5; }
}

@media (max-width: 720px) {
  .hero-dock { grid-template-columns: 1fr; gap: 8px; }

  .hero-dock-btn { padding: 10px 12px 12px; }

  .dock-icon { width: 40px; height: 40px; }

  .keyart-caption { flex-direction: column; align-items: flex-start; }

  .project-app-icon { width: 54px; height: 54px; border-radius: 12px; }

  .gallery-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .shot-card { flex: 0 0 74%; scroll-snap-align: start; }

  .channel-list { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .header-inner { height: 60px; gap: 10px; }
  .brand-link img { height: 28px; }
  .site-nav { gap: 10px; }
  .site-nav a { font-size: 13px; }
  .site-nav a[href="#studio"] { display: none; }
  .site-nav .nav-pill { padding: 4px 10px; font-size: 12px; }
  .theme-toggle { padding: 5px 8px; }
  .theme-label { display: none; }

  .hero-stage { min-height: 540px; }
  .hero-actions { width: 100%; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; }

  .pulse-stats { gap: 10px; }
  .pulse-stats strong { font-size: 19px; }

.specimen-head { flex-direction: column; align-items: flex-start; gap: 10px; }

.specimen-stage { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; min-height: 96px; }

  .sprite-pedestal { width: 84px; height: 84px; }
  .sprite-pedestal img { width: 64px; height: 64px; }
  .sprite-pedestal img.is-native-96 { width: 72px; height: 72px; }
  .sprite-pedestal img.is-smooth { width: 72px; height: 72px; }
  .specimen-strip[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .specimen-thumb img { width: 46px; height: 46px; }

.upcoming-row { grid-template-columns: 32px minmax(0, 1fr) auto; row-gap: 4px; }

  .upcoming-status { grid-column: 3; grid-row: 1; }
  .upcoming-note { grid-column: 2 / -1; grid-row: 2; }

.channel-card { grid-template-columns: 60px minmax(0, 1fr); gap: 8px 12px; }

  .channel-state { grid-column: 2; }

  .lightbox-stage { padding: 10px 12px; }
  .lightbox-nav { width: 34px; height: 44px; font-size: 22px; }
  .lightbox-bottombar { flex-direction: column; align-items: stretch; }
  .lightbox-cta { text-align: center; }
}
