/* 3899 游戏厅 */

/* 注册颜色变量，切换游戏时整页颜色平滑过渡 */
@property --scrim { syntax: '<color>'; inherits: true; initial-value: #07080c; }
@property --ink { syntax: '<color>'; inherits: true; initial-value: #f4f1ea; }
@property --accent { syntax: '<color>'; inherits: true; initial-value: #3ee0ff; }
@property --accent-ink { syntax: '<color>'; inherits: true; initial-value: #041018; }
@property --glow { syntax: '<color>'; inherits: true; initial-value: #3ee0ff; }

:root {
  --scrim: #07080c;
  --ink: #f4f1ea;
  --accent: #3ee0ff;
  --accent-ink: #041018;
  --glow: #3ee0ff;
  --ink-2: color-mix(in srgb, var(--ink) 74%, transparent);
  --ink-3: color-mix(in srgb, var(--ink) 52%, transparent);
  --line: color-mix(in srgb, var(--ink) 18%, transparent);
  --glass: color-mix(in srgb, var(--scrim) 42%, transparent);

  --f-ui: 'Hall', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  --f-latin: 'HallLatin', 'Hall', system-ui, sans-serif;
  --f-body: system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;

  --gutter: clamp(20px, 5.2vw, 96px);
  --card-w: clamp(96px, min(10.4vw, 17vh), 184px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);

  --mx: 0;
  --my: 0;

  color-scheme: dark;
  transition: --scrim 1.1s ease, --ink .9s ease, --accent .9s ease, --accent-ink .9s ease, --glow 1.1s ease;
}

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

html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; background: #07080c; }

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  /* 列宽锁死在屏幕宽度，不然一排卡片会把整页撑宽 */
  grid-template-columns: minmax(0, 1fr);
  background: var(--scrim);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

body.is-playing { overflow: hidden; }

button { font: inherit; color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.9em;
  height: 1.75em;
  padding: 0 .45em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  font-family: var(--f-latin);
  font-size: .72em;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1;
}

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

/* ───────── 开机画面 ───────── */
.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #07080c;
  transition: opacity .8s ease, visibility 0s linear .8s;
}
.boot-mark {
  display: grid;
  justify-items: center;
  gap: 14px;
  color: #f4f1ea;
}
.boot-mark span {
  font-family: var(--f-latin);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: .4em;
  padding-left: .4em;
  opacity: .9;
}
.boot-mark i {
  display: block;
  width: 120px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #f4f1ea, transparent);
  background-size: 200% 100%;
  animation: boot-sweep 1.2s linear infinite;
  opacity: .6;
}
@keyframes boot-sweep { from { background-position: 150% 0; } to { background-position: -50% 0; } }
html:not(.is-booting) .boot { opacity: 0; visibility: hidden; }

/* ───────── 背景舞台 ───────── */
.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.stage-bg {
  position: absolute;
  inset: -3%;
  transform: translate3d(calc(var(--mx) * -16px), calc(var(--my) * -10px), 0);
  transition: transform 1.2s var(--ease-out);
}
.bg-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.bg-layer.is-on { opacity: 1; }
.bg-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 62% 50%);
  transform-origin: var(--focus, 62% 50%);
  animation: kenburns 28s ease-in-out infinite alternate;
}
.bg-layer.is-entering img { animation: bg-enter 1.6s var(--ease-out) both, kenburns 28s ease-in-out 1.6s infinite alternate; }
@keyframes kenburns { from { transform: scale(1.02); } to { transform: scale(1.1); } }
@keyframes bg-enter { from { transform: scale(1.12); filter: blur(10px); } to { transform: scale(1.02); filter: blur(0); } }

.stage-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: translate3d(calc(var(--mx) * -30px), calc(var(--my) * -18px), 0);
  transition: transform 1.2s var(--ease-out);
}

.stage-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--scrim) 95%, transparent) 0%,
      color-mix(in srgb, var(--scrim) 84%, transparent) 26%,
      color-mix(in srgb, var(--scrim) 46%, transparent) 46%,
      color-mix(in srgb, var(--scrim) 12%, transparent) 60%,
      transparent 72%),
    linear-gradient(0deg,
      color-mix(in srgb, var(--scrim) 97%, transparent) 0%,
      color-mix(in srgb, var(--scrim) 72%, transparent) 20%,
      transparent 48%),
    linear-gradient(180deg,
      color-mix(in srgb, var(--scrim) 60%, transparent) 0%,
      transparent 18%);
}
html[data-tone='dark'] .stage-scrim::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 66% 42%, transparent 55%, rgb(0 0 0 / .38) 100%);
}

