:root {
  --bg: #05060f;
  --ink: #eef1ff;
  --dim: #9298c4;
  --faint: #5b6190;
  --line: rgba(150, 160, 255, .16);
  --glass: rgba(20, 24, 56, .55);
  --xc: #ff7a3d; --sj: #ff4fd8; --yl: #7cf7ff; --jf: #c6ff3d;
  --accent: #8f7cff;
  --led: #b9f6ff;
  --all: linear-gradient(90deg, var(--xc), var(--sj) 36%, var(--yl) 68%, var(--jf));
  --sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, "Roboto Mono", monospace;
  --top: env(safe-area-inset-top, 0px);
  --bot: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  line-height: 1.6;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
.mono { font-family: var(--mono); letter-spacing: .04em; }
b, strong { font-weight: 700; }

/* ---------- 背景 ---------- */
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(143, 124, 255, .22), transparent 60%),
    radial-gradient(80% 50% at 50% 115%, rgba(124, 247, 255, .10), transparent 70%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 3px);
}
#dim {
  position: fixed; inset: 0; z-index: 30; pointer-events: none;
  background: #000; opacity: 0; transition: opacity 1.4s ease;
}
#dim.on { opacity: .93; }

/* ---------- 顶部灯条 ---------- */
#hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(var(--top) + 12px) max(16px, calc(50vw - 300px)) 12px;
  background: linear-gradient(rgba(5, 6, 15, .92), rgba(5, 6, 15, .7) 70%, rgba(5, 6, 15, 0));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .5s ease, opacity .5s ease;
}
#hud.off { transform: translateY(-110%); opacity: 0; pointer-events: none; }
#hud.mini { background: none; backdrop-filter: none; -webkit-backdrop-filter: none; justify-content: flex-end; pointer-events: none; }
#hud.mini .lights, #hud.mini #ver { display: none; }
#hud.mini .icon-btn { pointer-events: auto; background: rgba(5, 6, 15, .5); }
.lights { display: flex; gap: 6px; align-items: center; }
.led {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  background: #151937; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09);
  transition: background .35s, box-shadow .35s, transform .35s;
}
.led.on {
  background: radial-gradient(circle at 36% 34%, #fff 0 18%, var(--led) 45%, #5fd6ff 100%);
  box-shadow: 0 0 8px rgba(124, 247, 255, .95), 0 0 20px rgba(124, 247, 255, .45);
}
.led.pop { animation: ledpop .6s ease; }
@keyframes ledpop { 0% { transform: scale(.4); } 55% { transform: scale(1.5); } 100% { transform: scale(1); } }
.hud-r { display: flex; align-items: center; gap: 10px; }
#ver { font-size: 15px; font-weight: 700; color: var(--led); text-shadow: 0 0 10px rgba(124, 247, 255, .6); min-width: 4.2em; text-align: right; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--dim); border: 1px solid var(--line); }
.icon-btn .mute { display: none; }
body.muted .icon-btn .wave { display: none; }
body.muted .icon-btn .mute { display: inline; }

/* ---------- 布局 ---------- */
#app {
  position: relative; z-index: 1;
  max-width: 600px; margin: 0 auto;
  min-height: 100vh; min-height: 100dvh;
  padding: calc(var(--top) + 76px) 20px calc(var(--bot) + 32px);
  overflow-x: clip; /* 聚光灯、掉落中的卡片不许把手机视口撑宽 */
}
#app.bare { padding-top: calc(var(--top) + 28px); }
#app.lift { z-index: 40; }
.screen { animation: enter .55s cubic-bezier(.2, .8, .2, 1) both; }
.screen.leave { animation: leave .35s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes leave { to { opacity: 0; transform: translateY(-12px); } }
.center { min-height: calc(100vh - 140px); min-height: calc(100dvh - 140px); display: flex; flex-direction: column; justify-content: center; }

.tag { font-family: var(--mono); font-size: 12px; letter-spacing: .22em; color: var(--dim); text-transform: uppercase; }
.tag i { font-style: normal; color: var(--led); }
.grad { background: var(--all); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- 按钮 ---------- */
.btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px; padding: 14px 22px; border-radius: 16px;
  font-size: 17px; font-weight: 700; letter-spacing: .06em; color: #05060f;
  background: var(--all); box-shadow: 0 8px 30px rgba(255, 79, 216, .25), 0 0 0 1px rgba(255, 255, 255, .2) inset;
  transition: transform .15s, filter .2s, opacity .3s;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .35; filter: grayscale(.6); cursor: not-allowed; }
.btn.ghost { color: var(--ink); background: var(--glass); box-shadow: 0 0 0 1px var(--line) inset; font-weight: 600; }
.btn.small { min-height: 46px; font-size: 15px; border-radius: 14px; }
.btn .arr { font-family: var(--mono); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.link { color: var(--dim); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; padding: 8px; }

/* ---------- 首页 ---------- */
.home { text-align: center; }
.home .tag { margin-top: 4px; }
.bits { font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: .3em; margin-top: 6px; }
.bits span { color: var(--led); text-shadow: 0 0 8px rgba(124, 247, 255, .7); }
.hero { position: relative; width: 220px; height: 220px; margin: 10px auto 0; }
.hero img { position: relative; width: 100%; height: 100%; animation: float 4s ease-in-out infinite; }
.orbit {
  position: absolute; inset: 6%; border-radius: 50%; border: 1px dashed rgba(143, 124, 255, .45);
  animation: spin 22s linear infinite;
}
.orbit::before, .orbit::after {
  content: ""; position: absolute; width: 9px; height: 9px; border-radius: 50%; top: -5px; left: calc(50% - 5px);
  background: var(--yl); box-shadow: 0 0 10px var(--yl);
}
.orbit::after { top: auto; bottom: -5px; background: var(--sj); box-shadow: 0 0 10px var(--sj); }
.orbit.o2 { inset: -4%; border-color: rgba(124, 247, 255, .2); animation-duration: 34s; animation-direction: reverse; }
.orbit.o2::before { background: var(--xc); box-shadow: 0 0 10px var(--xc); }
.orbit.o2::after { background: var(--jf); box-shadow: 0 0 10px var(--jf); }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
.home .button-orb { width: 128px; height: 128px; margin: 56px auto 34px; }
.home h1 {
  display: inline-block; font-size: clamp(72px, 24vw, 112px); line-height: 1.12; margin: 0 0 18px;
  letter-spacing: .16em; padding-left: .16em; font-weight: 900;
  filter: drop-shadow(0 0 22px rgba(255, 79, 216, .4));
}
.intro { color: #c9cdf0; font-size: 15.5px; line-height: 1.85; margin: 0 auto 22px; max-width: 30em; text-wrap: pretty; }
.intro p { margin: 0 0 8px; }
.intro em { font-style: normal; color: var(--ink); font-weight: 700; }
.form { text-align: left; display: grid; gap: 12px; margin-bottom: 18px; }
.field { position: relative; }
.field label { display: block; font-size: 13px; color: var(--dim); margin: 0 0 6px 4px; }
.field input {
  width: 100%; height: 54px; padding: 0 16px; border-radius: 14px; font-size: 17px;
  background: rgba(10, 13, 34, .75); border: 1px solid var(--line); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: #565c88; }
.field input:focus { border-color: rgba(124, 247, 255, .6); box-shadow: 0 0 0 4px rgba(124, 247, 255, .12); }
.meta-line { margin-top: 14px; font-size: 12.5px; color: var(--faint); }
.meta-line .mono { color: var(--dim); }

/* ---------- 题目 ---------- */
.q-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.q-no { font-family: var(--mono); font-size: 13px; color: var(--dim); letter-spacing: .14em; }
.q-no b { color: var(--ink); font-size: 22px; letter-spacing: .02em; }
.q-stage { display: block; margin-top: 2px; font-size: 20px; font-weight: 800; letter-spacing: .04em; }
.q-ver { font-family: var(--mono); font-size: 30px; font-weight: 800; color: var(--led); text-shadow: 0 0 18px rgba(124, 247, 255, .55); line-height: 1; }
.q-ver.none { font-size: 14px; color: var(--faint); text-shadow: none; font-weight: 500; }
.q-half { font-family: var(--mono); font-size: 11.5px; color: var(--faint); letter-spacing: .12em; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.q-text { font-size: 18px; line-height: 1.8; margin: 0 0 22px; font-weight: 500; }
.q-text p { margin: 0 0 8px; opacity: 0; animation: enter .6s ease forwards; }
.q-text p + p { color: #fff; font-weight: 700; }
.opts { display: grid; gap: 11px; }
.opt {
  position: relative; display: flex; gap: 12px; align-items: flex-start; text-align: left;
  padding: 14px 16px; border-radius: 16px; font-size: 15.5px; line-height: 1.62;
  background: var(--glass); border: 1px solid var(--line);
  opacity: 0; animation: enter .5s ease forwards;
  transition: border-color .2s, background .2s, transform .2s, opacity .3s, box-shadow .3s;
}
.opt .k {
  flex: none; width: 28px; height: 28px; border-radius: 8px; margin-top: 1px;
  display: grid; place-items: center; font: 700 13px var(--mono);
  color: var(--led); border: 1px solid rgba(124, 247, 255, .35); background: rgba(124, 247, 255, .06);
}
@media (hover: hover) {
  .opt:hover { border-color: rgba(124, 247, 255, .45); background: rgba(30, 36, 80, .7); }
}
.opt:active { transform: scale(.985); }
.opts.locked .opt { pointer-events: none; }
.opts.locked .opt:not(.picked) { opacity: .28 !important; transform: scale(.98); }
.opt.picked {
  border-color: rgba(185, 246, 255, .9); background: rgba(40, 60, 110, .75);
  box-shadow: 0 0 0 1px rgba(185, 246, 255, .5) inset, 0 0 26px rgba(124, 247, 255, .35);
}
.opt.picked .k { background: var(--led); color: #05060f; }
.opt.picked::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .25) 50%, transparent 70%);
  background-size: 250% 100%; animation: sweep .7s ease forwards;
}
@keyframes sweep { from { background-position: 120% 0; } to { background-position: -40% 0; } }

/* 加载失败彩蛋 */
.err {
  margin-top: 8vh; padding: 26px 22px; border-radius: 20px; text-align: center;
  background: rgba(40, 10, 24, .55); border: 1px solid rgba(255, 90, 120, .35);
}
.err .ico { font-size: 40px; line-height: 1; animation: glitch 1.6s steps(2) infinite; }
.err h3 { margin: 14px 0 6px; font-size: 20px; }
.err code { display: block; font: 12px var(--mono); color: #ff8aa8; opacity: .8; margin-bottom: 20px; word-break: break-all; }
.err .btn { max-width: 240px; margin: 0 auto; }
.err.shake { animation: shake .45s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes glitch { 0%, 100% { transform: none; filter: none; } 50% { transform: translate(2px, -1px) skewX(-6deg); filter: hue-rotate(40deg); } }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: spin .7s linear infinite; }

/* ---------- 过场 ---------- */
.scene { text-align: center; }
.scene .tag { margin-bottom: 18px; }
.scene h2 { font-size: 34px; margin: 0 0 18px; letter-spacing: .1em; }
.scene .lines { font-size: 20px; line-height: 2; min-height: 8em; }
.scene .lines div { opacity: 0; transform: translateY(8px); transition: opacity .6s, transform .6s; }
.scene .lines div.in { opacity: 1; transform: none; }
.scene .lines b { color: var(--led); text-shadow: 0 0 14px rgba(124, 247, 255, .6); }
.scene .btn { margin-top: 34px; opacity: 0; transition: opacity .5s; }
.scene .btn.in { opacity: 1; }
.tap-hint { margin-top: 12px; font: 12px var(--mono); color: var(--faint); letter-spacing: .1em; }

/* 发光纽扣 */
.button-orb { position: relative; width: 120px; height: 120px; margin: 0 auto 26px; }
.button-orb svg { position: relative; width: 100%; height: 100%; filter: drop-shadow(0 0 22px rgba(255, 220, 140, .55)); }
.button-orb .ring {
  position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 226, 160, .55);
  animation: ripple 2.4s ease-out infinite;
}
.button-orb .ring:nth-child(2) { animation-delay: .8s; }
.button-orb .ring:nth-child(3) { animation-delay: 1.6s; }
@keyframes ripple { from { transform: scale(.9); opacity: .9; } to { transform: scale(2.1); opacity: 0; } }

/* ---------- 结局 ---------- */
.ending { text-align: center; position: relative; z-index: 40; }
.big-lights { display: flex; justify-content: center; gap: 7px; margin: 10px 0 8px; }
.big-lights .led { width: 22px; height: 22px; }
.big-lights .led.new { width: 0; margin-right: -7px; opacity: 0; transition: all .6s cubic-bezier(.3, 1.6, .5, 1); }
.big-lights .led.new.show { width: 22px; margin-right: 0; opacity: 1; }
.big-lights .led.new.on {
  background: radial-gradient(circle at 36% 34%, #fff 0 18%, #ffe6a6 45%, #ffb347 100%);
  box-shadow: 0 0 10px rgba(255, 210, 120, 1), 0 0 30px rgba(255, 180, 90, .6);
}
.big-ver { font: 800 46px var(--mono); color: var(--led); text-shadow: 0 0 24px rgba(124, 247, 255, .6); margin: 6px 0 22px; letter-spacing: .02em; }
.big-ver.gold { color: #ffd98a; text-shadow: 0 0 24px rgba(255, 190, 90, .7); }
.end-lines { font-size: 19px; line-height: 2; min-height: 9em; }
.end-lines div { opacity: 0; transition: opacity .8s, transform .8s; transform: translateY(8px); }
.end-lines div.in { opacity: 1; transform: none; }
.end-lines b { color: #ffd98a; font-family: var(--mono); }
.end-lines .quote { font-size: 26px; font-weight: 800; color: #fff; margin: 6px 0; }
.end-lines .soft { color: #ffe0a0; text-shadow: 0 0 18px rgba(255, 200, 110, .8); font-size: 22px; font-weight: 700; }
.credits-wrap {
  position: relative; height: 62vh; overflow: hidden; margin-top: 4px;
  mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent);
  -webkit-mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent);
}
.credits { position: absolute; left: 0; right: 0; top: 100%; text-align: center; }
.credits .ct { font: 12px var(--mono); letter-spacing: .3em; color: var(--dim); margin-bottom: 26px; }
.credits h3 { font-size: 24px; margin: 0 0 36px; letter-spacing: .1em; }
.credits .row { margin-bottom: 26px; }
.credits .role { font-size: 12px; color: var(--dim); letter-spacing: .2em; }
.credits .who { font-size: 20px; font-weight: 600; }
.credits .me { margin: 40px 0 26px; }
.credits .me .who { color: var(--led); }
.credits .last { margin-top: 60px; font-size: 21px; line-height: 1.9; font-weight: 700; }
.credits .last b { color: #ffd98a; font-size: 26px; }

/* ---------- 揭晓页 ---------- */
.reveal { padding-bottom: 20px; }
.rv { opacity: 0; transform: translateY(14px); transition: opacity .7s, transform .7s; margin-bottom: 30px; }
.rv.in { opacity: 1; transform: none; }
.rv .num { font: 800 56px/1 var(--mono); }
.rv h3 { font-size: 18px; margin: 6px 0 14px; font-weight: 600; color: #d8dcff; }
.rv h3 b { color: #fff; }
.dots12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; }
.dot12 { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font: 700 9px var(--mono); color: rgba(0, 0, 0, .55); transform: scale(0); transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.rv.in .dot12 { transform: scale(1); }
.one { font-size: 24px; font-weight: 800; line-height: 1.5; }
.one.tie b { white-space: nowrap; }
.one.tie span { color: var(--faint); }
.bars { display: grid; gap: 9px; }
.bar { display: grid; grid-template-columns: 5.2em 1fr 2.2em; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; color: var(--dim); }
.bar.top { color: var(--c); }
.bar .cells { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.bar .cells i { height: 12px; border-radius: 4px; background: rgba(255, 255, 255, .07); transition: background .3s, box-shadow .3s; }
.rv.in .bar .cells i.on { background: var(--c); box-shadow: 0 0 8px var(--c); }
.bar .x { font: 700 15px var(--mono); text-align: right; color: var(--c); }
.bar .x.zero { color: var(--faint); }
.sp-name { font-size: clamp(46px, 14vw, 64px); font-weight: 900; letter-spacing: .08em; color: var(--c); text-shadow: 0 0 28px var(--c); margin: 4px 0 6px; }
.sp-def { font-size: 15px; line-height: 1.8; color: #c9cdf0; margin: 0 0 24px; }
.redeem { margin: 18px auto 0; max-width: 420px; padding: 12px 16px; border-radius: 14px; border: 1.5px dashed var(--c); background: rgba(255, 255, 255, .04); display: grid; gap: 2px; }
.redeem b { font-size: 15px; color: var(--c); }
.redeem span { font-size: 13px; color: var(--dim); }
.skip { position: fixed; right: max(14px, calc(50vw - 290px)); bottom: calc(var(--bot) + 16px); z-index: 25; font: 12px var(--mono); color: var(--dim); padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: rgba(5, 6, 15, .7); backdrop-filter: blur(6px); }

/* ---------- 掷骰子 ---------- */
.dice { text-align: center; }
.dice .hero { width: 170px; height: 170px; }
.dice p { font-size: 17px; margin: 8px 0; }
.dice .sub { color: var(--dim); font-size: 14px; }
.die-wrap { perspective: 700px; height: 150px; display: grid; place-items: center; margin: 18px 0 10px; }
.die { position: relative; width: 96px; height: 96px; transform-style: preserve-3d; transition: transform 1.8s cubic-bezier(.15, .7, .2, 1); }
.die .f {
  position: absolute; inset: 0; border-radius: 18px; display: grid; place-items: center;
  font-size: 22px; font-weight: 800; line-height: 1.2; color: var(--c);
  background: linear-gradient(145deg, #1d2150, #0d1030); border: 2px solid var(--c);
  box-shadow: 0 0 18px var(--c) inset, 0 0 12px rgba(0, 0, 0, .6);
  text-shadow: 0 0 10px var(--c);
}
.die .f1 { transform: translateZ(48px); }
.die .f2 { transform: rotateY(180deg) translateZ(48px); }
.die .f3 { transform: rotateY(90deg) translateZ(48px); }
.die .f4 { transform: rotateY(-90deg) translateZ(48px); }
.die .f5 { transform: rotateX(90deg) translateZ(48px); }
.die .f6 { transform: rotateX(-90deg) translateZ(48px); }
.die-res { min-height: 34px; font-size: 20px; font-weight: 800; opacity: 0; transition: opacity .5s; }
.die-res.in { opacity: 1; }

/* ---------- 结果卡 ---------- */
.result { text-align: center; }
.stage { position: relative; padding-top: 6px; }
.spot {
  position: absolute; left: 0; top: -140px; width: 100%; height: 130%;
  background: conic-gradient(from 180deg at 50% 0%, transparent 160deg, var(--spot, rgba(255, 255, 255, .2)) 172deg, var(--spot, rgba(255, 255, 255, .2)) 188deg, transparent 200deg);
  filter: blur(16px); opacity: 0; pointer-events: none; transition: opacity 1.2s ease .5s;
}
.stage.lit .spot { opacity: .9; }
.flip { position: relative; perspective: 1600px; width: min(100%, 420px); margin: 0 auto; }
.flip-in { position: relative; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.3, .9, .3, 1); }
.flip.back .flip-in { transform: rotateY(180deg); }
.flip .face { display: block; width: 100%; height: auto; border-radius: 20px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 60px var(--glow, rgba(143, 124, 255, .3)); }
.flip .face.b { position: absolute; inset: 0; transform: rotateY(180deg); pointer-events: none; }
.flip.back .face.b { pointer-events: auto; }
.flip.back .face.f { pointer-events: none; }
.drop { animation: drop 1.15s cubic-bezier(.2, .9, .25, 1.15) both; }
@keyframes drop {
  0% { transform: translateY(-115vh) rotate(-14deg); }
  70% { transform: translateY(14px) rotate(2deg); }
  85% { transform: translateY(-6px) rotate(-1deg); }
  100% { transform: none; }
}
.floor { width: 70%; height: 30px; margin: -8px auto 0; border-radius: 50%; background: radial-gradient(var(--spot, rgba(255, 255, 255, .25)), transparent 70%); filter: blur(6px); opacity: 0; transition: opacity 1s ease 1s; }
.stage.lit .floor { opacity: 1; }
.r-tip { font-size: 13px; color: var(--dim); margin: 16px 0 14px; }
.r-tip b { color: var(--ink); }
.actions { display: grid; gap: 10px; max-width: 420px; margin: 0 auto; }
.after { opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.after.in { opacity: 1; pointer-events: auto; }
.r-title { margin: 18px 0 0; }
.loading-card { padding: 120px 0; color: var(--dim); font: 13px var(--mono); letter-spacing: .2em; }

/* ---------- 弹窗 / 提示 ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: rgba(3, 4, 12, .72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: enter .3s ease; }
.modal[hidden] { display: none; }
.modal .box { max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow-y: auto; width: min(100%, 380px); padding: 26px 22px 20px; border-radius: 22px; text-align: center; background: linear-gradient(160deg, #1a1d48, #0d0f2a); border: 1px solid rgba(143, 124, 255, .4); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.modal .box .em { font-size: 34px; }
.modal .box p { font-size: 17px; line-height: 1.8; margin: 10px 0 20px; }
.modal .box img { width: auto; max-width: 100%; max-height: 62vh; display: block; margin: 0 auto 12px; border-radius: 12px; }
#toast { position: fixed; left: 50%; bottom: calc(var(--bot) + 80px); z-index: 70; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 18px; border-radius: 99px; background: rgba(238, 241, 255, .95); color: #05060f; font-size: 14px; font-weight: 600; transition: all .3s; white-space: nowrap; }
#toast.in { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 桌面端 ---------- */
@media (min-width: 720px) {
  #app { padding-top: calc(var(--top) + 96px); }
  .hero { width: 260px; height: 260px; }
  .q-text { font-size: 19.5px; }
  .opt { font-size: 16px; padding: 16px 18px; }
  .led { width: 16px; height: 16px; }
  .lights { gap: 8px; }
}
@media (max-width: 360px) {
  .led { width: 12px; height: 12px; }
  .lights { gap: 4px; }
  .q-text { font-size: 17px; }
  .opt { font-size: 15px; }
  .big-lights { gap: 5px; }
  .big-lights .led, .big-lights .led.new.show { width: 18px; height: 18px; }
}
/* 矮屏（小屏 iPhone、微信内置浏览器）：首页把输入框和开始按钮收进第一屏 */
@media (max-height: 760px) {
  .home .button-orb { width: 88px; height: 88px; margin: 22px auto 18px; }
  .home h1 { font-size: clamp(64px, 20vw, 84px); margin-bottom: 12px; }
  .intro { font-size: 14.5px; line-height: 1.72; margin-bottom: 16px; }
  .intro p { margin-bottom: 6px; }
}
@media (max-height: 620px) {
  .home .button-orb { width: 64px; height: 64px; margin: 14px auto 10px; }
  .home h1 { font-size: 60px; margin-bottom: 8px; }
  .intro { font-size: 14px; line-height: 1.65; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; transition-duration: .01s !important; }
}
