@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

:root {
  --black: #050505;
  --ink: #161616;
  --grey-1: #111111;
  --grey-2: #4b4b4b;
  --grey-3: #8a8a8a;
  --grey-4: #cfcfcf;
  --grey-5: #f2f2f2;
  --white: #ffffff;
  --panel: rgba(255, 255, 255, 0.92);
  --border: rgba(0, 0, 0, 0.18);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
  --cabinet: #f5f5f5;
  --cabinet-mid: #dfdfdf;
  --cabinet-light: #ffffff;
  --screen: #090909;
  --screen-glow: rgba(255, 255, 255, 0.08);
  --pixel-font: "Press Start 2P", "Courier New", "Noto Sans SC", monospace;
  --body-font: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 20%, rgba(0,0,0,0.04), transparent 24%),
    linear-gradient(180deg, #fcfcfc 0%, #efefef 52%, #f8f8f8 100%);
  color: var(--ink);
  font-family: var(--body-font);
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(rgba(255,255,255,0.02) 50%, rgba(0,0,0,0.03) 50%),
    linear-gradient(90deg, rgba(0,0,0,0.01), rgba(255,255,255,0.01), rgba(0,0,0,0.01));
  background-size: 100% 4px, 100% 100%;
  opacity: 0.3;
}

body.is-ready { overflow: auto; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
body,
button,
input,
textarea { -webkit-text-size-adjust: 100%; }

.page-shell {
  position: relative;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px);
  background-size: 24px 24px;
}

.pixel-rain, .particle-canvas, .grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.pixel-rain, .grain { z-index: 0; }
.particle-canvas { z-index: 6; }

.bgm-credit {
  position: fixed;
  left: clamp(10px, 2vw, 20px);
  right: clamp(10px, 2vw, 20px);
  bottom: clamp(10px, 2vw, 20px);
  z-index: 12;
  padding: 12px 16px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.62);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.bgm-credit p {
  margin: 0;
  color: rgba(17,17,17,0.58);
  font-size: 12px;
  line-height: 1.6;
}

.bgm-credit__note {
  margin-top: 4px !important;
  color: rgba(17,17,17,0.5) !important;
}

.grain {
  opacity: 0.08;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(0,0,0,0.08) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 30%, rgba(0,0,0,0.06) 0 1px, transparent 1px),
    radial-gradient(circle at 30% 80%, rgba(0,0,0,0.06) 0 1px, transparent 1px);
  background-size: 120px 120px;
  animation: grain-drift 14s linear infinite;
}

.lang-toggle {
  position: fixed;
  top: clamp(10px, 2vw, 20px);
  right: clamp(10px, 2vw, 20px);
  z-index: 20;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 2px solid rgba(0,0,0,0.12);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #dddddd);
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

.lang-toggle.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity .35s ease, transform .35s ease;
}

.audio-toggle {
  position: fixed;
  top: calc(clamp(10px, 2vw, 20px) + 72px);
  right: clamp(12px, 2.4vw, 26px);
  z-index: 20;
  display: inline-grid;
  place-items: center;
  width: 74px;
  height: 74px;
  padding: 0;
  border: 4px solid #161616;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #eeeeee 30%, #d8d8d8 58%, #b9b9b9 100%);
  box-shadow:
    0 14px 0 #555555,
    0 20px 26px rgba(0,0,0,0.18),
    inset 0 4px 8px rgba(255,255,255,0.7),
    inset 0 -8px 10px rgba(0,0,0,0.12);
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  cursor: pointer;
}

.audio-toggle.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity .35s ease, transform .35s ease;
}

