/* KOY ── 怪盗菜单风 v2
   红 #e8001c / 黑 / 白。斜切色块、网点、剪报字、游戏 HUD。
   字体：优设标题黑（标题）、得意黑（正文强调）、P5 复刻剪报字（拉丁字母和数字）。 */
@import url("/fonts/ysbth/result.css");
@import url("/fonts/dyh/result.css");
@font-face { font-family: "P5Ransom"; src: url("/fonts/p5menu.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "P5Hatty"; src: url("/fonts/p5hatty.ttf") format("truetype"); font-display: swap; }

:root {
  --red: #e8001c;
  --red-dk: #8a0010;
  --red-ink: #3d0007;
  --black: #000;
  --white: #fff;
  --paper: #f1ede6;
  --grey: #8d8d8d;
  --title: "YouSheBiaoTiHei", "Smiley Sans Oblique", "PingFang SC", "Microsoft YaHei", sans-serif;
  --slant: "Smiley Sans Oblique", "PingFang SC", "Microsoft YaHei", sans-serif;
  --hatty: "P5Hatty", "YouSheBiaoTiHei", "Arial Black", sans-serif;
  --ransom: "P5Ransom", "P5Hatty", sans-serif;
  --body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --ease-pop: cubic-bezier(.2, 1.5, .35, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in: cubic-bezier(.7, 0, .84, 0);
  --cur: url("/img/cursor.svg") 3 3, auto;
  --cur-hot: url("/img/cursor-hot.svg") 3 3, pointer;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--black); color: var(--white); scroll-behavior: smooth; cursor: var(--cur); -webkit-tap-highlight-color: transparent; }
body { margin: 0; font-family: var(--body); line-height: 1.65; overflow-x: hidden; }
main { overflow-x: clip; }
a, button, [role="button"], summary, label[for], .hot { cursor: var(--cur-hot); }
input { cursor: text; }
img { display: block; max-width: 100%; height: auto; -webkit-user-drag: none; user-select: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--red); color: var(--white); }
:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; box-shadow: 0 0 0 6px var(--red); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; padding: 8px 16px; background: var(--white); color: var(--black); font-family: var(--title); }
.skip:focus { top: 12px; }

/* 滚动条 */
html { scrollbar-color: var(--red) var(--black); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--red); border: 3px solid var(--black); clip-path: polygon(0 3%, 100% 0, 100% 97%, 0 100%); }

/* ---------- 通用部件 ---------- */
.ransom { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .04em .01em; line-height: 1; vertical-align: middle; }
.ransom .ch {
  display: inline-block; padding: .09em .12em .05em; font-family: var(--f, var(--title)); font-size: calc(1em * var(--s, 1));
  background: var(--bg, var(--white)); color: var(--fg, var(--black)); transform: rotate(var(--r, 0deg)) translateY(var(--y, 0));
  clip-path: var(--cp, none);
}
.ransom .gap { width: .3em; }
.js .ransom.live .ch { animation: ch-in .5s var(--ease-pop) both; animation-delay: calc(var(--i) * 45ms + var(--d, 0ms)); }
@keyframes ch-in { from { transform: rotate(calc(var(--r, 0deg) * -4)) scale(0); } }

.dots { background-image: radial-gradient(circle, rgba(0, 0, 0, .5) 1.5px, transparent 1.9px); background-size: 9px 9px; }

.tag {
  display: inline-block; padding: 3px 14px 2px; font-family: var(--title); font-size: 17px; letter-spacing: .04em; line-height: 1.4;
  background: var(--black); color: var(--white); transform: rotate(-3deg); clip-path: polygon(0 8%, 100% 0, 97% 100%, 2% 92%);
}
.tag.red { background: var(--red); }
.tag.white { background: var(--white); color: var(--black); }

/* 按钮：斜切 + 悬停时颜色翻转 + 后面的红色块错位 */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: .5em; padding: .45em 1.5em .38em; border: 0; text-decoration: none;
  font-family: var(--title); font-size: 22px; line-height: 1.2; color: var(--white); background: none; isolation: isolate;
  transform: rotate(-3deg); transition: transform .18s var(--ease-pop);
}
.btn::before, .btn::after { content: ""; position: absolute; inset: 0; z-index: -1; clip-path: polygon(4% 0, 100% 9%, 96% 100%, 0 88%); transition: transform .2s var(--ease-pop), background .15s; }
.btn::before { background: var(--red); transform: translate(6px, 6px); }
.btn::after { background: var(--black); }
.btn:hover, .btn:focus-visible { transform: rotate(-6deg) scale(1.06); color: var(--black); outline: none; box-shadow: none; }
.btn:hover::after, .btn:focus-visible::after { background: var(--white); }
.btn:hover::before, .btn:focus-visible::before { transform: translate(10px, 9px); }
.btn:active { transform: rotate(-4deg) scale(.97); }
.btn.on-red::before { background: var(--white); }
.btn.on-red:hover::after { background: var(--white); }
.btn.on-red:hover::before { background: var(--black); }

