﻿* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* 安全区：刘海 / 圆角 / 电视过扫。舞台在竖屏时整体旋转 ±90°，四边会换位，见下面的 body.rot-* 规则 */
:root {
  --sa-t: env(safe-area-inset-top, 0px);
  --sa-r: env(safe-area-inset-right, 0px);
  --sa-b: env(safe-area-inset-bottom, 0px);
  --sa-l: env(safe-area-inset-left, 0px);
}
/* rotate(90deg)：舞台的上边贴着屏幕右边，下边贴左边 */
body.rot-90 {
  --sa-t: env(safe-area-inset-right, 0px);
  --sa-r: env(safe-area-inset-bottom, 0px);
  --sa-b: env(safe-area-inset-left, 0px);
  --sa-l: env(safe-area-inset-top, 0px);
}
/* rotate(-90deg，翻转画面)：上边贴屏幕左边 */
body.rot-270 {
  --sa-t: env(safe-area-inset-left, 0px);
  --sa-r: env(safe-area-inset-top, 0px);
  --sa-b: env(safe-area-inset-right, 0px);
  --sa-l: env(safe-area-inset-bottom, 0px);
}

html, body {
  margin: 0; padding: 0;
  height: 100%;
  background: #000;
  overflow: hidden;
  font-family: system-ui, -apple-system, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: #eaf3ea;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  overscroll-behavior: none;
}

/* 舞台：伪横屏时由 JS 旋转 90°，画布和所有 UI 都相对它定位 */
#app {
  position: fixed;
  left: 50%; top: 50%;
  width: 100%; height: 100%;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  overflow: hidden;
  background: #0c1210;
}

#game {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  width: 100%; height: 100%;
  display: block;
}
#bgm { display: none; }

/* ---------- 遮罩层 ---------- */
.overlay {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6, 12, 10, .78);
  z-index: 20;
  padding: max(12px, var(--sa-t)) max(12px, var(--sa-r)) max(12px, var(--sa-b)) max(12px, var(--sa-l));
}
.overlay.hidden { display: none; }

.panel {
  width: 380px;
  width: min(380px, 88%);
  max-height: 96%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, #1d2a24, #141d19);
  border: 1px solid #2f4438;
  border-radius: 18px;
  padding: 18px 18px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}

