/* Loomie 官网 — 暖光系统 · 黄昏档
   两种版式：
   A 满屏实景（屏 1 / 2）——照片铺满，奶油纱压在上面，墨色叠字。
   B 奶油纸感（屏 3 / 4 / 5）——纸做底；3 / 4 画面收成一块，5 上标语下三件。
   共用规则：控件全部收进底栏；照片明暗只由 --img-* 四个旋钮决定。 */

@font-face {
  font-family: "Loomie Serif";
  src: url("assets/fonts/loomie-serif-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #e4d2b2;
  --paper-2: #d8cbb1;
  --card: #f7efdd;
  --veil: 245, 231, 208;
  --glass: rgba(248, 238, 219, 0.55);
  --bar-bg: rgba(245, 234, 213, 0.82);

  --ink: #221a10;
  --ink-2: rgba(34, 26, 16, 0.76);
  --ink-3: rgba(34, 26, 16, 0.54);
  --ink-4: rgba(34, 26, 16, 0.36);
  --line: rgba(34, 26, 16, 0.17);
  --line-2: rgba(34, 26, 16, 0.24);

  /* 浅底上浅金会糊，强调色整体压深一档 */
  --gold: #96591b;
  --gold-2: #7d4913;
  --gold-soft: rgba(150, 89, 27, 0.11);

  /* 压暗旋钮 · 黄昏档。整站照片的明暗只走这三个数，不烤进素材文件。
     屏 3 / 4 是截图证据，另有一组几乎不压的值，见 .screen-block。 */
  --img-bright: 0.87;
  --img-contrast: 1.18;
  --img-sat: 1.06;
  --img-warm: 0.06;

  --display: "Loomie Serif", "Songti SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --nav-pad: 56px;
  --bar-pad: 76px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: calc(var(--nav-pad) + env(safe-area-inset-top, 0px));
  --bar-h: calc(var(--bar-pad) + var(--safe-bottom));
  --peek: 34px;
  --pad: 44px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
  background: var(--paper);
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.mono { font-family: var(--mono); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ══ 顶栏 ══ */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 60;
  height: var(--nav-h);
  padding-top: env(safe-area-inset-top, 0px);
  box-sizing: border-box;
  display: flex; align-items: center;
  background: linear-gradient(180deg, rgba(var(--veil), 0.88), rgba(var(--veil), 0));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav-inner {
  width: 100%; height: var(--nav-pad); padding: 0 var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  height: 22px;
}
.brand img { height: 22px; width: auto; }
.nav-links { display: flex; gap: 26px; font-size: 13px; color: var(--ink-3); }
.nav-links a { flex: none; white-space: nowrap; transition: color 0.2s; }
.nav-toggle {
  display: none;
  width: 44px; height: 44px; flex: none;
  grid-template-columns: 1fr;
  align-content: center;
  justify-items: center;
  gap: 5px;
  border-radius: 10px;
}
.nav-toggle span {
  display: block; width: 16px; height: 1.5px;
  background: var(--ink-2); border-radius: 1px;
}
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--ink); }
.nav-cta {
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--glass);
  font-size: 12px; color: var(--ink-2);
  transition: border-color 0.2s, color 0.2s;
}
.nav-cta:hover { border-color: var(--gold); color: var(--gold); }

/* ══ 屏 ══ */
.screen {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 100svh;
  overflow: hidden;
  scroll-snap-align: start;
  background: var(--paper);
}

.subject { position: absolute; inset: 0; z-index: 0; }
.subject > img,
.subject > video,
.subject > .case-pane {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  pointer-events: none;
}
.subject > img,
.subject > video,
.case-pane img,
.case-pane video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(var(--img-bright)) contrast(var(--img-contrast))
          saturate(var(--img-sat)) sepia(var(--img-warm));
}
.subject > .is-on { opacity: 1; pointer-events: auto; }

/* 奶油纱：不是压黑，是把左侧提亮到能落墨色字 */
.scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(var(--veil), 0.92) 0%, rgba(var(--veil), 0.56) 34%, rgba(var(--veil), 0) 62%),
    linear-gradient(0deg, rgba(var(--veil), 0.86) 0%, rgba(var(--veil), 0) 44%);
}

