/* 迷雾寻路 · Tìm Đường Trong Sương — 界面样式（竖屏优先，电脑上居中显示）。神秘但友好的夜雾森林：紫色迷雾 + 金色灯光 + 青色魔法 */
:root {
  --bg-top: #2b2060;
  --bg-mid: #1c1548;
  --bg-bot: #0e0a26;
  --ink: #f6f2ff;
  --ink-2: #d4cbf2;
  --muted: #9b91c6;
  --gold: #ffd36e;
  --gold-2: #e9a744;
  --cyan: #8fe3ff;
  --mint: #9ff0c4;
  --rose: #ff6f8e;
  --panel: rgba(34, 25, 80, 0.74);
  --panel-2: rgba(52, 40, 112, 0.84);
  --line: rgba(214, 200, 255, 0.18);
  --shadow: 0 18px 50px rgba(6, 3, 22, 0.55);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --head: 'Baloo 2', 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  color: var(--ink);
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background:
    radial-gradient(ellipse at 80% 4%, rgba(200, 210, 255, 0.22), transparent 40%),
    radial-gradient(ellipse at 15% 30%, rgba(150, 110, 255, 0.28), transparent 55%),
    radial-gradient(ellipse at 50% 110%, rgba(120, 200, 255, 0.16), transparent 55%),
    linear-gradient(180deg, var(--bg-top), var(--bg-mid) 55%, var(--bg-bot));
  background-color: var(--bg-mid);
  background-attachment: fixed;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: 0.4; cursor: default; }
[hidden] { display: none !important; }
svg.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }

/* GPT 背景图（竖屏 / 横屏各一张），上面再压一层暗色，保证棋盘和文字清晰；没有背景图时显示上面的渐变 */
.bgArt {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 12, 56, 0.28), rgba(12, 8, 34, 0.55)), url(../assets/art/bg-portrait.jpg) center / cover no-repeat;
}
@media (orientation: landscape) {
  .bgArt { background-image: linear-gradient(180deg, rgba(20, 12, 56, 0.28), rgba(12, 8, 34, 0.55)), url(../assets/art/bg-landscape.jpg); }
}
#fx { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
#app { position: fixed; inset: 0; max-width: 640px; margin: 0 auto; z-index: 2; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; padding: calc(10px + var(--safe-t)) 16px calc(10px + var(--safe-b)); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 22px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--ink);
  font-weight: 800; font-size: 15px; letter-spacing: 0.2px;
  box-shadow: 0 8px 22px rgba(6, 3, 22, 0.35);
}
.btn.primary {
  border: 0; color: #2c1606;
  background: linear-gradient(180deg, #fff0b8, var(--gold) 45%, var(--gold-2));
  box-shadow: 0 10px 26px rgba(255, 196, 90, 0.32), inset 0 -3px 0 rgba(150, 90, 20, 0.35);
}
.btn.ghost { background: transparent; box-shadow: none; }
a.btn { text-decoration: none; }
.btn.lg { min-height: 54px; font-size: 17px; border-radius: 18px; }
.btn:focus-visible, .iconBtn:focus-visible, .tool:focus-visible, .lvCard:focus-visible, .langSwitch button:focus-visible, #board:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.iconBtn {
  width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--panel);
}
.iconSpacer { width: 44px; flex: none; }
[data-act="sound"] .ico.off, [data-act="sound"].off .ico.on, [data-act="music"] .ico.off, [data-act="music"].off .ico.on { display: none; }
[data-act="sound"].off .ico.off, [data-act="music"].off .ico.off { display: block; }
.topBtns { display: flex; gap: 8px; }

