/* ============================================================================
 * 《远古狂轰团》官网网页互通版 · 原版浮雕质感与全端响应式样式（零内联 CSP）
 * 100% 启用原版 ui/*.webp 手绘浮雕贴图（wood/stone/hide/slot/fire/lobby_*）
 * 完整适配 PC 宽屏、平板、手机竖屏（底部 5 格导航 + 双层大拇指战斗台）与手机矮横屏
 * ============================================================================ */

:root {
  --ink: #1c120a;
  --bg-deep: #140d08;
  --panel-top: rgba(58, 39, 25, 0.94);
  --panel-bot: rgba(29, 19, 13, 0.96);
  --bronze: #c9933f;
  --bronze-soft: rgba(201, 147, 63, 0.48);
  --gold: #ffd45e;
  --gold-hi: #fff2be;
  --bone: #f3e7c9;
  --bone-dim: #bfb193;
  --fire-1: #ffb23e;
  --fire-2: #d2491a;
  --ok: #7be362;
  --danger: #f0603c;
  --blue: #58b8e8;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(164, 102, 42, 0.22), rgba(18, 11, 7, 0.78) 65%),
    linear-gradient(180deg, rgba(24, 15, 9, 0.72), rgba(14, 9, 5, 0.84)),
    url(/static/fortress/ui/hide.webp);
  background-size: cover, cover, 256px 256px;
  color: var(--bone);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.hidden { display: none !important; }

/* ==================== 0. 全屏原版启动预载幕布 ==================== */
.fa-splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #120b07;
  transition: opacity 0.35s ease;
}
.fa-splash.fade-out { opacity: 0; pointer-events: none; }
.fa-splash-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(5px) brightness(0.42) saturate(1.1);
  transform: scale(1.05);
}
.fa-splash-veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(44, 24, 10, 0.25), rgba(12, 7, 4, 0.88) 76%);
}
.fa-splash-card {
  position: relative;
  z-index: 2;
  width: min(480px, 90vw);
  padding: 26px 24px 22px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(48, 31, 19, 0.92), rgba(22, 14, 9, 0.96));
  border: 2px solid var(--bronze);
  box-shadow: 0 0 0 2px var(--ink), 0 18px 48px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 240, 190, 0.28);
  text-align: center;
}
.fa-splash-banner {
  width: min(320px, 76vw);
  aspect-ratio: 320 / 88;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 6px;
  background: url(/static/fortress/ui/lobby_title.webp) center / 100% 100% no-repeat;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.65));
}
.fa-splash-title {
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 900;
  letter-spacing: 3px;
  color: #fff4c8;
  text-shadow: 0 2px 0 #5b2d06, 0 4px 10px rgba(0, 0, 0, 0.85), 0 0 12px rgba(255, 196, 68, 0.55);
}
.fa-splash-sub {
  font-size: 13px;
  color: var(--gold-hi);
  margin-bottom: 10px;
  min-height: 18px;
}
.fa-splash-bar {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #0d0805, #23170f);
  border: 1.5px solid var(--bronze);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}
.fa-splash-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #c96218, #f7a62c, #ffe378);
  box-shadow: 0 0 12px rgba(255, 186, 62, 0.65);
  transition: width 0.2s ease-out;
}
.fa-splash-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--bone-dim);
  text-align: left;
}
.fa-splash-pct {
  flex-shrink: 0;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

/* ==================== 1. 全局外壳与原版木铜顶栏 ==================== */
.fa-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}

.fa-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  padding: calc(4px + var(--safe-t)) calc(14px + var(--safe-r)) 4px calc(14px + var(--safe-l));
  background:
    linear-gradient(180deg, rgba(42, 26, 14, 0.72), rgba(20, 12, 7, 0.88)),
    url(/static/fortress/ui/wood.webp);
  background-size: cover, 220px auto;
  border-bottom: 2px solid var(--bronze);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 232, 170, 0.18);
  z-index: 20;
}

/* 战斗全屏沉浸态：自动隐藏官网顶栏 */
body.in-battle .fa-header { display: none; }

.fa-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.fa-logo-badge {
  height: 40px;
  min-width: 146px;
  padding: 0 22px 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: url(/static/fortress/ui/lobby_title.webp) center / 100% 100% no-repeat;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.65));
  flex-shrink: 0;
}
.fa-logo-badge span {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #fff3c4;
  text-shadow: 0 1.5px 0 #5b2c06, 0 2px 6px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}
.fa-brand-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f7c552, #b9781c);
  color: #261404;
  border: 1px solid #4d2c06;
  white-space: nowrap;
}
.fa-nav-links {
  display: flex;
  gap: 6px;
}
.fa-nav-link {
  color: var(--bone);
  text-decoration: none;
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(24, 15, 9, 0.65);
  border: 1px solid var(--bronze-soft);
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.fa-nav-link:hover {
  background: rgba(112, 72, 32, 0.6);
  border-color: var(--gold);
  color: var(--gold-hi);
}

.fa-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}
.fa-wallet {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--bone-dim);
  background: rgba(14, 9, 5, 0.68);
  border: 1px solid var(--bronze-soft);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}
.fa-wallet b { color: var(--gold); font-weight: 800; }
.fa-wallet .sep { color: rgba(201, 147, 63, 0.35); }

.fa-auth-box {
  display: flex;
  align-items: center;
  gap: 6px;
}
.fa-acc-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-hi);
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fa-char-sel {
  background: #1b110a;
  color: var(--bone);
  border: 1px solid var(--bronze);
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 12px;
  max-width: 112px;
}
.fa-btn-mute {
  min-width: 34px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(180deg, #684729, #3c2614);
  color: var(--gold-hi);
  border: 1px solid var(--bronze);
  cursor: pointer;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fa-btn-mute:hover { filter: brightness(1.12); }

.fa-stage {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  overflow: hidden;
}
.fa-mount {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* ==================== 2. 原版浮雕公共组件（面板/铜牌/熔岩大键/石键） ==================== */
.fl-panel {
  background: linear-gradient(180deg, var(--panel-top), var(--panel-bot));
  border: 1.5px solid var(--bronze);
  border-radius: 10px;
  box-shadow: 0 0 0 1.5px var(--ink), 0 6px 16px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 238, 186, 0.16);
}

.fl-copper-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 11px;
  font-size: 12px;
  font-weight: 800;
  color: #fff3c8;
  border-radius: 6px;
  background: linear-gradient(180deg, #d9a54a, #8a5a1c);
  border: 1.5px solid var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 244, 198, 0.55), 0 2px 5px rgba(0, 0, 0, 0.45);
  text-shadow: 0 1px 2px #4c2b06;
}

/* 原版兽牙熔岩大键（ui/fire.webp） */
.fl-fire-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  height: 48px;
  padding: 0 24px;
  border: none;
  border-radius: 10px;
  background: url(/static/fortress/ui/fire.webp) center / 100% 100% no-repeat;
  color: #fff8e2;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px #4d1303, 0 0 8px rgba(120, 24, 0, 0.8);
  cursor: pointer;
  filter: drop-shadow(0 4px 10px rgba(235, 92, 24, 0.45));
  transition: transform 0.12s, filter 0.15s;
}
.fl-fire-cta.sm {
  min-width: 118px;
  height: 38px;
  padding: 0 16px;
  font-size: 13px;
}
.fl-fire-cta:hover:not(:disabled) {
  filter: brightness(1.12) drop-shadow(0 5px 14px rgba(255, 130, 38, 0.65));
  transform: translateY(-1px);
}
.fl-fire-cta:active:not(:disabled) { transform: translateY(1px) scale(0.98); }
.fl-fire-cta:disabled {
  filter: grayscale(0.85) brightness(0.65);
  cursor: not-allowed;
  opacity: 0.78;
}

