/* 《潮灯纪》原创浅色主题 · CSS 占位表现层
   中文友好字体栈，桌面双栏 / 窄屏单栏，无外部字体与图片依赖。 */

:root {
  --bg: #f2f6f8;
  --surface: #ffffff;
  --ink: #1d2b33;
  --ink-soft: #5c707b;
  --line: #dce6ea;
  --accent: #0f766e;
  --accent-soft: #e2f4f1;
  --accent-deep: #0b5752;
  --blue: #1d6fa5;
  --blue-soft: #e8f2fa;
  --warn: #b4531b;
  --warn-soft: #fdf0e6;
  --lose: #a33a3a;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(23, 58, 70, 0.07);
}

* { box-sizing: border-box; }

/* 三端基线：iOS 横屏不自动放大字号、点按无高亮残影、禁双击缩放延迟 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, input, select, textarea { font-family: inherit; touch-action: manipulation; }
button { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; height: auto; }
:where(.net-id, .friend-name, .chat-msg, .guild-member, .arena-name, .vault-name, .forge-name, .camp-name) {
  overflow-wrap: anywhere;
}
/* 分区跳转时给锚点留出顶部呼吸位（桌面也不贴边） */
#sec-battle, #sec-grow, #sec-meta, #sec-net, #sec-cloud, #sec-rank, #sec-guide { scroll-margin-top: 14px; }

body {
  margin: 0;
  /* env() 在桌面浏览器为 0，在刘海屏 / iPhone 底部横条处自动让位 */
  padding: 22px 16px calc(48px + env(safe-area-inset-bottom));
  padding-left: calc(16px + env(safe-area-inset-left));
  padding-right: calc(16px + env(safe-area-inset-right));
  background:
    radial-gradient(circle at 12% -10%, #dff1ee 0, transparent 42%),
    radial-gradient(circle at 92% 0%, #e6f0fa 0, transparent 40%),
    var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
}

.app { max-width: 1120px; margin: 0 auto; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 48px; height: 48px; flex: none;
  display: grid; place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--accent), var(--blue));
  color: #fff; font-size: 26px;
  box-shadow: var(--shadow);
}
.brand h1 { margin: 0; font-size: 25px; letter-spacing: 3px; }
.brand p { margin: 0; color: var(--ink-soft); font-size: 13px; letter-spacing: 1px; }

/* 守灯人 hero 横幅（首屏仙侠味，纯占位表现层） */
.hero {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px; margin-bottom: 16px;
  background: linear-gradient(120deg, var(--accent-soft), var(--blue-soft));
  border: 1px solid #cfe6e2; border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero .avatar {
  width: 56px; height: 56px; flex: none; display: grid; place-items: center;
  font-size: 30px; border-radius: 16px;
  background: #fff; border: 1px solid #d8e8e4;
  box-shadow: 0 0 0 4px rgba(255,255,255,.6), 0 4px 14px rgba(23,58,70,.1);
}
.hero-text { min-width: 0; }
.hero-lore { margin: 0; font-size: 14px; color: var(--ink); line-height: 1.6; }
.hero-lore strong { color: var(--accent-deep); letter-spacing: 1px; }
.link-btn {
  margin-top: 4px; padding: 0; border: none; background: none; cursor: pointer;
  font: inherit; font-size: 12.5px; color: var(--blue); text-decoration: underline;
}

/* 开场剧情遮罩 */
.intro {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; padding: 20px;
  background: rgba(13, 32, 38, .55); backdrop-filter: blur(3px);
}
.intro[hidden] { display: none; }
.intro-card {
  max-width: 460px; width: 100%; text-align: center;
  background: var(--surface); border: 1px solid #d6e7e3; border-radius: 18px;
  padding: 26px 26px 22px; box-shadow: 0 18px 50px rgba(13,32,38,.28);
  animation: introIn .35s ease;
}
@keyframes introIn { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.intro-avatar {
  width: 72px; height: 72px; margin: 0 auto 12px; display: grid; place-items: center;
  font-size: 40px; border-radius: 20px; background: var(--accent-soft);
  border: 1px solid #cfe6e2; box-shadow: 0 0 0 5px rgba(255,255,255,.6);
}
.intro-card h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: 3px; color: var(--accent-deep); }
.intro-sub { margin: 0 0 14px; font-size: 13px; color: var(--ink-soft); }
.ph-tag {
  font-size: 11px; padding: 1px 8px; border-radius: 999px;
  background: var(--warn-soft); color: var(--warn); margin-left: 6px;
}
.intro-story { text-align: left; }
.intro-story p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.75; color: var(--ink); }
.intro-enter { margin-top: 6px; width: 100%; font-size: 15px; padding: 12px; }
.intro .hint { margin: 12px 0 0; font-size: 11.5px; color: var(--ink-soft); }
.top-note {
  font-size: 12.5px; color: var(--ink-soft);
  border: 1px dashed var(--line); border-radius: 999px;
  padding: 6px 14px; background: rgba(255,255,255,.65);
}
.top-right { display: flex; align-items: center; gap: 12px; position: relative; }
.icon-btn {
  appearance: none; cursor: pointer; font: inherit; font-size: 18px; line-height: 1;
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  border: 1px solid var(--line); background: #f7fafb; color: var(--ink);
  display: grid; place-items: center; box-shadow: var(--shadow);
}
.icon-btn:hover { background: #eef5f7; }

.stats {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(0, 1.7fr);
  gap: 10px;
  margin-bottom: 16px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.stat span { display: block; font-size: 12px; color: var(--ink-soft); }
.stat b { display: block; font-size: 19px; line-height: 1.4; word-break: break-all; }
.stat.accent { background: var(--accent-soft); border-color: #b8ded8; }
.stat.accent b { color: var(--accent-deep); }
.stat.accent b.pulse { animation: powerPulse .5s ease; }
@keyframes powerPulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.18); color: var(--accent); }
  100% { transform: scale(1); }
}
.stat.wide b { font-size: 14px; font-weight: 600; color: var(--blue); }

/* 桌面：所有卡片都是 grid 的直接子元素，按行交替落左右两列，
   不再有「一侧只挂一张卡、另一侧一溜到底」的整段空白。 */
.grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin: 0; font-size: 17px; letter-spacing: 1px; }
.pill {
  font-size: 12px; padding: 3px 11px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-deep); white-space: nowrap;
}
.pill.soft { background: var(--blue-soft); color: var(--blue); }
.pill b { font-weight: 700; }
/* 砺锋石库存：琥珀色物品胶囊，与蓝色信息胶囊区分；无库存时降为灰底 */
.pill.stone { background: #fff2cf; color: #8a6414; border: 1px solid #edd39a; font-weight: 700; }
.pill.stone.empty { background: #f2f5f4; color: #9aa5a2; border-color: var(--line); font-weight: 500; }

.stage-line {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px;
  padding: 6px 0; border-bottom: 1px dashed var(--line);
}
.stage-line:last-of-type { border-bottom: none; }
.stage-label { font-size: 12px; color: var(--ink-soft); }
.stage-line strong { font-size: 21px; letter-spacing: 2px; color: var(--accent-deep); transition: color .2s; }
.stage-line strong.boss { color: var(--warn); }
.stage-line b { color: var(--blue); }

.boss-tag {
  font-size: 12px; padding: 2px 10px; border-radius: 999px;
  background: var(--warn-soft); color: var(--warn); font-weight: 700; letter-spacing: 1px;
  animation: bossPulse 1.6s ease-in-out infinite;
}
.boss-tag[hidden] { display: none; }
.stage-affix {
  font-size: 11px; padding: 1px 9px; border-radius: 999px;
  background: var(--warn-soft); color: var(--warn); white-space: nowrap;
}
.stage-affix[hidden] { display: none; }
@keyframes bossPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(180, 83, 27, .25); }
  50% { box-shadow: 0 0 0 6px rgba(180, 83, 27, 0); }
}

/* 挑战胜/负时礁塔名的闪动反馈 */
.stage-line strong.flash-win { animation: flashWin .6s ease; }
.stage-line strong.flash-lose { animation: flashLose .6s ease; }
@keyframes flashWin {
  0% { transform: scale(1); text-shadow: 0 0 0 rgba(15,118,110,0); }
  40% { transform: scale(1.08); text-shadow: 0 0 14px rgba(15,118,110,.55); }
  100% { transform: scale(1); text-shadow: 0 0 0 rgba(15,118,110,0); }
}
@keyframes flashLose {
  0% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
  100% { transform: translateX(0); }
}