/* ---------- 开场：P5 式星爆 + 剪报 KOY ---------- */
.boot { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; overflow: hidden; background: var(--red); pointer-events: auto; }
.boot-rays { position: absolute; inset: -60vmax; background: repeating-conic-gradient(from 0deg, var(--black) 0 7deg, var(--red) 7deg 15deg); opacity: .9; animation: boot-spin 3.2s linear both; will-change: transform; }
.boot-star {
  position: relative; width: min(66vmin, 560px); aspect-ratio: 1; display: grid; place-items: center; background: var(--white);
  clip-path: polygon(50% 0%, 57.4% 12.7%, 68% 6.6%, 71.7% 17.6%, 84.6% 15.4%, 83.3% 27.8%, 96.2% 30.9%, 85.3% 43%, 100% 50%, 87.3% 57.4%, 93.4% 68%, 82.4% 71.7%, 84.6% 84.6%, 72.2% 83.3%, 69.1% 96.2%, 57% 85.3%, 50% 100%, 42.6% 87.3%, 32% 93.4%, 28.3% 82.4%, 15.4% 84.6%, 16.7% 72.2%, 3.8% 69.1%, 14.7% 57%, 0% 50%, 12.7% 42.6%, 6.6% 32%, 17.6% 28.3%, 15.4% 15.4%, 27.8% 16.7%, 30.9% 3.8%, 43% 14.7%);
  animation: boot-star .7s var(--ease-pop) both .1s;
}
.boot-star::before { content: ""; position: absolute; inset: 9%; background: var(--black); clip-path: inherit; }
.boot-word { position: relative; font-size: min(17vmin, 150px); }
.boot-word .ch { box-shadow: 5px 5px 0 var(--red); }
.boot-sub { position: absolute; bottom: 12%; left: 0; right: 0; text-align: center; }
.boot-sub .tag { font-size: clamp(16px, 2.2vmin, 22px); animation: ch-in .4s var(--ease-pop) both .9s; }
.boot-skip { position: absolute; right: 22px; bottom: 18px; padding: 6px 12px; border: 0; background: none; font-family: var(--title); font-size: 16px; color: var(--white); opacity: .8; }
.boot-skip:hover { opacity: 1; text-decoration: underline; }
@keyframes boot-spin { from { transform: rotate(-30deg) scale(.6); } to { transform: rotate(30deg) scale(1.1); } }
@keyframes boot-star { from { transform: scale(0) rotate(-120deg); } }
.boot.out { animation: boot-out .55s var(--ease-in) forwards; }
@keyframes boot-out { to { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); } }
.boot { clip-path: polygon(-20% 0, 100% 0, 100% 100%, -20% 100%); }
.no-boot .boot, .no-js .boot { display: none; }

/* ---------- 斜切转场 ---------- */
.swipe { position: fixed; inset: 0; z-index: 140; pointer-events: none; overflow: hidden; }
/* 三条斜带平时停在屏幕左侧外；离开页面时从左到右盖住，到达新页面时继续往右扫走 */
.swipe i { position: absolute; top: -10%; bottom: -10%; left: -100vw; width: 300vw; transform: translateX(-260vw) skewX(-20deg); }
.swipe i:nth-child(1) { background: var(--red); }
.swipe i:nth-child(2) { background: var(--black); }
.swipe i:nth-child(3) { background: var(--white); left: 40vw; width: 14vw; }
.swipe.in i { animation: sw-in .42s var(--ease-in) forwards; }
.swipe.in i:nth-child(2) { animation-delay: .07s; }
.swipe.in i:nth-child(3) { animation-delay: .12s; }
@keyframes sw-in { to { transform: translateX(0) skewX(-20deg); } }
.arrive .swipe i { transform: translateX(0) skewX(-20deg); animation: sw-out .6s var(--ease-out) forwards .05s; }
.arrive .swipe i:nth-child(1) { animation-delay: .14s; }
.arrive .swipe i:nth-child(3) { animation-delay: 0s; }
@keyframes sw-out { to { transform: translateX(260vw) skewX(-20deg); } }

/* ---------- 顶栏 HUD ---------- */
.hud { position: fixed; inset: 0 0 auto 0; z-index: 60; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px clamp(14px, 2.6vw, 34px); pointer-events: none; }
.hud > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; transform: rotate(-4deg); transition: transform .2s var(--ease-pop); }
.brand:hover { transform: rotate(-8deg) scale(1.06); }
.brand img { width: 52px; filter: drop-shadow(3px 3px 0 var(--black)); }
.brand b { font-family: var(--hatty); font-weight: 400; font-size: 24px; padding: 2px 10px 0; background: var(--white); color: var(--black); box-shadow: 4px 4px 0 var(--red); }
.hud-right { display: flex; align-items: flex-start; gap: 12px; }
.calendar { position: relative; display: grid; grid-template-columns: auto auto; align-items: end; column-gap: 8px; padding: 6px 14px 4px; background: var(--black); transform: rotate(4deg); box-shadow: 5px 5px 0 var(--red); line-height: 1; }
.cal-date { font-family: var(--ransom); font-size: 34px; color: var(--white); }
.cal-date .slash { color: var(--red); }
.cal-week { font-family: var(--hatty); font-size: 16px; background: var(--red); padding: 3px 6px 1px; transform: rotate(-6deg); }
.cal-time { grid-column: 1 / -1; justify-self: end; margin-top: 4px; font-family: var(--title); font-size: 15px; color: var(--black); background: var(--white); padding: 2px 8px 1px; transform: rotate(-2deg); }
.se-btn { width: 44px; height: 44px; border: 0; padding: 0; display: grid; place-items: center; background: var(--white); color: var(--black); clip-path: polygon(10% 0, 100% 8%, 90% 100%, 0 92%); transform: rotate(-6deg); transition: transform .2s var(--ease-pop), background .15s; }
.se-btn:hover { transform: rotate(-12deg) scale(1.1); background: var(--red); color: var(--white); }
.se-btn svg { width: 24px; height: 24px; }
.se-btn .on { display: none; }
.se-on .se-btn .on { display: block; }
.se-on .se-btn .off { display: none; }

