/* =========================================================
   游少年游戏室 — YOUSHAONIAN GAME ROOM
   ========================================================= */

:root {
  --cream: #f8f1e3;
  --cream-2: #fffaf0;
  --ink: #1d2a49;
  --coral: #e3452f;
  --yellow: #f4c84a;
  --sky: #a6d4e0;
  --sky-2: #8fc7d6;
  --mint: #b8dfcf;
  --orange: #f19a3e;
  --muted: rgba(29, 42, 73, 0.66);
  --line: rgba(29, 42, 73, 0.18);
  --line-strong: rgba(29, 42, 73, 0.82);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(20px, 4vw, 56px);
  --display: "Arial Black", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --font: "Helvetica Neue", "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --mono: "Courier New", "Consolas", "PingFang SC", monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

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

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

.nowrap {
  white-space: nowrap;
}

/* ---------- texture / progress ---------- */

.grain {
  position: fixed;
  inset: -40%;
  z-index: 9990;
  pointer-events: none;
  opacity: 0.2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.38'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  mix-blend-mode: multiply;
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9995;
  width: 0;
  height: 4px;
  background: var(--coral);
  transition: width 0.1s linear;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  height: 82px;
  padding: 0 var(--pad);
  background: rgba(248, 241, 227, 0.94);
  border-bottom: 2px solid var(--ink);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 6px 0 rgba(29, 42, 73, 0.08);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.logo-mark {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  width: 34px;
  height: 34px;
  padding: 5px;
  background: var(--ink);
  border-radius: 9px;
  transform: rotate(-4deg);
  box-shadow: 2px 2px 0 rgba(29, 42, 73, 0.2);
}

.logo-mark i {
  display: block;
  border-radius: 2px;
}

.logo-mark i:nth-child(1) {
  background: var(--coral);
}
.logo-mark i:nth-child(2) {
  background: var(--yellow);
}
.logo-mark i:nth-child(3) {
  background: var(--sky);
}
.logo-mark i:nth-child(4) {
  background: var(--cream);
}

.logo-type {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.logo-type strong {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.logo-type small {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--muted);
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}

.nav a {
  position: relative;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 0;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}

.nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ---------- buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 52px;
  padding: 0 26px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s ease, color 0.25s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn--sm {
  height: 42px;
  padding: 0 18px;
  font-size: 12px;
  box-shadow: 2px 2px 0 var(--ink);
}

.btn--coral {
  background: var(--coral);
  color: var(--cream);
}

.btn--coral:hover {
  background: #f0503a;
}

.btn--ghost {
  background: var(--cream);
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--yellow);
}

.btn--yellow {
  background: var(--yellow);
  color: var(--ink);
}

.btn--yellow:hover {
  background: var(--cream);
}

.btn-arrow {
  font-size: 16px;
  line-height: 1;
  transition: transform 0.25s var(--ease);
}

.btn:hover .btn-arrow {
  transform: translate(2px, -2px);
}

.btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s var(--ease);
}

.btn:hover .btn-icon {
  transform: translate(1px, -1px);
}

.btn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 3px rgba(244, 200, 74, 0.22);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 22px var(--pad) 50px;
  background-color: var(--sky);
  background-image: linear-gradient(rgba(29, 42, 73, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 42, 73, 0.055) 1px, transparent 1px);
  background-size: 42px 42px;
  border-bottom: 2px solid var(--ink);
}

.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -220px;
  width: 900px;
  height: 420px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(248, 241, 227, 0.22);
  filter: blur(30px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
}

.hero-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(29, 42, 73, 0.35);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(29, 42, 73, 0.72);
}

.hero-topbar > span {
  white-space: nowrap;
}

.hero-topbar-mid {
  position: relative;
  padding: 0 24px;
}

.hero-topbar-mid::before,
.hero-topbar-mid::after {
  content: "✦";
  position: absolute;
  top: 0;
  font-size: 8px;
  color: var(--coral);
}

.hero-topbar-mid::before {
  left: 4px;
}
.hero-topbar-mid::after {
  right: 4px;
}

/* image lockup */

.hero-art {
  position: relative;
  width: min(620px, 100%);
  margin: 26px auto 0;
  z-index: 2;
}

.art-frame {
  position: relative;
  padding: 9px;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 28px;
  box-shadow: 11px 11px 0 var(--ink);
  transform: rotate(-1.2deg);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
  animation: artIn 1s 0.1s both var(--ease);
}

