/* ==========================================================================
   雅雅的小屋 · 样式表 v2
   风格：iOS 玻璃质感 / 暖白底 + 模糊光斑 / 大圆角 / hairline 分隔线
   移动端优先，零依赖
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计变量
   -------------------------------------------------------------------------- */
:root {
  /* 底色 —— 微暖的浅灰白，让玻璃有底色可托 */
  --bg:          #F3F2EF;
  --bg-deep:     #EAE8E4;

  /* 文字 —— iOS 的三层灰阶 */
  --ink:         #1D1C1A;
  --ink-soft:    #6B6660;
  --ink-mute:    #A29A92;

  /* 强调色 —— 克制的陶土橙，保留温度 */
  --accent:      #C08670;
  --accent-deep: #9C624E;
  --accent-soft: #EDD9CF;
  --green:       #7E9C8E;
  --green-soft:  #DDE8E1;
  --violet:      #8B81A8;
  --violet-soft: #E5E1EE;
  --amber:       #C39A5E;
  --amber-soft:  #F2E6D0;

  /* 玻璃系统 */
  --glass:        rgba(255, 255, 255, .58);
  --glass-2:      rgba(255, 255, 255, .78);
  --glass-solid:  rgba(255, 255, 255, .92);
  --glass-brd:    rgba(255, 255, 255, .7);
  --glass-hi:     rgba(255, 255, 255, .85);
  --hair:         rgba(0, 0, 0, .07);
  --hair-2:       rgba(0, 0, 0, .12);

  /* 阴影 —— 双层：近处贴合 + 远处弥散 */
  --sh-1: 0 1px 2px rgba(31, 28, 25, .04), 0 4px 12px -4px rgba(31, 28, 25, .08);
  --sh-2: 0 2px 6px rgba(31, 28, 25, .05), 0 14px 32px -12px rgba(31, 28, 25, .18);
  --sh-3: 0 4px 12px rgba(31, 28, 25, .06), 0 28px 60px -24px rgba(31, 28, 25, .28);
  --sh-inset: inset 0 1px 0 var(--glass-hi);

  /* 圆角 —— iOS 连续圆角 */
  --r-s: 12px;
  --r-m: 18px;
  --r-l: 26px;
  --r-xl: 34px;
  --r-full: 999px;

  /* 字体 —— 系统字体栈，中文优先苹方 */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
          "PingFang SC", "Helvetica Neue", "Hiragino Sans GB",
          "Microsoft YaHei", sans-serif;
  --font-num: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif;
  --font-mono: "SF Mono", ui-monospace, Consolas, "Courier New", monospace;

  /* 布局 */
  --nav-h: 56px;
  --maxw: 1160px;
  --gutter: 20px;
  --safe-b: env(safe-area-inset-bottom, 0px);

  /* 动效 */
  --ease: cubic-bezier(.32, .72, 0, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* --------------------------------------------------------------------------
   2. 基础重置
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  background-image:
    radial-gradient(120% 80% at 50% -10%, #FBF9F6 0%, transparent 60%),
    radial-gradient(100% 60% at 50% 110%, #E9E6E1 0%, transparent 70%);
  background-attachment: fixed;
}

body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.25; letter-spacing: -.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--hair); margin: 28px 0; }

code {
  font-family: var(--font-mono);
  font-size: .875em;
  background: rgba(0, 0, 0, .05);
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--accent-deep);
}

pre {
  background: rgba(29, 28, 26, .92);
  color: #F5F2EE;
  padding: 16px 20px;
  border-radius: var(--r-m);
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.7;
  margin: 14px 0;
  box-shadow: var(--sh-2);
}
pre code { background: none; color: inherit; padding: 0; }

::selection { background: rgba(192, 134, 112, .28); color: var(--ink); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(31, 28, 25, .18); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(31, 28, 25, .3); }

/* --------------------------------------------------------------------------
   3. 背景光斑 —— 玻璃能"透"出颜色的关键
   -------------------------------------------------------------------------- */
.blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  will-change: transform;
}
.blob--1 {
  width: 46vw; height: 46vw;
  top: -8vw; left: -6vw;
  background: rgba(192, 134, 112, .34);
  animation: float1 26s var(--ease) infinite alternate;
}
.blob--2 {
  width: 40vw; height: 40vw;
  top: 28vh; right: -10vw;
  background: rgba(126, 156, 142, .3);
  animation: float2 32s var(--ease) infinite alternate;
}
.blob--3 {
  width: 38vw; height: 38vw;
  bottom: -10vw; left: 18vw;
  background: rgba(139, 129, 168, .24);
  animation: float3 29s var(--ease) infinite alternate;
}
@keyframes float1 { to { transform: translate(6vw, 5vh) scale(1.12); } }
@keyframes float2 { to { transform: translate(-7vw, -4vh) scale(1.08); } }
@keyframes float3 { to { transform: translate(5vw, -6vh) scale(1.14); } }

.nav, main, .footer { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   4. 玻璃基类
   -------------------------------------------------------------------------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--sh-inset), var(--sh-1);
}

/* --------------------------------------------------------------------------
   5. 视图切换
   -------------------------------------------------------------------------- */
.view { animation: viewIn .45s var(--ease-out) both; }
.view[hidden] { display: none; }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(12px) scale(.995); }
  to   { opacity: 1; transform: none; }
}

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px var(--gutter);
}
.section--tint { max-width: none; padding: 56px var(--gutter); }
.section--tint > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.section__kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 6px;
}

.section__title {
  font-size: clamp(22px, 4.4vw, 30px);
  letter-spacing: -.025em;
}