/* 原版石键/木键/金键 */
.fl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--bone);
  background: linear-gradient(180deg, #865c32, #533418);
  border: 1.5px solid var(--bronze);
  box-shadow: 0 0 0 1px var(--ink), inset 0 1px 0 rgba(255, 240, 190, 0.25);
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.12s, transform 0.1s;
}
.fl-btn:hover:not(:disabled) { filter: brightness(1.13); }
.fl-btn:active:not(:disabled) { transform: translateY(1px); }
.fl-btn:disabled { opacity: 0.48; cursor: not-allowed; filter: grayscale(0.5); }
.fl-btn.small { min-height: 32px; padding: 4px 11px; font-size: 12px; }
.fl-btn.tiny { min-height: 26px; padding: 2px 8px; font-size: 11px; }
.fl-btn.primary {
  background: linear-gradient(180deg, #f7c552, #b9781c);
  color: #2b1504;
  border-color: #ffe28a;
  text-shadow: 0 1px 0 rgba(255, 245, 200, 0.4);
}
.fl-btn.danger {
  background: linear-gradient(180deg, #ea5a38, #9c2414);
  color: #fff2de;
  border-color: #ff9c78;
}

.fl-pill {
  min-height: 34px;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--bone-dim);
  background: rgba(24, 15, 9, 0.8);
  border: 1.5px solid var(--bronze-soft);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.fl-pill:hover { border-color: var(--gold); color: var(--gold-hi); }
.fl-pill.active {
  background: linear-gradient(180deg, #e0a63a, #965d14);
  color: #fff8de;
  border-color: #ffe388;
  box-shadow: 0 2px 8px rgba(224, 166, 58, 0.35);
}
.fl-pill.locked { opacity: 0.58; }

/* ==================== 3. 大厅布局（桌面顶导 + 移动端底导） ==================== */
.fl-root {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.fl-tabs {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  background: linear-gradient(180deg, rgba(28, 17, 10, 0.9), rgba(18, 11, 7, 0.72));
  border-bottom: 1px solid var(--bronze-soft);
}
.fl-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 122px;
  height: 40px;
  padding: 0 14px;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(66, 44, 26, 0.85), rgba(34, 22, 13, 0.92));
  border: 1.5px solid var(--bronze-soft);
  color: var(--bone-dim);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}
.fl-tab-ic {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
}
.fl-tab-short { display: none; }
.fl-tab:hover { border-color: var(--gold); color: var(--gold-hi); }
.fl-tab.active {
  background: linear-gradient(180deg, #8e561c, #4b2a0b);
  border-color: var(--gold);
  color: var(--gold-hi);
  box-shadow: 0 0 12px rgba(255, 212, 94, 0.28), inset 0 1px 0 rgba(255, 240, 190, 0.4);
}

.fl-alert {
  flex: 0 0 auto;
  padding: 6px 14px;
  font-size: 12px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.fl-alert.info { background: rgba(34, 62, 94, 0.55); color: #d6ecff; }
.fl-alert.warn { background: rgba(128, 72, 16, 0.65); color: #ffe7a8; }

.fl-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 16px 18px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  -webkit-overflow-scrolling: touch;
}

.fl-subbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.fl-act-sm { display: none; }
.fl-toggle-elite {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #ffc56e;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(96, 36, 12, 0.55);
  border: 1px solid rgba(255, 168, 74, 0.45);
  cursor: pointer;
}
.fl-sec-hd {
  margin: 14px 0 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--gold);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.fl-sec-hd span { font-size: 12px; font-weight: 400; color: var(--bone-dim); }
.fl-sec-hd b { color: var(--gold-hi); }

/* --- 战役闯关 --- */
.fl-camp-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.fl-chap-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fl-chap-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  text-align: left;
  background: linear-gradient(180deg, rgba(58, 39, 24, 0.92), rgba(29, 19, 12, 0.95));
  border: 1.5px solid var(--bronze-soft);
  color: var(--bone);
  cursor: pointer;
  transition: all 0.14s;
}
.fl-chap-card:hover { border-color: var(--gold); }
.fl-chap-card.active {
  background: linear-gradient(180deg, rgba(124, 78, 28, 0.95), rgba(62, 37, 14, 0.98));
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(255, 212, 94, 0.25);
}
.fl-chap-card.locked { opacity: 0.62; }
.fl-chap-ic {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: url(/static/fortress/ui/slot.webp) center / 100% 100% no-repeat;
}
.fl-chap-meta { min-width: 0; flex: 1; }
.fl-chap-no {
  font-size: 11px;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.fl-full-tag {
  font-style: normal;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(62, 138, 34, 0.85);
  color: #efffdf;
}
.fl-chap-meta strong {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 2px 0;
}
.fl-chap-star { font-size: 11px; color: var(--bone-dim); }

.fl-camp-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fl-camp-banner {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--bronze);
  box-shadow: 0 0 0 1.5px var(--ink), 0 8px 20px rgba(0, 0, 0, 0.5);
  padding: 14px 16px 18px;
  min-height: 186px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}
.fl-camp-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.75) saturate(1.1);
}
.fl-camp-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 10, 6, 0.45), rgba(14, 9, 5, 0.82));
}
.fl-camp-head {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.fl-trait-row { display: flex; flex-wrap: wrap; gap: 6px; }
.fl-trait {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(16, 10, 6, 0.72);
  border: 1px solid rgba(255, 212, 94, 0.45);
  color: var(--gold-hi);
}
.fl-route-nodes {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.fl-route-nodes::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 24px;
  height: 3px;
  background: linear-gradient(90deg, rgba(255, 212, 94, 0.35), rgba(255, 212, 94, 0.7), rgba(255, 212, 94, 0.35));
  z-index: 0;
}
.fl-route-node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--bone);
  cursor: pointer;
  padding: 2px;
}
.fl-node-orb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: var(--gold-hi);
  background: url(/static/fortress/ui/orb.webp) center / 100% 100% no-repeat;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.7));
  transition: transform 0.14s, filter 0.14s;
}
.fl-route-node.active .fl-node-orb {
  transform: scale(1.16);
  filter: brightness(1.25) drop-shadow(0 0 12px rgba(255, 212, 94, 0.85));
}
.fl-route-node.locked .fl-node-orb { filter: grayscale(0.8) brightness(0.6); }
.fl-node-stars { font-size: 12px; color: var(--gold); text-shadow: 0 1px 3px #000; }
.fl-node-sub {
  font-size: 11px;
  color: var(--bone);
  background: rgba(16, 10, 6, 0.74);
  padding: 2px 6px;
  border-radius: 6px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fl-route-node.active .fl-node-sub {
  background: rgba(186, 118, 28, 0.92);
  color: #fff9e0;
  font-weight: 700;
}

.fl-stg-detail {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.fl-sd-left { min-width: 0; flex: 1; }
.fl-sd-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.fl-sd-title h3 { margin: 0; font-size: 17px; color: var(--gold-hi); }
.fl-mech-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(68, 126, 186, 0.38);
  border: 1px solid #6ec2ff;
  color: #dbf2ff;
}
.fl-elite-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(208, 66, 26, 0.45);
  border: 1px solid #ff8c58;
  color: #ffe2d2;
}
.fl-sd-tip {
  margin: 0 0 10px;
  font-size: 13px;
  color: #f9dfb0;
  line-height: 1.5;
}
.fl-sd-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--bone-dim);
  margin-bottom: 8px;
}
.fl-sd-meta b { color: var(--bone); }
.fl-sd-meta b.gold { color: var(--gold); }
.fl-enemy-row { display: flex; flex-wrap: wrap; gap: 6px; }
.fl-enemy-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(18, 11, 7, 0.72);
  border: 1px solid var(--bronze-soft);
  color: var(--bone);
}
.fl-enemy-tag.boss { border-color: #ff7a4a; color: #ffd4ba; font-weight: 700; }

/* --- 巨兽 · 奇局 · 靶场 --- */
.fl-raid-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.fl-raid-card { overflow: hidden; }
.fl-raid-card.locked { opacity: 0.62; }
.fl-raid-hero {
  position: relative;
  height: 102px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  overflow: hidden;
  border-bottom: 1px solid var(--bronze-soft);
}
.fl-raid-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.52);
}
.fl-raid-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 10, 6, 0.45), rgba(16, 10, 6, 0.78));
}
.fl-raid-spr {
  position: relative;
  z-index: 2;
  flex: 0 0 86px;
  width: 86px;
  height: 78px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.75));
}
.fl-raid-top-info { position: relative; z-index: 2; min-width: 0; flex: 1; }
.fl-raid-top-info h4 { margin: 4px 0 3px; font-size: 15px; color: var(--gold-hi); }
.fl-raid-hp { font-size: 12px; color: #ffd3a8; }
.fl-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(188, 124, 34, 0.85);
  color: #fff6dc;
  margin-right: 5px;
}
.fl-badge.done { background: rgba(54, 134, 38, 0.9); }
.fl-raid-body { padding: 12px 14px; }
.fl-spec-desc { margin: 0 0 10px; font-size: 12.5px; color: var(--bone); line-height: 1.5; }
.fl-raid-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fl-stg-rew { font-size: 12px; color: var(--gold); font-weight: 700; }

.fl-puzzle-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.fl-puz-card {
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.fl-puz-card.done { border-color: #79d860; }
.fl-puz-card.locked { opacity: 0.56; }
.fl-puz-head { display: flex; justify-content: space-between; font-size: 11px; color: var(--bone-dim); }
.fl-puz-stars { color: var(--gold); }
.fl-puz-name { font-size: 13px; font-weight: 800; color: var(--gold-hi); }
.fl-puz-sub { font-size: 11px; color: var(--bone-dim); margin-bottom: 4px; }

.fl-range-hero {
  max-width: 580px;
  margin: 18px auto;
  padding: 28px 24px;
  text-align: center;
}
.fl-range-ic { width: 88px; height: 88px; object-fit: contain; margin-bottom: 8px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6)); }
.fl-range-hero h3 { margin: 0 0 8px; font-size: 20px; color: var(--gold); }
.fl-range-hero p { margin: 0 0 14px; font-size: 13.5px; color: var(--bone); line-height: 1.6; }
.fl-range-status {
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  background: rgba(146, 92, 24, 0.35);
  border: 1px solid var(--bronze-soft);
  color: var(--gold-hi);
}
.fl-range-status.done { background: rgba(46, 118, 38, 0.32); border-color: rgba(126, 224, 98, 0.5); color: #cbffb8; }

/* --- 跨服对战（原版竖版插画立牌 + 英雄榜领奖台 + 娱乐房） --- */
.fl-cross-pill {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.fl-cross-pill.ok { background: rgba(42, 112, 34, 0.42); color: #9eff8a; border: 1px solid rgba(120, 232, 98, 0.45); }
.fl-cross-pill.off { background: rgba(98, 66, 30, 0.45); color: #ffd48a; border: 1px solid var(--bronze-soft); }

.fl-queue-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(168, 86, 18, 0.72), rgba(96, 44, 14, 0.85));
  border: 1.5px solid var(--gold);
  box-shadow: 0 0 16px rgba(255, 196, 72, 0.3);
}
.fl-q-left { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #fff6dc; }
.fl-q-spin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 226, 130, 0.3);
  border-top-color: var(--gold);
  animation: flSpin 0.85s linear infinite;
  flex-shrink: 0;
}
@keyframes flSpin { to { transform: rotate(360deg); } }

.fl-pvp-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.fl-pvp-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.16s, border-color 0.16s;
}
.fl-pvp-card:hover:not(.locked) { transform: translateY(-3px); border-color: var(--gold); }
.fl-pvp-card.locked { opacity: 0.62; }
.fl-pvp-art {
  position: relative;
  height: 186px;
  overflow: hidden;
  border-bottom: 1.5px solid var(--bronze);
}
.fl-pvp-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
}
.fl-pvp-art-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 10, 6, 0.1) 35%, rgba(16, 10, 6, 0.82) 100%);
}
.fl-pvp-vs-wrap {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.72));
}
.fl-pvp-vs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.fl-pvp-vs-wrap span {
  position: relative;
  z-index: 2;
  font-size: 12px;
  font-weight: 900;
  color: #fff6ce;
  text-shadow: 0 1px 3px #3a1204;
}
.fl-pvp-qcnt {
  position: absolute;
  left: 10px;
  bottom: 8px;
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(16, 10, 6, 0.78);
  border: 1px solid var(--bronze-soft);
  color: var(--bone);
}
.fl-pvp-qcnt b { color: var(--gold); }
.fl-pvp-info {
  padding: 13px 14px 15px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}