.hero-art:hover .art-frame {
  transform: rotate(0deg) translate(-2px, -2px);
  box-shadow: 14px 14px 0 var(--ink);
}

@keyframes artIn {
  from {
    opacity: 0;
    transform: translateY(30px) rotate(-4deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(-1.2deg);
  }
}

.art-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 474 / 269;
  object-fit: cover;
  border-radius: 19px;
}

.sticker-open {
  position: absolute;
  z-index: 4;
  left: -30px;
  top: -28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 94px;
  height: 94px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-11deg);
  line-height: 1;
}

.sticker-open b {
  font-family: var(--mono);
  font-size: 17px;
  letter-spacing: 0.02em;
}

.sticker-open small {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  margin-top: 3px;
}

.sticker-pill {
  position: absolute;
  z-index: 4;
  right: -26px;
  bottom: 24px;
  padding: 10px 15px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(3deg);
  white-space: nowrap;
}

/* pixel decorations */

.tetro {
  position: absolute;
  z-index: 1;
  display: grid;
  gap: 4px;
  opacity: 0.95;
  animation: floaty 5s ease-in-out infinite;
}

.tetro i {
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--coral);
}

.tetro--1 {
  left: -92px;
  top: 32px;
  grid-template-columns: repeat(2, 18px);
}

.tetro--1 i:nth-child(2n) {
  background: var(--yellow);
}

.tetro--1 i:nth-child(3) {
  background: var(--coral);
}

.tetro--2 {
  right: -84px;
  top: 108px;
  grid-template-columns: repeat(2, 18px);
  animation-delay: -1.6s;
}

.tetro--2 i {
  background: var(--mint);
}

.tetro--2 i:nth-child(2) {
  background: var(--cream);
}

.tetro--3 {
  right: -42px;
  bottom: -30px;
  grid-template-columns: repeat(2, 18px);
  animation-delay: -3s;
}

.tetro--3 i {
  background: var(--yellow);
}

.tetro--3 i:nth-child(4) {
  background: var(--coral);
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

.spark {
  position: absolute;
  z-index: 4;
  font-size: 20px;
  color: var(--cream);
  text-shadow: 2px 2px 0 var(--ink);
  animation: blink 3s ease-in-out infinite;
}

.spark--1 {
  left: 12%;
  top: -20px;
}

.spark--2 {
  right: 6%;
  top: 46%;
  font-size: 14px;
  animation-delay: -1.2s;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.8);
  }
}

/* hero copy */

.hero-copy {
  position: relative;
  z-index: 2;
  margin-top: 30px;
  text-align: center;
}

.hero-kicker {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(29, 42, 73, 0.62);
}

