:root {
  color-scheme: dark;
  --background: #080a0c;
  --surface: #111418;
  --surface-raised: #191d21;
  --ink: #f2e8d3;
  --muted: #a59b88;
  --accent: #d7aa56;
  --accent-bright: #f4d68d;
  --line: #34312b;
  --max-width: 1440px;
  --radius: 6px;
  --hero-height: 760px;
  --header-height: 76px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--background);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--background);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 75% 18%, rgba(215, 170, 86, 0.08), transparent 29rem),
    var(--background);
  color: var(--ink);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 20;
  content: "";
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.85'/%3E%3C/svg%3E");
}

body.game-is-open {
  overflow: hidden;
}

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

button {
  color: inherit;
  font: inherit;
}

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

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

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--background);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.gallery-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding-inline: clamp(20px, 4vw, 64px);
  border-bottom: 1px solid rgba(242, 232, 211, 0.14);
  background: linear-gradient(rgba(8, 10, 12, 0.66), transparent);
  backdrop-filter: blur(8px);
}

.gallery-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.gallery-brand strong,
.gallery-brand small {
  display: block;
}

.gallery-brand strong {
  font-size: 0.75rem;
}

.gallery-brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.59rem;
}

.brand-pixel {
  width: 11px;
  height: 11px;
  background: var(--accent);
  box-shadow: 4px 4px 0 rgba(215, 170, 86, 0.28);
}

.gallery-header nav {
  display: flex;
  gap: clamp(20px, 3vw, 42px);
  color: rgba(242, 232, 211, 0.74);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
}

.gallery-header nav a {
  position: relative;
  padding-block: 10px;
}

.gallery-header nav a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  content: "";
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms ease;
}

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

.exhibition-hero {
  position: relative;
  min-height: min(100svh, var(--hero-height));
  overflow: hidden;
  display: grid;
  align-items: end;
  isolation: isolate;
}

.hero-image,
.hero-vignette {
  position: absolute;
  inset: 0;
}

.hero-image {
  z-index: -3;
  background: #030405;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  filter: saturate(0.76) contrast(1.1) brightness(0.62);
  transform: scale(1.025);
  animation: hero-breathe 16s ease-in-out infinite alternate;
}

.hero-vignette {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(8, 10, 12, 0.9) 0%, rgba(8, 10, 12, 0.48) 43%, rgba(8, 10, 12, 0.12) 75%),
    linear-gradient(0deg, var(--background) 0%, transparent 36%),
    radial-gradient(circle at 50% 45%, transparent 12%, rgba(0, 0, 0, 0.66) 115%);
}

.hero-vignette::after {
  position: absolute;
  inset: 0;
  content: "";
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, 0.06) 3px 4px);
}

.hero-copy {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: calc(var(--header-height) + 70px) clamp(0px, 3vw, 40px) clamp(64px, 9vh, 112px);
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--accent-bright);
  font-size: clamp(0.65rem, 1vw, 0.78rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 850px;
  margin: 0;
  white-space: pre-line;
  font-family: Georgia, "Songti SC", "Times New Roman", serif;
  font-size: clamp(2.9rem, 7.6vw, 7.4rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.98;
  text-shadow: 0 16px 55px rgba(0, 0, 0, 0.55);
}

.hero-intro {
  max-width: 590px;
  margin: 28px 0 0;
  color: rgba(242, 232, 211, 0.74);
  font-size: clamp(0.98rem, 1.5vw, 1.2rem);
  line-height: 1.85;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  color: var(--muted);
  font-size: 0.73rem;
  letter-spacing: 0.12em;
}

.scroll-cue > span:first-child {
  color: var(--accent);
  animation: scroll-cue 1.6s ease-in-out infinite;
}

.hero-counter {
  position: absolute;
  right: clamp(22px, 4vw, 64px);
  bottom: clamp(28px, 6vh, 68px);
  margin: 0;
  color: rgba(242, 232, 211, 0.5);
  font-family: Georgia, serif;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  writing-mode: vertical-rl;
}

.work-section {
  position: relative;
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: clamp(90px, 11vw, 164px) clamp(0px, 3vw, 40px);
}

.section-rail {
  position: absolute;
  top: clamp(90px, 11vw, 164px);
  left: clamp(-6px, 0vw, 0px);
  display: flex;
  flex-direction: column;
  gap: 13px;
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.section-rail p {
  margin: 0;
}

.section-rail span {
  color: var(--accent);
}

.featured-work {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(350px, 0.9fr);
  gap: clamp(42px, 7vw, 108px);
  align-items: center;
  margin-left: clamp(32px, 5vw, 74px);
}

.featured-work + .featured-work {
  margin-top: clamp(100px, 13vw, 190px);
}

.work-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  padding: clamp(7px, 1vw, 12px);
  border: 1px solid var(--line);
  background: #08090a;
  box-shadow: 0 42px 110px rgba(0, 0, 0, 0.35);
}

.work-poster::before {
  position: absolute;
  inset: 4%;
  z-index: 1;
  border: 1px solid rgba(242, 232, 211, 0.12);
  content: "";
  pointer-events: none;
}

.work-poster img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(0.83) contrast(1.05);
}

