/* 云岛搭桥 · Bắc Cầu Đảo Mây — 界面样式（竖屏优先，电脑上居中显示）。明亮的天空 + 白色玻璃面板 + 金色主按钮 + 紫色描边标题 */
:root {
  --sky-top: #3fa6f2;
  --sky-mid: #86ccff;
  --sky-bot: #d8f1ff;
  --ink: #1d2858;
  --ink-2: #3d4b86;
  --muted: #8592bd;
  --purple: #5c41c9;
  --purple-2: #8466f0;
  --gold: #ffd03d;
  --gold-2: #f6a21c;
  --green: #4cbf62;
  --cyan: #2fa8ee;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-2: rgba(255, 255, 255, 0.94);
  --line: rgba(70, 92, 190, 0.18);
  --shadow: 0 14px 34px rgba(26, 60, 130, 0.22);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --title-font: 'Baloo 2', 'Be Vietnam Pro', system-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 18% 8%, rgba(255, 255, 255, 0.55), transparent 45%),
    radial-gradient(ellipse at 85% 22%, rgba(255, 250, 220, 0.45), transparent 40%),
    linear-gradient(180deg, var(--sky-top), var(--sky-mid) 55%, var(--sky-bot));
  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.45; 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(255, 255, 255, 0.05), rgba(220, 240, 255, 0.25)), url(../assets/art/bg-portrait.jpg) center / cover no-repeat;
}
@media (orientation: landscape) {
  .bgArt { background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(220, 240, 255, 0.25)), 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: 2px solid rgba(255, 255, 255, 0.9); background: var(--panel-2); color: var(--purple);
  font-weight: 800; font-size: 15px; letter-spacing: 0.2px;
  box-shadow: 0 6px 0 rgba(92, 65, 201, 0.18), 0 10px 22px rgba(26, 60, 130, 0.18);
}
.btn.primary, .btn.go {
  border: 0; color: #4a2a00;
  background: linear-gradient(180deg, #fff3a8, var(--gold) 45%, var(--gold-2));
  box-shadow: 0 6px 0 #c97a10, 0 12px 24px rgba(246, 162, 28, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn.ghost { background: rgba(255, 255, 255, 0.35); box-shadow: none; color: var(--ink); }
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 { outline: 3px solid var(--purple-2); outline-offset: 2px; }
.iconBtn {
  width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.9); background: var(--panel); color: var(--purple);
  box-shadow: 0 4px 12px rgba(26, 60, 130, 0.16);
}
.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: 2px solid rgba(255, 255, 255, 0.9); box-shadow: 0 4px 12px rgba(26, 60, 130, 0.14); }
.langSwitch button { border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; font-weight: 800; font-size: 13px; color: var(--ink-2); }
.langSwitch button[aria-pressed="true"] { background: linear-gradient(180deg, var(--purple-2), var(--purple)); color: #fff; }
.homeHero { display: flex; flex-direction: column; align-items: center; }
.logoWrap {
  width: min(48vw, 200px); aspect-ratio: 1; border-radius: 26%; overflow: hidden;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.95), 0 0 0 7px rgba(132, 102, 240, 0.55), 0 0 50px rgba(255, 255, 255, 0.7), var(--shadow);
}
.logoWrap img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.015); }
@keyframes float { 50% { transform: translateY(-8px); } }
.homeHero h1 {
  margin: 24px 0 0; font-family: var(--title-font); font-size: clamp(36px, 10.5vw, 52px); font-weight: 800; line-height: 1.05; letter-spacing: 0;
  color: #fff;
  text-shadow: 0 2px 0 var(--purple), 2px 0 0 var(--purple), -2px 0 0 var(--purple), 0 -2px 0 var(--purple),
    2px 2px 0 var(--purple), -2px 2px 0 var(--purple), 2px -2px 0 var(--purple), -2px -2px 0 var(--purple), 0 7px 0 #3a2896, 0 10px 22px rgba(40, 20, 120, 0.4);
}
.subtitle {
  display: inline-block; margin: 16px 0 0; padding: 7px 16px; border-radius: 999px; color: #fff; font-weight: 700; font-size: 14px;
  background: linear-gradient(180deg, var(--purple-2), var(--purple)); box-shadow: 0 4px 0 #3a2896, 0 8px 18px rgba(60, 30, 160, 0.3);
}
.homeActions { width: min(340px, 100%); display: flex; flex-direction: column; gap: 14px; }
.homeProgress { margin: 2px 0 0; color: var(--ink); font-weight: 800; font-size: 14px; min-height: 20px; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); }