.bar { height: 12px; border-radius: 999px; background: #e8eef1; overflow: hidden; margin: 14px 0 6px; }
.bar-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, #8fb8c9, #1d6fa5);
  border-radius: 999px;
  transition: width .35s ease;
}
.bar-fill.ready { background: linear-gradient(90deg, #62c2ae, var(--accent)); }
.bar-meta { margin: 0 0 14px; font-size: 13px; color: var(--ink-soft); }
.bar-meta b { color: var(--ink); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  appearance: none; cursor: pointer; font: inherit;
  border: 1px solid var(--line); background: #f7fafb; color: var(--ink);
  padding: 10px 18px; border-radius: 10px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { background: #eef5f7; box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), #14857a);
  border-color: var(--accent-deep); color: #fff; font-weight: 700; letter-spacing: 1px;
  flex: 1 1 210px;
}
.btn.primary:hover { background: linear-gradient(135deg, #0b6860, #18988a); }
.btn.danger { color: var(--lose); border-color: #e6c9c9; background: #fdf5f5; }
.btn.danger:hover { background: #fbeaea; }

.cleared {
  margin-top: 12px; padding: 9px 13px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-deep);
  font-size: 13px; border: 1px solid #b8ded8;
}
.cleared[hidden] { display: none; }

.sub { font-size: 14px; margin: 18px 0 8px; color: var(--ink-soft); letter-spacing: 1px; }
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 240px; overflow: auto; }
.log li {
  font-size: 13px; padding: 8px 11px; border-radius: 9px;
  background: #f6f9fa; border-left: 3px solid var(--line); color: var(--ink-soft);
}
.log-tag { display: inline-block; min-width: 22px; font-weight: 700; margin-right: 8px; color: var(--ink); }
.log-win { background: var(--accent-soft); border-left-color: var(--accent); color: var(--accent-deep); }
.log-lose { background: #fdf1f1; border-left-color: #d98b8b; color: var(--lose); }
.log-choice { background: var(--blue-soft); border-left-color: var(--blue); color: #14527c; }
.log-idle { color: var(--ink-soft); }

.note { margin: 0 0 12px; font-size: 13px; color: var(--ink-soft); }
.options { display: grid; gap: 10px; }
.option-btn {
  display: grid; gap: 5px; text-align: left; cursor: pointer; font: inherit;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  background: #fbfdfd; color: var(--ink);
  transition: border-color .12s, background .12s, transform .12s;
}
.option-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.option-btn:disabled { cursor: not-allowed; opacity: .55; }
.option-btn.active { border-color: var(--accent); background: var(--accent-soft); }
.option-btn.poor { border-style: dashed; }
.opt-head { display: flex; align-items: baseline; gap: 10px; }
.opt-head b { font-size: 17px; letter-spacing: 2px; }
.opt-head em { font-style: normal; font-size: 12px; color: var(--blue); background: var(--blue-soft); padding: 1px 8px; border-radius: 999px; }
.opt-lv { margin-left: auto; font-size: 12px; color: var(--ink-soft); }
.opt-desc { font-size: 12.5px; color: var(--ink-soft); }
.opt-foot { font-size: 12px; color: var(--accent-deep); font-weight: 600; }

/* 8 个部位一律占位（含空槽），两列四行，保证一眼能找到每个部位 */
.gears { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.gear {
  border: 1px dashed var(--line); border-radius: 11px;
  padding: 10px; min-width: 0; background: #fbfdfd;
}
.gear.filled { border-style: solid; border-color: #b8ded8; background: var(--accent-soft); }
.gear-slot {
  display: inline-grid; place-items: center; width: 24px; height: 24px;
  border-radius: 7px; background: #e8eef1; color: var(--ink-soft);
  font-size: 12px; margin-bottom: 6px;
}
.gear.filled .gear-slot { background: var(--accent); color: #fff; }
.gear.maxed { border-color: #e6c98b; background: #fdf6e6; }
.gear b { display: block; font-size: 13.5px; word-break: break-all; }
.gear small { display: block; font-size: 11.5px; color: var(--ink-soft); }
.gear .enhance-btn {
  margin-top: 8px; width: 100%; cursor: pointer; font: inherit; font-size: 12px;
  border: 1px solid var(--accent); border-radius: 8px; padding: 6px 8px;
  background: var(--accent); color: #fff; font-weight: 600;
  transition: transform .12s ease, background .12s ease, opacity .12s ease;
}
.gear .enhance-btn:hover:not(:disabled) { background: var(--accent-deep); }
.gear .enhance-btn:active:not(:disabled) { transform: translateY(1px); }
.gear .enhance-btn.disabled,
.gear .enhance-btn:disabled { background: #eef2f4; color: var(--ink-soft); border-color: var(--line); cursor: not-allowed; }

.codex { display: grid; gap: 8px; }
.codex-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 11px; border-radius: 9px; background: #f6f9fa; border-left: 3px solid var(--blue);
}
.codex-row span { font-size: 12.5px; color: var(--ink-soft); }
.codex-row b { font-size: 14px; color: #14527c; }

.hint { margin: 11px 0 0; font-size: 12px; color: var(--ink-soft); line-height: 1.6; }
.hint.warn { color: #c0392b; font-weight: 600; }
.btn.disabled, button:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.4); }

.guide { margin-top: 16px; }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.guide h3 { font-size: 14px; margin: 0 0 8px; letter-spacing: 1px; }
.guide ol, .guide ul { margin: 0; padding-left: 20px; font-size: 13px; color: var(--ink-soft); }
.guide li { margin-bottom: 5px; }
.guide .keys { list-style: none; padding-left: 0; }
kbd {
  display: inline-block; min-width: 22px; text-align: center;
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px;
  padding: 1px 7px; margin-right: 4px;
  background: #f7fafb; color: var(--ink); font: inherit; font-size: 12px;
}
.save-head { margin-top: 14px !important; }
.guide .btn.danger { margin-top: 10px; }
.stage-stamp {
  margin: 16px 0 0; padding-top: 12px; border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--warn); background: var(--warn-soft);
  border-radius: 8px; padding: 8px 12px;
}

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 14px);
  padding: 11px 22px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  box-shadow: 0 8px 24px rgba(20, 45, 55, .22); z-index: 10;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.win { background: var(--accent-deep); }
.toast.lose { background: var(--lose); }

/* ══════════════════════════════════════════════════════════════
   三端适配：电脑宽屏（双栏） / 平板（单栏宽松） / 手机（紧凑 + 固定操作条）
   断点按「内容挤不挤」划分，而不是硬套设备名；横屏矮屏另有兜底。
   ══════════════════════════════════════════════════════════════ */

/* 按键说明按端切换：桌面讲键盘，触屏讲操作条 */
.touch-only { display: none; }

/* 分区导航 + 底部操作条：桌面默认隐藏，窄屏才出现（display 显式，注意 hidden 冲突已规避） */
.quick-nav, .mobile-dock { display: none; }
.quick-nav {
  gap: 7px; overflow-x: auto; scrollbar-width: none;
  margin-bottom: 14px; padding: 2px 1px 6px;
  -webkit-overflow-scrolling: touch;
}
.quick-nav::-webkit-scrollbar { display: none; }
.nav-chip {
  flex: 1 0 auto; min-height: 38px; padding: 7px 14px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink-soft); font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow); white-space: nowrap;
}
.nav-chip:active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); }

.mobile-dock {
  position: fixed; z-index: 40;
  left: 0; right: 0; bottom: 0;
  gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 22px rgba(23, 58, 70, .12);
}
.dock-btn {
  flex: 1 1 0; min-width: 0; min-height: 50px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #f4f8f9; color: var(--ink); padding: 5px 4px;
}
.dock-btn b { font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.dock-ico { font-size: 15px; line-height: 1.1; }
.dock-btn.primary {
  flex: 1.5 1 0; border-color: var(--accent-deep); color: #fff;
  background: linear-gradient(135deg, var(--accent), #14857a);
}
.dock-btn.primary b { font-size: 12.5px; }
.dock-btn.top { flex: .7 1 0; }
.dock-btn:active { transform: translateY(1px); filter: brightness(.95); }

/* 大桌面：内容区稍放宽，仍是 战斗 / 养成 双栏 */
@media (min-width: 1280px) {
  .app { max-width: 1200px; }
}

/* 平板横屏 / 小笔电：双栏但等比，状态栏 4 列 */
@media (min-width: 901px) and (max-width: 1180px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat.wide { grid-column: span 2; }
  .grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
  .card { padding: 16px; }
}

/* ── ≤900：单栏（平板竖屏 / 大屏手机），启用导航与底部操作条 ── */
@media (max-width: 900px) {
  body { padding: 16px 14px calc(92px + env(safe-area-inset-bottom)); }
  .grid, .guide-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat.wide { grid-column: span 2; }
  .quick-nav { display: flex; }
  .mobile-dock { display: flex; }
  .desktop-only { display: none; }
  .touch-only { display: list-item; }
  .card { padding: 16px; }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); text-align: center; }
  .invite-pop { right: 12px; bottom: calc(86px + env(safe-area-inset-bottom)); max-width: min(320px, calc(100vw - 24px)); }
  /* 触摸目标：小按钮统一加高到 ≥40px，避免误点 */
  .btn.small { min-height: 40px; padding: 8px 14px; font-size: 13.5px; }
  .social-tab, .routine-tab { min-height: 40px; }
  .talent-btn, .companion-btn, .enhance-btn, .stone-btn, .pay-sku, .mystic-btn { min-height: 40px; }
  .icon-btn { width: 42px; height: 42px; }
  .chat-list { height: 200px; }
  .log { max-height: 200px; }
  #sec-battle, #sec-grow, #sec-meta, #sec-net, #sec-cloud, #sec-rank, #sec-guide { scroll-margin-top: 12px; }
}

/* ── ≤600：手机竖屏，紧凑三列 + 单手操作 ── */
@media (max-width: 600px) {
  body { padding: 12px 10px calc(86px + env(safe-area-inset-bottom)); }
  .top { gap: 8px; margin-bottom: 12px; }
  .brand { gap: 10px; }
  .brand-mark { width: 40px; height: 40px; font-size: 22px; border-radius: 11px; }
  .brand h1 { font-size: 20px; letter-spacing: 2px; }
  .brand p { font-size: 11px; letter-spacing: 0; }
  .top-note { display: none; }           /* 手机顶部省掉长标语，给标题留位置 */
  .top-right { gap: 8px; }               /* 顶栏多了一个音乐开关，收紧间距 */
  .hero { padding: 10px 12px; gap: 10px; margin-bottom: 12px; }
  .hero .avatar { width: 44px; height: 44px; border-radius: 13px; }
  .hero .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
  .hero-lore { font-size: 12.5px; line-height: 1.55; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-bottom: 12px; }
  .stat { padding: 7px 9px; border-radius: 11px; }
  .stat span { font-size: 10.5px; }
  .stat b { font-size: 16px; line-height: 1.35; }
  .stat.wide { grid-column: 1 / -1; }
  .stat.wide b { font-size: 12.5px; }
  .quick-nav { margin-bottom: 10px; gap: 6px; }
  .nav-chip { padding: 7px 12px; font-size: 12.5px; }
  .grid { gap: 12px; }
  .card { padding: 13px 12px; border-radius: 12px; }
  .card-head { margin-bottom: 10px; gap: 6px; }
  .card-head h2 { font-size: 15.5px; letter-spacing: .5px; }
  .pill { font-size: 10.5px; padding: 2px 8px; }
  .note, .hint { font-size: 12px; }
  .stage-line strong { font-size: 18px; }
  .stage-line { gap: 6px 10px; }
  .actions { gap: 8px; }
  .actions .btn { flex: 1 1 100%; }      /* 主按钮独占一行，拇指好按 */
  .btn { min-height: 44px; padding: 10px 14px; }
  .btn.small { min-height: 40px; }
  .gears { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .gear { padding: 8px; }
  .gear .gear-actions .btn.tiny { min-height: 32px; padding: 3px 2px; font-size: 10px; }
  .gear .gear-actions .enhance-btn { padding: 9px 4px; font-size: 11px; }
  .camp-bonus { gap: 4px; }
  .camp-bonus-cell { padding: 6px 1px; }
  .camp-bonus-cell span { font-size: 9.5px; }
  .camp-bonus-cell b { font-size: 12px; }
  .arena-stat { gap: 4px; }
  .arena-stat span { padding: 6px 1px; font-size: 9.5px; }
  .arena-stat b { font-size: 13px; }
  .signin-days { grid-template-columns: repeat(4, 1fr); }  /* 7 天改两行，单格不再挤到看不清 */
  .pay-skus { gap: 6px; }
  .pay-sku { padding: 9px 10px; }
  .achievements { gap: 6px; }
  .camp-row, .vault-row, .forge-row, .arena-row, .shop-row, .dispatch-row, .friend-row { padding: 8px; gap: 6px; }
  .camp-cost, .dispatch-desc, .forge-meta, .vault-meta, .arena-meta { font-size: 10px; }
  .chat-list { height: 176px; }
  .log { max-height: 176px; }
  .vault-list, .forge-list { max-height: 176px; }
  .guide-grid { gap: 14px; }
  .intro-card { padding: 18px 16px 16px; border-radius: 14px; }
  .intro-avatar { width: 54px; height: 54px; font-size: 30px; margin-bottom: 8px; }
  .intro-card h2 { font-size: 19px; }
  .intro-story p { font-size: 12.5px; line-height: 1.6; }
  .mystic-card { padding: 16px 14px; }
  .invite-pop { left: 10px; right: 10px; max-width: none; }
  .toast { font-size: 12.5px; padding: 9px 16px; bottom: calc(80px + env(safe-area-inset-bottom)); }
  #sec-battle, #sec-grow, #sec-meta, #sec-net, #sec-rank, #sec-guide { scroll-margin-top: 10px; }
}

/* 手机横屏 / 矮窗口：压掉装饰性区块，操作条更薄，保证战斗区仍在一屏内 */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 950px) {
  .hero { display: none; }
  .quick-nav { margin-bottom: 8px; }
  .nav-chip { min-height: 32px; padding: 4px 12px; }
  .mobile-dock { padding-top: 4px; padding-bottom: calc(4px + env(safe-area-inset-bottom)); }
  .dock-btn { min-height: 40px; flex-direction: row; gap: 6px; }
  .toast { bottom: calc(58px + env(safe-area-inset-bottom)); }
  .invite-pop { bottom: calc(58px + env(safe-area-inset-bottom)); }
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .intro-card { max-height: 88vh; overflow-y: auto; }
}

/* 触屏设备没有 hover：避免点完之后按钮一直停在 hover 态 */
@media (hover: none) {
  .btn:hover { background: #f7fafb; box-shadow: none; }
  .btn.primary:hover { background: linear-gradient(135deg, var(--accent), #14857a); }
  .btn.danger:hover { background: #fdf5f5; }
  .option-btn:hover:not(:disabled) { transform: none; }
  .pay-sku:hover { border-color: var(--line); background: #fafafa; }
  .icon-btn:hover { background: #f7fafb; }
  .social-tab:hover, .routine-tab:hover { border-color: #e2e2e2; }
}

/* 尊重系统「减少动态效果」 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* 立绘占位图填充头像框 */
.hero .avatar img,
.intro-avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.hero .avatar img { border-radius: 15px; }
.intro-avatar img { border-radius: 19px; }

/* 开场旁白控制 */
.intro-actions { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 6px; }
.intro .link-btn { font-size: 14px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
.intro .link-btn:hover { background: var(--blue-soft); }
#intro-audio { display: none; }

/* 连胜高亮 */
.stat.streak b { color: var(--warn); }

/* 背景音乐一键开关：独立于全局静音，只管 BGM，不影响音效 */
.bgm-toggle { position: relative; font-size: 20px; color: var(--accent); }
.bgm-toggle[data-state="off"] { color: var(--ink-soft); background: #eef2f3; }
.bgm-toggle[data-state="off"]::after {
  content: ''; position: absolute; left: 8px; right: 8px; top: calc(50% - 1px);
  height: 2px; border-radius: 2px; background: var(--warn);
  transform: rotate(-45deg);
}
.bgm-toggle:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.audio-panel .bgm-row { font-weight: 600; color: var(--ink); }

/* 音频设置面板（点击 ⚙ 开合） */
.audio-panel {
  position: absolute; top: 46px; right: 0; z-index: 30;
  width: 212px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 30px rgba(13,32,38,.16);
  display: grid; gap: 11px;
}
.audio-panel[hidden] { display: none; }
.audio-panel label { display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-soft); }
.audio-panel input[type="range"] { width: 100%; accent-color: var(--accent); }
.audio-panel .mute-row { display: flex; align-items: center; gap: 8px; }
.audio-panel .mute-row input { accent-color: var(--accent); width: auto; }
.audio-panel .setting-block { border-top: 1px dashed var(--line); padding-top: 11px; display: grid; gap: 8px; }
.audio-panel .setting-title { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.audio-panel .difficulty-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.audio-panel .diff-btn {
  font: inherit; font-size: 12px; padding: 6px 0; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-soft); cursor: pointer;
  transition: all .15s ease;
}
.audio-panel .diff-btn:hover { border-color: var(--accent); color: var(--ink); }
.audio-panel .diff-btn.active {
  background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600;
  box-shadow: 0 4px 12px rgba(20,120,140,.28);
}
.audio-panel .setting-hint { font-size: 11px; color: var(--ink-soft); line-height: 1.5; }
.audio-panel .threshold-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--ink-soft); }
.audio-panel .num-input { width: 64px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 12px; }
.audio-panel .threshold-row .btn { padding: 5px 10px; font-size: 12px; }

/* 存档导出 / 导入 */
.save-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.save-actions .btn { flex: 1 1 auto; }

/* 征途模式切换（主线 / 深渊，分轨难度曲线） */
.mode-switch {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  padding: 10px 0; margin-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}
.mode-btn {
  appearance: none; cursor: pointer; font: inherit; font-size: 13px;
  border: 1px solid var(--line); background: #f7fafb; color: var(--ink);
  padding: 6px 14px; border-radius: 999px;
  transition: background .12s, border-color .12s, color .12s;
}
.mode-btn:hover { border-color: var(--accent); }
.mode-btn.active {
  background: linear-gradient(135deg, var(--accent), #14857a);
  border-color: var(--accent-deep); color: #fff; font-weight: 700;
}
.mode-note { font-size: 12px; color: var(--ink-soft); }

/* 天赋样式（对应玩法已关闭，样式保留备用） */
.talents { display: grid; gap: 9px; }
.talent {
  display: grid;
  grid-template-columns: 34px 1fr auto auto;
  align-items: center; gap: 10px;
  padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 11px; background: #fbfdfd;
}
.talent.maxed { border-color: #e6c98b; background: #fdf6e6; }
.t-branch {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 9px; font-size: 14px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent-deep);
}
.t-branch.t-atk { background: #fde8e8; color: #b13535; }
.t-branch.t-guard { background: #e8f1e8; color: #356b35; }
.t-branch.t-pow { background: #efe8f6; color: #6b35a0; }
.t-branch.t-sand { background: #e6f0fa; color: #1d6fa5; }
.t-branch.t-breath { background: #f6efe1; color: #8a6312; }
.t-main b { font-size: 14px; letter-spacing: 1px; }
.t-main small { display: block; font-size: 11.5px; color: var(--ink-soft); }
.t-lv { font-size: 13px; color: var(--blue); font-weight: 600; }
.talent-btn {
  appearance: none; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 700;
  border: 1px solid var(--accent); border-radius: 8px; padding: 5px 12px;
  background: var(--accent); color: #fff;
  transition: transform .12s, background .12s, opacity .12s;
}
.talent-btn:hover:not(:disabled) { background: var(--accent-deep); }
.talent-btn:active:not(:disabled) { transform: translateY(1px); }
.talent-btn.disabled,
.talent-btn:disabled {
  background: #eef2f4; color: var(--ink-soft); border-color: var(--line); cursor: not-allowed;
}

/* 潮汛相位切换（平潮 / 潮涨 / 潮落 / 风暴 / 晦雾 / 溯光） */
.phase-switch {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  padding: 10px 0; margin-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}
.phase-btn {
  appearance: none; cursor: pointer; font: inherit; font-size: 13px;
  border: 1px solid var(--line); background: #f7fafb; color: var(--ink);
  padding: 6px 14px; border-radius: 999px;
  transition: background .12s, border-color .12s, color .12s;
}
.phase-btn:hover { border-color: var(--blue); }
.phase-btn.active {
  background: linear-gradient(135deg, var(--blue), #2b8fd0);
  border-color: #1a5f8f; color: #fff; font-weight: 700;
}
.phase-note { font-size: 12px; color: var(--ink-soft); }

/* 守护灵面板（消耗潮砂招募，永久被动加成） */
.companions { display: grid; gap: 9px; }
.companion {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px;
  padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 11px; background: #fbfdfd;
}
.companion.owned { border-color: #b8ded8; background: var(--accent-soft); }
.companion-main b { font-size: 14px; letter-spacing: 1px; }
.companion-main small { display: block; font-size: 11.5px; color: var(--ink-soft); }
.companion-eff {
  display: inline-block; margin-top: 3px; font-size: 11.5px; font-weight: 700;
  color: var(--accent-deep); background: #eaf6f3; border-radius: 999px; padding: 1px 9px;
}
.companion.owned .companion-eff { background: #fff; color: var(--accent); }
.companion-btn {
  appearance: none; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 700;
  border: 1px solid var(--accent); border-radius: 8px; padding: 6px 12px;
  background: var(--accent); color: #fff; white-space: nowrap;
  transition: transform .12s, background .12s, opacity .12s;
}
.companion-btn:hover:not(:disabled) { background: var(--accent-deep); }
.companion-btn:active:not(:disabled) { transform: translateY(1px); }
.companion-btn.disabled,
.companion-btn:disabled {
  background: #eef2f4; color: var(--ink-soft); border-color: var(--line); cursor: not-allowed;
}

/* 雾海声望（魅力值 / 贵族称号 / 群英榜） */
.charm-box { display: grid; gap: 8px; margin-bottom: 10px; }
.charm-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 11px; border-radius: 9px; background: #f6f9fa; border-left: 3px solid var(--accent);
}
.charm-row span { font-size: 12.5px; color: var(--ink-soft); }
.charm-row b { font-size: 16px; color: var(--accent-deep); }
.leaderboard { display: grid; gap: 6px; }
.lb-row {
  display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px;
  padding: 7px 11px; border-radius: 9px; background: #f6f9fa; border: 1px solid var(--line);
  font-size: 13px;
}
.lb-row.you { background: var(--accent-soft); border-color: #b8ded8; font-weight: 700; }
.lb-rank { font-weight: 700; color: var(--blue); text-align: center; }
.lb-name { color: var(--ink); }
.lb-charm { font-size: 12px; color: var(--ink-soft); }

/* 装备词条 / 套装展示 */
.gear-affix { color: var(--accent-deep); font-weight: 600; }
.gear-set { color: var(--blue); font-weight: 600; }

/* 秘境奇遇弹层（胜利后二选一抉择） */
.mystic-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 20px;
  background: rgba(13, 32, 38, .55); backdrop-filter: blur(3px);
}
.mystic-overlay[hidden] { display: none; }
.mystic-card {
  max-width: 420px; width: 100%; text-align: center;
  background: var(--surface); border: 1px solid #d6e7e3; border-radius: 18px;
  padding: 24px 24px 22px; box-shadow: 0 18px 50px rgba(13,32,38,.28);
  animation: mysticIn .3s ease;
}
@keyframes mysticIn { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.mystic-card h2 { margin: 0 0 8px; font-size: 21px; letter-spacing: 3px; color: var(--accent-deep); }
.mystic-desc { margin: 0 0 16px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; }
.mystic-choices { display: grid; gap: 10px; }
.mystic-btn {
  appearance: none; cursor: pointer; font: inherit; text-align: left;
  display: grid; gap: 4px; padding: 12px 16px; border-radius: 12px;
  border: 1px solid var(--line); background: #fbfdfd; color: var(--ink);
  transition: border-color .12s, background .12s, transform .12s;
}
.mystic-btn:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.mystic-btn b { font-size: 15px; letter-spacing: 1px; }
.mystic-btn small { font-size: 12px; color: var(--ink-soft); }

/* 小号按钮（联网面板复用） */
.btn.small { padding: 6px 12px; font-size: 13px; flex: none; }

/* 联网 · 雾海群英面板 */
.net-card .net-status.on { background: #e3f6ec; color: #1d7a45; }
.net-card .net-status.off { background: #f1f3f4; color: var(--ink-soft); }
.net-identity { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.net-id { font-size: 13px; color: var(--ink-soft); }
.net-id b { color: var(--ink); }
.net-name-input {
  flex: 1 1 120px; min-width: 0; font: inherit; font-size: 13px;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdfd;
}
.net-name-input:focus { outline: none; border-color: var(--accent); }
.net-board-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px; color: var(--ink-soft); margin: 6px 0 8px; letter-spacing: 1px;
}
.net-online b { color: var(--accent-deep); font-size: 15px; }
.net-leaderboard { margin-bottom: 12px; }

/* 多人共斗 */
.coop { border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 4px; }
.coop-head { font-size: 13px; color: var(--accent-deep); font-weight: 700; letter-spacing: 1px; margin-bottom: 10px; }
.coop-create { display: flex; gap: 8px; margin-bottom: 8px; }
.coop-target {
  width: 92px; font: inherit; font-size: 13px;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdfd;
}
.coop-target:focus { outline: none; border-color: var(--accent); }
.coop-rooms { display: grid; gap: 8px; }
.coop-empty { font-size: 12.5px; color: var(--ink-soft); padding: 6px 0; }
.coop-room-row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 10px;
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfd;
}
.coop-room-host { font-size: 13px; font-weight: 600; color: var(--ink); }
.coop-room-info { grid-column: 1 / 2; font-size: 12px; color: var(--ink-soft); }
.coop-room-row .btn { grid-row: 1 / 3; align-self: center; }
.coop-room-detail {
  margin-top: 10px; padding: 12px; border: 1px solid #b8ded8; border-radius: 12px;
  background: var(--accent-soft);
}
.coop-room-title { font-size: 13.5px; font-weight: 700; color: var(--accent-deep); margin-bottom: 8px; }
.coop-bar { height: 10px; border-radius: 999px; background: #e8eef1; overflow: hidden; margin-bottom: 6px; }
.coop-bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, #62c2ae, var(--accent)); border-radius: 999px; transition: width .35s ease; }
.coop-room-meta { font-size: 12px; color: var(--accent-deep); margin-bottom: 8px; }
.coop-members { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.coop-member {
  font-size: 11.5px; color: #14527c; background: var(--blue-soft);
  border-radius: 999px; padding: 2px 9px;
}
.coop-actions { display: flex; gap: 8px; }
.coop-room-detail.cleared { border-color: #e0a93b; box-shadow: 0 0 0 1px rgba(224,169,59,.5) inset; }
.coop-cleared-banner {
  margin: 0 0 8px; padding: 7px 8px; border-radius: 8px; text-align: center;
  font-weight: 700; color: #f4c869;
  background: linear-gradient(90deg, rgba(224,169,59,.22), rgba(224,169,59,.08));
}
.btn.small.disabled { opacity: .55; cursor: not-allowed; }

/* ── 潮玉 / 元进度 ──────────────────────────────── */
.stat.jade b { color: var(--accent); }
.stat.jade span { color: #b9892f; }

.mainquest { display: flex; flex-direction: column; gap: 8px; }
.mq-next { padding: 10px 12px; border: 1px solid #e7d9b8; border-radius: 10px; background: var(--accent-soft); }
.mq-title { font-weight: 700; color: var(--accent-deep); margin-bottom: 4px; }
.mq-desc { font-size: 12.5px; color: #5b4a2a; margin-bottom: 4px; }
.mq-reward { font-size: 12px; color: #b9892f; }
.mq-done { display: flex; flex-wrap: wrap; gap: 6px; }
.mq-chip { font-size: 11px; color: #6b5836; background: #f3ecdd; border-radius: 999px; padding: 2px 9px; }

.daily { display: flex; flex-direction: column; gap: 10px; }
.dq-row { padding: 9px 11px; border: 1px solid #d9e6e3; border-radius: 10px; }
.dq-name { font-weight: 700; color: var(--accent-deep); font-size: 13px; }
.dq-desc { font-size: 12px; color: #5b6b66; margin: 2px 0 6px; }
.dq-bar { height: 7px; border-radius: 999px; background: #e8eef1; overflow: hidden; margin-bottom: 5px; }
.dq-bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, #62c2ae, var(--accent)); border-radius: 999px; transition: width .35s ease; }
.dq-meta { font-size: 11.5px; color: #6b7b76; margin-bottom: 7px; }
.dq-all { align-self: flex-start; }

.achievements { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ach { padding: 8px 10px; border: 1px solid #e2e2e2; border-radius: 9px; background: #fafafa; opacity: .62; }
.ach.on { opacity: 1; border-color: #e0a93b; background: linear-gradient(90deg, rgba(224,169,59,.12), rgba(224,169,59,.04)); }
.ach-name { font-weight: 700; color: var(--accent-deep); font-size: 12.5px; }
.ach-desc { font-size: 11.5px; color: #5b6b66; margin: 2px 0 4px; }
.ach-reward { font-size: 11px; color: #b9892f; }

.shop { display: flex; flex-direction: column; gap: 9px; }
.shop-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid #e2e2e2; border-radius: 10px; }
.shop-info { min-width: 0; }
.shop-name { font-weight: 700; color: var(--accent-deep); font-size: 13px; }
.shop-desc { font-size: 11.5px; color: #5b6b66; }

/* ── 联网社交（聊天 / 好友 / 公会）──────────────────── */
.net-id-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12.5px; }
.net-id { color: #5b6b66; }
.net-id b { color: var(--accent-deep); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.social-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.social-tab { flex: 1; padding: 7px 0; border: 1px solid #e2e2e2; background: #f6f8f9; border-radius: 9px; font-size: 13px; color: #5b6b66; cursor: pointer; transition: all .15s ease; }
.social-tab:hover { border-color: var(--accent); }
.social-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.social-panel { display: block; }
/* 显式 display 会压过 UA 的 [hidden]{display:none}，此处按项目惯例逐一补回 */
.social-panel[hidden], .guild-create[hidden], .guild-panel[hidden], .friend-add[hidden], .chat-input[hidden], .invite-pop[hidden] { display: none; }

.chat-list { list-style: none; margin: 0 0 8px; padding: 6px; height: 220px; overflow-y: auto; background: #f7f9fa; border: 1px solid #e8eef1; border-radius: 9px; font-size: 12.5px; }
.chat-empty, .friend-empty { color: #8a9691; padding: 8px 4px; }
.chat-msg { padding: 3px 0; line-height: 1.5; word-break: break-word; }
.chat-name { color: var(--accent-deep); font-weight: 700; margin-right: 6px; }
/* 云端留言标记：区分自建聊天与真实云数据库里的跨设备留言 */
.chat-cloud { display: inline-block; font-style: normal; font-size: 10px; font-weight: 700; color: var(--accent-deep); background: rgba(15, 118, 110, .12); border-radius: 4px; padding: 0 4px; margin-right: 5px; }
/* 玩家端不展示云数据状态面板与入口；云同步、公告与留言仍静默运行 */
#sec-cloudsvc, .nav-chip[data-target="sec-cloudsvc"] { display: none !important; }
/* 云服务状态面板：复用群英榜五行网格，长文案缩小一档避免挤压 */
.cloudsvc-rows b { font-size: 12px; }
.cloudsvc-card .hint { margin: 4px 0 8px; }
.chat-input { display: flex; gap: 6px; }
.chat-text { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid #d8e0e3; border-radius: 9px; font-size: 13px; }
.chat-text:focus { outline: none; border-color: var(--accent); }

.friend-add { display: flex; gap: 6px; margin-bottom: 8px; }
.friend-id { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid #d8e0e3; border-radius: 9px; font-size: 13px; }
.friend-id:focus { outline: none; border-color: var(--accent); }
.friend-list, .guild-members-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.friend-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border: 1px solid #e2e2e2; border-radius: 9px; }
.friend-name { font-size: 12.5px; color: #3a4642; }
.friend-name small { color: #9aa6a1; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.friend-actions { display: flex; gap: 5px; flex-shrink: 0; }
.dot { font-style: normal; font-size: 10px; }
.dot.on { color: #2fae6b; }
.dot.off { color: #b7c0bc; }

.guild-create { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.guild-name, .guild-join-id { padding: 8px 10px; border: 1px solid #d8e0e3; border-radius: 9px; font-size: 13px; min-width: 96px; }
.guild-name:focus, .guild-join-id:focus { outline: none; border-color: var(--accent); }
.guild-or { color: #9aa6a1; font-size: 12px; }
.guild-name-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 14px; }
.guild-id-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.guild-id { font-size: 11.5px; color: #6b7b76; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.btn.tiny { min-height: 26px; padding: 2px 9px; font-size: 11px; }
.guild-name-row b { color: var(--accent-deep); }
.guild-boss { padding: 10px; border: 1px solid #ecd6d6; background: linear-gradient(90deg, rgba(214,80,80,.06), rgba(214,80,80,.02)); border-radius: 11px; margin-bottom: 12px; }
.guild-boss-head { font-weight: 700; color: #b24747; margin-bottom: 7px; font-size: 13px; }
.guild-boss-head span { color: #8a3a3a; }
.bar-fill.boss-fill { background: linear-gradient(90deg, #e06a6a, #c33b3b); }
.guild-members-head { font-size: 12.5px; color: #5b6b66; margin-bottom: 5px; }
.guild-member { padding: 6px 9px; border: 1px solid #e2e2e2; border-radius: 8px; font-size: 12.5px; color: #3a4642; }
.tag-owner { font-size: 10.5px; color: #fff; background: #e0a93b; padding: 1px 6px; border-radius: 999px; margin-left: 5px; }

.invite-pop { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: 320px; }
.invite-card { background: #fff; border: 1px solid var(--accent); border-radius: 12px; padding: 10px 12px; box-shadow: 0 8px 24px rgba(60,120,110,.18); }
.invite-text { font-size: 12.5px; color: #3a4642; margin-bottom: 8px; }
.invite-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ── 好友申请确认 ─────────────────────────────────────── */
.fr-block { margin-top: 10px; }
.fr-head { font-size: 12.5px; color: #5b6b66; font-weight: 700; margin-bottom: 6px; }
.fr-head b { color: var(--accent-deep); }
.fr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fr-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border: 1px solid #e2c98a; background: #fffaf0; border-radius: 9px; }
.fr-name { font-size: 12.5px; color: #3a4642; }
.fr-outgoing { display: flex; flex-wrap: wrap; gap: 6px; }
.fr-out-chip { font-size: 11.5px; color: #6b7b76; background: #f2f6f7; border: 1px solid #e2e2e2; border-radius: 999px; padding: 4px 9px; }
.gm-contrib { float: right; font-size: 11px; color: #8a9691; }

/* ── 公会全成员分红 ───────────────────────────────────── */
.guild-dividend { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; margin-bottom: 12px; border: 1px solid #e0d1a8; background: #fffbf2; border-radius: 9px; font-size: 12.5px; color: #5b6b66; }
.guild-dividend b { color: #b9892f; font-size: 14px; }

/* ── 雾海日程（签到 / 试炼 / 派遣）─────────────────────── */
.routine-tab { flex: 1; padding: 7px 0; border: 1px solid #e2e2e2; background: #f6f8f9; border-radius: 9px; font-size: 13px; color: #5b6b66; cursor: pointer; transition: all .15s ease; }
.routine-tab:hover { border-color: var(--accent); }
.routine-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.routine-panel { display: block; }
/* 显式 display 必须显式补回 hidden，否则 tab 内容会全部叠在一起 */
.routine-panel[hidden], .pay-order[hidden], .pay-skus[hidden] { display: none; }

.signin-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 10px; }
.signin-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px; border: 1px solid #e2e2e2; border-radius: 8px; background: #fafafa; font-size: 10.5px; color: #6b7b76; text-align: center; }
.signin-day b { font-size: 11px; color: var(--accent-deep); }
.signin-day small { font-size: 9.5px; color: #9aa6a1; }
.signin-day.done { opacity: .5; }
.signin-day.today { border-color: #e0a93b; background: #fff8e8; box-shadow: 0 0 0 1px rgba(224,169,59,.4) inset; }
.signin-day.today b { color: #b9892f; }

.trial-line { display: flex; justify-content: space-between; font-size: 12.5px; color: #5b6b66; margin-bottom: 6px; }
.trial-line b { color: var(--accent-deep); }
.routine-panel > .bar { margin-bottom: 10px; }

.dispatch-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.dispatch-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid #e2e2e2; border-radius: 9px; }
.dispatch-info { min-width: 0; }
.dispatch-name { font-weight: 700; color: var(--accent-deep); font-size: 12.5px; }
.dispatch-desc { font-size: 11px; color: #6b7b76; }
.dispatch-active { font-size: 12.5px; }
.dispatch-idle { color: #8a9691; padding: 6px 2px; }
.dispatch-running { padding: 8px 10px; background: #f2f8f7; border: 1px solid #cfe3df; border-radius: 9px; color: #3a4642; }
.dispatch-ready { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; background: #fff8e8; border: 1px solid #e0c77a; border-radius: 9px; }

/* ── 潮玉充值（内购模式 · 服务端开关）────────────────────── */
.iap-off { margin-top: 10px; padding: 12px 14px; border: 1px dashed #d8e0e3; border-radius: 9px; background: #f7f9f8; color: #6b7b76; font-size: 12.5px; text-align: center; }
.pay-skus { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.pay-skus[hidden], .iap-off[hidden] { display: none; }
.pay-sku { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid #e2e2e2; background: #fafafa; border-radius: 10px; cursor: pointer; text-align: left; transition: all .15s ease; }
.pay-sku:hover { border-color: var(--accent); background: #f2f8f7; }
.pay-sku b { font-size: 16px; color: var(--accent-deep); }
.pay-sku span { font-size: 12px; color: #5b6b66; }
.pay-sku small { font-size: 11px; color: #b9892f; }
.pay-order { margin-top: 10px; padding: 10px; border: 1px solid var(--accent); border-radius: 10px; background: #f7fbfa; }
.pay-order-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; font-size: 12px; color: #5b6b66; margin-bottom: 8px; }
.pay-order-row b { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--accent-deep); }
.pay-status { font-weight: 700; color: #b9892f; }
.pay-order-actions { display: flex; justify-content: flex-end; }
.pay-order-hint { font-size: 12px; color: #7a6a3a; margin-bottom: 6px; line-height: 1.5; }

/* ── 灯桩营地（放置经营）────────────────────────────────── */
.camp-bonus { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 10px; }
.camp-bonus-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px; border: 1px solid #cfe3df; background: #f2f8f7; border-radius: 9px; }
.camp-bonus-cell span { font-size: 10.5px; color: #6b7b76; }
.camp-bonus-cell b { font-size: 13px; color: var(--accent-deep); }
.camp-list { display: flex; flex-direction: column; gap: 7px; }
.camp-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid #e2e2e2; border-radius: 9px; }
.camp-info { min-width: 0; }
.camp-name { font-weight: 700; color: var(--accent-deep); font-size: 12.5px; }
.camp-name em { font-style: normal; font-size: 11px; color: #8a9691; margin-left: 6px; }
.camp-desc { font-size: 11px; color: #6b7b76; }
.camp-row.maxed { border-color: #e0c77a; background: #fffbf2; }
.camp-cost { font-size: 10.5px; color: #b9892f; margin-top: 2px; }

/* ── 器物库 + 熔炉 ─────────────────────────────────────── */
.vault-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: #5b6b66; margin: 10px 0 6px; }
.vault-head b { color: var(--accent-deep); }
.forge-head { border-top: 1px dashed #d8e0e3; padding-top: 10px; margin-top: 12px; font-weight: 700; color: var(--accent-deep); }
.vault-list, .forge-list { display: flex; flex-direction: column; gap: 6px; max-height: 210px; overflow-y: auto; }
.vault-empty { color: #8a9691; font-size: 12px; padding: 8px 2px; }
.vault-row, .forge-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border: 1px solid #e2e2e2; border-radius: 9px; }
.vault-info, .forge-info { min-width: 0; }
.vault-name, .forge-name { font-size: 12.5px; font-weight: 700; color: var(--accent-deep); }
.vault-meta, .forge-meta { font-size: 10.5px; color: #6b7b76; }
.q-tag { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 999px; background: #eef3f2; border: 1px solid #d8e0e3; color: #5b6b66; margin-right: 5px; }
.q-tag.q-3, .q-tag.q-4 { background: #fff5e0; border-color: #e0c77a; color: #9a6b1f; }
.q-tag.q-5 { background: #fdeaea; border-color: #d98a8a; color: #a33b3b; font-weight: 700; }
.forge-row.done { border-color: #e0c77a; background: #fffbf2; }
.gear-tier { color: #9a6b1f !important; font-weight: 700; }
.dq-mult { font-style: normal; color: #b9892f; margin-left: 4px; }

/* ── 委托阶位 · 九境三候（9 × 3 = 27 阶）────────────────── */
.rank-card { border-color: #bfded8; }
.rank-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 8px 0; }
.rank-summary > div {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 2px; border: 1px solid #cfe3df; background: #f2f8f7; border-radius: 9px;
}
.rank-summary span { font-size: 10.5px; color: #6b7b76; }
.rank-summary b { font-size: 13px; color: var(--accent-deep); }
.rank-next {
  font-size: 11.5px; color: #9a6b1f; background: #fffbf2;
  border: 1px solid #f0e0b8; border-radius: 9px; padding: 7px 9px; margin-bottom: 8px;
}
.rank-ladder { display: flex; flex-direction: column; gap: 7px; max-height: 320px; overflow-y: auto; margin-bottom: 10px; }
.rank-row { border: 1px solid #e2e2e2; border-radius: 9px; padding: 6px 8px; }
.rank-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-bottom: 5px; font-size: 11.5px; color: var(--accent-deep); }
.rank-row-head span { font-size: 10.5px; color: #9aa6a1; font-weight: 400; }
.rank-cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.rank-cell {
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  border: 1px dashed #d8e0e3; border-radius: 8px; background: #fafcfc; opacity: .62;
}
.rank-cell.reached { opacity: 1; border-style: solid; border-color: #cfe3df; background: #f2f8f7; }
.rank-cell.current { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.rank-cell.claimed { border-color: #e0c77a; }
.rank-cell-name { font-size: 11.5px; font-weight: 700; color: var(--accent-deep); }
.rank-cell-meta { font-size: 10px; color: #6b7b76; }
.rank-cell-reward { font-size: 10px; color: #b9892f; }
.rank-card #rank-claim-btn { width: 100%; min-height: 40px; }

@media (max-width: 600px) {
  .rank-summary { grid-template-columns: repeat(3, 1fr); }
  .rank-cell { padding: 5px 4px; }
  .rank-cell-meta, .rank-cell-reward { font-size: 9.5px; }
  .rank-ladder { max-height: 280px; }
}

/* ── 雾海论剑（联网异步竞技）─────────────────────────────── */
.arena-stat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.arena-stat span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px; border: 1px solid #cfe3df; background: #f2f8f7; border-radius: 9px; font-size: 10.5px; color: #6b7b76; }
.arena-stat b { font-size: 14px; color: var(--accent-deep); }
.arena-head { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: #5b6b66; font-weight: 700; margin: 10px 0 6px; }
.arena-rank-note { font-weight: 400; font-size: 10.5px; color: #9aa6a1; }
.arena-opponents, .arena-rank-list { display: flex; flex-direction: column; gap: 6px; }
.arena-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border: 1px solid #e2e2e2; border-radius: 9px; }
.arena-row.you { border-color: var(--accent); background: #f2f8f7; }
.arena-row.mirror { border-style: dashed; }
.arena-info { min-width: 0; }
.arena-name { font-size: 12.5px; font-weight: 700; color: var(--accent-deep); }
.arena-meta { font-size: 10.5px; color: #6b7b76; }
.arena-rank-list { max-height: 190px; overflow-y: auto; }
.arena-empty { color: #8a9691; font-size: 12px; padding: 8px 2px; }

/* ── 云账号 · 跨设备 ───────────────────────────────────────── */
.cloud-card { border-color: #bfded8; }
.cloud-code-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; font-size: 12.5px; color: #5b6b66; }
.cloud-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 20px; letter-spacing: 3px; color: var(--accent-deep);
  background: var(--accent-soft); border: 1px dashed var(--accent);
  border-radius: 9px; padding: 3px 10px; user-select: all;
}
.cloud-label { display: block; font-size: 11px; color: #6b7b76; margin: 8px 0 4px; }
.cloud-input {
  width: 100%; min-height: 40px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
  color: var(--ink); font-size: 14px; outline: none;
}
.cloud-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
#cloud-login-code { text-transform: uppercase; letter-spacing: 2px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.cloud-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cloud-btns .btn, .cloud-code-row .btn { min-height: 40px; }
.cloud-user { margin-top: 10px; }
.cloud-state-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; border: 1px solid #cfe3df; background: #f2f8f7;
  border-radius: 9px; font-size: 12px; color: var(--accent-deep); font-weight: 700;
}
.cloud-time { font-weight: 400; font-size: 10.5px; color: #6b7b76; }
.cloud-guest[hidden], .cloud-user[hidden] { display: none; }
.cloud-code-change { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cloud-change-edit { display: none; }
.cloud-change-edit:not([hidden]) {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; width: 100%;
}
.cloud-newcode {
  flex: 1 1 120px; min-height: 40px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
  color: var(--ink); font-size: 14px; outline: none;
  text-transform: uppercase; letter-spacing: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.cloud-newcode:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.cloud-change-done { font-size: 12px; color: #6b7b76; }
.cloud-code-change .btn { min-height: 40px; }

/* 手机紧凑：短码独立成行更好点，输入框与按钮保持 ≥40px 触摸目标 */
@media (max-width: 600px) {
  .cloud-code { font-size: 18px; letter-spacing: 2px; }
  .cloud-btns .btn { flex: 1 1 46%; }
  .cloud-state-row { font-size: 11.5px; }
}

/* ── 面板折叠：每张卡可单独收起，顶部可一键收起 / 展开 ────────── */
.collapse-all-btn { white-space: nowrap; }
.card-head.has-toggle { position: relative; padding-right: 40px; }
.card-toggle {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; padding: 0; line-height: 1;
  border: 1px solid var(--line); border-radius: 8px;
  background: #f6faf9; color: var(--accent-deep);
  font-size: 18px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.card-toggle:hover { background: var(--accent-soft); border-color: var(--accent); }
.card.collapsed { padding-top: 10px; padding-bottom: 10px; }
.card.collapsed > :not(.card-head) { display: none !important; }
.card.collapsed .card-head { margin-bottom: 0; }
.card.collapsed .card-head h2 { font-size: 15px; color: var(--ink-soft); }

/* 触屏放大到 ≥40px 触摸目标（放在最后，确保覆盖上面的桌面尺寸） */
@media (max-width: 900px) {
  .card-head.has-toggle { padding-right: 46px; }
  .card-toggle { width: 40px; height: 40px; }
}

/* ── 全服活动中心（服务端发布）──────────────────────────────── */
.event-list { display: grid; gap: 10px; margin-top: 12px; }
.event-empty {
  padding: 16px; text-align: center; color: #6b827e; font-size: 13px;
  background: #f6faf9; border: 1px dashed #e2eae8; border-radius: 10px;
}
.event-item {
  padding: 12px 14px; border: 1px solid #e2eae8; border-radius: 10px;
  background: #fbfdfd; border-left: 3px solid #0f766e;
}
.event-item.event-buff { border-left-color: #b45309; }
.event-item.event-gift { border-left-color: #7c3aed; }
.event-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.event-top b { font-size: 14px; color: #16302d; }
.event-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: #e2f3f0; color: #0f766e; white-space: nowrap;
}
.event-buff .event-tag { background: #fef3c7; color: #b45309; }
.event-gift .event-tag { background: #ede9fe; color: #7c3aed; }
.event-body { margin: 8px 0 0; font-size: 12.5px; color: #6b827e; line-height: 1.6; }
.event-detail { margin-top: 8px; font-size: 13px; color: #16302d; font-weight: 600; }
.event-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 12px;
}
.event-foot .btn { min-height: 36px; }
@media (max-width: 600px) {
  .event-item { padding: 11px 12px; }
  .event-foot .btn { min-height: 40px; }
}

/* ── 扩展内容：灵兽园 / 成就殿堂 / 灯盟 / 试炼赛季 ───────────── */
.ex-card .ct-body { margin-top: 10px; }
.ex-wallet {
  padding: 10px 12px; border-radius: 10px; background: #f2f8f7; border: 1px solid #e0ece9;
  font-size: 12.5px; color: #3b5b56; line-height: 1.7;
}
.ex-wallet b { color: #0f766e; font-size: 14px; }
.ex-sub {
  display: flex; align-items: baseline; gap: 8px; margin: 14px 0 6px;
  padding-bottom: 4px; border-bottom: 1px solid #e6efed;
}
.ex-sub b { font-size: 13px; color: #16302d; }
.ex-sub span { font-size: 11.5px; color: #6b827e; }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 10px; }
.ex-pet { padding: 10px 12px; border: 1px solid #e2eae8; border-radius: 10px; background: #fff; }
.ex-pet.on { border-color: #8fd3c4; background: #f4fbf8; }
.ex-pet.locked { opacity: .62; }
.ex-pet-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ex-pet-top b { font-size: 13.5px; color: #16302d; }
.ex-pet-top span { font-size: 11px; color: #0f766e; background: #e8f5f1; padding: 2px 7px; border-radius: 999px; }
.ex-pet p { margin: 6px 0; font-size: 11.5px; color: #6b827e; line-height: 1.55; }
.ex-meta { font-size: 11px; color: #3b5b56; }
.ex-pet .ct-actions { margin: 8px 0 0; gap: 6px; }
.ex-list { display: grid; gap: 6px; margin-top: 8px; }
.ex-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border: 1px solid #e8f0ee; border-radius: 9px; background: #fbfdfc;
}
.ex-row.done { opacity: .65; }
.ex-row > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ex-row b { font-size: 12.5px; color: #16302d; }
.ex-row span { font-size: 11px; color: #6b827e; }
.ex-row-act { flex: none; }
.ex-input {
  flex: 1; min-width: 130px; min-height: 38px; padding: 6px 10px;
  border: 1px solid #d9e6e2; border-radius: 8px; font-size: 12.5px;
}
.ex-boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.ex-board b { display: block; font-size: 12.5px; color: #16302d; margin-bottom: 6px; }
.ex-board .ex-row { padding: 6px 8px; }
@media (max-width: 560px) {
  .ex-grid, .ex-boards { grid-template-columns: 1fr; }
  .ex-row { flex-wrap: wrap; }
}

/* ── 扩展玩法：讨伐 / 战令 / 秘境 / 收集排行 ───────────────────── */
.ct-body { margin-top: 12px; }
.ct-empty {
  padding: 16px; text-align: center; color: #6b827e; font-size: 13px;
  background: #f6faf9; border: 1px dashed #e2eae8; border-radius: 10px;
}
.ct-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ct-title b { font-size: 15px; color: #16302d; }
.ct-title .muted { font-size: 12px; color: #6b827e; }
.ct-desc { margin: 8px 0 0; font-size: 12.5px; color: #6b827e; line-height: 1.6; }
.ct-tag.auto { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #eaf3ff; color: #2f6bd6; border: 1px solid #cfe0fb; }
.ct-note { margin: 6px 0 0; font-size: 11.5px; color: #8a9a96; line-height: 1.5; }
.ct-bar {
  height: 9px; margin: 12px 0; border-radius: 999px;
  background: #e8f0ee; overflow: hidden;
}
.ct-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #0f766e, #2dd4bf); transition: width .3s ease;
}
.ct-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; padding: 5px 0; font-size: 12.5px;
  border-bottom: 1px dashed #edf2f1; color: #6b827e;
}
.ct-row b { color: #16302d; font-weight: 600; }
.ct-row b.ct-ok { color: #15803d; }
.ct-row b.ct-bad { color: #b91c1c; }
.ct-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 2px; }
.ct-actions .btn.small { min-height: 38px; }
.ct-done {
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  background: #e2f3f0; color: #0f766e;
}
.ct-sub { margin: 14px 0 6px; font-size: 12px; font-weight: 600; color: #6b827e; }
.ct-rank { display: grid; gap: 4px; }

/* ── 礁塔之守 · 常驻五守 ────────────────────────────────────── */
.hunt-vitality {
  padding: 12px 14px; border-radius: 12px;
  background: linear-gradient(135deg, #f2f9f7, #eef5ff);
  border: 1px solid #dfece9;
}
.hunt-vit-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: #6b827e; }
.hunt-vit-head b { color: #0f766e; font-weight: 700; font-size: 14px; }
.hunt-vit-head b.ct-bad { color: #b91c1c; }
.hunt-vitality .ct-bar { margin: 8px 0 6px; }
.hunt-hp i { background: linear-gradient(90deg, #f08080, #e0b34a); }
.hunt-vit-meta { font-size: 11.5px; color: #8a9a96; line-height: 1.6; }
.hunt-rest {
  margin: 12px 0; padding: 14px; border-radius: 12px;
  background: #fff5f3; border: 1px solid #f6d5cd;
}
.hunt-rest-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hunt-rest-head b { font-size: 14px; color: #b4442f; }
.hunt-tag { font-size: 11px; padding: 2px 9px; border-radius: 999px; background: #ffe6df; color: #b4442f; border: 1px solid #f6cdc3; }
.hunt-rest p { margin: 8px 0 0; font-size: 12.5px; color: #8b6259; line-height: 1.65; }
.hunt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.hunt-card {
  padding: 12px; border-radius: 12px;
  background: #fbfdfc; border: 1px solid #e4eeec;
  display: flex; flex-direction: column;
}
.hunt-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.hunt-card-head b { font-size: 13.5px; color: #16302d; }
.hunt-band { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #eaf3ff; color: #2f6bd6; border: 1px solid #cfe0fb; white-space: nowrap; }
.hunt-card .ct-bar { margin: 10px 0 4px; }
.hunt-card .ct-row { font-size: 11.5px; padding: 4px 0; }
.hunt-card .ct-actions { margin-top: auto; padding-top: 8px; }
.hunt-card .ct-actions .btn.small { width: 100%; }
@media (max-width: 600px) {
  .hunt-grid { grid-template-columns: 1fr; }
  .hunt-card .ct-actions .btn.small { min-height: 40px; }
}
.ct-rank-row {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 8px;
  align-items: center; padding: 5px 9px; border-radius: 8px;
  background: #f6faf9; font-size: 12px; color: #6b827e;
}
.ct-rank-row b { color: #16302d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 开服（新区开启）面板 ────────────────────────────────── */
.nav-chip.kf-chip { background: #fff2e0; border-color: #f3cf9a; color: #a9601a; font-weight: 600; }
.kf-card { border-color: #f0d9b5; }
.kf-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 12px; margin-bottom: 4px;
  background: linear-gradient(120deg, #fff4e2, #ffe9cf); border: 1px solid #f3d5ac;
}
.kf-banner b { font-size: 15px; color: #a9601a; }
.kf-banner span { font-size: 12px; color: #b9762c; }
.kf-block { margin: 14px 0 4px; padding-top: 6px; border-top: 1px dashed #e4ece9; }
.kf-block:first-of-type { border-top: 0; }
.kf-sub { margin: 8px 0 8px; font-size: 12.5px; font-weight: 700; color: #0f766e; }
.kf-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.kf-pill { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: #eaf3ff; color: #2f6bd6; border: 1px solid #cfe0fb; }
.kf-signin { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.kf-day {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 8px 2px; border-radius: 10px; background: #f6faf9; border: 1px solid #e6efec;
}
.kf-day.ready { background: #fff7e8; border-color: #f3d5ac; }
.kf-day.done { opacity: .62; }
.kf-day-t { font-size: 11px; font-weight: 600; color: #16302d; }
.kf-day-r { font-size: 10px; line-height: 1.4; color: #6b827e; }
.kf-day-b { font-size: 10.5px; }
.kf-day-b .btn.small { min-height: 28px; padding: 3px 6px; font-size: 10.5px; }
.kf-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 7px 0; font-size: 12px; color: #6b827e; }
.kf-board { margin: 8px 0; padding: 8px 10px; border-radius: 10px; background: #f6faf9; border: 1px solid #e6efec; }
.kf-board-h { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; margin-bottom: 6px; }
.kf-board-h b { color: #16302d; }
.kf-board-h span { color: #6b827e; }
.kf-ms { display: grid; gap: 4px; }
.kf-ms-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; align-items: center; font-size: 11px; color: #6b827e; padding: 3px 0; }
.kf-ms-row.done { opacity: .55; }
.kf-ms-row .btn.small { min-height: 28px; padding: 3px 8px; font-size: 10.5px; }
.kf-limited { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: #fbfdfc; border: 1px solid #e6efec; }
@media (max-width: 640px) {
  .kf-signin { grid-template-columns: repeat(4, 1fr); }
  .kf-ms-row { grid-template-columns: 1fr auto; }
  .kf-ms-row > span:nth-child(2) { display: none; }
}
.ct-rank-row span:last-child { font-variant-numeric: tabular-nums; }
.ct-scroll { max-height: 320px; overflow-y: auto; display: grid; gap: 6px; padding-right: 4px; }
.ct-level {
  display: grid; grid-template-columns: 62px 1fr; gap: 4px 10px;
  padding: 9px 11px; border: 1px solid #e2eae8; border-radius: 9px;
  background: #fbfdfd; align-items: center;
}
.ct-level.locked { opacity: .55; }
.ct-lv { grid-row: span 2; font-size: 13px; font-weight: 700; color: #0f766e; }
.ct-pack {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; font-size: 12px; color: #16302d;
}
.ct-pack .btn.tiny { min-height: 26px; flex: none; }
.ct-tabs .btn.tiny { min-height: 30px; }
/* 进阶战令开通渠道 + 雾海悬赏 */
.ct-unlock { margin: 12px 0 2px; padding: 10px 12px; border: 1px solid #cde5e0; border-radius: 10px; background: #f4fbf9; }
.ct-unlock.done { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #eefbf4; border-color: #bfe9d2; }
.ct-unlock.done b { font-size: 13px; color: #15803d; }
.ct-unlock-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ct-unlock-head b { font-size: 13px; color: #16302d; }
.ct-channels { display: grid; gap: 8px; margin-top: 10px; }
.ct-channel { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 8px; background: #fff; border: 1px solid #e2eeeb; }
.ct-channel > div:first-child { min-width: 190px; flex: 1; }
.ct-channel b { font-size: 12.5px; color: #0f766e; }
.ct-channel .muted { line-height: 1.5; margin-top: 2px; }
.ct-redeem { display: flex; gap: 6px; align-items: center; }
.ct-redeem input { min-width: 150px; max-width: 200px; padding: 6px 8px; font-size: 12px; border: 1px solid #cdded9; border-radius: 6px; }
.ct-quest { padding: 9px 10px; border: 1px solid #e2eeeb; border-radius: 9px; background: #fff; display: grid; gap: 6px; }
.ct-quest-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ct-quest-top b { font-size: 13px; color: #16302d; }
.ct-quest-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: #6b827e; }

/* 星潮祈愿：抽卡 / 保底 / 碎片兑换所 */
.ct-wish-top { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.ct-wish-top span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border: 1px solid #d9e9e5; background: #f5fbf9; border-radius: 9px; font-size: 10.5px; color: #6b7b76; }
.ct-wish-top b { font-size: 15px; color: var(--accent-deep); }
.ct-wish-bar-label { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: #5b6b66; margin: 8px 0 4px; }
.ct-wish-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.ct-wish-actions .btn { min-height: 38px; }
.ct-wish-results { display: grid; gap: 5px; margin: 8px 0; }
.ct-wish-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 9px; border: 1px solid #e2eeeb; border-left: 3px solid #cbd5d1; border-radius: 8px; background: #fff; font-size: 12px; }
.ct-wish-item b { color: #16302d; }
.ct-wish-item .small { color: #6b827e; font-size: 11px; }
.ct-wish-item.rare { border-left-color: #38bdf8; }
.ct-wish-item.epic { border-left-color: #a855f7; background: #fbf7ff; }
.ct-wish-item.legend { border-left-color: #f59e0b; background: #fffaf0; }
.ct-wish-tag { font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: #eef4f2; color: #0f766e; white-space: nowrap; }
.ct-wish-item.epic .ct-wish-tag { background: #f3e8ff; color: #7e22ce; }
.ct-wish-item.legend .ct-wish-tag { background: #fef3c7; color: #b45309; }
.ct-wish-shop { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.ct-wish-shop-item { display: grid; gap: 6px; padding: 9px 10px; border: 1px solid #e2eeeb; border-radius: 9px; background: #fff; }
.ct-wish-shop-item b { font-size: 12.5px; color: #16302d; }
.ct-wish-bc { display: flex; flex-direction: column; gap: 4px; max-height: 130px; overflow-y: auto; }
.ct-wish-bc div { font-size: 11.5px; color: #6b827e; }
.ct-wish-rates { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
@media (max-width: 600px) {
  .ct-wish-top { grid-template-columns: repeat(2, 1fr); }
  .ct-wish-actions .btn { flex: 1; min-width: 140px; }
}
@media (max-width: 600px) {
  .ct-rank-row { grid-template-columns: 28px 1fr auto; font-size: 11.5px; }
  .ct-level { grid-template-columns: 54px 1fr; padding: 8px 9px; }
  .ct-pack { font-size: 11.5px; }
  .ct-actions .btn.small, .ct-tabs .btn.tiny { min-height: 40px; }
}

/* 玩法广场：航路 / 潮汐祭 / 灵契 / 商队 / 秘闻 */
.arc-pane { margin-top: 10px; }
.arc-pane.hidden { display: none; }
.arc-pane > .pill { display: inline-block; margin-bottom: 8px; }
#arcade-tabs { flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.arc-nodes { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin: 8px 0; }
.arc-node, .arc-stage, .arc-goods, .arc-q, .arc-spirit {
  display: grid; gap: 6px; padding: 9px 10px; border: 1px solid #e2eeeb;
  border-radius: 9px; background: #fff;
}
.arc-stage.on { border-color: #bfe9d2; background: #f4fbf7; }
.arc-node-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.arc-node-top b { font-size: 12.5px; color: #16302d; }
.arc-node .btn, .arc-stage .btn, .arc-goods .btn, .arc-spirit .btn { justify-self: start; }
.arc-trend { font-size: 11.5px; font-weight: 700; color: #6b827e; }
.arc-trend.up { color: #c2410c; }
.arc-trend.down { color: #15803d; }
.arc-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.arc-slot { display: grid; gap: 5px; padding: 8px; border: 1px dashed #cdded9; border-radius: 9px; background: #f7fbfa; font-size: 11.5px; text-align: center; }
.arc-slot b { color: #0f766e; font-size: 12px; }
.arc-slot .btn { justify-self: center; }
.arc-spirit-btns { display: flex; gap: 5px; flex-wrap: wrap; }
.arc-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; }
.arc-opts .btn { justify-content: flex-start; text-align: left; white-space: normal; min-height: 34px; }
.arc-q { margin-bottom: 8px; }
/* 逐题模式：当前题高亮 + 进度条 + 导航 */
.quiz-bar { margin: 4px 0 10px; }
.quiz-progress { height: 7px; border-radius: 999px; background: #e6eeec; overflow: hidden; }
.quiz-progress i { display: block; height: 100%; background: linear-gradient(90deg, #57b394, var(--accent)); border-radius: 999px; transition: width .3s ease; }
.quiz-progress-txt { font-size: 11px; color: var(--ink-soft); margin-top: 4px; }
.quiz-current .arc-q { border: 1px solid #cfe6dc; background: #fbfffe; border-radius: 11px; padding: 11px 12px; box-shadow: 0 2px 8px rgba(20,80,70,.06); }
.quiz-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.quiz-nav .btn { justify-self: start; }
.quiz-next { font-weight: 700; }
.quiz-hint { margin-top: 6px; color: #6b827e; }
.quiz-lore { margin-top: 7px; padding-top: 7px; border-top: 1px dashed #dbe7e3; color: #4c635e; }
.quiz-done { text-align: center; padding: 12px; border: 1px dashed #bfe9d2; border-radius: 12px; background: #f4fbf7; margin-bottom: 10px; }
.quiz-done-title { font-size: 15px; font-weight: 700; color: #15803d; }
.arc-q.is-correct { box-shadow: inset 3px 0 0 #3fa776; }
.arc-q.is-wrong { box-shadow: inset 3px 0 0 #d97777; }
@media (max-width: 600px) {
  .arc-nodes, .arc-opts { grid-template-columns: 1fr; }
  .arc-slots { grid-template-columns: repeat(3, 1fr); }
  .arc-slot { padding: 6px 4px; font-size: 10.5px; }
}

/* ── 万象游历 · 12 套新玩法 ───────────────────────────────── */
.fx-tabs { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin: 12px 0 4px; scrollbar-width: thin; }
.fx-tabs .btn.tiny { flex: none; white-space: nowrap; }
.fx-cur-status { display: inline-block; margin: 6px 0 2px; }
.fx-btns { display: flex; gap: 5px; flex-wrap: wrap; }
.fx-btns .btn.tiny { min-height: 28px; }
.fx-tags { display: flex; gap: 5px; flex-wrap: wrap; margin: 6px 0; }
.fx-tag { font-size: 10.5px; line-height: 1.4; padding: 3px 7px; border-radius: 6px; background: #eef4f2; color: #6b827e; border: 1px solid #e2eeeb; white-space: normal; }
.fx-tag.on { background: #e3f6ec; border-color: #bfe9d2; color: #0f766e; font-weight: 600; }
.fx-inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.fx-inline label { display: flex; gap: 4px; align-items: center; }
.fx-inline input, .fx-inline select { min-width: 90px; max-width: 180px; padding: 6px 8px; font-size: 12px; border: 1px solid #cdded9; border-radius: 6px; background: #fff; color: #16302d; }
.fx-inline input[type="number"] { max-width: 110px; }
.fx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin: 8px 0; }
.fx-grid .btn.tiny { margin-right: 4px; }
.fx-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-width: 320px; margin: 12px auto; padding: 8px; border-radius: 12px; background: #e9f2ef; border: 1px solid #d3e6e0; }
.fx-cell { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 8px; background: #f7fbfa; color: #16302d; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fx-cell.lv1 { background: #eef4f2; color: #6b827e; }
.fx-cell.lv2 { background: #dcf0e9; }
.fx-cell.lv3 { background: #bfe6d7; }
.fx-cell.lv4 { background: #9fd8c2; }
.fx-cell.lv5 { background: #7cc9ae; color: #fff; }
.fx-cell.lv6 { background: #57b394; color: #fff; }
.fx-cell.lv7 { background: #2f9c79; color: #fff; }
.fx-cell.lv8 { background: #a78bfa; color: #fff; }
.fx-cell.lv9, .fx-cell.lv10, .fx-cell.lv11 { background: #f0a23c; color: #fff; }
.fx-dirs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-width: 320px; margin: 0 auto 10px; }
.fx-dirs .btn.tiny { min-height: 34px; }
@media (max-width: 600px) {
  .fx-grid { grid-template-columns: 1fr; }
  .fx-board { max-width: 100%; }
  .fx-dirs { max-width: 100%; }
  .fx-cell { font-size: 15px; }
}


/* ── 成长决策：多阶段分叉树 ── */
.decision-node { border: 1px solid #d3e6e0; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: #f7fbfa; }
.decision-node.done { border-color: #9fd8c2; background: #eef7f3; }
.decision-node.locked { opacity: .55; filter: grayscale(.3); }
.decision-head { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #16302d; }
.decision-idx { font-size: 11px; background: #2f9c79; color: #fff; border-radius: 999px; padding: 1px 8px; }
.decision-idx::before { content: ''; }
.decision-head em { margin-left: auto; font-style: normal; font-size: 11px; color: #6b827e; }
.decision-desc { display: block; color: #5a6f6a; font-size: 12px; margin: 4px 0 8px; }
.decision-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.decision-opt { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 8px 10px; border: 1px solid #d3e6e0; border-radius: 10px; background: #fff; cursor: pointer; }
.decision-opt:hover:not(.disabled) { border-color: #57b394; }
.decision-opt.active { border-color: #2f9c79; background: #eef7f3; box-shadow: 0 0 0 2px rgba(47,156,121,.15) inset; }
.decision-opt.disabled { opacity: .5; cursor: not-allowed; }
.decision-opt b { font-size: 13px; color: #16302d; }
.decision-opt em { font-style: normal; font-size: 10px; color: #2f9c79; }
.decision-opt small { font-size: 11px; color: #5a6f6a; }
.decision-eff { color: #b07d2b !important; }
.decision-tag { color: #2f9c79; font-weight: 700; }
/* 已抉择阶折叠：标题整行可点，展开回看时再显示选项 */
.decision-head.as-toggle { display: flex; width: 100%; border: 0; background: none; padding: 0; font: inherit; cursor: pointer; text-align: left; color: inherit; }
.decision-head.as-toggle:hover b { color: #2f9c79; }
.decision-picked { font-size: 11px; color: #2f9c79; font-weight: 700; }
.decision-caret { font-style: normal; font-size: 11px; color: #6b827e; white-space: nowrap; }
.decision-node.done .decision-body { margin-top: 8px; }
.decision-node.done.collapsed .decision-body { margin-top: 0; }

/* ── 图鉴里程碑 / 已获称号 ── */
.milestones { margin-top: 10px; display: grid; gap: 8px; }
.milestone { border: 1px solid #e3d9c4; border-radius: 10px; padding: 8px 10px; background: #fdfaf2; }
.milestone.done { border-color: #bfe6d7; background: #eef7f3; }
.ms-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ms-head b { color: #16302d; }
.ms-head .muted { font-size: 12px; color: #6b827e; }
.ms-title { font-style: normal; font-size: 11px; color: #b07d2b; border: 1px solid #e3d9c4; border-radius: 6px; padding: 0 6px; }
.ms-bar { height: 8px; border-radius: 999px; background: #ecebe6; overflow: hidden; margin: 6px 0 4px; }
.ms-bar i { display: block; height: 100%; background: linear-gradient(90deg,#57b394,#2f9c79); }
.ms-foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #5a6f6a; }
.ms-foot .btn { margin-left: auto; }
.earned-titles { margin-top: 8px; }
.et-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: #5a6f6a; }
.et-tag { font-style: normal; background: #2f9c79; color: #fff; border-radius: 6px; padding: 1px 8px; font-size: 11px; }

/* ── 雾海声望 ── */
.reputation { margin: 10px 0; border-top: 1px dashed #d3e6e0; padding-top: 10px; }
.rep-summary { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #16302d; margin-bottom: 8px; }
.rep-summary b { color: #2f9c79; font-size: 18px; }
.rep-block { margin-bottom: 10px; }
.rep-block-head { font-size: 12px; color: #6b827e; margin-bottom: 6px; }
.rep-task { border: 1px solid #d3e6e0; border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; background: #f7fbfa; }
.rep-task.done { border-color: #bfe6d7; background: #eef7f3; }
.rep-item { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border: 1px solid #e3d9c4; border-radius: 10px; margin-bottom: 6px; background: #fdfaf2; }
.rep-item b { color: #16302d; }
.rep-item small { font-size: 11px; color: #6b827e; }
.rep-item .btn { margin-top: 4px; align-self: flex-start; }

/* ── 活动中心：挑战进度条 ── */
.event-prog { height: 8px; border-radius: 999px; background: #ecebe6; overflow: hidden; margin: 8px 0 2px; }
.event-prog i { display: block; height: 100%; background: linear-gradient(90deg,#57b394,#2f9c79); }
.event-prog-txt { font-size: 12px; color: #5a6f6a; margin-bottom: 6px; }

/* ── 战令领取：待领汇总 + 四态按钮 + 自动定位高亮 ── */
.pass-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin: 10px 0 8px; padding: 9px 12px; border: 1px solid #cde5e0; border-radius: 10px;
  background: linear-gradient(90deg, #f2fbf8, #fbfdfd);
}
.pass-summary.all-done { border-color: #d8e8df; background: #f7fbf8; }
.pass-summary-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pass-summary-main b { font-size: 13px; color: #0f766e; }
.pass-summary-main b span { font-size: 15px; font-variant-numeric: tabular-nums; }
.pass-summary-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pass-tip { font-size: 11px; color: #7c938e; }
.pass-bulk { min-height: 28px; }
.pass-bulk:disabled { opacity: .5; cursor: not-allowed; }
.pass-done { background: #eef2f1; color: #7c938e; }
.pass-hint {
  font-size: 11px; padding: 3px 8px; border-radius: 999px;
  background: #f1f4f3; color: #91a39f; white-space: nowrap;
}
.pass-hint.need-premium { background: #fff7e8; color: #a9762b; }
.pass-claim-btn { min-width: 52px; }
.pass-claim-btn:disabled { opacity: .6; cursor: progress; }
.pass-claim-btn.is-next { animation: passPulse 1.6s ease-in-out infinite; }
.ct-pack.is-target { border-radius: 6px; background: #eefaf6; box-shadow: inset 3px 0 0 #0f766e; padding-left: 6px; }
.ct-level.is-target { border-color: #9fd8cc; background: #f7fdfb; }
@keyframes passPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(15,118,110,.18); }
  50% { box-shadow: 0 0 0 7px rgba(15,118,110,.05); }
}
@media (max-width: 640px) {
  .pass-summary { padding: 8px 10px; }
  .pass-tip { width: 100%; }
  .pass-claim-btn { min-width: 56px; min-height: 30px; }
}

/* ── 玩法主题背景：30 张卡片 + 17 个子玩法各一套专属色系 ──────────────
   色系由 theme.js 写入 --th-* CSS 变量；纹样按 data-motif 切换，全部为程序化
   CSS 渐变，零图片资源。装饰层 z-index:-1 + isolation 保证永不遮挡正文。 */
.card[data-theme],
.themed-surface {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(120% 90% at 6% 0%, var(--th-b, #f7fbfa) 0%, transparent 64%),
    radial-gradient(95% 75% at 100% 100%, var(--th-a, #fbfdfd) 0%, transparent 62%),
    var(--surface);
  border-color: var(--th-border, var(--line));
}
.themed-surface { border-radius: 10px; }

.card[data-theme]::before,
.themed-surface::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; pointer-events: none;
  background-image: var(--th-motif-img);
  background-size: var(--th-motif-size, 180px 180px);
  opacity: .16;
  animation: themeDrift 26s ease-in-out infinite alternate;
}
.card[data-theme]::after {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; pointer-events: none;
  background: radial-gradient(80% 60% at 14% 0%, var(--th-glow, #2dd4bf), transparent 72%);
  opacity: .12;
  animation: themeGlow 18s ease-in-out infinite alternate;
}
.card[data-theme] .card-head h2 { color: var(--th-ink, var(--ink)); }
.card[data-theme] .card-head h2::before {
  content: ''; display: inline-block; width: 3px; height: 14px;
  margin-right: 8px; border-radius: 2px; vertical-align: -2px;
  background: var(--th-glow, var(--accent));
}

/* 8 种纹样：潮汐 / 星点 / 符环 / 网格 / 火光 / 雾气 / 气泡 / 星芒 */
[data-motif="tide"] {
  --th-motif-img: repeating-radial-gradient(circle at 50% 120%, transparent 0 18px, var(--th-glow) 19px 20px, transparent 21px 38px);
  --th-motif-size: 220px 220px;
}
[data-motif="stars"] {
  --th-motif-img: radial-gradient(circle, var(--th-glow) 1.5px, transparent 2px), radial-gradient(circle, var(--th-glow) 1px, transparent 1.5px);
  --th-motif-size: 92px 92px, 143px 143px;
}
[data-motif="rune"] {
  --th-motif-img: repeating-conic-gradient(from 0deg, transparent 0 28deg, var(--th-glow) 29deg 30deg, transparent 31deg 60deg);
  --th-motif-size: 170px 170px;
}
[data-motif="grid"] {
  --th-motif-img: linear-gradient(var(--th-glow) 1px, transparent 1px), linear-gradient(90deg, var(--th-glow) 1px, transparent 1px);
  --th-motif-size: 34px 34px;
}
[data-motif="flame"] {
  --th-motif-img: radial-gradient(ellipse at 50% 100%, var(--th-glow) 0%, transparent 56%);
  --th-motif-size: 120px 170px;
}
[data-motif="mist"] {
  --th-motif-img: repeating-linear-gradient(115deg, transparent 0 24px, var(--th-glow) 25px 26px, transparent 27px 54px);
  --th-motif-size: 165px 165px;
}
[data-motif="bubble"] {
  --th-motif-img: radial-gradient(circle at 30% 30%, transparent 0 12px, var(--th-glow) 13px 14px, transparent 15px), radial-gradient(circle at 72% 68%, transparent 0 8px, var(--th-glow) 9px 10px, transparent 11px);
  --th-motif-size: 120px 120px;
}
[data-motif="spark"] {
  --th-motif-img: repeating-linear-gradient(45deg, transparent 0 18px, var(--th-glow) 19px 20px, transparent 21px 40px), repeating-linear-gradient(-45deg, transparent 0 18px, var(--th-glow) 19px 20px, transparent 21px 40px);
  --th-motif-size: 82px 82px;
}

@keyframes themeDrift {
  from { background-position: 0 0; opacity: .12; }
  to   { background-position: 58px -42px; opacity: .22; }
}
@keyframes themeGlow {
  from { opacity: .08; }
  to   { opacity: .17; }
}
/* 设置面板开关 / 系统减少动态效果偏好：立即停动画，保留静态背景 */
body.no-motion .card[data-theme]::before,
body.no-motion .card[data-theme]::after,
body.no-motion .themed-surface::before { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .card[data-theme]::before, .card[data-theme]::after, .themed-surface::before { animation: none; }
}
@media (max-width: 640px) {
  .card[data-theme]::before, .themed-surface::before { opacity: .10; }
}

/* ── 装备系统优化：总览条 / 锁定 / 器物库工具栏 / 打造台 ────────────── */
.gear-overview {
  margin: 0 0 10px; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 11px; background: rgba(255, 255, 255, .74);
  font-size: 11.5px; color: var(--ink-soft);
}
.go-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; }
.go-cell { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.go-cell > span { font-size: 10.5px; color: var(--ink-soft); }
.go-cell > b { font-size: 14px; color: var(--accent-deep); line-height: 1.2; }
.go-cell > b.go-plus { color: #b02f2f; }
.go-bar { display: block; height: 5px; border-radius: 999px; background: #e6eeec; overflow: hidden; margin-top: 3px; }
.go-bar em { display: block; height: 100%; background: linear-gradient(90deg, #57b394, var(--accent)); border-radius: 999px; }
.go-affix { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 5px; color: var(--accent-deep); }
.go-label { font-size: 10.5px; color: var(--ink-soft); margin-right: 3px; white-space: nowrap; }

/* 最佳增战力：数字 + 器物名 + 立即穿戴 / 一键成套 */
.go-boost {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-top: 8px; padding: 6px 9px; border: 1px dashed #c9ddcf;
  border-radius: 9px; background: #f6fbf8;
}
.go-boost-num { font-size: 16px; color: #b02f2f; font-weight: 800; letter-spacing: .5px; }
.go-boost-name { font-size: 11px; color: var(--accent-deep); font-weight: 600; }
.go-boost-none { font-size: 11px; color: #8a9691; }
.go-boost .btn.tiny { padding: 2px 8px; font-size: 10px; min-height: 22px; flex: 0 0 auto; }

/* 成套装备：一套一卡，2 件 / 3 件档位与下一档提示一眼看清 */
.go-sets { display: block; margin-top: 8px; }
.go-set-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 5px; }
.go-set {
  min-width: 0; padding: 6px 8px; border-radius: 9px; border: 1px solid var(--line);
  background: #f7f9f9; font-size: 10.5px; color: var(--ink-soft);
}
.go-set.active { border-color: #c9a44e; background: #fff6e2; color: #8a6414; }
.go-set-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.go-set-top b { font-weight: 800; font-size: 11.5px; color: var(--accent-deep); }
.go-set.active .go-set-top b { color: #8a6414; }
.go-set-top span { font-size: 10px; white-space: nowrap; }
.go-tier-row { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
.go-tier {
  padding: 1px 5px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-size: 9.5px; white-space: nowrap;
}
.go-tier.on { border-color: #d9ab4a; background: #ffeec2; color: #8a6414; font-weight: 700; }

/* 装备等级配色图例：18 级各一色，按大阶分组易读 */
.level-legend { margin-top: 10px; padding: 9px 11px; border-radius: 11px; border: 1px dashed var(--line); background: #fafcfc; }
.lvl-legend-label { display: block; font-size: 10.5px; color: var(--ink-soft); margin-bottom: 6px; }
.lvl-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.lvl-chip {
  display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px;
  font-size: 9.5px; line-height: 1.2; border: 1px solid; white-space: nowrap;
}

.go-set-hint { display: block; margin-top: 4px; font-size: 9.5px; color: #8a9691; }
.go-set.active .go-set-hint { color: #9a6b1f; }

/* 单件装备卡：装备战力 + 套装档位 */
.gear-power { color: #b02f2f !important; font-weight: 800; font-size: 11px; }
.gear-set.on { color: #8a6414 !important; background: #fff2cf; border-radius: 999px; padding: 1px 6px; }

.gear-actions { display: flex; gap: 5px; margin-top: 7px; }
/* 两键并排：覆盖原单按钮的 width:100% / margin-top，防止文字被挤成三行 */
.gear .gear-actions .enhance-btn {
  flex: 1 1 auto; min-width: 0; width: auto; margin-top: 0;
  font-size: 11px; padding: 5px 6px; white-space: nowrap;
}
.gear-lock-btn {
  flex: 0 0 auto; padding: 5px 7px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-soft); font-size: 10.5px; cursor: pointer;
}
.gear-lock-btn:hover { border-color: var(--accent); color: var(--accent-deep); }
.gear-lock-btn.on { background: #fff2cf; border-color: #d9ab4a; color: #8a6414; font-weight: 700; }
.gear.is-locked { border-color: #d9ab4a !important; box-shadow: inset 0 0 0 1px #f3dfab; }

/* 8 部位操作区：装备/更换 + 卸下 + 分解 一行，锁定 + 强化 一行 */
.gear-actions { flex-wrap: wrap; }
.gear .gear-actions .btn.tiny {
  flex: 1 1 0; min-width: 0; padding: 3px 4px; font-size: 10.5px;
  min-height: 26px; white-space: nowrap;
}
.gear .gear-actions.sub { margin-top: 4px; }
.gear .gear-actions.sub .gear-lock-btn { flex: 0 0 auto; }

/* 物品强化行：砺锋石 +1 / +N，琥珀色与潮砂的绿色按钮明确区分 */
.gear .gear-actions.stones { margin-top: 4px; gap: 5px; }
.gear .stone-btn {
  flex: 1 1 0; min-width: 0; white-space: nowrap; cursor: pointer; font: inherit;
  font-size: 10.5px; font-weight: 700; padding: 4px 6px; min-height: 26px;
  border: 1px solid #d9ab4a; border-radius: 8px; background: #fff8e8; color: #8a6414;
  transition: background .12s ease, transform .12s ease;
}
.gear .stone-btn:hover:not(:disabled) { background: #ffedc4; }
.gear .stone-btn:active:not(:disabled) { transform: translateY(1px); }
.gear .stone-btn:disabled { background: #f2f5f4; color: #9aa5a2; border-color: var(--line); cursor: not-allowed; font-weight: 500; }
.gear-idx { display: inline; font-size: 10px; font-weight: 500; color: var(--ink-soft); }

/* 内嵌候选面板：为某部位从器物库挑一件穿上 */
.gear-picker { margin-top: 10px; padding: 10px; border: 1px solid #cfe3dd; border-radius: 11px; background: #f7fcfb; }
.gear-picker[hidden] { display: none; }
.gp-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.gp-head b { font-size: 13px; }
.gp-head span { font-size: 11px; color: var(--ink-soft); }
.gp-head em { color: var(--lose); font-style: normal; }
.gp-head .btn { margin-left: auto; flex: 0 0 auto; }
.gp-list { display: grid; gap: 5px; max-height: 260px; overflow-y: auto; }
.gp-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 6px 8px; border: 1px solid #e2ece9; border-radius: 8px; background: #fff; }
.gp-row b { font-size: 12px; min-width: 0; word-break: break-all; }
.gp-meta { font-size: 10.5px; color: var(--ink-soft); }
.gp-row .btn { margin-left: auto; flex: 0 0 auto; }
.gp-empty { padding: 10px 4px; font-size: 11.5px; color: var(--ink-soft); }

.vault-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.vault-actions .btn { flex: 0 0 auto; }
.vault-tools { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 2px 0 8px; }
.vt-group { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.vt-group em { font-style: normal; font-size: 10.5px; color: var(--ink-soft); margin-right: 2px; }
.vt-btn {
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  color: var(--ink-soft); font-size: 10.5px; cursor: pointer;
}
.vt-btn:hover { border-color: var(--accent); }
.vt-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }

.vault-row.is-better { border-color: #9ed3c0; background: #f2fbf7; }
/* 增战力最高的器物固定第一位，金色高亮 + 左侧竖条 */
.vault-row.is-first {
  border-color: #d9ab4a; background: #fff8e6;
  box-shadow: inset 3px 0 0 #e0b45f;
}
.vt-first {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: #e0b45f; color: #fff; font-size: 9.5px; font-weight: 800; white-space: nowrap;
}
.vt-set-delta, .vt-gain-set { font-weight: 700; }
.vt-set-delta.up, .vt-gain-set { color: #a33a3a; }
.vt-set-delta.down { color: #2f7a5b; }
.vault-ops { display: flex; flex: 0 0 auto; gap: 4px; align-items: center; }
.vault-ops .btn { padding: 4px 8px; font-size: 10.5px; flex: 0 0 auto; white-space: nowrap; }
.vt-rec {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px;
  background: #fde9c9; border: 1px solid #e0bb72; color: #8a6414; font-size: 9.5px; font-weight: 700;
}
.vt-delta { font-weight: 700; }
.vt-delta.up { color: #b02f2f; }
.vt-delta.down { color: #2f7a5b; }

.forge-list { max-height: 360px; }
.forge-block { border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .6); }
.forge-block.locked { border-color: #e2c47e; background: #fffaf0; }
.forge-block .forge-row { border: 0; border-radius: 0; padding: 7px 9px 5px; }
.forge-bar { display: block; height: 5px; border-radius: 999px; background: #e9efed; overflow: hidden; margin: 5px 0 2px; }
.forge-bar em { display: block; height: 100%; background: linear-gradient(90deg, #e0b45f, var(--accent)); }
.forge-have { font-size: 10px; color: var(--ink-soft); }
.forge-craft {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  padding: 5px 9px 7px; border-top: 1px dashed var(--line);
}
/* 覆盖全局 .btn.primary 的 flex:1 1 210px，避免打造按钮被拉成整行长条 */
.forge-craft .btn.tiny { padding: 2px 7px; font-size: 10px; min-height: 22px; flex: 0 0 auto; white-space: nowrap; }
.forge-craft .btn.tiny.on { background: #fff2cf; border-color: #d9ab4a; color: #8a6414; }
.fc-label { font-size: 10px; color: var(--ink-soft); margin-right: 2px; white-space: nowrap; }
.fc-cost { font-size: 9.5px; color: #8a9691; margin-left: auto; }
.fc-sep { width: 1px; height: 14px; background: var(--line); margin: 0 3px; }
.fc-lock { margin-left: 6px; font-size: 9.5px; color: #8a6414; font-weight: 700; }

@media (max-width: 640px) {
  .go-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .go-set-grid { grid-template-columns: 1fr; }
  .go-boost { gap: 4px; }
  .vault-head { flex-wrap: wrap; }
  .vault-actions { width: 100%; }
  .forge-list { max-height: 300px; }
  .fc-cost { width: 100%; margin-left: 0; }
  .vault-ops { flex-direction: column; }
}

/* ── 玩法说明：手机端改为「速览卡片」，不再用一整屏密集长文盖住游戏 ──
   桌面端维持原来的双栏完整列表；以下规则只在窄屏生效。 */
.guide-more-wrap, .guide-tail { display: none; }

@media (max-width: 900px) {
  .guide .guide-steps { list-style: none; padding-left: 0; counter-reset: guide-step; }
  .guide .guide-steps > li {
    margin: 0 0 10px;
    padding: 10px 11px;
    border: 1px solid #e3ecea;
    border-radius: 10px;
    background: #f8fbfb;
    font-size: 13.5px;
    line-height: 1.72;
    color: var(--ink-soft);
    overflow-wrap: anywhere;
  }
  /* 编号徽标内联在行首，文字从卡片最左侧起铺满整行宽度（左右铺完整），不再向右缩进 */
  .guide .guide-steps > li::before {
    counter-increment: guide-step;
    content: counter(guide-step);
    display: inline-flex; align-items: center; justify-content: center;
    width: 19px; height: 19px; border-radius: 50%;
    background: var(--accent); color: #fff;
    font-size: 10.5px; font-weight: 700;
    margin-right: 8px;
    vertical-align: 2px;
  }
  /* 默认只显示前 4 条速览，点「展开完整玩法说明」后看全部 */
  .guide:not(.guide-full) .guide-steps > li:nth-child(n+5) { display: none; }
  .guide .guide-steps > li b { color: var(--ink); }
  .guide-more-wrap { display: block; margin: 4px 0 2px; }
  .guide-more-wrap .btn { width: 100%; }
  .guide-more-note { margin: 7px 0 0; font-size: 11.5px; }
  .guide.guide-full .guide-more-note { display: none; }
  .guide .keys > li { font-size: 13.5px; line-height: 1.72; margin-bottom: 8px; }
  /* 末尾给底部固定操作条留出安全距离，避免最后一行被压住 */
  .guide-tail { display: block; margin-top: 14px; padding-bottom: 18px; }
  .guide-tail .btn { width: 100%; }
}