.link-more {
  flex-shrink: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  padding-bottom: 2px;
  transition: color .25s;
}
.link-more i { font-style: normal; display: inline-block; transition: transform .3s var(--ease); }
.link-more:hover { color: var(--accent-deep); }
.link-more:hover i { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   6. 按钮 —— iOS 玻璃按键
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  padding: 0 26px;
  border-radius: var(--r-full);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.01em;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease),
              background-color .3s, opacity .2s;
}
.btn:active { transform: scale(.955); opacity: .92; }

.btn--primary {
  background: rgba(29, 28, 26, .88);
  color: #FDFCFA;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), var(--sh-2);
}
.btn--primary:hover {
  background: rgba(29, 28, 26, .96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22),
              0 4px 10px rgba(31, 28, 25, .1),
              0 18px 36px -14px rgba(31, 28, 25, .42);
}

.btn--accent {
  background: rgba(192, 134, 112, .92);
  color: #FFF;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3),
              0 8px 22px -10px rgba(156, 98, 78, .7);
}
.btn--accent:hover {
  background: rgba(192, 134, 112, 1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .36),
              0 12px 28px -10px rgba(156, 98, 78, .8);
}

.btn--glass {
  background: var(--glass-2);
  color: var(--ink);
  border-color: var(--glass-brd);
  box-shadow: var(--sh-inset), var(--sh-1);
}
.btn--glass:hover { background: var(--glass-solid); box-shadow: var(--sh-inset), var(--sh-2); }

