@font-face { font-family: 'HV Display'; src: url('../assets/fonts/SmileySans.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Russo'; src: url('../assets/fonts/RussoOne.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Outfit'; src: url('../assets/fonts/Outfit.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #0a0a18; --bg2: #121230; --panel: rgba(22, 22, 52, .72); --line: rgba(255, 255, 255, .09); --text: #f4f3ff; --muted: #a7a6c9;
  --a1: #ffe14d; --a2: #ff4d8d; --a3: #6a5cff; --a4: #2ec5ff; --ok: #4dff9e; --bad: #ff5d6c;
  --grad: linear-gradient(100deg, var(--a1), var(--a2) 45%, var(--a3));
  --r: 18px; --font: 'Outfit', 'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei', sans-serif; --disp: 'HV Display', 'Russo', 'PingFang SC', sans-serif; --num: 'Russo', 'Outfit', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; }
body.in-game { overflow: hidden; }
body.in-game #app { display: none; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--a4); }
.ico { display: inline-flex; width: 1.1em; height: 1.1em; vertical-align: -0.18em; }
.ico svg { width: 100%; height: 100%; fill: currentColor; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

/* 背景氛围 */
.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(1200px 600px at 80% -10%, #2a1660 0%, transparent 60%), radial-gradient(900px 600px at -10% 30%, #0f2d5c 0%, transparent 60%), var(--bg); }
.bg-fx i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .45; animation: drift 18s ease-in-out infinite alternate; }
.bg-fx i:nth-child(1) { width: 520px; height: 520px; background: #ff4d8d; left: 60%; top: 40%; }
.bg-fx i:nth-child(2) { width: 420px; height: 420px; background: #2ec5ff; left: 5%; top: 70%; animation-delay: -6s; }
.bg-fx i:nth-child(3) { width: 360px; height: 360px; background: #6a5cff; left: 35%; top: -10%; animation-delay: -12s; }
.bg-fx::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px); background-size: 26px 26px; mask-image: linear-gradient(to bottom, #000, transparent 80%); }
@keyframes drift { to { transform: translate(-120px, 80px) scale(1.2); } }

/* 顶栏 */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 22px; padding: 14px clamp(16px, 4vw, 48px); backdrop-filter: blur(16px) saturate(1.4); background: rgba(10, 10, 24, .6); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo img { width: 42px; height: 42px; filter: drop-shadow(0 4px 14px rgba(255, 77, 141, .5)); }
.logo b { font-family: var(--disp); font-size: 26px; letter-spacing: 1px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo small { display: block; font-family: var(--num); font-size: 10px; letter-spacing: 4px; color: var(--muted); margin-top: -3px; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav button { background: none; border: 0; padding: 9px 16px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 15px; transition: .2s; }
.nav button:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav button.on { color: #0b0b1a; background: var(--text); }
.status { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 6px 11px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #666; }
.pill.ok::before { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.pill.warn::before { background: var(--a1); }
.pill.bad::before { background: var(--bad); }

main { padding: 0 clamp(16px, 4vw, 48px) 80px; max-width: 1560px; margin: 0 auto; }

/* Hero */
.hero { position: relative; margin-top: 28px; border-radius: 28px; overflow: hidden; min-height: 360px; display: grid; grid-template-columns: 1.1fr 1fr; background: linear-gradient(120deg, #1b1140 0%, #3a1450 45%, #e8576b 130%); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.hero-copy { padding: clamp(24px, 4vw, 54px); position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; font-family: var(--num); font-size: 12px; letter-spacing: 3px; color: var(--a1); }
.hero h1 { font-family: var(--disp); font-size: clamp(44px, 6vw, 82px); margin: 10px 0 4px; line-height: 1; letter-spacing: 2px; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .en { font-family: var(--num); letter-spacing: 3px; font-size: 14px; color: rgba(255,255,255,.7); }
.hero p { max-width: 560px; line-height: 1.7; color: rgba(255,255,255,.82); }
.hero-art { position: relative; }
.hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mask-image: linear-gradient(to right, transparent, #000 30%); }
.hero-badges { display: flex; gap: 8px; margin: 14px 0 22px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .12); }

.btn { border: 0; border-radius: 14px; padding: 13px 26px; font-weight: 800; font-size: 16px; background: rgba(255, 255, 255, .1); border: 1px solid var(--line); transition: transform .15s, box-shadow .2s, background .2s; display: inline-flex; align-items: center; gap: 8px; position: relative; overflow: hidden; }
.btn:hover { transform: translateY(-2px); background: rgba(255,255,255,.16); }
.btn.primary { background: var(--grad); color: #160b24; border: 0; box-shadow: 0 10px 30px rgba(255, 77, 141, .35); }
.btn.ghost { background: transparent; }
.btn.big { padding: 16px 34px; font-size: 18px; border-radius: 16px; }
.motion-hover { outline: 2px dashed rgba(255,255,255,.55); outline-offset: 3px; }
.btn.motion-hover { outline: 3px solid var(--a1); transform: scale(1.06); }

/* 分区 & 筛选 */
.section-h { display: flex; align-items: end; justify-content: space-between; margin: 44px 0 16px; gap: 16px; flex-wrap: wrap; }
.section-h h2 { font-family: var(--disp); font-size: 32px; margin: 0; letter-spacing: 1px; }
.section-h h2 small { font-family: var(--num); font-size: 12px; letter-spacing: 3px; color: var(--muted); margin-left: 12px; }
.filters { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(10px); }
.frow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.frow > span { width: 52px; font-size: 13px; color: var(--muted); font-weight: 600; }
.chip { border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text); padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; transition: .15s; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { background: rgba(255, 255, 255, .1); }
.chip.on { background: var(--text); color: #0b0b1a; border-color: transparent; }
.search { margin-left: auto; background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; color: var(--text); font: inherit; min-width: 220px; outline: none; }
.count-note { color: var(--muted); font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; margin-top: 20px; }
.card { position: relative; border-radius: 22px; overflow: hidden; background: var(--bg2); border: 1px solid var(--line); cursor: pointer; transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; text-align: left; padding: 0; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-6px) scale(1.01); box-shadow: 0 24px 50px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255,255,255,.15); }
.card .cv { aspect-ratio: 16 / 10; position: relative; overflow: hidden; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.card .cv img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.card:hover .cv img { transform: scale(1.06); }
.card .cv .en { position: absolute; left: 14px; bottom: 10px; font-family: var(--num); font-size: 13px; letter-spacing: 2px; color: rgba(255,255,255,.9); text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.card .src { position: absolute; top: 12px; left: 12px; font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: rgba(10,10,24,.65); backdrop-filter: blur(6px); letter-spacing: 1px; }
.card .src.replica { color: var(--a1); }
.card .src.story { color: #ffb4c4; }
.card .meta { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; font-family: var(--disp); font-size: 25px; letter-spacing: 1px; }
.card p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.tag-s { font-size: 11.5px; padding: 3px 8px; border-radius: 7px; background: rgba(255,255,255,.07); color: #d9d8f5; display: inline-flex; gap: 4px; align-items: center; }
.tag-s.hot { background: rgba(255, 77, 141, .18); color: #ffb3cf; }
.empty { text-align: center; padding: 60px; color: var(--muted); }

/* 大作横幅卡片 */
.story-card { margin-top: 20px; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(5, 5, 15, .7); backdrop-filter: blur(8px); animation: fade .2s; padding: 20px; }
.modal-box { width: min(980px, 100%); max-height: 92vh; overflow: auto; background: #14142e; border: 1px solid var(--line); border-radius: 26px; display: grid; grid-template-columns: 1fr 1fr; box-shadow: 0 40px 100px rgba(0,0,0,.6); animation: pop .3s cubic-bezier(.2,1.4,.4,1); }
.modal-box .cv { min-height: 100%; background: linear-gradient(135deg, var(--c1), var(--c2)); position: relative; }
.modal-box .cv img { width: 100%; height: 100%; object-fit: cover; }
.modal-box .body { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.modal-box h2 { font-family: var(--disp); font-size: 40px; margin: 0; }
.modal-box .en { font-family: var(--num); letter-spacing: 3px; font-size: 12px; color: var(--muted); }
.modal-box ol { margin: 0; padding-left: 20px; line-height: 1.75; color: #dcdbf7; font-size: 14.5px; }
.modal-box ol b, .ov-panel ol b { color: var(--a1); }
.opt-h { font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.04); font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.seg button.on { background: var(--text); color: #0b0b1a; }
.seg button:disabled { opacity: .3; cursor: not-allowed; }
.close-x { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(0,0,0,.4); font-size: 18px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.92); opacity: 0; } }

/* 引导 */
.guide { display: grid; grid-template-columns: 260px 1fr; gap: 24px; margin-top: 28px; }
.steps-nav { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 90px; align-self: start; }
.steps-nav button { text-align: left; padding: 14px 16px; border-radius: 14px; border: 1px solid transparent; background: none; color: var(--muted); font-weight: 700; display: flex; gap: 12px; align-items: center; }
.steps-nav button em { font-style: normal; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.07); font-family: var(--num); font-size: 13px; flex: none; }
.steps-nav button.on { background: var(--panel); border-color: var(--line); color: var(--text); }
.steps-nav button.on em { background: var(--grad); color: #160b24; }
.steps-nav button.done em { background: var(--ok); color: #062; }
.gpanel { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 3vw, 36px); backdrop-filter: blur(10px); }
.gpanel h2 { font-family: var(--disp); font-size: 36px; margin: 0 0 8px; }
.gpanel h3 { margin: 22px 0 10px; font-size: 17px; }
.gpanel p, .gpanel li { line-height: 1.8; color: #d8d7f2; }
.gpanel code { background: rgba(0,0,0,.35); padding: 2px 7px; border-radius: 6px; font-size: 13px; color: var(--a1); }
.gpanel pre { background: rgba(0,0,0,.4); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow: auto; color: #e3e2ff; font-size: 13px; line-height: 1.6; }
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 14px 0; }
.mini { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.mini b { display: block; margin-bottom: 6px; font-size: 15px; }
.mini span { font-size: 13.5px; color: var(--muted); line-height: 1.65; display: block; }
.diagram { width: 100%; max-width: 720px; display: block; margin: 10px auto; }
.check { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.04); margin: 6px 0; font-size: 14.5px; }
.check i { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-style: normal; font-size: 12px; background: rgba(255,255,255,.1); }
.check.ok i { background: var(--ok); color: #053; }
.check.bad i { background: var(--bad); }
.check.warn i { background: var(--a1); color: #530; }
.check small { margin-left: auto; color: var(--muted); }

/* 调试中心 */
.lab { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 20px; margin-top: 28px; }
.lab-cam { position: relative; border-radius: 22px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; border: 1px solid var(--line); }
.lab-cam canvas { width: 100%; height: 100%; display: block; }
.lab-cam .ov { position: absolute; left: 14px; top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.lab-side { display: flex; flex-direction: column; gap: 14px; }
.lab-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.lab-card h4 { margin: 0 0 10px; font-size: 14px; color: var(--muted); letter-spacing: 1px; display: flex; justify-content: space-between; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13.5px; }
.kv b { color: var(--muted); font-weight: 500; }
.kv span { font-family: var(--num); text-align: right; font-size: 12.5px; }
.gest { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.gest span { font-size: 12px; text-align: center; padding: 8px 2px; border-radius: 10px; background: rgba(255,255,255,.05); transition: background .1s, color .1s; }
.gest span.on { background: var(--c, var(--a4)); color: #061020; font-weight: 800; }
.meter { height: 10px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin: 6px 0; }
.meter i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 99px; transition: width .06s; }
.pbox { border-left: 4px solid var(--c); padding-left: 12px; margin-bottom: 12px; }
.pbox h5 { margin: 0 0 8px; font-size: 14px; color: var(--c); display: flex; justify-content: space-between; }
.tasks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.task { padding: 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px dashed rgba(255,255,255,.15); font-size: 13.5px; display: flex; justify-content: space-between; align-items: center; }
.task.ok { border-style: solid; border-color: var(--ok); background: rgba(77,255,158,.08); }
.task.ok::after { content: '已通过'; color: var(--ok); font-weight: 800; font-size: 12px; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.keys kbd { font-family: var(--num); font-size: 11px; background: rgba(255,255,255,.1); padding: 3px 7px; border-radius: 6px; border-bottom: 2px solid rgba(255,255,255,.2); white-space: nowrap; }

/* 设置 */
.settings { max-width: 820px; margin: 28px auto 0; display: flex; flex-direction: column; gap: 14px; }
.set-row { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.set-row > div:first-child { flex: 1; }
.set-row b { display: block; font-size: 16px; }
.set-row small { color: var(--muted); font-size: 13px; line-height: 1.6; }
.switch { width: 52px; height: 30px; border-radius: 99px; background: rgba(255,255,255,.15); border: 0; position: relative; transition: .2s; flex: none; }
.switch::after { content: ''; position: absolute; left: 4px; top: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: .2s; }
.switch.on { background: var(--ok); }
.switch.on::after { left: 26px; }
input[type=range] { accent-color: var(--a2); width: 200px; }

/* ───────── 游戏内 ───────── */
.game-root { position: fixed; inset: 0; z-index: 100; background: #05050f; overflow: hidden; user-select: none; }
.g-stage { position: absolute; inset: 0; }
.g-stage > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.g-hud { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.g-overlay { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; pointer-events: none; }
.g-overlay > * { pointer-events: auto; }
.g-topbar { position: absolute; top: 14px; left: 16px; z-index: 12; display: flex; align-items: center; gap: 12px; }
.g-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); background: rgba(10,10,24,.5); backdrop-filter: blur(6px); font-size: 12px; letter-spacing: -2px; }
.g-title { font-family: var(--disp); font-size: 20px; opacity: .85; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.g-fps { font-family: var(--num); font-size: 11px; color: rgba(255,255,255,.55); }
.g-pip { position: absolute; right: 16px; bottom: 16px; width: clamp(150px, 16vw, 260px); aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; z-index: 8; border: 2px solid rgba(255,255,255,.2); box-shadow: 0 10px 30px rgba(0,0,0,.5); background: #000; }
.g-pip canvas { width: 100%; height: 100%; display: block; }
.g-pip.hidden { display: none; }
.lost-banner { position: absolute; left: 50%; top: 14%; transform: translateX(-50%); z-index: 20; padding: 16px 28px; border-radius: 16px; background: rgba(10,10,24,.85); border: 2px solid var(--c); font-size: 22px; font-weight: 800; animation: pulse 1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px transparent, 0 0 40px var(--c); } }

.ov-center { text-align: center; color: var(--muted); }
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 4px solid rgba(255,255,255,.12); border-top-color: var(--a2); animation: spin 0.9s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.ov-panel { width: min(860px, 92vw); max-height: 92vh; overflow: auto; background: rgba(16, 16, 40, .88); backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,.12); border-radius: 28px; padding: clamp(20px, 3vw, 36px); text-align: center; box-shadow: 0 40px 120px rgba(0,0,0,.6); animation: pop .35s cubic-bezier(.2,1.4,.4,1); }
.ov-panel h2 { font-family: var(--disp); font-size: clamp(30px, 4vw, 46px); margin: 0 0 6px; letter-spacing: 1px; }
.join-cam { margin: 18px auto; width: 100%; max-width: 640px; aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.join-cam canvas { width: 100%; height: 100%; display: block; }
.join-slots { display: flex; justify-content: center; gap: 12px; }
.join-slot { width: 130px; padding: 14px 10px; border-radius: 18px; border: 2px dashed rgba(255,255,255,.2); display: flex; flex-direction: column; align-items: center; gap: 4px; transition: .25s; }
.join-slot .js-sil { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.06); color: rgba(255,255,255,.3); font-size: 24px; }
.join-slot b { font-family: var(--num); font-size: 20px; color: var(--c); }
.join-slot span { font-size: 12.5px; color: var(--muted); }
.join-slot.on { border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); transform: translateY(-4px); }
.join-slot.on .js-sil { background: var(--c); color: #061020; }
.join-tip { min-height: 22px; color: var(--a1); font-weight: 600; }
.howto ol { text-align: left; list-style: none; padding: 0; margin: 20px auto; max-width: 620px; display: flex; flex-direction: column; gap: 10px; }
.howto li { display: flex; gap: 14px; align-items: center; padding: 14px 18px; background: rgba(255,255,255,.05); border-radius: 16px; font-size: 17px; line-height: 1.55; }
.howto li em { font-style: normal; font-family: var(--num); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #160b24; flex: none; }
.ht-tag { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: 1px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.1); margin-bottom: 10px; }
.ht-go { margin-top: 10px; color: var(--muted); font-size: 14px; }
.ht-bar { width: 260px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.1); margin: 8px auto 0; overflow: hidden; }
.ht-bar i { display: block; height: 100%; width: 0; background: var(--grad); }
.countdown { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none !important; }
.countdown b { font-family: var(--num); font-size: min(34vh, 300px); color: #fff; text-shadow: 0 0 60px rgba(255,77,141,.9), 0 10px 0 rgba(0,0,0,.25); animation: cd .75s cubic-bezier(.2,1.6,.4,1); }
.countdown b.go { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 0 40px rgba(255,77,141,.8)); }
@keyframes cd { from { transform: scale(2.4); opacity: 0; } }
.results .res-head small { font-family: var(--disp); font-size: 18px; color: var(--muted); }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin: 26px 0 8px; min-height: 280px; }
.pod { width: 170px; display: flex; flex-direction: column; align-items: center; gap: 4px; animation: rise .6s var(--d) both cubic-bezier(.2,1.3,.4,1); }
.pod-rank { font-family: var(--disp); font-size: 22px; color: var(--c); }
.pod-name { font-family: var(--num); font-size: 34px; color: var(--c); text-shadow: 0 0 24px var(--c); }
.pod-score { font-family: var(--num); font-size: 22px; }
.pod-title { font-size: 13px; color: #fff; background: rgba(255,255,255,.1); padding: 4px 10px; border-radius: 999px; }
.pod-col { width: 100%; margin-top: 8px; border-radius: 16px 16px 6px 6px; background: linear-gradient(to bottom, var(--c), color-mix(in srgb, var(--c) 20%, transparent)); }
.pod.p1 .pod-col { height: 150px; } .pod.p2 .pod-col { height: 100px; } .pod.p3 .pod-col { height: 70px; } .pod.p4 .pod-col { height: 46px; }
.pod.p1 { order: 0; } .podium.n2 .pod.p1, .podium.n3 .pod.p1, .podium.n4 .pod.p1 { order: 1; } .podium .pod.p2 { order: 0; } .podium .pod.p3 { order: 2; } .podium .pod.p4 { order: 3; }
.pod.p1 .pod-rank::before { content: '★ '; color: var(--a1); }
@keyframes rise { from { transform: translateY(60px); opacity: 0; } }
.res-coop { padding: 20px 0; }
.res-badge { display: inline-block; font-family: var(--disp); font-size: 26px; padding: 6px 22px; border-radius: 999px; background: var(--grad); color: #160b24; }
.res-coop.lose .res-badge { background: rgba(255,255,255,.12); color: var(--text); }
.res-score { font-family: var(--num); font-size: 84px; margin: 10px 0; text-shadow: 0 0 40px rgba(255,77,141,.6); }
.res-players { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.res-players span { color: var(--c); font-weight: 800; padding: 6px 12px; border: 1px solid var(--c); border-radius: 999px; font-size: 14px; }
.res-best { font-family: var(--disp); font-size: 24px; color: var(--a1); animation: pulse 1s infinite; }

/* HUD */
.hud-layer { position: absolute; inset: 0; }
.hud-big { position: absolute; transform: translate(-50%, -50%); text-align: center; pointer-events: none; animation: big var(--d) cubic-bezier(.2,1.4,.4,1) forwards; }
.hud-big b { display: block; font-family: var(--disp); font-size: calc(72px * var(--s)); letter-spacing: 2px; -webkit-text-stroke: 2px rgba(0,0,0,.35); text-shadow: 0 6px 0 rgba(0,0,0,.25), 0 0 30px currentColor; white-space: nowrap; }
.hud-big small { display: block; font-family: var(--num); font-size: calc(22px * var(--s)); color: #fff; opacity: .9; }
@keyframes big { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 15% { transform: translate(-50%, -50%) scale(1.12); opacity: 1; } 25% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { transform: translate(-50%, -70%) scale(1); opacity: 0; } }
.hud-pop { position: absolute; transform: translate(-50%, -50%); font-family: var(--num); font-weight: 900; text-shadow: 0 3px 0 rgba(0,0,0,.35), 0 0 16px currentColor; animation: popup .9s ease-out forwards; white-space: nowrap; }
@keyframes popup { from { transform: translate(-50%, -50%) scale(.6); } 20% { transform: translate(-50%, -60%) scale(1.15); } to { transform: translate(-50%, -160%) scale(1); opacity: 0; } }
.hud-toast { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); padding: 12px 22px; border-radius: 14px; background: rgba(10,10,24,.8); border: 1px solid rgba(255,255,255,.15); font-size: 16px; font-weight: 600; animation: fade .3s; transition: opacity .4s; }
.hud-toast.out { opacity: 0; }
.hud-cue { position: absolute; left: 50%; top: 8%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 12px 26px; border-radius: 999px; background: rgba(10,10,24,.72); backdrop-filter: blur(8px); border: 2px solid rgba(255,255,255,.18); font-family: var(--disp); font-size: clamp(22px, 3vw, 38px); opacity: 0; transition: opacity .2s; white-space: nowrap; }
.hud-cue.on { opacity: 1; }
.hud-cue.bump { animation: cue .35s cubic-bezier(.2,1.6,.4,1); }
.hud-cue .cue-ico { width: 1.2em; height: 1.2em; display: inline-flex; }
.hud-cue .cue-ico svg { width: 100%; height: 100%; fill: currentColor; }
@keyframes cue { from { transform: translateX(-50%) scale(.7); } }
.hud-scores { position: absolute; display: flex; gap: 12px; }
.hud-scores.pos-top { top: 16px; left: 50%; transform: translateX(-50%); }
.hud-scores.pos-bottom { bottom: 18px; left: 50%; transform: translateX(-50%); }
.hud-scores.pos-corners { inset: auto 0 18px 0; justify-content: space-between; padding: 0 20px; right: clamp(170px, 18vw, 290px); }
.score-chip { display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border-radius: 16px; background: rgba(10,10,24,.72); backdrop-filter: blur(8px); border: 2px solid var(--c); box-shadow: 0 0 20px color-mix(in srgb, var(--c) 40%, transparent); min-width: 150px; }
.score-chip .tag { font-family: var(--num); font-size: 15px; padding: 6px 10px; border-radius: 10px; background: var(--c); color: #061020; }
.score-chip b { font-family: var(--num); font-size: 28px; font-weight: 400; }
.score-chip em { font-style: normal; font-size: 12px; color: var(--muted); }
.score-chip.bump b { animation: sbump .3s; display: inline-block; }
.score-chip.out { opacity: .4; filter: grayscale(1); }
.score-chip.lead { transform: scale(1.06); }
@keyframes sbump { 40% { transform: scale(1.3); } }
.hud-timer { position: absolute; width: 74px; height: 74px; display: grid; place-items: center; }
.hud-timer.pos-top { top: 14px; left: 50%; transform: translateX(-50%); }
.hud-timer.pos-right { top: 14px; right: 18px; }
.hud-timer svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.hud-timer circle { fill: rgba(10,10,24,.7); stroke-width: 4; }
.hud-timer .bg { stroke: rgba(255,255,255,.12); }
.hud-timer .fg { fill: none; stroke: var(--a1); stroke-linecap: round; transition: stroke-dashoffset .2s linear; }
.hud-timer b { position: relative; font-family: var(--num); font-size: 26px; font-weight: 400; }
.hud-timer.hurry .fg { stroke: var(--bad); }
.hud-timer.hurry b { color: var(--bad); animation: sbump .5s infinite; }
.hud-bar { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; }
.hud-bar div { flex: 1; height: 14px; border-radius: 99px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.2); overflow: hidden; }
.hud-bar i { display: block; height: 100%; width: 0; background: var(--c); box-shadow: 0 0 14px var(--c); transition: width .1s; }

.motion-cursor { position: fixed; left: 0; top: 0; width: 44px; height: 44px; z-index: 500; pointer-events: none; opacity: 0; transition: opacity .2s; }
.motion-cursor svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.motion-cursor circle { fill: rgba(255,255,255,.18); stroke-width: 4; }
.motion-cursor .bg { stroke: rgba(255,255,255,.6); }
.motion-cursor .fg { fill: none; stroke: var(--a1); stroke-linecap: round; }

.toast-global { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 300; background: rgba(16,16,40,.95); border: 1px solid var(--line); padding: 12px 20px; border-radius: 14px; font-weight: 600; animation: fade .3s; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; } .hero-art { min-height: 200px; }
  .modal-box { grid-template-columns: 1fr; } .modal-box .cv { min-height: 220px; }
  .guide, .lab { grid-template-columns: 1fr; } .steps-nav { position: static; flex-direction: row; overflow: auto; }
  .status { display: none; } .nav button { padding: 8px 10px; }
}

/* ───────── 画风叠加层 ───────── */
.g-stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 3; }
/* 恶搞动画：漫画网点 + 粗暗角 + 爆炸字 */
.style-toon .g-stage::after { background: radial-gradient(circle, rgba(20,10,30,.16) 1.1px, transparent 1.6px) 0 0 / 7px 7px, radial-gradient(ellipse at center, transparent 62%, rgba(20,10,30,.45) 100%); mix-blend-mode: multiply; }
.style-toon .g-stage > canvas { filter: saturate(1.18) contrast(1.06); }
.style-toon .hud-big b { font-family: var(--disp); color: #ffe14d !important; -webkit-text-stroke: 3px #15101f; text-shadow: 5px 6px 0 #15101f, 0 0 0 transparent; transform: rotate(-5deg); display: inline-block; padding: .18em .5em; background: radial-gradient(circle at 50% 50%, #ff4d6d 0 58%, transparent 59%); clip-path: polygon(50% 0, 61% 18%, 82% 6%, 78% 30%, 100% 34%, 84% 52%, 98% 72%, 74% 72%, 72% 96%, 54% 80%, 36% 100%, 30% 76%, 6% 82%, 16% 60%, 0 42%, 20% 32%, 12% 10%, 36% 18%); }
.style-toon .score-chip { border-width: 3px; box-shadow: 5px 5px 0 #15101f; border-radius: 12px; }
.style-toon .hud-cue { border: 3px solid #15101f; box-shadow: 5px 5px 0 #15101f; background: #fff; color: #15101f !important; }
/* 复古像素：扫描线 + 像素字 */
.style-pixel .g-stage::after { background: repeating-linear-gradient(to bottom, rgba(0,0,0,.22) 0 2px, transparent 2px 4px), radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,.55) 100%); }
.style-pixel .g-stage > canvas { image-rendering: pixelated; filter: saturate(1.25) contrast(1.1); }
.style-pixel .hud-big b, .style-pixel .score-chip b, .style-pixel .hud-timer b { font-family: var(--num); letter-spacing: 3px; text-shadow: 4px 4px 0 #000; -webkit-text-stroke: 0; }
.style-pixel .score-chip, .style-pixel .hud-cue { border-radius: 0; box-shadow: 4px 4px 0 #000; }
/* 手绘纸艺：纸纹 + 轻微褪色 */
.style-paper .g-stage::after { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45 0 0 0 0 .36 0 0 0 0 .25 0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"), radial-gradient(ellipse at center, transparent 55%, rgba(90,60,30,.35) 100%); mix-blend-mode: multiply; opacity: .75; }
.style-paper .g-stage > canvas { filter: saturate(.92) contrast(1.03) sepia(.08); }
.style-paper .hud-big b { font-family: var(--disp); color: #fff !important; -webkit-text-stroke: 2px #4a3423; text-shadow: 3px 4px 0 rgba(74,52,35,.5); transform: rotate(-3deg); display: inline-block; }
.style-paper .score-chip { background: #fffaf0; color: #3b2a1c; border-radius: 6px 14px 8px 12px; box-shadow: 3px 4px 0 rgba(74,52,35,.35); }
.style-paper .score-chip b { color: #3b2a1c; }
/* 国风水墨：宣纸 + 淡彩 + 印章 */
.style-ink .g-stage > canvas { filter: saturate(.42) sepia(.28) contrast(1.22) brightness(1.04); }
.style-ink .g-stage::after { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='4'/><feColorMatrix values='0 0 0 0 .55 0 0 0 0 .48 0 0 0 0 .36 0 0 0 .45 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"), radial-gradient(ellipse at center, transparent 50%, rgba(30,24,18,.6) 100%); mix-blend-mode: multiply; }
.style-ink .g-stage::before { content: '嗨动'; position: absolute; left: 2%; top: 46%; z-index: 4; writing-mode: vertical-rl; font-family: var(--disp); font-size: 22px; color: #fff; background: #b8262c; padding: 8px 6px; border-radius: 4px; opacity: .85; pointer-events: none; }
.style-ink .hud-big b { font-family: var(--disp); color: #1d1a17 !important; -webkit-text-stroke: 0; text-shadow: 0 0 18px rgba(255,255,255,.9), 0 0 2px #fff; letter-spacing: 6px; }
/* 黏土定格：胶片颗粒抖动 */
.style-clay .g-stage::after { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2'/><feColorMatrix values='0 0 0 0 .5 0 0 0 0 .4 0 0 0 0 .3 0 0 0 .35 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"), radial-gradient(ellipse at center, transparent 60%, rgba(60,30,10,.4) 100%); mix-blend-mode: multiply; animation: grain .5s steps(4) infinite; }
.style-clay .g-stage > canvas { filter: saturate(1.12) contrast(1.04) sepia(.06); }
.style-clay .hud-big b { font-family: var(--disp); color: #fff4d6 !important; -webkit-text-stroke: 3px #7a3b1d; text-shadow: 0 6px 0 #7a3b1d, 0 10px 18px rgba(0,0,0,.35); }
@keyframes grain { 0% { background-position: 0 0, 0 0; } 25% { background-position: -40px 20px, 0 0; } 50% { background-position: 30px -30px, 0 0; } 75% { background-position: -20px -40px, 0 0; } }
/* 老电视：扫描线 + 色散 */
.style-vhs .g-stage::after { background: repeating-linear-gradient(to bottom, rgba(255,255,255,.035) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 58%, rgba(0,0,0,.6) 100%); animation: flick 4s infinite; }
@keyframes flick { 0%, 96%, 100% { opacity: 1; } 97% { opacity: .7; } 98% { opacity: 1; } 99% { opacity: .8; } }
/* 霓虹：轻扫描线 */
.style-neon .g-stage::after { background: repeating-linear-gradient(to bottom, rgba(120,160,255,.04) 0 1px, transparent 1px 4px); }
.tag-s.art { background: rgba(46,197,255,.14); color: #a8e6ff; }
@media (min-width: 1200px) { .grid.five { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1500px) { .grid.five { grid-template-columns: repeat(6, 1fr); } .grid.five .card h3 { font-size: 22px; } }

/* ───────── 手机 / 投屏适配 ───────── */
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
body { overscroll-behavior: none; }
body.in-game, .game-root { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.game-root { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.g-topbar { top: max(14px, env(safe-area-inset-top)); left: max(16px, env(safe-area-inset-left)); }
.g-pip { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); }
.g-btn.fs .ico { width: 18px; height: 18px; }
.cast-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: rgba(255,255,255,.08); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.cast-btn:hover { background: rgba(255,255,255,.16); }
.topbar { padding-top: max(14px, env(safe-area-inset-top)); padding-left: max(clamp(16px, 4vw, 48px), env(safe-area-inset-left)); padding-right: max(clamp(16px, 4vw, 48px), env(safe-area-inset-right)); }

/* 竖屏提示 */
.rotate-tip { position: absolute; inset: 0; z-index: 60; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(8,8,22,.96); text-align: center; padding: 24px; }
.game-root.need-rotate .rotate-tip { display: flex; }
.rotate-tip b { font-family: var(--disp); font-size: 30px; }
.rotate-tip p { color: var(--muted); max-width: 320px; line-height: 1.6; margin: 0; }
.rotate-tip .phone { width: 56px; height: 96px; border: 4px solid #fff; border-radius: 12px; position: relative; animation: rot 2s cubic-bezier(.6,0,.3,1) infinite; }
.rotate-tip .phone::after { content: ''; position: absolute; left: 50%; bottom: 6px; width: 14px; height: 3px; margin-left: -7px; border-radius: 3px; background: #fff; }
@keyframes rot { 0%, 20% { transform: rotate(0); } 55%, 100% { transform: rotate(-90deg); } }

/* 隔空暂停手势进度 */
.gest-pause { position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%); z-index: 15; display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; background: rgba(10,10,30,.8); border: 1px solid rgba(255,255,255,.2); opacity: 0; transition: opacity .2s; pointer-events: none; font-weight: 700; }
.gest-pause.on { opacity: 1; }
.gest-pause i { width: 26px; height: 26px; border-radius: 50%; background: conic-gradient(var(--a1) calc(var(--k, 0) * 360deg), rgba(255,255,255,.15) 0); }

/* 大屏直连 */
.link-wrap { display: grid; grid-template-columns: minmax(320px, 440px) 1fr; gap: 20px; margin-top: 24px; }
.link-main { text-align: center; }
.link-main h3 { margin-top: 0; }
.qr { display: grid; place-items: center; margin: 12px auto; }
.qr svg { width: min(280px, 70vw); height: auto; box-shadow: 0 20px 50px rgba(0,0,0,.4); border-radius: 14px; }
.room-label { color: var(--muted); font-size: 13px; }
.room { display: flex; justify-content: center; gap: 14px; margin: 8px 0 12px; }
.room b { font-family: var(--num); font-size: 44px; letter-spacing: 8px; font-weight: 400; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.link-st { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.06); font-size: 14px; font-weight: 700; }
.link-st::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #777; }
.link-st.ok::before { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.link-st.warn::before { background: var(--a1); animation: pulse 1s infinite; }
.link-st.bad::before { background: var(--bad); }

/* 传感器（手机端） */
body.sensor-mode { background: #05050f; }
.sensor { min-height: 100dvh; display: flex; flex-direction: column; }
.sensor-cam { position: relative; flex: 1; min-height: 46vh; background: #000; }
.sensor-cam canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sensor-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 10px; padding: max(12px, env(safe-area-inset-top)) 14px 12px; background: linear-gradient(rgba(0,0,0,.7), transparent); }
.sensor-top img { width: 30px; }
.sensor-top b { font-family: var(--disp); font-size: 20px; margin-right: auto; }
.sensor-panel { padding: 16px 16px max(16px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.room-in { margin: 0; width: 100%; font-family: var(--num); font-size: 22px; letter-spacing: 6px; text-align: center; min-width: 0; padding: 12px; }
.sensor-info { font-family: var(--num); font-size: 12px; color: var(--muted); text-align: center; }
body.sensor-dim .sensor-cam canvas { opacity: .08; }
body.sensor-dim .sensor::after { content: '屏幕已调暗 · 点按钮恢复'; position: fixed; left: 0; right: 0; top: 40%; text-align: center; color: #444; pointer-events: none; }
@media (orientation: landscape) and (max-height: 600px) { .sensor { flex-direction: row; } .sensor-cam { min-height: 100dvh; } .sensor-panel { width: 340px; justify-content: center; } }

/* 延迟校准 */
.cal { display: flex; gap: 16px; align-items: center; }
.cal-dot { width: 64px; height: 64px; border-radius: 50%; flex: none; background: rgba(255,255,255,.08); border: 3px solid rgba(255,255,255,.2); }
.cal-dot.on { animation: calf .35s ease-out; }
@keyframes calf { 0% { background: var(--a1); box-shadow: 0 0 40px var(--a1); transform: scale(1.15); } 100% { background: rgba(255,255,255,.08); } }
.cal-res { font-weight: 700; }

/* 小屏 / 横屏手机：紧凑布局 */
@media (max-width: 900px) { .link-wrap { grid-template-columns: 1fr; } .cast-btn span { display: none; } .logo small { display: none; } .nav { overflow-x: auto; scrollbar-width: none; } .nav button { white-space: nowrap; } }
@media (max-height: 540px) {
  .ov-panel { padding: 14px 18px; border-radius: 20px; max-height: 96vh; }
  .ov-panel h2 { font-size: 24px; margin-bottom: 2px; }
  .ov-panel .muted { font-size: 12.5px; margin: 4px 0; }
  .join-cam { max-width: 46vh; margin: 8px auto; }
  .join-slot { width: 96px; padding: 6px; } .join-slot .js-sil { width: 30px; height: 30px; font-size: 16px; } .join-slot b { font-size: 15px; }
  .row { margin-top: 8px; } .btn { padding: 9px 18px; font-size: 14px; }
  .howto ol { margin: 8px auto; gap: 6px; } .howto li { padding: 7px 12px; font-size: 13.5px; } .howto li em { width: 24px; height: 24px; font-size: 12px; }
  .podium { min-height: 180px; margin: 10px 0 4px; } .pod { width: 120px; } .pod-name { font-size: 24px; } .pod-score { font-size: 16px; } .pod.p1 .pod-col { height: 80px; } .pod.p2 .pod-col { height: 56px; } .pod.p3 .pod-col { height: 40px; } .pod.p4 .pod-col { height: 28px; }
  .res-score { font-size: 54px; margin: 4px 0; }
  .score-chip { min-width: 0; padding: 4px 12px 4px 4px; gap: 6px; } .score-chip b { font-size: 20px; } .score-chip .tag { font-size: 12px; padding: 4px 7px; }
  .hud-timer { width: 54px; height: 54px; } .hud-timer b { font-size: 19px; }
  .hud-cue { font-size: 20px; padding: 7px 16px; top: 6%; }
  .g-pip { width: 120px; } .g-title { font-size: 15px; } .g-btn { width: 34px; height: 34px; }
  .countdown b { font-size: 46vh; }
  .modal-box { grid-template-columns: 1fr 1.3fr; } .modal-box .body { padding: 16px; gap: 8px; } .modal-box h2 { font-size: 28px; } .modal-box ol { font-size: 13px; line-height: 1.55; }
}
@media (hover: none) { .card:hover { transform: none; } .btn:hover { transform: none; } }
.cast-banner { margin-top: 18px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 16px 18px; border-radius: 18px; background: linear-gradient(100deg, rgba(46,197,255,.18), rgba(106,92,255,.18)); border: 1px solid rgba(46,197,255,.35); }
.cast-banner b { display: block; font-family: var(--disp); font-size: 22px; margin-bottom: 4px; }
.cast-banner span { font-size: 13.5px; color: #d8e8ff; line-height: 1.6; display: block; max-width: 720px; }
a.btn { text-decoration: none; color: var(--text); }
a.btn.primary { color: #160b24; }
.logo b { white-space: nowrap; }
@media (max-width: 640px) { .logo > div { display: none; } .topbar { gap: 10px; } .nav { margin-left: 0; flex: 1; min-width: 0; } .hero h1 { font-size: 46px; } .section-h h2 { font-size: 26px; } .frow > span { width: 100%; } .search { min-width: 0; width: 100%; margin-left: 0; } .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; } .card h3 { font-size: 19px; } .card p { display: none; } }

/* 手势调试 */
.hand-info .kv { margin-bottom: 6px; }
.seal-tests { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.seal-t { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); transition: .2s; }
.seal-t img { width: 84px; height: 84px; background: radial-gradient(circle, rgba(255,211,107,.12), transparent 70%); border-radius: 50%; }
.seal-t b { font-size: 14px; } .seal-t span { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.seal-t.ok { border-color: var(--ok); background: rgba(124,255,107,.08); }
.seal-t.now { box-shadow: 0 0 0 2px var(--ok), 0 0 24px rgba(124,255,107,.35); transform: translateY(-2px); }

/* ───────── 真人动漫特效：招式名 ───────── */
.stage2d.ar-ink { pointer-events: none; }
.jutsu-title { position: absolute; z-index: 12; pointer-events: none; display: flex; flex-direction: column; align-items: center; animation: jt-in var(--d, 2.2s) cubic-bezier(.2,.9,.2,1) forwards; }
.jutsu-title.s-center { left: 50%; top: 17%; transform: translate(-50%, -50%); }
.jutsu-title.s-left { left: 25%; top: 17%; transform: translate(-50%, -50%); }
.jutsu-title.s-right { left: 75%; top: 17%; transform: translate(-50%, -50%); }
.jutsu-title b { font-family: var(--disp); line-height: 1; white-space: nowrap; }
.jutsu-title small { margin-top: 10px; font-family: var(--num); letter-spacing: 6px; font-size: 14px; opacity: .85; }
.t-ninja b { font-size: clamp(34px, 5.4vw, 84px); color: #fff; letter-spacing: .06em; -webkit-text-stroke: 2px #1b0f08; text-shadow: 0 0 0 #000, 6px 6px 0 #c2261c, 0 0 40px rgba(255,120,40,.65); transform: skewX(-8deg); padding: .1em .4em; background: linear-gradient(100deg, transparent 0 4%, rgba(10,6,4,.78) 6% 92%, transparent 95%); clip-path: polygon(2% 12%, 98% 0, 100% 84%, 0 100%); }
.t-ninja small { color: #ffd9b0; background: #c2261c; padding: 4px 12px; border-radius: 3px; }
.t-saiyan b { font-size: clamp(44px, 8vw, 120px); color: #ffe23a; -webkit-text-stroke: 4px #6b2a00; text-shadow: 0 7px 0 #6b2a00, 0 0 50px rgba(255,210,60,.8); transform: rotate(-4deg) scaleY(1.08); font-style: italic; }
.t-saiyan small { color: #fff3b0; text-shadow: 0 2px 0 #6b2a00; }
.t-magic b { font-size: clamp(36px, 6vw, 88px); color: #f0e6ff; letter-spacing: .12em; text-shadow: 0 0 24px #a04cff, 0 0 60px #6a2cff; }
.t-magic small { color: #d7c2ff; }
@keyframes jt-in { 0% { opacity: 0; filter: blur(12px); scale: 1.6; } 9% { opacity: 1; filter: blur(0); scale: 1; } 80% { opacity: 1; scale: 1.04; } 100% { opacity: 0; scale: 1.08; } }
/* 卷轴提示（结印顺序） */
.scroll-seq { position: absolute; left: 50%; bottom: 5%; transform: translateX(-50%); z-index: 11; display: flex; align-items: center; gap: 10px; padding: 10px 18px 10px 14px; border-radius: 16px; background: linear-gradient(180deg, rgba(246,232,206,.95), rgba(226,204,166,.95)); color: #2a1a10; box-shadow: 0 12px 40px rgba(0,0,0,.45), inset 0 0 0 2px rgba(90,50,20,.35); pointer-events: none; }
.scroll-seq .sq-name { font-family: var(--disp); font-size: 26px; padding-right: 12px; margin-right: 4px; border-right: 2px solid rgba(90,50,20,.3); white-space: nowrap; }
.scroll-seq .sq-step { display: flex; flex-direction: column; align-items: center; width: 74px; opacity: .45; transition: .2s; }
.scroll-seq .sq-step img { width: 58px; height: 58px; border-radius: 50%; background: #1a120c; padding: 4px; }
.scroll-seq .sq-step span { font-size: 12px; font-weight: 800; margin-top: 3px; white-space: nowrap; }
.scroll-seq .sq-step.now { opacity: 1; transform: scale(1.12); }
.scroll-seq .sq-step.done { opacity: 1; }
.scroll-seq .sq-step.done img { box-shadow: 0 0 0 3px #3fbf5a; }
.scroll-seq .sq-hint { max-width: 260px; font-size: 13px; font-weight: 700; line-height: 1.45; padding-left: 8px; }
.scroll-seq .sq-arrow { font-weight: 900; opacity: .4; }
@media (max-height: 540px) { .scroll-seq .sq-step { width: 56px; } .scroll-seq .sq-step img { width: 42px; height: 42px; } .scroll-seq .sq-name { font-size: 20px; } .scroll-seq .sq-hint { display: none; } }
.nav button { white-space: nowrap; }
.status { flex-wrap: nowrap; overflow: hidden; min-width: 0; }

/* ───────── 本机模式（手机 / 平板自己当屏幕）───────── */
.tag-s.near { background: rgba(77, 255, 158, .14); color: #9dffc9; }
.tag-s.far { background: rgba(255, 200, 61, .12); color: #ffd98a; }
.handheld-banner { background: linear-gradient(100deg, rgba(77,255,158,.14), rgba(46,197,255,.16)); }
.cast-banner .off-st { display: block; margin-top: 6px; font-size: 12.5px; color: #9dffc9; }
.join-dev { margin: -2px 0 8px; color: #9dffc9; font-weight: 600; }
/* 手机屏幕小、人离得远：游戏内关键文字放大，省掉标题 */
body.handheld.ff-phone .hud-cue { font-size: clamp(26px, 4.4vw, 44px); padding: 10px 24px; }
body.handheld.ff-phone .score-chip { min-width: 0; padding: 6px 14px 6px 6px; }
body.handheld.ff-phone .score-chip b { font-size: 34px; }
body.handheld.ff-phone .score-chip .tag { font-size: 17px; }
body.handheld.ff-phone .hud-toast { font-size: 19px; }
body.handheld.ff-phone .hud-timer { width: 84px; height: 84px; }
body.handheld.ff-phone .hud-timer b { font-size: 32px; }
body.handheld.ff-phone .hud-bar { font-size: 17px; }
body.handheld.ff-phone .hud-bar div { height: 18px; }
body.handheld.ff-phone .hud-big b { font-size: calc(80px * var(--s)); }
body.handheld.ff-phone .g-title { display: none; }
body.handheld.ff-phone .g-pip { width: 128px; }
body.handheld.ff-tablet .hud-cue { font-size: clamp(26px, 3.6vw, 44px); }
body.handheld.ff-tablet .score-chip b { font-size: 32px; }

/* ───────── 隔空点击 ───────── */
.motion-armed { outline: 3px solid var(--a1) !important; outline-offset: 3px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--a1) 25%, transparent), 0 0 28px color-mix(in srgb, var(--a1) 55%, transparent) !important; }
.card.motion-armed, .btn.motion-armed { transform: scale(1.05); }
.motion-cursor[data-state="armed"] circle { fill: color-mix(in srgb, var(--a1) 35%, transparent); }
.motion-cursor[data-state="hold"] .fg, .motion-cursor[data-state="dwell"] .fg { stroke: #ffd36b; }
.motion-cursor.fire { animation: mcfire .35s ease-out; }
@keyframes mcfire { 0% { scale: 1; } 40% { scale: .7; } 100% { scale: 1; } }
.mc-tip { position: absolute; left: 50%; top: 50px; transform: translateX(-50%); white-space: nowrap; padding: 5px 12px; border-radius: 999px; background: rgba(10,10,30,.88); border: 1px solid rgba(255,255,255,.25); font-size: 13px; font-weight: 700; color: #fff; }
.mc-tip:empty { display: none; }
.air-edge { position: fixed; left: 0; right: 0; height: 10vh; z-index: 450; pointer-events: none; opacity: 0; transition: opacity .2s; }
.air-edge.top { top: 0; background: linear-gradient(to bottom, color-mix(in srgb, var(--a1) 35%, transparent), transparent); }
.air-edge.bottom { bottom: 0; background: linear-gradient(to top, color-mix(in srgb, var(--a1) 35%, transparent), transparent); }
.air-edge.on { opacity: 1; }
.air-pip { position: fixed; right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); z-index: 440; width: 200px; border-radius: 14px; overflow: hidden; background: rgba(10,10,30,.92); border: 1px solid rgba(255,255,255,.2); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.air-pip[hidden] { display: none; }
.air-pip canvas { display: block; width: 100%; aspect-ratio: 16/9; }
.air-pip-t { padding: 6px 10px 8px; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.air-pip-t b { display: block; color: #9dffc9; font-size: 12.5px; }
.air-pip-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; }
.air-btn.on { background: color-mix(in srgb, var(--a1) 30%, transparent); border-color: var(--a1); }
body.ff-phone .air-pip { width: 150px; }
body.ff-phone .air-pip-t span { display: none; }
