/* =========================================================
   RW侠简单 · 《王者万象棋》S2 手机端攻略站（双 Ban 版）
   视觉基调：暖白象牙纸编辑风（Mobile-First）
   外底 #EFE9DC · 纸面 #FAF7F0 · 卡片 #FFFDF8 · 描边 #E2D9C8
   顶栏 #1E1C1A -> #3A2E24 · 暖金 #E7B257 · 朱砂红 #C8553D
   ========================================================= */

:root {
  --bg-outer: #EFE9DC;
  --bg-paper: #FAF7F0;
  --bg-card: #FFFDF8;
  --bg-subtle: #F4EFE3;
  --bg-tint-gold: #FFF9EC;
  --border: #E2D9C8;
  --border-soft: #ECE5D7;

  --ink-primary: #1F1D1A;
  --ink-secondary: #625A50;
  --ink-muted: #8E8578;

  --header-start: #1E1C1A;
  --header-end: #3A2E24;
  --gold: #E7B257;
  --gold-deep: #B67B1F;
  --cinnabar: #C8553D;
  --cinnabar-dark: #AE432D;
  --jade: #287A56;
  --jade-soft: #E9F6EF;

  --t0-ink: #A63722;
  --t0-bg: #FCECE7;
  --t0-bar: linear-gradient(180deg, #C8553D 0%, #D9952E 100%);
  --t1-ink: #9A6114;
  --t1-bg: #FCF2DE;
  --t1-bar: #D4942B;
  --t2-ink: #3D5F6D;
  --t2-bg: #EAF1F3;
  --t2-bar: #5A7D8C;
  --other-ink: #6D655B;
  --other-bg: #EFEAE0;
  --other-bar: #9B9285;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-card: 0 2px 8px rgba(42, 34, 24, 0.045);
  --shadow-shell: 0 12px 44px rgba(36, 29, 20, 0.12);
  --shadow-sheet: 0 -10px 36px rgba(24, 19, 14, 0.22);

  --header-h: 58px;
  --nav-h: 60px;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-num: "DIN Alternate", "Helvetica Neue", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  background-color: var(--bg-outer);
  color: var(--ink-primary);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-outer);
  color: var(--ink-primary);
  line-height: 1.5;
  overscroll-behavior-y: none;
}

body.sheet-open {
  overflow: hidden;
}

button,
input {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

[hidden] {
  display: none !important;
}

/* ==================== 手机端居中画幅容器 ==================== */
.app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background-color: var(--bg-paper);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

@media (min-width: 520px) {
  .app-shell {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-shell);
  }
}

/* ==================== 顶部深咖金品牌栏 ==================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--header-h);
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: linear-gradient(135deg, var(--header-start) 0%, var(--header-end) 100%);
  border-bottom: 1px solid rgba(231, 178, 87, 0.34);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-seal {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 17px;
  color: var(--header-start);
  background: linear-gradient(145deg, #F5CF83 0%, #D99B35 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 2px 6px rgba(0, 0, 0, 0.25);
}

.brand-seal.is-lg {
  width: 44px;
  height: 44px;
  font-size: 21px;
  border-radius: 12px;
}

.brand-meta {
  min-width: 0;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #FAF7F0;
  white-space: nowrap;
}

.creator-pill {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--gold);
  background: rgba(231, 178, 87, 0.14);
  border: 1px solid rgba(231, 178, 87, 0.36);
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.brand-sub {
  margin: 1px 0 0;
  font-size: 11px;
  color: rgba(250, 247, 240, 0.66);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.version-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #F6E6C6;
  background: rgba(255, 253, 248, 0.1);
  border: 1px solid rgba(231, 178, 87, 0.32);
  transition: background-color 0.16s ease, transform 0.12s ease;
}

.version-btn:active {
  transform: scale(0.96);
  background: rgba(255, 253, 248, 0.18);
}

.version-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(231, 178, 87, 0.22);
}

/* ==================== 主内容与吸顶双 Ban 控制区 ==================== */
.app-main {
  flex: 1;
  padding-bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom));
}