h1 {
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: 2px;
  color: #8fe08a;
  text-shadow: 0 2px 0 #1b2a20;
}
h1.win { color: #9fe8a0; }
h1.lose { color: #ef7d74; }

.sub { margin: 0 0 12px; color: #8fa89b; font-size: 13px; }

.hint {
  list-style: none; padding: 0; margin: 0 0 14px;
  text-align: left; font-size: 12px; color: #b7c9bd; line-height: 1.75;
}
.hint li::before { content: "· "; color: #6fd06a; }

.info { font-size: 15px; line-height: 1.9; color: #cfe3d4; margin: 10px 0 20px; }

.btn {
  width: 100%;
  padding: 14px;
  font-size: 17px;
  font-weight: 700;
  color: #10201a;
  background: linear-gradient(180deg, #9fe89a, #61c463);
  border: none;
  border-radius: 12px;
  cursor: pointer;
}
.btn:active { transform: translateY(1px); filter: brightness(.95); }

/* ---------- 通用次要按钮（暂停页等） ---------- */
.btn.btn-ghost {
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #b7c9bd;
  background: transparent;
  border: 1px solid #3d5546;
}
.btn.btn-ghost:active { background: #1d2e25; }

/* ---------- 无尽模式「主动结算」按钮（金色，只在无尽模式暂停页出现） ---------- */
.btn.btn-cash {
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #3a2600;
  background: linear-gradient(180deg, #ffe9a8, #e8b64a);
  border: 1px solid #b8862c;
}
.btn.btn-cash:hover { filter: brightness(1.06); }
.btn.btn-cash:active { background: linear-gradient(180deg, #f3d78a, #d9a63c); }

/* ---------- 主界面在 menu.css / menu-bg.png / start-btn.webp ---------- */

/* ---------- 角色入口 / 选角界面在自己的一对文件里 ----------
 * chars.js / char-select.js / char-select.css
 * 原来的三张角色卡样式已随开始页改版移除。
 */

/* ---------- 宝箱被动卡 ---------- */
.card.card-passive {
  border-color: #8a6a2f;
  background: linear-gradient(180deg, #33291a, #221b12);
}
.card.card-passive .cname { color: #ffd98a; }

/* ---------- 结算 ---------- */
.newrec { color: #ffd98a; font-weight: 700; }
.dim { color: #8fa89b; font-size: 13px; }

/* ---------- 暂停 / 新手提示 ---------- */
#pause { z-index: 25; }
#hint { z-index: 30; }
.hint-title { font-size: 24px; }
#hint .hint-big {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 18px;
}
#hint .hint-big b { color: #c9f3a8; }
#pause .btn + .btn, #over .btn + .btn { margin-top: 10px; }

/* 伪横屏的舞台高度是竖屏视口宽度，弹窗内容要再紧凑一点 */
body.fake-landscape #hint .hint-big { font-size: 12px; line-height: 1.55; margin-bottom: 10px; }
body.fake-landscape #pause .panel { max-height: 92%; }


/* ---------- 升级三选一 ---------- */
.levelup {
  width: 720px;
  width: min(720px, 96vw);
  text-align: center;
}
.ltitle {
  font-size: 20px;
  color: #ffd98a;
  margin-bottom: 16px;
  letter-spacing: 1px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 520px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

.card {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  background: linear-gradient(180deg, #22332b, #18241e);
  border: 1px solid #37503f;
  border-radius: 14px;
  padding: 18px 12px;
  cursor: pointer;
  min-height: 116px;
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
}
.card:active { transform: scale(.98); border-color: #6fd06a; }
.cname { font-size: 17px; font-weight: 700; color: #a8ec9f; }
.cdesc { font-size: 13px; color: #c5d8ca; line-height: 1.5; }
.clv { font-size: 11px; color: #6f8a78; }

/* ---------- 伪横屏（舞台已被 JS 旋转 90°，这里是横屏比例下的排版） ---------- */
body.fake-landscape .panel {
  width: 620px;
  width: min(620px, 86%);
  max-height: 92%;
  padding: 12px 20px 14px;
  border-radius: 14px;
}
body.fake-landscape h1 {
  font-size: 22px;
  margin-bottom: 4px;
}
body.fake-landscape .sub { font-size: 12px; margin-bottom: 8px; }
body.fake-landscape .hint {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
  font-size: 11px;
  line-height: 1.6;
  margin-bottom: 10px;
}
body.fake-landscape .btn { padding: 11px; font-size: 15px; }

/* 旋转后媒体查询仍按竖屏视口宽度判定，必须纠正三选一布局 */
body.fake-landscape .levelup { width: 680px; width: min(680px, 92%); }
body.fake-landscape .cards {
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 10px;
}
body.fake-landscape .card {
  min-height: 0;
  padding: 12px 10px;
  gap: 5px;
}
body.fake-landscape .ltitle { font-size: 16px; margin-bottom: 10px; }
body.fake-landscape .cname { font-size: 15px; }
body.fake-landscape .cdesc { font-size: 12px; }

/* ---------------- 用户名输入（主菜单木牌点开的弹窗） ---------------- */
.rename-input {
  display: block;
  width: 100%;
  margin: 0.2em 0 0.7em;
  padding: 0.45em 0.6em;
  box-sizing: border-box;
  font: inherit;
  font-size: 1.15em;
  font-weight: 800;
  text-align: center;
  color: #ffe9a8;
  background: rgba(10, 16, 13, 0.55);
  border: 1px solid rgba(255, 233, 168, 0.35);
  border-radius: 0.5em;
  outline: none;
}
.rename-input:focus {
  border-color: #ffe9a8;
  box-shadow: 0 0 0 2px rgba(255, 233, 168, 0.22);
}
.rename-input::placeholder {
  color: rgba(255, 233, 168, 0.32);
}

/* ---------------- 无尽模式全服排行榜 ---------------- */
#rank { z-index: 36; }
.rank-panel { width: min(560px, 90%); }
.rank-hint { margin: 0 0 0.55em; font-size: 0.86em; }
.rank-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em;
  margin: 0 0 0.5em;
}
.rank-tab {
  flex: 1 0 auto;
  min-width: 4.2em;
  padding: 0.34em 0.55em;
  font: inherit;
  font-size: 0.86em;
  font-weight: 700;
  color: #4a3d68;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0.5em;
  cursor: pointer;
}
.rank-tab:hover { background: rgba(255, 255, 255, 0.62); }
.rank-tab.on {
  color: #2b2418;
  background: rgba(255, 210, 96, 0.85);
  border-color: rgba(140, 100, 20, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.rank-head, .rank-row {
  display: grid;
  grid-template-columns: 3.2em minmax(0, 1fr) 4.8em 4.6em;
  column-gap: 0.5em;
  align-items: center;
}
.rank-head {
  padding: 0 0.45em 0.35em;
  font-size: 0.72em;
  letter-spacing: 0.1em;
  color: #555d67;
  border-bottom: 1px solid rgba(0, 0, 0, 0.22);
}
.rank-head span:last-child { text-align: right; }
.rank-list {
  max-height: calc(var(--stage-h, 100vh) * 46 / 100);
  margin: 0.2em 0 0.7em;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.rank-row {
  padding: 0.36em 0.45em;
  font-size: 0.94em;
  font-weight: 600;
  color: #2b3138;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.14);
}
.rank-row .rk { font-weight: 800; text-align: center; color: #5b6672; }
.rank-row .rn { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rank-row .rkill {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.92em;
  text-align: right;
  color: #24313d;
}
.rank-row .rt {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.92em;
  text-align: right;
  color: #24313d;
}
.rank-row.is-me { background: rgba(255, 210, 96, 0.42); border-radius: 0.45em; }
.rank-row.top1 .rk { color: #a9761a; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55); }
.rank-empty {
  margin: 1.1em 0;
  text-align: center;
  font-size: 0.9em;
  line-height: 1.7;
  color: #555d67;
}
.rank-empty small { font-size: 0.82em; opacity: 0.75; }
.rank-note { margin: 0 0 0.4em; font-size: 0.82em; font-weight: 600; color: #4a3d68; }
.rank-note:empty { display: none; }
body.fake-landscape .rank-list { max-height: calc(var(--stage-h, 100vh) * 52 / 100); }

/* ---------- 武器商店（暂停式） ---------- */
.shop {
  width: 960px;
  width: min(960px, 94%);
  max-height: 96%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, #1d2a24, #141d19);
  border: 1px solid #2f4438;
  border-radius: 18px;
  padding: 14px 16px 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  box-sizing: border-box;
}
.shop-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 10px;
}
.shop-title { font-size: 20px; font-weight: 800; color: #8fe08a; letter-spacing: 2px; }
.shop-coins { font-size: 14px; color: #cfe3d4; }
.shop-coins b { color: #ffd24a; font-size: 20px; margin-left: 4px; }

.shop-slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.shop-slot {
  position: relative;
  min-height: 150px;
  border-radius: 12px;
  border: 1px solid #37503f;
  background: linear-gradient(180deg, #22332b, #18241e);
  padding: 8px 8px 6px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
}
.shop-slot.can-buy { border-color: #61c463; box-shadow: 0 0 0 1px rgba(97,196,99,.35) inset; }
.shop-slot.no-money { opacity: .6; }
.shop-slot.sold { opacity: .35; cursor: default; }
.shop-slot.empty { opacity: .35; justify-content: center; cursor: default; }
.ss-tier {
  position: absolute; top: 6px; left: 6px;
  font-size: 10px; font-weight: 800; color: #10201a;
  background: linear-gradient(180deg, #ffe9a8, #e8b64a);
  border-radius: 6px; padding: 1px 5px;
}
.ss-icon { width: 46px; height: 46px; object-fit: contain; margin-top: 12px; }
.ss-name { font-size: 14px; font-weight: 700; color: #a8ec9f; margin-top: 4px; }
.ss-desc {
  font-size: 10px; color: #9db3a6; line-height: 1.35; margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ss-price { font-size: 12px; font-weight: 700; color: #ffd24a; margin-top: auto; }
.ss-sold { font-size: 12px; color: #ff9b6b; margin-top: auto; }
.ss-lock {
  position: absolute; top: 4px; right: 4px;
  width: 26px; height: 26px; border: none; border-radius: 8px;
  background: rgba(0,0,0,.35); font-size: 13px; cursor: pointer;
  padding: 0; line-height: 1;
}
.ss-lock.on { background: rgba(232,182,74,.9); }
.ss-empty { font-size: 13px; color: #6f8a78; }

.shop-town { margin-top: 12px; }
.shop-eq-title { font-size: 11px; color: #7f9a89; }
.shop-eq-list {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px;
}
.eq-chip {
  display: flex; align-items: center; gap: 4px;
  background: #1a2a22; border: 1px solid #3d5546; border-radius: 9px;
  padding: 4px 8px 4px 4px; color: #cfe3d4; font-size: 11px; cursor: pointer;
}
.eq-chip img { width: 22px; height: 22px; object-fit: contain; }
.eq-chip b { color: #ffd24a; font-size: 11px; }
.eq-chip:active { border-color: #e8b64a; }
.eq-none { font-size: 11px; color: #6f8a78; }

.shop-actions { display: flex; gap: 10px; margin-top: 12px; }
.shop-actions .btn { flex: 1; padding: 12px; font-size: 15px; }

@media (max-width: 640px) {
  .shop-slots { grid-template-columns: repeat(2, 1fr); }
}
body.fake-landscape .shop { width: min(1050px, 96%); padding: 10px 14px 12px; }
body.fake-landscape .shop-slots { grid-template-columns: repeat(4, 1fr) !important; }
body.fake-landscape .shop-slot { min-height: 128px; }
body.fake-landscape .ss-icon { width: 38px; height: 38px; margin-top: 10px; }
body.fake-landscape .shop-actions .btn { padding: 10px; font-size: 14px; }


/* ---------------- v0.11.0 难度选择 / 波次升级卡 ---------------- */
.diff {
  width: min(760px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 22px 24px 26px;
  background: rgba(24, 30, 42, .92);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
}
.diff-top {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}
.diff-title {
  flex: 1;
  text-align: center;
  font-size: clamp(20px, calc(var(--stage-h, 100vh) * 4.6 / 100), 30px);
  font-weight: 900;
  color: #f2f7ef;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .55), 0 6px 18px rgba(0, 0, 0, .5);
}
.diff-mini {
  min-width: 90px;
  text-align: right;
  font-size: 12px;
  color: #9fb3a8;
}
.diff-cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.6vw, 18px);
}
.diff-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 12px 16px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, .12);
  background: rgba(52, 62, 80, .82);
  color: #e6efe6;
  cursor: pointer;
  font: inherit;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.diff-card:hover { transform: translateY(-2px); border-color: rgba(255, 210, 74, .55); }
.diff-card.on {
  border-color: #ffd24a;
  background: rgba(80, 66, 30, .55);
  box-shadow: 0 0 0 2px rgba(255, 210, 74, .28), 0 10px 30px rgba(0, 0, 0, .35);
}
.diff-card.off {
  opacity: .38;
  filter: grayscale(.75);
  cursor: not-allowed;
}
.diff-card.off:hover { transform: none; border-color: rgba(255, 255, 255, .12); }
.diff-name { font-size: clamp(18px, calc(var(--stage-h, 100vh) * 3.4 / 100), 24px); font-weight: 900; }
.diff-waves { font-size: 13px; color: #ffd98a; letter-spacing: .06em; }
.diff-desc { font-size: 12px; line-height: 1.5; color: #a9bcb0; text-align: center; }
.diff-note { margin: 0; font-size: 12px; color: #93a89b; text-align: center; }
.lv-reroll { margin-top: 12px; font-size: 13px; padding: 8px 18px; }
.card.card-stat {
  border-color: rgba(255, 210, 74, .35);
  background: linear-gradient(180deg, rgba(62, 56, 36, .95), rgba(38, 40, 34, .96));
}
.card.card-stat .cicon {
  font-size: 26px;
  line-height: 1;
  margin-bottom: 4px;
}
.card.card-stat .cname { color: #ffe9a8; }
@media (max-height: 520px) {
  .diff { gap: 10px; padding: 14px 16px 16px; }
  .diff-card { padding: 12px 8px 10px; gap: 4px; }
  .diff-desc { display: none; }
}


/* ---------- 升级界面（v0.12.0，对齐 Brotato 手机版：左属性 + 右强化列表） ---------- */
.lv-up {
  width: min(880px, 96%);
  max-height: 96%;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, calc(var(--stage-h, 100vh) * 1.2 / 100), 12px);
}
.lv-up-head { display: flex; align-items: baseline; justify-content: center; gap: 12px; }
.lv-up-title {
  font-size: clamp(22px, calc(var(--stage-h, 100vh) * 4.4 / 100), 38px);
  font-weight: 900; color: #fff;
  text-shadow: 0 2px 0 #000, 0 0 18px rgba(0, 0, 0, .65);
  letter-spacing: 2px;
}
.lv-up-sub { font-size: clamp(11px, calc(var(--stage-h, 100vh) * 1.9 / 100), 15px); color: #ffd98a; }
.lv-up-body {
  display: grid;
  grid-template-columns: minmax(0, .58fr) minmax(0, 1fr);
  gap: clamp(8px, calc(var(--stage-w, 100vw) * 1 / 100), 14px);
  min-height: 0;
  flex: 1 1 auto;
}
.lv-up-stats {
  background: rgba(8, 10, 14, .88);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 6px;
  padding: 8px 10px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.lv-tabs { display: flex; gap: 6px; margin-bottom: 6px; }
.lv-tabs span {
  padding: 2px 14px;
  font-size: clamp(10px, calc(var(--stage-h, 100vh) * 1.8 / 100), 13px);
  color: #93a3b8;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 4px;
}
.lv-tabs .on { color: #fff; background: rgba(255, 255, 255, .16); }
.lv-stat {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: clamp(10px, calc(var(--stage-h, 100vh) * 2.2 / 100), 14px);
  color: #cfd7e4;
  padding: 2px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .08);
}
.lv-stat b { font-weight: 700; color: #eef3fb; }
.lv-stat.good b { color: #7fe07a; }
.lv-up-list { min-height: 0; overflow-y: auto; }
#levelup { background: rgba(4, 6, 9, .96); }
#levelup .lv-up-list .cards { display: flex; flex-direction: column; gap: clamp(6px, calc(var(--stage-h, 100vh) * 1.1 / 100), 10px); }
.lv-row {
  display: flex; flex-direction: row; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(16, 18, 22, .94);
  border: 1px solid rgba(255, 255, 255, .16);
  min-height: 0;
}
.lv-row:active { transform: scale(.995); border-color: #ffd24a; }
.lv-ico {
  flex: 0 0 auto;
  width: clamp(34px, calc(var(--stage-h, 100vh) * 7 / 100), 54px);
  height: clamp(34px, calc(var(--stage-h, 100vh) * 7 / 100), 54px);
  display: flex; align-items: center; justify-content: center;
  background: #2a2f3a;
  border-radius: 4px;
  font-size: clamp(16px, calc(var(--stage-h, 100vh) * 3.4 / 100), 27px);
}
.lv-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lv-name { font-size: clamp(13px, calc(var(--stage-h, 100vh) * 2.8 / 100), 18px); font-weight: 800; color: #fff; }
.lv-tag { font-size: clamp(9px, calc(var(--stage-h, 100vh) * 1.6 / 100), 11px); color: #8fa0b5; font-style: normal; }
.lv-desc { font-size: clamp(11px, calc(var(--stage-h, 100vh) * 2.3 / 100), 15px); color: #ffd98a; font-style: normal; }
.lv-pick {
  flex: 0 0 auto;
  padding: 6px 16px;
  border-radius: 4px;
  background: #4a4f5a;
  color: #fff; font-weight: 700;
  font-size: clamp(12px, calc(var(--stage-h, 100vh) * 2.5 / 100), 16px);
}
#levelup .lv-reroll { align-self: flex-start; margin-top: 0; }

/* v0.16.1 商店货位卡面：羁绊一行 */
.ss-bond {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.92;
}

/* ---------- 启动加载动画（v0.17.0） ---------- */
.boot {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, calc(var(--stage-h, 100vh) * 1.4 / 100), 16px);
  background: radial-gradient(120% 90% at 50% 40%, #263a2c 0%, #18231b 56%, #0b110e 100%);
  color: #f3e7c6;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .45s ease, visibility .45s ease;
}
.boot.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot.hidden { display: none; }

.boot-art {
  height: clamp(140px, calc(var(--stage-h, 100vh) * 38 / 100), 320px);
  width: auto;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, .5));
}

.boot-tip {
  margin: 0;
  font-size: clamp(12px, calc(var(--stage-h, 100vh) * 2.1 / 100), 17px);
  letter-spacing: .12em;
  color: #e9d9ab;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .6);
}

.boot-track {
  width: clamp(150px, 34%, 300px);
  height: clamp(4px, calc(var(--stage-h, 100vh) * .6 / 100), 7px);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
}
.boot-track > i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f0cf86, #ffe9b6);
  transition: width .25s ease;
}

@media (max-height: 460px) {
  .boot { gap: 4px; }
  .boot-art { height: clamp(110px, calc(var(--stage-h, 100vh) * 40 / 100), 200px); }
  .boot-tip { font-size: 11px; }
}

/* v0.28.0：不装备武器的角色，商店货位卖属性强化卡，图标用文字符号 */
.ss-icon-up {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(22px, 3.4vh, 34px);
  line-height: 1;
  color: #ffe9a8;
  background: radial-gradient(circle at 50% 45%, rgba(255,213,120,.20), rgba(255,213,120,0) 70%);
}

/* ---------- 键盘可访问性 ---------- */
/* 鼠标点击不显示焦点框，Tab 走到才显示；否则触屏玩家每点一下都看到一圈黄线 */
button:focus { outline: none; }
button:focus-visible,
input:focus-visible,
[data-menu]:focus-visible {
  outline: 2px solid #ffd98a;
  outline-offset: 2px;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