.poster-state {
  position: absolute;
  right: clamp(15px, 2vw, 26px);
  bottom: clamp(15px, 2vw, 26px);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid rgba(242, 232, 211, 0.16);
  background: rgba(8, 10, 12, 0.74);
  backdrop-filter: blur(10px);
  color: rgba(242, 232, 211, 0.84);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.poster-state i,
.toolbar-light {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #78b987;
  box-shadow: 0 0 9px rgba(120, 185, 135, 0.8);
}

.work-kicker {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.67rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.work-kicker span + span::before {
  margin-right: 16px;
  content: "—";
  color: var(--line);
}

.work-content h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(2.5rem, 5vw, 5.2rem);
  font-weight: 400;
  line-height: 0.98;
}

.work-content h2 small {
  display: block;
  margin-top: 13px;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.26em;
  font-style: italic;
  letter-spacing: 0.06em;
}

.work-description {
  max-width: 610px;
  margin: 29px 0 0;
  color: rgba(242, 232, 211, 0.72);
  font-size: 0.98rem;
  line-height: 1.9;
}

.work-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 30px 0 0;
  border-block: 1px solid var(--line);
}

.work-meta div {
  padding: 18px 14px 18px 0;
}

.work-meta div + div {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.work-meta dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.13em;
}

.work-meta dd {
  margin: 0;
  font-size: 0.78rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}

.tag-list span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.66rem;
}

.work-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-play {
  min-width: 176px;
  background: var(--accent);
  color: #15120c;
}

.button-play:hover {
  background: var(--accent-bright);
}

.button-play:disabled {
  cursor: wait;
  opacity: 0.5;
  transform: none;
}

.button-source {
  min-width: 158px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.button-source:hover {
  border-color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
}

.release-state {
  min-height: 1.4em;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.release-state.is-error {
  color: #e5a29a;
}

.work-notes {
  display: grid;
  grid-template-columns: 0.75fr 0.75fr 1.5fr;
  gap: clamp(28px, 5vw, 74px);
  margin: clamp(88px, 11vw, 150px) 0 0 clamp(32px, 5vw, 74px);
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.work-notes h3 {
  margin: 0 0 16px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 1.05rem;
  font-weight: 400;
}

.note-index {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
}

.work-notes ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.9;
}

.work-notes li::before {
  margin-right: 9px;
  content: "·";
  color: var(--accent);
}

.work-notes blockquote {
  margin: 0;
  padding-left: clamp(24px, 3vw, 45px);
  border-left: 1px solid var(--line);
}

.work-notes blockquote p {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(1.15rem, 2vw, 1.75rem);
  line-height: 1.6;
}

.work-notes cite {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.63rem;
  letter-spacing: 0.13em;
}

.gallery-footer {
  width: min(calc(100% - 40px), var(--max-width));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  margin: 0 auto;
  padding: 28px clamp(0px, 3vw, 40px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
}

.gallery-footer p {
  margin: 0;
}

.gallery-footer p:nth-child(2) {
  text-align: center;
}

.gallery-footer a {
  justify-self: end;
  color: var(--ink);
}

.game-layer {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  grid-template-rows: 50px minmax(0, 1fr);
  background: #000;
  animation: game-enter 260ms ease both;
}

.game-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 12px 0 18px;
  border-bottom: 1px solid #292929;
  background: #0c0e10;
  color: #d8d4ca;
}

.game-toolbar > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.game-toolbar strong {
  overflow: hidden;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-toolbar nav {
  height: 100%;
  display: flex;
  align-items: center;
}

.game-toolbar button,
.game-toolbar a {
  height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid #292929;
  background: transparent;
  color: #a5a39d;
  cursor: pointer;
  font-size: 0.67rem;
}

.game-toolbar button:hover,
.game-toolbar a:hover {
  color: #fff;
}

.game-toolbar .game-exit {
  margin-left: 5px;
  border: 1px solid #49302c;
  background: #241514;
  color: #e6b1a9;
}

.game-stage {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #000;
}

.game-stage iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #000;
}

.game-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 30px;
  background: #030405;
  text-align: center;
  transition: opacity 320ms ease, visibility 320ms ease;
}

.game-loading.is-complete {
  visibility: hidden;
  opacity: 0;
}

.game-loading strong {
  margin-top: 20px;
  color: #e7deca;
  font-family: Georgia, "Songti SC", serif;
  font-size: 1.2rem;
  font-weight: 400;
}

.game-loading p {
  margin: 8px 0 0;
  color: #77746c;
  font-size: 0.72rem;
}

.landscape-guard {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 28px;
  background: #050607;
  color: #e7deca;
  text-align: center;
}

.landscape-guard strong {
  margin-top: 22px;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(1.35rem, 7vw, 2.2rem);
  font-weight: 400;
}

.landscape-guard p {
  max-width: 470px;
  margin: 12px 0 22px;
  color: #8e8b84;
  font-size: 0.78rem;
  line-height: 1.7;
}

.rotate-phone {
  position: relative;
  width: 76px;
  height: 44px;
  border: 3px solid #d6b86f;
  border-radius: 8px;
  box-shadow: 0 0 28px rgba(214, 184, 111, 0.18);
}

.rotate-phone::before {
  position: absolute;
  top: 50%;
  right: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d6b86f;
  content: "";
  transform: translateY(-50%);
}

.rotate-phone::after {
  position: absolute;
  inset: -14px -18px;
  border: 1px dashed rgba(214, 184, 111, 0.48);
  border-radius: 50%;
  content: "";
  animation: rotate-device 1.8s ease-in-out infinite alternate;
}

.loading-bars {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 23px;
}

.loading-bars i {
  width: 5px;
  height: 8px;
  background: var(--accent);
  animation: loading 850ms ease-in-out infinite alternate;
}

.loading-bars i:nth-child(2) {
  height: 15px;
  animation-delay: 130ms;
}

.loading-bars i:nth-child(3) {
  height: 21px;
  animation-delay: 260ms;
}

.mobile-prompt {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(12px);
}

.mobile-prompt > div {
  width: min(100%, 470px);
  padding: clamp(28px, 8vw, 50px);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.55);
}