.sticky-controls {
  position: sticky;
  top: calc(var(--header-h) + env(safe-area-inset-top));
  z-index: 30;
  background: rgba(250, 247, 240, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px 12px;
}

.control-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.control-head-left {
  display: flex;
  align-items: center;
  gap: 7px;
}

.control-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fold-bans-btn {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  padding: 3px 8px;
  border-radius: 999px;
  background: transparent;
}

/* 紧凑折叠态单行吸顶栏（选满 2 个 Ban 位往下滑时省出空间） */
.ban-collapsed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.collapsed-ban-pill {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  color: #FFFDF8;
  background: var(--cinnabar);
  padding: 5px 11px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(200, 85, 61, 0.24);
  white-space: nowrap;
}

.collapsed-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.expand-bans-btn {
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--ink-primary);
  font-size: 12px;
  font-weight: 700;
}

/* 全站置顶专题视频横条 */
.featured-video-bar {
  margin: 10px 14px 2px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.featured-video-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #27221E 0%, #3E3126 100%);
  border: 1px solid rgba(231, 178, 87, 0.35);
  color: #FAF7F0;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: var(--shadow-card);
}

.featured-video-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.featured-video-tag {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 700;
  color: #1F1D1A;
  background: var(--gold);
  padding: 1px 6px;
  border-radius: 5px;
}

.featured-video-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.featured-video-arrow {
  flex-shrink: 0;
  font-size: 11.5px;
  color: var(--gold);
}

/* 抽屉内多流派切换胶囊 */
.build-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.build-tab-btn {
  padding: 7px 12px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.build-tab-btn.is-active {
  background: #28231E;
  border-color: #28231E;
  color: var(--gold);
  font-weight: 700;
}

.build-note-line {
  margin: 0 0 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-deep);
}

.multi-build-hint {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--gold-deep);
  background: var(--t1-bg);
  padding: 0 6px;
  border-radius: 999px;
  line-height: 1.5;
}

.video-row-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
}

.video-copy-url-btn {
  height: 34px;
  padding: 0 9px;
  border-radius: 9px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
  font-size: 11.5px;
  font-weight: 600;
  flex-shrink: 0;
}

.platform-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  color: #FFFDF8;
  background: #5E564C;
  flex-shrink: 0;
}

.platform-badge.is-bilibili {
  background: #D9537F;
}

.platform-badge.is-douyin {
  background: #23201E;
}

.platform-badge.is-xhs {
  background: #C84038;
}

.video-time-chip {
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-deep);
  background: var(--t1-bg);
  padding: 0 6px;
  border-radius: 5px;
  flex-shrink: 0;
}

.control-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-primary);
}

.ban-progress-pill {
  font-family: var(--font-num);
  font-size: 11.5px;
  font-weight: 800;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--other-bg);
  color: var(--ink-secondary);
  transition: all 0.16s ease;
}

.ban-progress-pill.is-partial {
  background: var(--t1-bg);
  color: var(--t1-ink);
}

.ban-progress-pill.is-complete {
  background: var(--t0-bg);
  color: var(--cinnabar);
}

.control-hint-right {
  font-size: 11px;
  color: var(--ink-muted);
}

.clear-bans-btn {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 999px;
  transition: all 0.14s ease;
}

.clear-bans-btn:active {
  transform: scale(0.95);
  background: #EAE2D3;
}

/* S2 六阵营 3x2 双 Ban 网格 */
.ban-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.ban-pill {
  position: relative;
  height: 40px;
  padding: 0 8px;
  border-radius: 11px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--ink-primary);
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 1px 2px rgba(42, 34, 24, 0.03);
  transition: all 0.16s ease;
  white-space: nowrap;
}

.ban-pill:active {
  transform: scale(0.96);
}