.stage-grain {
  position: absolute;
  inset: -50%;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  animation: grain 1.4s steps(6) infinite;
}
html[data-tone='light'] .stage-grain { opacity: .16; mix-blend-mode: multiply; filter: invert(1); }
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, -2%); }
  80% { transform: translate(5%, 4%); }
  100% { transform: translate(0, 0); }
}

/* ───────── 顶栏 ───────── */
.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: max(18px, env(safe-area-inset-top)) var(--gutter) 0;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand-logo { width: 28px; height: 28px; color: var(--accent); transition: color .9s ease; }
.brand-num {
  font-family: var(--f-latin);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .14em;
}
.brand-zh {
  font-family: var(--f-ui);
  font-size: 19px;
  letter-spacing: .08em;
  color: var(--ink-2);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--f-ui);
  color: var(--ink-2);
}
.greet { font-size: 16px; letter-spacing: .06em; }
.clock {
  font-family: var(--f-latin);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
  cursor: pointer;
  transition: border-color .3s ease, transform .3s var(--ease-out), background .3s ease;
}
.icon-btn:hover { border-color: color-mix(in srgb, var(--ink) 40%, transparent); transform: translateY(-1px); }
.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-btn .spk { fill: currentColor; stroke: none; }
.sound-btn .mute { display: none; }
.sound-btn[aria-pressed='false'] .wave { display: none; }
.sound-btn[aria-pressed='false'] .mute { display: inline; }

/* ───────── 主视觉文字 ───────── */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: clamp(8px, 2vh, 28px) var(--gutter) clamp(10px, 2.4vh, 30px);
  min-height: 300px;
  /* 按这一块实际剩下的高度来缩放标题、决定显示多少文字 */
  container-type: size;
  container-name: hero;
}
.hero-copy {
  width: min(620px, 52vw);
  display: grid;
  justify-items: start;
}

.kicker {
  text-shadow: 0 1px 10px color-mix(in srgb, var(--scrim) 80%, transparent);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 clamp(8px, 3.4cqh, 22px);
  font-family: var(--f-latin);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .24em;
  color: var(--ink-2);
}
.kicker-idx { color: var(--accent); font-weight: 700; }
.kicker-line { width: 36px; height: 1px; background: currentColor; opacity: .6; }
.kicker-genre { font-family: var(--f-ui); font-size: 15px; letter-spacing: .3em; }
.kicker-total { opacity: .55; }

.title {
  --k: 1;
  margin: 0;
  font-family: var(--f-ui);
  font-weight: 400;
  font-size: calc(clamp(48px, min(8.2vw, 23cqh), 144px) * var(--k));
  line-height: 1;
  letter-spacing: .02em;
  color: var(--ink);
}
.title-text { display: block; }
.title .ln { display: block; white-space: nowrap; }
.title .ch { display: inline-block; will-change: transform, opacity; }