/* ---------- 首页 ---------- */
.homeScreen { align-items: center; justify-content: space-between; text-align: center; }
.homeTop { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.homeTop .topBtns { margin-left: auto; }
.langSwitch { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.langSwitch button { border: 0; background: transparent; padding: 8px 14px; min-height: 36px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.langSwitch button[aria-pressed="true"] { background: var(--gold); color: #2c1606; }
.homeHero { display: flex; flex-direction: column; align-items: center; }
.logoWrap {
  width: min(48vw, 196px); aspect-ratio: 1; border-radius: 28%; overflow: hidden;
  box-shadow: 0 0 0 2px rgba(255, 226, 150, 0.6), 0 0 60px rgba(170, 130, 255, 0.55), var(--shadow);
  animation: float 4.5s ease-in-out infinite, logoGlow 3.4s ease-in-out infinite;
}
.logoWrap img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.015); }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes logoGlow { 50% { box-shadow: 0 0 0 2px rgba(255, 226, 150, 0.85), 0 0 80px rgba(255, 210, 120, 0.6), 0 18px 50px rgba(6, 3, 22, 0.55); } }
.homeHero h1 {
  margin: 24px 0 0; font-family: var(--head); font-size: clamp(32px, 9.4vw, 46px); font-weight: 800; letter-spacing: -0.3px; line-height: 1.1;
  background: linear-gradient(180deg, #fff, #ffe8a6 62%, #f2b45a); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 18px rgba(255, 200, 100, 0.35));
}
.subtitle { margin: 12px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; max-width: 330px; }
.homeActions { width: min(340px, 100%); display: flex; flex-direction: column; gap: 12px; }
.homeProgress { margin: 4px 0 0; color: var(--gold); font-weight: 700; font-size: 14px; min-height: 20px; }

/* ---------- 顶栏 ---------- */
.hud { display: flex; align-items: center; gap: 10px; }
.hudTitle { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hudTitle small { color: var(--gold); font-weight: 800; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; }
.hudTitle strong { font-family: var(--head); font-size: 20px; font-weight: 800; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.levelsScreen .hudTitle small { text-transform: none; letter-spacing: 0; }

/* ---------- 选关 ---------- */
.levelGrid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px 2px 8px; align-content: start; }
.lvCard {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; overflow: hidden;
  min-height: 108px; padding: 14px; border-radius: 18px; border: 1px solid var(--line);
  background: radial-gradient(ellipse at 85% 80%, rgba(255, 214, 140, 0.12), transparent 55%), linear-gradient(160deg, rgba(74, 58, 150, 0.78), rgba(30, 22, 78, 0.88));
  box-shadow: var(--shadow);
}
.lvCard.done { border-color: rgba(255, 226, 150, 0.38); }
.lvNum { font-family: var(--head); font-size: 28px; font-weight: 800; color: var(--gold); line-height: 1; }
.lvName { font-weight: 800; font-size: 14.5px; line-height: 1.3; padding-right: 8px; }
.lvStars { display: flex; gap: 2px; margin-top: auto; }
.lvCard.locked { opacity: 0.55; background: rgba(28, 20, 66, 0.82); }
.lvCard.locked .lvNum { color: var(--muted); }
.lvCard .lvArt { position: absolute; right: -6px; bottom: -6px; width: 74px; height: 74px; object-fit: contain; opacity: 0.9; pointer-events: none; filter: drop-shadow(0 4px 10px rgba(6, 3, 22, 0.6)); }
.lvCard .lvNum, .lvCard .lvName, .lvCard .lvStars, .lvCard .lock { position: relative; z-index: 1; }
.lvCard.done .lvName { text-shadow: 0 2px 8px rgba(6, 3, 22, 0.9); }
svg.lock { position: absolute; right: 12px; top: 12px; width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lvCard svg.lock { position: absolute; }
svg.star { width: 18px; height: 18px; fill: rgba(255, 255, 255, 0.14); stroke: rgba(255, 255, 255, 0.25); stroke-width: 1; stroke-linejoin: round; }
svg.star.on { fill: var(--gold); stroke: #fff2c4; filter: drop-shadow(0 0 6px rgba(255, 210, 110, 0.7)); }

/* ---------- 游戏 ---------- */
.gameScreen { padding-bottom: calc(8px + var(--safe-b)); padding-left: 4px; padding-right: 4px; }
.gameScreen .hud, .gameScreen .tools { margin-left: 12px; margin-right: 12px; }
.hudStats { display: flex; justify-content: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; min-height: 32px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); font-weight: 700; }
.pill b { color: var(--ink); font-size: 15px; }
.pill.gold { color: var(--gold); border-color: rgba(255, 211, 110, 0.35); }
.lamps { display: inline-flex; gap: 2px; }
svg.lamp { width: 22px; height: 22px; overflow: visible; }
svg.lamp .lr { fill: none; stroke: #8c84aa; stroke-width: 1.6; }
svg.lamp .lh { fill: #5b4f80; }
svg.lamp .lb { fill: #4d4668; }
svg.lamp.on .lr { stroke: #f2c35a; }
svg.lamp.on .lh { fill: #7d4fcf; }
svg.lamp.on .lb { fill: #ffe9a0; filter: drop-shadow(0 0 4px rgba(255, 210, 110, 0.95)); animation: lampFlick 2.6s ease-in-out infinite; }
svg.lamp.on:nth-child(2) .lb { animation-delay: -0.9s; }
svg.lamp.on:nth-child(3) .lb { animation-delay: -1.7s; }
@keyframes lampFlick { 50% { fill: #fff6d0; } 60% { fill: #ffdf86; } }
svg.lamp.lose { animation: lampLose 0.8s ease; }
@keyframes lampLose { 0% { transform: scale(1.5); } 30% { transform: scale(1.2) rotate(-12deg); filter: drop-shadow(0 0 8px rgba(255, 90, 100, 0.9)); } 100% { transform: none; } }
.boardWrap { flex: 1; min-height: 0; display: grid; place-items: center; padding: 4px 0; }
#board { display: block; touch-action: none; -webkit-touch-callout: none; cursor: pointer; filter: drop-shadow(0 18px 40px rgba(6, 3, 22, 0.55)); }
.tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 46px 46px; gap: 6px; }
/* 音效 / 音乐开关只显示图标（文字留给读屏） */
.tool[data-act="sound"] span, .tool[data-act="music"] span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tool {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 58px; padding: 0 2px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel);
  font-size: 11.5px; font-weight: 700; color: var(--ink-2);
}
.tool .ico { width: 22px; height: 22px; color: var(--ink); }
.tool[data-act="hint"] .ico { color: var(--gold); }
.tool[data-act="mark"] .ico { color: var(--rose); }
.tool.on { background: rgba(255, 111, 142, 0.22); border-color: rgba(255, 111, 142, 0.75); color: #ffd6df; box-shadow: 0 0 18px rgba(255, 111, 142, 0.35); }
.tool.off .ico { color: var(--muted); }
.tool span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tool.pulse { animation: toolPulse 0.9s ease 3; }
@keyframes toolPulse { 50% { background: rgba(255, 211, 110, 0.28); border-color: var(--gold); transform: scale(1.06); } }

/* ---------- 弹层 ---------- */
.overlay { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(10, 5, 30, 0.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeIn 0.2s ease; overflow-y: auto; }
@keyframes fadeIn { from { opacity: 0; } }
.tipCard, .winCard {
  width: min(420px, 100%); border-radius: 22px; padding: 20px 22px 22px; text-align: center; margin: 36px auto auto;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 214, 140, 0.16), transparent 60%), linear-gradient(170deg, rgba(74, 56, 158, 0.97), rgba(34, 24, 88, 0.98));
  border: 1px solid rgba(255, 226, 150, 0.45); box-shadow: var(--shadow), 0 0 50px rgba(150, 110, 255, 0.35);
  animation: pop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.overlay > .tipCard, .overlay > .winCard { margin: auto; }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } }
.robot { width: 96px; height: 96px; margin: -60px auto 0; display: block; object-fit: contain; filter: drop-shadow(0 0 18px rgba(255, 210, 120, 0.6)) drop-shadow(0 10px 14px rgba(6, 3, 22, 0.5)); animation: float 3s ease-in-out infinite; }
.tipBody small, .winCard small { color: var(--gold); font-weight: 800; font-size: 12px; letter-spacing: 1px; }
.tipBody h2, .winCard h2 { margin: 4px 0 8px; font-family: var(--head); font-size: 23px; font-weight: 800; line-height: 1.2; }
.tipBody p, .winCard p { margin: 0 0 14px; color: var(--ink-2); line-height: 1.6; font-size: 15px; white-space: pre-line; }
.tipDemo { display: block; margin: 4px auto 12px; max-width: 100%; }
.tipBody .tipRules { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }
.tipCard .btn { min-width: 160px; }
.winOverlay { position: fixed; }
.winStars { display: flex; justify-content: center; gap: 10px; margin: 6px 0 4px; }
.winStars svg.star { width: 50px; height: 50px; }
.winStars svg.star:nth-child(2) { transform: translateY(-10px); }
.winStars svg.star.pop { animation: starPop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.5); }
.winStars svg.star:nth-child(2).pop { animation-name: starPop2; }
@keyframes starPop { from { transform: scale(0.2) rotate(-40deg); } }
@keyframes starPop2 { from { transform: translateY(-10px) scale(0.2) rotate(-40deg); } }
.winBtns { display: flex; flex-direction: column; gap: 10px; }
.winCardArt { width: 112px; height: 112px; margin: 6px auto 0; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, rgba(255, 226, 150, 0.35), rgba(255, 226, 150, 0) 70%); animation: pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4) both, treasureGlow 2.4s ease-in-out infinite; }
.winCardArt img { width: 104px; height: 104px; object-fit: contain; display: block; animation: float 3.2s ease-in-out infinite; }
@keyframes treasureGlow { 50% { box-shadow: 0 0 34px rgba(255, 214, 140, 0.45); } }
.failRobot { filter: grayscale(0.7) brightness(0.7) drop-shadow(0 10px 14px rgba(6, 3, 22, 0.5)); animation: failSway 2.6s ease-in-out infinite; }
@keyframes failSway { 50% { transform: translateY(4px) rotate(-6deg); } }
.failCard { border-color: rgba(200, 180, 255, 0.4); }
.finaleCard { width: min(460px, 100%); }
.finaleRewards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 4px 0 10px; }
.finaleRewards img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 14px; background: rgba(255, 226, 150, 0.08); animation: pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.5) both; }
.finaleRewards img.missing { filter: grayscale(1) brightness(0.5); }
.finaleStars { color: var(--gold) !important; font-weight: 800; }

/* ---------- 提示条 ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); z-index: 40; transform: translate(-50%, 20px);
  width: max-content; max-width: min(92vw, 460px); padding: 11px 18px; border-radius: 14px;
  background: rgba(22, 14, 54, 0.95); border: 1px solid rgba(143, 227, 255, 0.4); color: var(--ink);
  font-size: 14px; line-height: 1.5; text-align: center; white-space: pre-line;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
/* V004：游戏里提示条放在顶栏（关卡名 + 灯 / 陷阱小牌）下面，不再盖住棋盘最下面几行（起点和最早的线索都在那里） */
/* V005：竖屏时 top 由 main.js 按顶栏实际下沿设置（小牌换行时顶栏变高）；这里的 100px 只是取不到时的后备 */
.toast.top { top: calc(100px + var(--safe-t)); bottom: auto; transform: translate(-50%, -14px); }
.toast.top.show { transform: translate(-50%, 0); }
/* 电脑横屏：棋盘在正中、顶上第一行离顶栏很近 → 提示条放在棋盘左边的空处 */
@media (orientation: landscape) and (min-width: 900px) {
  .toast.top { left: 24px; top: 50%; max-width: min(300px, calc(50vw - 300px)); text-align: left; transform: translate(-12px, -50%); }
  .toast.top.show { transform: translate(0, -50%); }
}

/* ---------- 尺寸适配 ---------- */
@media (min-width: 560px) {
  .levelGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tool { font-size: 12.5px; }
  .tools { grid-template-columns: repeat(4, minmax(0, 1fr)) 58px 58px; }
}
@media (max-height: 680px) {
  .homeHero h1 { margin-top: 14px; }
  .logoWrap { width: min(36vw, 132px); }
  .tool { min-height: 52px; }
  .hudStats { margin-top: 5px; }
  .pill { min-height: 28px; padding: 3px 10px; }
}
@media (max-width: 380px) {
  .gameScreen .tools { margin-left: 6px; margin-right: 6px; gap: 4px; grid-template-columns: repeat(4, minmax(0, 1fr)) 44px 44px; }
  .tool { font-size: 10.5px; }
  .pill { font-size: 12px; padding: 4px 9px; }
}

/* ---------- 动效：按钮悬停与点击 / 画面切换 ---------- */
.btn, .iconBtn, .tool, .lvCard, .langSwitch button { position: relative; overflow: hidden; -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s, background-color 0.2s, border-color 0.2s, filter 0.2s; }
@media (hover: hover) {
  .btn:hover:not(:disabled), .iconBtn:hover, .tool:hover:not(:disabled), .lvCard:hover:not(.locked), .langSwitch button:hover {
    transform: translateY(-2px);
    border-color: rgba(190, 170, 255, 0.6);
    box-shadow: 0 10px 26px rgba(6, 3, 22, 0.45), 0 0 18px rgba(190, 170, 255, 0.4);
  }
  .btn.primary:hover { filter: brightness(1.05); box-shadow: 0 12px 30px rgba(255, 196, 90, 0.4), 0 0 22px rgba(255, 220, 140, 0.45); }
  .btn::after, .iconBtn::after, .tool::after, .lvCard::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.3) 50%, transparent 68%);
    transform: translateX(-130%);
  }
  .btn:hover:not(:disabled)::after, .iconBtn:hover::after, .tool:hover:not(:disabled)::after, .lvCard:hover:not(.locked)::after { animation: sheen 0.75s ease; }
  .tool:hover:not(:disabled) .ico { animation: icoBounce 0.5s ease; }
}
@keyframes sheen { to { transform: translateX(130%); } }
@keyframes icoBounce { 40% { transform: translateY(-3px) scale(1.12); } }
.btn:active:not(:disabled), .iconBtn:active, .tool:active:not(:disabled), .lvCard:active:not(.locked), .langSwitch button:active { transform: scale(0.94); transition-duration: 0.08s; }
/* 点击水波纹（暖色灯光） */
.ripple { position: absolute; border-radius: 50%; pointer-events: none; transform: scale(0); z-index: 0;
  background: radial-gradient(circle, rgba(255, 240, 200, 0.6), rgba(200, 170, 255, 0.25) 45%, rgba(200, 170, 255, 0) 70%); animation: ripple 0.6s ease-out forwards; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
.screen:not([hidden]) { animation: screenIn 0.38s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes screenIn { from { opacity: 0; transform: translateY(14px); } }
.lvCard { animation: cardIn 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.25) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(0.92); } }
.pill b.bump { display: inline-block; animation: bump 0.35s ease; }
@keyframes bump { 40% { transform: scale(1.45); color: var(--gold); } }

/* ===================== 加载页：灯灵沿雾中石板小路前进，雾气随进度散开 ===================== */
body.booting #app { display: none; }
body.booting #fx, body.booting .bgArt { visibility: hidden; }
.boot { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px 20px calc(24px + var(--safe-b)); overflow: hidden;
  background: radial-gradient(ellipse at 50% 36%, rgba(255, 200, 120, 0.2), transparent 45%),
    radial-gradient(ellipse at 80% 0%, rgba(200, 210, 255, 0.25), transparent 45%),
    radial-gradient(ellipse at 20% 80%, rgba(140, 100, 255, 0.3), transparent 55%),
    linear-gradient(180deg, #2a1f60, #171142 60%, #0b0820);
  transition: opacity 0.6s ease, transform 0.6s ease; }
.boot.leave { opacity: 0; transform: scale(1.04); pointer-events: none; }
.bootMist { position: absolute; inset: 0; pointer-events: none; }
.bootMist i { position: absolute; width: 140%; height: 34%; left: -20%; border-radius: 50%; filter: blur(30px);
  background: radial-gradient(ellipse, rgba(214, 200, 255, 0.32), rgba(190, 170, 250, 0.08) 60%, transparent 72%); animation: mist 16s ease-in-out infinite alternate; }
.bootMist i:nth-child(1) { top: 6%; }
.bootMist i:nth-child(2) { top: 52%; animation-duration: 21s; animation-direction: alternate-reverse; opacity: 0.8; }
.bootMist i:nth-child(3) { top: 78%; animation-duration: 13s; opacity: 0.9; }
@keyframes mist { from { transform: translateX(-8%); } to { transform: translateX(8%); } }
.bootInner { position: relative; width: min(360px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; }
.bootStage { position: relative; width: 190px; height: 190px; display: grid; place-items: center; margin-bottom: 10px; }
.bootStage::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 214, 140, 0.45), rgba(255, 190, 110, 0.12) 50%, transparent 70%); animation: halo 2.6s ease-in-out infinite; }
@keyframes halo { 50% { transform: scale(1.08); opacity: 0.75; } }
#bootGuide { position: relative; width: 170px; height: 170px; object-fit: contain; filter: drop-shadow(0 0 16px rgba(255, 210, 120, 0.6)); animation: float 3.2s ease-in-out infinite; }
.boot.hasGuide .bootLantern { display: none; }
/* CSS 画的灯灵：紫色铃铛帽 + 金环 + 发光小幽灵 */
.bootLantern { position: relative; width: 120px; height: 150px; animation: float 3.2s ease-in-out infinite; }
.blRing { position: absolute; left: 50%; top: 0; width: 22px; height: 22px; margin-left: -11px; border: 4px solid #f2c35a; border-radius: 50%; }
.blHat { position: absolute; left: 50%; top: 17px; width: 112px; height: 50px; margin-left: -56px; z-index: 2;
  background: linear-gradient(140deg, #a57ae8, #6d43b8 50%, #3f2380); border-radius: 56px 56px 12px 12px / 46px 46px 12px 12px;
  box-shadow: inset 0 -7px 0 #e8b14a, inset 0 -10px 0 rgba(255, 224, 138, 0.5); }
.blHat::after { content: ""; position: absolute; left: 22px; top: 10px; width: 26px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); transform: rotate(-20deg); }
.blBody { position: absolute; left: 50%; top: 52px; width: 86px; height: 86px; margin-left: -43px; z-index: 1;
  background: radial-gradient(circle at 45% 38%, #fffdf2, #fff1c2 52%, #ffd36e); border-radius: 46% 46% 50% 50% / 42% 42% 58% 58%;
  box-shadow: 0 0 34px rgba(255, 205, 110, 0.9), 0 0 90px rgba(255, 190, 90, 0.45); animation: glowFlick 2.2s ease-in-out infinite; }
.blBody::after { content: ""; position: absolute; right: -6px; bottom: -8px; width: 34px; height: 24px; border-radius: 0 0 60% 40% / 0 0 100% 60%;
  background: #ffe39a; transform: rotate(-24deg); box-shadow: 0 0 18px rgba(255, 205, 110, 0.7); animation: tail 1.6s ease-in-out infinite; }
.blBody i { position: absolute; top: 36px; width: 9px; height: 13px; border-radius: 50%; background: #2a1d3a; animation: blink 4s infinite; }
.blBody i:first-child { left: 27px; }
.blBody i:last-child { right: 27px; }
@keyframes glowFlick { 50% { box-shadow: 0 0 44px rgba(255, 215, 120, 1), 0 0 110px rgba(255, 190, 90, 0.55); } 60% { box-shadow: 0 0 30px rgba(255, 205, 110, 0.8), 0 0 80px rgba(255, 190, 90, 0.4); } }
@keyframes tail { 50% { transform: rotate(-8deg) translateX(3px); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(0.1); } }
.bootTitle { font-family: var(--head); font-size: clamp(28px, 8.6vw, 36px); font-weight: 800; line-height: 1.15; margin-bottom: 20px;
  background: linear-gradient(180deg, #fff6d6, var(--gold) 58%, var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 12px rgba(255, 211, 110, 0.35)); }
/* 进度条：一条雾中的石板小路，五块石板依次散雾亮起，小灯灵跟着往前飘 */
.bootTrack { position: relative; width: calc(100% - 28px); height: 8px; border-radius: 8px; background: rgba(214, 200, 255, 0.14); margin: 22px 0 16px; }
.bootFill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 8px; transition: width 0.35s ease;
  background: linear-gradient(90deg, rgba(255, 214, 140, 0.4), var(--gold)); box-shadow: 0 0 14px rgba(255, 211, 110, 0.8); }
.bootTrack i { position: absolute; top: 50%; width: 24px; height: 18px; margin: -9px 0 0 -12px; border-radius: 6px; background: #5b5578; box-shadow: 0 3px 0 #2a2440; transition: background 0.4s, box-shadow 0.4s; }
.bootTrack i::after { content: ""; position: absolute; inset: -10px -12px; border-radius: 50%; background: radial-gradient(ellipse, rgba(232, 224, 255, 0.85), rgba(200, 186, 250, 0.3) 55%, transparent 72%); transition: opacity 0.6s, transform 0.6s; }
.bootTrack i:nth-of-type(1) { left: 0; } .bootTrack i:nth-of-type(2) { left: 25%; } .bootTrack i:nth-of-type(3) { left: 50%; }
.bootTrack i:nth-of-type(4) { left: 75%; } .bootTrack i:nth-of-type(5) { left: 100%; }
.bootTrack i.on { background: #8e86b2; box-shadow: 0 3px 0 #3a3356, 0 0 14px rgba(255, 211, 110, 0.75); }
.bootTrack i.on::after { opacity: 0; transform: scale(1.8); }
.bootWalker { position: absolute; top: -30px; left: calc(var(--p, 0) * 100%); width: 30px; height: 34px; margin-left: -15px; transition: left 0.35s ease; z-index: 2; animation: float 1.6s ease-in-out infinite; }
.bootWalker .blHat { top: 0; width: 30px; height: 14px; margin-left: -15px; border-radius: 15px 15px 4px 4px / 12px 12px 4px 4px; box-shadow: inset 0 -3px 0 #e8b14a; }
.bootWalker .blHat::after { display: none; }
.bootWalker .blBody { top: 10px; width: 22px; height: 22px; margin-left: -11px; box-shadow: 0 0 12px rgba(255, 205, 110, 0.95); }
.bootWalker .blBody::after { width: 9px; height: 7px; right: -2px; bottom: -3px; }
.bootPct { font-weight: 800; font-size: 15px; color: var(--gold); font-variant-numeric: tabular-nums; }
.bootTip { margin: 6px 0 18px; min-height: 1.5em; color: var(--ink-2); font-size: 14px; }
.bootGo { min-width: 200px; animation: bootPulse 1.6s ease-in-out infinite; }
.boot.ready .bootPct { opacity: 0.6; }
@keyframes bootPulse { 50% { box-shadow: 0 0 0 4px rgba(255, 211, 110, 0.25), 0 0 34px rgba(255, 211, 110, 0.55); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* 调试截图用（?debug=1&still=1）：动画直接跳到结束状态 */
html.still *, html.still *::before, html.still *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition: none !important; }
