/* ==========================================================================
   MAPLE PULSE · 枫叶情报局（三套冒险岛主题 + 自定义背景色 · 零外部 CDN）
   主题：
   - data-theme="grandis" : 暗夜格兰蒂斯（深空蓝黑 × 六转星辉 × 暖枫橙）
   - data-theme="morning" : 枫叶晨报（清爽浅色纸感 × 枫叶暖橙 · 适合白天长文阅读）
   - data-theme="cozy"    : 奇幻菇菇（默认 · 暖奶油色 × 冒险岛橙菇活力圆角社区风）
   ========================================================================== */

body[data-theme="grandis"] {
  --bg-deep: #070B14;
  --bg-sidebar: rgba(10, 16, 32, 0.92);
  --bg-panel: linear-gradient(180deg, rgba(17, 25, 45, 0.88) 0%, rgba(11, 17, 32, 0.94) 100%);
  --bg-card: linear-gradient(180deg, rgba(16, 24, 42, 0.90) 0%, rgba(11, 17, 30, 0.96) 100%);
  --bg-card-footer: rgba(9, 15, 30, 0.78);
  --bg-subtle: rgba(8, 14, 28, 0.90);
  --bg-elevated: rgba(30, 41, 59, 0.88);
  --bg-hover: rgba(30, 41, 59, 0.58);
  --bg-modal: #0C1324;
  --bg-input: #080E1C;
  --bg-online: linear-gradient(135deg, rgba(16, 28, 52, 0.95), rgba(11, 19, 37, 0.98));
  --bg-starforce: linear-gradient(135deg, rgba(45, 28, 12, 0.88) 0%, rgba(19, 22, 42, 0.95) 58%, rgba(30, 20, 56, 0.94) 100%);
  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.25);
  --border-sidebar: rgba(30, 41, 59, 0.85);
  --text-main: #E2E8F0;
  --text-bright: #FFFFFF;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --text-accent: #FDBA74;
  --text-cyan: #67E8F9;
  --text-sf-title: #FEF3C7;
  --text-sf-sub: rgba(253, 230, 138, 0.84);
  --sf-bar-bg: rgba(0, 0, 0, 0.32);
  --accent-orange: #F97316;
  --accent-amber: #F59E0B;
  --card-radius: 16px;
  --panel-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.05), 0 12px 32px -16px rgba(0, 0, 0, 0.78);
  --card-hover-shadow: 0 14px 32px -12px rgba(249, 115, 22, 0.18), 0 8px 20px -10px rgba(124, 58, 237, 0.18);
  --bg-overlay:
    radial-gradient(ellipse 60% 45% at 12% 0%, rgba(249, 115, 22, 0.13), transparent 65%),
    radial-gradient(ellipse 55% 45% at 88% 4%, rgba(124, 58, 237, 0.16), transparent 65%),
    radial-gradient(ellipse 40% 35% at 50% 100%, rgba(34, 211, 238, 0.08), transparent 65%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 56 98'%3E%3Cg fill='none' stroke='%2394A3B8' stroke-opacity='0.055' stroke-width='1'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 98'/%3E%3Cpath d='M28 0L28 34L0 50L0 84L28 98L56 84L56 50L28 34'/%3E%3C/g%3E%3C/svg%3E");
  --tier-legendary-fg: #4ADE80; --tier-legendary-bg: rgba(34, 197, 94, 0.13); --tier-legendary-bd: rgba(34, 197, 94, 0.36);
  --tier-unique-fg: #FBBF24;    --tier-unique-bg: rgba(245, 158, 11, 0.14);   --tier-unique-bd: rgba(245, 158, 11, 0.38);
  --tier-epic-fg: #C084FC;      --tier-epic-bg: rgba(168, 85, 247, 0.14);     --tier-epic-bd: rgba(168, 85, 247, 0.38);
  --tier-rare-fg: #38BDF8;      --tier-rare-bg: rgba(56, 189, 248, 0.13);     --tier-rare-bd: rgba(56, 189, 248, 0.36);
  --scroll-track: #070B14;
  --scroll-thumb: #1E293B;
}