.hero-title {
  margin: 12px 0 16px;
  font-family: var(--display);
  font-size: clamp(2.9rem, 7.7vw, 7.4rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.055em;
  white-space: nowrap;
}

.hero-line {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.06em;
}

.hero-line > span {
  display: inline-block;
  transform: translateY(110%);
  animation: rise 1s 0.28s var(--ease) forwards;
}

.hero-line.accent {
  color: var(--coral);
}

.hero-line.accent > span {
  animation-delay: 0.38s;
}

@keyframes rise {
  to {
    transform: translateY(0);
  }
}

.hero-lede {
  max-width: 560px;
  margin: 0 auto;
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.9;
  color: rgba(29, 42, 73, 0.76);
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-strip {
  display: flex;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin: 32px auto 0;
  padding: 0;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
  overflow: hidden;
}

.hero-strip li {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  border-right: 1px dashed rgba(29, 42, 73, 0.32);
}

.hero-strip li:last-child {
  border-right: 0;
}

.hero-strip strong {
  font-family: var(--display);
  font-size: 19px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.hero-strip span {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

/* ---------- marquee ---------- */

.marquee {
  overflow: hidden;
  padding: 14px 0;
  background: var(--ink);
  color: var(--cream);
  border-bottom: 2px solid var(--ink);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 30px;
  padding-right: 30px;
}

.marquee span {
  font-family: var(--display);
  font-size: clamp(14px, 1.4vw, 18px);
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.marquee i {
  font-style: normal;
  font-size: 12px;
  color: var(--yellow);
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- shared ---------- */

.section {
  padding: clamp(76px, 9vw, 128px) var(--pad);
  max-width: 1392px;
  margin: 0 auto;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-label i {
  display: block;
  width: 8px;
  height: 8px;
  background: var(--coral);
  border: 1.5px solid var(--ink);
}

.section-label--light {
  color: rgba(248, 241, 227, 0.58);
}

.section-label--light i {
  background: var(--yellow);
  border-color: rgba(248, 241, 227, 0.8);
}

.display {
  font-family: var(--display);
  font-size: clamp(2.5rem, 4.8vw, 4.9rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.display em {
  font-style: normal;
  background: linear-gradient(transparent 60%, var(--yellow) 60%);
  padding: 0 0.06em;
}

.section-head {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 250px;
  align-items: end;
  gap: 28px;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.section-note {
  justify-self: end;
  text-align: right;
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- intro ---------- */

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(40px, 7vw, 100px);
  align-items: start;
  margin-top: 34px;
}

.intro .display {
  max-width: 620px;
}

.intro-body {
  padding-top: 8px;
}

.intro-body p {
  max-width: 500px;
  font-size: 15px;
  line-height: 1.95;
  color: var(--muted);
}

.intro-body p + p {
  margin-top: 16px;
}

.intro-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 2px solid var(--ink);
}

.intro-tags span {
  padding: 7px 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.55);
  font-size: 11px;
  font-weight: 600;
}

.intro-sign {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------- works ---------- */

.works-carousel {
  position: relative;
}

.works-track {
  display: flex;
  align-items: stretch;
  gap: 22px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0 12px;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  animation: tabIn 0.45s var(--ease);
}

.works-track::-webkit-scrollbar {
  display: none;
}

.works-track:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

.works-loading {
  width: 100%;
  padding: 72px 20px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-align: center;
}

.works-loading--error {
  color: var(--coral);
}

.works-track.is-dragging {
  cursor: grabbing;
}

.works-track.is-centered {
  justify-content: center;
}

.works-track .work-card {
  flex: 1 0 calc((100% - 66px) / 4);
  max-width: 420px;
}

.works-track .work-cover {
  height: 220px;
  min-height: 220px;
}

.works-track .work-info {
  padding: 22px;
}

.works-track.is-single .work-card {
  max-width: 560px;
}

.works-track.is-single .work-cover {
  height: 300px;
  min-height: 300px;
}

.works-track.is-single .work-info {
  padding: 26px;
}

.works-scrollbar {
  position: relative;
  height: 8px;
  margin-top: 16px;
  border-radius: 999px;
  background: rgba(29, 42, 73, 0.14);
  cursor: pointer;
  touch-action: none;
}

.works-scrollbar.is-static {
  cursor: default;
  opacity: 0.45;
}

.works-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
  transition: background 0.2s ease;
}

.works-scrollbar:hover .works-thumb,
.works-scrollbar.is-dragging .works-thumb {
  background: var(--coral);
}

.works .section-head {
  margin-bottom: 28px;
}

.works-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.works-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--cream-2);
  box-shadow: 3px 3px 0 var(--ink);
}

.works-tab {
  padding: 9px 22px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.works-tab:hover {
  background: rgba(29, 42, 73, 0.07);
  color: var(--ink);
}

.works-tab[aria-selected="true"] {
  background: var(--ink);
  color: var(--cream);
}

.works-hint {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
  white-space: nowrap;
}

.works-empty {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  min-height: 340px;
  padding: clamp(28px, 4vw, 48px);
  border: 2px solid var(--ink);
  border-radius: 26px;
  box-shadow: 6px 6px 0 var(--ink);
  background: var(--yellow);
  overflow: hidden;
  position: relative;
  animation: tabIn 0.45s var(--ease);
}

.works-empty::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(29, 42, 73, 0.5) 1px, transparent 1px);
  background-size: 17px 17px;
  opacity: 0.12;
  pointer-events: none;
}

.empty-mark {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.07em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(29, 42, 73, 0.52);
  transform: rotate(-4deg);
}

.empty-copy {
  position: relative;
  z-index: 1;
}

.empty-kicker {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(29, 42, 73, 0.66);
}

.empty-copy h3 {
  margin-top: 9px;
  font-family: var(--display);
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.empty-copy p {
  max-width: 470px;
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.8;
  color: rgba(29, 42, 73, 0.72);
}

.empty-copy .btn {
  margin-top: 22px;
}

@keyframes tabIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.work-card {
  display: flex;
  flex-direction: column;
  background: var(--cream-2);
  border: 2px solid var(--ink);
  border-radius: 26px;
  box-shadow: 6px 6px 0 var(--ink);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.work-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 11px 11px 0 var(--ink);
}

.work-cover {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  background: var(--sky);
  border-bottom: 2px solid var(--ink);
}

.work-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.8s var(--ease);
}

.work-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.work-cover--slides {
  background: var(--ink);
}

.work-slideshow {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.work-slides {
  display: flex;
  height: 100%;
  transition: transform 0.55s var(--ease);
  will-change: transform;
}

.work-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.work-slide-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: rgba(248, 241, 227, 0.92);
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.work-slide-nav--prev {
  left: 12px;
}

.work-slide-nav--next {
  right: 12px;
}

.work-cover--slides:hover .work-slide-nav,
.work-slide-nav:focus-visible {
  opacity: 1;
}

.work-slide-nav:hover {
  background: var(--ink);
  color: var(--cream);
}

.work-slide-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(29, 42, 73, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transform: translateX(-50%);
}

.work-dot {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.work-dot::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(248, 241, 227, 0.5);
  transition: width 0.25s var(--ease), background 0.25s ease;
}

.work-dot.is-active::after {
  width: 15px;
  border-radius: 999px;
  background: var(--cream);
}

@media (hover: none) {
  .work-slide-nav {
    opacity: 1;
  }
}

@media (max-width: 520px) {
  .work-slide-nav {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
  .work-slide-dots {
    bottom: 8px;
  }
}

.work-card:hover .work-svg,
.work-card:hover .work-image {
  transform: scale(1.035);
}

.work-status {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: 2px 2px 0 var(--ink);
}

.work-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
}

.work-status--dev i {
  background: var(--yellow);
}

.work-fig {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(29, 42, 73, 0.84);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.work-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 26px;
  background: var(--cream-2);
}

.work-genre {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.work-info h3 {
  margin-top: 10px;
  font-family: var(--display);
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
}

.work-en {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--coral);
}

.work-desc {
  max-width: 480px;
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--muted);
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.work-tags span {
  padding: 5px 9px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted);
}

.work-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
}

.work-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.work-link span:last-child {
  font-size: 12px;
  font-weight: 400;
}

.work-link:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.work-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.works-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--muted);
}

.works-note a {
  color: var(--ink);
  font-weight: 700;
  border-bottom: 1px solid var(--ink);
}

/* ---------- dev / new projects ---------- */

.dev {
  margin-top: clamp(64px, 9vw, 112px);
  padding-top: clamp(34px, 5vw, 56px);
  border-top: 2px solid var(--ink);
}

.dev-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.dev-kicker {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.dev-title {
  margin-top: 12px;
  font-family: var(--display);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.dev-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  max-width: 300px;
  text-align: right;
}

.dev-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: 2px 2px 0 var(--ink);
}

.dev-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
}

.dev-side p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}