.ban-pill .ban-mark {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid #CFC4B2;
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  line-height: 1;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.ban-pill .new-tag {
  font-family: var(--font-num);
  font-size: 9.5px;
  font-weight: 800;
  padding: 0 4px;
  border-radius: 4px;
  color: var(--gold-deep);
  background: var(--t1-bg);
  line-height: 1.4;
}

.ban-pill.is-active {
  background: var(--cinnabar);
  border-color: var(--cinnabar);
  color: #FFFDF8;
  box-shadow: 0 3px 10px rgba(200, 85, 61, 0.28);
}

.ban-pill.is-active .ban-mark {
  border-color: rgba(255, 253, 248, 0.85);
  background: rgba(255, 253, 248, 0.2);
  color: #FFFDF8;
}

.ban-pill.is-active .new-tag {
  background: rgba(255, 253, 248, 0.22);
  color: #FFFDF8;
}

/* ==================== 未选满 2 个 Ban 位引导卡 ==================== */
.bp-prompt-wrap {
  padding: 18px 14px 4px;
}

.bp-prompt-card {
  padding: 20px 16px 18px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.prompt-step-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold-deep);
  background: var(--t1-bg);
  border: 1px solid rgba(212, 148, 43, 0.28);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.prompt-step-badge.is-partial {
  color: var(--cinnabar);
  background: var(--t0-bg);
  border-color: rgba(200, 85, 61, 0.24);
}

.prompt-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink-primary);
}

.prompt-desc {
  margin: 8px auto 0;
  max-width: 310px;
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.55;
}

.prompt-selected-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.selected-slot-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 8px;
  color: var(--cinnabar);
  background: var(--t0-bg);
  border: 1px solid rgba(200, 85, 61, 0.24);
}

.empty-slot-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 8px;
  color: var(--ink-muted);
  background: var(--bg-subtle);
  border: 1px dashed #CFC4B2;
}

.quick-combos-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.quick-combos-label {
  display: block;
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.quick-combos-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.quick-combo-btn {
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--ink-primary);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.14s ease;
}

.quick-combo-btn:active {
  transform: scale(0.96);
  background: var(--t0-bg);
  border-color: rgba(200, 85, 61, 0.35);
  color: var(--cinnabar);
}

/* ==================== 选满 2 个 Ban 位后的弹出结果区 ==================== */
@keyframes popReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bp-results-wrap.is-animating {
  animation: popReveal 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bp-summary-card {
  margin: 12px 14px 10px;
  padding: 11px 13px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.bp-summary-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 6px;
}

.bp-ban-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: #FFFDF8;
  background: var(--cinnabar);
  padding: 2px 8px;
  border-radius: 6px;
}

.bp-open-pool {
  font-size: 11.5px;
  color: var(--ink-secondary);
  font-weight: 500;
}

.bp-summary-text {
  margin: 0;
  font-size: 13px;
  color: var(--ink-primary);
  line-height: 1.52;
}

/* ==================== 梯度分组列表 ==================== */
.tier-list {
  padding: 4px 14px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tier-section {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tier-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 0;
}

.tier-header-left {
  display: flex;
  align-items: center;
  gap: 7px;
}

.tier-badge-lg {
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 2px 9px;
  border-radius: 7px;
  line-height: 1.3;
}

.tier-T0 .tier-badge-lg {
  color: #FFFDF8;
  background: linear-gradient(135deg, #C8553D 0%, #D9952E 100%);
  box-shadow: 0 2px 6px rgba(200, 85, 61, 0.24);
}

.tier-T1 .tier-badge-lg {
  color: var(--t1-ink);
  background: var(--t1-bg);
  border: 1px solid rgba(212, 148, 43, 0.35);
}

.tier-T2 .tier-badge-lg {
  color: var(--t2-ink);
  background: var(--t2-bg);
  border: 1px solid rgba(90, 125, 140, 0.3);
}

.tier-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-primary);
}

.tier-subtitle {
  font-size: 11.5px;
  color: var(--ink-muted);
}

.tier-count {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 600;
}