.title[data-font='brush'] { font-family: 'T-brush', var(--f-ui); letter-spacing: .04em; line-height: 1.05; }
.title[data-font='smiley'] {
  font-family: 'Hall', var(--f-ui);
  letter-spacing: .01em;
  text-shadow: 0 0 46px color-mix(in srgb, var(--glow) 45%, transparent);
}
.title[data-font='kuaile'] {
  font-family: 'T-kuaile', var(--f-ui);
  letter-spacing: .02em;
}
/* 渐变字要加在每个字上：逐字动画会让每个字单独成层，父级的渐变裁不到 */
.title[data-font='kuaile'] .ch {
  background: linear-gradient(180deg, #fff3a8 0%, #ffc93a 42%, #ff8a1c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 .03em 0 #b14400) drop-shadow(0 .06em 0 #7a2c00) drop-shadow(0 .14em .18em rgb(0 0 0 / .45));
  padding-bottom: .1em;
}
.title[data-font='heavy'] {
  font-family: 'T-heavy', var(--f-ui);
  font-weight: 900;
  letter-spacing: .04em;
}
.title[data-font='heavy']::after {
  content: '';
  display: block;
  width: 1.1em;
  height: .07em;
  margin-top: .16em;
  background: var(--accent);
}
.title[data-font='qingke'] { font-family: 'T-qingke', var(--f-ui); letter-spacing: .04em; }
.title[data-font='qingke'] .ch {
  /* 每个字取整条渐变里属于自己的那一段，连起来还是一条完整的青→白→红 */
  background: linear-gradient(100deg, #8ff7ea 0%, #e8f6ff 52%, #ff9585 100%);
  background-size: calc(var(--len) * 1.04em) 100%;
  background-position: calc(var(--i) * -1.04em) 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 .2em rgb(47 224 207 / .35));
}

.en {
  text-shadow: 0 1px 10px color-mix(in srgb, var(--scrim) 80%, transparent);
  margin: clamp(8px, 2.6cqh, 18px) 0 0;
  font-family: var(--f-latin);
  font-size: clamp(11px, .9vw, 13px);
  font-weight: 500;
  letter-spacing: .36em;
  color: var(--ink-3);
}
.tagline {
  margin: clamp(10px, 4cqh, 26px) 0 0;
  text-shadow: 0 1px 18px color-mix(in srgb, var(--scrim) 80%, transparent);
  font-family: var(--f-ui);
  font-size: clamp(20px, 1.9vw, 30px);
  line-height: 1.3;
  letter-spacing: .04em;
}
.desc {
  margin: clamp(6px, 1.8cqh, 12px) 0 0;
  max-width: 29em;
  text-shadow: 0 1px 14px color-mix(in srgb, var(--scrim) 85%, transparent);
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.8;
  color: var(--ink-2);
  text-wrap: pretty;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: clamp(10px, 3.2cqh, 22px) 0 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--f-ui);
  font-size: 14px;
  letter-spacing: .06em;
  line-height: 1.4;
  color: var(--ink-2);
}
.chips li.is-key {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--ink);
}
.device-warn {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--accent);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: clamp(14px, 5cqh, 34px);
}
.play-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px 0 22px;
  height: 60px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--f-ui);
  font-size: 22px;
  letter-spacing: .12em;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgb(255 255 255 / .35) inset,
    0 14px 40px -12px color-mix(in srgb, var(--accent) 80%, transparent),
    0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent);
  transition: transform .35s var(--ease-out), box-shadow .35s ease;
  animation: play-pulse 2.8s ease-out infinite;
}
.play-btn svg { width: 22px; height: 22px; fill: currentColor; }
.play-btn kbd {
  border-color: color-mix(in srgb, var(--accent-ink) 30%, transparent);
  color: color-mix(in srgb, var(--accent-ink) 75%, transparent);
  font-size: 11px;
  margin-left: 4px;
}
.play-btn:hover { transform: translateY(-2px) scale(1.02); }
.play-btn:active { transform: translateY(0) scale(.98); }
.play-btn-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgb(255 255 255 / .55) 48%, transparent 66%);
  transform: translateX(-120%);
  pointer-events: none;
}
.play-btn:hover .play-btn-shine { animation: shine .9s var(--ease-out); }
@keyframes shine { to { transform: translateX(120%); } }
@keyframes play-pulse {
  0% { box-shadow: 0 1px 0 rgb(255 255 255 / .35) inset, 0 14px 40px -12px color-mix(in srgb, var(--accent) 80%, transparent), 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  70%, 100% { box-shadow: 0 1px 0 rgb(255 255 255 / .35) inset, 0 14px 40px -12px color-mix(in srgb, var(--accent) 80%, transparent), 0 0 0 16px color-mix(in srgb, var(--accent) 0%, transparent); }
}

.domain {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 2px;
  font-family: var(--f-latin);
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .25s ease, border-color .25s ease;
}
.domain:hover { color: var(--ink); border-bottom-color: var(--line); }
.domain-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 0 3px rgb(61 220 132 / .18);
}
.domain svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* 切换游戏时文字的进出 */
.hero-copy > * { transition: opacity .28s ease, transform .28s ease; }
.hero-copy.is-out > :not(.title) { opacity: 0; transform: translateY(10px); }
.hero-copy.is-out .title .ch { opacity: 0; transform: translateY(18px); transition: opacity .2s ease, transform .2s ease; }