.dev-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.dev-loading {
  width: 100%;
  padding: 64px 20px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-align: center;
}

.dev-loading--error {
  color: var(--coral);
}

.dev-item {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.dev-number {
  font-family: var(--display);
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--coral);
}

.dev-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.dev-item h4 {
  margin: 6px 0 0;
  font-family: var(--display);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.dev-item p {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
}

.dev-state {
  margin-top: 4px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
}

.dev-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
}

.dev-actions .dev-state {
  margin-top: 0;
}

.devlog-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s ease, color 0.25s ease;
}

.devlog-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.devlog-btn-date {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.02em;
}

.devlog-btn:hover {
  background: var(--ink);
  color: var(--cream);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}

/* ---------- dev log modal ---------- */

body.has-dialog {
  overflow: hidden;
}

.devlog-modal {
  position: fixed;
  inset: 0;
  width: min(940px, calc(100vw - 40px));
  height: min(640px, 86vh);
  margin: auto;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 24px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 12px 12px 0 var(--ink);
  overflow: hidden;
}

.devlog-modal::backdrop {
  background: rgba(18, 17, 14, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.devlog-modal[open] {
  animation: modalIn 0.3s var(--ease);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.devlog-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.devlog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 28px;
  border-bottom: 2px solid var(--ink);
  background: var(--cream-2);
}

.devlog-kicker {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.devlog-head h2 {
  margin-top: 6px;
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
}

.devlog-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  flex-shrink: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s var(--ease);
}

.devlog-close:hover {
  background: var(--ink);
  color: var(--cream);
  transform: rotate(8deg);
}

.devlog-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}

.devlog-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--cream-2);
}

.devlog-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border: 1.5px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}

.devlog-item:hover {
  background: rgba(29, 42, 73, 0.06);
}

.devlog-item.is-active {
  background: var(--ink);
  color: var(--cream);
}

.devlog-item-date {
  font-size: 12px;
  font-weight: 600;
}