/* ---------- 顶栏 ---------- */
.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(--purple); font-weight: 800; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9); }
.hudTitle strong {
  font-family: var(--title-font); font-size: 22px; font-weight: 800; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  color: #fff; text-shadow: 0 2px 0 var(--purple), 1px 0 0 var(--purple), -1px 0 0 var(--purple), 0 -1px 0 var(--purple), 0 4px 10px rgba(40, 20, 120, 0.35);
}
.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;
  min-height: 112px; padding: 14px; border-radius: 20px; border: 2px solid rgba(255, 255, 255, 0.95);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(222, 240, 255, 0.88)); box-shadow: var(--shadow);
  overflow: hidden;
}
.lvCard.done { border-color: #ffe27a; }
.lvNum { font-family: var(--title-font); font-size: 30px; font-weight: 800; color: var(--purple); line-height: 1; }
.lvName { font-weight: 800; font-size: 14.5px; line-height: 1.3; color: var(--ink); }
.lvStars { display: flex; gap: 2px; margin-top: auto; }
.lvCard.locked { opacity: 0.7; background: rgba(230, 238, 252, 0.7); }
.lvCard.locked .lvNum { color: var(--muted); }
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; }
svg.star { width: 18px; height: 18px; fill: rgba(80, 100, 170, 0.18); stroke: rgba(80, 100, 170, 0.3); stroke-width: 1; stroke-linejoin: round; }
svg.star.on { fill: var(--gold); stroke: #e58a00; filter: drop-shadow(0 0 4px rgba(255, 190, 40, 0.8)); }
/* 已通关：卡片右侧显示这一关的“旅行明信片” */
.lvCard .lvArt { position: absolute; right: -4px; bottom: -4px; width: 50%; height: auto; border-radius: 12px; opacity: 0.95; pointer-events: none;
  transform: rotate(-6deg); box-shadow: 0 6px 14px rgba(26, 60, 130, 0.25); border: 3px solid #fff; }
.lvCard .lvNum, .lvCard .lvName, .lvCard .lvStars { position: relative; z-index: 1; }
.lvCard.done .lvName { max-width: 54%; text-shadow: 0 1px 0 #fff, 0 0 6px #fff; }
.lvCard .lock { z-index: 1; }

/* ---------- 游戏 ---------- */
.gameScreen { padding-bottom: calc(8px + var(--safe-b)); }
.hudStats { display: flex; justify-content: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; background: var(--panel); border: 2px solid rgba(255, 255, 255, 0.9); font-size: 12.5px; color: var(--ink-2); font-weight: 700; box-shadow: 0 3px 10px rgba(26, 60, 130, 0.12); }
.pill b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.pill svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pill.plank { color: #8a5a22; }
.pill.plank b.low { color: #d0451b; }
.pill.crystal { color: #1f8fd6; }
.pill.crystal svg { fill: #8fd8ff; stroke: #1f8fd6; }
.pill.gold { color: #9a5b00; background: rgba(255, 244, 196, 0.9); }
/* V004：队伍人数（限重岛 / 同伴关显示） */
.pill.party { color: #6a46d8; }
.pill.party svg { fill: #c9b8ff; stroke: #6a46d8; }
.pill.party.full b { color: #d0451b; }
.boardWrap { flex: 1; min-height: 0; display: grid; place-items: center; padding: 4px 0; }
#board { display: block; touch-action: none; cursor: pointer; }
.goBar { display: flex; justify-content: center; margin: 2px 0 8px; }
.btn.go { min-width: min(240px, 70%); font-family: var(--title-font); font-size: 21px; letter-spacing: 0.3px; padding-top: 8px; padding-bottom: 8px; }
.btn.go svg.ico { width: 24px; height: 24px; fill: #6b3d00; stroke: none; }
.btn.go.ready { animation: goPulse 1.3s ease-in-out infinite; }
@keyframes goPulse { 50% { box-shadow: 0 6px 0 #c97a10, 0 0 0 6px rgba(255, 220, 90, 0.45), 0 12px 30px rgba(246, 162, 28, 0.55), inset 0 2px 0 rgba(255, 255, 255, 0.7); } }
.tools { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.tool {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 58px; border-radius: 16px; border: 2px solid rgba(255, 255, 255, 0.9); background: var(--panel);
  font-size: 12px; font-weight: 800; color: var(--ink-2); box-shadow: 0 4px 12px rgba(26, 60, 130, 0.12);
}
.tool .ico { width: 22px; height: 22px; color: var(--purple); }
.tool[data-act="hint"] .ico { color: #e08a00; }
.tool.off .ico { color: var(--muted); }
.tool span { white-space: nowrap; }
.tool.pulse { animation: toolPulse 0.9s ease 3; }
@keyframes toolPulse { 50% { background: rgba(255, 230, 140, 0.95); 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(40, 80, 160, 0.32); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.tipCard, .winCard, .finaleCard {
  position: relative; width: min(420px, 100%); border-radius: 24px; padding: 22px; text-align: center;
  background: linear-gradient(180deg, #ffffff, #eef7ff);
  border: 3px solid #fff; box-shadow: 0 0 0 3px rgba(132, 102, 240, 0.55), var(--shadow), 0 0 50px rgba(255, 255, 255, 0.6);
  animation: pop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
@keyframes pop { from { transform: scale(0.85); opacity: 0; } }
.robot { width: 104px; height: 104px; margin: -62px auto 0; display: block; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(26, 60, 130, 0.3)); animation: float 3s ease-in-out infinite; }
.tipCard, .winCard { margin-top: 36px; }
/* V005：过关弹窗的小云欢呼动图 guide-cheer.webp 每帧左边缘带着一块旅人背包（x 0–20 / 240）：图片左边裁掉 9%（只在用这张动图时）；
 * 投影改由外层 .gFig 画，投影按裁好的图计算，不会留下被切断的影子 */
.gFig { display: block; width: 104px; height: 104px; margin: -62px auto 0; filter: drop-shadow(0 8px 14px rgba(26, 60, 130, 0.3)); }
.gFig > .robot { margin: 0; filter: none; }
.gClip[src$="guide-cheer.webp"] { clip-path: inset(-30% -30% -30% 9%); }
/* V005：调试自检结果（?debug=1&selftest=1） */
.selftest { position: fixed; left: 0; right: 0; bottom: 0; z-index: 99; max-height: 45vh; overflow: auto; margin: 0; padding: 6px 8px; background: rgba(10, 50, 20, 0.92); color: #fff; font: 11px/1.45 monospace; white-space: pre-wrap; }
.guideTag { display: inline-block; margin: 2px 0 4px; padding: 2px 12px; border-radius: 999px; background: linear-gradient(180deg, var(--purple-2), var(--purple)); color: #fff; font-weight: 800; font-size: 12px; }
.tipBody small, .winCard small { display: block; color: #d27a00; font-weight: 800; font-size: 12px; letter-spacing: 0.6px; }
.tipBody h2, .winCard h2, .finaleCard h2 { margin: 4px 0 8px; font-family: var(--title-font); font-size: 25px; font-weight: 800; color: var(--purple); line-height: 1.15; }
.tipBody p, .winCard p, .finaleCard p { margin: 0 0 16px; color: var(--ink-2); line-height: 1.6; font-size: 15px; }
.tipCard .btn { min-width: 160px; }
.winOverlay { position: fixed; }
.winStars { display: flex; justify-content: center; gap: 10px; margin: 8px 0 2px; }
.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; }
.winCard p { white-space: pre-line; }
/* 过关弹窗：旅行明信片 */
.winCardArt { position: relative; width: min(230px, 62vw); margin: 8px auto 2px; border-radius: 14px; padding: 6px 6px 22px; background: #fff;
  box-shadow: 0 8px 20px rgba(26, 60, 130, 0.25); transform: rotate(-3deg); animation: postIn 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
.winCardArt img { width: 100%; height: auto; display: block; border-radius: 9px; }
.postTag { position: absolute; left: 0; right: 0; bottom: 3px; font-size: 11px; font-weight: 800; color: #9a6a30; letter-spacing: 0.5px; }
@keyframes postIn { from { transform: rotate(-14deg) scale(0.6); opacity: 0; } }
@media (max-height: 720px) { .winCardArt { width: min(170px, 48vw); } .winStars svg.star { width: 40px; height: 40px; } }
/* 终曲画面 */
.finaleOverlay { position: fixed; z-index: 30; background: linear-gradient(180deg, #ffb36b, #ffd9a0 40%, #bfe6ff); padding: 20px; }
#finaleCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.finaleCard { margin-top: auto; margin-bottom: 4vh; }
.finaleOverlay { flex-direction: column; justify-content: flex-end; }
.finaleStars { font-weight: 800; color: #d27a00 !important; font-size: 17px !important; }

/* ---------- 提示条 ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(150px + var(--safe-b)); z-index: 40; transform: translate(-50%, 20px);
  width: max-content; max-width: min(92vw, 460px); padding: 11px 18px; border-radius: 16px;
  background: rgba(29, 40, 88, 0.92); border: 2px solid rgba(255, 255, 255, 0.6); color: #fff;
  font-size: 14px; font-weight: 700; 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); }

/* ---------- 尺寸适配 ---------- */
@media (min-width: 560px) {
  .levelGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-height: 680px) {
  .homeHero h1 { margin-top: 14px; }
  .logoWrap { width: min(36vw, 130px); }
  .tool { min-height: 50px; }
  .tool span { font-size: 11px; }
  .hudStats { margin-top: 5px; }
  .btn.go { min-height: 46px; font-size: 18px; }
}
@media (max-width: 360px) { .pill { padding: 4px 8px; font-size: 11.5px; } .pill.gold { display: none; } }

/* ---------- 动效：按钮悬停与点击 / 画面切换 ---------- */
.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);
    box-shadow: 0 8px 0 rgba(92, 65, 201, 0.16), 0 12px 26px rgba(26, 60, 130, 0.22), 0 0 18px rgba(255, 255, 255, 0.85);
  }
  .btn.primary:hover:not(:disabled), .btn.go:hover:not(:disabled) { filter: brightness(1.05); box-shadow: 0 8px 0 #c97a10, 0 14px 30px rgba(246, 162, 28, 0.45), 0 0 22px rgba(255, 230, 120, 0.7), inset 0 2px 0 rgba(255, 255, 255, 0.7); }
  .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.65) 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, 255, 255, 0.85), rgba(160, 210, 255, 0.35) 45%, rgba(160, 210, 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(--purple); } }
.logoWrap { animation: float 4.5s ease-in-out infinite, logoGlow 3.2s ease-in-out infinite; }
@keyframes logoGlow { 50% { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.95), 0 0 0 7px rgba(255, 210, 80, 0.7), 0 0 70px rgba(255, 255, 255, 0.95), 0 14px 34px rgba(26, 60, 130, 0.22); } }

/* ===================== 加载页（天空风格）：两座岛之间一块块铺出木桥 ===================== */
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% 30%, rgba(255, 255, 255, 0.55), transparent 55%), linear-gradient(180deg, #3fa6f2, #86ccff 60%, #d8f1ff);
  transition: opacity 0.6s ease, transform 0.6s ease; --p: 0; }
.boot.leave { opacity: 0; transform: scale(1.04); pointer-events: none; }
.bootSky { position: absolute; inset: 0; pointer-events: none; }
.bCloud { position: absolute; display: block; width: 160px; height: 46px; border-radius: 46px; background: #fff; opacity: 0.85; filter: blur(0.5px);
  box-shadow: 0 8px 0 rgba(200, 225, 250, 0.6); animation: cloudDrift 26s linear infinite; }
.bCloud::before, .bCloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.bCloud::before { width: 70px; height: 70px; left: 24px; top: -36px; }
.bCloud::after { width: 54px; height: 54px; left: 78px; top: -24px; }
.bCloud.c1 { top: 12%; left: -20%; animation-duration: 30s; }
.bCloud.c2 { top: 30%; left: 60%; transform: scale(0.7); animation-duration: 38s; animation-delay: -14s; opacity: 0.7; }
.bCloud.c3 { top: 74%; left: 10%; transform: scale(1.2); animation-duration: 34s; animation-delay: -8s; }
.bCloud.c4 { top: 86%; left: 70%; transform: scale(0.9); animation-duration: 42s; animation-delay: -22s; opacity: 0.75; }
@keyframes cloudDrift { from { translate: -40vw 0; } to { translate: 120vw 0; } }
.bootInner { position: relative; width: min(380px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; }
.bootScene { position: relative; width: 100%; height: 190px; margin-bottom: 8px; }
.bIsle { position: absolute; top: 74px; width: 108px; height: 120px; animation: float 3.6s ease-in-out infinite; }
.bIsle::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 34px; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 35%, #8be070, #4fb546 70%, #3a9a3a); box-shadow: 0 4px 0 #2f8a35; z-index: 2; }
.bIsle::after { content: ""; position: absolute; left: 10px; right: 10px; top: 18px; height: 86px;
  background: linear-gradient(180deg, #b6a9d6, #8c7fb8 60%, #6f63a0); clip-path: polygon(0 0, 100% 0, 78% 55%, 56% 100%, 40% 88%, 22% 50%); }
.bIsleL { left: 0; }
.bIsleR { right: 0; animation-delay: -1.8s; }
.bFall { position: absolute; top: 26px; width: 12px; height: 92px; border-radius: 6px; z-index: 1;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0 8px, rgba(150, 215, 255, 0.95) 8px 16px); background-size: 100% 32px;
  animation: fallFlow 0.6s linear infinite; mask-image: linear-gradient(180deg, #000 70%, transparent); -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); }
.bIsleL .bFall { left: 16px; }
.bIsleR .bFall { right: 18px; }
@keyframes fallFlow { to { background-position: 0 32px; } }
.bTent { position: absolute; left: 22px; top: -22px; width: 40px; height: 32px; z-index: 3;
  background: linear-gradient(90deg, #ff8a5c 0 50%, #ffd36b 50%); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.bArch { position: absolute; left: 30px; top: -46px; width: 50px; height: 56px; z-index: 3; border-radius: 26px 26px 0 0;
  background: radial-gradient(circle at 50% 55%, #fff6b0 0 9px, #ffd84a 10px 15px, transparent 16px), linear-gradient(180deg, #f1eefa, #c9c2e2);
  box-shadow: inset 0 -4px 0 rgba(120, 110, 170, 0.35); }
.bFlag { position: absolute; left: 54px; top: -78px; width: 3px; height: 34px; background: #8a5a22; z-index: 3; }
.bFlag::after { content: ""; position: absolute; left: 3px; top: 0; width: 24px; height: 15px; background: #ff4d4d; clip-path: polygon(0 0, 100% 50%, 0 100%); animation: flag 0.9s ease-in-out infinite alternate; transform-origin: left center; }
@keyframes flag { to { transform: scaleX(0.75) skewY(6deg); } }
.bootBridge { position: absolute; left: 96px; right: 96px; top: 84px; height: 16px; display: flex; gap: 2px; z-index: 4; }
.bootBridge::before { content: ""; position: absolute; left: -6px; right: -6px; top: -10px; height: 14px; border-top: 2px solid #b07a3a; border-radius: 0 0 50% 50% / 0 0 100% 100%; opacity: calc(0.3 + var(--p) * 0.7); }
.bootBridge i { flex: 1; border-radius: 3px; background: linear-gradient(180deg, #e8b46e, #c58a45); box-shadow: inset 0 -3px 0 rgba(110, 60, 20, 0.35), 0 3px 0 rgba(90, 50, 20, 0.25);
  transform: translateY(-40px) rotate(-30deg); opacity: 0; transition: transform 0.35s cubic-bezier(0.3, 1.4, 0.5, 1), opacity 0.25s; }
.bootBridge i.on { transform: none; opacity: 1; }
.bootWalker { position: absolute; top: 46px; left: calc(46px + var(--p) * (100% - 122px)); width: 30px; height: 40px; z-index: 5; transition: left 0.35s ease; animation: walkBob 0.36s ease-in-out infinite alternate; }
.boot.ready .bootWalker { animation: cheerJump 0.6s ease-in-out infinite alternate; }
@keyframes walkBob { to { transform: translateY(-3px) rotate(3deg); } }
@keyframes cheerJump { to { transform: translateY(-10px); } }
.bootWalker b { position: absolute; display: block; }
.bwHat { left: 1px; top: 3px; width: 28px; height: 9px; border-radius: 50%; background: #ffd34a; box-shadow: inset 0 -2px 0 #2bb3a6; z-index: 3; }
.bwHat::after { content: ""; position: absolute; left: 7px; top: -6px; width: 14px; height: 9px; border-radius: 8px 8px 2px 2px; background: #ffd34a; }
.bwHead { left: 6px; top: 8px; width: 18px; height: 16px; border-radius: 50%; background: #ffe0c2; z-index: 2; }
.bwBody { left: 8px; top: 22px; width: 15px; height: 12px; border-radius: 5px 5px 3px 3px; background: #fff3dc; box-shadow: inset 0 3px 0 #3d8bff; }
.bwPack { left: 1px; top: 21px; width: 9px; height: 12px; border-radius: 3px; background: #b5773a; }
.bwLegs { left: 10px; top: 33px; width: 11px; height: 6px; border-left: 4px solid #6b4426; border-right: 4px solid #6b4426; }
.bootTitle { font-family: var(--title-font); font-size: clamp(30px, 9vw, 40px); font-weight: 800; line-height: 1.1; margin: 6px 0 14px; color: #fff;
  text-shadow: 0 2px 0 var(--purple), 2px 0 0 var(--purple), -2px 0 0 var(--purple), 0 -2px 0 var(--purple), 0 6px 0 #3a2896, 0 10px 20px rgba(40, 20, 120, 0.35); }
.bootTrack { position: relative; width: 100%; height: 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.55); box-shadow: inset 0 2px 3px rgba(40, 80, 160, 0.2); margin: 4px 0 10px; overflow: hidden; }
.bootFill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 10px; transition: width 0.35s ease;
  background: linear-gradient(90deg, #ffe680, var(--gold) 60%, var(--gold-2)); box-shadow: 0 0 10px rgba(255, 200, 60, 0.8); }
.bootPct { font-weight: 800; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.bootTip { margin: 6px 0 18px; min-height: 1.5em; color: var(--ink-2); font-size: 14px; font-weight: 700; }
.bootGo { min-width: 200px; animation: goPulse 1.4s ease-in-out infinite; }
.boot.ready .bootPct { opacity: 0.6; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* 调试截图模式（?debug=1&shot=1）：动画瞬间完成，便于无头浏览器截到最终画面 */
.shot *, .shot *::before, .shot *::after { animation-duration: 0.001s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; }