.chip-float {
  position: absolute; z-index: 3;
  top: calc(var(--nav-h) + 14px); right: var(--pad);
  padding: 6px 13px; border-radius: 999px;
  font-size: 12px; color: var(--ink-2);
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* 叠字块 */
.overlay {
  position: absolute; z-index: 3;
  left: var(--pad); right: var(--pad);
  bottom: calc(var(--bar-h) + 52px);
  max-width: 900px;
}
.chip {
  display: inline-block; margin-bottom: 20px;
  padding: 6px 13px; border-radius: 999px;
  font-size: 12px; color: var(--ink-2);
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
/* 字号上限按最长一行定死：九个字必须落在 max-width 内，不许折出第三行 */
.title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(36px, 5.4vw, 88px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.title .gold { color: var(--gold); }
.sub {
  margin-top: 18px;
  font-size: clamp(13px, 1.05vw, 16px);
  color: var(--ink-2);
  max-width: 680px;
}
.sub-min { margin-top: 10px; font-size: 12px; color: var(--ink-4); }

/* ══ 底栏 ══ */
.bar {
  position: absolute; z-index: 4;
  inset: auto 0 0 0;
  height: var(--bar-h);
  display: flex; align-items: center; gap: 22px;
  padding: 0 var(--pad);
  box-sizing: border-box;
  background: var(--bar-bg);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
}
.btn-short { display: none; }
.bar-grow { flex: 1 1 0; min-width: 0; }
.bar-end { display: flex; justify-content: flex-end; align-items: center; }
.bar-sep { width: 1px; height: 26px; background: var(--line-2); flex: none; }
.pager { display: flex; align-items: center; gap: 14px; flex: none; }
.bar-note { font-size: 12px; color: var(--ink-3); }
.bar-note-min { font-size: 11px; color: var(--ink-4); }

.iconbtn {
  width: 38px; height: 38px; flex: none;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  color: var(--ink-3);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.iconbtn:hover { border-color: var(--gold); color: var(--gold); }
.iconbtn:active { transform: scale(0.94); }
.iconbtn svg { width: 15px; height: 15px; }

.btn {
  flex: none;
  padding: 11px 20px; border-radius: 10px;
  font-size: 13px; font-weight: 600;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-gold { background: var(--gold); color: #fffaf0; }
.btn-gold:hover { background: var(--gold-2); }
.btn-gold.is-pulse { animation: reserve-pulse 0.8s var(--ease) 2; }
@keyframes reserve-pulse {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 0 6px var(--gold-soft); }
}
.btn-ghost { border: 1px solid var(--line-2); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-text { font-size: 13px; color: var(--ink-3); flex: none; }
.btn-text:hover { color: var(--ink); }

.dots { display: flex; align-items: center; gap: 10px; flex: none; }
.dots button {
  width: 9px; height: 9px; border-radius: 999px; padding: 0;
  border: 1px solid var(--ink-4);
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.dots button:hover { border-color: var(--gold); }
.dots button[aria-selected="true"] {
  background: var(--gold); border-color: var(--gold); transform: scale(1.24);
}

.seg { display: flex; align-items: center; gap: 4px; flex: none; }
.seg button {
  padding: 8px 15px; border-radius: 8px;
  font-size: 13px; color: var(--ink-3);
  transition: color 0.2s, background 0.2s;
}
.seg button:hover { color: var(--ink-2); }
.seg button[aria-selected="true"] { color: var(--gold); background: var(--gold-soft); }

/* ══ 屏 1 · 横滑五格 ══ */
#home .overlay { bottom: calc(var(--bar-h) + 52px); }
/* 第三张第二行 12 个字，88px 会折成第三行。字号收一档，行内不许再断。 */
#home .title { font-size: clamp(28px, 4.6vw, 72px); }
#home .title span { white-space: nowrap; }

.track {
  position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: stretch; gap: 10px;
  will-change: transform;
  transition: transform 0.62s var(--ease);
}
.track.no-anim { transition: none; }
.frame { position: relative; flex: none; height: 100%; overflow: hidden; }
.frame img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(var(--img-bright)) contrast(var(--img-contrast))
          saturate(var(--img-sat)) sepia(var(--img-warm));
}
/* 非当前格：往纸色里退，不是压黑 */
.frame::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(var(--veil), 0.72);
  opacity: 1; transition: opacity 0.62s var(--ease);
}
.frame.is-on::after { opacity: 0; }
.frame-tag {
  position: absolute; left: 16px; top: 16px; z-index: 2;
  font-size: 11px; color: var(--ink-3);
  opacity: 0; transition: opacity 0.4s;
}
.frame:not(.is-on) .frame-tag { opacity: 1; }


/* ══ 屏 2 · 角色骨架 ══
   这屏没有满屏照片了：背景由 CSS 画，角色是六张带 alpha 的图各自受驱动。
   照片没了，压暗旋钮也就没有对象——改成只压角色本身，且压得比照片轻，
   因为背景亮度已经由下面这条渐变直接定死，不用靠滤镜去凑。 */
#trial {
  --img-bright: 0.94;
  --img-contrast: 1.10;
  --img-sat: 1.04;
  --img-warm: 0.03;
}
#trial .subject {
  /* 复现母版里那层奶油渐变，亮度按其余四屏的档位对齐 */
  background: radial-gradient(128% 92% at 40% 24%,
              #f0e3c8 0%, #e9d9ba 44%, #dcc79f 78%, #d3bc92 100%);
}
/* 这一屏右边站着角色，文案不能按 900px 一路铺过去。
   1440 往下 900px 就会顶到它胸口。
   左栏不贴底栏：在顶栏和底栏之间垂直居中，吃掉窗上方那块空。 */
#trial .overlay {
  max-width: none;
  right: 20%;
  top: calc(var(--nav-h) + 16px);
  bottom: calc(var(--bar-h) + 28px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
#trial .title,
#trial .sub { max-width: min(560px, 100%); }

/* 屏 2 输入窗：结构学终端（窗点 / 提示符 / 底栏芯片），颜色走黄昏档。
   毛玻璃压在奶油纱上，生成键用墨色，和底栏金色主按钮错开一层。 */
.term-wrap { width: min(570px, 100%); margin-top: 22px; align-self: center; }
.term {
  border-radius: 16px;
  overflow: hidden;
  font-family: var(--mono);
  background: rgba(251, 246, 234, 0.82);
  border: 1px solid rgba(150, 89, 27, 0.42);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
}
.term-hd {
  position: relative;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}
.term-dots { position: absolute; left: 14px; display: flex; gap: 6px; }
.term-dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.term-dots i:nth-child(1) { background: #c46a4a; }
.term-dots i:nth-child(2) { background: #c9a24a; }
.term-dots i:nth-child(3) { background: #7a9a58; }
.term-ttl { font-size: 11px; letter-spacing: 0.08em; color: var(--ink-3); }
.term-body {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 16px 14px;
  min-height: 228px;
}
.term-gt { color: var(--gold); font-size: 16px; line-height: 1.5; flex: none; }
.term textarea {
  flex: 1;
  border: 0;
  background: transparent;
  resize: none;
  outline: none;
  font: inherit;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  min-height: 196px;
  width: 100%;
}
.term textarea::placeholder { color: var(--ink-4); }
.term-ft {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
}
.term-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  background: rgba(34, 26, 16, 0.06);
  border: 1px solid var(--line);
}
.term-chip.is-on { color: var(--ink); border-color: var(--line-2); }
.term-chip.is-on svg { display: none; }
.term-chip img {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  object-fit: cover;
}
.term-chip svg { flex: none; }
.term-cta {
  margin-left: auto;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--ink);
  color: #f7efdd;
  white-space: nowrap;
}
.term-cta:hover { background: #3a2e1c; }
.term-held {
  padding: 18px 16px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.term-held[hidden] { display: none; }
.term-held p {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
}
.term-held .term-cta { margin-left: 0; flex: none; }
.term-wrap.is-empty .term { animation: term-nudge 0.36s var(--ease); }
@keyframes term-nudge {
  0%, 100% { transform: none; }
  30% { transform: translateX(-4px); }
  60% { transform: translateX(3px); }
}

.notice {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.notice[hidden] { display: none; }
.notice-back {
  position: absolute;
  inset: 0;
  background: rgba(34, 26, 16, 0.38);
}
.notice-card {
  position: relative;
  width: min(420px, 100%);
  padding: 28px 26px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.notice-card p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
}
.notice-ft {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

/* 构图照着原来那张满屏图复刻：耳尖贴近顶栏，脚掌掖到底栏后面。
   把整只完整摆进安全区会缩到只剩四成屏高，看着像贴纸——得裁才有存在感。

   尺寸两头封顶：40vw 管窄高窗口（不封的话按 vh 算的框会横着占掉半屏），
   66vh 管宽扁窗口（不封的话耳朵会顶进导航栏）。

   下沉量必须跟着 --rig-w 走，不能写成视口百分比。写死百分比的话，
   角色缩小时底栏还是那么高，埋掉的比例会从一成涨到近两成。
   0.2528 = 0.11×1.3866（要埋掉的角色高）+ 0.1003（外框比角色多出的下边距），
   两个系数都由 layers.json 的 958x1520 外框和 96 余量推出来，换母版要重算。 */
.rig {
  --rig-w: min(40vw, 66vh);
  position: absolute;
  right: 1%;
  bottom: calc(var(--bar-h) - 0.2528 * var(--rig-w));
  width: var(--rig-w);
  /* 各层同尺寸同外框，容器跟着外框的比例走，层与层就天然对齐 */
  aspect-ratio: 958 / 1520;
  /* 呼吸是整只一起缩，转轴落在脚下 */
  transform-origin: 30% 94%;
  /* 调色压在合成之后。逐层压的话，半透明的毛边会被压两遍，边上会出现一圈脏色 */
  filter: brightness(var(--img-bright)) contrast(var(--img-contrast))
          saturate(var(--img-sat)) sepia(var(--img-warm));
  contain: layout paint;
  will-change: transform;
}
.rig-head { position: absolute; inset: 0; }
.rig-l {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
}
/* 只有真正会动的层需要提升；五层都提是白占显存 */
.rig-head,
.rig-l[data-part="tail"],
.rig-l[data-part="fringe"] { will-change: transform; }

/* 转轴。数字来自 assets/home/trial/layers.json，换母版必须一起改。 */
.rig-l[data-part="tail"]   { transform-origin: 55.1% 85.7%; }
.rig-l[data-part="fringe"] { transform-origin: 26.8% 56.8%; }
.rig-head                  { transform-origin: 29.4% 47.8%; }

/* 抠图没加载出来就整只藏掉，露半只比不露更糟 */
.rig[data-broken] { visibility: hidden; }

/* 再窄就并排不下了：一行字加一只狐狸，横着至少要 860。
   改成上下分——角色让到上半屏，底下整块归文案。
   必须写在 .rig 之后：同权重靠源序定胜负，写在前面 bottom:auto 会被基础值吃掉，
   上下同时有约束的话 aspect-ratio 就不生效了。 */
@media (max-width: 860px) {
  #trial .overlay {
    max-width: none;
    right: var(--pad);
    top: auto;
    bottom: calc(var(--bar-h) + 20px);
    display: block;
    justify-content: unset;
    align-items: unset;
  }
  #trial .title,
  #trial .sub { max-width: none; }
  #trial .title { font-size: clamp(22px, 6.4vw, 30px); }
  #trial .sub { margin-top: 8px; font-size: 13px; }
  .term-wrap { width: min(480px, 100%); margin: 10px auto 0; }
  .term-body { min-height: 72px; padding: 10px 12px 8px; }
  .term textarea { min-height: 64px; font-size: 16px; }
  .term-held { flex-wrap: wrap; }
  .rig {
    /* 矮屏不再用 70vh-430：那会把角色算成几十像素再推出画。 */
    --rig-w: max(120px, min(36vw, 22vh));
    top: calc(var(--nav-h) + 4px);
    bottom: auto;
    right: 6%;
  }
}

/* ══ 屏 2 · 预约态 ══ */
.qr-slot {
  position: relative;
  width: 56px; height: 56px; flex: none;
  padding: 3px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  cursor: zoom-in;
}
.qr-slot > img { width: 100%; height: 100%; object-fit: contain; }
.qr-pop {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  width: 220px;
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: #fffaf0;
  border: 1px solid var(--line-2);
  box-shadow: 0 18px 40px rgba(58, 40, 16, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px) scale(0.92);
  transform-origin: 16% 100%;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
  z-index: 8;
}
.qr-pop::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  height: 12px;
}
.qr-pop img { width: 100%; height: auto; display: block; }
.qr-pop span {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.qr-slot:hover .qr-pop,
.qr-slot:focus-visible .qr-pop,
.qr-slot.is-open .qr-pop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
.countdown {
  font-family: var(--mono); font-size: 26px; font-weight: 600;
  color: var(--gold); letter-spacing: 0.02em; line-height: 1.1;
}
.stackline { display: flex; flex-direction: column; gap: 2px; flex: none; }

/* ══ B 奶油纸感：屏 3 / 4 ══
   画面收成右侧一块，纸做底，字在左。底栏改实色。 */
.screen-block {
  background: var(--paper-2);
  /* 这两屏放的是控制台和案例的真截图，压暗会把证据压糊，旋钮几乎归零 */
  --img-bright: 0.97;
  --img-contrast: 1.04;
  --img-sat: 1.02;
  --img-warm: 0;
}
.screen-block .subject {
  inset: calc(var(--nav-h) + 34px) var(--pad) calc(var(--bar-h) + 40px) auto;
  width: 46%;
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 26px 64px rgba(58, 40, 16, 0.22);
}
.screen-block .scrim { display: none; }
.screen-block .overlay {
  bottom: auto; top: 50%; transform: translateY(-52%);
  max-width: 44%; right: auto;
}
.screen-block .title { font-size: clamp(30px, 3.6vw, 60px); }
.screen-block .sub { font-size: 15px; max-width: none; }
.screen-block .chip { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.screen-block .bar {
  background: var(--card);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}

/* 屏 4 的截图本来就是竖的，块也跟着竖过来 */
.screen-portrait .subject {
  width: auto; aspect-ratio: 3 / 4;
  inset: calc(var(--nav-h) + 30px) var(--pad) calc(var(--bar-h) + 34px) auto;
}
.screen-portrait .overlay { max-width: 50%; }

#cases .overlay { max-width: 42%; }
#cases .title {
  font-size: clamp(26px, 2.6vw, 36px);
  white-space: nowrap;
  margin-bottom: 12px;
}
.case-list { display: flex; flex-direction: column; gap: 6px; }
.case-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 11px 14px; border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink-2);
  transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
}
.case-ds-brief { display: none; }
.subject > .case-media-plain,
.case-pane .case-media-plain { filter: none; }
.case-pane { display: block; color: inherit; }
.case-pane.is-on { z-index: 1; }
.case-pane[href]::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 38%;
  background: linear-gradient(0deg, rgba(40, 28, 12, 0.42), transparent);
  pointer-events: none;
}
.case-enter {
  position: absolute;
  left: 50%; bottom: 22px;
  transform: translateX(-50%);
  z-index: 2;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--gold);
  color: #fffaf0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background 0.2s;
}
.case-pane[href]:hover .case-enter { background: var(--gold-2); transform: translateX(-50%) translateY(-1px); }
.case-media-dance { object-position: 52% 28%; }
.case-media-nio { object-position: 38% 58%; }
.case-media-cat { object-position: 46% 72%; }
.case-media-cosmic { object-position: 50% 40%; }
.case-media-teda { object-position: 50% 38%; }
.case-item:hover { color: var(--ink); border-color: var(--line-2); }
.case-item.is-on {
  border-color: var(--gold);
  box-shadow: 0 10px 28px rgba(58, 40, 16, 0.1);
  color: var(--ink);
}
.case-no {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gold);
  flex: none;
}
.case-nm {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.case-ds {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--ink-3);
}

/* 屏 3 · 三件事同时铺开，不再切 tab */
#product.screen-block .subject,
#product.screen-block .overlay,
#product.screen-block .scrim { display: none; }
.pack {
  position: absolute; z-index: 3;
  left: var(--pad); right: var(--pad);
  top: calc(var(--nav-h) + 22px);
  bottom: calc(var(--bar-h) + 22px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.pack-hd .chip { margin-bottom: 10px; }
.pack-hd .title {
  font-size: clamp(28px, 3.2vw, 52px);
  white-space: nowrap;
}
.pack-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}
.pack-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(58, 40, 16, 0.12);
}
.pack-viz {
  flex: 1;
  min-height: 0;
  position: relative;
}
.pack-viz.placeholder {
  position: relative;
  inset: auto;
}
.pack-viz img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(var(--img-bright)) contrast(var(--img-contrast))
          saturate(var(--img-sat)) sepia(var(--img-warm));
}
.pack-body {
  flex: none;
  min-width: 0;
  padding: 22px 22px 24px;
}
.pack-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 10px;
  white-space: nowrap;
}
.pack-code { color: var(--gold); }
.pack-body p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* 屏 5 · 上标语 · 下三件：不铺照片，不走 overlay。
   底是 1：中间轻光 + 很淡的纸纹，不是平涂，也不是黄昏实景。 */
#close.screen-block {
  background:
    radial-gradient(88% 72% at 50% 40%,
      #f2e6cc 0%, #e4d2b2 52%, #d8c4a0 100%);
}
#close.screen-block::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.28;
  mix-blend-mode: multiply;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.28  0 0 0 0 0.2  0 0 0 0 0.12  0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"),
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(34, 26, 16, 0.018) 2px 3px);
  background-size: 160px 160px, 100% 3px;
}
#close.screen-block .subject,
#close.screen-block .overlay,
#close.screen-block .scrim { display: none; }
.close-page {
  position: absolute; z-index: 3;
  left: var(--pad); right: var(--pad);
  top: calc(var(--nav-h) + 22px);
  bottom: calc(var(--bar-h) + 22px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(36px, 6vh, 72px);
  text-align: center;
}
.close-slogan {
  font-size: clamp(26px, 3.4vw, 56px);
  margin: 0;
}
.close-slogan span { display: block; white-space: nowrap; }
.close-trio {
  width: min(880px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  justify-items: center;
  gap: 20px 28px;
}
.close-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.close-ico {
  width: 22px; height: 22px;
  flex: none;
  color: var(--gold);
  overflow: visible;
}
.close-line .close-ico {
  width: 24px; height: 24px;
}
.close-item:has(.close-qr) .close-ico {
  width: 36px; height: 36px;
}
.close-qr {
  width: min(168px, 18vw);
  aspect-ratio: 1;
  border: 1.5px dashed var(--gold);
  border-radius: 8px;
  background: var(--card);
}
.close-qr img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 10px;
}
.close-qr:has(img) {
  border-style: solid;
  background: #fff;
}
.close-line {
  font-size: clamp(15px, 1.35vw, 22px);
  color: var(--ink);
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: color 0.2s;
}
.close-line:hover { color: var(--gold); }
.close-line:hover .close-ico { color: var(--gold-2); }
#close { --bar-pad: 52px; }
#close .bar { justify-content: center; }
#close .close-legal {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  white-space: normal;
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-3);
}
#close .close-legal a { color: var(--ink-4); }