.btn--line {
  border-color: var(--hair-2);
  color: var(--ink);
  min-height: 42px;
  padding: 0 20px;
  font-size: 14px;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.btn--line:hover { border-color: var(--accent); color: var(--accent-deep); background: rgba(192, 134, 112, .07); }

.btn--sm { min-height: 38px; padding: 0 18px; font-size: 13.5px; }

/* --------------------------------------------------------------------------
   7. 导航 —— iOS 毛玻璃顶栏
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color .35s, backdrop-filter .35s, border-color .35s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(250, 249, 247, .72);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  border-bottom-color: var(--hair);
}

.nav__inner {
  max-width: var(--maxw);
  height: var(--nav-h);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark {
  width: 30px; height: 30px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  color: #FFF9F5;
  border-radius: 9px;
  font-size: 16px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4),
              0 4px 12px -4px rgba(156, 98, 78, .8);
}
.brand__text { font-size: 16px; font-weight: 600; letter-spacing: -.015em; }

.nav__links { display: flex; align-items: center; gap: 2px; }
.nav__links a {
  position: relative;
  padding: 7px 13px;
  font-size: 14px;
  color: var(--ink-soft);
  border-radius: var(--r-full);
  transition: color .25s, background-color .25s;
}
.nav__links a:hover { color: var(--ink); background: rgba(0, 0, 0, .045); }
.nav__links a.is-active { color: var(--ink); font-weight: 600; }
.nav__links a.is-active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 1px;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent);
}

.nav__toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 12px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4.5px;
  background: rgba(255, 255, 255, .5);
  border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.nav__toggle span {
  display: block;
  width: 17px; height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .35s var(--ease), opacity .25s;
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 88svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 52px) var(--gutter) 76px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: -6%;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 14s var(--ease-out);
  z-index: 0;
}
.hero__bg.is-ready { transform: scale(1); }
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 70% at 50% 38%, rgba(243, 242, 239, .34), rgba(243, 242, 239, .82) 58%, var(--bg) 100%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 700px;
  animation: heroIn 1s var(--ease-out) both;
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

.hero__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-deep);
  padding: 6px 14px;
  margin-bottom: 22px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, .55);
  border: 1px solid var(--glass-brd);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow: var(--sh-inset), var(--sh-1);
}

.hero__title {
  font-size: clamp(30px, 7.2vw, 60px);
  line-height: 1.16;
  letter-spacing: -.035em;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero__desc {
  font-size: clamp(14px, 1.9vw, 16.5px);
  color: var(--ink-soft);
  line-height: 1.8;
  margin-bottom: 32px;
  max-width: 40ch;
  margin-left: auto;
  margin-right: auto;
}
.br-pc { display: none; }

.hero__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.hero__scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--ink-mute);
  font-size: 9px;
  letter-spacing: .26em;
}
.hero__scroll-line {
  width: 1px; height: 34px;
  background: linear-gradient(to bottom, transparent, var(--hair-2));
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  top: -34px; left: 0;
  width: 100%; height: 34px;
  background: var(--accent);
  animation: scrollDot 2.4s var(--ease) infinite;
}
@keyframes scrollDot {
  0%   { transform: translateY(0); }
  70%  { transform: translateY(68px); }
  100% { transform: translateY(68px); }
}

/* --------------------------------------------------------------------------
   9. 精选照片
   -------------------------------------------------------------------------- */
.filmstrip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 0 22px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.filmstrip::-webkit-scrollbar { display: none; }

.film {
  flex: 0 0 auto;
  width: 210px;
  scroll-snap-align: start;
  border-radius: var(--r-l);
  overflow: hidden;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--sh-inset), var(--sh-1);
  cursor: pointer;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.film:hover { transform: translateY(-5px); box-shadow: var(--sh-inset), var(--sh-2); }
.film:nth-child(even) { margin-top: 22px; }

.film img {
  width: 100%;
  height: 262px;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.film:hover img { transform: scale(1.06); }

.film__meta { padding: 11px 14px 13px; }
.film__title { font-size: 13.5px; font-weight: 500; letter-spacing: -.01em; }
.film__cat { font-size: 11px; color: var(--ink-mute); letter-spacing: .04em; margin-top: 1px; }

/* --------------------------------------------------------------------------
   10. 游戏卡片 —— 玻璃网格
   -------------------------------------------------------------------------- */
.game-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px var(--gutter) 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 18px 16px 20px;
  text-align: left;
  border-radius: var(--r-l);
  overflow: hidden;
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--sh-inset), var(--sh-1);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, rgba(255, 255, 255, .5), transparent 62%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.game-card:hover { transform: translateY(-5px) scale(1.01); box-shadow: var(--sh-inset), var(--sh-3); }
.game-card:hover::after { opacity: 1; }
.game-card:active { transform: scale(.98); }

.game-card__icon {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: transform .5s var(--spring);
}
.game-card__icon svg { width: 24px; height: 24px; display: block; }
.game-card:nth-child(2) .game-card__icon { background: var(--green-soft); color: #4C7466; }
.game-card:nth-child(3) .game-card__icon { background: var(--amber-soft); color: #96692F; }
.game-card:nth-child(4) .game-card__icon { background: var(--violet-soft); color: #62578A; }
.game-card:nth-child(5) .game-card__icon { background: #DDE6F0; color: #4A6480; }
.game-card:nth-child(6) .game-card__icon { background: #F2DFE2; color: #93505F; }
.game-card:nth-child(7) .game-card__icon { background: #DCEAE4; color: #3F6B5C; }
.game-card:nth-child(8) .game-card__icon { background: #EBE4F0; color: #62578A; }
.game-card:hover .game-card__icon { transform: rotate(-8deg) scale(1.08); }

.game-card__name { font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
.game-card__desc {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.55;
  letter-spacing: -.005em;
}
.game-card__players { margin-top: 2px; font-size: 10.5px; letter-spacing: .06em; color: var(--ink-mute); }
.game-card__arrow {
  position: absolute;
  top: 16px; right: 16px;
  color: var(--ink-mute);
  font-size: 14px;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity .3s, transform .4s var(--ease), color .3s;
}
.game-card:hover .game-card__arrow { opacity: 1; transform: none; color: var(--accent-deep); }

/* 首页推广卡 */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.promo {
  position: relative;
  display: block;
  padding: 20px 18px 22px;
  border-radius: var(--r-l);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--sh-inset), var(--sh-1);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.promo:hover { transform: translateY(-5px); box-shadow: var(--sh-inset), var(--sh-3); }
.promo:active { transform: scale(.98); }

.promo__tag {
  position: absolute;
  top: 16px; right: 16px;
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--ink-mute);
  padding: 3px 9px;
  border-radius: var(--r-full);
  background: rgba(0, 0, 0, .045);
}
.promo__icon { display: block; color: var(--accent-deep); margin-bottom: 14px; }
.promo__icon svg { width: 28px; height: 28px; display: block; }
.promo:nth-child(2) .promo__icon { color: #4C7466; }
.promo:nth-child(3) .promo__icon { color: #96692F; }
.promo:nth-child(4) .promo__icon { color: #62578A; }
.promo__name { display: block; font-size: 15.5px; font-weight: 600; margin-bottom: 5px; letter-spacing: -.02em; }
.promo__desc { display: block; font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; }

.games-note {
  max-width: var(--maxw);
  margin: 26px auto 40px;
  padding: 14px 18px;
  border-radius: var(--r-m);
  background: rgba(255, 255, 255, .45);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-brd);
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.games-note strong { color: var(--accent-deep); }

/* --------------------------------------------------------------------------
   11. 关于卡 / 关于页
   -------------------------------------------------------------------------- */
.about-card {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 36px;
  align-items: center;
  padding: 36px;
  border-radius: var(--r-xl);
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--sh-inset), var(--sh-2);
}
.about-card__avatar {
  position: relative;
  width: 140px; height: 140px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), var(--sh-2);
}
.about-card__avatar::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
}
.about-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.about-card__text {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.85;
  margin: 12px 0 22px;
  max-width: 56ch;
}

.about-page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px var(--gutter) 60px;
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 44px;
  align-items: start;
}
.about-page__left { position: sticky; top: calc(var(--nav-h) + 24px); }
.about-page__avatar {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--r-xl);
  background: var(--accent-soft);
  box-shadow: var(--sh-2);
}

.prose { font-size: 15px; line-height: 1.9; color: var(--ink-soft); }
.prose > * + * { margin-top: 16px; }
.prose h3 { font-size: 17px; color: var(--ink); letter-spacing: -.02em; margin-top: 8px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul { padding-left: 2px; list-style: none; }
.prose li { position: relative; padding-left: 18px; margin-bottom: 6px; }
.prose li::before {
  content: "";
  position: absolute;
  left: 2px; top: .78em;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
}
.about-page__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }

/* --------------------------------------------------------------------------
   12. 页头
   -------------------------------------------------------------------------- */
.page-head {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 46px) var(--gutter) 4px;
  text-align: center;
}
.page-head__title {
  font-size: clamp(26px, 5.6vw, 42px);
  letter-spacing: -.03em;
  margin-bottom: 10px;
}
.page-head__desc {
  color: var(--ink-soft);
  font-size: 13.5px;
  max-width: 46ch;
  margin: 0 auto;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   13. 相册
   -------------------------------------------------------------------------- */
.filters {
  max-width: var(--maxw);
  margin: 22px auto 0;
  padding: 0 var(--gutter);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.filters::-webkit-scrollbar { display: none; }

.filter {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 16px;
  border-radius: var(--r-full);
  border: 1px solid var(--glass-brd);
  background: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  font-size: 13.5px;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: all .3s var(--ease);
}
.filter:hover { color: var(--ink); background: rgba(255, 255, 255, .78); }
.filter.is-active {
  background: rgba(29, 28, 26, .9);
  border-color: transparent;
  color: #FDFCFA;
  font-weight: 500;
  box-shadow: var(--sh-2);
}
.filter__count { opacity: .5; font-size: 11px; margin-left: 4px; }

.masonry {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px var(--gutter) 60px;
  column-count: 3;
  column-gap: 14px;
}

.tile {
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: var(--r-l);
  overflow: hidden;
  background: rgba(255, 255, 255, .35);
  box-shadow: var(--sh-1);
  cursor: pointer;
  position: relative;
  opacity: 0;
  transform: translateY(14px);
  animation: tileIn .55s var(--ease-out) forwards;
  transition: box-shadow .4s var(--ease), transform .4s var(--ease);
}
@keyframes tileIn { to { opacity: 1; transform: none; } }
.tile:hover { box-shadow: var(--sh-3); transform: translateY(-3px); }
.tile:active { transform: scale(.985); }

.tile img {
  width: 100%;
  display: block;
  transition: transform .85s var(--ease);
  background: linear-gradient(110deg, #EDEBE7 30%, #F5F3F0 50%, #EDEBE7 70%);
}
.tile:hover img { transform: scale(1.05); }

.tile__overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px 16px 14px;
  background: linear-gradient(to top, rgba(20, 19, 18, .72), transparent);
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
  pointer-events: none;
}
.tile:hover .tile__overlay { opacity: 1; transform: none; }
.tile__title { font-size: 13.5px; font-weight: 500; line-height: 1.4; }
.tile__cat { font-size: 10.5px; opacity: .72; letter-spacing: .06em; margin-top: 2px; }

.empty {
  max-width: 460px;
  margin: 30px auto 80px;
  padding: 44px 26px;
  text-align: center;
  border-radius: var(--r-xl);
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--sh-inset), var(--sh-1);
}
.empty__icon { font-size: 34px; margin-bottom: 12px; }
.empty h3 { font-size: 18px; margin-bottom: 10px; letter-spacing: -.02em; }
.empty p { color: var(--ink-soft); font-size: 14px; }
.empty__code { margin-top: 14px; }

/* --------------------------------------------------------------------------
   14. 灯箱 —— iOS 全屏查看器
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(18, 17, 16, .93);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(56px + env(safe-area-inset-top, 0px)) 12px calc(96px + var(--safe-b));
  animation: fadeIn .28s var(--ease) both;
}
.lightbox[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.lightbox__figure {
  margin: 0;
  max-width: min(1080px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: lbIn .4s var(--ease-out) both;
}
@keyframes lbIn {
  from { opacity: 0; transform: scale(.96); }
  to   { opacity: 1; transform: none; }
}
.lightbox__figure img {
  max-width: 100%;
  max-height: calc(100svh - 230px);
  object-fit: contain;
  border-radius: var(--r-m);
  box-shadow: 0 30px 70px -28px rgba(0, 0, 0, .95);
}
.lightbox__caption {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, .92);
  font-size: 13.5px;
}
.lightbox__counter {
  color: rgba(255, 255, 255, .45);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .88);
  background: rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  transition: background-color .25s, transform .25s;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, .26); }

.lightbox__close {
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: 14px;
  width: 38px; height: 38px;
  font-size: 15px;
}
.lightbox__nav { top: 50%; margin-top: -22px; width: 44px; height: 44px; font-size: 24px; padding-bottom: 3px; }
.lightbox__nav--prev { left: 14px; }
.lightbox__nav--next { right: 14px; }
.lightbox__nav:hover { transform: scale(1.08); }
.lightbox__nav:active { transform: scale(.94); }

.lightbox__thumbs {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  gap: 7px;
  padding: 12px 14px calc(14px + var(--safe-b));
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
}
.lightbox__thumbs::-webkit-scrollbar { display: none; }
.lightbox__thumb {
  flex: 0 0 auto;
  width: 50px; height: 50px;
  border-radius: 10px;
  overflow: hidden;
  opacity: .42;
  border: 2px solid transparent;
  transition: opacity .3s, border-color .3s, transform .3s;
}
.lightbox__thumb img { width: 100%; height: 100%; object-fit: cover; }
.lightbox__thumb:hover { opacity: .8; }
.lightbox__thumb.is-active { opacity: 1; border-color: var(--accent); transform: translateY(-2px); }

/* --------------------------------------------------------------------------
   15. 游戏弹层 —— 移动端底部 sheet，桌面端居中卡片
   -------------------------------------------------------------------------- */
.game-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(18, 17, 16, .42);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .26s var(--ease) both;
}
.game-modal[hidden] { display: none; }

.game-modal__panel {
  width: 100%;
  max-width: 580px;
  max-height: calc(100svh - 40px);
  display: flex;
  flex-direction: column;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: rgba(250, 249, 247, .82);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  backdrop-filter: blur(30px) saturate(190%);
  border: 1px solid var(--glass-brd);
  box-shadow: 0 30px 80px -20px rgba(20, 18, 16, .5);
  animation: modalIn .42s var(--ease-out) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(28px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.game-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hair);
  flex-shrink: 0;
}
.game-modal__title { font-size: 16.5px; font-weight: 600; letter-spacing: -.02em; }
.game-modal__back,
.game-modal__close {
  font-size: 13.5px;
  color: var(--ink-soft);
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--r-full);
  background: rgba(0, 0, 0, .04);
  transition: background-color .25s, color .25s;
}
.game-modal__close { min-width: 34px; padding: 0; }
.game-modal__back:hover,
.game-modal__close:hover { background: rgba(0, 0, 0, .09); color: var(--ink); }

.game-modal__stage {
  padding: 22px 18px calc(26px + var(--safe-b));
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

/* ---- 游戏内通用件 ---- */
.g-stage { text-align: center; }
.g-hint { font-size: 13px; color: var(--ink-soft); margin-bottom: 18px; line-height: 1.65; }
.g-label {
  display: block;
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 10px;
}
.g-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* iOS 分段控件 */
.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--r-full);
  gap: 2px;
  margin-bottom: 18px;
  background: rgba(0, 0, 0, .06);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.seg button {
  min-height: 34px;
  padding: 0 18px;
  border-radius: var(--r-full);
  font-size: 13.5px;
  color: var(--ink-soft);
  transition: background-color .3s var(--ease), color .3s, box-shadow .3s;
}
.seg button.is-active {
  background: rgba(255, 255, 255, .95);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(31, 28, 25, .12);
}

/* iOS 芯片 */
.chip {
  min-height: 38px;
  padding: 0 15px;
  border-radius: var(--r-full);
  border: 1px solid var(--glass-brd);
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-size: 13.5px;
  color: var(--ink-soft);
  transition: all .28s var(--ease);
}
.chip:hover { background: rgba(255, 255, 255, .8); color: var(--ink); }
.chip.is-active {
  background: rgba(29, 28, 26, .9);
  border-color: transparent;
  color: #FDFCFA;
  font-weight: 500;
}

/* 玻璃面板 */
.pane {
  padding: 18px 14px;
  border-radius: var(--r-l);
  background: rgba(255, 255, 255, .42);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--sh-inset);
  margin-bottom: 16px;
}

/* ---- 骰子 ---- */
.dice-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  min-height: 96px;
  align-items: center;
  padding: 16px 12px;
}
.die {
  width: 66px; height: 66px;
  background: linear-gradient(150deg, #FFFEFD, #F3F0EB);
  border-radius: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 2px 4px rgba(31, 28, 25, .08),
    0 10px 22px -10px rgba(31, 28, 25, .35);
  border: 1px solid rgba(255, 255, 255, .8);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 10px;
  gap: 2px;
}
.die--rolling { animation: dieRoll .42s linear infinite; }
@keyframes dieRoll {
  0%   { transform: rotate(0deg) translateY(0) scale(1); }
  25%  { transform: rotate(-10deg) translateY(-12px) scale(1.06); }
  50%  { transform: rotate(8deg) translateY(2px) scale(.96); }
  75%  { transform: rotate(-6deg) translateY(-8px) scale(1.04); }
  100% { transform: rotate(0deg) translateY(0) scale(1); }
}
.die--pop { animation: diePop .5s var(--spring); }
@keyframes diePop {
  0%   { transform: scale(1.24); }
  55%  { transform: scale(.93); }
  100% { transform: scale(1); }
}
.pip {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--ink);
  align-self: center;
  justify-self: center;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .35);
}
.die--one .pip { background: var(--accent); width: 16px; height: 16px; }
.die--six .pip { background: var(--green); }

.dice-total { font-size: 14px; color: var(--ink-soft); margin-bottom: 6px; }
.dice-total b {
  font-family: var(--font-num);
  font-size: 30px;
  font-weight: 600;
  color: var(--accent-deep);
  margin: 0 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}
.dice-count-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }

.task-card {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: var(--r-l);
  background: linear-gradient(140deg, rgba(237, 217, 207, .9), rgba(246, 236, 228, .8));
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: var(--sh-inset);
  text-align: left;
  animation: tileIn .5s var(--ease-out) both;
}
.task-card__head {
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 6px;
  font-weight: 600;
}
.task-card__text { font-size: 15.5px; line-height: 1.7; letter-spacing: -.015em; }

/* ---- 真心话大冒险 ---- */
.ta-card {
  position: relative;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 34px 26px;
  border-radius: var(--r-xl);
  text-align: center;
  box-shadow: var(--sh-inset), var(--sh-2);
  border: 1px solid rgba(255, 255, 255, .6);
  transition: background-color .4s;
}
.ta-card--truth { background: linear-gradient(150deg, rgba(221, 232, 225, .92), rgba(238, 245, 240, .85)); }
.ta-card--dare  { background: linear-gradient(150deg, rgba(240, 221, 213, .92), rgba(250, 238, 232, .85)); }
.ta-card--idle  { background: rgba(255, 255, 255, .5); box-shadow: var(--sh-inset); }

.ta-card__badge {
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, .75);
  color: var(--ink-soft);
}
.ta-card__text {
  font-size: clamp(16.5px, 2.4vw, 20px);
  line-height: 1.65;
  letter-spacing: -.02em;
  max-width: 22ch;
  font-weight: 500;
}
.ta-card.is-flipping { animation: cardFlip .5s var(--ease-out); }
@keyframes cardFlip {
  0%   { opacity: .25; transform: rotateY(-22deg) scale(.95); }
  100% { opacity: 1; transform: none; }
}
.ta-card--idle .ta-card__text { color: var(--ink-mute); font-size: 15px; font-weight: 400; }