.devlog-item:first-child::after {
  content: "最新";
  padding: 3px 6px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.06em;
  opacity: 0.7;
  white-space: nowrap;
}

.devlog-panels {
  overflow-y: auto;
  padding: 32px 36px 40px;
}

.devlog-post-kicker {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--coral);
}

.devlog-md {
  max-width: 620px;
  margin-top: 14px;
}

.devlog-md h1 {
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.devlog-md h2 {
  margin-top: 24px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.devlog-md h3 {
  margin-top: 20px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

.devlog-md p {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--muted);
}

.devlog-md ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.devlog-md li {
  position: relative;
  padding: 9px 0 9px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

.devlog-md li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
}

.devlog-md strong {
  font-weight: 700;
  color: var(--ink);
}

.devlog-md code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--cream-2);
  font-family: var(--mono);
  font-size: 0.82em;
  color: var(--ink);
}

.devlog-md a {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid var(--ink);
}

.devlog-md blockquote {
  margin: 20px 0 0;
  padding: 12px 15px;
  border-left: 3px solid var(--coral);
  background: var(--cream-2);
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--muted);
}

.devlog-md hr {
  margin: 20px 0;
  border: 0;
  border-top: 1px dashed var(--line);
}

.devlog-loading,
.devlog-error {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}

.devlog-error a {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid var(--ink);
}

.devlog-entry-title {
  margin-top: 10px;
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.devlog-entry-date {
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.devlog-text {
  max-width: 640px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.9;
}

.devlog-text p {
  margin-top: 12px;
}

.devlog-text p:first-child {
  margin-top: 0;
}

.dev-media {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: 18px;
  align-items: start;
  margin-top: 6px;
  padding-top: 22px;
  border-top: 1px dashed var(--line);
}

.dev-media--single {
  grid-template-columns: 1fr;
}

.dev-video {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: #0b0f16;
  box-shadow: 4px 4px 0 var(--ink);
}

.dev-video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.dev-media-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(29, 42, 73, 0.82);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.dev-shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dev-shot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.dev-shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--cream-2);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.dev-shot:hover img {
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 var(--ink);
}

.dev-shot span {
  padding-left: 2px;
}

/* ---------- why ---------- */

.why {
  position: relative;
  padding: clamp(80px, 9vw, 130px) var(--pad);
  background: var(--ink);
  color: var(--cream);
  overflow: hidden;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.why-bg {
  position: absolute;
  left: 0;
  bottom: 4%;
  font-family: var(--display);
  font-size: clamp(96px, 15vw, 220px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(248, 241, 227, 0.13);
  animation: whyScroll 50s linear infinite;
  pointer-events: none;
}

@keyframes whyScroll {
  to {
    transform: translateX(-32%);
  }
}

.why-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(48px, 8vw, 120px);
  max-width: 1280px;
  margin: 0 auto;
}

.why-copy .display {
  margin: 22px 0 22px;
  color: var(--cream);
}

.why .display em {
  background: none;
  color: var(--yellow);
  padding: 0;
}

.why-copy > p {
  max-width: 400px;
  font-size: 14px;
  line-height: 1.95;
  color: rgba(248, 241, 227, 0.64);
}

.why-copy .btn {
  margin-top: 30px;
}

.why-list {
  border-top: 1px solid rgba(248, 241, 227, 0.22);
}

.why-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  padding: 26px 0 28px;
  border-bottom: 1px solid rgba(248, 241, 227, 0.22);
}

.why-no {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--yellow);
  letter-spacing: 0.08em;
}

.why-item h3 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.why-item p {
  max-width: 430px;
  margin-top: 7px;
  font-size: 12.5px;
  line-height: 1.8;
  color: rgba(248, 241, 227, 0.58);
}

/* ---------- visit ---------- */

.visit {
  padding: clamp(70px, 8vw, 110px) var(--pad);
  background-color: var(--sky);
  background-image: linear-gradient(rgba(29, 42, 73, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 42, 73, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
}

.visit-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.visit-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(40px, 6vw, 80px);
  padding: clamp(28px, 4.5vw, 60px);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 32px;
  box-shadow: 12px 12px 0 var(--ink);
  overflow: hidden;
}

.visit-card::after {
  content: "HELLO?";
  position: absolute;
  right: -20px;
  top: -26px;
  font-family: var(--display);
  font-size: 120px;
  font-weight: 900;
  letter-spacing: -0.06em;
  color: rgba(29, 42, 73, 0.04);
  pointer-events: none;
}

.visit-copy {
  position: relative;
  z-index: 1;
}

.visit-copy .display {
  margin: 20px 0 18px;
}

.visit-copy .display em {
  color: var(--coral);
  background: none;
}

.visit-copy > p {
  max-width: 430px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
}

.visit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.visit-hint {
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted);
}