/* 风格 2：枫叶晨报（清爽浅色极简新闻风） */
body[data-theme="morning"] {
  --bg-deep: #F6F4EF;
  --bg-sidebar: rgba(255, 255, 255, 0.94);
  --bg-panel: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-footer: #FAF8F5;
  --bg-subtle: #F7F4EE;
  --bg-elevated: #F1EFEA;
  --bg-hover: #F5F2EC;
  --bg-modal: #FFFFFF;
  --bg-input: #FAF8F5;
  --bg-online: linear-gradient(135deg, #ECFDF5, #F0FDF4);
  --bg-starforce: linear-gradient(135deg, #FFF7ED 0%, #FEF3C7 100%);
  --border-subtle: #E7E5E4;
  --border-strong: #D6D3D1;
  --border-sidebar: #E7E5E4;
  --text-main: #292524;
  --text-bright: #1C1917;
  --text-muted: #57534E;
  --text-dim: #78716C;
  --text-accent: #C2410C;
  --text-cyan: #0369A1;
  --text-sf-title: #9A3412;
  --text-sf-sub: #7C2D12;
  --sf-bar-bg: rgba(255, 255, 255, 0.72);
  --accent-orange: #EA580C;
  --accent-amber: #D97706;
  --card-radius: 16px;
  --panel-shadow: 0 1px 2px rgba(28, 25, 23, 0.04), 0 8px 24px -16px rgba(28, 25, 23, 0.14);
  --card-hover-shadow: 0 12px 26px -12px rgba(234, 88, 12, 0.16), 0 4px 12px -6px rgba(28, 25, 23, 0.08);
  --bg-overlay:
    radial-gradient(ellipse 55% 40% at 15% 0%, rgba(251, 146, 60, 0.10), transparent 65%),
    radial-gradient(ellipse 45% 35% at 88% 5%, rgba(245, 158, 11, 0.08), transparent 65%);
  --tier-legendary-fg: #15803D; --tier-legendary-bg: #DCFCE7; --tier-legendary-bd: #86EFAC;
  --tier-unique-fg: #B45309;    --tier-unique-bg: #FEF3C7;    --tier-unique-bd: #FCD34D;
  --tier-epic-fg: #7E22CE;      --tier-epic-bg: #F3E8FF;      --tier-epic-bd: #D8B4FE;
  --tier-rare-fg: #0369A1;      --tier-rare-bg: #E0F2FE;      --tier-rare-bd: #7DD3FC;
  --scroll-track: #F6F4EF;
  --scroll-thumb: #D6D3D1;
}

/* 风格 3：奇幻菇菇（默认 · 暖奶油冒险岛原生社区风） */
:root,
body[data-theme="cozy"] {
  --bg-deep: #FFF9EE;
  --bg-sidebar: rgba(255, 252, 245, 0.96);
  --bg-panel: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-footer: #FFFBF2;
  --bg-subtle: #FFF7E6;
  --bg-elevated: #FFEDD5;
  --bg-hover: #FFF3DC;
  --bg-modal: #FFFDF9;
  --bg-input: #FFFBF2;
  --bg-online: linear-gradient(135deg, #ECFDF5, #FEF9C3);
  --bg-starforce: linear-gradient(135deg, #FFEDD5 0%, #FEF08A 100%);
  --border-subtle: rgba(234, 88, 12, 0.18);
  --border-strong: rgba(234, 88, 12, 0.32);
  --border-sidebar: rgba(234, 88, 12, 0.16);
  --text-main: #432818;
  --text-bright: #2B180C;
  --text-muted: #6F4E37;
  --text-dim: #9C7A63;
  --text-accent: #EA580C;
  --text-cyan: #0F766E;
  --text-sf-title: #9A3412;
  --text-sf-sub: #7C2D12;
  --sf-bar-bg: rgba(255, 255, 255, 0.78);
  --accent-orange: #F97316;
  --accent-amber: #F59E0B;
  --card-radius: 22px;
  --panel-shadow: 0 4px 0 0 rgba(217, 119, 6, 0.10), 0 10px 24px -12px rgba(120, 53, 15, 0.12);
  --card-hover-shadow: 0 6px 0 0 rgba(234, 88, 12, 0.18), 0 14px 28px -10px rgba(120, 53, 15, 0.16);
  --bg-overlay:
    radial-gradient(ellipse 60% 45% at 15% 0%, rgba(251, 146, 60, 0.16), transparent 65%),
    radial-gradient(ellipse 50% 40% at 88% 8%, rgba(52, 211, 153, 0.13), transparent 65%);
  --tier-legendary-fg: #15803D; --tier-legendary-bg: #DCFCE7; --tier-legendary-bd: #86EFAC;
  --tier-unique-fg: #B45309;    --tier-unique-bg: #FEF3C7;    --tier-unique-bd: #FBBF24;
  --tier-epic-fg: #7E22CE;      --tier-epic-bg: #F3E8FF;      --tier-epic-bd: #D8B4FE;
  --tier-rare-fg: #0F766E;      --tier-rare-bg: #CCFBF1;      --tier-rare-bd: #5EEAD4;
  --scroll-track: #FFF9EE;
  --scroll-thumb: #FDBA74;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--custom-bg, var(--bg-deep));
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color 0.25s ease, color 0.2s ease;
}

/* ==================== 通用移动端自适应地基（后续新功能直接复用自动适配） ==================== */
img, video, iframe { max-width: 100%; }
.glass-panel, .modal-box, .detail-modal-panel { min-width: 0; }
.auto-grid-sm { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr)); gap: 10px; }
.auto-grid-md { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.auto-grid-lg { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.scroll-x-strip { -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.scroll-x-strip::-webkit-scrollbar { display: none; }
.table-scroll-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.faction-tabs-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* 移动端吸顶导航、快捷频道条与抽屉关闭按钮（桌面端默认隐藏） */
.mobile-header-wrap,
.mobile-nav-backdrop,
.mobile-drawer-close { display: none; }
body.mobile-nav-open { overflow: hidden; }

button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.6; }
a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--scroll-track); }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 999px; }

.hidden { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hexa-grid-bg {
  background-color: var(--custom-bg, var(--bg-deep));
  background-image: var(--bg-overlay);
  background-attachment: fixed;
}

/* 飘落红枫叶动效层 */
.leaf-layer {
  position: fixed;
  inset: 0 0 auto 0;
  height: 240px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
@keyframes leafFall {
  0%   { transform: translateY(-24px) translateX(0) rotate(0deg); opacity: 0; }
  15%  { opacity: 0.42; }
  85%  { opacity: 0.28; }
  100% { transform: translateY(220px) translateX(48px) rotate(165deg); opacity: 0; }
}
.maple-leaf-particle {
  position: absolute;
  pointer-events: none;
  animation: leafFall linear infinite;
}

/* 主布局：全宽自适应铺满，侧栏底板从顶贯通到底绝不断层 */
.app-shell {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

.sidebar {
  width: 276px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--border-sidebar);
  padding: 20px;
}

.sidebar-sticky {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* 仅当桌面端窗口高度足以完整容纳全部侧栏内容时吸顶；非全屏矮窗口自然滚动，绝不截断也不出双滚动条 */
@media (min-width: 901px) and (min-height: 950px) {
  .sidebar-sticky {
    position: sticky;
    top: 20px;
  }
}

.sidebar-top { display: flex; flex-direction: column; gap: 18px; }
.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.main-content {
  flex: 1;
  min-width: 0;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 玻璃面板 */
.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  box-shadow: var(--panel-shadow);
}

/* 品牌区 & 六边形徽章 */
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand-left { display: flex; align-items: center; gap: 12px; }
.hex-badge {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hex-clip { clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%); }
.hex-outer { position: absolute; inset: 0; background: linear-gradient(135deg, #F97316, #F59E0B, #7C3AED); }
.hex-inner {
  position: absolute;
  inset: 2px;
  background: var(--bg-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F97316;
}
.brand-title { font-size: 16px; font-weight: 800; color: var(--text-bright); letter-spacing: -0.01em; }
.brand-tag {
  display: inline-block;
  margin-top: 2px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-accent);
  background: linear-gradient(90deg, rgba(249,115,22,0.18), rgba(245,158,11,0.16));
  border: 1px solid rgba(249,115,22,0.34);
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--accent-orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}
.icon-btn:hover { filter: brightness(1.06); }
.icon-btn.muted { color: var(--text-dim); opacity: 0.65; }

/* 侧栏区块标题与导航 */
.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 8px;
  margin-bottom: 6px;
}

.nav-list { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.18s ease;
}
.nav-item:hover { color: var(--text-bright); background: var(--bg-hover); }
.nav-item.active {
  color: var(--text-accent);
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.18), rgba(168, 85, 247, 0.12));
  border-color: rgba(249, 115, 22, 0.36);
}
.nav-left { display: flex; align-items: center; gap: 9px; }
.nav-count {
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 12px;
  background: var(--bg-elevated);
  color: var(--text-dim);
}
.nav-item.active .nav-count { background: rgba(249, 115, 22, 0.20); color: var(--text-accent); }

/* 我的角色槽 */
.slots-box {
  border-radius: var(--card-radius);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.slots-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.slots-title { font-weight: 700; color: var(--text-bright); display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; flex-shrink: 0; }
.dot-orange { background: #FB923C; }
.dot-cyan { background: #22D3EE; }
.dot-amber { background: #FBBF24; }
.dot-emerald { background: #10B981; }
.dot-purple { background: #A855F7; }
.dot-sky { background: #38BDF8; }

.link-btn { background: none; border: none; padding: 0; font-size: 12px; font-weight: 700; color: var(--text-cyan); }
.link-btn:hover { opacity: 0.82; }

.slot-list { display: flex; flex-direction: column; gap: 6px; }
.slot-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 12px;
  background: var(--bg-modal);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  text-align: left;
  transition: all 0.18s ease;
}
.slot-item:hover { border-color: var(--border-strong); }
.slot-item.active {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.16), rgba(99, 102, 241, 0.16));
  border-color: rgba(34, 211, 238, 0.5);
  color: var(--text-bright);
}
.slot-left { display: flex; align-items: center; gap: 9px; min-width: 0; }
.slot-num {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  flex-shrink: 0;
  background: var(--bg-elevated);
  color: var(--text-accent);
}
.slot-item.active .slot-num { background: #06B6D4; color: #FFFFFF; }
.slot-name { font-size: 12px; font-weight: 700; line-height: 1.25; }
.slot-en { font-size: 12px; color: var(--text-dim); }
.slot-status { font-size: 12px; color: var(--text-dim); flex-shrink: 0; }
.slot-item.active .slot-status { color: var(--text-cyan); font-weight: 700; }
.slots-tip { margin: 0; font-size: 12px; color: var(--text-dim); line-height: 1.45; }

/* 传送门外链 */
.portal-list { display: flex; flex-direction: column; gap: 2px; }
.portal-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
  color: var(--text-muted);
  transition: all 0.16s ease;
}
.portal-link:hover { background: var(--bg-hover); color: var(--text-accent); }
.portal-left { display: flex; align-items: center; gap: 8px; }

/* 在线岛民面板 */
.online-panel {
  border-radius: var(--card-radius);
  background: var(--bg-online);
  border: 1px solid rgba(16, 185, 129, 0.30);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.online-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.online-title { font-weight: 700; color: var(--text-bright); display: flex; align-items: center; gap: 7px; }
.ping-wrap { position: relative; width: 10px; height: 10px; display: inline-flex; }
.ping-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #10B981;
  opacity: 0.65;
  animation: ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.ping-core { position: relative; width: 10px; height: 10px; border-radius: 999px; background: #10B981; }
@keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } }
.ch-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--tier-legendary-fg);
  background: var(--tier-legendary-bg);
  border: 1px solid var(--tier-legendary-bd);
}
.online-main { display: flex; align-items: flex-end; justify-content: space-between; }
.online-num { font-size: 24px; font-weight: 900; color: var(--text-bright); line-height: 1; }
.online-unit { font-size: 12px; color: var(--text-muted); margin-left: 4px; }
.trend-bars { display: flex; align-items: flex-end; gap: 4px; height: 24px; }
.trend-bar { width: 6px; border-radius: 999px; background: rgba(16, 185, 129, 0.42); transition: height 0.3s ease; }
.trend-bar:last-child { background: #10B981; }
.online-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
}
.online-foot-label { color: var(--text-dim); }
.online-foot-val { color: var(--text-bright); font-weight: 700; margin-top: 2px; }
.online-foot-val.orange { color: var(--text-accent); }
.online-foot-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-cyan);
  margin-top: 2px;
  line-height: 1.3;
}
.online-foot-sub.is-running { color: var(--text-accent); }
.online-foot-sub.is-paused { color: var(--text-dim); }

.admin-entry-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-size: 12px;
  transition: all 0.18s ease;
}
.admin-entry-btn:hover {
  color: var(--text-bright);
  background: var(--bg-hover);
  border-color: var(--border-subtle);
}

/* 顶部 HUD 栏 */
.top-hud {
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 20;
}
.search-wrap { position: relative; flex: 1; min-width: 210px; max-width: 420px; }
.search-input {
  width: 100%;
  padding: 9px 40px 9px 36px;
  border-radius: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  color: var(--text-bright);
  font-size: 12px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.search-input::placeholder { color: var(--text-dim); }
.search-input:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
}
.search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; }
.kbd-hint {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 12px;
}

.hud-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; position: relative; }
.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 12px;
  background: var(--tier-legendary-bg);
  border: 1px solid var(--tier-legendary-bd);
  color: var(--tier-legendary-fg);
  font-size: 12px;
  font-weight: 700;
}
.timer-box {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 13px;
  border-radius: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
}
.timer-item { display: flex; align-items: center; gap: 6px; }
.timer-label { color: var(--text-muted); }
.timer-val-cyan { color: var(--text-cyan); font-weight: 700; }
.timer-val-amber { color: var(--accent-amber); font-weight: 700; }
.timer-sep { color: var(--border-strong); }