/* ---- 数字炸弹 ---- */
.bomb-range { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 20px; }
.bomb-range__box {
  flex: 1;
  padding: 14px 10px;
  border-radius: var(--r-m);
  background: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--sh-inset);
}
.bomb-range__num {
  font-family: var(--font-num);
  font-size: 30px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
  line-height: 1.15;
}
.bomb-range__cap { font-size: 10px; letter-spacing: .14em; color: var(--ink-mute); text-transform: uppercase; }
.bomb-range__mid { font-size: 18px; color: var(--ink-mute); }

.bomb-guess { display: flex; gap: 8px; max-width: 300px; margin: 0 auto 14px; }
.bomb-input {
  flex: 1;
  min-height: 46px;
  padding: 0 16px;
  font-size: 19px;
  font-family: var(--font-num);
  font-weight: 600;
  text-align: center;
  border: 1px solid var(--hair-2);
  border-radius: var(--r-m);
  background: rgba(255, 255, 255, .72);
  color: var(--ink);
  outline: none;
  transition: border-color .25s, box-shadow .25s, background-color .25s;
  -moz-appearance: textfield;
}
.bomb-input::-webkit-outer-spin-button,
.bomb-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bomb-input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 0 0 4px rgba(192, 134, 112, .16);
}

.bomb-log {
  max-height: 156px;
  overflow-y: auto;
  text-align: left;
  font-size: 13px;
  margin-top: 18px;
  border-top: 1px solid var(--hair);
  padding-top: 14px;
  -webkit-overflow-scrolling: touch;
}
.bomb-log__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 2px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--hair);
  animation: tileIn .35s var(--ease-out) both;
}
.bomb-log__row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.bomb-log__empty { color: var(--ink-mute); font-size: 12.5px; text-align: center; padding: 8px; }

