@layer reset, base, layout, parts, responsive, motion;

/* 标题字: WDXL Lubrifont SC (滑油字, OFL), 首屏的平面图也从它的字形切出来 */
@font-face { font-family: "SS Plan"; src: url(/fonts/title.woff2?h=1d4764e4) format("woff2"); font-display: swap; }

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p, ol, ul, dl, dd, figure, table { margin: 0; }
  ol, ul { padding: 0; list-style: none; }
  img, picture, svg { display: block; max-width: 100%; }
  img { height: auto; }
  button { font: inherit; color: inherit; cursor: pointer; }
  [hidden] { display: none !important; }
}

@layer base {
  :root {
    /* 取自商店截图: 林子的绿、毛衣的粉、血条的洋红、雪地的白 */
    --rock: #326e63;
    --dim: #285a51;
    --vein: #5f9a8b;
    --pine: #0f2f2a;
    --moon: #f2f7f3;
    --pink: #f1b4e5;
    --heart: #bb328e;
    --heart-d: #830e51;
    --gold: #ffdc93;
    --w: 5px;
    --tower: 50px;
    --r: 22px;
    --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
    --plan: "SS Plan", "PingFang SC", "Microsoft YaHei", sans-serif;
    --bar: 60px;
    --pad: clamp(16px, 6.4vw, 100px);
    --ht: clamp(26px, 5.6svh, 62px);
    /* 平面图的宽 (高 = 宽 × .8866); 竖井 = 「继」最后一笔往下的那条线 */
    --B: max(300px, min(calc((100svh - var(--bar) - var(--ht) - 104px) * 1.1279), 55vw, 1080px));
    --sp: max(150px, calc(var(--B) * .272));
    --line: calc(var(--B) * .1671);
    --sw: calc(var(--B) * .0405);
    --ring: radial-gradient(circle, #fff 0 24%, var(--heart) 25% 43%, #fff 44% 56%, var(--heart) 57% 69%, #0000 70%);
    /* 墙: 两头实、中间是门 */
    --gate: linear-gradient(90deg, var(--rock) 28%, #0000 0 72%, var(--rock) 0) no-repeat;
    --dots: radial-gradient(circle, var(--heart) 1.6px, #0000 2.1px) 50% 0 / 8px 11px repeat-y;
    color-scheme: light;
    scroll-padding-top: calc(var(--bar) + 24px);
  }
  @supports not (height: 1svh) {
    :root { --ht: clamp(26px, 5.6vh, 62px); --B: max(300px, min(calc((100vh - var(--bar) - var(--ht) - 104px) * 1.1279), 55vw, 1080px)); }
  }
  html { background: var(--rock); }
  body { font: 17px/1.8 var(--sans); color: var(--moon); background: var(--rock); -webkit-font-smoothing: antialiased; text-wrap: pretty; }
  h1, h2, h3 { line-height: 1.2; font-weight: 400; }
  .t { font-family: var(--plan); font-weight: 400; }
  a { color: inherit; }
  :focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
  .room :focus-visible { outline-color: var(--heart); }
  .skip { position: absolute; left: -999px; top: 8px; z-index: 50; padding: 8px 14px; background: var(--pink); color: var(--pine); }
  .skip:focus { left: 12px; }
  .defs { position: absolute; width: 0; height: 0; }
}

@layer layout {
  .wrap { width: min(1620px, 100% - 2 * var(--pad)); margin-inline: auto; }
  .hero { overflow: hidden; overflow: clip; }
  .hero-in { position: relative; display: grid; grid-template-columns: var(--B) minmax(0, 1fr); gap: clamp(36px, 5vw, 84px); align-items: center; padding: var(--ht) 0 72px; }
  .sec { display: grid; grid-template-columns: var(--sp) minmax(0, 1fr); column-gap: var(--w); }
  .cells { position: relative; display: grid; gap: var(--w); margin-bottom: 84px; }
}

@layer parts {
  /* 顶栏: 五个字就是目录, 走到哪一节亮到哪个字 */
  .bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; height: var(--bar); padding-inline: var(--pad); background: var(--pine); }
  .bar nav { display: flex; gap: 4px; margin-left: -14px; }
  .bar nav a { display: flex; align-items: center; gap: 9px; height: var(--bar); padding-inline: 14px; text-decoration: none; font-size: 15px; color: #cfe0d9; }
  .bar nav b { font-size: 30px; line-height: 1; color: #6fa898; }
  .bar nav a:hover span { text-decoration: underline; text-underline-offset: 6px; }
  .bar nav a.on b { color: var(--moon); }
  .bar nav a.now b { color: var(--pink); }
  .bar nav a.now span { color: #fff; }
  .pill { margin-left: auto; border: 0; padding: 9px 20px; font-size: 15px; font-weight: 700; line-height: 1.4; background: var(--heart); color: #fff; border-radius: 10px; }
  .pill:hover { background: #c43796; }

  /* 首屏: 五个字切成房间 */
  .block { position: relative; z-index: 1; width: var(--B); }
  .plan { position: relative; width: 100%; height: auto; overflow: visible; pointer-events: none; }
  .plan .w { fill: var(--moon); }
  .plan .p { fill: var(--pink); }
  .plan .h { fill: var(--heart); transform-box: fill-box; transform-origin: 50% 60%; }
  .plan .fr { fill: none; stroke: var(--moon); stroke-width: 13; }
  .plan .rt { fill: none; stroke: var(--heart); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 0 30; }
  .plan .mk { offset-distance: 100%; offset-rotate: 0deg; }
  .plan .mk circle:nth-child(odd) { fill: var(--heart); }
  .plan .mk circle:nth-child(even) { fill: #fff; }
  .pic { position: absolute; left: 69.135%; top: 0; width: 30.866%; height: 47.913%; }
  .pic img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--B) * .0268); }
  /* 鼠标移到字上, 看这个字通到哪一节 */
  .go { display: none; position: absolute; width: 30.866%; height: 47.913%; }
  .go span { position: absolute; left: 50%; top: 50%; translate: -50% -50%; padding: 7px 18px 8px; border-radius: 12px; background: var(--pine); color: var(--pink); font-size: 30px; line-height: 1.2; white-space: nowrap; opacity: 0; }
  .go:hover span { opacity: 1; }
  @media (hover: hover) { .go { display: block; } }
  .exit { position: absolute; left: calc(var(--line) - var(--sw) / 2); top: calc(var(--ht) + var(--B) * .8866); bottom: 0; width: var(--sw); background: var(--gate) 0 0 / 100% 4px, var(--dots), var(--pink); }

  .hero h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; }
  .hero h1 span { font-size: clamp(44px, 4.2vw, 66px); line-height: 1.1; }
  .hero h1 small { font-size: clamp(22px, 2vw, 30px); letter-spacing: .02em; color: #fbdcf5; }
  .lead { margin-top: 14px; max-width: 23em; font-size: clamp(18px, 1.4vw, 21px); line-height: 1.8; }
  .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
  .dl-btn, .alt-btn { display: inline-flex; align-items: center; justify-content: center; border: 0; padding: 19px 44px; font-family: var(--plan); font-size: 31px; line-height: 1.1; text-decoration: none; border-radius: 14px; }
  .dl-btn { background: var(--heart); color: #fff; }
  .dl-btn:hover { background: #c43796; }
  .dl-btn:active { background: var(--heart-d); }
  .alt-btn { background: var(--pink); color: var(--pine); }
  .alt-btn:hover { background: #f8cdf0; }
  .facts { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 14px 44px; margin-top: 26px; line-height: 1.5; }
  .facts dt { font-size: 14px; color: #dcece5; }
  .facts dd { font-weight: 700; }
  .facts small { display: block; font-size: 14px; font-weight: 400; }
  .size { margin-top: 26px; max-width: 440px; }
  .size svg { width: 100%; height: auto; }
  .s1 { fill: var(--pink); }
  .s2 { fill: none; stroke: #a9cfc2; stroke-width: 2.500; }
  .size p { margin-top: 9px; font-size: 17px; line-height: 1.6; }

  /* 竖井和电梯: 左边一条线走到底, 每一节的标题是一部电梯, 跟着往下走 */
  .lift { position: relative; padding-bottom: 84px; }
  .lift::before { content: ""; position: absolute; inset: 0 auto 0 calc(var(--line) - var(--sw) / 2); width: var(--sw); background: var(--dots), var(--gate) 0 100% / 100% 4px, var(--pink); }
  .cab { position: sticky; z-index: 1; top: calc(var(--bar) + 24px); height: 158px; border-radius: var(--r); color: var(--pine); background: var(--dots), var(--pink); background-position: calc(var(--line) - 4px) 0, 0 0; }
  .cab::before, .cab::after { content: ""; position: absolute; left: calc(var(--line) - var(--sw) / 2 - 14px); width: calc(var(--sw) + 28px); height: 14px; --c: #0000 13.500px, var(--pink) 14px;
    background: radial-gradient(circle at 0 var(--v), var(--c)) 0 0 / 14px 14px no-repeat, radial-gradient(circle at 100% var(--v), var(--c)) 100% 0 / 14px 14px no-repeat; }
  .cab::before { --v: 0; bottom: 100%; }
  .cab::after { --v: 100%; top: 100%; }
  .cab h2 { position: absolute; left: 20px; bottom: 18px; font-size: clamp(36px, 3.3vw, 50px); }
  .shot:focus-visible { outline-offset: -4px; }
  .cab .ring { position: absolute; left: calc(var(--line) - 20px); top: 22px; width: 40px; height: 40px; border-radius: 50%; background: var(--ring); }
  .js .sec:not(.now) .ring { scale: .5; }
  .nook { position: absolute; top: var(--y); width: 58px; height: 42px; border: 2px solid var(--vein); border-radius: 10px; }
  .nook.lit { background: var(--pink); border-color: var(--pink); }
  .nook.lit::before { background: var(--pink); border-color: var(--pink); }
  .nook.l { left: calc(var(--line) - var(--sw) / 2 - 74px); }
  .nook.r { left: calc(var(--line) + var(--sw) / 2 + 16px); width: 36px; height: 60px; }
  .nook::before { content: ""; position: absolute; top: calc(50% - 8px); width: 18px; height: 16px; border: solid var(--vein); border-width: 2px 0; background: var(--rock); }
  .nook.l::before { left: 100%; margin-left: -1px; }
  .nook.r::before { right: 100%; margin-right: -1px; }

  /* 房间 */
  .room { --tl: 0; --tr: 0; --br: 0; --bl: 0; position: relative; padding: 26px 30px 28px; background: var(--moon); color: var(--pine); border-radius: var(--tl) var(--tr) var(--br) var(--bl); }
  .room.pink { background: var(--pink); }
  .room.view { padding: 0; }
  .view > picture { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
  .view img { width: 100%; height: 100%; object-fit: cover; }
  .door { position: absolute; z-index: 2; background: inherit; }
  .view > .door { background: var(--moon); }
  .door.r { left: 100%; top: calc(50% - 20px); width: var(--w); height: 40px; }
  .door.b { top: 100%; left: calc(50% - 20px); height: var(--w); width: 40px; }
  .pass { position: absolute; top: 100%; left: var(--x); width: 40px; height: 84px; background: var(--gate) 0 0 / 100% 4px, var(--gate) 0 100% / 100% 4px, var(--moon); }
  .to-tower { height: calc(84px + var(--tower) + var(--w)); }
  .room h3 { font-size: 28px; }
  .room h3 + p { margin-top: 8px; }

  /* 故事 */
  .c-story { grid-template-columns: 52px minmax(0, 1fr) minmax(0, 390px); }
  .v-bridge { grid-column: 1 / -1; aspect-ratio: 1920 / 588; --tl: var(--r); --tr: var(--r); --bl: var(--r); }
  .say { grid-column: 2; --bl: var(--r); display: grid; align-content: center; gap: 14px; padding: 34px 44px 38px; font-size: 20px; }
  .say p { max-width: 27em; }
  .credit { --br: var(--r); padding: 26px 30px; font-size: 15px; line-height: 1.6; }
  .credit div { display: grid; grid-template-columns: 82px 1fr; gap: 10px; padding: 5px 0; }
  .credit dt { color: #4a665f; }
  .credit dd { font-weight: 600; }

  /* 玩法 */
  .c-play { grid-template: ". leap . ." var(--tower) ". leap charm charm" clamp(300px, 22.500vw, 420px) ". leap rcharm rcharm" auto "rleap rleap clash gate" auto "grow grow clash gate" auto ". . rclash rgate" auto "more more more more" auto / 52px 244px minmax(0, 1.1fr) minmax(0, 1fr); }
  .v-charm { grid-area: charm; --tr: var(--r); } .r-charm { grid-area: rcharm; }
  .v-leap { grid-area: leap; --tl: var(--r); --tr: var(--r); } .r-leap { grid-area: rleap; --tl: var(--r); }
  .v-clash { grid-area: clash; } .r-clash { grid-area: rclash; }
  .v-gate { grid-area: gate; } .r-gate { grid-area: rgate; }
  .r-grow { grid-area: grow; --bl: var(--r); }
  .r-charm p { max-width: 40em; }
  .r-leap, .r-grow { padding-block: 24px 26px; }
  .more { grid-area: more; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--w); }
  .more .room { padding: 24px 24px 26px; }
  .more p { font-size: 16px; line-height: 1.7; }
  .r-safe { --tl: var(--r); --bl: var(--r); } .r-set { --br: var(--r); }

  /* 画面 */
  .c-shots { grid-template: "note . ." auto "g1 g1 g2" auto "g1 g1 g3" auto "g4 g6 g6" auto "g5 g6 g6" auto / minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
  .note { grid-area: note; --tl: var(--r); --tr: var(--r); font-size: 16px; line-height: 1.75; }
  .g1 { grid-area: g1; } .g2 { grid-area: g2; --tr: var(--r); } .g3 { grid-area: g3; } .g4 { grid-area: g4; } .g5 { grid-area: g5; --bl: var(--r); } .g6 { grid-area: g6; --br: var(--r); }
  .shot { display: grid; grid-template-rows: auto 1fr; width: 100%; height: 100%; padding: 0; border: 0; background: none; text-align: left; border-radius: inherit; overflow: hidden; }
  .shot picture { aspect-ratio: 16 / 9; overflow: hidden; }
  .shot img { width: 100%; height: 100%; object-fit: cover; }
  :is(.g1, .g6) .shot { grid-template-rows: minmax(0, 1fr) auto; }
  :is(.g1, .g6) .shot picture { aspect-ratio: auto; position: relative; }
  :is(.g1, .g6) .shot img { position: absolute; inset: 0; }
  .cap { padding: 9px 16px 10px; font-size: 15px; line-height: 1.55; }
  .shot:hover .cap { background: var(--pink); }

  /* 安装 */
  .c-setup { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .req { grid-column: 1 / 5; --tl: var(--r); --bl: var(--r); } .spec { grid-column: 5 / 13; --tr: var(--r); padding-block: 16px; }
  .spec table { width: 100%; border-collapse: collapse; line-height: 1.55; }
  .spec th, .spec td { padding: 9px 14px 9px 0; text-align: left; vertical-align: top; }
  .spec tbody tr > * { border-top: 2px solid #cfdcd5; }
  .spec thead th { font-weight: 700; }
  .spec tbody th { width: 92px; font-weight: 400; color: #4a665f; }
  .steps { grid-column: 2 / 13; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--w); counter-reset: s; }
  .steps li { counter-increment: s; padding: 20px 24px 26px; font-size: 16px; line-height: 1.7; }
  .steps li::before { content: counter(s); display: block; margin-bottom: 6px; font: 46px/1 var(--plan); color: var(--heart); }
  .steps .pink::before { color: var(--heart-d); }
  .lang { grid-column: 1 / 13; --tl: var(--r); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 44px; align-items: start; }
  .path { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 12px; }
  .path li { position: relative; padding: 6px 14px; border: 2px solid var(--pine); border-radius: 8px; line-height: 1.5; font-size: 16px; }
  .path li:not(:last-child)::after { content: ""; position: absolute; left: 100%; top: calc(50% - 6px); width: 26px; height: 12px; margin-left: -2px; border: solid var(--pine); border-width: 2px 0; background: var(--moon); }
  .path li:last-child { background: var(--pink); }
  .save { grid-column: 1 / 5; --bl: var(--r); }
  .save code { font: 500 15px/1.6 ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
  .save p + p { margin-top: 8px; }
  .apk { grid-column: 1 / 13; }
  .file { grid-column: 5 / 13; --br: var(--r); }
  .file dl { margin-top: 10px; }
  .file dl div { display: grid; grid-template-columns: 82px 1fr; gap: 10px; padding: 5px 0; font-size: 15px; line-height: 1.6; }
  .file dt { color: #4a665f; }
  .file dd { font-weight: 600; overflow-wrap: anywhere; }
  .file code { font: 500 13.500px/1.6 ui-monospace, Menlo, Consolas, monospace; }
  .file .second { margin-top: 24px; padding-top: 14px; border-top: 2px solid #cfdcd5; }
  .file-act { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 16px; }
  .file-act .dl-btn { padding: 16px 36px; font-size: 27px; }
  .fine { margin-top: 14px; font-size: 15px; line-height: 1.6; }
  .ghost { border: 2px solid var(--pine); border-radius: 12px; padding: 9px 18px; font-size: 15px; background: none; }
  .ghost:hover { background: var(--pink); }

  /* 问答: 心形是锁 */
  .c-faq { grid-template: ". fall" var(--tower) "qa fall" auto ". fall" var(--tower) / minmax(0, 1fr) 270px; }
  .qa { grid-area: qa; --tl: var(--r); --bl: var(--r); padding: 14px 34px 18px 30px; }
  .qa details + details { border-top: 2px solid #cfdcd5; }
  .qa summary { display: grid; grid-template-columns: 26px 1fr; gap: 14px; align-items: center; padding: 15px 0; font-weight: 600; line-height: 1.55; list-style: none; cursor: pointer; }
  .qa summary::-webkit-details-marker { display: none; }
  .qa summary svg { width: 26px; height: 26px; }
  .qa summary:hover { color: var(--heart-d); }
  .qa p { padding: 0 0 18px 40px; max-width: 44em; overflow-wrap: anywhere; }
  .v-fall { grid-area: fall; --tl: var(--r); --tr: var(--r); --br: var(--r); --bl: var(--r); }
  #heart path { transition: fill .2s; }
  .h1 { fill: var(--f1, #ee8fd3); } .h2 { fill: var(--f2, #d85fb2); } .h3 { fill: var(--f3, #bb328e); } .h4 { fill: var(--f4, #8d1c67); }
  .qa details:not([open]) svg { --f1: #c9dad2; --f2: #b3cabf; --f3: #9fbbae; --f4: #88a89a; }

  /* 终点 */
  .end { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px 40px; align-items: center; margin-bottom: 88px; padding: 40px 48px 42px; border-radius: var(--r); background: var(--heart); color: #fff; }
  .end::before { content: ""; position: absolute; top: 0; left: calc(var(--line) - var(--sw) / 2); width: var(--sw); height: 4px; background: var(--gate); }
  .pf { fill: none; stroke: var(--heart-d); stroke-width: 5; stroke-linejoin: round; }
  .pn { fill: var(--heart-d); }
  .end .big { width: 124px; height: 120px; overflow: visible; --f1: #fff; --f2: #fbdcf4; --f3: #f1b4e5; --f4: #dc86c9; }
  .end h2 { font-size: clamp(38px, 3.6vw, 54px); }
  .end p { margin-top: 6px; line-height: 1.65; }
  .end .cta { margin: 0; flex-direction: column; }
  .end .dl-btn { background: var(--moon); color: var(--heart-d); }
  .end .dl-btn:hover { background: #fff; }

  /* 页脚 */
  .foot { padding: 56px 0 68px; background: var(--pine); }
  .foot-title { font-size: 46px; line-height: 1.2; margin-bottom: 8px; }
  .links { display: flex; gap: 24px; margin-top: 8px; }

  /* 弹窗 */
  dialog { border: 0; padding: 0; color: var(--pine); }
  dialog::backdrop { background: rgb(15 47 42 / .78); }
  .x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; background: none; font-size: 26px; line-height: 1; border-radius: 10px; }
  .dlg { width: min(440px, 100% - 32px); padding: 36px 28px 30px; background: var(--moon); border-radius: var(--r); text-align: center; }
  .dlg h2 { font-size: 40px; }
  .dlg-file { margin: 8px 0 18px; font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
  #ts-box { display: grid; place-items: center; min-height: 70px; }
  #dl-status { margin-top: 14px; font-size: 16px; line-height: 1.7; }
  #dl-link { margin-top: 16px; font-size: 21px; padding: 14px 28px; }
  .lb { width: min(1280px, 100% - 24px); max-height: calc(100svh - 24px); background: none; overflow: visible; color: #fff; }
  .lb picture img { width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 220px); max-height: calc(100svh - 220px); margin-inline: auto; border-radius: 14px; }
  .lb::backdrop { background: rgb(15 47 42 / .95); }
  #lb-cap { margin-top: 12px; text-align: center; }
  .lb-nav { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 8px; }
  .lb-nav button, .lb .x { width: 44px; height: 44px; border: 0; background: var(--moon); color: var(--pine); font-size: 24px; line-height: 1; border-radius: 12px; }
  .lb .x { top: -52px; right: 0; }
  .dlg :focus-visible { outline-color: var(--heart-d); }

  /* 隐私 / 条款 / 404 */
  .doc { max-width: 780px; margin-block: 56px; padding: 44px 48px 56px; background: var(--moon); color: var(--pine); border-radius: var(--r); }
  .doc-page { overflow-x: clip; }
  .doc { position: relative; }
  .doc::before { content: ""; position: absolute; right: 100%; top: 40px; width: 100vw; height: 30px; background: linear-gradient(var(--rock) 28%, #0000 0 72%, var(--rock) 0) 100% 0 / 4px 100% no-repeat, radial-gradient(circle, var(--heart) 1.600px, #0000 2.100px) 0 50% / 11px 8px repeat-x, var(--pink); }
  .doc h1 { margin: 16px 0 22px; font-size: 46px; }
  .doc h2 { margin: 30px 0 6px; font-size: 20px; font-weight: 700; }
  .doc p { margin-top: 10px; }
  .doc .dl-btn { margin-top: 14px; font-size: 25px; padding: 15px 32px; }
  .doc .date { margin-top: 36px; font-size: 15px; color: #4a665f; }
}

@layer responsive {
  @media (max-width: 1240px) {
    :root { --tower: 38px; }
    .c-story { grid-template-columns: 26px minmax(0, 1fr) minmax(0, 340px); }
    .say { padding: 28px 32px 32px; font-size: 18px; }
    .c-play { grid-template-columns: 26px 210px minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: var(--tower) 260px; }
    .more { grid-template-columns: 1fr 1fr; }
    .r-safe { --bl: 0; } .r-pad .door { display: none; } .r-hard { --bl: var(--r); }
    .steps { grid-template-columns: 1fr 1fr; }
    .steps li:nth-child(2) .door { display: none; }
    .lang { grid-template-columns: minmax(0, 1fr); }
    .path { gap: 10px 16px; }
    .path li { padding: 6px 9px; font-size: 15px; }
    .path li:not(:last-child)::after { width: 20px; }
    .save { grid-column: 1 / 13; --bl: 0; } .file { grid-column: 1 / 13; --bl: var(--r); }
    .save .door { display: none; }
  }

  /* 上下排: 手机和竖屏平板 */
  @media (max-width: 940px) {
    :root { --line: calc(100% - 46px); --sw: 26px; }
    .bar nav { margin-left: -8px; gap: 0; }
    .bar nav a { padding-inline: 8px; }
    .hero-in { padding-bottom: 0; }
    .exit, .pass, .nook { display: none; }
    .sec { display: block; }
    .sec::before, .end::after { content: ""; display: block; width: var(--sw); height: 68px; margin-left: calc(var(--line) - var(--sw) / 2); background: var(--gate) 0 0 / 100% 4px, var(--gate) 0 100% / 100% 4px, var(--dots), var(--pink); }
    .sec:first-child { margin-top: 44px; }
    .sec:first-child::before { display: none; }
    .lift { padding: 0; }
    .lift::before, .cab::before, .cab::after { display: none; }
    .cab { position: relative; top: 0; height: 84px; border-radius: var(--r) var(--r) 0 0; background: var(--pink); }
    .cab h2 { left: 24px; bottom: 20px; font-size: 40px; }
    .cab .ring { top: 22px; }
    .cab .door.r { left: calc(var(--line) - 20px); }
    .cells, .c-story, .c-play, .c-shots, .c-setup, .c-faq { grid-template: none; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: var(--w) 0 0; border-radius: 0 0 var(--r) var(--r); overflow: hidden; overflow: clip; }
    .cells > *, .more, .steps { grid-area: auto; grid-column: 1 / -1; }
    .cells .room { border-radius: 0; }
    figure.view { aspect-ratio: 16 / 9; }
    .door.r { left: calc(50% - 20px); top: 100%; width: 40px; height: var(--w); }
    .more .door, .steps li .door { display: none; }
    .v-bridge img { object-position: 8% 50%; }
    .c-play { grid-template: "charm charm" auto "rcharm rcharm" auto "leap rleap" auto "leap grow" auto "clash gate" auto "rclash rgate" auto "more more" auto / minmax(0, 1fr) minmax(0, 1fr); }
    .v-charm { grid-area: charm; } .r-charm { grid-area: rcharm; } .v-leap { grid-area: leap; } .r-leap { grid-area: rleap; } .r-grow { grid-area: grow; }
    .v-clash { grid-area: clash; } .v-gate { grid-area: gate; } .r-clash { grid-area: rclash; } .r-gate { grid-area: rgate; } .more { grid-area: more; }
    .cells .v-leap { aspect-ratio: auto; }
    .v-leap .door.r { left: 100%; top: calc(25% - 18px); width: var(--w); height: 36px; }
    .v-leap .door.b { display: none; }
    :is(.g2, .g3, .g4, .g5) { grid-column: auto; }
    :is(.g1, .g6) .shot picture { aspect-ratio: 16 / 9; }
    .v-fall { aspect-ratio: 16 / 9; }
    .v-fall img { object-position: 50% 82%; }
    .end { grid-template-columns: auto minmax(0, 1fr); margin: 68px 0 64px; }
    .end .cta { grid-column: 1 / -1; flex-direction: row; }
    .end::before { display: none; }
    .end::after { position: absolute; bottom: 100%; left: 0; }
  }
  @media (max-width: 940px) and (orientation: portrait), (max-width: 620px) {
    :root { --B: min(100vw - 2 * var(--pad), 620px, 60vh); }
    .hero-in { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  }
  @media (max-width: 620px) {
    :root { --pad: 17px; --bar: 54px; --ht: 14px; --r: 20px; --w: 4px; }
    body { font-size: 16px; }
    .bar nav { margin-left: -6px; }
    .bar nav a { padding-inline: 6px; }
    .bar nav b { font-size: 33px; }
    .bar nav span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .hero-in { gap: 14px; }
    .hero h1 { gap: 0 10px; }
    .hero h1 span { font-size: 33px; }
    .hero h1 small { font-size: 20px; }
    .lead { margin-top: 4px; font-size: 16px; line-height: 1.65; }
    .cta { margin-top: 13px; gap: 9px; }
    .cta > * { flex: 1 1 100%; }
    .dl-btn, .alt-btn { padding: 16px 20px; font-size: 27px; }
    .facts { grid-template-columns: 1fr 1fr; gap: 10px 20px; margin-top: 16px; font-size: 15px; }
    .size { margin-top: 16px; max-width: none; }
    .size p { margin-top: 7px; font-size: 16px; }
    .cab { height: 74px; }
    .cab h2 { left: 20px; bottom: 16px; font-size: 38px; }
    .cab .ring { top: 17px; }
    .room:not(.view) { padding: 18px 18px 20px; }
    .room h3 { font-size: 26px; }
    .say { gap: 10px; font-size: 17px; }
    .v-bridge { aspect-ratio: 16 / 10; }
    .credit div { grid-template-columns: 78px 1fr; }
    .r-leap p, .r-grow p, .r-clash p, .r-gate p, .more p { font-size: 15px; line-height: 1.65; }
    .cells :is(.v-clash, .v-gate) { aspect-ratio: 4 / 5; }
    .v-clash img { object-position: 66% 50%; }
    .more { grid-template-columns: 1fr 1fr; }
    .steps { grid-template-columns: minmax(0, 1fr); }
    .steps li { display: grid; grid-template-columns: 34px 1fr; gap: 4px; align-items: start; }
    .steps li::before { margin: -2px 0 0; font-size: 38px; }
    .steps li .door.r { display: block; }
    .cap { padding: 8px 12px 9px; font-size: 14px; }
    .spec th, .spec td { padding: 8px 8px 8px 0; font-size: 15px; }
    .spec tbody th { width: 58px; }
    .file dl div { grid-template-columns: 66px 1fr; }
    .file-act > button { flex: 1 1 100%; }
    .qa summary { gap: 12px; padding: 14px 0; }
    .qa p { padding-left: 0; }
    .end { padding: 26px 20px 24px; gap: 16px; }
    .end .big { width: 84px; height: 82px; }
    .end h2 { font-size: 36px; }
    .doc { margin-block: 20px; padding: 26px 20px 36px; }
    .doc h1 { font-size: 38px; }
    .foot { padding: 44px 0 56px; }
  }
  @media (max-width: 700px) {
    .path { gap: 18px 0; flex-direction: column; align-items: flex-start; }
    .path li { padding: 6px 14px; font-size: 16px; }
    .path li:not(:last-child)::after { left: 24px; top: 100%; width: 12px; height: 22px; margin: -2px 0 0; border-width: 0 2px; }
  }
  @media (max-height: 500px) {
    .lb picture img { max-height: calc(100vh - 112px); max-height: calc(100svh - 112px); }
    #lb-cap { margin-top: 6px; }
    .lb-nav { margin-top: 4px; }
    .lb .x { position: fixed; top: 10px; right: 10px; }
  }
  @media (max-width: 350px) {
    .bar nav a { padding-inline: 3px; }
    .pill { padding-inline: 14px; }
  }
}

@layer motion {
  @media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
    :root { interpolate-size: allow-keywords; }
    /* 进场: 标记沿主线走一遍, 走到哪间亮哪间 */
    .plan .w, .plan .p, .plan .h { animation: room .36s var(--t) both; }
    .plan .h { animation: room .36s var(--t) both, beat 2.6s 2.4s infinite; }
    @keyframes room { from { fill: var(--dim); } 40% { fill: #d672bd; } }
    .plan .fr { animation: wall .4s .48s both; }
    @keyframes wall { from { stroke: var(--dim); } }
    .pic img { animation: window .6s .48s both; }
    @keyframes window { from { filter: brightness(.3) saturate(.3); } }
    .plan .rt, .plan .rt2 { animation: fade .5s 1.5s both; }
    @keyframes fade { from { opacity: 0; } }
    .plan .mk { animation: walk 1.5s linear both; }
    @keyframes walk { from { offset-distance: 0; } }
    .plan .mk circle:first-child { animation: pulse 1.8s 1.6s infinite; }
    @keyframes pulse { 50% { r: 56px; opacity: .55; } }
    /* 往下走: 看到哪间亮哪间 */
    .js .cells .room:not(.lit) { background: var(--dim); color: var(--moon); }
    .js .cells .room:not(.lit) :is(dt, th) { color: inherit; }
    .js .view:not(.lit) img { filter: brightness(.3) saturate(.3); }
    .view img { transition: filter .5s; }
    .cells .room.lit { animation: lit .45s backwards; }
    @keyframes lit { from { background: var(--dim); color: var(--moon); } 42% { background: #d672bd; } }
    .nook { transition: background .4s, border-color .4s; }
    .ring { transition: scale .3s; }
    .now .ring { animation: ping 1.8s .3s infinite; }
    @keyframes ping { 50% { scale: 1.16; } }
    .qa details::details-content { block-size: 0; overflow: hidden; transition: block-size .28s, content-visibility .28s allow-discrete; }
    .qa details[open]::details-content { block-size: auto; }
    .qa summary:hover svg, .end .big { animation: beat 1.5s infinite; }
    .qa details[open] summary svg { animation: beat .6s; }
    @keyframes beat { 0%, 100% { scale: 1; } 18% { scale: 1.14; } 32% { scale: .97; } 46% { scale: 1.07; } 60% { scale: 1; } }
  }
}