/* 主题与背景色切换按钮及浮层面板 */
.theme-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-bright);
  font-size: 12px;
  font-weight: 700;
  transition: all 0.16s ease;
}
.theme-trigger-btn:hover { border-color: var(--accent-orange); color: var(--text-accent); }

.theme-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 310px;
  border-radius: 18px;
  background: var(--bg-modal);
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.45);
  padding: 16px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: popIn 0.18s ease-out forwards;
}
.theme-pop-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 800; color: var(--text-bright); }
.theme-sec-title { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; }
.theme-options-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-opt-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
  transition: all 0.16s ease;
}
.theme-opt-btn:hover { border-color: var(--accent-orange); }
.theme-opt-btn.active {
  border-color: var(--accent-orange);
  background: rgba(249, 115, 22, 0.14);
  color: var(--text-accent);
}
.theme-preview-dot {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 2px solid rgba(148, 163, 184, 0.35);
}

.bg-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bg-swatch {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid var(--border-strong);
  padding: 0;
  transition: transform 0.15s, border-color 0.15s;
}
.bg-swatch:hover { transform: scale(1.1); }
.bg-swatch.active { border-color: var(--accent-orange); box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.35); }
.bg-custom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
}
.color-picker-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  cursor: pointer;
}
.color-picker-input {
  width: 28px;
  height: 24px;
  border: none;
  border-radius: 6px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

/* 首屏 Bento 网格 */
.bento-top { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.briefing-panel { overflow: hidden; }
.top-accent-line { height: 2px; width: 100%; background: linear-gradient(90deg, #F97316, #FBBF24, #A855F7); }
.briefing-inner { padding: 18px 20px; }
.briefing-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.briefing-head-left { display: flex; align-items: center; gap: 12px; }
.mush-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(249,115,22,0.18), rgba(245,158,11,0.10));
  border: 1px solid rgba(249,115,22,0.34);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.briefing-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.briefing-title { margin: 0; font-size: 14px; font-weight: 800; color: var(--text-bright); }
.sync-countdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-cyan);
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
}
.sync-countdown-badge.is-running {
  color: var(--text-accent);
  border-color: rgba(249, 115, 22, 0.42);
  background: rgba(249, 115, 22, 0.12);
}
.sync-countdown-badge.is-running .dot {
  background: var(--accent-orange);
  animation: pulseDot 1.2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}
.briefing-sub { margin: 3px 0 0; font-size: 12px; color: var(--text-muted); }
.btn-ghost-sm {
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}
.btn-ghost-sm:hover { color: var(--text-accent); border-color: rgba(249, 115, 22, 0.45); }

.briefing-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.brief-card {
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 13px;
  cursor: pointer;
  transition: background 0.18s, transform 0.18s;
}
.brief-card:hover { background: var(--bg-hover); transform: translateY(-1px); }
.brief-card.tier-border-legendary { border-color: var(--tier-legendary-bd); }
.brief-card.tier-border-epic { border-color: var(--tier-epic-bd); }
.brief-card.tier-border-unique { border-color: var(--tier-unique-bd); }
.brief-card.tier-border-rare { border-color: var(--tier-rare-bd); }
.brief-card-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.brief-card-text { margin: 0; font-size: 12px; color: var(--text-main); line-height: 1.55; }

/* Sunny Sunday 星力流光卡 */
.starforce-panel {
  border-radius: var(--card-radius);
  padding: 18px 20px;
  background: var(--bg-starforce);
  border: 1px solid rgba(245, 158, 11, 0.38);
  box-shadow: var(--panel-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}
.sf-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sf-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--tier-unique-fg);
  background: var(--tier-unique-bg);
  border: 1px solid var(--tier-unique-bd);
  margin-bottom: 8px;
}
.sf-title { margin: 0; font-size: 16px; font-weight: 800; color: var(--text-sf-title); line-height: 1.35; }
.sf-sub { margin: 4px 0 0; font-size: 12px; color: var(--text-sf-sub); }
.sf-countdown { text-align: right; flex-shrink: 0; }
.sf-countdown-label { font-size: 12px; color: var(--text-sf-sub); }
.sf-countdown-val { font-size: 20px; font-weight: 900; color: var(--accent-amber); }
.sf-stars-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--sf-bar-bg);
  border: 1px solid rgba(245, 158, 11, 0.25);
  font-size: 12px;
}
.sf-stars { color: #F59E0B; letter-spacing: 1px; }
.sf-highlight { color: var(--text-sf-title); font-weight: 700; }
.sf-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-sf-sub); }