.bomb-boom {
  padding: 30px 22px;
  border-radius: var(--r-xl);
  background: linear-gradient(150deg, rgba(242, 220, 212, .92), rgba(250, 238, 232, .85));
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: var(--sh-inset), var(--sh-2);
  animation: diePop .55s var(--spring);
}
.bomb-boom__emoji { font-size: 46px; line-height: 1; margin-bottom: 12px; }
.bomb-boom__title { font-size: 24px; margin-bottom: 8px; letter-spacing: -.02em; }
.bomb-boom__text { color: var(--ink-soft); font-size: 14px; }

/* ---- 转盘 ---- */
.wheel-wrap {
  position: relative;
  width: min(272px, 74vw);
  aspect-ratio: 1;
  margin: 0 auto 18px;
}
.wheel-canvas { width: 100%; height: 100%; display: block; }
.wheel-pointer {
  position: absolute;
  top: -4px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 18px solid var(--ink);
  filter: drop-shadow(0 3px 5px rgba(31, 28, 25, .35));
  z-index: 2;
}
.wheel-hub {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 58px; height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 2px solid rgba(255, 255, 255, .9);
  box-shadow: var(--sh-2);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink-soft);
  z-index: 2;
  pointer-events: none;
}

.wheel-inputs { display: flex; flex-direction: column; gap: 8px; }
.wheel-input-row { display: flex; gap: 8px; align-items: center; }
.wheel-input {
  flex: 1;
  min-height: 42px;
  padding: 0 14px;
  font-size: 14px;
  border: 1px solid var(--hair-2);
  border-radius: var(--r-s);
  background: rgba(255, 255, 255, .72);
  color: var(--ink);
  outline: none;
  transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.wheel-input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 0 0 4px rgba(192, 134, 112, .16);
}
.wheel-del {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: var(--r-s);
  color: var(--ink-mute);
  border: 1px solid var(--hair-2);
  background: rgba(255, 255, 255, .5);
  transition: color .25s, border-color .25s, background-color .25s;
}
.wheel-del:hover { color: #A8453A; border-color: #E3B4AC; background: rgba(250, 238, 236, .8); }

.wheel-result {
  margin-top: 16px;
  padding: 16px 20px;
  border-radius: var(--r-m);
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--sh-inset);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.02em;
  min-height: 56px;
  display: grid;
  place-items: center;
  animation: tileIn .45s var(--ease-out) both;
}
.wheel-result b { color: var(--accent-deep); }

/* ---- 记忆翻牌 ---- */
.mem-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--ink-soft);
}
.mem-stat { display: flex; gap: 16px; }
.mem-stat b {
  font-family: var(--font-num);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

.mem-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  max-width: 340px;
  margin: 0 auto;
}
.mem-card {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--r-m);
  perspective: 700px;
  background: none;
  padding: 0;
}
.mem-card__inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform .45s var(--ease);
  border-radius: var(--r-m);
}
.mem-card.is-flipped .mem-card__inner { transform: rotateY(180deg); }
.mem-card.is-matched .mem-card__inner { transform: rotateY(180deg) scale(.94); }