/* ───────── 游戏架子 ───────── */
.shelf {
  position: relative;
  z-index: 1;
  padding: 0 0 max(22px, env(safe-area-inset-bottom));
}
.shelf-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 var(--gutter);
  font-family: var(--f-ui);
  color: var(--ink-3);
}
.shelf-title { font-size: 15px; letter-spacing: .3em; }
.shelf-hint { font-size: 14px; letter-spacing: .06em; display: inline-flex; align-items: center; gap: 4px; padding-left: 18px; border-left: 1px solid var(--line); opacity: .85; }
.shelf-hint kbd { font-size: 10px; }

.shelf-track {
  display: flex;
  align-items: flex-end;
  gap: clamp(14px, 1.5vw, 24px);
  padding: 30px var(--gutter) 6px;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  scroll-padding-inline: var(--gutter);
}
.shelf-track::-webkit-scrollbar { display: none; }

.card {
  --rx: 0deg;
  --ry: 0deg;
  --gx: 50%;
  --gy: 30%;
  --lift: 0px;
  --scale: 1;
  flex: 0 0 var(--card-w);
  display: grid;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  perspective: 900px;
  -webkit-user-select: none;
  user-select: none;
}
.card:focus-visible { outline: none; }
.card-media {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background: color-mix(in srgb, var(--ink) 8%, transparent) center / cover no-repeat;
  transform: translateY(var(--lift)) scale(var(--scale)) rotateX(var(--rx)) rotateY(var(--ry));
  transform-origin: 50% 100%;
  box-shadow: 0 18px 36px -18px rgb(0 0 0 / .7);
  filter: brightness(.66) saturate(.8);
  transition: transform .55s var(--ease-out), filter .45s ease, box-shadow .45s ease;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease-out);
}
.card-media::before {
  /* 选中时的描边光环 */
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .14);
  transition: box-shadow .4s ease;
}
.card-media::after {
  /* 跟着鼠标走的反光 */
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at var(--gx) var(--gy), rgb(255 255 255 / .36), rgb(255 255 255 / 0) 52%);
  mix-blend-mode: soft-light;
  opacity: 0;
  transition: opacity .35s ease;
}
.card-label {
  display: grid;
  gap: 2px;
  padding-left: 2px;
  transform: translateY(var(--lift));
  transition: transform .55s var(--ease-out), opacity .4s ease;
  opacity: .62;
}
.card-label b {
  font-family: var(--f-ui);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: .06em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-label small {
  font-family: var(--f-latin);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--ink-3);
}

.card:hover .card-media { filter: brightness(.92) saturate(.95); }
.card:hover .card-media::after { opacity: 1; }
.card:hover .card-media img { transform: scale(1.04); }

.card[aria-selected='true'] { --lift: -14px; --scale: 1.07; }
.card[aria-selected='true'] .card-media {
  filter: none;
  box-shadow:
    0 0 0 2px var(--scrim),
    0 0 0 4px var(--accent),
    0 30px 60px -22px color-mix(in srgb, var(--glow) 75%, transparent);
}
.card[aria-selected='true'] .card-label { opacity: 1; }
.card[aria-selected='true'] .card-label small { color: var(--accent); }
.card:focus-visible .card-media { box-shadow: 0 0 0 2px var(--scrim), 0 0 0 4px var(--ink); }

/* ───────── 进入游戏的过场 ───────── */
.launch {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  background: #000;
  color: #fff;
}
.launch-media { position: absolute; inset: 0; }
.launch-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.launch-hero { animation: kenburns 20s ease-in-out infinite alternate; }
.launch-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 60% at 50% 55%, rgb(0 0 0 / .55), rgb(0 0 0 / .2) 70%, rgb(0 0 0 / .45)),
    linear-gradient(0deg, rgb(0 0 0 / .65), transparent 40%);
}
.launch-center {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
}
.launch-genre {
  font-family: var(--f-ui);
  font-size: 16px;
  letter-spacing: .5em;
  padding-left: .5em;
  opacity: .8;
}
.launch-title {
  font-family: var(--f-ui);
  font-size: clamp(54px, 9vw, 140px);
  line-height: 1.05;
  letter-spacing: .04em;
  text-shadow: 0 6px 40px rgb(0 0 0 / .55);
}
.launch-title[data-font='brush'] { font-family: 'T-brush', var(--f-ui); }
.launch-title[data-font='kuaile'] { font-family: 'T-kuaile', var(--f-ui); color: #ffd23f; }
.launch-title[data-font='heavy'] { font-family: 'T-heavy', var(--f-ui); font-weight: 900; }
.launch-title[data-font='qingke'] { font-family: 'T-qingke', var(--f-ui); }
.launch-title.is-long { font-size: clamp(40px, 6.4vw, 100px); }
.launch-bar {
  width: min(320px, 70vw);
  height: 3px;
  margin-top: 10px;
  border-radius: 3px;
  background: rgb(255 255 255 / .18);
  overflow: hidden;
}
.launch-bar i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.launch-status {
  font-family: var(--f-ui);
  font-size: 15px;
  letter-spacing: .3em;
  padding-left: .3em;
  opacity: .78;
}
.launch-tip {
  max-width: 36em;
  font-size: 14px;
  line-height: 1.8;
  opacity: .66;
}
.launch.is-revealing { transition: opacity .7s ease; opacity: 0; pointer-events: none; }

/* ───────── 游戏窗口 ───────── */
.player {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #000;
}
.player-frame, .player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}