.tier-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==================== 推荐棋手卡片（内嵌阵容名 + 阵容码） ==================== */
.lord-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 11px 11px 10px 13px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  width: 100%;
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.lord-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3.5px;
  border-radius: 0 3px 3px 0;
  background: var(--border);
}

.lord-card.is-t0 {
  background: linear-gradient(160deg, #FFFDF8 0%, #FFF9EC 100%);
  border-color: #E3CFA8;
}

.lord-card.is-t0::before {
  background: var(--t0-bar);
  top: 8px;
  bottom: 8px;
  width: 4px;
}

.lord-card.is-t1::before {
  background: var(--t1-bar);
}

.lord-card.is-t2::before {
  background: var(--t2-bar);
}

.lord-card.is-other::before {
  background: var(--other-bar);
}

/* 卡片上半区：棋手头像 + 名字 + 推荐理由（点击看详情） */
.lord-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.lord-avatar-wrap {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
  padding: 2px;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  overflow: hidden;
}

.lord-card.is-t0 .lord-avatar-wrap {
  width: 50px;
  height: 50px;
  border-color: #DFAA4E;
  box-shadow: 0 2px 8px rgba(217, 149, 46, 0.22);
}

.lord-avatar {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.lord-info {
  flex: 1;
  min-width: 0;
}

.lord-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lord-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-primary);
  line-height: 1.25;
}

.lord-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  line-height: 1.45;
  white-space: nowrap;
}

.is-t0 .lord-badge {
  color: var(--t0-ink);
  background: var(--t0-bg);
}

.is-t1 .lord-badge {
  color: var(--t1-ink);
  background: var(--t1-bg);
}

.is-t2 .lord-badge {
  color: var(--t2-ink);
  background: var(--t2-bg);
}

.is-other .lord-badge {
  color: var(--other-ink);
  background: var(--other-bg);
}

.card-detail-link {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
}

.lord-reason {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--ink-secondary);
  line-height: 1.44;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 卡片下半区：直接露出「阵容名字 + 阵容码 + 一键复制」 */
.card-lineup-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid #E7DFCF;
}

.lord-card.is-t0 .card-lineup-box {
  background: #FBF4E5;
  border-color: #EAD8B7;
}

.card-lineup-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lineup-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.lineup-label {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-muted);
  background: rgba(255, 253, 248, 0.85);
  border: 1px solid var(--border);
  padding: 0 5px;
  border-radius: 4px;
  line-height: 1.55;
}

.lineup-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lineup-code-text {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: #5C5246;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.code-demo-tag {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  color: var(--t1-ink);
  background: var(--t1-bg);
  padding: 0 5px;
  border-radius: 4px;
  line-height: 1.5;
}

/* 卡片内一键复制按钮 */
.quick-copy-btn {
  flex-shrink: 0;
  min-width: 72px;
  height: 38px;
  padding: 0 11px;
  border-radius: 9px;
  background: #27221E;
  border: 1px solid #27221E;
  color: #FAF7F0;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.16s ease;
}

.lord-card.is-t0 .quick-copy-btn {
  background: var(--cinnabar);
  border-color: var(--cinnabar);
  color: #FFFDF8;
  box-shadow: 0 2px 8px rgba(200, 85, 61, 0.24);
}

.quick-copy-btn:active {
  transform: scale(0.94);
}

.quick-copy-btn.is-copied {
  background: var(--jade) !important;
  border-color: var(--jade) !important;
  color: #FFFDF8 !important;
  box-shadow: 0 2px 8px rgba(40, 122, 86, 0.24) !important;
}

.quick-copy-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* ==================== 其余棋手紧凑条 ==================== */
.others-card {
  margin: 16px 14px 0;
  padding: 12px 12px 13px;
  border-radius: 14px;
  background: var(--bg-subtle);
  border: 1px dashed #D7CDBA;
}

.others-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.others-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.others-hint {
  font-size: 11px;
  color: var(--ink-muted);
  flex-shrink: 0;
}

.others-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px 6px;
}