/* 最新真实活动条带（自动联动「活动与周日福利」最新 3 条，可点击直达详情） */
.events-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.event-card {
  padding: 13px 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.2s ease;
}
.event-card:hover {
  transform: translateY(-2px);
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow: var(--card-hover-shadow);
}
.event-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.event-name {
  font-weight: 700;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.event-days { font-weight: 600; flex-shrink: 0; font-size: 12px; }
.event-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.event-accent-line { height: 3px; width: 100%; border-radius: 999px; opacity: 0.78; }
.progress-track { width: 100%; height: 6px; border-radius: 999px; background: var(--bg-elevated); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; }
.fill-orange { background: linear-gradient(90deg, #F97316, #FBBF24); }
.fill-purple { background: linear-gradient(90deg, #A855F7, #6366F1); }
.fill-emerald { background: linear-gradient(90deg, #10B981, #22D3EE); }

/* 列表工具条 */
.toolbar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.toolbar-left { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--bg-elevated);
  color: var(--text-bright);
  border: 1px solid var(--border-strong);
}
.filter-pill.cyan {
  background: var(--tier-rare-bg);
  color: var(--tier-rare-fg);
  border-color: var(--tier-rare-bd);
}
.filter-pill.ghost {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border-color: var(--border-subtle);
}
.filter-pill.ghost:hover { color: var(--text-accent); border-color: rgba(249, 115, 22, 0.45); }

.toolbar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar-chip-btn {
  padding: 6px 11px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  transition: all 0.16s ease;
  white-space: nowrap;
}
.toolbar-chip-btn:hover {
  color: var(--text-bright);
  border-color: var(--border-strong);
}
.toolbar-chip-btn.active {
  color: var(--text-accent);
  background: rgba(249, 115, 22, 0.16);
  border-color: rgba(249, 115, 22, 0.42);
}
.toolbar-select {
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-bright);
  font-size: 12px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}
.toolbar-select:hover,
.toolbar-select:focus {
  border-color: rgba(249, 115, 22, 0.45);
}
.toolbar-select option {
  background: var(--bg-modal);
  color: var(--text-bright);
}
.seg-group {
  display: inline-flex;
  padding: 3px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
}
.seg-btn {
  padding: 5px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.seg-btn:hover { color: var(--text-bright); }
.seg-btn.active { background: rgba(249, 115, 22, 0.20); color: var(--text-accent); }
.seg-btn.active-cyan { background: rgba(14, 165, 233, 0.20); color: var(--text-cyan); }

/* 装备潜能品阶徽章 */
.tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid;
}
.tier-legendary { color: var(--tier-legendary-fg); background: var(--tier-legendary-bg); border-color: var(--tier-legendary-bd); }
.tier-unique    { color: var(--tier-unique-fg);    background: var(--tier-unique-bg);    border-color: var(--tier-unique-bd); }
.tier-epic      { color: var(--tier-epic-fg);      background: var(--tier-epic-bg);      border-color: var(--tier-epic-bd); }
.tier-rare      { color: var(--tier-rare-fg);      background: var(--tier-rare-bg);      border-color: var(--tier-rare-bd); }

.tier-bar-legendary { background: linear-gradient(90deg, #22C55E, #10B981); }
.tier-bar-unique    { background: linear-gradient(90deg, #F59E0B, #F97316); }
.tier-bar-epic      { background: linear-gradient(90deg, #A855F7, #6366F1); }
.tier-bar-rare      { background: linear-gradient(90deg, #38BDF8, #06B6D4); }

/* 攻略卡片网格 & 列表（宽屏自动扩展 3~4 列，左右不再留白） */
.news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 1580px) {
  .news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 2150px) {
  .news-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.news-list { display: flex; flex-direction: column; gap: 12px; }

.maple-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  box-shadow: var(--panel-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}
.maple-card:hover {
  transform: translateY(-2px);
  border-color: rgba(249, 115, 22, 0.48);
  box-shadow: var(--card-hover-shadow);
}
.card-top-bar { height: 3px; width: 100%; }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 11px; }
.card-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.source-badge {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
}
.card-right-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.card-time { font-size: 12px; color: var(--text-dim); }
.star-btn {
  padding: 3px 7px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 14px;
}
.star-btn:hover { background: var(--bg-elevated); color: #F59E0B; }
.star-btn.saved { color: #F59E0B; background: rgba(245, 158, 11, 0.14); }

.card-title { margin: 0; font-size: 15px; font-weight: 800; color: var(--text-bright); line-height: 1.42; transition: color 0.16s; }
.maple-card:hover .card-title { color: var(--text-accent); }

.card-summary {
  border-radius: 12px;
  background: var(--bg-subtle);
  border-left: 3px solid rgba(249, 115, 22, 0.72);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.6;
}
.card-summary strong { color: var(--text-accent); }

.card-footer {
  padding: 11px 18px;
  background: var(--bg-card-footer);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.job-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.job-chip {
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-main);
  font-size: 12px;
}
.job-chip:hover { background: var(--tier-rare-bg); color: var(--tier-rare-fg); border-color: var(--tier-rare-bd); }
.card-action { font-size: 12px; font-weight: 700; color: var(--text-cyan); flex-shrink: 0; }

/* 紧凑列表卡 */
.maple-card-row { flex-direction: row; align-items: stretch; }
.row-side-bar { width: 4px; flex-shrink: 0; }
.row-inner {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.row-left { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.row-summary { margin: 0; font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.site-footer {
  padding: 16px 0 28px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

/* ==================== 独立私密管理后台 ==================== */
.admin-shell {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 24px 32px 56px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.admin-header {
  padding: 18px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-color: rgba(249, 115, 22, 0.30);
}
.admin-head-left { display: flex; align-items: center; gap: 14px; }
.admin-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(249,115,22,0.20), rgba(168,85,247,0.20));
  border: 1px solid rgba(251,146,60,0.4);
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.admin-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin-title { margin: 0; font-size: 16px; font-weight: 800; color: var(--text-bright); }
.admin-only-badge {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #E11D48;
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.34);
}
body[data-theme="grandis"] .admin-only-badge { color: #FDA4AF; }
.admin-sub { margin: 3px 0 0; font-size: 12px; color: var(--text-muted); }
.admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* 通用按钮 */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(90deg, #F97316, #F59E0B);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 20px -8px rgba(249, 115, 22, 0.5);
  transition: filter 0.18s;
}
body[data-theme="grandis"] .btn-primary { color: #090F1E; }
.btn-primary:hover { filter: brightness(1.06); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-bright);
  font-size: 12px;
  font-weight: 600;
}
.btn-secondary:hover { filter: brightness(1.06); }

.btn-white {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 12px;
  border: none;
  background: var(--text-bright);
  color: var(--bg-modal);
  font-size: 12px;
  font-weight: 800;
}
.btn-white:hover { opacity: 0.9; }

.btn-cyan {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 12px;
  background: var(--tier-rare-bg);
  border: 1px solid var(--tier-rare-bd);
  color: var(--tier-rare-fg);
  font-size: 12px;
  font-weight: 700;
}
.btn-cyan:hover { filter: brightness(1.06); }

.btn-purple {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 12px;
  background: var(--tier-epic-bg);
  border: 1px solid var(--tier-epic-bd);
  color: var(--tier-epic-fg);
  font-size: 12px;
  font-weight: 700;
}
.btn-purple:hover { filter: brightness(1.06); }

.btn-danger-ghost {
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}
.btn-danger-ghost:hover { color: #F43F5E; border-color: rgba(244, 63, 94, 0.4); }

/* 后台统计卡片 */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-muted); }
.stat-main { font-size: 16px; font-weight: 800; color: var(--text-bright); }
.stat-sub { font-size: 12px; color: var(--text-muted); }

.status-chip { padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status-chip.ok { color: var(--tier-legendary-fg); background: var(--tier-legendary-bg); }
.status-chip.off { color: var(--text-dim); background: var(--bg-elevated); }

/* 同步节点进度区（自适应列数，按勾选的源动态排布） */
.sync-panel { padding: 18px 20px; border-color: rgba(249, 115, 22, 0.38); display: flex; flex-direction: column; gap: 12px; }
.sync-nodes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 10px; }
.sync-node {
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  font-size: 12px;
}
.sync-node.running { border-color: rgba(249,115,22,0.5); background: rgba(249,115,22,0.1); }
.sync-node.done { border-color: var(--tier-legendary-bd); background: var(--tier-legendary-bg); }
.sync-node.error { border-color: rgba(244,63,94,0.45); background: rgba(244,63,94,0.08); }
.sync-node-name { font-weight: 700; color: var(--text-bright); }
.sync-node-hint { color: var(--text-dim); margin-top: 2px; }
.sync-node-msg { font-weight: 700; margin-top: 6px; }

/* 表单网格 */
.admin-two-col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.admin-card { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.admin-card-title { margin: 0; font-size: 14px; font-weight: 800; color: var(--text-bright); display: flex; align-items: center; gap: 8px; }
.admin-card-sub { margin: 4px 0 0; font-size: 12px; color: var(--text-muted); }

.form-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.field label { color: var(--text-muted); font-weight: 600; }
.field input[type="text"],
.field input[type="password"],
.field input[type="number"],
.field input[type="time"],
.field select {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  color: var(--text-bright);
  font-size: 12px;
  outline: none;
}
.field input:focus, .field select:focus { border-color: var(--accent-orange); }

.toggle-box {
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.toggle-title { font-weight: 700; color: var(--text-bright); }
.toggle-desc { color: var(--text-dim); margin-top: 2px; }
.toggle-inline { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--text-bright); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: #F97316; cursor: pointer; }

.test-result-box {
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--tier-rare-bd);
  padding: 12px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.test-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-btn-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }

.sources-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.source-toggle-card {
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.logs-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.logs-table th, .logs-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border-subtle); }
.logs-table th { color: var(--text-dim); font-weight: 700; }

/* 后台访客 IP 访问监控面板 */
.visitors-head { flex-wrap: wrap; align-items: center; }
.visitors-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.visitors-search {
  width: 185px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  color: var(--text-bright);
  font-size: 12px;
  outline: none;
}
.visitors-search:focus { border-color: var(--accent-orange); }
.visitors-summary-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.visitors-diag-box {
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--tier-unique-bg);
  border: 1px solid var(--tier-unique-bd);
  color: var(--text-main);
  font-size: 12px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.visitors-diag-box.ok {
  background: var(--bg-subtle);
  border-color: var(--border-subtle);
}
.visitors-diag-headers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.visitors-diag-chip {
  padding: 2px 8px;
  border-radius: 7px;
  background: var(--bg-modal);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 11px;
}
.visitor-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 12px;
}
.visitor-stat-pill strong { color: var(--text-bright); font-weight: 800; }
.visitor-stat-pill.online {
  background: var(--tier-legendary-bg);
  border-color: var(--tier-legendary-bd);
  color: var(--tier-legendary-fg);
}
.visitor-stat-pill.online strong { color: var(--tier-legendary-fg); }

.visitors-table-wrap {
  max-height: 360px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
}
.visitors-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-card-footer);
  white-space: nowrap;
}
.visitors-table tbody tr:hover { background: var(--bg-hover); }
.visitors-table td { vertical-align: middle; }

.visitor-ip-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.visitor-ip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-bright);
  font-size: 12px;
  font-weight: 700;
  transition: all 0.15s ease;
}
.visitor-ip-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}
.ip-type-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
.ip-type-tag.public {
  color: var(--tier-rare-fg);
  background: var(--tier-rare-bg);
  border: 1px solid var(--tier-rare-bd);
}
.ip-type-tag.lan {
  color: var(--tier-unique-fg);
  background: var(--tier-unique-bg);
  border: 1px solid var(--tier-unique-bd);
}
.ip-type-tag.local {
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
}
.ip-type-tag.self {
  color: var(--text-accent);
  background: rgba(249, 115, 22, 0.14);
  border: 1px solid rgba(249, 115, 22, 0.34);
}
.ip-lookup-link {
  font-size: 11px;
  color: var(--text-cyan);
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bg-elevated);
  white-space: nowrap;
}
.ip-lookup-link:hover { filter: brightness(1.08); text-decoration: underline; }
.online-state-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.online-state-pill.on {
  color: var(--tier-legendary-fg);
  background: var(--tier-legendary-bg);
  border: 1px solid var(--tier-legendary-bd);
}
.online-state-pill.off {
  color: var(--text-dim);
  background: var(--bg-elevated);
}
.visitor-path-chip {
  display: inline-block;
  max-width: 180px;
  padding: 2px 7px;
  border-radius: 7px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 11px;
  vertical-align: middle;
}

/* ==================== 居中弹窗（含攻略详情弹窗 + 职业/登录弹窗） ==================== */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

@keyframes popIn {
  from { transform: scale(0.95) translateY(10px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

/* 攻略详情居中弹窗（替代原右侧抽屉，高度自适应不留大空白） */
.detail-modal-panel {
  width: 100%;
  max-width: 680px;
  max-height: 86vh;
  border-radius: 20px;
  background: var(--bg-modal);
  border: 1px solid var(--border-strong);
  box-shadow: 0 28px 64px -12px rgba(0, 0, 0, 0.58);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: popIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.drawer-head {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.drawer-title { margin: 8px 0 4px; font-size: 17px; font-weight: 800; color: var(--text-bright); line-height: 1.4; }
.drawer-orig { margin: 0; font-size: 12px; color: var(--text-muted); word-break: break-word; }
.drawer-body {
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.drawer-bullets-box {
  border-radius: 14px;
  background: var(--bg-subtle);
  border: 1px solid rgba(249, 115, 22, 0.30);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bullet-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.bullet-item { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--text-main); line-height: 1.6; }
.bullet-idx {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(249, 115, 22, 0.18);
  color: var(--text-accent);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.glossary-box {
  border-radius: 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.term-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.term-chip {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
}
.term-chip.active {
  background: var(--tier-rare-bg);
  color: var(--tier-rare-fg);
  border-color: var(--tier-rare-bd);
}
.term-desc {
  border-radius: 10px;
  background: var(--bg-modal);
  border: 1px solid var(--border-subtle);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.6;
}
.drawer-foot {
  padding: 15px 24px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-card-footer);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-box {
  width: 100%;
  max-width: 540px;
  border-radius: 18px;
  background: var(--bg-modal);
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  animation: popIn 0.2s ease-out forwards;
}
.modal-box.sm { max-width: 400px; }
.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.modal-title { margin: 0; font-size: 14px; font-weight: 800; color: var(--text-bright); }
.modal-sub { margin: 3px 0 0; font-size: 12px; color: var(--text-muted); }
.modal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.job-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}
.job-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}
.job-option:hover { border-color: var(--border-strong); }
.job-option.active { background: rgba(249, 115, 22, 0.14); border-color: rgba(249, 115, 22, 0.5); }
.pin-btn {
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 12px;
  flex-shrink: 0;
}
.pin-btn.pinned { background: var(--tier-unique-bg); color: var(--tier-unique-fg); border-color: var(--tier-unique-bd); }

.empty-box {
  padding: 44px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  padding: 10px 18px;
  border-radius: 12px;
  background: #131D36;
  border: 1px solid rgba(251, 146, 60, 0.45);
  color: #FFEDD5;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

/* ==================== R区实用三合一工具条 & 弹窗 ==================== */
.tool-strip-card {
  padding: 13px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.2s ease;
}
.tool-strip-card:hover {
  transform: translateY(-2px);
  border-color: rgba(249, 115, 22, 0.48);
  box-shadow: var(--card-hover-shadow);
}
.tool-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.tool-strip-title {
  font-weight: 800;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.tool-strip-badge {
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.tool-strip-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.tool-strip-cta {
  color: var(--text-cyan);
  font-weight: 700;
  flex-shrink: 0;
}

.tool-modal-lg { max-width: 720px; width: 100%; }
.tool-modal-xl { max-width: 820px; width: 100%; }
.tool-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tool-scroll-body {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 日常 / 周常打卡 */
.tracker-summary-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
}
.tracker-list { display: flex; flex-direction: column; gap: 8px; }
.tracker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.16s ease;
}
.tracker-item:hover { border-color: var(--border-strong); background: var(--bg-hover); }
.tracker-item.done {
  border-color: var(--tier-legendary-bd);
  background: var(--tier-legendary-bg);
}
.tracker-item-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.tracker-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-modal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.tracker-item.done .tracker-check {
  background: #10B981;
  border-color: #10B981;
  color: #FFFFFF;
}
.tracker-item-name { font-size: 13px; font-weight: 700; color: var(--text-bright); }
.tracker-item.done .tracker-item-name { text-decoration: line-through; opacity: 0.78; }
.tracker-item-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.tracker-tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-elevated);
  color: var(--text-dim);
  flex-shrink: 0;
}

.boss-counter-card {
  padding: 16px;
  border-radius: 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.boss-counter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.boss-stepper { display: inline-flex; align-items: center; gap: 8px; }
.stepper-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-bright);
  font-size: 16px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.stepper-btn:hover { border-color: rgba(249, 115, 22, 0.55); color: var(--text-accent); }
.stepper-val { min-width: 68px; text-align: center; font-size: 18px; font-weight: 900; color: var(--text-bright); }

/* R区黑话全词典 */
.glossary-dict-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.glossary-dict-card {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.glossary-dict-card:hover { border-color: var(--tier-epic-bd); }
.glossary-dict-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.glossary-dict-term { font-size: 13px; font-weight: 800; color: var(--text-bright); line-height: 1.35; }
.glossary-dict-cat {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--tier-epic-bg);
  color: var(--tier-epic-fg);
  border: 1px solid var(--tier-epic-bd);
  flex-shrink: 0;
}
.glossary-dict-desc { margin: 0; font-size: 12px; color: var(--text-main); line-height: 1.6; }

/* 砸星 & 周Boss 速算器 */
.calc-sf-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.calc-field { display: flex; flex-direction: column; gap: 5px; }
.calc-field label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.calc-field select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text-bright);
  font-size: 12px;
  outline: none;
}
.calc-sf-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.calc-chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}
.calc-chip-toggle:hover { border-color: var(--border-strong); }
.calc-chip-toggle input { accent-color: #F97316; }

.calc-result-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.calc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.calc-kpi-card {
  padding: 13px 14px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.calc-kpi-card.highlight {
  border-color: var(--tier-unique-bd);
  background: var(--tier-unique-bg);
}
.calc-kpi-label { font-size: 12px; color: var(--text-muted); }
.calc-kpi-val { font-size: 17px; font-weight: 900; color: var(--text-bright); }
.calc-kpi-sub { font-size: 11px; color: var(--text-dim); }
.calc-compare-bar {
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.boss-calc-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
}
.boss-calc-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.boss-calc-summary {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-main);
}
.boss-calc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.boss-calc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 11px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
}
.boss-calc-item:hover { border-color: var(--border-strong); }
.boss-calc-item.selected {
  border-color: var(--tier-legendary-bd);
  background: var(--tier-legendary-bg);
}
.boss-calc-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.boss-calc-name { font-size: 12px; font-weight: 700; color: var(--text-bright); }
.boss-calc-price { font-size: 12px; font-weight: 700; color: var(--tier-unique-fg); flex-shrink: 0; }
.boss-party-select {
  padding: 3px 6px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--bg-modal);
  color: var(--text-bright);
  font-size: 11px;
}

/* ==================== 响应式适配 ==================== */
/* GMS 维护北京时间提醒横幅 */
.maint-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--card-radius);
  border: 1px solid var(--tier-unique-bd);
  background: var(--tier-unique-bg);
  box-shadow: var(--panel-shadow);
}
.maint-banner.ongoing {
  border-color: rgba(244, 63, 94, 0.45);
  background: rgba(244, 63, 94, 0.12);
}
.maint-banner.done {
  border-color: var(--tier-legendary-bd);
  background: var(--tier-legendary-bg);
}
.maint-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  cursor: pointer;
}
.maint-pill {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: var(--tier-unique-fg);
  background: var(--bg-modal);
  border: 1px solid var(--tier-unique-bd);
}
.maint-pill.ongoing { color: #F43F5E; border-color: rgba(244, 63, 94, 0.45); }
.maint-pill.done { color: var(--tier-legendary-fg); border-color: var(--tier-legendary-bd); }
.maint-texts { min-width: 0; }
.maint-title { font-size: 13px; font-weight: 800; color: var(--text-bright); line-height: 1.35; }
.maint-time { font-size: 12px; color: var(--text-main); margin-top: 2px; }
.maint-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* 置顶徽章与置顶卡片微亮边 */
.pin-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-accent);
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(249, 115, 22, 0.42);
}
.maple-card.is-pinned {
  border-color: rgba(249, 115, 22, 0.42);
}

/* 多角色打卡切换条 */
.tracker-char-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
}
.tracker-char-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.tracker-char-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bg-modal);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tracker-char-pill.active {
  background: rgba(249, 115, 22, 0.16);
  border-color: rgba(249, 115, 22, 0.5);
  color: var(--text-accent);
}
.tracker-account-total { font-size: 12px; color: var(--text-main); }

/* 六转 HEXA & 方块计算器输入与清单 */
.calc-num-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  color: var(--text-bright);
  font-size: 12px;
  outline: none;
}
.calc-num-input:focus, .calc-inline-num:focus, .fb-textarea:focus { border-color: var(--accent-orange); }
.calc-inline-num {
  width: 56px;
  padding: 3px 6px;
  border-radius: 7px;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  color: var(--text-bright);
  font-size: 12px;
  text-align: center;
  outline: none;
}
.hexa-plan-box {
  padding: 12px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hexa-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-bright);
}
.hexa-plan-list { display: flex; flex-wrap: wrap; gap: 6px; }
.hexa-plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--bg-modal);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-main);
}
.hexa-del-x {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 11px;
  padding: 0 2px;
  line-height: 1;
}
.hexa-del-x:hover { color: #F43F5E; }

/* Link / 联盟速查卡片细节 */
.link-meta-line { font-size: 12px; color: var(--text-main); line-height: 1.5; margin-top: 3px; }

/* 反馈表单 & 后台文章/反馈管理 */
.fb-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  color: var(--text-bright);
  font-size: 12px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}
.admin-art-ops {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.admin-row-dim { opacity: 0.62; }
.fb-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
}
.fb-item-card {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fb-item-card.unread {
  border-color: rgba(249, 115, 22, 0.42);
}
.fb-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.fb-item-content {
  font-size: 13px;
  color: var(--text-bright);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ==================== 详情弹窗：站内视频播放 & 原帖阅读模式 ==================== */
.detail-modal-panel { max-width: 780px; }
.drawer-video-box,
.drawer-reader-box {
  border-radius: 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.drawer-media-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}
.drawer-media-hint {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
}
.video-embed-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #000000;
  border: 1px solid var(--border-subtle);
}
.video-embed-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.reader-trigger-bar,
.reader-loading-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.reader-body {
  max-height: 400px;
  overflow-y: auto;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-modal);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reader-h {
  margin: 6px 0 2px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-bright);
  padding-left: 8px;
  border-left: 3px solid var(--accent-orange);
}
.reader-p {
  margin: 0;
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.72;
  word-break: break-word;
}
.reader-li {
  font-size: 12.5px;
  color: var(--text-main);
  line-height: 1.65;
  padding-left: 6px;
  word-break: break-word;
}
.reader-quote {
  margin: 2px 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bg-subtle);
  border-left: 3px solid var(--text-cyan);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}