.visit-hint strong {
  color: var(--ink);
  font-family: var(--mono);
}

.visit-info {
  position: relative;
  z-index: 1;
  padding: 6px 0 50px;
}

.info-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px dashed rgba(29, 42, 73, 0.28);
}

.info-row:first-child {
  padding-top: 0;
}

.info-label {
  padding-top: 2px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--coral);
}

.info-row strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.info-row p {
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
}

.info-link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.25s ease;
}

.info-link:hover {
  color: var(--coral);
}

.info-sticker {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(8deg);
  line-height: 1;
}

.info-sticker span {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
}

.info-sticker b {
  margin-top: 4px;
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: -0.04em;
}

/* ---------- footer ---------- */

.footer {
  padding: 48px var(--pad) 24px;
  background: var(--ink);
  color: var(--cream);
}

.footer-top,
.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(248, 241, 227, 0.18);
}

.logo--footer .logo-mark {
  background: var(--cream);
}

.logo--footer .logo-mark i:nth-child(4) {
  background: var(--ink);
}

.logo--footer .logo-type small {
  color: rgba(248, 241, 227, 0.5);
}

.footer-slogan {
  font-family: var(--display);
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--yellow);
}

.footer-link {
  font-size: 12px;
  font-weight: 600;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(248, 241, 227, 0.5);
  transition: color 0.25s ease;
}

.footer-link:hover {
  color: var(--yellow);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 20px;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(248, 241, 227, 0.45);
}

/* ICP 备案号：底部居中 */
.footer-beian {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(248, 241, 227, 0.62);
}

.footer-beian a {
  color: inherit;
  border-bottom: 1px solid rgba(248, 241, 227, 0.35);
  padding-bottom: 1px;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.footer-beian a:hover {
  color: var(--yellow);
  border-color: var(--yellow);
}

.footer-socials {
  display: flex;
  gap: 18px;
}

.footer-socials a,
.back-top {
  transition: color 0.25s ease;
}

.footer-socials a:hover,
.back-top:hover {
  color: var(--yellow);
}

/* ---------- mobile menu ---------- */

.menu-btn {
  position: relative;
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  z-index: 150;
}

.menu-btn span {
  position: absolute;
  left: 10px;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}

.menu-btn span:first-child {
  top: 16px;
}

.menu-btn span:last-child {
  top: 22px;
}

.menu-btn[aria-expanded="true"] span:first-child {
  top: 19px;
  transform: rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:last-child {
  top: 19px;
  transform: rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  padding: 92px var(--pad) 36px;
  background: var(--ink);
  color: var(--cream);
  clip-path: circle(0% at calc(100% - 42px) 41px);
  visibility: hidden;
  transition: clip-path 0.65s var(--ease), visibility 0s 0.65s;
}

.mobile-menu.is-open {
  clip-path: circle(160% at calc(100% - 42px) 41px);
  visibility: visible;
  transition: clip-path 0.65s var(--ease), visibility 0s 0s;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
}

.mobile-menu nav a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(248, 241, 227, 0.18);
  font-family: var(--display);
  font-size: clamp(30px, 8vw, 44px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.mobile-menu nav a span {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--yellow);
}

.mobile-menu-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 11px;
  color: rgba(248, 241, 227, 0.5);
}

.mobile-menu-foot a {
  color: var(--yellow);
}

body.is-locked .site-header {
  background: var(--ink);
  border-bottom-color: rgba(248, 241, 227, 0.18);
  box-shadow: none;
}

body.is-locked .site-header .logo-type strong {
  color: var(--cream);
}

body.is-locked .site-header .logo-type small {
  color: rgba(248, 241, 227, 0.55);
}

body.is-locked .site-header .logo-mark {
  background: var(--cream);
}

body.is-locked .site-header .logo-mark i:nth-child(4) {
  background: var(--ink);
}

body.is-locked .menu-btn {
  color: var(--cream);
  border-color: rgba(248, 241, 227, 0.5);
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 9999;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--cream);
  border: 2px solid var(--cream);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 3px 3px 0 var(--coral);
  transform: translate(-50%, 24px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--ease), opacity 0.35s ease;
}

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

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal[data-delay="1"] {
  transition-delay: 0.1s;
}
.reveal[data-delay="2"] {
  transition-delay: 0.2s;
}
.reveal[data-delay="3"] {
  transition-delay: 0.3s;
}