.mobile-prompt h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 2rem;
  font-weight: 400;
}

.mobile-prompt > div > p:not(.eyebrow) {
  margin: 16px 0 25px;
  color: var(--muted);
  line-height: 1.7;
}

.mobile-prompt > div > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gallery-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  max-width: min(400px, calc(100% - 40px));
  padding: 11px 14px;
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--ink);
  font-size: 0.74rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(15px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.gallery-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes hero-breathe {
  from { transform: scale(1.025); }
  to { transform: scale(1.075); }
}

@keyframes scroll-cue {
  50% { transform: translateY(6px); }
}

@keyframes loading {
  to { opacity: 0.25; transform: scaleY(0.45); }
}

@keyframes rotate-device {
  from { transform: rotate(-8deg); opacity: 0.45; }
  to { transform: rotate(8deg); opacity: 1; }
}

@keyframes game-enter {
  from { opacity: 0; transform: scale(1.012); }
}

@media (max-width: 900px) {
  .hero-copy h1 {
    max-width: 680px;
  }

  .featured-work {
    grid-template-columns: 1fr;
    margin-left: 30px;
  }

  .work-content {
    max-width: 700px;
  }

  .work-notes {
    grid-template-columns: 1fr 1fr;
    margin-left: 30px;
  }

  .work-notes blockquote {
    grid-column: 1 / -1;
    padding: 28px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 620px) {
  :root {
    --header-height: 66px;
  }

  .gallery-header {
    padding-inline: 16px;
  }

  .gallery-header nav {
    gap: 14px;
  }

  .gallery-header nav a:first-child {
    display: none;
  }

  .hero-copy {
    width: min(calc(100% - 32px), var(--max-width));
    padding-bottom: 70px;
  }

  .hero-copy h1 {
    font-size: clamp(2.8rem, 14vw, 4.7rem);
  }

  .hero-vignette {
    background:
      linear-gradient(90deg, rgba(8, 10, 12, 0.79), rgba(8, 10, 12, 0.22)),
      linear-gradient(0deg, var(--background), transparent 58%),
      radial-gradient(circle at 50% 45%, transparent, rgba(0, 0, 0, 0.66) 115%);
  }

  .hero-counter {
    display: none;
  }

  .work-section {
    width: min(calc(100% - 32px), var(--max-width));
    padding-block: 76px;
  }

  .section-rail {
    display: none;
  }

  .featured-work,
  .work-notes {
    margin-left: 0;
  }

  .featured-work {
    gap: 35px;
  }

  .work-meta {
    grid-template-columns: 1fr;
  }

  .work-meta div + div {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .work-notes {
    grid-template-columns: 1fr;
  }

  .work-notes blockquote {
    grid-column: auto;
  }

  .gallery-footer {
    grid-template-columns: 1fr auto;
  }

  .gallery-footer p:nth-child(2) {
    display: none;
  }

  .game-layer {
    grid-template-rows: 44px minmax(0, 1fr);
  }

  .game-toolbar {
    padding-left: 10px;
  }

  .game-toolbar strong,
  .game-toolbar a {
    display: none;
  }

  .game-toolbar button {
    padding-inline: 9px;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .game-layer {
    grid-template-rows: 38px minmax(0, 1fr);
  }

  .game-toolbar button,
  .game-toolbar a {
    height: 28px;
  }

  .landscape-guard {
    display: none;
  }
}

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

:root[data-motion="off"] *,
:root[data-motion="off"] *::before,
:root[data-motion="off"] *::after {
  animation: none !important;
  transition: none !important;
}

:root[data-grain="off"] body::after {
  display: none;
}

:root[data-scanlines="off"] .hero-vignette::after {
  display: none;
}