.reader-img-placeholder {
  padding: 6px 0;
}
.reader-img-wrap {
  margin: 4px 0;
  text-align: center;
}
.reader-img {
  max-width: 100%;
  max-height: 460px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  object-fit: contain;
  background: var(--bg-subtle);
}
.reader-img-err {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--bg-subtle);
  color: var(--text-dim);
  font-size: 11px;
}

/* ==================== 全职业 1~6转技能图鉴（入口 + 职业卡片弹窗 + 技能百科页） ==================== */
.feed-view-sections {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.skills-entry-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.14), rgba(168, 85, 247, 0.14));
  border: 1px solid rgba(249, 115, 22, 0.36);
  color: var(--text-bright);
  transition: all 0.18s ease;
}
.skills-entry-btn:hover,
.skills-entry-btn.active {
  border-color: var(--accent-orange);
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(168, 85, 247, 0.22));
  transform: translateY(-1px);
}
.skills-entry-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.skills-entry-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(249, 115, 22, 0.18);
  font-size: 15px;
  flex-shrink: 0;
}
.skills-entry-title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.25;
}
.skills-entry-sub {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.skills-entry-arrow {
  font-weight: 800;
  color: var(--text-accent);
  flex-shrink: 0;
}

/* 职业图文选择大弹窗 */
.skill-picker-modal {
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.skill-common-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(34, 211, 238, 0.12));
  border: 1px solid var(--tier-epic-bd);
  cursor: pointer;
  transition: all 0.16s ease;
}
.skill-common-card:hover {
  transform: translateY(-1px);
  border-color: var(--tier-epic-fg);
}
.skill-common-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.skill-common-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--bg-modal);
  border: 1px solid var(--tier-epic-bd);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 20px;
}
.skill-common-icon-wrap img { width: 34px; height: 34px; object-fit: contain; image-rendering: auto; }
.skill-common-title { font-size: 13px; font-weight: 800; color: var(--text-bright); }
.skill-common-sub { margin: 3px 0 0; font-size: 11px; color: var(--text-muted); line-height: 1.45; }
.skill-common-cta { font-size: 12px; font-weight: 800; color: var(--tier-epic-fg); white-space: nowrap; flex-shrink: 0; }
.skill-cached-pill {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: var(--tier-legendary-fg);
  background: var(--tier-legendary-bg);
  border: 1px solid var(--tier-legendary-bd);
}
.skill-cached-pill.muted {
  color: var(--text-muted);
  background: var(--bg-elevated);
  border-color: var(--border-subtle);
}