.audio-toggle.is-playing {
  background: radial-gradient(circle at 35% 30%, #2d2d2d 0%, #1b1b1b 40%, #111111 100%);
  color: #ffffff;
  box-shadow:
    0 14px 0 #444444,
    0 20px 26px rgba(0,0,0,0.22),
    inset 0 2px 4px rgba(255,255,255,0.08),
    inset 0 -8px 10px rgba(0,0,0,0.26);
}

.audio-toggle:hover {
  transform: translateY(-4px);
}

.audio-toggle:active {
  transform: translateY(8px);
  box-shadow:
    0 6px 0 #555555,
    0 10px 18px rgba(0,0,0,0.16),
    inset 0 4px 8px rgba(255,255,255,0.35),
    inset 0 -4px 8px rgba(0,0,0,0.18);
}

.audio-toggle[data-audio-state="missing"] {
  opacity: 0.88;
}

.audio-toggle__icon {
  position: relative;
  width: 34px;
  height: 26px;
  flex: 0 0 auto;
  transform: translateX(-1px);
}

.audio-toggle__speaker {
  position: absolute;
  left: 0;
  top: 7px;
  width: 9px;
  height: 10px;
  background: currentColor;
}

.audio-toggle__speaker::before {
  content: "";
  position: absolute;
  left: 8px;
  top: -4px;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 10px solid currentColor;
}

.audio-toggle__wave {
  position: absolute;
  border-right: 3px solid currentColor;
  border-top: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  border-left: 0;
  border-radius: 0 10px 10px 0;
  opacity: 0;
  transition: opacity .2s ease;
}

.audio-toggle__wave--one {
  right: 4px;
  top: 6px;
  width: 7px;
  height: 12px;
}

.audio-toggle__wave--two {
  right: -1px;
  top: 2px;
  width: 10px;
  height: 20px;
}

.audio-toggle.is-playing .audio-toggle__wave {
  opacity: 1;
}

.audio-toggle:not(.is-playing) .audio-toggle__icon::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -1px;
  width: 3px;
  height: 26px;
  background: currentColor;
  transform: rotate(35deg);
  transform-origin: center;
}