/* 滚动进度：右侧红条 */
.progress { position: fixed; right: 0; top: 0; bottom: 0; z-index: 55; width: 6px; background: rgba(255, 255, 255, .06); }
.progress i { display: block; width: 100%; height: 100%; background: var(--red); transform-origin: top; transform: scaleY(var(--p, 0)); }

/* ---------- 首屏 ---------- */
.hero { position: relative; min-height: 100svh; overflow: hidden; isolation: isolate; background: var(--black); }
.hero-bg { position: absolute; inset: 0; z-index: -3; }
.hero-bg .slab { position: absolute; inset: -10% -20% -10% 40%; background: var(--red); transform: skewX(-14deg); }
.hero-bg .slab.k { inset: -10% -30% -10% 75%; background: var(--black); transform: skewX(-14deg); opacity: .9; }
.hero-bg .halftone { position: absolute; inset: 0 0 0 52%; opacity: .32; background-image: radial-gradient(circle, #000 2px, transparent 2.4px); background-size: 11px 11px; }
.hero-bg .rays { position: absolute; right: 2%; top: 50%; width: 120vmin; aspect-ratio: 1; translate: 0 -50%; border-radius: 50%; opacity: .14; background: repeating-conic-gradient(var(--black) 0 6deg, transparent 6deg 14deg); animation: spin 90s linear infinite; will-change: transform; }
@keyframes spin { to { rotate: 360deg; } }
.hero-word { position: absolute; z-index: -2; right: -2vw; bottom: -3vw; font-family: var(--hatty); font-size: 26vw; line-height: .8; color: transparent; -webkit-text-stroke: 2px rgba(0, 0, 0, .45); transform: rotate(-8deg); pointer-events: none; user-select: none; }

.hero-girl { position: absolute; z-index: -1; right: max(-3vw, -50px); top: 5svh; height: 108svh; width: auto; max-width: none; filter: drop-shadow(-14px 10px 0 var(--black)); }
.js .hero-girl { animation: girl-in .9s var(--ease-out) both var(--after-boot, .2s); }
@keyframes girl-in { from { transform: translateX(16vw) skewX(-8deg); opacity: 0; } }
.hero-girl.parallax { translate: calc(var(--mx, 0) * -14px) calc(var(--my, 0) * -8px); transition: translate .5s var(--ease-out); }
/* 宽屏：立绘只按高度缩放会显得小，改成跟着屏幕宽度放大，裁到膝盖附近；菜单字也跟着放大 */
@media (min-width: 1500px) and (min-aspect-ratio: 3/2) {
  .hero-girl { top: 3svh; height: clamp(108svh, calc(108svh + (100vw - 1440px) * .4), 132svh); }
  .menu-item { font-size: clamp(34px, min(3.4vw, 6.4svh), 66px); }
}

.hero-copy { position: relative; z-index: 2; padding: clamp(96px, 12svh, 130px) 0 60px clamp(18px, 6vw, 96px); max-width: 780px; }
.hero-kicker { margin: 0 0 12px; }
.codename { position: relative; display: inline-block; margin: 0; font-size: clamp(92px, min(12vw, 17svh), 190px); line-height: .9; }
.codename .ransom .ch { box-shadow: 6px 6px 0 var(--red); }
.codename .mask { position: absolute; left: 50%; top: 46%; width: 92%; translate: -50% -50%; pointer-events: none; filter: drop-shadow(6px 7px 0 var(--black)) drop-shadow(-3px -3px 0 var(--red)); }
.js .codename .mask { animation: mask-on .7s var(--ease-pop) both calc(var(--after-boot, .2s) + .35s); }
@keyframes mask-on { from { transform: scale(2.6) rotate(-25deg); opacity: 0; } }
.mask .half { position: absolute; inset: 0; }
.mask .half img { width: 100%; }
.mask .half.l { clip-path: polygon(0 0, 51% 0, 47% 38%, 53% 66%, 49.5% 100%, 0 100%); }
.mask .half.r { clip-path: polygon(51% 0, 100% 0, 100% 100%, 49.5% 100%, 53% 66%, 47% 38%); }
.mask .spacer { visibility: hidden; }

.hero-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: clamp(18px, 3svh, 30px) 0 0; }
.speech {
  position: relative; display: inline-block; padding: 10px 22px 9px; font-family: var(--slant); font-size: clamp(19px, 2.2vw, 27px); line-height: 1.35;
  background: var(--white); color: var(--black); transform: rotate(-2deg); clip-path: polygon(0 6%, 100% 0, 98% 88%, 14% 92%, 6% 100%, 7% 92%, 1% 94%);
  padding-bottom: 16px;
}
.speech b { color: var(--red); font-weight: inherit; }
.hero-line .caret { display: inline-block; width: .5em; height: .9em; margin-left: 2px; vertical-align: -.1em; background: var(--red); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* P5 主菜单：斜排大字，悬停时白色色块从左扫入、字变红、右侧冒出说明 */
.menu { list-style: none; margin: clamp(18px, 3.4svh, 34px) 0 0; padding: 0; display: grid; gap: 0; }
.menu li { --indent: 0px; margin-left: var(--indent); }
.menu li:nth-child(2) { --indent: 30px; }
.menu li:nth-child(3) { --indent: 60px; }
.menu li:nth-child(4) { --indent: 90px; }
.menu-item {
  position: relative; display: inline-flex; align-items: center; gap: 14px; padding: 2px 34px 2px 16px; border: 0; background: none; text-decoration: none; isolation: isolate;
  font-family: var(--title); font-size: clamp(34px, min(3.6vw, 6svh), 54px); line-height: 1.12; color: var(--white);
  transform: rotate(-7deg); transition: transform .22s var(--ease-pop), color .1s;
}
.menu-item .en { font-family: var(--hatty); font-size: .34em; color: var(--white); opacity: .65; transition: opacity .15s; }
.menu-item::before {
  content: ""; position: absolute; inset: -2px -10px -2px -8px; z-index: -1; background: var(--white);
  clip-path: polygon(0 22%, 100% 0, 95% 100%, 4% 84%); transform: scaleX(0); transform-origin: left; transition: transform .22s var(--ease-out);
}
.menu-item::after {
  content: ""; position: absolute; inset: 8px -18px -6px 0; z-index: -2; background: var(--red);
  clip-path: polygon(0 30%, 100% 6%, 97% 100%, 6% 90%); transform: scaleX(0); transform-origin: left; transition: transform .26s var(--ease-out) .03s;
}
.menu-item:hover, .menu-item:focus-visible, .menu-item.sel { color: var(--black); transform: rotate(-7deg) translateX(14px) scale(1.06); outline: none; box-shadow: none; }
.menu-item:hover .en, .menu-item:focus-visible .en, .menu-item.sel .en { color: var(--red); opacity: 1; }
.menu-item:hover::before, .menu-item:focus-visible::before, .menu-item.sel::before,
.menu-item:hover::after, .menu-item:focus-visible::after, .menu-item.sel::after { transform: scaleX(1); }
.js .menu li { animation: menu-in .5s var(--ease-out) both; animation-delay: calc(var(--after-boot, .2s) + .55s + var(--n) * 70ms); }
@keyframes menu-in { from { transform: translateX(-60px); opacity: 0; } }
.menu-hint { margin: clamp(10px, 2svh, 22px) 0 0 6px; font-size: 13px; color: rgba(255, 255, 255, .55); }
.menu-hint kbd { display: inline-block; min-width: 1.6em; padding: 0 5px; margin: 0 2px; font-family: var(--title); font-size: 12px; text-align: center; background: var(--white); color: var(--black); transform: rotate(-4deg); }

.scroll-cue { position: absolute; z-index: 3; left: clamp(18px, 6vw, 96px); bottom: 22px; display: flex; align-items: center; gap: 10px; font-family: var(--hatty); font-size: 14px; color: var(--white); text-decoration: none; opacity: .8; }
.scroll-cue i { width: 2px; height: 40px; background: linear-gradient(var(--red) 50%, transparent 0) 0 0 / 100% 200%; animation: cue 1.6s linear infinite; }
@keyframes cue { to { background-position: 0 -100%; } }

/* ---------- 章节通用 ---------- */
.chapter { position: relative; padding: clamp(80px, 10vw, 140px) clamp(18px, 6vw, 96px); overflow: hidden; isolation: isolate; }
.chapter.paper { background: var(--paper); color: var(--black); }
.chapter.red { background: var(--red); }
.chapter.black { background: var(--black); }
.chapter.paper::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .07; background-image: radial-gradient(circle, #000 1.4px, transparent 1.8px); background-size: 8px 8px; }
.chapter-head { position: relative; display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px 20px; margin-bottom: clamp(36px, 5vw, 60px); }
.chapter-head h2 { margin: 0; font-weight: 400; font-size: clamp(46px, 6.4vw, 92px); line-height: 1; }
.chapter-head .en { margin-bottom: 8px; font-family: var(--hatty); font-size: clamp(15px, 1.4vw, 19px); opacity: .7; }
.chapter-head .num { position: absolute; right: 0; top: -.4em; font-family: var(--hatty); font-size: clamp(90px, 15vw, 220px); line-height: 1; opacity: .1; pointer-events: none; }
/* 斜着走的字幕带 */
.ticker { position: relative; z-index: 5; margin: -30px -3vw; padding: 10px 0 8px; background: var(--black); border-block: 5px solid var(--red); transform: rotate(-2.2deg); overflow: hidden; box-shadow: 0 10px 0 rgba(0, 0, 0, .25); }
.ticker-track { display: flex; align-items: center; width: max-content; gap: 26px; white-space: nowrap; animation: ticker 32s linear infinite; }
.ticker-track span { font-family: var(--hatty); font-size: clamp(20px, 2.2vw, 30px); line-height: 1.2; color: var(--white); }
.ticker-track span.cn { font-family: var(--title); color: var(--red); }
.ticker-track i { width: 22px; height: 22px; background: var(--red); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* 斜切的章节上沿，压住上一节 */
.cut-top { margin-top: -5vw; padding-top: calc(clamp(80px, 10vw, 140px) + 5vw); clip-path: polygon(0 5vw, 100% 0, 100% 100%, 0 100%); }
.cut-top.rev { clip-path: polygon(0 0, 100% 5vw, 100% 100%, 0 100%); }
.chapter-lead { max-width: 34em; margin: -20px 0 44px; font-size: 17px; opacity: .85; }

/* 出场：滚动进入视口时斜切显现 */
.js .rv { opacity: 0; transform: translateY(40px) skewY(3deg); transition: opacity .6s var(--ease-out), transform .7s var(--ease-out); transition-delay: var(--rd, 0s); }
.js .rv.seen { opacity: 1; transform: none; }
.js .rv-wipe > * { clip-path: polygon(0 10%, 0 9%, 0 100%, 0 100%); transition: clip-path .7s var(--ease-out) .45s; }
.js .rv-wipe.seen > * { clip-path: polygon(0 10%, 100% 0, 100% 86%, 4% 100%); }

/* 角色立绘统一处理 */
.figure { position: relative; margin: 0; justify-self: center; }
.figure > img { position: relative; width: auto; filter: drop-shadow(10px 10px 0 var(--black)); }
.figure .back { position: absolute; z-index: -1; background: var(--red); clip-path: polygon(14% 0, 100% 7%, 86% 100%, 0 93%); }
.figure figcaption { position: absolute; z-index: 2; }

/* ---------- 档案：被涂黑的个人信息 ---------- */
.dossier { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(30px, 5vw, 70px); align-items: center; }
.file {
  position: relative; padding: 42px clamp(22px, 3vw, 40px) 46px; background: var(--white); color: var(--black); transform: rotate(-1.6deg);
  box-shadow: 14px 14px 0 var(--black), 14px 14px 0 3px var(--red);
}
.file::before { content: "TOP SECRET"; position: absolute; right: 160px; top: -18px; padding: 4px 16px 2px; font-family: var(--hatty); font-size: 17px; background: var(--red); color: var(--white); transform: rotate(4deg); }
.file::after { content: ""; position: absolute; left: 30px; top: -16px; width: 70px; height: 30px; background: rgba(232, 0, 28, .35); transform: rotate(-6deg); }
/* 右上角夹着一张照片，一半伸出档案外 */
.file-photo { position: absolute; z-index: 2; right: 24px; top: -46px; width: 118px; margin: 0; transform: rotate(5deg); border: 5px solid var(--white); outline: 3px solid var(--black); background: var(--black); overflow: hidden; box-shadow: 6px 6px 0 rgba(0, 0, 0, .25); }
.dossier, .profile { padding-top: 30px; }
.file-photo img { width: 100%; filter: grayscale(1) contrast(1.4) brightness(.35); }
.file-photo b { position: absolute; inset: auto 0 8px; text-align: center; font-family: var(--title); font-weight: 400; font-size: 26px; color: var(--red); }
.file dl { margin: 0; display: grid; grid-template-columns: 6.5em 1fr; gap: 14px 16px; font-size: 17px; }
.file dt { font-family: var(--title); color: var(--red); font-size: 20px; line-height: 1.4; }
.file dd { margin: 0; line-height: 1.6; }
.redact { position: relative; display: inline-block; min-width: 6em; background: var(--black); color: transparent; user-select: none; transform: rotate(-1deg); }
.redact::after { content: "权限不足"; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--title); font-size: 13px; color: var(--red); opacity: 0; transition: opacity .15s; }
.redact:hover::after { opacity: 1; }
.stamp { position: absolute; right: 26px; bottom: 20px; padding: 2px 16px; font-family: var(--title); font-size: 34px; color: var(--red); border: 4px solid var(--red); transform: rotate(-14deg); opacity: .85; mix-blend-mode: multiply; }
.js .seen .stamp { animation: stamp .45s var(--ease-pop) both .5s; }
@keyframes stamp { from { transform: rotate(-14deg) scale(3); opacity: 0; } }
.dossier .figure > img { height: min(80vh, 760px); }
.dossier .figure .back { inset: 12% -12% 2% -8%; }
.dossier .figure figcaption { left: -14%; top: 52%; }
.dossier { position: relative; }
.cutin { position: absolute; z-index: 3; right: -2%; bottom: -4%; width: min(400px, 30vw); transform: rotate(-6deg); pointer-events: none; }
.cutin span { display: block; padding: 5px; background: var(--white); clip-path: polygon(0 10%, 100% 0, 100% 86%, 4% 100%); }
.cutin img { width: 100%; height: auto; background: var(--black); clip-path: polygon(0 10%, 100% 0, 100% 86%, 4% 100%); }

/* ---------- 心之图鉴：塔罗牌 ---------- */
.arcana { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: clamp(26px, 3vw, 40px); perspective: 1400px; }
.acard { position: relative; aspect-ratio: 600 / 1075; perspective: 1200px; transform: rotate(var(--tilt, -2deg)); transition: transform .35s var(--ease-pop); }
.acard::before { content: ""; position: absolute; inset: 0; background: var(--red); clip-path: polygon(0 1%, 100% 0, 99% 100%, 1% 99%); transform: translate(12px, 12px) rotate(2deg); transition: transform .35s var(--ease-pop); }
.acard:nth-child(even) { --tilt: 2.4deg; margin-top: 30px; }
.acard:nth-child(3n) { --tilt: -1deg; }
.acard:hover, .acard:focus-within { z-index: 2; transform: translateY(-12px) scale(1.04) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)); }
.acard:hover::before, .acard:focus-within::before { transform: translate(18px, 18px) rotate(4deg); }
.acard-hit { position: absolute; inset: 0; z-index: 4; width: 100%; padding: 0; border: 0; background: none; }
.acard-hit:focus-visible { outline: 4px solid var(--white); outline-offset: 6px; box-shadow: none; }
.acard .flip { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .7s var(--ease-out); }
.acard.open .flip { transform: rotateY(180deg); }
.acard .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.acard .front img { width: 100%; height: 100%; object-fit: cover; }
.acard .front { clip-path: polygon(0 1%, 100% 0, 99% 100%, 1% 99%); }
.acard .front .label { position: absolute; left: -4px; top: 9%; white-space: nowrap; font-size: 20px; box-shadow: 4px 4px 0 var(--black); }
.acard .front { overflow: visible; }
.acard .back {
  transform: rotateY(180deg); display: flex; flex-direction: column; padding: 22px 22px 18px; text-align: left; color: var(--white);
  background: var(--black); clip-path: polygon(0 1%, 100% 0, 99% 100%, 1% 99%);
}
.acard .back::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .25; background: repeating-linear-gradient(-45deg, var(--red) 0 2px, transparent 2px 12px); }
.acard .back h3 { margin: 0; font-family: var(--title); font-weight: 400; font-size: 36px; line-height: 1.1; color: var(--red); }
.acard .back .ar { font-family: var(--hatty); font-size: 15px; opacity: .7; margin: 2px 0 12px; }
.acard .back .keys { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 14px; line-height: 1.4; }
.acard .back .keys b { margin-right: 2px; font-family: var(--title); font-weight: 400; color: var(--red); }
.acard .back .keys span { padding: 1px 8px 0; font-family: var(--title); background: var(--white); color: var(--black); transform: rotate(-3deg); }
.acard .back .keys span:nth-child(odd) { transform: rotate(2deg); }
.acard .back p { margin: 0 0 12px; font-size: 15px; line-height: 1.6; }
.acard .back::after { content: attr(data-num); position: absolute; right: 12px; top: 34%; z-index: -1; font-family: var(--hatty); font-size: 120px; line-height: 1; color: var(--white); opacity: .07; }
.acard .back .who { margin: auto 0 0; display: grid; grid-template-columns: 70px 1fr; align-items: end; gap: 10px; }
.acard .back .who img { width: 70px; height: 84px; object-fit: cover; object-position: top; background: var(--white); clip-path: polygon(8% 0, 100% 6%, 92% 100%, 0 94%); }
.acard .back .who span b { display: block; width: max-content; margin: 0 0 4px; padding: 0 8px; font-family: var(--title); font-weight: 400; font-size: 14px; background: var(--red); color: var(--white); transform: rotate(-3deg); }
.acard .back .who span { position: relative; padding: 8px 12px 10px; font-family: var(--slant); font-size: 15px; line-height: 1.45; background: var(--white); color: var(--black); clip-path: polygon(4% 0, 100% 6%, 97% 100%, 0 92%); }
.acard .flip-hint { position: absolute; right: -6px; top: -12px; z-index: 3; }
.rank { display: flex; align-items: center; gap: 5px; margin: 0 0 12px; }
.rank b { margin-right: 6px; font-family: var(--title); font-weight: 400; font-size: 14px; color: var(--red); }
.rank i { width: 18px; height: 18px; background: var(--white); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); opacity: .25; }
.rank i.on { background: var(--red); opacity: 1; }

