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

@font-face { font-family: "SK Title"; src: url(/fonts/title.woff2?h=963bf39b) format("woff2"); font-display: swap; }

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

@layer base {
  :root {
    --night: #10142a;
    --night-2: #171c38;
    --night-3: #222849;
    --lamp: #f4b95c;
    --neon: #ff5c9a;
    --mist: #c9cfe6;
    --mist-2: rgb(201 207 230 / .7);
    --line: rgb(201 207 230 / .14);
    --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
    --title: "SK Title", "Songti SC", "Noto Serif CJK SC", serif;
    color-scheme: dark;
    scroll-padding-top: 72px;
  }
  html { background: var(--night); }
  body { font: 16px/1.8 var(--sans); color: var(--mist); background: var(--night); -webkit-font-smoothing: antialiased; text-wrap: pretty; }
  h1, h2, h3 { line-height: 1.25; font-weight: 400; text-wrap: balance; }
  .t { font-family: var(--title); letter-spacing: .04em; }
  a { color: inherit; }
  :focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; border-radius: 4px; }
  .skip { position: absolute; left: -999px; top: 8px; z-index: 50; padding: 8px 14px; background: var(--lamp); color: var(--night); border-radius: 6px; }
  .skip:focus { left: 12px; }
}

@layer layout {
  .wrap { width: min(1120px, 100% - 48px); margin-inline: auto; }
  main > section { padding-block: clamp(64px, 8vw, 112px); }
  main > .hero { padding: 0; }
  h2.t { font-size: clamp(38px, 4.8vw, 56px); color: #fff; }
  h2.t::after { content: ""; display: block; width: 56px; height: 3px; margin-top: 12px; background: linear-gradient(90deg, var(--lamp), var(--neon)); border-radius: 2px; }
  .sub { margin-top: 12px; color: var(--mist-2); }
  .more, .setup { background: var(--night-2); }
}

@layer parts {
  /* 可疑度: 随滚动上涨 (游戏里被人看见太久就 GAME OVER) */
  .sus { position: fixed; right: 18px; top: 50%; translate: 0 -50%; z-index: 25; display: grid; justify-items: center; gap: 8px; pointer-events: none; }
  .sus-label { writing-mode: vertical-rl; font-size: 12px; letter-spacing: .3em; color: var(--mist-2); }
  .sus-bar { position: relative; width: 6px; height: 160px; border-radius: 3px; background: rgb(255 255 255 / .1); overflow: hidden; }
  .sus-bar span { position: absolute; inset: 0; border-radius: 3px; background: linear-gradient(0deg, var(--neon), #ff2d55); transform-origin: bottom; scale: 1 0; }

  .bar { position: fixed; inset: 0 0 auto; z-index: 30; display: flex; align-items: center; gap: 26px; height: 60px; padding-inline: max(24px, (100% - 1120px) / 2);
    background: rgb(16 20 42 / .82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .brand { font-size: 26px; text-decoration: none; color: #fff; }
  .bar nav { display: flex; gap: 20px; margin-left: auto; font-size: 14px; }
  .bar nav a { text-decoration: none; color: var(--mist-2); }
  .bar nav a:hover { color: #fff; }
  .pill { border: 0; border-radius: 999px; padding: 7px 16px; font-size: 14px; font-weight: 700; background: var(--lamp); color: #2a1a05; }

  /* 首屏: 夜晚公园 */
  .hero { position: relative; min-height: max(640px, 100svh); display: grid; align-items: center; overflow: hidden; isolation: isolate; }
  .night { position: absolute; inset: 0; z-index: -1; }
  .night picture, .night img { width: 100%; height: 100%; object-fit: cover; object-position: 58% 40%; }
  .night::after { content: ""; position: absolute; inset: 0;
    background: radial-gradient(40% 50% at 75% 30%, rgb(244 185 92 / .12), transparent 70%),
                linear-gradient(90deg, rgb(16 20 42 / .96) 0%, rgb(16 20 42 / .8) 34%, rgb(16 20 42 / .1) 64%, rgb(16 20 42 / .35) 100%),
                linear-gradient(0deg, var(--night) 0%, transparent 30%); }
  .hero-in { width: min(1120px, 100% - 48px); margin-inline: auto; padding: 110px 0 70px; }
  .kicker { color: var(--lamp); letter-spacing: .14em; }
  .hero h1 { display: grid; gap: 8px; margin: 10px 0 8px; }
  .big { white-space: nowrap; font-size: clamp(72px, 10vw, 132px); line-height: 1; color: #fff; text-shadow: 0 0 40px rgb(255 92 154 / .35); }
  .full { font-size: clamp(20px, 2.2vw, 28px); color: var(--mist); max-width: 16em; }
  .en { color: var(--mist-2); font-size: 14px; letter-spacing: .04em; }
  .lead { margin-top: 18px; max-width: 26em; font-size: 17px; }
  .meta { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 10px 30px; margin-top: 22px; }
  .meta dt { font-size: 12px; color: var(--mist-2); }
  .meta dd { font-weight: 700; color: #fff; }
  .cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
  .dl-btn { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; padding: 14px 34px; font-size: 17px; font-weight: 700;
    letter-spacing: .06em; background: var(--lamp); color: #2a1a05; text-decoration: none; box-shadow: 0 0 0 6px rgb(244 185 92 / .15), 0 10px 30px rgb(244 185 92 / .25); }
  .dl-btn:hover { background: #f8c97a; }
  .ghost { display: inline-flex; align-items: center; border: 1px solid rgb(201 207 230 / .35); border-radius: 999px; padding: 12px 22px; font-size: 15px;
    text-decoration: none; background: rgb(16 20 42 / .4); }
  .ghost:hover { border-color: #fff; }

  /* 怎么玩: 一局的循环 */
  .loop { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 34px; counter-reset: k; }
  .loop li { counter-increment: k; position: relative; padding: 26px 22px 24px; border-left: 1px solid var(--line); }
  .loop li:first-child { border-left: 0; padding-left: 0; }
  .loop li::before { content: counter(k); display: block; font: 13px/1 var(--sans); color: var(--neon); letter-spacing: .2em; margin-bottom: 14px; }
  .loop h3 { font-size: 26px; color: #fff; margin-bottom: 8px; }
  .loop p { color: var(--mist-2); font-size: 15px; }
  .stats { display: flex; gap: 46px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); flex-wrap: wrap; }
  .stats p { display: grid; color: var(--mist-2); }
  .stats b { font-weight: 400; font-size: 52px; line-height: 1.1; color: var(--lamp); }
  .aside { margin-top: 18px; color: var(--mist); }

  /* 难度和设置 */
  .more-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 52px; align-items: start; }
  .levels { display: grid; gap: 0; margin-top: 28px; }
  .levels div { display: grid; grid-template-columns: 88px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .levels dt { font-size: 24px; color: var(--lamp); }
  .note { margin-top: 14px; color: var(--mist-2); font-size: 14px; }
  .opts { display: grid; gap: 10px; padding: 26px; border-radius: 16px; background: var(--night-3); border: 1px solid var(--line); }
  .opts li { position: relative; padding-left: 22px; }
  .opts li::before { content: ""; position: absolute; left: 0; top: .65em; width: 8px; height: 8px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 10px var(--neon); }

  /* 系列 */
  .series { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 48px; align-items: center; }
  .poster { border-radius: 10px; overflow: hidden; box-shadow: 0 20px 50px rgb(0 0 0 / .45), 0 0 0 1px var(--line); }
  .poster img { width: 100%; }
  .series p { margin-top: 18px; font-size: 17px; }
  .credit { margin-top: 22px; display: grid; gap: 4px; font-size: 14px; color: var(--mist-2); }
  .credit div { display: grid; grid-template-columns: 100px 1fr; }
  .credit dd { color: var(--mist); }

  /* 画面 */
  .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 30px; }
  .shot { display: block; width: 100%; border: 0; padding: 0; background: none; text-align: left; }
  .shot picture { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; box-shadow: 0 16px 40px rgb(0 0 0 / .4); }
  .shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
  .shot:hover img { transform: scale(1.03); }
  .cap { display: block; margin-top: 10px; font-size: 14px; color: var(--mist-2); }

  /* 配置 */
  .spec { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 26px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
  .spec div { padding: 18px; border-left: 1px solid var(--line); }
  .spec div:first-child { border-left: 0; }
  .spec dt { font-size: 13px; color: var(--lamp); }
  .spec dd { margin-top: 6px; color: #fff; font-weight: 600; }

  /* 安装 */
  .setup-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: start; }
  .steps { counter-reset: s; display: grid; gap: 14px; margin-top: 26px; }
  .steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 10px; }
  .steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700;
    border: 1px solid var(--lamp); color: var(--lamp); }
  .file { padding: 24px; border-radius: 16px; background: var(--night-3); border: 1px solid var(--line); }
  .file h3 { font-size: 26px; color: #fff; margin-bottom: 6px; }
  .file dl div { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
  .file dt { color: var(--mist-2); }
  .file dd { font-weight: 600; overflow-wrap: anywhere; color: #fff; }
  .file code { font: 500 13px/1.6 ui-monospace, Menlo, Consolas, monospace; }
  .file-act { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
  .fine { margin-top: 12px; font-size: 13px; color: var(--mist-2); }

  /* 问答 */
  .qa { display: grid; margin-top: 26px; max-width: 820px; border-top: 1px solid var(--line); }
  .qa details { border-bottom: 1px solid var(--line); }
  .qa summary { cursor: pointer; list-style: none; padding: 17px 40px 17px 0; position: relative; font-weight: 600; color: #fff; }
  .qa summary::-webkit-details-marker { display: none; }
  .qa summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--lamp); border-bottom: 2px solid var(--lamp);
    transform: translateY(-70%) rotate(45deg); transition: transform .25s; }
  .qa details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
  .qa p { padding: 0 0 18px; color: var(--mist-2); }

  /* 页脚 */
  .foot { padding: 52px 0 70px; background: #0b0e1f; border-top: 1px solid var(--line); color: var(--mist-2); font-size: 14px; }
  .foot-title { font-size: 34px; color: #fff; margin-bottom: 8px; }
  .links { display: flex; gap: 20px; margin-top: 8px; }

  /* 弹窗 */
  dialog { border: 0; padding: 0; color: var(--mist); }
  dialog::backdrop { background: rgb(6 8 18 / .78); backdrop-filter: blur(4px); }
  .x { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgb(255 255 255 / .08); font-size: 22px; line-height: 1; }
  .dlg { width: min(440px, 100% - 32px); padding: 30px 28px 28px; border-radius: 18px; background: var(--night-3); border: 1px solid var(--line); text-align: center; }
  .dlg h2 { font-size: 34px; color: #fff; }
  .dlg-file { margin: 6px 0 18px; color: var(--mist-2); font-size: 14px; }
  #ts-box { min-height: 70px; display: grid; place-items: center; }
  #dl-status { margin-top: 14px; font-size: 15px; }
  #dl-link { margin-top: 16px; }
  .lb { width: min(1280px, 100% - 24px); max-height: calc(100svh - 24px); padding: 0; background: transparent; overflow: visible; }
  .lb picture img { width: 100%; height: auto; max-height: calc(100svh - 120px); object-fit: contain; border-radius: 10px; background: #000; }
  #lb-cap { margin-top: 12px; text-align: center; }
  .lb-nav { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 10px; color: var(--mist-2); }
  .lb-nav button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: rgb(255 255 255 / .06); color: #fff; font-size: 22px; }
  .lb .x { top: -46px; right: 0; }

  /* 隐私 / 条款 / 404 */
  .doc { max-width: 720px; padding-block: 96px 80px; }
  .doc h1 { font-size: clamp(36px, 6vw, 52px); color: #fff; margin: 18px 0 26px; }
  .doc h2 { font-size: 20px; margin: 30px 0 8px; color: #fff; }
  .doc p { margin-top: 10px; color: var(--mist-2); }
  .doc .dl-btn { margin-top: 18px; }
  .doc .date { margin-top: 36px; font-size: 14px; }
  .back { color: var(--mist-2); text-decoration: none; }
}

@layer responsive {
  @media (max-width: 1000px) {
    .bar nav { display: none; }
    .bar .pill { margin-left: auto; }
    .loop { grid-template-columns: 1fr 1fr; }
    .loop li:nth-child(3) { border-left: 0; padding-left: 0; }
    .more-grid, .setup-grid, .series { grid-template-columns: 1fr; }
    .spec { grid-template-columns: 1fr 1fr; }
    .spec div { border-top: 1px solid var(--line); }
    .spec div:nth-child(odd) { border-left: 0; }
  }
  @media (max-width: 680px) {
    .sus { right: auto; left: 0; top: 60px; translate: none; width: 100%; display: block; }
    .sus-label { display: none; }
    .sus-bar { width: 100%; height: 3px; border-radius: 0; }
    .sus-bar span { transform-origin: left; scale: 0 1; }
    .loop, .grid { grid-template-columns: 1fr; }
    .loop li, .loop li:nth-child(3) { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
    .stats { gap: 28px; }
    .stats b { font-size: 40px; }
  }
  @media (max-width: 520px) {
    .wrap, .hero-in { width: calc(100% - 36px); }
    .dl-btn { flex: 1; }
    .night img { object-position: 54% 40%; }
    .spec { grid-template-columns: 1fr; }
    .spec div { border-left: 0; }
  }
}

@layer motion {
  @supports (animation-timeline: scroll()) {
    .sus-bar span { animation: rise-sus linear both; animation-timeline: scroll(root); }
    @keyframes rise-sus { to { scale: 1 1; } }
  }
  @supports not (animation-timeline: scroll()) {
    .sus { display: none; }
  }
  @media (prefers-reduced-motion: no-preference) {
    .night img { animation: lamp 2.6s ease-out both; }
    @keyframes lamp { 0% { filter: brightness(.15); } 40% { filter: brightness(.6); } 45% { filter: brightness(.35); } 100% { filter: none; } }
    .hero-in { animation: in 1s 1s ease-out both; }
    @keyframes in { from { opacity: 0; translate: 0 14px; } }
    .qa details::details-content { block-size: 0; overflow: hidden; transition: block-size .3s, content-visibility .3s allow-discrete; }
    .qa details[open]::details-content { block-size: auto; }
    :root { interpolate-size: allow-keywords; }
    dialog[open] { animation: pop .25s ease-out; }
    @keyframes pop { from { opacity: 0; scale: .97; } }
  }
}