.fl-pvp-info h3 { margin: 0; font-size: 17px; color: var(--gold-hi); }
.fl-pvp-info p { margin: 0 0 auto; font-size: 12.5px; color: var(--bone-dim); line-height: 1.55; }
.fl-pvp-info .fl-fire-cta { width: 100%; margin-top: 6px; }
.fl-pvp-note {
  margin-top: 12px;
  padding: 9px 14px;
  border-radius: 8px;
  background: rgba(24, 16, 10, 0.75);
  border: 1px dashed var(--bronze-soft);
  font-size: 12px;
  color: var(--bone-dim);
  text-align: center;
}

.fl-room-tools { display: flex; gap: 10px; margin-bottom: 12px; align-items: center; }
.fl-room-list { display: flex; flex-direction: column; gap: 8px; }
.fl-room-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}
.fl-rm-title { font-size: 15px; font-weight: 800; color: var(--gold-hi); }
.fl-rm-id { font-size: 12px; color: var(--bone-dim); font-weight: 400; }
.fl-rm-sub { font-size: 12px; color: var(--bone-dim); margin-top: 3px; }
.fl-rm-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.fl-rm-cnt { font-size: 12px; color: var(--gold); font-weight: 700; }

.fl-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--bone-dim);
  font-size: 13px;
}
.fl-empty-ic { width: 64px; height: 64px; object-fit: contain; margin-bottom: 8px; opacity: 0.88; }
.fl-empty-inline { padding: 24px; text-align: center; color: var(--bone-dim); font-size: 13px; }