/* 顶部小把手：鼠标移上去或点一下，展开「返回大厅」 */
.dock {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
  padding: 0 16px 14px;
  color: #fff;
  font-family: var(--f-ui);
}
.dock-handle {
  display: grid;
  place-items: center;
  width: 96px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.dock-handle i {
  display: block;
  width: 54px;
  height: 7px;
  margin-top: -1px;
  border-radius: 0 0 8px 8px;
  background: rgb(18 19 24 / .62);
  border: 1px solid rgb(255 255 255 / .28);
  border-top: 0;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgb(0 0 0 / .35);
  transition: width .3s var(--ease-out), background .3s ease;
}
.dock:hover .dock-handle i, .dock.is-open .dock-handle i { width: 72px; background: rgb(18 19 24 / .85); }
.dock-panel {
  display: flex;
  gap: 4px;
  margin-top: 2px;
  padding: 6px;
  border: 1px solid rgb(255 255 255 / .16);
  border-radius: 16px;
  background: rgb(14 15 20 / .78);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 20px 50px -12px rgb(0 0 0 / .65);
  opacity: 0;
  transform: translateY(-14px) scale(.96);
  pointer-events: none;
  transition: opacity .25s ease, transform .35s var(--ease-out);
}
.dock.is-open .dock-panel { opacity: 1; transform: none; pointer-events: auto; }
.dock-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgb(255 255 255 / .86);
  font-family: var(--f-ui);
  font-size: 16px;
  letter-spacing: .06em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.dock-btn:hover { background: rgb(255 255 255 / .1); color: #fff; }
.dock-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dock-home { background: var(--accent); color: var(--accent-ink); }
.dock-home:hover { background: var(--accent); color: var(--accent-ink); filter: brightness(1.08); }

/* ───────── 开场动画 ───────── */
html.is-intro .bg-layer.is-on img { animation: bg-enter 2.2s var(--ease-out) both, kenburns 28s ease-in-out 2.2s infinite alternate; }
html.is-intro .topbar { animation: rise .9s var(--ease-out) .5s both; }
html.is-intro .hero-copy > * { animation: rise 1s var(--ease-out) both; }
html.is-intro .hero-copy > :nth-child(1) { animation-delay: .55s; }
html.is-intro .hero-copy > :nth-child(3) { animation-delay: .95s; }
html.is-intro .hero-copy > :nth-child(4) { animation-delay: 1.02s; }
html.is-intro .hero-copy > :nth-child(5) { animation-delay: 1.09s; }
html.is-intro .hero-copy > :nth-child(6) { animation-delay: 1.16s; }
html.is-intro .hero-copy > :nth-child(7),
html.is-intro .hero-copy > :nth-child(8) { animation-delay: 1.24s; }
html.is-intro .title { animation: none !important; }
html.is-intro .title .ch { animation: char-in 1.1s var(--ease-out) both; animation-delay: calc(.62s + var(--i) * 70ms); }
html.is-intro .shelf-head { animation: rise .9s var(--ease-out) 1.1s both; }
html.is-intro .card { animation: card-in 1.1s var(--ease-out) both; animation-delay: calc(1.05s + var(--n) * 80ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes char-in { from { opacity: 0; transform: translateY(.45em) rotate(4deg); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes card-in { from { opacity: 0; transform: translateY(60px) scale(.94); } to { opacity: 1; transform: none; } }

.title.is-in .ch { animation: char-in .8s var(--ease-out) both; animation-delay: calc(var(--i) * 45ms); }

/* ───────── 适配 ───────── */
@container hero (max-height: 560px) {
  .desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
@container hero (max-height: 420px) {
  .en { display: none; }
  .title[data-lines='2'] ~ .desc { display: none; }
  .play-btn { height: 52px; font-size: 20px; }
}
@container hero (max-height: 400px) {
  .desc { display: none; }
  .chips li:nth-child(n+3) { display: none; }
}
@container hero (max-height: 330px) {
  .chips, .kicker { display: none; }
}

@media (max-height: 640px) and (min-width: 761px) {
  .shelf-head { display: none; }
  .shelf-track { padding-top: 22px; }
}

@media (max-width: 1100px) and (min-width: 761px) {
  .hero-copy { width: min(560px, 64vw); }
}

@media (max-width: 760px) {
  :root { --gutter: 20px; --card-w: 104px; }
  body { grid-template-rows: auto 1fr auto; }
  .topbar { min-height: 60px; padding-top: max(14px, env(safe-area-inset-top)); }
  .brand-logo { width: 24px; height: 24px; }
  .brand-num { font-size: 16px; }
  .brand-zh { font-size: 16px; }
  .greet { display: none; }
  .clock { font-size: 14px; }
  .icon-btn { width: 36px; height: 36px; }

  .hero { align-items: flex-end; padding-bottom: 6px; }
  .hero-copy { width: 100%; }
  .kicker { margin-bottom: 10px; }
  .title { font-size: calc(clamp(52px, 17vw, 84px) * var(--k)); }
  .en { margin-top: 8px; font-size: 10px; letter-spacing: .3em; }
  .tagline { margin-top: 12px; font-size: 21px; }
  .desc { font-size: 14px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .chips { margin-top: 12px; gap: 6px; }
  .chips li { font-size: 13px; padding: 4px 10px; }
  .actions { margin-top: 18px; gap: 12px 18px; }
  .play-btn { height: 54px; font-size: 20px; padding: 0 22px 0 20px; }
  .play-btn kbd { display: none; }

  .stage-scrim {
    background:
      linear-gradient(0deg,
        color-mix(in srgb, var(--scrim) 98%, transparent) 0%,
        color-mix(in srgb, var(--scrim) 93%, transparent) 40%,
        color-mix(in srgb, var(--scrim) 72%, transparent) 56%,
        color-mix(in srgb, var(--scrim) 22%, transparent) 72%,
        transparent 84%),
      linear-gradient(180deg, color-mix(in srgb, var(--scrim) 70%, transparent) 0%, transparent 16%);
  }
  .shelf-hint { display: none; }
  .shelf-track { padding-top: 22px; scroll-snap-type: x proximity; }
  .card { scroll-snap-align: center; }
  .card-label b { font-size: 14px; }
  .card[aria-selected='true'] { --lift: -10px; --scale: 1.05; }
  .dock-btn { font-size: 15px; padding: 0 12px; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .desc { -webkit-line-clamp: 2; }
  .en { display: none; }
}
@media (max-width: 380px) {
  .chips li:nth-child(n+4) { display: none; }
}

/* 手机横屏 */
@media (max-height: 500px) and (orientation: landscape) {
  :root { --card-w: 78px; --gutter: max(20px, env(safe-area-inset-left)); }
  .topbar { min-height: 48px; padding-top: 10px; }
  .greet { display: none; }
  .title { font-size: calc(48px * var(--k)); }
  .desc, .en, .chips, .shelf-head { display: none; }
  .tagline { font-size: 17px; margin-top: 8px; }
  .actions { margin-top: 12px; }
  .play-btn { height: 46px; font-size: 18px; }
  .play-btn kbd { display: none; }
  .shelf-track { padding-top: 16px; }
  .card { gap: 6px; }
  .card-label small { display: none; }
  .card-label b { font-size: 12px; }
}

@media (hover: none) {
  .shelf-hint { display: none; }
  .play-btn kbd { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; }
  .stage-bg, .stage-fx { transform: none !important; }
  .stage-grain { display: none; }
}

.noscript {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 200;
  transform: translateX(-50%);
  margin: 0;
  padding: 10px 16px;
  border-radius: 10px;
  background: #222;
  color: #fff;
  font-size: 14px;
}