/* ---------- responsive ---------- */

@media (max-width: 1120px) {
  .section-head {
    grid-template-columns: 140px minmax(0, 1fr) 230px;
  }
  .hero-art {
    width: min(560px, 100%);
  }
  .works-track .work-card {
    flex-basis: calc((100% - 44px) / 3);
  }
  .tetro--1 {
    left: -64px;
  }
  .tetro--2 {
    right: -56px;
  }
  .tetro--3 {
    right: -24px;
  }
}

@media (max-width: 900px) {
  .site-header {
    height: 74px;
  }
  .nav,
  .header-cta {
    display: none;
  }
  .menu-btn {
    display: block;
    margin-left: auto;
  }

  .hero {
    padding-top: 18px;
  }
  .hero-art {
    width: min(520px, 100%);
  }
  .hero-title {
    font-size: clamp(2.9rem, 9vw, 4.6rem);
  }
  .hero-topbar {
    font-size: 8px;
    letter-spacing: 0.08em;
  }
  .hero-topbar-mid {
    display: none;
  }

  .intro-grid,
  .why-inner,
  .visit-card {
    grid-template-columns: 1fr;
  }
  .intro-grid {
    gap: 34px;
  }
  .intro-body {
    padding-top: 0;
  }
  .intro .display {
    max-width: none;
  }
  .why-inner {
    gap: 40px;
  }
  .why-copy > p {
    max-width: 520px;
  }
  .visit-card {
    gap: 28px;
  }
  .visit-info {
    padding-bottom: 0;
  }
  .info-sticker {
    display: none;
  }
  .section-head {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .section-note {
    justify-self: start;
    text-align: left;
  }
  .works-track .work-card {
    flex-basis: calc((100% - 22px) / 2);
  }

  .dev-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .dev-side {
    align-items: flex-start;
    max-width: none;
    text-align: left;
  }
  .dev-title {
    font-size: clamp(3rem, 10vw, 4.6rem);
  }
  .dev-item {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
  }
  .dev-state {
    grid-column: 2;
    justify-self: start;
    margin-top: 2px;
  }
  .dev-actions {
    grid-column: 2;
    justify-self: start;
    flex-wrap: wrap;
    margin-top: 2px;
  }
  .dev-actions .dev-state {
    grid-column: auto;
    justify-self: auto;
  }
  .dev-media {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hero-art {
    width: min(100%, 500px);
  }
  .hero-title {
    font-size: clamp(2.8rem, 12.8vw, 4.2rem);
  }
  .hero-actions .btn {
    flex: 0 1 auto;
  }
  .hero-strip {
    width: 100%;
    max-width: 460px;
    justify-content: space-between;
  }
  .hero-strip li {
    flex: 1;
    flex-wrap: wrap;
    gap: 2px;
    padding: 10px 6px;
    text-align: center;
  }
  .hero-strip strong {
    font-size: 17px;
  }
  .hero-strip span {
    font-size: 9px;
  }

  .section {
    padding-left: var(--pad);
    padding-right: var(--pad);
  }

  .works-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .works-tabs {
    width: 100%;
  }
  .works-tab {
    flex: 1;
    padding: 10px 8px;
  }
  .works-hint {
    display: none;
  }
  .works-empty {
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: 0;
    padding: 28px;
  }
  .empty-mark {
    font-size: 62px;
  }

  .work-cover {
    min-height: 300px;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .footer-bottom {
    flex-wrap: wrap;
    gap: 12px 18px;
  }

  .sticker-open {
    width: 78px;
    height: 78px;
    left: -14px;
    top: -20px;
  }
  .sticker-open b {
    font-size: 14px;
  }
  .sticker-open small {
    font-size: 8px;
  }
  .sticker-pill {
    right: -6px;
    bottom: 14px;
    padding: 8px 11px;
    font-size: 8px;
  }

  .devlog-modal {
    width: calc(100vw - 20px);
    height: min(88vh, 720px);
    border-radius: 18px;
    box-shadow: 6px 6px 0 var(--ink);
  }
  .devlog-head {
    padding: 18px 20px;
  }
  .devlog-head h2 {
    font-size: 26px;
  }
  .devlog-close {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
  .devlog-body {
    grid-template-columns: 1fr;
  }
  .devlog-list {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px;
  }
  .devlog-item {
    min-width: 170px;
    flex-shrink: 0;
  }
  .devlog-panels {
    padding: 22px 20px 28px;
  }
}

@media (max-width: 520px) {
  .logo-type strong {
    font-size: 16px;
  }
  .logo-type small {
    font-size: 7px;
  }
  .logo-mark {
    width: 30px;
    height: 30px;
  }

  .hero {
    padding-bottom: 38px;
  }
  .hero::after {
    display: none;
  }
  .hero-topbar {
    font-size: 7px;
  }
  .hero-art {
    margin-top: 20px;
  }
  .art-frame {
    padding: 6px;
    border-radius: 20px;
    box-shadow: 7px 7px 0 var(--ink);
  }
  .art-frame img {
    border-radius: 15px;
  }
  .sticker-open {
    width: 70px;
    height: 70px;
    left: -8px;
    top: -16px;
  }
  .sticker-open b {
    font-size: 12px;
  }
  .sticker-open small {
    font-size: 7px;
  }
  .sticker-pill {
    right: 0;
    bottom: -12px;
    font-size: 7px;
    padding: 7px 10px;
  }
  .tetro {
    display: none;
  }
  .spark--1 {
    left: 2%;
  }
  .spark--2 {
    right: 2%;
  }

  .hero-copy {
    margin-top: 26px;
  }
  .hero-title {
    font-size: clamp(2.65rem, 13.2vw, 3.6rem);
    letter-spacing: -0.06em;
  }
  .hero-kicker {
    font-size: 8px;
    letter-spacing: 0.12em;
  }
  .hero-lede {
    font-size: 13px;
  }
  .hero-lede br {
    display: none;
  }
  .hero-actions {
    gap: 10px;
  }
  .hero-actions .btn {
    flex: 1 1 auto;
    padding: 0 18px;
    min-width: 140px;
  }
  .hero-strip {
    margin-top: 24px;
    border-radius: 18px;
  }
  .hero-strip li {
    padding: 9px 4px;
  }
  .hero-strip strong {
    font-size: 15px;
  }
  .hero-strip span {
    font-size: 8px;
  }

  .marquee {
    padding: 11px 0;
  }

  .display {
    font-size: clamp(2.2rem, 10.6vw, 3rem);
  }
  .section {
    padding-top: 66px;
    padding-bottom: 66px;
  }
  .work-card {
    border-radius: 22px;
    box-shadow: 5px 5px 0 var(--ink);
  }
  .work-cover {
    min-height: 240px;
  }
  .work-info {
    padding: 22px;
  }
  .work-info h3 {
    font-size: 28px;
  }
  .work-desc {
    font-size: 12.5px;
  }
  .work-status {
    top: 12px;
    left: 12px;
  }
  .work-fig {
    left: 12px;
    bottom: 10px;
  }
  .works-note {
    font-size: 11px;
  }

  .works-tabs {
    padding: 4px;
  }
  .works-tab {
    padding: 9px 6px;
    font-size: 12px;
  }
  .works-empty {
    padding: 22px;
  }
  .works-track .work-card {
    flex-basis: 86%;
  }
  .empty-copy h3 {
    font-size: 27px;
  }
  .empty-copy p {
    font-size: 12.5px;
  }

  .why {
    padding-top: 66px;
    padding-bottom: 66px;
  }
  .why-bg {
    font-size: 110px;
    bottom: 2%;
  }
  .why-item {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    padding: 22px 0;
  }
  .why-item h3 {
    font-size: 20px;
  }

  .visit {
    padding-top: 50px;
    padding-bottom: 50px;
  }
  .visit-card {
    padding: 24px;
    border-radius: 24px;
    box-shadow: 7px 7px 0 var(--ink);
  }
  .visit-copy .display {
    margin: 16px 0 14px;
  }
  .visit-actions .btn {
    flex: 1 1 auto;
    padding: 0 16px;
    min-width: 130px;
  }
  .info-row {
    grid-template-columns: 50px minmax(0, 1fr);
  }
  .info-row strong {
    font-size: 14px;
  }
  .footer {
    padding-top: 38px;
  }
  .footer-slogan {
    font-size: 24px;
  }
  .footer-socials {
    gap: 12px;
  }
  .dev-actions {
    gap: 8px;
  }
  .devlog-btn {
    height: 34px;
    padding: 0 10px;
    gap: 6px;
    font-size: 9px;
  }
  .devlog-btn-date {
    font-size: 8px;
  }
}

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .hero-line > span {
    transform: none;
  }
  .art-frame {
    opacity: 1;
    transform: rotate(-1.2deg);
  }
}