/* ---------- 预告信 ---------- */
.notice { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: center; gap: clamp(20px, 4vw, 60px); padding-bottom: 0; }
.notice .figure > img { height: min(88vh, 860px); margin-bottom: -6px; filter: drop-shadow(-12px 10px 0 var(--black)); }
.notice-card {
  position: relative; max-width: 560px; padding: clamp(28px, 4vw, 46px); margin-bottom: clamp(60px, 10vw, 120px); color: var(--white); background: var(--black);
  transform: rotate(2deg); clip-path: polygon(0 3%, 100% 0, 97% 100%, 2% 96%);
}
.notice-card::before { content: ""; position: absolute; inset: 0; opacity: .35; background-image: radial-gradient(circle, var(--red) 1.6px, transparent 2px); background-size: 10px 10px; pointer-events: none; }
.notice-card > * { position: relative; }
.notice-card .pt { position: absolute; right: 18px; top: 16px; width: 92px; transform: rotate(10deg); opacity: .95; }
.notice-card h2 { margin: 0 0 18px; font-weight: 400; font-size: clamp(38px, 5vw, 66px); line-height: 1.05; padding-right: 80px; }
.notice-card p { margin: 0 0 14px; font-size: 17px; }
.notice-card .sign { font-family: var(--hatty); color: var(--red); margin: 18px 0 24px; }