@media (max-width: 350px) {
  .others-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.other-lord-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 2px;
  border-radius: 10px;
  transition: background-color 0.14s ease, transform 0.12s ease;
}

.other-lord-chip:active {
  background: rgba(31, 29, 26, 0.06);
  transform: scale(0.95);
}

.other-lord-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid #D8CEBC;
  filter: saturate(0.65);
  opacity: 0.86;
  object-fit: cover;
}

.other-lord-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ==================== TAB 2: 阵容码库 ==================== */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--ink-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 40px;
  padding: 0 36px 0 36px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 14px;
  color: var(--ink-primary);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
}

.search-input::placeholder {
  color: #A09689;
  font-size: 13px;
}

.search-input:focus {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(231, 178, 87, 0.18);
}

.search-clear {
  position: absolute;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #E5DDD0;
  color: var(--ink-secondary);
  font-size: 16px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.filter-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 1px;
}

.filter-strip::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  flex-shrink: 0;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.15s ease;
}

.filter-pill.is-active {
  background: #28231E;
  border-color: #28231E;
  color: var(--gold);
}

.codes-meta-bar {
  padding: 10px 16px 6px;
  font-size: 12px;
  color: var(--ink-muted);
}

.lord-code-list {
  padding: 2px 14px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tier-chip {
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
  line-height: 1.4;
}

.tier-chip.chip-T0 {
  color: #FFFDF8;
  background: linear-gradient(135deg, #C8553D 0%, #D9952E 100%);
}

.tier-chip.chip-T1 {
  color: var(--t1-ink);
  background: var(--t1-bg);
  border: 1px solid rgba(212, 148, 43, 0.35);
}

.tier-chip.chip-T2 {
  color: var(--t2-ink);
  background: var(--t2-bg);
  border: 1px solid rgba(90, 125, 140, 0.3);
}

.tier-chip.chip-其他 {
  color: var(--other-ink);
  background: var(--other-bg);
}

.style-chip {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-secondary);
  background: var(--bg-subtle);
  padding: 1px 7px;
  border-radius: 999px;
}

.empty-state {
  margin: 36px 20px;
  padding: 28px 18px;
  text-align: center;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
}

.empty-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-primary);
}

.empty-desc {
  margin: 6px 0 14px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.empty-reset-btn {
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: #27221E;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
}

/* ==================== 页脚 ==================== */
.page-footer {
  margin: 24px 14px 4px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-muted);
}

.page-footer p {
  margin: 3px 0;
}

.page-footer strong {
  color: var(--ink-secondary);
}

.footer-tip {
  font-size: 11px;
  opacity: 0.85;
}

/* ==================== 底部固定双 Tab 导航 ==================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 45;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
}

.nav-item {
  height: 46px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--ink-muted);
  transition: color 0.16s ease, background-color 0.16s ease;
}

.nav-item.is-active {
  color: var(--cinnabar);
  background: rgba(200, 85, 61, 0.08);
}

.nav-icon {
  width: 21px;
  height: 21px;
}

.nav-label {
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.nav-count {
  font-style: normal;
  font-family: var(--font-num);
  font-size: 10.5px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(31, 29, 26, 0.08);
  color: inherit;
}

.nav-item.is-active .nav-count {
  background: rgba(200, 85, 61, 0.15);
}

/* ==================== 底部半屏抽屉 ==================== */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(28, 23, 18, 0.46);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.sheet-backdrop.is-open {
  opacity: 1;
}

.bottom-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 86dvh;
  background: var(--bg-paper);
  border-radius: 22px 22px 0 0;
  border-top: 1px solid rgba(255, 253, 248, 0.8);
  box-shadow: var(--shadow-sheet);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.sheet-backdrop.is-open .bottom-sheet {
  transform: translateY(0);
}

.sheet-handle-area {
  padding: 10px 0 4px;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  touch-action: none;
}

.sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: #D4C9B6;
}

.sheet-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--ink-secondary);
  font-size: 19px;
  line-height: 1;
  display: grid;
  place-items: center;
  z-index: 2;
}