.mem-face {
  position: absolute;
  inset: 0;
  border-radius: var(--r-m);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: var(--sh-1);
}
.mem-face--back {
  background: linear-gradient(150deg, rgba(255, 255, 255, .8), rgba(240, 237, 232, .7));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-brd);
  color: var(--accent);
  box-shadow: var(--sh-inset), var(--sh-1);
}
.mem-face--back svg { width: 22px; height: 22px; opacity: .55; }
.mem-face--front { transform: rotateY(180deg); background: #E9E6E1; }
.mem-face--front img { width: 100%; height: 100%; object-fit: cover; }
.mem-card.is-matched .mem-face--front { opacity: .6; }
.mem-card.is-matched .mem-face--front::after {
  content: "\2713";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(29, 28, 26, .38);
  color: #fff;
  font-size: 20px;
}

.mem-win {
  margin-top: 16px;
  padding: 18px;
  border-radius: var(--r-l);
  background: linear-gradient(150deg, rgba(221, 232, 225, .92), rgba(240, 245, 240, .85));
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: var(--sh-inset), var(--sh-1);
  animation: diePop .55s var(--spring);
}
.mem-win__title { font-size: 18px; margin-bottom: 6px; letter-spacing: -.02em; }
.mem-win__text { font-size: 13.5px; color: var(--ink-soft); }

/* ---- 2048 ---- */
.g2048-wrap { max-width: 340px; margin: 0 auto; }
.g2048-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 14px;
  gap: 10px;
}
.g2048-title {
  font-family: var(--font-num);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
}
.g2048-scores { display: flex; gap: 8px; }
.g2048-score {
  min-width: 64px;
  padding: 6px 12px 8px;
  border-radius: var(--r-s);
  background: rgba(0, 0, 0, .05);
  text-align: center;
}
.g2048-score span {
  display: block;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.g2048-score b {
  font-family: var(--font-num);
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

.g2048-board {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-l);
  padding: 9px;
  background: rgba(0, 0, 0, .07);
  box-shadow: inset 0 1px 3px rgba(31, 28, 25, .1);
  touch-action: none;
}
.g2048-grid {
  position: absolute;
  inset: 9px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 9px;
}
.g2048-cell { border-radius: 10px; background: rgba(255, 255, 255, .32); }

.g2048-tile {
  position: absolute;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--font-num);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--ink);
  background: #F2EFEA;
  box-shadow: 0 1px 2px rgba(31, 28, 25, .1);
  will-change: transform;
}
.g2048-tile.is-new { animation: tilePop .2s var(--spring); }
@keyframes tilePop {
  0%   { transform: scale(.3); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.g2048-tile.is-merged { animation: tileMerge .22s var(--spring); }
@keyframes tileMerge {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.t-2    { background: #F7F4EF; color: #6B6660; }
.t-4    { background: #F0E6D8; color: #7A6448; }
.t-8    { background: #EDD3BC; color: #7A5334; }
.t-16   { background: #E8BFA0; }
.t-32   { background: #E3A784; color: #fff; }
.t-64   { background: #DA8A63; color: #fff; }
.t-128  { background: #D2734C; color: #fff; }
.t-256  { background: #C6603A; color: #fff; }
.t-512  { background: #B94F35; color: #fff; }
.t-1024 { background: #A8422F; color: #fff; }
.t-2048 { background: #93352A; color: #fff; box-shadow: 0 0 22px rgba(147, 53, 42, .55); }
.t-big  { background: #2A2724; color: #fff; }

.g2048-over {
  position: absolute;
  inset: 0;
  border-radius: var(--r-l);
  display: grid;
  place-items: center;
  background: rgba(250, 249, 247, .72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: fadeIn .3s both;
  z-index: 3;
}
.g2048-over__box { text-align: center; }
.g2048-over__title { font-size: 24px; margin-bottom: 4px; letter-spacing: -.03em; }
.g2048-over__text { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 14px; }

/* ---- 猜数字 1A2B ---- */
.guess-input-row { display: flex; gap: 8px; max-width: 280px; margin: 0 auto 14px; }
.guess-input {
  flex: 1;
  min-height: 46px;
  padding: 0 16px;
  font-family: var(--font-num);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .22em;
  text-align: center;
  border: 1px solid var(--hair-2);
  border-radius: var(--r-m);
  background: rgba(255, 255, 255, .72);
  color: var(--ink);
  outline: none;
  transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.guess-input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 0 0 4px rgba(192, 134, 112, .16);
}

.guess-log { margin-top: 16px; text-align: left; max-height: 190px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.guess-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  margin-bottom: 7px;
  border-radius: var(--r-s);
  background: rgba(255, 255, 255, .5);
  border: 1px solid var(--glass-brd);
  animation: tileIn .32s var(--ease-out) both;
}
.guess-row__n { font-size: 11px; color: var(--ink-mute); width: 26px; flex-shrink: 0; }
.guess-row__g {
  font-family: var(--font-num);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .16em;
  font-variant-numeric: tabular-nums;
}
.guess-row__r {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 11px;
  border-radius: var(--r-full);
  background: rgba(0, 0, 0, .06);
  color: var(--ink-soft);
}
.guess-row__r.is-win { background: rgba(126, 156, 142, .28); color: #40604F; }
.guess-empty { color: var(--ink-mute); font-size: 12.5px; text-align: center; padding: 10px; }

.guess-win {
  padding: 22px;
  border-radius: var(--r-l);
  background: linear-gradient(150deg, rgba(221, 232, 225, .92), rgba(240, 245, 240, .85));
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: var(--sh-inset), var(--sh-1);
  animation: diePop .55s var(--spring);
}
.guess-win__title { font-size: 21px; margin-bottom: 6px; letter-spacing: -.02em; }
.guess-win__text { font-size: 13.5px; color: var(--ink-soft); }

/* ---- 反应测试 ---- */
.react-stage {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  min-height: 250px;
  display: grid;
  place-items: center;
  padding: 26px 20px;
  border: 1px solid var(--glass-brd);
  box-shadow: var(--sh-inset), var(--sh-2);
  transition: background-color .3s;
  -webkit-tap-highlight-color: transparent;
}
.react-stage--idle   { background: linear-gradient(150deg, rgba(255, 255, 255, .6), rgba(240, 237, 232, .5)); }
.react-stage--wait   { background: linear-gradient(150deg, rgba(240, 221, 213, .85), rgba(246, 234, 226, .7)); }
.react-stage--go     { background: linear-gradient(150deg, rgba(183, 214, 196, .92), rgba(206, 230, 214, .85)); cursor: pointer; }
.react-stage--early  { background: linear-gradient(150deg, rgba(238, 205, 200, .9), rgba(246, 226, 222, .8)); }
.react-stage--result { background: linear-gradient(150deg, rgba(255, 255, 255, .62), rgba(240, 237, 232, .55)); }

.react-big {
  font-family: var(--font-num);
  font-size: clamp(34px, 9vw, 52px);
  font-weight: 700;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.react-big small {
  display: block;
  font-size: .3em;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ink-soft);
  margin-top: 6px;
}
.react-label { font-size: 15px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 4px; }
.react-sub { font-size: 13px; color: var(--ink-soft); line-height: 1.6; }

.react-list { margin-top: 18px; text-align: left; }
.react-list__row {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--r-s);
  background: rgba(255, 255, 255, .45);
  border: 1px solid var(--glass-brd);
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--ink-soft);
  animation: tileIn .3s var(--ease-out) both;
}
.react-list__row b {
  font-family: var(--font-num);
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.react-list__row.is-best b { color: var(--accent-deep); }

/* --------------------------------------------------------------------------
   16. 页脚
   -------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--hair);
  padding: 40px var(--gutter) calc(32px + var(--safe-b));
  margin-top: 20px;
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.footer__brand { display: flex; align-items: center; gap: 11px; text-align: left; }
.footer__name { font-size: 15px; font-weight: 600; letter-spacing: -.015em; }
.footer__slogan { font-size: 12px; color: var(--ink-mute); margin-top: 1px; }
.footer__links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer__links a { font-size: 13px; color: var(--ink-soft); transition: color .25s; }
.footer__links a:hover { color: var(--accent-deep); }
.footer__copy {
  font-size: 11.5px;
  color: var(--ink-mute);
  padding-top: 18px;
  border-top: 1px solid var(--hair);
  width: 100%;
  max-width: 380px;
}

/* --------------------------------------------------------------------------
   17. 响应式 —— 移动端优先
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .masonry { column-count: 2; }
  .about-page { grid-template-columns: 170px 1fr; gap: 32px; }
}

@media (max-width: 820px) {
  :root { --gutter: 18px; }

  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed;
    top: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 16px calc(20px + var(--safe-b));
    background: rgba(250, 249, 247, .88);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    backdrop-filter: blur(28px) saturate(180%);
    border-bottom: 1px solid var(--hair);
    box-shadow: var(--sh-2);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease);
  }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links a { padding: 12px 14px; font-size: 15.5px; border-radius: var(--r-m); min-height: 46px; display: flex; align-items: center; }
  .nav__links a.is-active { background: rgba(192, 134, 112, .12); }
  .nav__links a.is-active::after { display: none; }

  .section { padding: 44px var(--gutter); }
  .section--tint { padding: 44px var(--gutter); }
  .section__head { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
  .page-head { padding-top: calc(var(--nav-h) + 34px); }

  .about-card { grid-template-columns: 1fr; gap: 22px; padding: 26px 22px; text-align: center; }
  .about-card__avatar { margin: 0 auto; width: 108px; height: 108px; }

  .about-page { grid-template-columns: 1fr; gap: 24px; padding-top: 26px; }
  .about-page__left { position: static; }
  .about-page__avatar { width: 130px; }

  .film { width: 186px; }
  .film img { height: 228px; }
  .film:nth-child(even) { margin-top: 18px; }

  .lightbox { padding: calc(50px + env(safe-area-inset-top, 0px)) 10px calc(88px + var(--safe-b)); }
  .lightbox__nav { width: 40px; height: 40px; font-size: 21px; }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
  .lightbox__figure img { max-height: calc(100svh - 235px); }

  .die { width: 58px; height: 58px; padding: 9px; border-radius: 14px; }
  .pip { width: 11px; height: 11px; }
  .die--one .pip { width: 14px; height: 14px; }
}

@media (max-width: 560px) {
  .masonry { column-count: 1; }

  .hero { min-height: 84svh; padding-bottom: 64px; }
  .hero__actions { flex-direction: column; align-items: stretch; width: 100%; max-width: 260px; margin: 0 auto; }
  .hero__actions .btn { width: 100%; }

  .promo-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .promo { padding: 16px 14px 18px; }
  .promo__tag { display: none; }
  .promo__icon svg { width: 24px; height: 24px; }
  .promo__name { font-size: 14px; }
  .promo__desc { font-size: 11.5px; }

  .game-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .game-card { padding: 14px 12px 16px; gap: 8px; }
  .game-card__icon { width: 40px; height: 40px; border-radius: 13px; }
  .game-card__icon svg { width: 21px; height: 21px; }
  .game-card__name { font-size: 14.5px; }
  .game-card__desc { font-size: 11.5px; line-height: 1.5; }
  .game-card__players { font-size: 10px; }
  .game-card__arrow { display: none; }

  .btn { min-height: 44px; padding: 0 22px; font-size: 14.5px; }

  /* 游戏弹层：iOS 底部 sheet */
  .game-modal { padding: 0; align-items: flex-end; justify-content: stretch; }
  .game-modal__panel {
    max-width: 100%;
    max-height: 90svh;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    border-left: 0; border-right: 0; border-bottom: 0;
    animation: sheetIn .42s var(--ease-out) both;
  }
  @keyframes sheetIn {
    from { transform: translateY(100%); }
    to   { transform: none; }
  }
  .game-modal__head { padding: 12px 14px; }
  .game-modal__stage { padding: 18px 16px calc(24px + var(--safe-b)); }

  /* sheet 顶部的 iOS 把手 */
  .game-modal__panel::before {
    content: "";
    display: block;
    width: 36px; height: 4px;
    margin: 7px auto 0;
    border-radius: 99px;
    background: rgba(31, 28, 25, .18);
    flex-shrink: 0;
  }

  .games-note { font-size: 12px; padding: 12px 15px; margin: 20px auto 32px; }

  .mem-board { gap: 7px; }
  .g2048-board { padding: 7px; }
  .g2048-grid { inset: 7px; gap: 7px; }

  .seg button { padding: 0 14px; font-size: 12.5px; min-height: 32px; }
  .chip { min-height: 36px; padding: 0 13px; font-size: 12.5px; }

  .lightbox__thumb { width: 44px; height: 44px; }
}

@media (max-width: 380px) {
  .promo-grid, .game-grid { grid-template-columns: 1fr; }
}

@media (hover: none) {
  .tile__overlay { opacity: 1; transform: none; background: linear-gradient(to top, rgba(20, 19, 18, .68), transparent 60%); }
  .game-card__arrow { display: none; }
}

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

/* 不支持 backdrop-filter 时降级为实色 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass,
  .game-card,
  .promo,
  .film,
  .empty,
  .about-card,
  .game-modal__panel,
  .filter,
  .chip,
  .pane,
  .task-card,
  .wheel-hub { background: rgba(255, 255, 255, .88) !important; }
  .nav.is-scrolled,
  .nav__links.is-open { background: rgba(250, 249, 247, .97) !important; }
}

@media print {
  .nav, .footer, .hero__scroll, .game-modal, .lightbox, .blobs { display: none !important; }
}