.skill-job-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 4px;
}
.skill-job-card {
  display: flex;
  flex-direction: column;
  padding: 8px;
  border-radius: 13px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  text-align: left;
  transition: all 0.16s ease;
}
.skill-job-card:hover,
.skill-job-card.active {
  border-color: var(--accent-orange);
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: var(--card-hover-shadow);
}
.skill-job-avatar-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 152 / 74;
  border-radius: 9px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(34, 211, 238, 0.14));
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}
.skill-job-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.skill-job-avatar-fallback {
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: var(--text-accent);
}
.skill-card-cached {
  position: absolute;
  top: 5px;
  right: 5px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.78);
  color: #4ADE80;
  backdrop-filter: blur(4px);
}
.skill-job-card-info {
  padding: 7px 3px 2px;
  min-width: 0;
}
.skill-job-card-name { font-size: 13px; font-weight: 800; color: var(--text-bright); }
.skill-job-card-en { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.skill-job-card-group { font-size: 10px; color: var(--text-dim); margin-top: 2px; }

/* 职业技能百科详情主视图 */
.skills-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.skills-loading-card {
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
}
.skills-hero-card {
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.skills-hero-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.skills-hero-avatar {
  width: 118px;
  height: 58px;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.skills-hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.skills-hero-title { margin: 0; font-size: 18px; font-weight: 900; color: var(--text-bright); }
.skills-hero-en { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.skills-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}
.skills-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.skills-filter-bar {
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.skills-tier-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.skills-filter-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.skills-tier-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.skills-tier-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 900;
  color: var(--text-bright);
  padding: 2px 4px;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.skill-item-card {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.skill-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.skill-icon-frame {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.skill-icon-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  image-rendering: pixelated;
}
.skill-icon-fallback {
  font-size: 18px;
  color: var(--text-accent);
  align-items: center;
  justify-content: center;
}
.skill-card-head-main { flex: 1; min-width: 0; }
.skill-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.skill-zh-name {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.3;
}
.skill-type-pill {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}
.skill-type-pill.active {
  color: var(--text-accent);
  background: rgba(249, 115, 22, 0.14);
  border: 1px solid rgba(249, 115, 22, 0.34);
}
.skill-type-pill.passive {
  color: var(--text-cyan);
  background: var(--tier-rare-bg);
  border: 1px solid var(--tier-rare-bd);
}
.skill-en-row {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 3px;
  word-break: break-word;
}
.skill-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}
.skill-zh-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.65;
  word-break: break-word;
}
.skill-zh-max-box {
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-orange);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.skill-zh-max-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-accent);
}
.skill-zh-max-text {
  font-size: 12.5px;
  color: var(--text-bright);
  line-height: 1.65;
  word-break: break-word;
}
.skill-en-details {
  font-size: 11px;
  color: var(--text-dim);
}
.skill-en-details summary {
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  color: var(--text-muted);
}
.skill-en-details summary:hover { color: var(--text-accent); }
.skill-en-box {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.55;
  word-break: break-word;
}

@media (max-width: 1120px) {
  .bento-top { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .sync-nodes-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-two-col { grid-template-columns: 1fr; }
  .sources-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hexa-grid-bg { background-attachment: scroll; }
  .app-shell { flex-direction: column; }

  /* 移动端吸顶精简顶栏 + 横向频道快捷条 */
  .mobile-header-wrap {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    z-index: 35;
    background: var(--bg-sidebar);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-sidebar);
    padding-top: env(safe-area-inset-top, 0px);
  }
  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
  }
  .mobile-topbar-left,
  .mobile-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  .mobile-menu-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background: var(--bg-elevated);
    color: var(--text-bright);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .mobile-brand-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    padding: 2px 4px;
    min-width: 0;
  }
  .mobile-brand-leaf { font-size: 17px; line-height: 1; }
  .mobile-brand-text {
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: var(--text-bright);
    white-space: nowrap;
  }
  .mobile-skills-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid rgba(249, 115, 22, 0.45);
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.18), rgba(251, 191, 36, 0.18));
    color: var(--text-accent);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
  }
  .mobile-channel-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 12px 9px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .mobile-ch-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s ease;
  }
  .mobile-ch-pill.active {
    background: rgba(249, 115, 22, 0.18);
    border-color: rgba(249, 115, 22, 0.5);
    color: var(--text-accent);
  }
  .mobile-ch-cnt {
    font-size: 11px;
    opacity: 0.78;
  }

  /* 原左侧栏在移动端变为滑出抽屉，打开首屏直达攻略 */
  .mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 46;
    background: rgba(2, 6, 23, 0.58);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }
  .mobile-nav-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(85vw, 310px);
    max-width: 100vw;
    z-index: 48;
    border-right: 1px solid var(--border-strong);
    border-bottom: none;
    background: var(--bg-modal);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(28px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-105%);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 16px 0 40px rgba(0, 0, 0, 0.36);
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .mobile-drawer-close { display: inline-flex; }

  .main-content {
    padding: 12px 12px calc(24px + env(safe-area-inset-bottom, 0px));
    gap: 14px;
  }
  .top-hud {
    padding: 10px 12px;
    gap: 10px;
    z-index: auto;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--bg-card);
  }
  .search-wrap { min-width: 0; max-width: none; width: 100%; flex: 1 1 100%; }
  .kbd-hint { display: none; }
  .hud-right { width: 100%; justify-content: space-between; gap: 8px; }
  .theme-trigger-btn { display: none; }
  .theme-popover {
    position: fixed;
    top: calc(60px + env(safe-area-inset-top, 0px));
    left: 12px;
    right: 12px;
    width: auto;
    max-width: 360px;
    margin: 0 auto;
    z-index: 55;
  }

  .briefing-cards { grid-template-columns: 1fr; }
  .events-strip { grid-template-columns: 1fr; }
  .news-grid, .skills-grid { grid-template-columns: 1fr; }
  .skill-job-cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .skills-tier-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 2px;
  }
  .skills-tier-tabs .filter-pill { flex-shrink: 0; white-space: nowrap; }
  .skills-filter-right { width: 100%; }
  .skills-filter-right .search-input { flex: 1 1 160px; min-width: 0; }

  .admin-shell {
    padding: 14px 12px calc(40px + env(safe-area-inset-bottom, 0px));
    gap: 14px;
  }
}