/* ══ 素材占位 ══ */
.placeholder {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg, rgba(34, 26, 16, 0.05) 0 12px, transparent 12px 24px),
    var(--card);
  display: grid; place-items: center;
}
.placeholder span {
  font-size: 12px; color: var(--ink-4);
  border: 1px dashed var(--ink-4); border-radius: 6px; padding: 8px 14px;
}

/* ══ 入场 ══ */
.rise { opacity: 0; transform: translateY(18px); }
.is-in .rise { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.is-in .rise:nth-child(2) { transition-delay: 0.08s; }
.is-in .rise:nth-child(3) { transition-delay: 0.16s; }
.is-in .rise:nth-child(4) { transition-delay: 0.22s; }

/* ══ 窄屏退让：顺序按规格定死 ══ */
@media (max-width: 1280px) {
  :root { --pad: 30px; }
  .hide-1280 { display: none; }
}
@media (max-width: 1100px) {
  .hide-1100 { display: none; }
}
@media (max-width: 1024px) {
  :root { --bar-pad: 68px; --peek: 18px; --pad: 22px; }
  .hide-1024 { display: none; }
  .bar { gap: 14px; }
  .overlay { bottom: calc(var(--bar-h) + 34px); }
  .title { font-size: clamp(30px, 8.4vw, 52px); }
  .scrim {
    background:
      linear-gradient(0deg, rgba(var(--veil), 0.96) 0%, rgba(var(--veil), 0.4) 58%, rgba(var(--veil), 0.1) 100%);
  }
  /* 窄屏放不下左右并排：块退回上图下字 */
  .screen-block .subject,
  .screen-portrait .subject {
    inset: calc(var(--nav-h) + 16px) var(--pad) auto var(--pad);
    width: auto; height: 48%; aspect-ratio: auto;
  }
  .screen-block .overlay,
  .screen-portrait .overlay {
    top: auto; transform: none; max-width: none;
    bottom: calc(var(--bar-h) + 28px);
  }
  .screen-block .title { font-size: clamp(28px, 7.4vw, 44px); }
  #cases.screen {
    height: auto;
    min-height: 100svh;
    overflow: hidden;
    padding-bottom: var(--bar-h);
    box-sizing: border-box;
  }
  #cases .subject,
  #cases.screen-block .subject,
  #cases.screen-portrait .subject {
    position: relative;
    inset: auto;
    width: auto;
    height: min(38vh, 260px);
    margin: calc(var(--nav-h) + 12px) var(--pad) 10px;
  }
  #cases .overlay,
  #cases.screen-block .overlay,
  #cases.screen-portrait .overlay {
    position: relative;
    top: auto; bottom: auto; left: var(--pad); right: var(--pad);
    transform: none; max-width: none;
    padding-bottom: 16px;
  }
  #cases .title { font-size: clamp(20px, 5.4vw, 26px); margin-bottom: 8px; }
  .case-enter { bottom: 14px; padding: 10px 18px; font-size: 13px; }
  .case-item { padding: 8px 12px; gap: 10px; }
  .case-nm { font-size: 15px; }
  .case-ds { font-size: 11px; }
  #product.screen {
    height: auto;
    min-height: 100svh;
    overflow: hidden;
    padding: calc(var(--nav-h) + 16px) 0 var(--bar-h);
    box-sizing: border-box;
  }
  #product .pack {
    position: relative;
    top: auto; right: auto; bottom: auto; left: auto;
    margin: 0 var(--pad) 16px;
    min-height: 0;
  }
  .pack { gap: 12px; }
  .pack-hd .title { font-size: clamp(22px, 6vw, 36px); white-space: normal; }
  .pack-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    flex: none;
  }
  .pack-card { flex-direction: row; }
  .pack-viz { flex: 0 0 36%; min-width: 0; }
  .pack-body { flex: 1 1 0; padding: 16px 18px; display: flex; flex-direction: column; justify-content: center; }
  .pack-name { font-size: 20px; margin-bottom: 8px; }
  .pack-body p { font-size: 14px; }
  .close-slogan { font-size: clamp(22px, 6.2vw, 36px); }
  .close-slogan span { white-space: normal; }
  .close-page { gap: 32px; }
  .close-trio {
    grid-template-columns: 1fr;
    width: min(420px, 100%);
    gap: 22px;
  }
  .close-qr { width: 132px; }
  .close-item:has(.close-qr) .close-ico { width: 30px; height: 30px; }
  .close-line { font-size: 16px; }
}