/* ---------- 页脚 ---------- */
.footer { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 30px; padding: 30px clamp(18px, 6vw, 96px) 34px; font-size: 13px; color: #9a9a9a; background: var(--black); border-top: 4px solid var(--red); }
.footer a { color: var(--white); text-decoration: none; border-bottom: 2px solid var(--red); }
.footer a:hover { color: var(--red); }

/* ---------- 预告信对话框（登录）：红底网点卡片、怪盗团标志压在上沿、剪报字正文、署名 ---------- */
dialog.calling { width: min(580px, 92vw); max-height: none; padding: 0; border: 0; background: none; color: var(--white); overflow: visible; }
dialog.calling::backdrop { background: rgba(0, 0, 0, .82); }
dialog.calling[open] { animation: none; }
/* 卡片底色和白色硬投影画在伪元素上，这样标志可以伸出卡片上沿 */
.cc { position: relative; isolation: isolate; margin-top: 72px; padding: 92px clamp(22px, 5vw, 46px) 24px; transform: rotate(-3deg); }
.cc::before, .cc::after { content: ""; position: absolute; inset: 0; clip-path: polygon(0 3%, 100% 0, 98% 100%, 2% 97%); pointer-events: none; }
.cc::before { z-index: -1; background: radial-gradient(circle, rgba(0, 0, 0, .22) 1.6px, transparent 2px) 0 0 / 9px 9px, var(--red); }
.cc::after { z-index: -2; background: var(--white); transform: translate(10px, 10px); }
.cc > * { position: relative; }
.cc > .pt { position: absolute; left: 50%; top: -76px; width: 136px; margin-left: -68px; transform: rotate(8deg); filter: drop-shadow(5px 5px 0 var(--black)); }
.cc > .cc-title { position: absolute; left: 24px; top: 26px; margin: 0; font-weight: 400; }
.cc-title .tag { font-size: 18px; }
.cc-to { margin: 0 0 8px; font-family: var(--title); font-size: 22px; line-height: 1.3; }
.cc-head { margin: 0 0 16px; font-size: clamp(27px, 6.6vw, 38px); }
.cc-head .ch { box-shadow: 3px 3px 0 var(--black); }
.cc-lead { margin: 0 0 22px; font-family: var(--slant); font-size: 18px; line-height: 1.5; }
.cc-sign { margin: 6px 0 0; text-align: right; font-family: var(--title); font-size: 17px; }
.cc-sign b { display: inline-block; margin-right: 6px; padding: 2px 12px 0; font-weight: 400; font-size: 20px; background: var(--black); transform: rotate(-3deg); }
/* 打开：卡片旋转着飞进来，标志像印章一样盖上，剪报字逐个弹出 */
dialog[open] .cc { animation: card-in .6s var(--ease-pop) both; }
@keyframes card-in { 0% { transform: translate(-46vw, 24vh) rotate(-200deg) scale(.4); } }
dialog[open] .cc > .pt { animation: seal-in .42s var(--ease-pop) both .36s; }
@keyframes seal-in { from { transform: rotate(-30deg) scale(2.4); opacity: 0; } }
dialog.closing .cc { animation: card-out .3s var(--ease-in) forwards; }
@keyframes card-out { to { transform: rotate(20deg) translate(40vw, -20vh) scale(.6); opacity: 0; } }
.cc label { display: inline-block; margin-bottom: 8px; }
.cc-field { position: relative; }
.cc input {
  width: 100%; padding: 13px 16px; font-size: 20px; letter-spacing: .1em; border: 0; background: var(--white); color: var(--black);
  clip-path: polygon(0 0, 100% 7%, 99% 100%, 1% 93%); box-shadow: none;
}
.cc input:focus { outline: none; background: var(--paper); }
.cc-field::after { content: ""; position: absolute; left: 6px; right: -6px; top: 6px; bottom: -6px; z-index: -1; background: var(--black); clip-path: polygon(0 0, 100% 7%, 99% 100%, 1% 93%); }
.cc .row { display: flex; gap: 18px; align-items: center; margin-top: 24px; flex-wrap: wrap; }
.cc .btn { font-size: 24px; }
.cc .btn[disabled] { opacity: .65; }
.cc .ghost { padding: 6px 2px; border: 0; background: none; font-family: var(--title); font-size: 17px; color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.cc .ghost:hover { color: var(--black); }
.cc .err { min-height: 1.7em; margin: 14px 0 0; }
.cc .err:not(:empty) { display: inline-block; padding: 3px 12px 1px; font-family: var(--title); font-size: 18px; background: var(--black); color: var(--white); transform: rotate(-2deg); }
.shake, dialog[open] .cc.shake { animation: shake .42s; }
@keyframes shake { 15%, 55% { translate: -12px 0; } 35%, 75% { translate: 12px 0; } }

/* ---------- 揭面具 ---------- */
.unmask { position: fixed; inset: 0; z-index: 120; pointer-events: none; display: none; }
.unmasking .unmask { display: block; }
.unmask .flash { position: absolute; inset: 0; background: var(--white); opacity: 0; }
.unmask .fire { position: absolute; left: -10%; right: -10%; bottom: -30%; height: 130%; opacity: 0; will-change: transform, opacity;
  background:
    radial-gradient(42% 46% at 26% 100%, rgba(30, 110, 255, .95), rgba(0, 40, 170, .55) 45%, transparent 72%),
    radial-gradient(32% 40% at 58% 100%, rgba(130, 210, 255, .9), transparent 70%),
    radial-gradient(36% 44% at 84% 100%, rgba(40, 90, 255, .9), transparent 72%); }
.unmask .rays { position: absolute; inset: -60vmax; opacity: 0; will-change: transform; background: repeating-conic-gradient(from 0deg, var(--black) 0 7deg, var(--red) 7deg 15deg); }
.unmask .star {
  position: absolute; left: 50%; top: 50%; width: min(86vmin, 720px); aspect-ratio: 1; margin: calc(min(86vmin, 720px) / -2) 0 0 calc(min(86vmin, 720px) / -2); background: var(--white); transform: scale(0);
  clip-path: polygon(50% 0%, 57.4% 12.7%, 68% 6.6%, 71.7% 17.6%, 84.6% 15.4%, 83.3% 27.8%, 96.2% 30.9%, 85.3% 43%, 100% 50%, 87.3% 57.4%, 93.4% 68%, 82.4% 71.7%, 84.6% 84.6%, 72.2% 83.3%, 69.1% 96.2%, 57% 85.3%, 50% 100%, 42.6% 87.3%, 32% 93.4%, 28.3% 82.4%, 15.4% 84.6%, 16.7% 72.2%, 3.8% 69.1%, 14.7% 57%, 0% 50%, 12.7% 42.6%, 6.6% 32%, 17.6% 28.3%, 15.4% 15.4%, 27.8% 16.7%, 30.9% 3.8%, 43% 14.7%);
}
.unmask .star::before { content: ""; position: absolute; inset: 9%; background: var(--black); clip-path: inherit; }
.unmask .words { position: absolute; left: 0; right: 0; top: 50%; translate: 0 -50%; text-align: center; font-size: clamp(54px, 10vw, 150px); opacity: 0; }
.unmask .words .ch { box-shadow: 6px 6px 0 var(--black); }
.unmasking .codename .mask .half.l { animation: rip-l .85s cubic-bezier(.5, 0, .7, 1) forwards .1s; }
.unmasking .codename .mask .half.r { animation: rip-r .85s cubic-bezier(.5, 0, .7, 1) forwards .1s; }
@keyframes rip-l { 18% { transform: translate(-3%, -6%) rotate(-6deg); } to { transform: translate(-70vw, 40vh) rotate(-110deg); opacity: 0; } }
@keyframes rip-r { 18% { transform: translate(3%, -6%) rotate(6deg); } to { transform: translate(70vw, 50vh) rotate(120deg); opacity: 0; } }
.unmasking .unmask .flash { animation: flash .5s ease-out forwards .2s; }
@keyframes flash { 0% { opacity: 0; } 15% { opacity: .9; } to { opacity: 0; } }
.unmasking .unmask .fire { animation: fire 1.3s ease-out forwards .25s; }
@keyframes fire { 25% { opacity: 1; transform: scaleY(1.1); } to { opacity: 0; transform: translateY(-35%) scaleY(1.5); } }
.unmasking .unmask .rays { animation: u-rays 1.4s ease-out forwards .38s; }
@keyframes u-rays { 0% { opacity: 0; transform: rotate(-24deg) scale(.7); } 18% { opacity: 1; } 100% { opacity: 1; transform: rotate(16deg) scale(1.08); } }
.unmasking .unmask .star { animation: u-star .8s var(--ease-pop) forwards .42s; }
@keyframes u-star { 0% { transform: scale(0) rotate(-140deg); } 100% { transform: scale(1) rotate(-6deg); } }
.unmasking .unmask .words { animation: words .7s var(--ease-pop) forwards .58s; }
@keyframes words { 0% { opacity: 0; transform: scale(.3) rotate(-14deg); } 100% { opacity: 1; transform: scale(1) rotate(-5deg); } }
.unmasking .hero-girl { animation: shake-girl .5s ease-out .2s; }
@keyframes shake-girl { 20%, 60% { translate: -10px 4px; } 40%, 80% { translate: 10px -4px; } }

/* ---------- 跟手的光标星 ---------- */
.cursor-star { position: fixed; left: 0; top: 0; z-index: 300; width: 34px; height: 34px; margin: -17px 0 0 -17px; pointer-events: none; opacity: 0; transition: opacity .2s, width .2s var(--ease-pop), height .2s var(--ease-pop), margin .2s var(--ease-pop); }
.cursor-star svg { width: 100%; height: 100%; animation: spin 6s linear infinite; }
.has-cursor .cursor-star { opacity: .9; }
.has-cursor .cursor-star.hot { width: 58px; height: 58px; margin: -29px 0 0 -29px; }
.has-cursor .cursor-star.hot svg { animation-duration: 1.6s; }
.spark { position: fixed; z-index: 299; width: 14px; height: 14px; margin: -7px 0 0 -7px; pointer-events: none; background: var(--c, var(--red)); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: spark .55s var(--ease-out) forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) rotate(180deg) scale(.2); opacity: 0; } }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero-bg .slab { inset: 42% -40% -10% 8%; }
  .hero-bg .slab.k { display: none; }
  .hero-bg .halftone { inset: 42% 0 0 0; }
  .hero-girl { top: auto; bottom: -3svh; right: -34vw; height: 76svh; }
  .hero-copy { padding-top: 104px; }
  .hero-word { font-size: 40vw; bottom: 20svh; }
  .menu li { --indent: 0px !important; }
  .menu-item { font-size: 38px; text-shadow: 3px 3px 0 var(--black); }
  .menu-item:hover, .menu-item:focus-visible, .menu-item.sel { text-shadow: none; }
  /* 塔罗牌改成横向滑动 */
  .arcana { display: flex; gap: 22px; margin: 0 calc(clamp(18px, 6vw, 96px) * -1); padding: 16px clamp(18px, 6vw, 96px) 34px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .arcana::-webkit-scrollbar { display: none; }
  .acard { flex: 0 0 min(72vw, 300px); scroll-snap-align: center; }
  .file::before { right: 128px; }
  .file-photo { width: 96px; top: -40px; right: 16px; }
  .menu-hint { display: none; }
  .ticker { margin: -22px -4vw; }
  .dossier, .notice { grid-template-columns: 1fr; }
  .dossier .figure img { height: 64vh; }
  .cutin { width: 62vw; right: -2vw; bottom: 2%; }
  .notice .figure { order: 2; }
  .notice .figure img { height: 70vh; }
  .notice-card { margin-bottom: 0; }
  .file dl { grid-template-columns: 5em 1fr; font-size: 16px; }
  .file { padding-bottom: 96px; } /* 印章放到内容下面，不压字 */
  .file-photo { width: 90px; }
  .calendar .cal-time { display: none; }
  .cal-date { font-size: 26px; }
  .brand img { width: 42px; }
  .brand b { font-size: 19px; }
  /* 手机上滚动后顶栏收起，不挡内容 */
  .hud { transition: transform .3s var(--ease-out); }
  .hud.tuck { transform: translateY(-120%); }
  .acard:nth-child(even) { margin-top: 0; }
  .cc { margin-top: 62px; padding-top: 80px; }
  .cc > .pt { top: -64px; width: 114px; margin-left: -57px; }
  .cc > .cc-title { left: 16px; top: 20px; }
  .cc-lead { font-size: 17px; }
}
/* 矮屏（横屏手机）：预告信压缩，保证输入框和按钮在屏幕里 */
@media (max-height: 620px) {
  .cc { margin-top: 40px; padding-top: 58px; padding-bottom: 12px; }
  .cc > .pt { top: -40px; width: 76px; margin-left: -38px; }
  .cc > .cc-title { top: 12px; }
  .cc-to, .cc-lead, .cc-sign { display: none; }
  .cc-head { margin-bottom: 8px; font-size: 28px; }
  .cc .row { margin-top: 14px; }
  .cc .err { margin-top: 8px; }
}
@media (hover: none), (pointer: coarse) {
  .cursor-star { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
  .js .rv, .js .rv-wipe { opacity: 1; transform: none; clip-path: none; }
  .cursor-star { display: none; }
}