.lang-toggle button {
  min-width: 56px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 10px 12px;
  cursor: pointer;
  font-family: var(--pixel-font);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lang-toggle button.is-active {
  background: var(--black);
  color: var(--white);
}

.landing {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 24px;
}

.landing.is-hidden { pointer-events: none; }
.landing-card { display: grid; justify-items: center; gap: 18px; padding: 32px 24px 48px; }

.sprite-button {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transform-origin: center bottom;
  filter: drop-shadow(0 18px 24px rgba(0,0,0,0.08));
}

.sprite-wrap {
  position: relative;
  width: 240px;
  height: 240px;
  display: grid;
  place-items: center;
}

.sprite-shadow {
  position: absolute;
  bottom: 18px;
  width: 112px;
  height: 24px;
  border-radius: 999px;
  background: rgba(0,0,0,0.12);
  filter: blur(2px);
}

.pixel-sprite { width: 176px; height: 176px; image-rendering: pixelated; }
.pixel-eye { transition: transform .15s ease; transform-origin: center; }
.sprite-button:hover .pixel-eye { transform: translateY(2px); }

.landing-text {
  display: grid;
  gap: 8px;
  text-align: center;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.landing-kicker, .landing-note {
  margin: 0;
  color: var(--grey-3);
  font-family: var(--pixel-font);
  font-size: 12px;
}

.landing-title {
  margin: 0;
  font-family: var(--pixel-font);
  font-size: clamp(18px, 2vw, 24px);
}

.landing-title span { display: inline-block; animation: blink 1.2s steps(2, end) infinite; }

.site-main {
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(40px) scale(1.02);
}

.site-main.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity .8s ease, transform .8s ease;
}

.hero, .section { padding: clamp(36px, 8vh, 96px) clamp(14px, 5vw, 72px); }
.hero { min-height: 100vh; display: grid; align-items: center; }

.arcade-cabinet {
  width: min(1080px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 0;
}

.cabinet-marquee {
  position: relative;
  width: min(74%, 720px);
  margin: 0 auto;
  padding: 20px 24px;
  border: 6px solid #2e2e2e;
  border-bottom-width: 0;
  border-radius: 26px 26px 0 0;
  background: linear-gradient(180deg, #ffffff, #dcdcdc);
  box-shadow: inset 0 0 0 4px #111111;
  text-align: center;
}

.cabinet-marquee span {
  display: block;
  padding: 12px 18px;
  border: 2px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, #111111, #232323);
  font-family: var(--pixel-font);
  font-size: clamp(13px, 1.5vw, 20px);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cabinet-bezel {
  position: relative;
  padding: clamp(26px, 3vw, 40px);
  border: 8px solid #2e2e2e;
  border-radius: 36px;
  background: linear-gradient(180deg, #ffffff, #dbdbdb);
  box-shadow:
    inset 0 0 0 6px #111111,
    0 34px 80px rgba(0,0,0,0.16);
}

.cabinet-bezel::before,
.cabinet-bezel::after {
  content: "";
  position: absolute;
  top: 18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #6c6c6c;
  box-shadow: inset 0 2px 2px rgba(255,255,255,0.28), inset 0 -2px 2px rgba(0,0,0,0.28);
}

.cabinet-bezel::before { left: 18px; }
.cabinet-bezel::after { right: 18px; }

.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: end;
  padding: clamp(28px, 4vw, 46px);
  border: 8px solid #2a2a2a;
  border-radius: 24px;
  background:
    linear-gradient(rgba(255,255,255,0.03) 50%, rgba(0,0,0,0.12) 50%),
    radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 36%),
    linear-gradient(180deg, #0c0c0c, #111111);
  background-size: 100% 4px, 100% 100%, 100% 100%;
  box-shadow:
    inset 0 0 0 4px #050505,
    inset 0 0 60px rgba(255,255,255,0.03);
}

.hero-copy, .sticky-frame, .info-card, .content-card, .contact-card {
  border: 3px solid #2c2c2c;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(232,232,232,0.96));
  box-shadow: var(--shadow);
  position: relative;
  border-radius: 18px;
}

.hero-copy::after, .sticky-frame::after, .info-card::after, .content-card::after, .contact-card::after, .project-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  pointer-events: none;
  border-radius: 10px;
}

.hero-copy { padding: clamp(28px, 4vw, 48px); }
.hero-aside { display: grid; gap: 16px; }
.info-card { padding: 24px; }

.cabinet-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px clamp(24px, 4vw, 48px);
  border: 8px solid #2e2e2e;
  border-top-width: 0;
  border-radius: 0 0 32px 32px;
  background: linear-gradient(180deg, #ffffff, #d9d9d9);
  box-shadow: inset 0 0 0 6px #111111;
}

.cabinet-base {
  width: min(82%, 860px);
  height: clamp(18px, 2.2vw, 26px);
  margin: 0 auto;
  border-radius: 0 0 20px 20px;
  background: linear-gradient(180deg, #ededed, #cfcfcf);
}

.joystick,
.stage-joystick {
  position: relative;
  width: 118px;
  height: 92px;
}

.joystick-ball,
.stage-joystick-ball {
  position: absolute;
  left: 16px;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(180deg, #3d3d3d, #111111);
  box-shadow: 0 6px 12px rgba(0,0,0,0.26);
}

.joystick-stick,
.stage-joystick-stick {
  position: absolute;
  left: 29px;
  top: 20px;
  width: 10px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2c2c2c, #0f0f0f);
  transform: rotate(-18deg);
  transform-origin: top center;
}

.joystick-base,
.stage-joystick-base {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 72px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(180deg, #2d2d2d, #111111);
  box-shadow: inset 0 0 0 4px #f0f0f0;
}

.cabinet-buttons,
.stage-buttons {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cabinet-button,
.stage-button {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.16);
  background: linear-gradient(180deg, #f4f4f4, #7e7e7e);
  box-shadow: inset 0 -6px 8px rgba(0,0,0,0.25), 0 8px 18px rgba(0,0,0,0.26);
  font-family: var(--pixel-font);
  font-size: 16px;
  color: var(--black);
}

.section-index, .project-chip, .label, .card-time {
  font-family: var(--pixel-font);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--body-font);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--grey-3);
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--white);
  box-shadow: 14px 0 0 rgba(0,0,0,0.2);
}

.hero-title {
  margin: 18px 0 0;
  font-size: clamp(40px, 7vw, 82px);
  line-height: .92;
  letter-spacing: -.05em;
  text-transform: uppercase;
  color: var(--black);
  text-shadow: none;
  overflow-wrap: anywhere;
}

.ghost {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0,0,0,0.22);
}

.hero-summary, .section-copy, .content-card p, .project-body p {
  color: var(--grey-2);
  line-height: 1.75;
}

.hero-summary { margin-top: 22px; max-width: 30ch; font-size: clamp(16px, 2.2vw, 20px); }
.hero-meta, .tool-row, .project-tags { display: flex; flex-wrap: wrap; gap: 10px; }

.meta-chip, .tool-pill, .project-chip {
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.04);
  color: var(--ink);
}

.meta-chip {
  padding: 10px 12px;
  font-family: var(--body-font);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}
.info-card h3, .info-card p, .content-card h3, .content-card p, .project-body h3, .project-body p { margin: 0; }
.info-card h3 { font-size: 12px; color: var(--grey-3); text-transform: uppercase; }
.info-value { margin-top: 10px; font-size: 18px; line-height: 1.5; }
.tool-pill, .project-chip { padding: 8px 10px; font-size: 12px; border-radius: 999px; }

.section-shell {
  display: grid;
  grid-template-columns: minmax(220px, .55fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
}

.sticky-col { position: sticky; top: 0; min-height: 100vh; display: flex; align-items: center; }
.sticky-col,
.scroll-col {
  min-width: 0;
}
.sticky-frame, .contact-card { padding: clamp(24px, 4vw, 40px); }
.about-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.52fr) minmax(0, 1fr);
  gap: clamp(10px, 3vw, 48px);
  align-items: start;
}
.about-rail,
.about-cards,
.about-sidebar,
.about-content {
  min-width: 0;
}
.about-rail {
  min-width: min(320px, 100%);
}
.about-sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.about-content .scroll-col {
  padding-block: 0;
}
.about-section {
  container-type: inline-size;
}
.section-index { font-size: 12px; color: var(--grey-3); }

.section-title {
  margin: 18px 0 0;
  font-size: clamp(34px, 6vw, 74px);
  line-height: .96;
  letter-spacing: -.04em;
  text-transform: uppercase;
}

.section-copy { margin-top: 18px; max-width: 30ch; font-size: 15px; }
.scroll-col { display: grid; gap: 18px; padding-block: 14vh; }

.content-card {
  position: relative;
  padding: 24px;
  transform: translateY(24px);
  opacity: 0;
}

.content-card::before {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 46px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffffff, #8d8d8d);
  box-shadow: 0 0 16px rgba(255,255,255,0.08);
}

.content-card h3 { max-width: calc(100% - 48px); font-size: 22px; line-height: 1.35; }
.card-time { display: block; margin-bottom: 10px; font-size: 12px; color: var(--grey-3); }
.content-card p {
  margin-top: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-area { min-height: 100vh; display: grid; align-items: center; gap: 40px; }
.project-area {
  padding: clamp(24px, 4vw, 40px);
  border: 3px solid rgba(0,0,0,0.12);
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff, #f3f3f3);
  box-shadow: 0 24px 60px rgba(0,0,0,0.08);
}
.project-header { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; align-items: end; }
.project-copy { max-width: 48ch; }

.projects-gallery {
  width: 100%;
  display: flex;
  overflow-x: auto;
  overflow-y: visible;
  gap: clamp(18px, 2.5vw, 30px);
  padding: clamp(18px, 3vw, 28px) clamp(8px, 1.5vw, 16px) 24px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #111111 #d8d8d8;
  cursor: grab;
}

.projects-gallery:active { cursor: grabbing; }
.projects-gallery::-webkit-scrollbar { height: 8px; }
.projects-gallery::-webkit-scrollbar-track { background: #d8d8d8; border-radius: 999px; }
.projects-gallery::-webkit-scrollbar-thumb { background: #111111; border-radius: 999px; }

.gallery-card {
  flex: 0 0 clamp(280px, 34vw, 400px);
  min-height: clamp(440px, 46vw, 550px);
  padding: clamp(18px, 3vw, 30px);
  border: 4px solid #1a1a1a;
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff, #f1f1ee);
  box-shadow: 0 22px 48px rgba(0,0,0,0.14);
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
  scroll-snap-align: center;
  transform-origin: center bottom;
}

.gallery-card--link {
  color: inherit;
  text-decoration: none;
}

.gallery-card--link:focus-visible {
  outline: 3px solid #111111;
  outline-offset: 4px;
}

.gallery-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(0,0,0,0.1);
  border-radius: 18px;
  pointer-events: none;
}

.gallery-card--placeholder { opacity: 0.92; }

.gallery-screen {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 4px solid #1a1a1a;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(rgba(255,255,255,0.04) 50%, rgba(0,0,0,0.08) 50%), linear-gradient(180deg, #121212, #1a1a1a);
  background-size: 100% 4px, 100% 100%;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.gallery-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f6f6f4, #ecece8);
}

.gallery-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.gallery-stage,
.gallery-chip {
  font-family: var(--body-font);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.gallery-stage {
  padding: 8px 10px;
  border: 1px solid rgba(0,0,0,0.14);
  background: rgba(255,255,255,0.72);
  font-size: 12px;
}

.gallery-title-wrap {
  display: grid;
  gap: 6px;
}

.gallery-title {
  margin: 0;
  font-family: var(--body-font);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-transform: none;
  text-shadow: none;
}

.gallery-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: clamp(14px, 1.8vw, 18px);
  line-height: 1.25;
}

.gallery-desc {
  margin: 0;
  color: #3f3f3f;
  font-size: clamp(14px, 1.8vw, 18px);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-tags {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.gallery-chip {
  padding: clamp(8px, 1vw, 10px) clamp(10px, 1.2vw, 12px);
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  font-size: clamp(11px, 1.2vw, 12px);
}

.detail-page {
  overflow: auto;
}

.detail-page .page-shell {
  min-height: 100vh;
}

.detail-main {
  position: relative;
  z-index: 2;
  padding: clamp(28px, 6vw, 64px) clamp(12px, 4vw, 40px) clamp(56px, 8vw, 96px);
}

.detail-cabinet {
  width: min(1240px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 0;
}

.detail-marquee {
  position: relative;
  width: min(78%, 760px);
  margin: 0 auto;
  padding: 18px 22px;
  border: 6px solid #2e2e2e;
  border-bottom-width: 0;
  border-radius: 26px 26px 0 0;
  background: linear-gradient(180deg, #ffffff, #dcdcdc);
  box-shadow: inset 0 0 0 4px #111111;
  text-align: center;
}

.detail-marquee span {
  display: block;
  padding: 12px 16px;
  background: linear-gradient(180deg, #111111, #232323);
  color: var(--white);
  font-family: var(--pixel-font);
  font-size: clamp(13px, 1.4vw, 18px);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.detail-bezel {
  position: relative;
  padding: clamp(18px, 3vw, 34px);
  border: 8px solid #2e2e2e;
  border-radius: 36px;
  background: linear-gradient(180deg, #ffffff, #dbdbdb);
  box-shadow: inset 0 0 0 6px #111111, 0 30px 80px rgba(0,0,0,0.14);
}

.detail-screen {
  position: relative;
  display: grid;
  gap: clamp(20px, 3vw, 32px);
  padding: clamp(18px, 3vw, 30px);
  border: 8px solid #2a2a2a;
  border-radius: 24px;
  background:
    linear-gradient(rgba(255,255,255,0.03) 50%, rgba(0,0,0,0.12) 50%),
    radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 36%),
    linear-gradient(180deg, #0c0c0c, #111111);
  background-size: 100% 4px, 100% 100%, 100% 100%;
  box-shadow: inset 0 0 0 4px #050505, inset 0 0 60px rgba(255,255,255,0.03);
}

.detail-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.detail-back,
.detail-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 2px solid #2b2b2b;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #e2e2e2);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--pixel-font);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.detail-nav-link[aria-current="page"] {
  background: #111111;
  color: #ffffff;
}

.detail-nav {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-primary,
.detail-sidebar-panel,
.detail-summary-card,
.detail-process-card,
.detail-pages-card {
  position: relative;
  border: 3px solid #2c2c2c;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(232,232,232,0.97));
  box-shadow: var(--shadow);
}

.detail-primary::after,
.detail-sidebar-panel::after,
.detail-summary-card::after,
.detail-process-card::after,
.detail-pages-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  pointer-events: none;
}

.detail-primary {
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 28px);
}

.detail-primary--single {
  width: min(920px, 100%);
  margin: 0 auto;
}

.detail-stage-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.detail-stage-chip {
  padding: 8px 10px;
  border: 1px solid rgba(0,0,0,0.16);
  background: rgba(255,255,255,0.72);
  font-family: var(--pixel-font);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.detail-stage-chip--plain {
  font-family: var(--body-font);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.detail-title-wrap {
  display: grid;
  gap: 6px;
}

.detail-title {
  margin: 0;
  font-family: var(--body-font);
  font-size: clamp(34px, 5vw, 56px);
  line-height: .96;
  letter-spacing: -0.05em;
  text-transform: none;
  text-shadow: none;
}

.hero-title,
.section-title {
  font-family: var(--pixel-font);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.12);
}

.hero-title {
  font-size: clamp(26px, 4.2vw, 48px);
}

.hero-title .ghost {
  display: inline-block;
  margin-top: 10px;
}

.section-title {
  font-size: clamp(22px, 3vw, 36px);
}

.detail-subtitle {
  margin: 0;
  color: var(--grey-2);
  font-size: clamp(16px, 2vw, 20px);
}

.detail-cover {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 4px solid #1a1a1a;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(rgba(255,255,255,0.04) 50%, rgba(0,0,0,0.08) 50%), linear-gradient(180deg, #121212, #1a1a1a);
  background-size: 100% 4px, 100% 100%;
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.detail-summary-card,
.detail-process-card,
.detail-sidebar-panel,
.detail-pages-card {
  padding: clamp(18px, 3vw, 24px);
}

.detail-pages-card {
  display: grid;
  gap: 20px;
}

.detail-pages-head {
  display: grid;
  gap: 10px;
}

.detail-pages-flow {
  display: grid;
  gap: 18px;
}

.detail-page-shot {
  position: relative;
  margin: 0;
  padding: 14px;
  border: 3px solid #1f1f1f;
  border-radius: 18px;
  background:
    linear-gradient(rgba(255,255,255,0.04) 50%, rgba(0,0,0,0.08) 50%),
    linear-gradient(180deg, #121212, #1a1a1a);
  background-size: 100% 4px, 100% 100%;
  overflow: hidden;
}

.detail-page-shot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.detail-kicker {
  margin: 0 0 12px;
  color: var(--grey-3);
  font-family: var(--pixel-font);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.detail-copy {
  margin: 0;
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.8;
}

.detail-bullets {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.detail-bullets li {
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.7;
}

.detail-sidebar-meta {
  display: grid;
  gap: 14px;
}

.detail-sidebar-meta--inline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.detail-meta-item {
  display: grid;
  gap: 4px;
}

.detail-meta-label {
  color: var(--grey-3);
  font-family: var(--pixel-font);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.detail-meta-value {
  font-size: 18px;
  line-height: 1.5;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px clamp(20px, 4vw, 40px);
  border: 8px solid #2e2e2e;
  border-top-width: 0;
  border-radius: 0 0 32px 32px;
  background: linear-gradient(180deg, #ffffff, #d9d9d9);
  box-shadow: inset 0 0 0 6px #111111;
}

.detail-controls-copy {
  display: grid;
  gap: 4px;
}

.detail-controls-copy strong {
  font-family: var(--pixel-font);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.detail-controls-copy span {
  color: var(--grey-2);
  font-size: 14px;
}

.stage-console {
  display: grid;
  gap: 0;
  width: min(1500px, 100%);
  margin: 0 auto;
}

.project-stack {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 220px);
  grid-template-rows: 1fr;
  gap: 16px;
  align-items: start;
  height: min(42vw, 420px);
  min-height: 360px;
  border: 8px solid #2e2e2e;
  border-radius: 30px 30px 0 0;
  background:
    linear-gradient(rgba(255,255,255,0.12) 50%, rgba(0,0,0,0.03) 50%),
    radial-gradient(circle at top, rgba(255,255,255,0.18), transparent 34%),
    linear-gradient(180deg, #fafafa, #dedede);
  background-size: 100% 4px, 100% 100%, 100% 100%;
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow:
    inset 0 0 0 6px #5b5b5b,
    inset 0 0 0 12px #0a0a0a,
    0 28px 70px rgba(0,0,0,0.28);
  padding: 72px 22px 18px;
  scrollbar-width: thin;
  scrollbar-color: #4a4a4a #d8d8d8;
}

.project-stack::-webkit-scrollbar {
  height: 14px;
}

.project-stack::-webkit-scrollbar-track {
  background: #d8d8d8;
  border-radius: 999px;
}

.project-stack::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #575757, #242424);
  border-radius: 999px;
  border: 2px solid #d8d8d8;
}

.project-stack::before {
  content: "SELECT STAGE";
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 18px;
  border: 2px solid rgba(255,255,255,0.16);
  background: linear-gradient(180deg, #3d3d3d, #1a1a1a);
  color: var(--white);
  font-family: var(--pixel-font);
  font-size: 13px;
  letter-spacing: 0.12em;
  z-index: 3;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.stage-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px clamp(24px, 4vw, 40px);
  border: 8px solid #2e2e2e;
  border-top-width: 0;
  border-radius: 0 0 28px 28px;
  background: linear-gradient(180deg, #ffffff, #d7d7d7);
  box-shadow: inset 0 0 0 6px #111111;
}

.project-card {
  position: relative;
  width: 220px;
  min-width: 0;
  max-width: none;
  height: 260px;
  aspect-ratio: .74;
  padding: 12px;
  border: 4px solid #2d2d2d;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(229,229,229,0.96));
  box-shadow: 0 16px 30px rgba(0,0,0,0.16);
  transform-origin: center center;
  cursor: pointer;
  border-radius: 14px;
}

.project-card.is-placeholder {
  background:
    linear-gradient(135deg, rgba(0,0,0,0.06) 25%, transparent 25%) -8px 0 / 16px 16px,
    linear-gradient(225deg, rgba(0,0,0,0.06) 25%, transparent 25%) -8px 0 / 16px 16px,
    linear-gradient(315deg, rgba(0,0,0,0.06) 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(45deg, rgba(0,0,0,0.06) 25%, transparent 25%) 0 0 / 16px 16px,
    rgba(238,238,238,0.98);
}

.project-status {
  position: absolute;
  top: 24px;
  right: 24px;
  padding: 6px 8px;
  border: 1px solid rgba(0,0,0,0.14);
  background: rgba(0,0,0,0.04);
  font-family: var(--pixel-font);
  font-size: 11px;
  color: var(--black);
}

.project-thumb {
  height: 54%;
  overflow: hidden;
  border: 6px solid #202020;
  border-radius: 10px;
  background:
    linear-gradient(rgba(255,255,255,0.03) 50%, rgba(0,0,0,0.08) 50%),
    linear-gradient(180deg, #111111, #090909);
  background-size: 100% 4px, 100% 100%;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  filter: none;
  opacity: 1;
}

.project-body { display: grid; gap: 10px; margin-top: 14px; }
.project-body {
  display: grid;
  grid-template-rows: auto auto minmax(42px, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
  min-height: 0;
}
.project-body h3 {
  font-size: 17px;
  line-height: 1.2;
  color: var(--black);
  min-height: 40px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-body p {
  font-size: 12px;
  min-height: 44px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-stage-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-family: var(--pixel-font);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--grey-2);
}
.project-stage-label,
.project-stage-mode {
  padding: 5px 7px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.04);
}
.project-status {
  top: 14px;
  right: 14px;
  padding: 5px 6px;
  font-size: 10px;
}
.project-chip {
  padding: 6px 8px;
  font-size: 10px;
}
.project-tags {
  align-self: end;
}

.contact-section { padding-top: 2vh; padding-bottom: 12vh; }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.contact-box { padding: 16px; border: 1px solid var(--border); background: rgba(255,255,255,0.04); }
.contact-box { padding: 16px; border: 1px solid var(--border); background: rgba(0,0,0,0.04); }
.label { color: var(--grey-3); font-size: 11px; }
.contact-box strong { display: block; margin-top: 10px; font-size: 18px; line-height: 1.5; }

.contact-grid--duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

[data-lang], [data-lang-flex] { display: none !important; }
body.lang-zh [data-lang="zh"] { display: block !important; }
body.lang-en [data-lang="en"] { display: block !important; }
body.lang-zh [data-lang-flex="zh"], body.lang-en [data-lang-flex="en"] { display: flex !important; }

@keyframes blink {
  0%,45% { opacity: 1; }
  46%,100% { opacity: .25; }
}

@keyframes grain-drift {
  from { transform: translate3d(0,0,0); }
  to { transform: translate3d(0,-20px,0); }
}

@container (max-width: 1260px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .about-rail,
  .about-cards {
    width: 100%;
  }
  .about-sidebar {
    position: relative;
    min-height: auto;
  }
  .sticky-frame {
    width: 100%;
  }
}

@media (max-width: 960px) {
  .hero { min-height: auto; }
  .hero-panel, .section-shell, .contact-grid { grid-template-columns: 1fr; }
  .scroll-col { padding-block: 0; }
  .cabinet-controls { flex-direction: column; align-items: center; }
  .arcade-cabinet { width: min(900px, 100%); }
  .cabinet-marquee { width: min(86%, 720px); }
  .cabinet-controls { padding-inline: clamp(18px, 3vw, 28px); }
  .detail-grid,
  .detail-sidebar-meta--inline {
    grid-template-columns: 1fr;
  }
  .detail-controls {
    flex-direction: column;
    align-items: flex-start;
  }
  .project-area {
    min-height: auto;
    gap: 24px;
    padding: 20px;
  }
  .project-header {
    gap: 16px;
  }
  .gallery-card { flex-basis: clamp(300px, 48vw, 360px); min-height: 500px; }
}

@media (max-width: 760px) {
  .landing-card { padding-inline: 12px; }
  .hero-copy, .sticky-frame, .info-card, .content-card, .contact-card { border-radius: 14px; }
  .hero-panel { padding: clamp(18px, 4vw, 26px); }
  .cabinet-bezel { padding: 18px; border-radius: 24px; }
  .cabinet-controls { gap: 14px; padding: 18px; justify-content: center; text-align: center; }
  .detail-bezel { padding: 16px; border-radius: 24px; }
  .detail-screen { padding: 16px; border-radius: 20px; }
  .detail-controls { gap: 14px; padding: 18px; }
  .detail-marquee { width: min(90%, 760px); }
  .joystick,
  .stage-joystick { width: 100px; height: 82px; }
  .joystick-ball,
  .stage-joystick-ball { width: 30px; height: 30px; left: 14px; }
  .joystick-stick,
  .stage-joystick-stick { left: 25px; width: 8px; height: 36px; }
  .joystick-base,
  .stage-joystick-base { width: 64px; height: 24px; }
  .cabinet-button,
  .stage-button { width: 46px; height: 46px; font-size: 14px; }
  .projects-gallery { scroll-padding-inline: 8px; }
  .project-area {
    padding: 16px;
    gap: 18px;
  }
  .gallery-card { flex-basis: min(320px, 82vw); min-height: 470px; }
}

@media (max-width: 640px) {
  .sprite-wrap { width: 200px; height: 200px; }
  .pixel-sprite { width: 150px; height: 150px; }
  .landing-title { font-size: clamp(14px, 4.5vw, 18px); }
  .landing-kicker, .landing-note { font-size: 10px; }
  .cabinet-marquee span,
  .detail-marquee span { font-size: clamp(10px, 2.6vw, 12px); }
  .hero-title {
    font-size: clamp(22px, 7.2vw, 32px);
    line-height: 1.22;
    letter-spacing: 0.03em;
  }
  .section-title {
    font-size: clamp(16px, 5.8vw, 24px);
    line-height: 1.24;
    letter-spacing: 0.03em;
  }
  .detail-title {
    font-size: clamp(20px, 6.8vw, 28px);
    line-height: 1.2;
  }
  .detail-screen {
    gap: 14px;
    padding: 12px;
  }
  .detail-toolbar {
    gap: 10px;
    align-items: flex-start;
  }
  .detail-back {
    min-height: 34px;
    padding: 8px 10px;
    font-size: 10px;
    letter-spacing: 0.04em;
  }
  .detail-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }
  .detail-nav-link {
    min-height: 34px;
    padding: 8px 6px;
    font-size: 10px;
    letter-spacing: 0.04em;
  }
  .detail-primary,
  .detail-summary-card,
  .detail-process-card,
  .detail-sidebar-panel,
  .detail-pages-card {
    padding: 14px;
  }
  .detail-cover {
    padding: 6px;
    border-width: 3px;
    border-radius: 14px;
  }
  .detail-pages-flow {
    gap: 10px;
  }
  .detail-page-shot {
    padding: 6px;
    border-width: 2px;
    border-radius: 12px;
  }
  .detail-page-shot img {
    border-radius: 6px;
  }
  .project-area {
    padding: 14px;
    gap: 16px;
  }
  .project-header {
    gap: 12px;
  }
  .projects-gallery { padding: 12px 2px 18px; gap: 14px; }
  .gallery-card { flex: 0 0 min(300px, 84vw); min-height: 450px; padding: 16px; }
  .gallery-title { font-size: clamp(18px, 6vw, 22px); line-height: 1.2; }
  .gallery-subtitle, .gallery-desc { font-size: 15px; }
  .detail-copy, .detail-bullets li, .detail-meta-value { font-size: 15px; }
  .info-value { font-size: 16px; }
  .contact-box strong { font-size: 16px; }
  .meta-chip, .tool-pill, .gallery-chip { font-size: 11px; }
  .cabinet-marquee { width: 92%; }
}

@media (max-width: 420px) {
  .hero, .section { padding-inline: 10px; }
  .detail-main { padding-inline: 10px; }
  .landing-title { font-size: clamp(12px, 4vw, 14px); }
  .landing-kicker, .landing-note { font-size: 9px; }
  .hero-title {
    font-size: clamp(18px, 6.6vw, 24px);
    line-height: 1.24;
    letter-spacing: 0.02em;
  }
  .section-title {
    font-size: clamp(14px, 5.2vw, 18px);
    line-height: 1.28;
    letter-spacing: 0.02em;
  }
  .detail-title {
    font-size: clamp(18px, 6vw, 22px);
    line-height: 1.24;
  }
  .gallery-title { font-size: clamp(16px, 5.6vw, 18px); }
  .cabinet-marquee span,
  .detail-marquee span {
    font-size: 9px;
    letter-spacing: 0.04em;
  }
  .detail-screen {
    gap: 12px;
    padding: 10px;
  }
  .detail-toolbar {
    gap: 8px;
  }
  .detail-back {
    min-height: 32px;
    padding: 7px 9px;
    font-size: 9px;
  }
  .detail-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .detail-nav-link {
    min-height: 32px;
    padding: 7px 4px;
    font-size: 9px;
    letter-spacing: 0.03em;
  }
  .detail-primary,
  .detail-summary-card,
  .detail-process-card,
  .detail-sidebar-panel,
  .detail-pages-card {
    padding: 12px;
  }
  .detail-cover {
    padding: 4px;
    border-radius: 12px;
  }
  .detail-pages-flow {
    gap: 8px;
  }
  .detail-page-shot {
    padding: 4px;
    border-radius: 10px;
  }
  .lang-toggle button { min-width: 48px; padding: 8px 10px; }
  .bgm-credit {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 10px 12px;
  }
  .bgm-credit p {
    font-size: 11px;
    line-height: 1.5;
  }
  .cabinet-marquee { width: 100%; padding: 10px; }
  .detail-marquee { width: 100%; padding: 10px; }
  .project-area {
    padding: 12px;
    gap: 14px;
  }
  .projects-gallery {
    padding: 10px 0 16px;
    gap: 12px;
  }
  .gallery-card { flex-basis: min(280px, 86vw); min-height: 430px; }
  .gallery-stage { font-size: 11px; padding: 7px 8px; }
  .gallery-tags { gap: 8px; }
}