.fl-inroom { padding: 14px 16px; }
.fl-inroom-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bronze-soft);
  margin-bottom: 12px;
}
.fl-inroom-head h3 { margin: 0 0 4px; font-size: 17px; color: var(--gold-hi); }
.fl-inroom-head p { margin: 0; font-size: 12px; color: var(--bone-dim); }
.fl-inroom-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fl-rm-seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 12px; }
.fl-seat-card { padding: 10px 12px; position: relative; }
.fl-seat-card.team-0 { border-color: #52a8e8; }
.fl-seat-card.team-1 { border-color: #e8644e; }
.fl-seat-card.mine { box-shadow: 0 0 12px rgba(255, 212, 94, 0.35); }
.fl-seat-top { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 6px; }
.fl-seat-team { font-weight: 800; color: var(--gold); }
.fl-seat-st { color: var(--bone-dim); display: inline-flex; align-items: center; gap: 3px; }
.fl-seat-st.ok { color: var(--ok); font-weight: 700; }
.fl-mini-ic { width: 15px; height: 15px; object-fit: contain; }
.fl-seat-body { display: flex; align-items: center; gap: 8px; }
.fl-seat-name { font-size: 14px; font-weight: 800; color: var(--bone); }
.fl-seat-tank { font-size: 11.5px; color: var(--bone-dim); }
.fl-rm-chat { background: rgba(12, 8, 5, 0.6); border: 1px solid var(--bronze-soft); border-radius: 8px; padding: 10px; }
.fl-rm-chat-log { max-height: 112px; overflow-y: auto; font-size: 12px; line-height: 1.55; margin-bottom: 8px; }
.fl-chat-line strong { color: var(--gold); }
.fl-chat-empty { color: var(--bone-dim); font-size: 12px; }
.fl-rm-chat-form { display: flex; gap: 8px; }
.fl-rm-chat-in {
  flex: 1;
  background: #140c07;
  border: 1px solid var(--bronze-soft);
  color: var(--bone);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
}

/* 英雄榜领奖台 */
.fl-rank-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.fl-my-rank { margin-left: auto; font-size: 12px; color: var(--gold-hi); }
.fl-podium {
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  padding: 18px 16px 14px;
  min-height: 148px;
}
.fl-podium-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55);
}
.fl-podium-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 10, 6, 0.28), rgba(16, 10, 6, 0.86));
}
.fl-podium-slots {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  text-align: center;
}
.fl-pod-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
  border-radius: 10px;
  background: rgba(20, 12, 7, 0.65);
  border: 1px solid var(--bronze-soft);
}
.fl-pod-col.place-1 {
  padding-top: 14px;
  padding-bottom: 14px;
  border-color: var(--gold);
  background: rgba(88, 52, 16, 0.72);
  box-shadow: 0 0 18px rgba(255, 212, 94, 0.25);
}
.fl-pod-medal { width: 42px; height: 42px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.7)); }
.fl-pod-col.place-1 .fl-pod-medal { width: 52px; height: 52px; }
.fl-pod-name { font-size: 14px; color: var(--gold-hi); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-pod-stat { font-size: 11px; color: var(--bone-dim); }

.fl-rank-table { overflow: hidden; }
.fl-rk-head, .fl-rk-row {
  display: grid;
  grid-template-columns: 74px 1.6fr 1fr 1fr;
  align-items: center;
  padding: 9px 14px;
  font-size: 13px;
}
.fl-rk-head {
  background: rgba(16, 10, 6, 0.75);
  color: var(--gold);
  font-weight: 800;
  border-bottom: 1px solid var(--bronze-soft);
}
.fl-rk-row { border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.fl-rk-row.top-1 { background: rgba(255, 206, 74, 0.11); }
.fl-rk-medal { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; }

/* --- 巨匠工坊（活体战车展台 + 5 属性条 + 4 科技 + 4 槽改装） --- */
.fl-garage-wrap {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.fl-g-list { display: flex; flex-direction: column; gap: 6px; }
.fl-g-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  border-radius: 9px;
  text-align: left;
  background: linear-gradient(180deg, rgba(56, 37, 23, 0.9), rgba(28, 18, 11, 0.94));
  border: 1.5px solid var(--bronze-soft);
  color: var(--bone);
  cursor: pointer;
}
.fl-g-item:hover { border-color: var(--gold); }
.fl-g-item.active {
  background: linear-gradient(180deg, rgba(132, 82, 28, 0.96), rgba(64, 38, 14, 0.98));
  border-color: var(--gold);
}
.fl-g-item.locked { opacity: 0.6; }
.fl-face-cv {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 7px;
  background: url(/static/fortress/ui/slot.webp) center / 100% 100% no-repeat;
}
.fl-g-meta { min-width: 0; flex: 1; }
.fl-g-meta strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-g-meta span { font-size: 11px; color: var(--bone-dim); }

.fl-g-detail { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fl-showcase {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  align-items: center;
}
.fl-show-stage {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid var(--bronze);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.65);
  background: #1a1009;
}
.fl-show-cv { display: block; width: 100%; height: auto; aspect-ratio: 320 / 220; }
.fl-show-badges {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.fl-ang-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 10, 6, 0.78);
  border: 1px solid var(--bronze-soft);
  color: var(--gold-hi);
}
.fl-show-info { min-width: 0; }
.fl-gd-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.fl-gd-head-row h3 { margin: 0; font-size: 19px; color: var(--gold-hi); }
.fl-gd-pet { font-size: 12px; color: var(--bone-dim); margin-top: 2px; }
.fl-gd-desc { margin: 0 0 10px; font-size: 12.5px; color: var(--bone); line-height: 1.5; }

.fl-stat-list { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.fl-sbar-row { display: grid; grid-template-columns: 38px 1fr 74px; align-items: center; gap: 8px; font-size: 12px; }
.fl-sbar-lbl { color: var(--bone-dim); font-weight: 700; }
.fl-sbar-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #120b06;
  border: 1px solid rgba(201, 147, 63, 0.35);
  overflow: hidden;
}
.fl-sbar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }
.fl-sbar-fill.hp { background: linear-gradient(90deg, #2f9a34, #7fe86a); }
.fl-sbar-fill.atk { background: linear-gradient(90deg, #b0481c, #ffb040); }
.fl-sbar-fill.def { background: linear-gradient(90deg, #1c6a9a, #7fd8ff); }
.fl-sbar-fill.fuel { background: linear-gradient(90deg, #3a7a3a, #b8ec4e); }
.fl-sbar-fill.climb { background: linear-gradient(90deg, #7a5a2a, #e0b46a); }
.fl-sbar-add {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--gold);
  opacity: 0.9;
}
.fl-sbar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--bone); }
.fl-sbar-val em { font-style: normal; color: var(--gold); font-size: 11px; margin-left: 2px; }

.fl-gd-ammo {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(14, 9, 5, 0.65);
  border: 1px solid var(--bronze-soft);
}
.fl-gd-ammo b { color: var(--gold); }

.fl-g-sec { padding: 12px 14px; }
.fl-g-sec .fl-sec-hd { margin-top: 0; }
.fl-ug-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fl-ug-card {
  padding: 10px;
  border-radius: 8px;
  background: rgba(16, 10, 6, 0.68);
  border: 1px solid var(--bronze-soft);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.fl-ug-top { display: flex; justify-content: space-between; font-size: 13px; }
.fl-ug-top strong { color: var(--gold-hi); }
.fl-ug-top span { color: var(--gold); font-weight: 700; font-size: 12px; }
.fl-ug-tip { font-size: 11px; color: var(--bone-dim); margin-bottom: 4px; }

.fl-mod-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fl-mod-col {
  padding: 9px;
  border-radius: 8px;
  background: rgba(16, 10, 6, 0.56);
  border: 1px solid rgba(201, 147, 63, 0.3);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.fl-mod-col h4 { margin: 0 0 4px; font-size: 12px; color: var(--gold); }
.fl-mod-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(54, 36, 22, 0.7);
  border: 1px solid rgba(201, 147, 63, 0.35);
  color: var(--bone);
  font-size: 11.5px;
  cursor: pointer;
  text-align: left;
}
.fl-mod-chip strong { font-weight: 700; }
.fl-mod-chip span { font-size: 10.5px; color: var(--bone-dim); white-space: nowrap; }
.fl-mod-chip.active {
  background: linear-gradient(180deg, rgba(164, 104, 28, 0.85), rgba(92, 54, 14, 0.92));
  border-color: var(--gold);
  color: #fff9e0;
}
.fl-mod-chip.active span { color: #ffe7a0; }

/* --- 庆典商店 --- */
.fl-shop-banner {
  position: relative;
  overflow: hidden;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.fl-shop-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.45);
}
.fl-shop-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(24, 11, 6, 0.84), rgba(24, 11, 6, 0.48));
}
.fl-shop-head-in {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.fl-shop-head-in h3 { margin: 6px 0 4px; font-size: 18px; color: var(--gold-hi); }
.fl-recv-inline { font-size: 12px; color: var(--bone); }
.fl-warn-txt { color: #ffad78; }
.fl-shop-wallet { display: flex; gap: 14px; }
.fl-shop-wallet > div {
  padding: 8px 14px;
  border-radius: 9px;
  background: rgba(16, 10, 6, 0.78);
  border: 1px solid var(--bronze);
  text-align: center;
}
.fl-shop-wallet span { display: block; font-size: 11px; color: var(--bone-dim); }
.fl-shop-wallet strong { font-size: 19px; color: var(--gold); }

.fl-ms-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.fl-ms-card {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.fl-ms-card.ready { border-color: var(--gold); box-shadow: 0 0 12px rgba(255, 212, 94, 0.25); }
.fl-ms-card.claimed { opacity: 0.68; border-color: #66b856; }
.fl-ms-step { font-size: 11px; color: var(--gold); font-weight: 700; }
.fl-ms-title { font-size: 13.5px; font-weight: 800; color: var(--bone); }
.fl-ms-desc { font-size: 11.5px; color: var(--bone-dim); margin-bottom: auto; }

.fl-shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.fl-shop-card {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fl-shop-card.locked { opacity: 0.58; }
.fl-sh-top { display: flex; align-items: center; gap: 10px; }
.fl-sh-slot {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url(/static/fortress/ui/slot.webp) center / 100% 100% no-repeat;
}
.fl-sh-info strong { display: block; font-size: 14px; color: var(--gold-hi); }
.fl-sh-info span { font-size: 11px; color: var(--bone-dim); }
.fl-sh-desc { font-size: 12px; color: var(--bone); line-height: 1.45; margin-bottom: auto; }
.fl-sh-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fl-sh-price { font-size: 14px; font-weight: 900; color: var(--gold); }

/* --- 大厅底部常驻出战配置栏 --- */
.fl-dock {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px calc(16px + var(--safe-r)) calc(7px + var(--safe-b)) calc(16px + var(--safe-l));
  background:
    linear-gradient(180deg, rgba(38, 24, 14, 0.85), rgba(18, 11, 7, 0.96)),
    url(/static/fortress/ui/wood.webp);
  background-size: cover, 220px auto;
  border-top: 2px solid var(--bronze);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.55);
}
.fl-dock-pick {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px 4px 5px;
  border-radius: 9px;
  background: rgba(16, 10, 6, 0.72);
  border: 1.5px solid var(--bronze);
  color: var(--bone);
  cursor: pointer;
  text-align: left;
}
.fl-dock-pick:hover { border-color: var(--gold); }
.fl-dock-face {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: url(/static/fortress/ui/slot.webp) center / 100% 100% no-repeat;
}
.fl-dock-tmeta strong { display: block; font-size: 13px; color: var(--gold-hi); }
.fl-dock-tmeta span { display: block; font-size: 11px; color: var(--bone-dim); }
.fl-dock-items { display: flex; align-items: center; gap: 6px; }
.fl-dock-lbl { font-size: 12px; color: var(--bone-dim); white-space: nowrap; }
.fl-dock-it {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 4px;
  border-radius: 8px;
  background: url(/static/fortress/ui/slot.webp) left center / 38px 38px no-repeat, rgba(22, 14, 9, 0.85);
  border: 1px solid var(--bronze-soft);
  color: var(--bone);
  font-size: 11.5px;
  cursor: pointer;
}
.fl-dock-it:hover { border-color: var(--gold); }
.fl-dock-ic { width: 32px; height: 32px; display: block; }
.fl-dock-pool { font-size: 12px; color: var(--bone-dim); white-space: nowrap; }
.fl-dock-pool strong { color: var(--gold); }

/* --- 弹窗、登录框、轻提示、邀请卡 --- */
.fl-modal-mask, .fa-login-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(8, 5, 3, 0.74);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.fl-modal {
  width: min(440px, 94vw);
  max-height: 86dvh;
  overflow-y: auto;
  padding: 18px 20px;
}
.fl-modal.wide { width: min(640px, 95vw); }
.fl-modal h3 { margin: 0 0 14px; font-size: 17px; color: var(--gold); }
.fl-form-row { display: flex; flex-direction: column; gap: 5px; margin-bottom: 11px; font-size: 12.5px; color: var(--bone-dim); }
.fl-form-row input[type="text"],
.fl-form-row input[type="password"],
.fl-form-row select {
  width: 100%;
  padding: 9px 11px;
  border-radius: 7px;
  background: #140c07;
  border: 1.5px solid var(--bronze-soft);
  color: var(--bone);
  font-size: 13.5px;
}
.fl-inline-chk { display: flex; align-items: center; gap: 7px; color: var(--bone); cursor: pointer; }
.fa-cap-row { display: flex; gap: 8px; align-items: center; }
.fa-cap-img { height: 38px; border-radius: 6px; border: 1px solid var(--bronze); cursor: pointer; background: #fff; }
.fa-login-err { min-height: 18px; font-size: 12px; color: #ff8c72; margin-bottom: 8px; }
.fl-modal-acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

.fl-tk-grid, .fl-it-grid, .fl-pick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.fl-tk-opt, .fl-it-opt, .fl-pick-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(24, 15, 9, 0.88);
  border: 1.5px solid var(--bronze-soft);
  color: var(--bone);
  text-align: left;
  cursor: pointer;
}
.fl-tk-opt strong, .fl-it-opt strong { display: block; font-size: 13px; color: var(--gold-hi); }
.fl-tk-opt span, .fl-it-opt span { display: block; font-size: 11px; color: var(--bone-dim); line-height: 1.35; }
.fl-tk-opt.active, .fl-it-opt.active { border-color: var(--gold); background: rgba(132, 82, 24, 0.55); }
.fl-tk-opt.locked { opacity: 0.45; cursor: not-allowed; }
.fl-it-opt.used { border-color: rgba(120, 212, 92, 0.5); }

.fa-toast-box {
  position: fixed;
  top: calc(14px + var(--safe-t));
  left: 50%;
  transform: translateX(-50%);
  z-index: 160;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 92vw;
}
.fa-toast {
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(28, 18, 11, 0.94);
  border: 1.5px solid var(--bronze);
  color: var(--gold-hi);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  transition: opacity 0.4s;
  text-align: center;
}
.fa-toast.ok { border-color: #79e064; color: #d8ffce; }
.fa-toast.err { border-color: #ff6e52; color: #ffd4ca; }
.fa-toast.fade { opacity: 0; }

.fa-invite-box {
  position: fixed;
  right: 16px;
  bottom: 76px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fa-invite-card { padding: 12px 14px; width: min(300px, 88vw); }
.fa-inv-title { font-size: 13px; font-weight: 900; color: var(--gold); margin-bottom: 4px; }
.fa-inv-msg { font-size: 12.5px; color: var(--bone); margin-bottom: 10px; }
.fa-inv-acts { display: flex; justify-content: flex-end; gap: 8px; }

/* ==================== 4. 战斗主界面与原版手绘 HUD（PC 默认） ==================== */
.fb-root {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  background: #0b111c;
}

.fb-stage-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
}

.fb-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}
.fb-canvas:active { cursor: grabbing; }

/* 顶部原版浮层（左行动顺位 / 中风向仪+天象 / 右倒计时球+功能钮） */
.fb-topbar {
  position: absolute;
  top: calc(6px + var(--safe-t));
  left: calc(8px + var(--safe-l));
  right: calc(8px + var(--safe-r));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
  z-index: 12;
}
.fb-topbar > * { pointer-events: auto; }

.fb-order-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.fb-order { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.fb-ord-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px 2px 3px;
  border-radius: 999px;
  background: rgba(18, 12, 8, 0.82);
  border: 1.5px solid var(--bronze-soft);
  font-size: 11px;
  color: var(--bone);
}
.fb-ord-chip.team-0 { border-color: #54b2f0; }
.fb-ord-chip.team-1 { border-color: #f0624c; }
.fb-ord-chip.now {
  background: rgba(138, 78, 18, 0.92);
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(255, 212, 94, 0.5);
  font-weight: 800;
}
.fb-ord-chip em { font-style: normal; white-space: nowrap; }
.fb-ord-av { width: 22px; height: 22px; border-radius: 50%; background: #261a10; }
.fb-mode-sub {
  font-size: 11px;
  color: var(--gold-hi);
  text-shadow: 0 1px 3px #000;
  padding-left: 4px;
}

.fb-wind-canvas-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.fb-wind-cv {
  display: block;
  width: 236px;
  height: 62px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}
.fb-weather-slot {
  appearance: none;
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(18, 12, 8, 0.8);
  border: 1.5px solid var(--bronze-soft);
  cursor: pointer;
  transition: border-color 0.14s, transform 0.1s, background 0.14s;
}
.fb-weather-slot:hover { border-color: var(--gold); background: rgba(64, 42, 22, 0.88); }
.fb-weather-slot:active { transform: scale(0.95); }
.fb-weather-ic { width: 32px; height: 32px; display: block; pointer-events: none; }
.fb-weather-txt { font-size: 10px; color: var(--gold-hi); white-space: nowrap; pointer-events: none; }

.fb-right-hud {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fb-orb-cv {
  width: 52px;
  height: 52px;
  display: block;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.65));
}
.fb-top-actions { display: flex; gap: 5px; flex-wrap: nowrap; }
.fb-mini-btn {
  min-width: 44px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(64, 42, 24, 0.92), rgba(30, 19, 12, 0.95));
  border: 1.5px solid var(--bronze);
  color: var(--bone);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: border-color 0.12s, filter 0.12s, transform 0.08s;
}
.fb-mini-btn:hover { border-color: var(--gold); color: var(--gold-hi); }
.fb-mini-btn:active { transform: scale(0.95); }
.fb-mini-btn.active {
  background: linear-gradient(180deg, #b86f1c, #6e3c0c);
  border-color: var(--gold);
  color: #fff8de;
  box-shadow: 0 0 10px rgba(255, 212, 94, 0.55);
}
.fb-mini-btn.danger { background: linear-gradient(180deg, #b63622, #6e1a0e); border-color: #ff8e72; color: #fff0e4; }
.fb-btn-radar { display: none; }

/* 平板与移动端顶部紧凑己方状态胶囊条（桌面端 >980px 隐藏，改用左下完整状态卡） */
.fb-mob-vitals {
  display: none;
  position: absolute;
  top: calc(44px + var(--safe-t));
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(18, 11, 7, 0.84);
  border: 1px solid var(--bronze-soft);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  max-width: calc(100vw - 16px);
}
.fb-mv-name {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-hi);
  white-space: nowrap;
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fb-mv-bar {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: #0f0805;
  border: 1px solid rgba(201, 147, 63, 0.45);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fb-mv-bar.hp { width: 102px; }
.fb-mv-bar.rage { width: 58px; }
.fb-mv-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  transition: width 0.2s;
}
.fb-mv-hp { background: linear-gradient(90deg, #2d8a32, #7be662); }
.fb-mv-rg { background: linear-gradient(90deg, #c64416, #ffbe3b); }
.fb-mv-bar span {
  position: relative;
  z-index: 1;
  font-size: 9.5px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px #000;
  white-space: nowrap;
  padding: 0 4px;
}

/* 右上战场雷达 */
.fb-radar-wrap {
  position: absolute;
  top: calc(70px + var(--safe-t));
  right: calc(10px + var(--safe-r));
  z-index: 11;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--bronze);
  background: rgba(12, 18, 30, 0.88);
  box-shadow: 0 0 0 1.5px var(--ink), 0 6px 16px rgba(0, 0, 0, 0.6);
  cursor: pointer;
}
.fb-radar { display: block; width: 204px; height: 102px; }
.fb-map-tag {
  font-size: 11px;
  text-align: center;
  padding: 2px 6px;
  background: rgba(20, 12, 7, 0.9);
  color: var(--gold-hi);
  border-top: 1px solid var(--bronze-soft);
}

/* 回合大字横幅 */
.fb-banner-layer {
  position: absolute;
  top: 24%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 18;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.fb-banner-item {
  padding: 10px 28px;
  border-radius: 10px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fff8de;
  background: linear-gradient(90deg, rgba(24, 14, 7, 0.2), rgba(140, 72, 18, 0.92) 20%, rgba(140, 72, 18, 0.92) 80%, rgba(24, 14, 7, 0.2));
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  text-shadow: 0 2px 6px #1c0b02;
  animation: fbBannerIn 0.25s ease-out;
}
@keyframes fbBannerIn { from { opacity: 0; transform: scale(0.86); } to { opacity: 1; transform: scale(1); } }
@keyframes fbToastIn { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes fbSReady {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 194, 72, 0.65), 0 0 16px rgba(196, 86, 255, 0.45); border-color: #ffe27a; }
  50% { box-shadow: 0 0 16px rgba(255, 224, 118, 0.95), 0 0 24px rgba(226, 114, 255, 0.78); border-color: #fff6c8; }
}

/* 点选弹种 / 道具 / 天象 / 侦察浮出说明气泡 */
.fb-skill-toast {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 26;
  max-width: min(440px, 90vw);
  padding: 7px 14px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(50, 32, 18, 0.95), rgba(22, 13, 8, 0.97));
  border: 1.5px solid var(--gold);
  box-shadow: 0 0 0 1.5px var(--ink), 0 8px 22px rgba(0, 0, 0, 0.72);
  text-align: center;
  pointer-events: none;
  animation: fbToastIn 0.16s ease-out;
}
.fb-skill-toast strong {
  display: block;
  font-size: 12.5px;
  font-weight: 900;
  color: var(--gold-hi);
  margin-bottom: 2px;
}
.fb-skill-toast span {
  display: block;
  font-size: 11.5px;
  color: var(--bone);
  line-height: 1.35;
}

/* 蓄力中央超大悬浮进度仪（全端可视、移动端上滑取消防误射） */
.fb-charge-float {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 28;
  width: min(360px, 86vw);
  padding: 10px 14px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(42, 25, 13, 0.94), rgba(18, 10, 6, 0.97));
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 2px var(--ink), 0 10px 28px rgba(0, 0, 0, 0.78), 0 0 22px rgba(255, 196, 62, 0.35);
  pointer-events: none;
  transition: border-color 0.12s, background 0.12s;
}
.fb-charge-float.canceling {
  border-color: #ff5b45;
  background: linear-gradient(180deg, rgba(102, 22, 16, 0.96), rgba(48, 10, 8, 0.98));
  box-shadow: 0 0 0 2px var(--ink), 0 10px 28px rgba(0, 0, 0, 0.8), 0 0 26px rgba(255, 72, 52, 0.65);
}
.fb-cf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.fb-cf-num {
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  color: var(--gold-hi);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.92);
}
.fb-charge-float.canceling .fb-cf-num { color: #ffb4a8; }
.fb-cf-tip {
  font-size: 12px;
  font-weight: 700;
  color: var(--bone);
  white-space: nowrap;
}
.fb-charge-float.canceling .fb-cf-tip { color: #fff0ec; font-weight: 900; }
.fb-cf-track {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: #0c0704;
  border: 1.5px solid var(--bronze);
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9);
}
.fb-cf-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #52cc58 0%, #f2cf3a 55%, #ff6b26 85%, #ff2e22 100%);
  box-shadow: inset -2px 0 0 #fffbe6;
}
.fb-charge-float.canceling .fb-cf-fill {
  background: linear-gradient(90deg, #983226, #e64532);
}
.fb-cf-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #ffffff;
  box-shadow: 0 0 8px #ffffff;
  z-index: 2;
  left: 55%;
}

/* 手机竖屏友好轻提示 */
.fb-portrait-tip {
  position: absolute;
  top: calc(74px + var(--safe-t));
  left: 50%;
  transform: translateX(-50%);
  z-index: 14;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  max-width: 92vw;
  border-radius: 999px;
  background: rgba(20, 13, 8, 0.88);
  border: 1px solid var(--bronze);
  color: var(--gold-hi);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fb-ptip-close {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

/* 战局喊话/表情抽屉 */
.fb-chat-drawer {
  position: absolute;
  right: calc(10px + var(--safe-r));
  bottom: 10px;
  width: min(310px, 88vw);
  z-index: 25;
  padding: 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(44, 29, 18, 0.96), rgba(22, 14, 9, 0.98));
  border: 1.5px solid var(--bronze);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.72);
}
.fb-chat-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.fb-ctab {
  flex: 1;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(16, 10, 6, 0.75);
  border: 1px solid var(--bronze-soft);
  color: var(--bone-dim);
  font-size: 12px;
  cursor: pointer;
}
.fb-ctab.active { background: #8a5218; color: var(--gold-hi); border-color: var(--gold); font-weight: 700; }
.fb-chat-body { max-height: 180px; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.fb-qchat-btn {
  text-align: left;
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(24, 15, 9, 0.8);
  border: 1px solid rgba(201, 147, 63, 0.3);
  color: var(--bone);
  font-size: 12px;
  cursor: pointer;
}
.fb-qchat-btn:hover { border-color: var(--gold); background: rgba(112, 68, 22, 0.6); }
.fb-emote-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.fb-emote-btn {
  padding: 4px;
  border-radius: 6px;
  background: rgba(24, 15, 9, 0.82);
  border: 1px solid var(--bronze-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fb-chat-form { display: flex; gap: 6px; }
.fb-chat-input {
  flex: 1;
  background: #120a06;
  border: 1px solid var(--bronze-soft);
  border-radius: 6px;
  color: var(--bone);
  padding: 6px 8px;
  font-size: 12px;
}
.fb-chat-send {
  padding: 6px 12px;
  border-radius: 6px;
  background: linear-gradient(180deg, #f7c552, #b9781c);
  border: 1px solid #ffe28a;
  color: #2b1504;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

/* 战前资源预载遮罩 */
.fb-load-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: radial-gradient(circle at 50% 45%, rgba(36, 22, 12, 0.94), rgba(10, 7, 5, 0.98));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.fb-load-card {
  width: min(420px, 90vw);
  padding: 22px 22px 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(54, 35, 21, 0.95), rgba(24, 15, 10, 0.98));
  border: 2px solid var(--bronze);
  box-shadow: 0 0 0 2px var(--ink), 0 14px 36px rgba(0, 0, 0, 0.72);
  text-align: center;
}
.fb-load-map { font-size: 19px; font-weight: 900; color: var(--gold); margin-bottom: 6px; }
.fb-load-sub { font-size: 12.5px; color: var(--bone-dim); margin-bottom: 12px; }
.fb-load-bar {
  height: 12px;
  border-radius: 999px;
  background: #100905;
  border: 1.5px solid var(--bronze);
  overflow: hidden;
}
.fb-load-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #d25518, #f7a82c, #ffe37a);
  transition: width 0.16s ease-out;
}
.fb-load-pct { margin-top: 8px; font-size: 13px; font-weight: 800; color: var(--gold-hi); }

/* 结算大幕（原版 crest_win/lose + star_on/off） */
.fb-result-mask {
  position: absolute;
  inset: 0;
  z-index: 45;
  background: rgba(8, 5, 3, 0.78);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.fb-res-card {
  width: min(440px, 92vw);
  padding: 22px 20px 20px;
  border-radius: 14px;
  text-align: center;
  background: linear-gradient(180deg, rgba(56, 36, 20, 0.96), rgba(22, 14, 9, 0.98));
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 2px var(--ink), 0 18px 44px rgba(0, 0, 0, 0.8);
}
.fb-res-card.lose { border-color: #9e7a56; }
.fb-res-crest { width: 148px; height: auto; display: block; margin: -44px auto 6px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.7)); }
.fb-res-title { font-size: 24px; font-weight: 900; color: var(--gold-hi); margin-bottom: 8px; }
.fb-res-stars { display: flex; justify-content: center; gap: 10px; margin-bottom: 12px; }
.fb-res-star-img { width: 38px; height: 38px; object-fit: contain; }
.fb-res-rewards { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.fb-res-chip {
  padding: 8px 14px;
  border-radius: 9px;
  background: rgba(16, 10, 6, 0.78);
  border: 1px solid var(--bronze);
}
.fb-res-chip span { display: block; font-size: 11px; color: var(--bone-dim); }
.fb-res-chip strong { font-size: 17px; color: var(--gold); }
.fb-res-first { font-size: 12px; color: #9bff82; margin-bottom: 12px; font-weight: 700; }
.fb-res-msg { font-size: 13.5px; color: var(--bone); margin: 0 0 14px; }
.fb-res-btns { display: flex; justify-content: center; gap: 10px; }
.fb-res-btn {
  min-width: 140px;
  height: 44px;
  border: none;
  border-radius: 9px;
  background: url(/static/fortress/ui/fire.webp) center / 100% 100% no-repeat;
  color: #fff8de;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

/* ==================== 5. 底部原版手绘浮雕操控台（木纹底 + dial + slot + fire） ==================== */
.fb-hud {
  flex: 0 0 auto;
  padding: 7px calc(12px + var(--safe-r)) calc(8px + var(--safe-b)) calc(12px + var(--safe-l));
  background:
    linear-gradient(180deg, rgba(44, 28, 16, 0.84), rgba(20, 12, 7, 0.96)),
    url(/static/fortress/ui/wood.webp);
  background-size: cover, 240px auto;
  border-top: 2px solid var(--bronze);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 232, 164, 0.22);
  z-index: 15;
}

.fb-hud-main {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 168px 146px minmax(0, 1fr) 124px;
  align-items: center;
  gap: 10px;
}

/* 左侧：头像 + 血/护盾/怒气/护甲克制卡 */
.fb-hud-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 9px;
  background: rgba(16, 10, 6, 0.76);
  border: 1.5px solid var(--bronze-soft);
}
.fb-me-face {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 7px;
  background: url(/static/fortress/ui/slot.webp) center / 100% 100% no-repeat;
}
.fb-me-bars { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.fb-me-name { font-size: 11.5px; font-weight: 800; color: var(--gold-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.15; }
.fb-stat-bar {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: #100906;
  border: 1px solid rgba(201, 147, 63, 0.45);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fb-stat-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; transition: width 0.2s; }
.fb-stat-bar.hp .fb-stat-fill { background: linear-gradient(90deg, #2d8a32, #7be662); }
.fb-stat-bar.sh { height: 5px; border-color: rgba(110, 198, 255, 0.35); background: rgba(12, 22, 34, 0.85); }
.fb-stat-bar.sh .fb-stat-fill { background: linear-gradient(90deg, #3da2f2, #9fe3ff); box-shadow: 0 0 6px rgba(100, 200, 255, 0.65); }
.fb-stat-bar.rage .fb-stat-fill { background: linear-gradient(90deg, #c64416, #ffbe3b); }
.fb-stat-bar span { position: relative; z-index: 1; font-size: 9.5px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px #000; }
.fb-me-armor {
  font-size: 10px;
  color: #dcc69a;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 中左：原版骨饰半圆仰角罗盘（支持手指/鼠标直接划动调角） */
.fb-hud-dial-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.fb-dial-cv {
  display: block;
  width: 136px;
  height: 82px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
  cursor: grab;
  touch-action: none;
}
.fb-dial-cv:active { cursor: grabbing; }
.fb-dial-ctl { display: flex; align-items: center; gap: 6px; }
.fb-angle-num {
  min-width: 40px;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.fb-ctl-btn {
  min-width: 36px;
  height: 30px;
  border-radius: 7px;
  background: linear-gradient(180deg, #865d33, #4c3016);
  border: 1.5px solid var(--bronze);
  color: var(--gold-hi);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}
.fb-ctl-btn.sm { min-width: 34px; height: 28px; font-size: 13px; }
.fb-ctl-btn:active { transform: scale(0.94); filter: brightness(1.2); }

/* 中央：力度条 + 10 等分刻度 + 油料移动 + 3 弹种 + 4 道具槽 */
.fb-hud-center { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fb-power-box { display: grid; grid-template-columns: 1fr 164px; gap: 8px; align-items: center; }
.fb-power-track {
  position: relative;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(180deg, #0d0805, #22160e);
  border: 1.5px solid var(--bronze);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fb-power-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #52cc58 0%, #f2cf3a 55%, #ff6b26 85%, #ff2e22 100%);
  box-shadow: inset -2px 0 0 rgba(255, 250, 224, 0.92), 0 0 10px rgba(255, 190, 62, 0.45);
}
.fb-power-ticks {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-evenly;
  align-items: flex-end;
  pointer-events: none;
  z-index: 2;
}
.fb-power-ticks i {
  display: block;
  width: 1px;
  height: 7px;
  background: rgba(255, 240, 198, 0.36);
}
.fb-power-ticks i.mid {
  width: 1.5px;
  height: 13px;
  background: rgba(255, 232, 160, 0.72);
}
.fb-power-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2.5px;
  background: #ffffff;
  box-shadow: 0 0 6px #ffffff;
  z-index: 3;
  left: 55%;
}
.fb-power-mark::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #ffffff;
}
.fb-power-hint {
  position: relative;
  z-index: 4;
  font-size: 12px;
  font-weight: 800;
  color: #e9ddc0;
  text-shadow: 0 1px 3px #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
}
.fb-power-hint.mine { color: #fff7cf; }

.fb-move-row { display: flex; align-items: center; gap: 5px; }
.fb-fuel-bar {
  position: relative;
  flex: 1;
  height: 22px;
  border-radius: 999px;
  background: #100905;
  border: 1px solid var(--bronze-soft);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fb-fuel-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: linear-gradient(90deg, #3c8e3c, #a4e446); }
.fb-fuel-txt { position: relative; z-index: 1; font-size: 10.5px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px #000; }

.fb-slots-row { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.fb-slots-row::-webkit-scrollbar { display: none; }
.fb-ammo-group, .fb-hud-items { display: flex; align-items: center; gap: 6px; }
.fb-slots-sep { width: 2px; height: 38px; background: linear-gradient(180deg, transparent, var(--bronze), transparent); flex-shrink: 0; }

/* 原版浮雕道具/弹药槽（ui/slot.webp） */
.fb-slot-btn {
  position: relative;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  padding: 4px;
  border: 1.5px solid transparent;
  border-radius: 9px;
  background: url(/static/fortress/ui/slot.webp) center / 100% 100% no-repeat;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, filter 0.12s;
}
.fb-slot-btn:hover:not(:disabled) { filter: brightness(1.14); }
.fb-slot-btn.s-ready {
  animation: fbSReady 1.3s ease-in-out infinite;
}
.fb-slot-btn.active,
.fb-slot-btn.picked {
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(255, 212, 94, 0.85), inset 0 0 10px rgba(255, 224, 110, 0.45);
  transform: translateY(-2px);
  filter: brightness(1.16);
}
.fb-slot-btn.picked::after {
  content: "✓";
  position: absolute;
  right: 2px;
  top: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffe97d, #d98818);
  border: 1.5px solid #2b1606;
  color: #2b1404;
  font-size: 10px;
  font-weight: 900;
  line-height: 12px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.72);
  pointer-events: none;
}
.fb-slot-btn.sealed {
  border-color: #df3a32;
}
.fb-slot-btn.sealed::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  height: 3px;
  background: linear-gradient(90deg, rgba(255, 72, 62, 0.92), rgba(255, 198, 92, 0.92), rgba(255, 72, 62, 0.92));
  box-shadow: 0 0 6px rgba(255, 50, 40, 0.85);
  transform: translateY(-50%) rotate(-32deg);
  pointer-events: none;
  z-index: 4;
}
.fb-slot-btn.locked, .fb-slot-btn.empty, .fb-slot-btn:disabled {
  opacity: 0.45;
  filter: grayscale(0.7);
  cursor: not-allowed;
}
.fb-slot-ic { width: 38px; height: 38px; display: block; pointer-events: none; }
.fb-sl-key {
  position: absolute;
  left: 3px;
  top: 2px;
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
  color: var(--gold-hi);
  background: rgba(16, 10, 6, 0.8);
  padding: 0 4px;
  border-radius: 4px;
  line-height: 14px;
}
.fb-rage-mini, .fb-it-cnt {
  position: absolute;
  right: 2px;
  bottom: 2px;
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(16, 10, 6, 0.88);
  color: var(--gold);
  line-height: 14px;
}

/* 右侧：熔岩开炮大键 + 待机石键 */
.fb-hud-fire-col { display: flex; flex-direction: column; gap: 6px; }
.fb-fire-btn {
  width: 100%;
  height: 54px;
  border: none;
  border-radius: 10px;
  background: url(/static/fortress/ui/fire.webp) center / 100% 100% no-repeat;
  color: #fff8de;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 2px 5px #4e1202;
  cursor: pointer;
  touch-action: none;
  filter: drop-shadow(0 4px 10px rgba(240, 96, 28, 0.52));
  transition: transform 0.08s, filter 0.12s;
}
.fb-fire-btn.charging {
  transform: scale(0.96);
  filter: brightness(1.24) drop-shadow(0 0 16px rgba(255, 196, 62, 0.9));
}
.fb-fire-btn.canceling {
  filter: hue-rotate(-18deg) saturate(1.45) brightness(0.92) drop-shadow(0 0 14px rgba(255, 62, 48, 0.95));
}
.fb-fire-btn:disabled { filter: grayscale(0.85) brightness(0.6); cursor: not-allowed; }
.fb-pass-btn {
  width: 100%;
  height: 28px;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(138, 130, 116, 0.86), rgba(74, 68, 60, 0.94)), url(/static/fortress/ui/stone.webp);
  background-size: cover;
  border: 1.5px solid #968c7a;
  color: #f4edd9;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.fb-pass-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.fb-hud-spec {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 6px;
  font-size: 13px;
  color: var(--gold-hi);
}

/* ==================== 6. 平板与窄桌面适配（<= 980px） ==================== */
@media (max-width: 980px) {
  .fl-camp-layout, .fl-garage-wrap { grid-template-columns: 1fr; }
  .fl-chap-list, .fl-g-list {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .fl-chap-list::-webkit-scrollbar, .fl-g-list::-webkit-scrollbar { display: none; }
  .fl-chap-card, .fl-g-item { flex: 0 0 170px; }
  .fl-showcase { grid-template-columns: 260px minmax(0, 1fr); }
  .fl-ug-grid, .fl-mod-cols, .fl-ms-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fl-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fl-puzzle-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .fb-hud-main { grid-template-columns: 128px minmax(0, 1fr) 106px; }
  .fb-hud-status { display: none; }
  .fb-mob-vitals { display: flex; top: calc(64px + var(--safe-t)); }
  .fb-wind-cv { width: 196px; height: 52px; }
}

/* ==================== 7. 手机端全套深度适配（<= 768px） ==================== */
@media (max-width: 768px) {
  /* 顶栏清晰双层紧凑，绝不重叠不裁切 */
  .fa-header {
    flex-direction: column;
    align-items: stretch;
    padding: calc(4px + var(--safe-t)) 8px 5px;
    gap: 5px;
    min-height: auto;
  }
  .fa-brand {
    justify-content: space-between;
    width: 100%;
    gap: 6px;
  }
  .fa-logo-badge { height: 32px; min-width: 122px; padding: 0 16px 3px; }
  .fa-logo-badge span { font-size: 13px; letter-spacing: 1px; }
  .fa-brand-badge, .fa-w-rank, .fa-w-rank + .sep { display: none; }
  .fa-nav-links { margin-left: auto; gap: 5px; }
  .fa-nav-link { padding: 3px 8px; font-size: 11px; }

  .fa-status-bar {
    width: 100%;
    justify-content: space-between;
    gap: 5px;
  }
  .fa-wallet { padding: 3px 8px; font-size: 11px; gap: 5px; flex-shrink: 0; }
  .fa-auth-box { gap: 4px; min-width: 0; margin-left: auto; }
  .fa-acc-tag { display: none; }
  .fa-char-sel { max-width: 72px; padding: 3px 4px; font-size: 11px; }
  .fa-auth-box [data-account-switch] button {
    padding: 3px 7px !important;
    font-size: 11px !important;
    min-height: 28px !important;
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #fa-btn-logout { min-height: 28px; padding: 2px 7px; font-size: 11px; }
  .fa-btn-mute { min-width: 28px; height: 28px; font-size: 13px; flex-shrink: 0; }

  /* 手机端大厅：5 大页签落到底部固定游戏导航栏 */
  .fl-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 4px 4px calc(4px + var(--safe-b));
    background:
      linear-gradient(180deg, rgba(36, 22, 13, 0.96), rgba(16, 10, 6, 0.99)),
      url(/static/fortress/ui/wood.webp);
    border-top: 2px solid var(--bronze);
    border-bottom: none;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.72);
  }
  .fl-tab {
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    height: 50px;
    padding: 3px 2px;
    border-radius: 7px;
    border-width: 1px;
  }
  .fl-tab-ic { width: 22px; height: 22px; }
  .fl-tab-full { display: none; }
  .fl-tab-short { display: block; font-size: 11px; line-height: 1.1; }

  /* 出战配置条紧贴底部导航上方，极度紧凑单行 */
  .fl-dock {
    padding: 5px 8px;
    margin-bottom: calc(58px + var(--safe-b));
    gap: 6px;
  }
  .fl-dock-tmeta span, .fl-dock-lbl, .fl-dock-pool, .fl-dock-it span { display: none; }
  .fl-dock-pick { padding: 3px 8px 3px 4px; gap: 6px; }
  .fl-dock-face { width: 34px; height: 34px; }
  .fl-dock-tmeta strong { font-size: 12px; max-width: 78px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fl-dock-it { padding: 2px; background-size: 100% 100%; }
  .fl-dock-ic { width: 30px; height: 30px; }

  .fl-body { padding: 10px 10px 14px; }
  .fl-act-full { display: none; }
  .fl-act-sm { display: inline; }
  .fl-toggle-elite { margin-left: 0; }
  .fl-cross-pill { margin-left: 0; }

  .fl-stg-detail { flex-direction: column; align-items: stretch; gap: 12px; padding: 12px; }
  .fl-sd-right .fl-fire-cta { width: 100%; }
  .fl-node-orb { width: 36px; height: 36px; font-size: 14px; }
  .fl-node-sub { font-size: 10px; padding: 1px 4px; }

  .fl-pvp-cards, .fl-raid-grid, .fl-shop-grid { grid-template-columns: 1fr; }
  .fl-pvp-art { height: 152px; }
  .fl-puzzle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fl-showcase { grid-template-columns: 1fr; padding: 10px; gap: 10px; }
  .fl-gd-ammo { grid-template-columns: 1fr; }
  .fl-rk-head, .fl-rk-row { grid-template-columns: 52px 1.4fr 0.9fr 0.9fr; padding: 8px 10px; font-size: 12px; }
  .fl-tk-grid, .fl-it-grid { grid-template-columns: 1fr; }

  /* --- 手机竖屏战斗 HUD：顶栏保留风向仪+迷你天象徽章+倒计时球+侦察/雷达/全景/喊话/退出 --- */
  .fb-topbar {
    top: calc(4px + var(--safe-t));
    left: 6px;
    right: 6px;
    align-items: center;
    gap: 4px;
  }
  .fb-order-box, .fb-btn-mute { display: none; }
  .fb-wind-canvas-wrap { gap: 4px; flex-shrink: 0; }
  .fb-wind-cv { width: 112px; height: 32px; }
  .fb-weather-slot {
    width: 30px;
    height: 30px;
    padding: 2px;
    border-radius: 7px;
    flex-shrink: 0;
  }
  .fb-weather-ic { width: 24px; height: 24px; }
  .fb-weather-txt { display: none; }
  .fb-right-hud { gap: 4px; margin-left: auto; min-width: 0; }
  .fb-orb-cv { width: 34px; height: 34px; flex-shrink: 0; }
  .fb-top-actions { gap: 3px; }
  .fb-mini-btn {
    min-width: 0;
    height: 30px;
    padding: 0 6px;
    font-size: 11px;
    white-space: nowrap;
  }
  .fb-btn-radar { display: inline-flex; align-items: center; justify-content: center; }

  /* 顶部紧贴风向仪下方的己方血/盾/怒胶囊条 */
  .fb-mob-vitals {
    display: flex;
    top: calc(42px + var(--safe-t));
  }
  .fb-portrait-tip {
    top: calc(74px + var(--safe-t));
    padding: 4px 10px;
    font-size: 10.5px;
  }

  /* 雷达默认收起，点「雷达」键弹开 */
  .fb-radar-wrap {
    display: none;
    top: calc(72px + var(--safe-t));
    right: 8px;
  }
  .fb-radar-wrap.is-open { display: block; }
  .fb-radar { width: 168px; height: 84px; }

  /* 底部双层大拇指操控台：通栏 7 格全显（3 弹 + 4 道具零隐藏、自适应不溢出！） */
  .fb-hud {
    padding: 6px 8px calc(6px + var(--safe-b));
  }
  .fb-hud-main {
    display: grid;
    grid-template-columns: 106px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    gap: 5px 8px;
    align-items: center;
  }
  .fb-hud-center { display: contents; }
  .fb-slots-row {
    grid-column: 1 / 3;
    grid-row: 1;
    justify-content: center;
    gap: 6px;
    overflow: visible;
  }
  .fb-ammo-group, .fb-hud-items { gap: 4px; }
  .fb-slots-sep { height: 28px; margin: 0 2px; }
  .fb-slot-btn {
    flex: 0 0 clamp(38px, 11.4vw, 44px);
    width: clamp(38px, 11.4vw, 44px);
    height: clamp(38px, 11.4vw, 44px);
    padding: 3px;
  }
  .fb-slot-ic { width: 82%; height: 82%; }

  .fb-hud-dial-box { grid-column: 1; grid-row: 2 / 4; gap: 3px; }
  .fb-dial-cv { width: 102px; height: 58px; }
  .fb-ctl-btn { min-width: 32px; height: 32px; }
  .fb-angle-num { min-width: 28px; font-size: 12.5px; }

  .fb-power-box { grid-column: 2; grid-row: 2; grid-template-columns: 1fr; gap: 4px; }
  .fb-power-track { height: 22px; }
  .fb-power-hint { font-size: 11px; }
  .fb-move-row .fb-ctl-btn.sm { min-width: 38px; height: 30px; }
  .fb-fuel-bar { height: 20px; }

  .fb-hud-fire-col {
    grid-column: 2;
    grid-row: 3;
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }
  .fb-fire-btn { flex: 1; height: 46px; font-size: 16px; }
  .fb-pass-btn { flex: 0 0 58px; height: 46px; font-size: 12px; }
}

/* ==================== 7b. 极窄竖屏手机微调（<= 410px，360px/375px 零溢出） ==================== */
@media (max-width: 410px) {
  .fb-topbar { left: 4px; right: 4px; gap: 3px; }
  .fb-wind-canvas-wrap { gap: 3px; }
  .fb-wind-cv { width: 92px; height: 28px; }
  .fb-weather-slot { width: 28px; height: 28px; padding: 2px; }
  .fb-weather-ic { width: 22px; height: 22px; }
  .fb-right-hud { gap: 3px; }
  .fb-orb-cv { width: 30px; height: 30px; }
  .fb-top-actions { gap: 2px; }
  .fb-mini-btn { height: 28px; padding: 0 5px; font-size: 10.5px; border-radius: 6px; }
  .fb-mob-vitals { top: calc(38px + var(--safe-t)); padding: 2px 7px; gap: 5px; }
  .fb-mv-bar.hp { width: 88px; }
  .fb-mv-bar.rage { width: 52px; }
  .fb-portrait-tip { top: calc(68px + var(--safe-t)); font-size: 10px; }
  .fb-hud { padding: 5px 6px calc(5px + var(--safe-b)); }
  .fb-hud-main { grid-template-columns: 98px minmax(0, 1fr); gap: 4px 6px; }
  .fb-dial-cv { width: 94px; height: 54px; }
  .fb-ctl-btn { min-width: 30px; height: 30px; }
  .fb-pass-btn { flex: 0 0 52px; }
}

/* ==================== 8. 手机矮横屏战斗极简沉浸适配（留出 >=76% 战场净视野！） ==================== */
@media (max-height: 520px) and (orientation: landscape) {
  .fa-header { min-height: 40px; padding: 2px 10px; }
  .fa-logo-badge { height: 28px; min-width: 110px; }
  .fa-logo-badge span { font-size: 12px; }

  .fb-topbar { top: 4px; left: calc(6px + var(--safe-l)); right: calc(6px + var(--safe-r)); align-items: center; justify-content: space-between; }
  .fb-order-box { display: none; }
  /* 横屏把己方紧凑血盾怒条放在风向仪左下方，0% 重叠顶栏且不挡空中弹道！ */
  .fb-mob-vitals {
    display: flex;
    top: 46px;
    left: calc(8px + var(--safe-l));
    transform: none;
    padding: 2px 8px;
  }
  .fb-wind-canvas-wrap { margin-left: 0; margin-right: 0; gap: 4px; }
  .fb-wind-cv { width: 136px; height: 38px; }
  .fb-weather-slot { display: flex; width: 32px; height: 32px; padding: 2px; }
  .fb-weather-ic { width: 26px; height: 26px; }
  .fb-weather-txt { display: none; }
  .fb-orb-cv { width: 38px; height: 38px; }
  .fb-mini-btn { height: 30px; padding: 0 7px; font-size: 11px; }
  .fb-btn-radar { display: inline-flex; align-items: center; justify-content: center; }
  .fb-radar-wrap { display: none; top: 48px; right: calc(8px + var(--safe-r)); }
  .fb-radar-wrap.is-open { display: block; }
  .fb-radar { width: 164px; height: 82px; }
  .fb-portrait-tip { display: none !important; }
  .fb-charge-float { bottom: 10px; width: min(320px, 60vw); padding: 7px 12px 9px; }
  .fb-cf-num { font-size: 20px; }
  .fb-cf-track { height: 14px; }

  .fb-hud {
    padding: 4px calc(10px + var(--safe-r)) calc(4px + var(--safe-b)) calc(10px + var(--safe-l));
  }
  .fb-hud-main {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr) 128px;
    grid-template-rows: auto;
    gap: 8px;
    align-items: center;
  }
  .fb-hud-status { display: none; }
  .fb-hud-dial-box { grid-column: auto; grid-row: auto; flex-direction: column; gap: 2px; }
  .fb-dial-cv { width: 96px; height: 44px; }
  .fb-ctl-btn { min-width: 30px; height: 24px; font-size: 13px; }
  .fb-angle-num { font-size: 12px; }
  /* 显式复位 <=768px 的 contents 布局，兼容 667x375 小屏横屏 */
  .fb-hud-center { display: flex; flex-direction: column; grid-column: auto; grid-row: auto; gap: 4px; min-width: 0; }
  .fb-power-box { grid-column: auto; grid-row: auto; grid-template-columns: 1fr 142px; gap: 6px; }
  .fb-power-track { height: 20px; }
  .fb-move-row .fb-ctl-btn.sm { min-width: 32px; height: 22px; }
  .fb-fuel-bar { height: 18px; }
  .fb-slots-row { grid-column: auto; grid-row: auto; justify-content: flex-start; gap: 5px; overflow-x: auto; }
  .fb-ammo-group, .fb-hud-items { gap: 4px; }
  .fb-slots-sep { height: 26px; }
  .fb-slot-btn { flex: 0 0 38px; width: 38px; height: 38px; padding: 3px; }
  .fb-slot-ic { width: 30px; height: 30px; }
  .fb-hud-fire-col { grid-column: auto; grid-row: auto; flex-direction: row; gap: 5px; }
  .fb-fire-btn { flex: 1; height: 50px; font-size: 15px; }
  .fb-pass-btn { flex: 0 0 42px; height: 50px; font-size: 11px; padding: 0 2px; }
}