@media (max-width: 768px) {
  /* 防止 iOS Safari 聚焦小于 16px 输入框时自动放大页面 */
  input[type="text"],
  input[type="password"],
  input[type="search"],
  input[type="number"],
  input[type="time"],
  select,
  textarea {
    font-size: 16px !important;
  }
  .calc-inline-num { width: 68px; }
  .search-input { padding-top: 8px; padding-bottom: 8px; }
  .toolbar-select { padding: 5px 8px; max-width: 100%; }
}

@media (max-width: 720px) {
  .calc-sf-controls, .calc-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .glossary-dict-grid, .boss-calc-grid { grid-template-columns: 1fr; }
  .skill-job-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .stats-grid, .sync-nodes-grid, .sources-grid, .form-grid-2, .form-grid-3, .job-modal-grid {
    grid-template-columns: 1fr;
  }
  .timer-sep, .timer-weekly { display: none; }
  .visitors-search { width: 100%; }

  /* 弹窗贴边铺开 + 动态视口高度，手机阅读更宽敞 */
  .backdrop { padding: 10px; }
  .detail-modal-panel,
  .modal-box,
  .skill-picker-modal,
  .tool-modal-lg,
  .tool-modal-xl {
    max-height: 92dvh;
    border-radius: 16px;
  }
  .drawer-head, .modal-head { padding: 14px 14px 12px; gap: 10px; }
  .drawer-body, .modal-body { padding: 14px; gap: 12px; }
  .drawer-foot { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
  .drawer-title { font-size: 15.5px; }

  /* 卡片与横幅紧凑排版 */
  .briefing-inner, .starforce-panel, .card-body { padding: 14px; }
  .card-footer { padding: 10px 14px; flex-wrap: wrap; }
  .maint-banner { flex-direction: column; align-items: flex-start; padding: 12px 14px; }
  .maint-actions { width: 100%; justify-content: flex-end; }
  .toolbar-row { gap: 8px; }
  .toolbar-right { width: 100%; justify-content: space-between; }

  /* 紧凑列表卡在小屏纵向排布，提升摘要可读性 */
  .maple-card-row .row-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 14px;
    gap: 8px;
  }
  .maple-card-row .row-summary {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .maple-card-row .row-right { width: 100%; justify-content: space-between; }

  /* 职业选择弹窗与技能详情页小屏专项适配 */
  .faction-tabs-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .faction-tabs-row > button { flex-shrink: 0; white-space: nowrap; }
  .skill-common-card { flex-direction: column; align-items: flex-start; padding: 10px 12px; gap: 8px; }
  .skill-job-cards-grid { max-height: 54dvh; gap: 8px; }
  .skills-hero-card { padding: 14px; gap: 10px; }
  .skills-hero-avatar { width: 88px; height: 44px; }
  .skills-hero-title { font-size: 16px; }
  .skills-hero-actions { width: 100%; }
  .skills-hero-actions > a,
  .skills-hero-actions > button { flex: 1 1 auto; justify-content: center; }

  /* 管理后台手机端按钮与表格紧凑适配 */
  .admin-header, .admin-card { padding: 14px; }
  .admin-actions { width: 100%; }
  .admin-actions > button { flex: 1 1 calc(50% - 6px); justify-content: center; }
  .visitors-table-wrap { -webkit-overflow-scrolling: touch; }

  .toast {
    max-width: calc(100vw - 24px);
    text-align: center;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  .site-footer { padding: 14px 2px 24px; font-size: 11.5px; }
}