/* 手机上不留邻格缝：最后一格右侧会露出空底，且触屏本来就会拖 */
@media (max-width: 720px) {
  .nav-toggle { display: grid; }
  .nav-links {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: var(--nav-h);
    flex-direction: column;
    gap: 0;
    padding: 8px var(--pad) 14px;
    background: rgba(var(--veil), 0.96);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(58, 40, 16, 0.12);
  }
  .nav.is-open .nav-links { display: flex; }
  .nav.is-open { background: rgba(var(--veil), 0.96); }
  .nav-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 15px;
    color: var(--ink);
  }
  .nav-toggle { margin-left: auto; }
}

@media (max-width: 640px) {
  :root {
    --peek: 0px;
    --bar-pad: 56px;
    --safe-bottom: max(20px, env(safe-area-inset-bottom, 0px));
  }
  .track { gap: 0; }
  .nav-inner { gap: 10px; }
  .nav-cta { padding: 8px 12px; font-size: 12px; }
  .bar {
    height: auto;
    min-height: var(--bar-h);
    padding: 8px var(--pad) var(--safe-bottom);
  }
  #close { --bar-pad: 52px; }
  #close .close-legal { font-size: 11px; }
  .brand, .brand img { height: 18px; }
  #home .overlay { bottom: calc(var(--bar-h) + 20px); }
  #home .title { font-size: clamp(24px, 7.2vw, 32px); }
  #home .iconbtn { display: none; }
  #home .btn-full { display: none; }
  #home .btn-short { display: inline; }
  .case-ds-long { display: none; }
  .case-ds-brief { display: block; }
  .case-ds { font-size: 11px; }
  .pack-card { flex-direction: column; }
  .pack-viz { flex: none; width: 100%; height: 140px; }
  .pack-name { white-space: normal; }

  /* 16:9 的图裁进竖屏会把主体切掉，先靠取景点顶住。
     正解是每张再出一版竖构图，见素材清单。 */
  .frame img { object-position: 62% center; }
}

@media (max-height: 540px) {
  .screen {
    height: auto;
    min-height: 100svh;
    overflow: visible;
  }
  #trial .rig {
    --rig-w: 110px;
    right: 4%;
  }
}

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