.sheet-body {
  padding: 6px 18px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sheet-hero {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-right: 34px;
  margin-bottom: 14px;
}

.sheet-avatar-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 2.5px;
  background: var(--bg-card);
  border: 2px solid #DFAA4E;
  box-shadow: 0 3px 10px rgba(217, 149, 46, 0.2);
  flex-shrink: 0;
}

.sheet-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}

.sheet-hero-info {
  min-width: 0;
}

.sheet-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sheet-lord-name {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink-primary);
}

.sheet-lineup-name {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-deep);
}

.sheet-ban-context {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-tint-gold);
  border: 1px solid #EBD8B4;
  margin-bottom: 14px;
}

.sheet-ban-context-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.sheet-ban-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--cinnabar);
}

.sheet-ban-tier {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold-deep);
}

.sheet-ban-reason {
  margin: 0;
  font-size: 13px;
  color: var(--ink-primary);
  line-height: 1.48;
}

.sheet-section {
  margin-bottom: 14px;
}

.sheet-section:last-child {
  margin-bottom: 2px;
}

.sheet-section-title {
  margin: 0 0 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-secondary);
  letter-spacing: 0.02em;
}

.sheet-tips {
  margin: 0;
  padding: 11px 13px 11px 26px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--ink-primary);
  line-height: 1.55;
}

.sheet-tips li + li {
  margin-top: 6px;
}

.sheet-tips li::marker {
  color: var(--gold-deep);
}

.sheet-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.sheet-code-head .sheet-section-title {
  margin-bottom: 0;
}

.code-status-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  color: var(--t1-ink);
  background: var(--t1-bg);
}

.code-status-pill.is-ready {
  color: var(--jade);
  background: var(--jade-soft);
}

.code-preview-box {
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.code-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-primary);
  background: var(--bg-subtle);
  padding: 9px 10px;
  border-radius: 8px;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}

.code-guide-text {
  margin: 7px 0 0;
  font-size: 11.5px;
  color: var(--ink-muted);
}

.manual-copy-box {
  margin-top: 8px;
  padding: 10px 11px;
  border-radius: 10px;
  background: #FFF6E8;
  border: 1px solid #E5C890;
}

.manual-copy-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--t1-ink);
  margin-bottom: 6px;
}

.manual-copy-input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #D9B87A;
  background: #FFFDF8;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-primary);
}

.video-links-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.video-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--ink-primary);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.video-link-pill:active {
  transform: scale(0.97);
}

.video-link-pill.is-placeholder {
  color: var(--ink-muted);
  background: var(--bg-subtle);
  border-style: dashed;
  font-weight: 500;
  cursor: default;
}

.platform-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cinnabar);
}

.sheet-footer {
  padding: 10px 18px calc(12px + env(safe-area-inset-bottom));
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.primary-copy-btn {
  width: 100%;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, #C8553D 0%, #B7442D 100%);
  color: #FFFDF8;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 5px 16px rgba(200, 85, 61, 0.3);
  transition: transform 0.12s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.primary-copy-btn:active {
  transform: scale(0.985);
}

.primary-copy-btn.is-copied {
  background: linear-gradient(135deg, #287A56 0%, #1F6848 100%);
  box-shadow: 0 5px 16px rgba(40, 122, 86, 0.3);
}

.primary-copy-btn .btn-icon {
  width: 18px;
  height: 18px;
}

/* ==================== 版本说明弹窗 ==================== */
.info-sheet .sheet-body {
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

.info-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-right: 30px;
}

.info-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink-primary);
}

.info-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--ink-muted);
}

.info-callout {
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--bg-tint-gold);
  border: 1px solid #EBD8B4;
  font-size: 12.5px;
  color: var(--ink-primary);
  line-height: 1.55;
  margin-bottom: 14px;
}

.social-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==================== 悬浮 Toast ==================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  z-index: 120;
  max-width: calc(100vw - 36px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(30, 28, 26, 0.94);
  color: #FAF7F0;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
