/* ============================================================
   Voyager · kardsAI — 全局样式(黑洞深空背景 / 橙色按钮 / 深色玻璃面板)
   ============================================================ */
:root {
  /* 颜色取自你提供的黑洞图:中心暖白 #FCF9F6 / 外圈暖琥珀 #975C38 / 深空 #090807 */
  --brand: #efe7dc;        /* 按钮底色 = 黑洞中心暖白 */
  --brand-2: #dcd0c1;
  --brand-3: #c9855a;      /* 外圈暖琥珀(点缀) */
  --brand-soft: rgba(239, 231, 220, 0.08);
  --brand-line: rgba(239, 231, 220, 0.22);
  --ring: #c9855a;
  --ring-soft: rgba(201, 133, 90, 0.16);
  --ink: #e9e4dc;
  --ink-2: #a89e94;
  --ink-3: #6f6760;
  --line: #2a2521;
  --bg: #050404;
  --card: rgba(17, 14, 12, 0.82);
  --card-2: #17130f;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 22px 60px rgba(0, 0, 0, 0.66);
  --elite: #e0c07a;
  --special: #b3b7bd;
  --limited: #c08a5c;
  --standard: #86807a;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

/* 黑洞底图:位移/呼吸都交给 JS 写 transform(电脑跟鼠标、手机跟陀螺仪) */
#netbg-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: #050404 url('/blackhole.jpg') center / cover no-repeat;
  transform: scale(1.06);
  will-change: transform; transform-origin: center center;
}
@keyframes bhBreath { from { transform: scale(1); } to { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { #netbg-bg { transform: none; } }

.hidden { display: none !important; }
.flex1 { flex: 1; }
.row { display: flex; align-items: center; }
.gap8 { gap: 8px; }

/* ---- 按钮:橙色主题 ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 10px; padding: 8px 16px;
  font-size: 14px; font-weight: 700; line-height: 1.4; white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease, border-color .15s ease, color .15s ease;
  user-select: none;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: linear-gradient(135deg, #f7f1e8, #d9cbb9);
  color: #17120e; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.btn-primary:hover { filter: brightness(1.04); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55); }
.btn.ghost { background: rgba(255, 255, 255, .03); color: var(--ink); border-color: var(--brand-line); }
.btn.ghost:hover { background: var(--brand-soft); border-color: rgba(239, 231, 220, .4); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.wide { width: 100%; padding: 11px 16px; font-size: 15px; }
.sponsor-top { padding: 7px 14px; }

.field {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 14px; color: var(--ink); background: rgba(8, 10, 16, .75); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field::placeholder { color: var(--ink-3); }
.field:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(239, 231, 220, .14); }
.field-label { display: block; font-size: 12.5px; color: var(--ink-2); margin: 12px 0 6px; font-weight: 600; }

/* ---- 顶栏 ---- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 7, 12, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
/* 站主:标志"加粗 + 圆润"之后尺寸必须写死 ——
   之前 .brand-mark 没有 CSS 尺寸、SVG 又被写成 width="100%",顶栏被撑得异常放大。
   现在两道保险:SVG 内联 28×28 + 这里的固定尺寸与 flex:none。 */
.brand-mark { width: 28px; height: 28px; flex: none; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .5)); }
.brand-name { font-size: 21px; font-weight: 800; letter-spacing: .5px; }
.brand-sub {
  font-size: 11px; font-weight: 800; color: #17120e;
  background: linear-gradient(135deg, #f3ece2, #cfbfae);
  padding: 2px 8px; border-radius: 999px; letter-spacing: .8px;
}
/* 站主:所有"区域按钮"(卡牌浏览 / DIY / 发布卡组 …)去掉外框,只留名字,并统一放到最顶部。
   所以这里把原来的"药丸容器 + 描边"整个去掉,只保留文字与间距;当前项用亮字 + 一条底线表示。 */
.tabs { display: flex; gap: 2px; background: none; padding: 0; border-radius: 0; border: none;
  align-items: center; flex-wrap: wrap; }
.tab { border: none; background: transparent; color: var(--ink-3); font-weight: 700; font-size: 14px;
  padding: 7px 12px; border-radius: 0; position: relative; transition: color .16s ease; letter-spacing: .02em; }
.tab:hover { color: var(--brand-3); }
.tab.active { background: none; color: #f7f1e8; box-shadow: none; }
.tab.active::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--brand-3), var(--brand)); border-radius: 2px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.mode-switch { display: flex; gap: 2px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); padding: 3px; border-radius: 999px; }
.mode-btn { border: none; background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 999px; transition: all .15s ease; }
.mode-btn:hover { color: var(--brand-3); }
.mode-btn.active { background: linear-gradient(135deg, #f7f1e8, #d9cbb9); color: #17120e; box-shadow: 0 3px 12px rgba(0, 0, 0, .4); }
.userbox { display: flex; align-items: center; gap: 8px; }
.user-email { font-size: 13px; color: var(--ink-2); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; }
.pulse { animation: pulseGlow 2.2s infinite; }
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 231, 220, .28); }
  50% { box-shadow: 0 0 0 9px rgba(239, 231, 220, 0); }
}

/* ---- 视图 ---- */
/* 站主:AI 功能设为全屏 —— 对话页不再套在 1280px 的内容栏里,而是铺满整个视口宽度 */
.views { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 18px 20px 90px; }
.views:has(#view-chat.active) { max-width: none; margin: 0; padding: 0 0 0; }
@media (max-width: 720px) { .views:has(#view-chat.active) { padding: 0; } }
.view { display: none; }
.view.active { display: block; }

/* ---- AI 对话页 ----
   站主:"将 AI 功能设为全屏,以增加更好的用户体验,聊天框始终保持在屏幕最下方。"
   所以这里把原来的"卡片式窄栏(940px / 高 100vh-200px)"改成占满可视区的全屏布局:
   头部固定、聊天区自己滚动、输入框永远贴在屏幕底部(dvh 处理手机地址栏伸缩)。 */
.chat-wrap {
  width: 100%; max-width: none; margin: 0; background: var(--card);
  border: none; border-radius: 0; box-shadow: none; overflow: hidden;
  display: flex; flex-direction: column;
  height: calc(100dvh - var(--sticky-top, 62px)); min-height: 420px;
  backdrop-filter: blur(10px);
}
.chat-wrap .chat-body { min-height: 0; }
.chat-wrap .composer { position: sticky; bottom: 0; z-index: 5; }

/* 对话区 + 右侧「本节提到」窄栏:窄栏只在宽屏(>=1100px)出现,窄屏自动隐藏 */
.chat-stage { display: flex; flex: 1; min-height: 0; }
.chat-side {
  flex: 0 0 132px; width: 132px; min-width: 0;
  border-left: 1px solid var(--line); background: rgba(255, 255, 255, .015);
  padding: 12px 8px 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
}
.chat-side-title { text-align: center; font-size: 11px; letter-spacing: .12em; color: var(--ink-3); user-select: none; }
.chat-side-list { display: flex; flex-direction: column; gap: 8px; }
.chat-side-empty { font-size: 11px; line-height: 1.7; color: var(--ink-3); text-align: center; padding: 10px 2px; }
.chat-side-card {
  display: block; width: 100%; padding: 3px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
  color: var(--ink-2); text-align: center; transition: border-color .15s, transform .15s;
}
.chat-side-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.chat-side-card img { display: block; width: 100%; height: auto; border-radius: 5px; background: rgba(0, 0, 0, .25); }
.chat-side-card span { display: block; margin-top: 3px; font-size: 10.5px; line-height: 1.35; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1099.98px) { .chat-side { display: none; } }

/* 顶部「上次解析:xxx,点击恢复」小条(登录后有拆卡记录才显示) */
.chat-deckbar {
  display: flex; align-items: center; gap: 10px; padding: 7px 16px; cursor: pointer;
  border-bottom: 1px solid var(--brand-line); background: var(--brand-soft);
  font-size: 12.5px; color: var(--ink-2); user-select: none;
}
.chat-deckbar:hover { color: var(--ink); }
.chat-deckbar.hidden { display: none; }
.chat-deckbar-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-deckbar-go { flex: none; color: var(--brand-3); font-weight: 700; }
/* AI 用量面板 / 思考模式开关 / 开场白 */
.ai-usage { margin: 12px 0 8px; padding: 16px 18px; border: 1px solid var(--brand-line);
  border-radius: 10px; background: rgba(201, 133, 90, .07); }
.ai-usage-head { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink); }
.ai-usage-head span { color: var(--ink-3); font-size: 13px; }
.ai-usage-bar { margin: 14px 0; height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.ai-usage-bar i { display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--brand-3), var(--brand)); transition: width .3s ease; }
.ai-usage-table { display: flex; flex-direction: column; gap: 8px; }
.ai-usage-row { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; color: var(--ink-2);
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .02); }
.ai-usage-row em { font-style: normal; color: var(--ink-3); font-size: 11px; margin-left: 6px; }
.ai-usage-note { margin-top: 8px; font-size: 11px; color: var(--ink-3); line-height: 1.7; }
.think-toggle { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; cursor: pointer; white-space: nowrap; }
.think-toggle input { margin: 0; }
.think-toggle:has(input:checked) { border-color: var(--brand); color: var(--brand-3); }
.chat-hello { display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 20px 10px; gap: 6px; }
.chat-hello.hidden { display: none; }
.chat-hello-avatar { width: 88px; height: 88px; border-radius: 26px; color: #f7f1e8; padding: 20px;
  background: radial-gradient(circle at 50% 46%, #2a1d13, #070505 72%);
  border: 1px solid var(--brand-line); box-shadow: 0 0 34px rgba(201, 133, 90, .22); }
.chat-hello-name { margin-top: 12px; font-size: 20px; font-weight: 800; letter-spacing: .06em; color: #f3ece2; }
.chat-hello-ask { font-size: 14px; color: var(--ink-2); letter-spacing: .04em; }
.chat-hello-tips { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 560px; }
.chat-hello-tip { font-size: 12.5px; color: var(--ink-2); background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; cursor: pointer; }
.chat-hello-tip:hover { border-color: var(--brand); color: var(--brand-3); }

/* ---- 站内自主弹窗(替代原生 prompt/confirm/alert) ---- */
.ui-dialog { width: min(460px, 92vw); }
.ui-dialog-title { font-size: 16px; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.ui-dialog-body p { margin: 0; font-size: 13.5px; line-height: 1.85; color: var(--ink-2); white-space: pre-wrap; }
.ui-dialog-input { width: 100%; margin-top: 12px; }
.ui-dialog-choices { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.ui-dialog-choice { text-align: left; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03); color: var(--ink-2); font-size: 13.5px; cursor: pointer; }
.ui-dialog-choice:hover { border-color: var(--brand); color: var(--brand-3); }
.ui-dialog-acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* ---- AI 对话页 ---- */
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.ai-avatar {
  width: 44px; height: 44px; flex: none; border-radius: 13px;
  background: radial-gradient(circle at 50% 46%, #2a1d13, #070505 72%);
  padding: 4px; box-shadow: 0 6px 16px rgba(0, 0, 0, .5), 0 0 0 1px rgba(201, 133, 90, .22) inset;
}
.chat-ai-name { font-weight: 800; font-size: 16.5px; letter-spacing: .3px; }
.chat-ai-name em { font-style: normal; font-size: 11px; color: var(--ink-2); background: var(--brand-soft); border: 1px solid var(--brand-line); padding: 1px 7px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; }
.chat-ai-sub { font-size: 12px; color: var(--ink-3); }
.chat-stat { margin-left: auto; font-size: 12.5px; color: var(--ink-2); }

/* 思考过程区块 */
.think { margin: 2px 0 8px; border: 1px dashed var(--brand-line); border-radius: 10px; background: rgba(255, 255, 255, .02); font-size: 12.5px; color: var(--ink-3); overflow: hidden; max-width: 560px; }
.think > summary { cursor: pointer; padding: 6px 12px; color: var(--ink-2); font-weight: 700; font-size: 12px; background: rgba(255, 255, 255, .03); user-select: none; }
.think-body { padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; }
.think-line { line-height: 1.6; }

.chat-body { flex: 1; overflow-y: auto; padding: 18px 18px 8px; scroll-behavior: smooth; }
.banner-banned { background: rgba(220, 60, 40, .12); border: 1px solid rgba(220, 80, 60, .45); color: #ffb3a6; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; }
.chat-log { display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; gap: 10px; max-width: 88%; animation: msgIn .25s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg.assistant { align-self: flex-start; }
.msg .avatar { width: 34px; height: 34px; flex: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 800; color: #fff; }
.msg.user .avatar { background: linear-gradient(135deg, #cfbfae, #a08d78); font-size: 13px; }
.msg.assistant .avatar { background: linear-gradient(135deg, #efe7dc, #b9a894); color: #17120e; font-size: 15px; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
.msg .bubble { background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 10px 14px; font-size: 14.5px; word-break: break-word; white-space: pre-wrap; color: var(--ink); }
.msg.user .bubble { background: linear-gradient(135deg, #efe7dc, #cfbfae); color: #17120e; border: none; border-radius: 14px 4px 14px 14px; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.msg .who { font-size: 11px; color: var(--ink-3); margin-bottom: 3px; padding-left: 2px; }
.msg.user .who { text-align: right; padding-right: 2px; }
.bubble .curs { display: inline-block; width: 7px; height: 15px; background: var(--ring); vertical-align: -2px; margin-left: 2px; animation: blink .9s infinite; }
@keyframes blink { 50% { opacity: 0; } }
.bubble.card-snippet { border: 1px dashed var(--brand-line); background: var(--brand-soft); }
.msg-system { align-self: center; font-size: 12.5px; color: var(--ink-3); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); padding: 5px 14px; border-radius: 999px; }
.msg-refusal { align-self: center; max-width: 84%; background: rgba(255, 160, 40, .1); border: 1px solid rgba(255, 160, 40, .4); color: #ffcf99; font-size: 13.5px; padding: 8px 16px; border-radius: 12px; text-align: center; }

.typing { display: flex; gap: 5px; padding: 6px 2px; align-items: center; }
.typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-2); animation: bounce 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-6px); opacity: 1; } }

.composer { border-top: 1px solid var(--line); padding: 10px 16px 12px; background: rgba(255, 255, 255, .015); }
.quick-actions { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.quick-actions .btn { padding: 6px 13px; font-size: 13px; }
.quick-hint { font-size: 11.5px; color: var(--ink-3); }
.guess-panel { margin-bottom: 8px; }
.guess-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 12px; padding: 8px 12px; }
.guess-hint { font-size: 13px; color: var(--ink-2); flex: 1; min-width: 180px; }
.try-dots { display: flex; gap: 5px; }
.try-dots i { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--brand-line); background: transparent; }
.try-dots i.used { background: var(--brand); }
.try-dots i.used.win { background: #35c46a; border-color: #35c46a; }
.composer-row { display: flex; align-items: flex-end; gap: 10px; background: rgba(8, 10, 16, .8); border: 1.5px solid var(--line); border-radius: 16px; padding: 8px 10px; transition: border-color .15s, box-shadow .15s; }
.composer-row:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(239, 231, 220, .14); }
#chatInput { flex: 1; border: none; outline: none; resize: none; font-size: 14.5px; line-height: 1.5; max-height: 130px; min-height: 26px; padding: 4px 2px; color: var(--ink); background: transparent; }
#chatInput::placeholder { color: var(--ink-3); }
.upload-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border-radius: 12px; color: var(--ink-3); cursor: pointer; transition: all .15s ease; }
.upload-btn:hover { color: var(--brand-3); background: var(--brand-soft); }
.upload-btn.busy { opacity: .5; pointer-events: none; }
.send-btn { height: 40px; border-radius: 12px; padding: 0 16px; flex: none; }
.composer-note { text-align: center; font-size: 11.5px; color: var(--ink-3); margin-top: 7px; }

/* ---- 浏览页 ---- */
/* ---- 浏览页(顶部工具栏吸顶,下滑时不消失) ---- */
.browse-head {
  position: sticky; top: calc(var(--topbar-h, 60px) + 2px); z-index: 40;
  margin: 0 -6px 14px; padding: 10px 6px 12px;
  background: rgba(8, 6, 5, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.browse-head h1 { font-size: 21px; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.count-total { font-size: 12.5px; color: var(--ink-3); font-weight: 500; background: rgba(255, 255, 255, .05); border-radius: 999px; padding: 2px 12px; border: 1px solid var(--line); }
.browse-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.searchbox { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 8px; background: rgba(8, 10, 16, .8); border: 1.5px solid var(--line); border-radius: 12px; padding: 9px 14px; color: var(--ink-3); }
.searchbox:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(239, 231, 220, .12); }
.searchbox input { border: none; outline: none; flex: 1; font-size: 14px; background: transparent; color: var(--ink); }
.filter-count { background: var(--brand); color: #17120e; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 0 7px; }
.result-note { font-size: 12.5px; color: var(--ink-3); margin-left: auto; }

.drawer-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 80; opacity: 0; transition: opacity .2s; pointer-events: none; }
.drawer-mask.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 320px; max-width: 90vw; background: #0c0e16; z-index: 81; transform: translateX(102%); transition: transform .24s ease; box-shadow: -16px 0 50px rgba(0, 0, 0, .7); display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 10px; font-weight: 800; font-size: 17px; border-bottom: 1px solid var(--line); }
.drawer-body { padding: 8px 20px 20px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.filter-group { margin: 14px 0; }
.filter-group label { font-size: 12.5px; font-weight: 700; color: var(--ink-2); display: block; margin-bottom: 6px; }
.filter-group select { width: 100%; }
select.field option { background: #0c0e16; color: var(--ink); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; padding: 4px 2px; }
.card-tile { position: relative; border-radius: 12px; overflow: hidden; cursor: pointer; border: 2px solid var(--line); background: #0e1018; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; animation: msgIn .3s ease; }
.card-tile:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, .6); border-color: var(--brand-line); }
.card-tile .art { width: 100%; aspect-ratio: 5/7; object-fit: cover; display: block; background: #141824; }
.card-tile .cost-hidden { position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; border-radius: 50%; background: rgba(10, 12, 18, .92); color: var(--brand-3); font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); border: 1px solid var(--brand-line); }
.card-tile .meta { padding: 7px 9px 9px; background: #12141e; }
.card-tile .tname { font-size: 12.8px; font-weight: 700; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.card-tile .tsub { font-size: 11px; color: var(--ink-3); margin-top: 2px; display: flex; justify-content: space-between; gap: 4px; }
.card-tile .tstat { font-size: 11.5px; color: var(--brand-3); font-weight: 700; }
.rar-elite { border-color: var(--elite); }
.rar-special { border-color: var(--special); }
.rar-limited { border-color: var(--limited); }
.rar-standard { border-color: #3a4050; }
.grid-end { text-align: center; color: var(--ink-3); font-size: 13px; padding: 22px 0; }
.empty { text-align: center; color: var(--ink-3); padding: 60px 0; font-size: 14px; }

/* ---- 解析页 ---- */
.deck-head h1 { font-size: 21px; margin: 6px 0 4px; }
.deck-head .sub { display: block; font-size: 13px; color: var(--ink-3); font-weight: 500; margin: 6px 0 14px; }
.deck-input-row { display: flex; gap: 10px; max-width: 860px; }
#deckCode { flex: 1; }
.deck-err { color: #ffbfa8; background: rgba(220, 70, 40, .12); border: 1px solid rgba(220, 90, 60, .4); border-radius: 10px; padding: 8px 14px; margin-top: 12px; font-size: 13.5px; max-width: 860px; }
.deck-loading { display: flex; align-items: center; gap: 10px; color: var(--ink-2); margin-top: 14px; font-size: 14px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(239, 231, 220, .22); border-top-color: var(--brand); animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.deck-result { margin-top: 18px; }
.deck-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.deck-info { flex: 1; font-size: 13.5px; color: var(--ink-2); }
.deck-info b { color: var(--ink); }
.deck-btns { display: flex; gap: 10px; }
.deck-preview { background: #0e1018; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 14px; display: inline-block; max-width: 100%; overflow-x: auto; }
.deck-preview img { display: block; max-height: 78vh; max-width: 100%; border-radius: 8px; }
.deck-tip { margin-top: 14px; font-size: 12.5px; color: var(--ink-3); background: rgba(255, 255, 255, .03); border: 1px dashed var(--brand-line); border-radius: 10px; padding: 10px 14px; max-width: 900px; }

/* ---- 弹窗 ---- */
.modal-mask { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .66); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; transition: opacity .18s ease; pointer-events: none; backdrop-filter: blur(3px); }
.modal-mask.open { opacity: 1; pointer-events: auto; }
.modal { background: #0d0f18; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); width: 460px; max-width: 100%; max-height: 90vh; overflow-y: auto; padding: 26px 26px 24px; position: relative; transform: translateY(10px) scale(.98); transition: transform .18s ease; }
.modal-mask.open .modal { transform: none; }
.modal.small { width: 400px; }
.modal.center { text-align: center; }
.modal-x { position: absolute; top: 12px; right: 12px; border: none; background: rgba(255, 255, 255, .06); color: var(--ink-2); width: 30px; height: 30px; border-radius: 9px; font-size: 13px; transition: all .12s; }
.modal-x:hover { background: var(--brand); color: #17120e; }
.modal-title { font-size: 19px; font-weight: 800; margin-bottom: 4px; }
.modal-sub { color: var(--ink-2); font-size: 13.5px; margin: 10px 0; line-height: 1.75; }
.modal-btns { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.tabs-mini { display: flex; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 11px; padding: 4px; margin: 14px 0 6px; gap: 4px; }
.mini-tab { flex: 1; border: none; background: transparent; padding: 8px 6px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); transition: all .13s; }
.mini-tab.active { background: linear-gradient(135deg, #f7f1e8, #d9cbb9); color: #17120e; }
.auth-pane { padding: 6px 0; }
.auth-msg { font-size: 12.5px; min-height: 20px; margin: 6px 0; color: #ff9c86; }
.auth-msg.ok { color: #6fdc9b; }
.auth-extra { font-size: 11.5px; color: var(--ink-3); margin-top: 12px; line-height: 1.7; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.quota-title { font-size: 19px; margin: 6px 0 4px; }

/* ---- 赞助弹窗 ---- */
.sponsor-body { display: flex; gap: 22px; align-items: flex-start; }
.sponsor-txt h2 { margin: 0 0 8px; font-size: 18px; }
.sponsor-txt p { font-size: 13.5px; color: var(--ink-2); line-height: 1.9; margin: 8px 0; text-align: justify; }
.sponsor-ps { font-size: 12px !important; color: var(--ink-3); text-align: center !important; }
.sponsor-qr-box { flex: none; text-align: center; }
/* 二维码:固定正方形 + object-fit 保证比例不变形;image-rendering 让缩放后的码点清晰不糊
   (原图 1037×1037,缩到 190px 时浏览器默认双线性插值会把码点糊掉,看起来像"扭曲") */
.sponsor-qr { display: block; margin: 0 auto; width: 190px; height: 190px; aspect-ratio: 1 / 1;
  object-fit: contain; object-position: center; image-rendering: pixelated; image-rendering: crisp-edges;
  border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 6px; box-sizing: content-box; }
.sponsor-qr-box { flex: none; text-align: center; display: flex; flex-direction: column; align-items: center; }
.sponsor-thanks { font-size: 12px; color: var(--ink-3); margin-top: 8px; }

/* ---- 卡牌详情弹窗 ---- */
.modal.card-detail { width: 640px; }
.card-detail-body { display: flex; gap: 18px; }
.cd-art { flex: none; width: 220px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.cd-art img { width: 100%; display: block; }
.cd-info { flex: 1; min-width: 0; }
.cd-name { font-size: 19px; font-weight: 800; line-height: 1.35; }
.cd-name-en { font-size: 12.5px; color: var(--ink-3); letter-spacing: .4px; margin: 2px 0 8px; }
.cd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cd-tag { font-size: 11.5px; font-weight: 700; border-radius: 7px; padding: 3px 9px; background: rgba(255, 255, 255, .05); color: var(--brand-3); border: 1px solid var(--line); }
.cd-tag.cost { background: linear-gradient(135deg, #efe7dc, #cfbfae); color: #17120e; border-color: transparent; }
.cd-desc { font-size: 13.8px; color: var(--ink-2); background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; line-height: 1.85; }
.cd-act { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- toast ---- */
.toast-wrap { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: rgba(18, 15, 12, .96); color: var(--ink); border: 1px solid var(--brand-line); font-size: 13.5px; padding: 9px 18px; border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, .6); animation: msgIn .2s ease; max-width: 80vw; }
.toast.err { background: rgba(60, 12, 8, .96); color: #ffbdb0; border-color: rgba(255, 90, 60, .5); }

.foot { position: relative; z-index: 1; text-align: center; font-size: 12px; color: var(--ink-3); padding: 10px 20px 26px; }

/* ---- 封面(仿旧字体) ---- */
.cover { position: fixed; inset: 0; z-index: 300; display: block; overflow-y: auto; overscroll-behavior: contain; background: radial-gradient(circle at 50% 30%, rgba(30,16,8,.55), rgba(3,2,2,.96)); backdrop-filter: blur(2px); }
.cover-inner { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 30px 10px; }
.cover-title {
  font-family: Georgia, 'Times New Roman', 'Songti SC', serif;
  font-size: clamp(34px, 7vw, 82px); letter-spacing: .12em; font-weight: 700;
  color: #efe7dc; text-transform: uppercase;
  text-shadow: 0 2px 0 #6b4a2c, 0 4px 14px rgba(0,0,0,.85), 0 0 26px rgba(201,133,90,.35);
  transform: scaleY(1.04);
}
.cover-sub { margin-top: 14px; font-size: clamp(12px, 1.6vw, 15px); color: #b9a894; letter-spacing: .28em; }

/* ================= 开场加载(站主:先看到站名 + 图标 + 转圈"正在加载",预加载后进站) ================= */
.cover-loading { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cover-loading.hidden { display: none; }
.cover-spinner { width: 38px; height: 38px; border-radius: 50%;
  border: 2.5px solid rgba(201, 133, 90, .22); border-top-color: var(--brand-3);
  animation: coverSpin .9s linear infinite; }
@keyframes coverSpin { to { transform: rotate(360deg); } }
.cover-loading-txt { font-size: 13px; color: #a8998a; letter-spacing: .12em; }
.cover-loading-bar { width: min(280px, 70vw); height: 4px; border-radius: 99px;
  background: rgba(255, 255, 255, .09); overflow: hidden; }
.cover-loading-bar i { display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--brand-3), var(--brand)); transition: width .25s ease; }
@media (prefers-reduced-motion: reduce) { .cover-spinner { animation-duration: 2.4s; } }
.cover-btns { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cover-btns .btn { padding: 12px 26px; font-size: 15px; }
.cover-foot { margin-top: 26px; font-size: 12px; color: #6f6760; letter-spacing: .12em; }
.cover-mark { width: 92px; height: 92px; margin: 0 auto 20px; animation: bhBreath 9s ease-in-out infinite alternate; filter: drop-shadow(0 0 22px rgba(201, 133, 90, .38)); }

/* ---- 进入口令 ---- */
.cover-gate { margin-top: 30px; width: min(420px, 92vw); }
.gate-title { font-size: 13.5px; color: #c9855a; letter-spacing: .1em; margin-bottom: 10px; }
.gate-row { display: flex; gap: 10px; }
.gate-row .field { flex: 1; text-align: center; letter-spacing: .2em; }
.gate-row .btn { flex: none; padding: 0 18px; }
.cover-gate .auth-msg { text-align: center; min-height: 18px; margin-top: 8px; }

/* ---- 封面下方的介绍区 ---- */
.cover-scroll-hint { margin-top: 34px; font-size: 12.5px; color: #8b8177; letter-spacing: .1em; animation: bounce 2.4s infinite; }
.cover-intro { max-width: 860px; margin: 0 auto; padding: 10px 26px 90px; color: #cfc6ba; font-size: 14px; line-height: 1.95; }
.cover-intro h2 { font-size: 18px; color: #efe7dc; margin: 34px 0 10px; padding-left: 12px; border-left: 3px solid var(--brand-3); letter-spacing: .06em; }
.cover-intro p { margin: 0 0 12px; }
.cover-intro ul { margin: 0 0 12px; padding-left: 22px; }
.cover-intro li { margin-bottom: 8px; }
.cover-intro strong { color: #efe7dc; }
.cover-intro b { color: var(--brand-3); }

/* ---- 论坛 ---- */
.forum-list { display: flex; flex-direction: column; gap: 12px; }
.post-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease; }
.post-card:hover { transform: translateY(-2px); border-color: var(--brand-line); box-shadow: var(--shadow); }
.post-card.has-cover { display: flex; gap: 12px; align-items: flex-start; }
.post-cover-img { width: 58px; border-radius: 8px; flex: none; border: 1px solid var(--line); }
.post-main { flex: 1; min-width: 0; }
.post-cover-hero { float: right; width: 92px; border-radius: 10px; margin: 0 0 8px 12px; border: 1px solid var(--line); }
.pub-card.is-cover { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(239,231,220,.16) inset; }
.pub-card.is-cover .pub-tag { color: var(--brand); font-weight: 800; }
.post-title { font-size: 16px; font-weight: 800; color: var(--ink); }
.post-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); margin: 5px 0; }
.post-author { color: var(--brand-3); font-weight: 700; }
.post-intro { font-size: 13px; color: var(--ink-2); }
.modal.wide-modal { width: 860px; }
.post-detail-title { margin: 0 0 6px; font-size: 20px; }
.post-intro-full { font-size: 13.5px; color: var(--ink-2); line-height: 1.9; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 10px 0; white-space: pre-wrap; }
.post-group { margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--ink-2); }
.post-group b { width: 100%; font-size: 13px; color: var(--ink); }
.post-deck { margin: 12px 0; max-height: 60vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #0b0908; }
.post-deck-img { width: 100%; display: block; border-radius: 8px; }
.post-code { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: rgba(255,255,255,.03); border: 1px dashed var(--brand-line); border-radius: 10px; padding: 8px 12px; margin: 10px 0; }
.post-code code { font-size: 12px; color: var(--ink-2); word-break: break-all; }
.post-comments-title { font-size: 15px; margin: 16px 0 8px; }
.comment { border-top: 1px solid var(--line); padding: 8px 0; font-size: 13.5px; color: var(--ink-2); }
.comment b { color: var(--brand-3); margin-right: 8px; }
.comment-time { font-size: 11.5px; color: var(--ink-3); }
.comment-form { display: flex; gap: 10px; margin-top: 12px; align-items: flex-end; }
.comment-form textarea { flex: 1; resize: vertical; }
.pub-tools { display: flex; align-items: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.pub-hint { font-size: 12.5px; color: var(--ink-3); }
.pub-deck { margin: 10px 0; max-height: 42vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #0b0908; }
.pub-deck img { width: 100%; display: block; border-radius: 8px; }
.pub-deck-title { font-size: 12px; color: var(--ink-3); padding: 2px 4px 8px; }
.post-mine { color: var(--brand-3); font-weight: 700; }
.post-del-detail { padding: 3px 12px; font-size: 12px; margin-left: auto; }
.pub-steps { font-size: 12px; color: var(--ink-3); background: rgba(255,255,255,.03); border: 1px dashed var(--brand-line); border-radius: 10px; padding: 8px 12px; margin: 8px 0; line-height: 1.8; }
.pub-card.is-cover .pub-name { color: var(--brand); }
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; max-height: 46vh; overflow: auto; padding: 4px; }
.pub-card { border: 2px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; background: #12100e; }
.pub-card.ess { border-color: var(--brand-3); box-shadow: 0 0 0 2px rgba(201,133,90,.25) inset; }
.pub-card img { width: 100%; display: block; aspect-ratio: 5/7; object-fit: cover; }
.pub-name { font-size: 11.5px; padding: 4px 6px 0; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-tag { font-size: 11px; padding: 2px 6px 5px; color: var(--ink-3); }
.pub-card.ess .pub-tag { color: var(--brand-3); font-weight: 700; }

/* ---- 论坛:按国家折叠分区(JS 动态插入) ---- */
.forum-nations { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.forum-nations-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 2px 2px 4px; }
.forum-nations-title { font-size: 15px; font-weight: 800; color: var(--ink); }
.forum-nations-tip { font-size: 12px; color: var(--ink-3); }
.forum-nation { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: border-color .14s ease; }
.forum-nation[open] { border-color: var(--brand-line); }
.forum-nation > summary {
  list-style: none; cursor: pointer; min-height: 46px;
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.forum-nation > summary::-webkit-details-marker { display: none; }
.forum-nation > summary:hover { background: rgba(255,255,255,.03); }
.forum-nation > summary:focus-visible { outline: 2px solid var(--brand-line); outline-offset: -2px; border-radius: 12px; }
.forum-nation-name { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 800; color: var(--ink); }
.forum-nation.is-sensitive .forum-nation-name::after {
  content: '历史分区'; margin-left: 8px; padding: 1px 8px; vertical-align: 2px;
  font-size: 11px; font-weight: 700; color: var(--brand-3);
  border: 1px solid var(--brand-line); border-radius: 999px;
}
.forum-nation-count { flex: none; font-size: 12px; color: var(--ink-3); background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.forum-nation-arrow {
  flex: none; width: 9px; height: 9px; margin-left: 2px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(-45deg); transition: transform .14s ease;
}
.forum-nation[open] .forum-nation-arrow { transform: rotate(45deg); }
.forum-nation-body { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-top: 1px solid var(--line); }
.forum-nation-body .post-card { padding: 10px 12px; }
.forum-nation-empty { padding: 12px 4px; text-align: center; }
.forum-nation-more { align-self: center; }
.forum-nation-field { margin: 12px 0 4px; }
.post-nation { color: var(--brand-3); font-weight: 700; }

/* ---- 我的 / 段位 ---- */
.profile-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.profile-row b { color: var(--ink); }
.rank-badge { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(135deg, rgba(239,231,220,.16), rgba(201,133,90,.2)); border: 1px solid var(--brand-line); color: var(--ink); border-radius: 999px; padding: 3px 12px; font-weight: 800; font-size: 13px; }
.rank-bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; margin: 8px 0 2px; }
.rank-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #d9cbb9, #c9855a); }

/* ---- 资料设置(游戏内名称 / 个性签名) ---- */
.profile-edit { border-top: 1px dashed var(--brand-line); margin-top: 14px; padding-top: 6px; }
.profile-edit .field-label { margin-top: 10px; }
.sig-count { color: var(--ink-3); font-size: 11.5px; float: right; }
.field-warn { border-color: #d9705a !important; box-shadow: 0 0 0 3px rgba(217, 112, 90, .16); }
.auth-msg.err { color: #ff9c86; }

/* ---- 个人主页 ---- */
.home-head { display: flex; gap: 14px; align-items: center; padding: 4px 0 12px; }
.home-avatar { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(135deg, rgba(201,133,90,.35), rgba(20,16,14,.8)); display: flex; align-items: center; justify-content: center; }
.home-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-avatar-ph { display: block; width: 26px; height: 26px; border-radius: 7px; background: rgba(255,255,255,.35); }
.home-id { min-width: 0; }
.home-name { font-size: 17px; font-weight: 800; color: var(--ink); }
.home-self { font-size: 11px; font-weight: 700; color: #f3dcb8; background: rgba(201,133,90,.22); border: 1px solid var(--brand-line); border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; }
.home-game { font-size: 13px; color: #f3dcb8; margin: 3px 0 6px; letter-spacing: .3px; }
.home-game.muted, .muted { color: var(--ink-3); }
.home-sig { font-size: 13.5px; line-height: 1.75; color: var(--ink-2); background: rgba(255,255,255,.04);
  border: 1px solid var(--line); border-left: 3px solid var(--brand-line); border-radius: 8px; padding: 9px 12px; margin-bottom: 12px; white-space: pre-wrap; word-break: break-word; }
.home-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.home-stat { text-align: center; background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 10px; padding: 9px 4px; }
.home-stat b { display: block; font-size: 19px; color: #f3dcb8; }
.home-stat span { font-size: 11.5px; color: var(--ink-3); }

/* ---- 谁赞了我 ---- */
.wholiked { display: flex; flex-wrap: wrap; gap: 7px; max-height: 190px; overflow-y: auto; }
.wholiked-item { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--brand-line);
  background: rgba(255,255,255,.04); border-radius: 999px; padding: 4px 11px 4px 5px; font-size: 12.5px; color: var(--ink); cursor: pointer; }
.wholiked-item.static { cursor: default; padding: 5px 11px; border-radius: 9px; }
.wholiked-item:hover:not(.static) { background: rgba(201,133,90,.16); }
.wholiked-av { width: 22px; height: 22px; border-radius: 50%; overflow: hidden; background: rgba(255,255,255,.12); display: inline-block; }
.wholiked-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wholiked-game { font-size: 11px; color: var(--ink-3); }

/* ---- 论坛里的作者(头像+名字可点进主页) ---- */
.author { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; padding: 0;
  color: inherit; font: inherit; cursor: pointer; text-align: left; }
.author:hover .author-name { color: #f3dcb8; text-decoration: underline; }
.author-av { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; flex: 0 0 26px;
  background: rgba(255,255,255,.12); display: inline-flex; align-items: center; justify-content: center; }
.author-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-meta { display: flex; flex-direction: column; line-height: 1.35; }
.author-name { font-weight: 700; color: var(--ink); }
.author-game { font-size: 11px; color: #e0c49a; letter-spacing: .2px; }
.post-sig { margin: 8px 0 2px; font-size: 12.5px; color: var(--ink-2); background: rgba(255,255,255,.035);
  border-left: 3px solid var(--brand-line); border-radius: 6px; padding: 6px 10px; white-space: pre-wrap; word-break: break-word; }
.comp-note { font-size: 12.5px; color: var(--ink-2); line-height: 1.75; white-space: pre-wrap; word-break: break-word;
  background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; margin: 6px 0 10px; }

/* ---- 首页在线人数 ---- */
.cover-online { text-align: center; background: linear-gradient(135deg, rgba(201,133,90,.14), rgba(20,16,14,.4));
  border: 1px solid var(--brand-line); border-radius: 16px; padding: 18px 16px; margin: 16px 0 20px; }
.cover-online-num { display: flex; align-items: baseline; justify-content: center; gap: 10px; flex-wrap: wrap; }
.cover-online-num b { font-size: 40px; line-height: 1; color: #f3dcb8; font-variant-numeric: tabular-nums; }
.cover-online-num b.pulse { animation: onlinePulse .7s ease-out; }
@keyframes onlinePulse { 0% { transform: scale(1.22); color: #fff3e2; } 100% { transform: scale(1); color: #f3dcb8; } }
.cover-online-num span { font-size: 14px; color: var(--ink-2); }
.cover-online-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }
.cover-online-all { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .cover-online-num b.pulse { animation: none; } }

/* ---- 滚动条 ---- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, .03); }
::-webkit-scrollbar-thumb { background: rgba(239, 231, 220, .25); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 140, 50, .5); }

/* ---- 手机端适配 ---- */
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .topbar-inner { padding: 8px 10px; gap: 6px; }
  .brand-name { font-size: 17px; }
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tab { padding: 7px 12px; font-size: 13px; white-space: nowrap; }
  .topbar-right { gap: 6px; flex-wrap: wrap; }
  .mode-btn { padding: 5px 9px; font-size: 11.5px; }
  .btn { padding: 8px 13px; font-size: 13.5px; }
  .views { padding: 10px 10px 84px; }
  .browse-head { top: calc(var(--topbar-h, 56px) + 2px); margin: 0 -4px 10px; padding: 8px 4px 10px; }
  .browse-tools { gap: 8px; }
  .searchbox { min-width: 100%; }
  .result-note { margin-left: 0; }
  .chat-wrap { height: calc(100vh - 190px); min-height: 420px; border-radius: 14px; }
  .chat-head { padding: 10px 12px; gap: 8px; }
  .ai-avatar { width: 36px; height: 36px; padding: 6px; border-radius: 10px; }
  .chat-ai-name { font-size: 15px; }
  .chat-ai-sub { font-size: 11px; }
  .msg { max-width: 97%; }
  .msg .bubble { font-size: 14px; padding: 9px 12px; }
  .composer { padding: 8px 10px 10px; }
  .quick-actions { flex-wrap: wrap; }
  .quick-hint { font-size: 11px; }
  .guess-bar { gap: 8px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
  .card-tile .tname { font-size: 12px; }
  .deck-input-row { flex-direction: column; }
  .deck-btns { flex-wrap: wrap; }
  .deck-preview { padding: 8px; width: 100%; }
  .drawer { width: 88vw; }
  .modal { padding: 20px 16px 18px; border-radius: 14px; max-height: 92vh; }
  .modal.small, .modal.card-detail, .modal.wide-modal { width: 94vw; }
  .card-detail-body { gap: 12px; }
  .cd-name { font-size: 17px; }
  .pub-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
  .post-deck { max-height: 38vh; }
  .comment-form { flex-direction: column; align-items: stretch; }
  .cover-btns .btn { padding: 11px 18px; font-size: 14px; width: 100%; max-width: 320px; }
  .cover-title { letter-spacing: .06em; }
  .sponsor-body { gap: 14px; }
  .sponsor-qr { width: 160px; height: 160px; }
  .foot { padding: 8px 12px 22px; font-size: 11.5px; }
}

/* ---- 响应式 ---- */
@media (max-width: 860px) {
  .topbar-inner { gap: 8px; padding: 8px 12px; }
  .brand-name { font-size: 18px; }
  .brand-sub { display: none; }
  .tabs { order: 3; width: 100%; }
  .tab { flex: 1; }
  .mode-btn { padding: 5px 10px; font-size: 12px; }
  .views { padding: 12px 12px 80px; }
  .chat-wrap { height: calc(100vh - 176px); }
  .msg { max-width: 96%; }
  .chat-stat { display: none; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
  .card-detail-body { flex-direction: column; align-items: center; }
  .cd-art { width: 200px; }
  .sponsor-body { flex-direction: column-reverse; align-items: center; }
}

.forum-tabs { display: flex; gap: 8px; margin-top: 12px; }
.forum-tab { background: rgba(255,255,255,.03); border: 1px solid var(--line); color: var(--ink-2); border-radius: 999px; padding: 6px 16px; font-size: 13.5px; cursor: pointer; transition: all .14s ease; }
.forum-tab:hover { border-color: var(--brand-line); color: var(--ink); }
.forum-tab.active { background: linear-gradient(135deg, rgba(239,231,220,.16), rgba(201,133,90,.22)); border-color: var(--brand-line); color: var(--ink); font-weight: 700; }
.post-kind { font-size: 11.5px; color: var(--brand-3); border: 1px solid var(--brand-line); border-radius: 999px; padding: 1px 9px; vertical-align: 6px; margin-left: 8px; font-weight: 600; }
.tile-dl { position: absolute; right: 8px; bottom: 46px; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--brand-line); background: rgba(10,8,7,.82); color: var(--brand); display: none; align-items: center; justify-content: center; cursor: pointer; padding: 0; z-index: 2; }
.card-tile:hover .tile-dl { display: inline-flex; }
.tile-dl:hover { background: rgba(201,133,90,.28); color: #fff3e2; }
@media (max-width: 640px) { .tile-dl { display: inline-flex; } }
/* ---- DIY 制卡 ---- */
.diy-wrap { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .diy-wrap { grid-template-columns: 1fr; } }
.diy-preview { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
/* 只给主画布上底色/圆角。交互提示层是盖在上面的第二块 canvas,
   若它也带上背景色,就会把卡面整块盖住(表现为「网页上看不到、下载出来却是好的」)。*/
.diy-preview #diyCanvas { width: 100%; height: auto; display: block; border-radius: 12px; background: #14100e; touch-action: none; cursor: grab; }
.diy-overlay-canvas { background: transparent !important; border-radius: 12px; }
.diy-preview-btns { display: flex; gap: 10px; margin-top: 12px; }
.diy-panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.diy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.diy-grid label { font-size: 12.5px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.diy-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.diy-row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.diy-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin: 10px 0; }
.diy-hint { font-size: 12px; color: var(--ink-3); margin-top: 10px; line-height: 1.7; }
/* ---- 首页介绍区:滚动入场动效 + 立即体验 ---- */
.cover-intro .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.cover-intro .reveal.in { opacity: 1; transform: none; }
.cover-cta { text-align: center; margin: 34px 0 10px; }
.cover-cta .btn { padding: 14px 40px; font-size: 16px; }
.cover-cta-tip { margin-top: 10px; font-size: 12.5px; color: #8b8177; letter-spacing: .06em; }
@media (prefers-reduced-motion: reduce) { .cover-intro .reveal { opacity: 1; transform: none; transition: none; } }
/* ---- 点赞 / 举报 / 管理员队列 ---- */
.post-like { margin-left: 8px; background: rgba(201,133,90,.12); border: 1px solid var(--brand-line); color: var(--brand-3); border-radius: 999px; padding: 2px 12px; font-size: 12px; cursor: pointer; }
.post-like:hover { background: rgba(201,133,90,.25); }
.cmt-actions { margin-left: 10px; font-size: 12px; color: var(--ink-3); display: inline-flex; gap: 10px; }
.cmt-actions span { cursor: pointer; }
.cmt-actions span:hover { color: var(--brand-3); }
.comment.cmt-reply { margin-left: 22px; border-left: 2px solid var(--brand-line); padding-left: 10px; }
.report-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 10px 0; background: rgba(255,255,255,.02); }
.report-head { font-size: 12.5px; color: var(--ink-2); }
.report-reason { font-size: 13px; color: #ffb3a6; margin: 6px 0; }
.report-excerpt { font-size: 12.5px; color: var(--ink-3); background: rgba(0,0,0,.25); border-radius: 8px; padding: 8px; }
.report-actions { display: flex; gap: 8px; margin-top: 8px; }
/* ---- 头像系统 ---- */
.avatar-box { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 6px; }
.avatar-current { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.avatar-current img { width: 56px; height: 56px; border-radius: 12px; border: 1px solid var(--brand-line); background: #14100e; object-fit: contain; }
.avatar-current-txt { flex: 1; display: flex; flex-direction: column; font-size: 12.5px; color: var(--ink-3); }
.avatar-current-txt b { color: var(--ink); font-size: 14px; margin-bottom: 2px; }
.avatar-tier { margin-top: 12px; }
.avatar-tier.locked { opacity: .55; }
.avatar-tier-head { font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.avatar-tier-head span { font-size: 11.5px; color: var(--ink-3); margin-left: 6px; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px; max-height: 220px; overflow: auto; }
.avatar-item { padding: 4px; border: 2px solid var(--line); border-radius: 10px; background: #14100e; cursor: pointer; }
.avatar-item img { width: 100%; aspect-ratio: 1/1; object-fit: contain; display: block; }
.avatar-item.on { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(239,231,220,.18) inset; }
.avatar-mini { width: 18px; height: 18px; border-radius: 5px; vertical-align: -4px; margin-right: 5px; object-fit: contain; background: rgba(0,0,0,.25); }
/* ---- 整页化弹窗(发布/详情/组牌/我的) ---- */
.modal-mask.fullpage { align-items: stretch; justify-content: flex-start; padding: 0; overflow-y: auto; }
.modal-mask.fullpage > .modal { width: 100% !important; max-width: 100%; min-height: 100vh; max-height: none; border-radius: 0; margin: 0; padding: 22px clamp(16px, 5vw, 64px) 60px; }
.modal-mask.fullpage > .modal .modal-x { position: fixed; top: 14px; right: 16px; z-index: 5; }
.modal-mask.fullpage > .modal .modal-title { font-size: 20px; margin-bottom: 14px; }
@media (max-width: 860px) { .modal-mask.fullpage > .modal { padding: 18px 16px 48px; } }
/* ---- 发布卡组:必要/封面按钮(修掉"点一下突然放大选不中") ----
   真正的根因(2026-09 用真机探针量出来的):发布卡片的封面态原来加的是 `cover` 类,
   而站内**登录封面页**也叫 `.cover { position: fixed; inset: 0; z-index: 300 }` ——
   类名撞车,于是"选中封面"的那张卡片直接变成铺满全屏的固定层(实测 118×240 → 1406×802),
   不但看起来"异常放大",还把整个弹窗(包括发布按钮)盖住,表现就是"发布卡住"。
   现已改名为 `is-cover`,并保留下面这条兜底:万一哪里还残留旧类名,也不会再变成全屏层。 */
.pub-card.cover { position: relative !important; inset: auto !important; z-index: auto !important; display: block !important; }
.pub-card { transition: none !important; position: relative; }
.pub-card:hover { transform: none !important; }
.pub-card img { transition: none !important; max-width: 100%; }
.pub-acts { display: flex; gap: 6px; padding: 4px 6px 2px; }
.pub-acts button { flex: 1; font-size: 11.5px; padding: 3px 0; border-radius: 7px; border: 1px solid var(--brand-line); background: rgba(201,133,90,.12); color: var(--brand-3); cursor: pointer; }
.pub-acts .pub-act-cover { background: rgba(239,231,220,.1); color: var(--ink); }
.pub-card.is-cover .pub-act-cover, .pub-card.ess .pub-act-ess { background: linear-gradient(135deg, rgba(239,231,220,.2), rgba(201,133,90,.3)); color: #fff3e2; font-weight: 700; }
/* ---- 我的:顶部大头像 / 谁赞了我 ---- */
.avatar-hero { display: flex; align-items: center; gap: 14px; padding: 6px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.avatar-hero-img { width: 84px; height: 84px; border-radius: 16px; border: 1px solid var(--brand-line); background: #14100e; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.avatar-hero-img img { width: 100%; height: 100%; object-fit: contain; }
.avatar-hero-img span { font-size: 12px; color: var(--ink-3); }
.avatar-hero-txt { display: flex; flex-direction: column; gap: 3px; }
.avatar-hero-txt b { font-size: 18px; color: var(--ink); }
.avatar-hero-txt span { font-size: 12.5px; color: var(--ink-3); }
.avatar-tools { display: flex; gap: 10px; margin: 10px 0 4px; flex-wrap: wrap; }
.like-item { display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--ink-2); padding: 6px 0; border-bottom: 1px dashed var(--line); }
.like-what { flex: 1; color: var(--ink-3); font-size: 12.5px; }
.like-time { font-size: 11.5px; color: var(--ink-3); }
/* ---- 顶栏头像(登录后直接显示用户头像;正方形,尺寸由 .top-avatar-btn 决定) ---- */
.top-avatar { width: 100%; height: 100%; border-radius: 8px; background: #14100e; object-fit: cover; display: block; }
.top-avatar.hidden { display: none; }
/* 让卡牌浏览的整块顶部(标题+搜索+筛选)一起固定,不露出半截 */
.browse-head { background: rgba(8, 6, 5, 0.96); box-shadow: 0 8px 18px rgba(0,0,0,.35); }
/* ---- 在线创作卡组 ---- */
.mk-wrap { margin: 22px 0 10px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.mk-head h2 { margin: 0 0 4px; font-size: 18px; }
.mk-sub { font-size: 12.5px; color: var(--ink-3); }
.mk-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin: 12px 0; }
.mk-toolbar label { font-size: 12px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.mk-toolbar .field { min-width: 110px; }
.mk-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.mk-chip { font-size: 12.5px; color: var(--ink-2); background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; }
.mk-chip b { color: var(--ink); }
.mk-chip b.ok { color: #7ddc9a; }
.mk-chip.ok { color: #7ddc9a; border-color: rgba(125,220,154,.4); }
.mk-chip.warn { color: #ffb3a6; border-color: rgba(255,140,120,.4); }
.mk-body { display: grid; grid-template-columns: 1fr 320px; gap: 14px; }
@media (max-width: 900px) { .mk-body { grid-template-columns: 1fr; } }
.mk-pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; max-height: 52vh; overflow: auto; padding-right: 4px; }
.mk-card { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #131110; }
.mk-card.on { border-color: var(--brand-3); background: rgba(201,133,90,.1); }
.mk-card img { width: 34px; height: 46px; object-fit: cover; border-radius: 5px; flex: none; background: #1b1e29; }
.mk-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mk-info b { font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-info span { font-size: 11px; color: var(--ink-3); }
.mk-ctl { display: flex; align-items: center; gap: 4px; }
.mk-ctl button { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--brand-line); background: rgba(201,133,90,.15); color: var(--brand-3); cursor: pointer; line-height: 1; }
.mk-ctl button:disabled { opacity: .35; cursor: default; }
.mk-ctl span { font-size: 11.5px; color: var(--ink-3); min-width: 24px; text-align: center; }
.mk-side { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: rgba(255,255,255,.02); }
.mk-side-title { font-size: 13px; color: var(--ink-2); display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mk-deck { display: flex; flex-wrap: wrap; gap: 5px; max-height: 30vh; overflow: auto; }
.mk-tag { font-size: 11.5px; color: var(--ink-2); background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.mk-hint { font-size: 12px; color: var(--ink-3); }
.mk-code { margin: 10px 0; font-size: 11.5px; color: var(--ink-3); word-break: break-all; background: rgba(0,0,0,.25); border-radius: 8px; padding: 8px; max-height: 80px; overflow: auto; }
.mk-btns { display: flex; gap: 8px; flex-wrap: wrap; }
/* ---- 我的卡组列表 ---- */
.mydeck-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.mydeck-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mydeck-main b { font-size: 13.5px; color: var(--ink); }
.mydeck-main span { font-size: 11.5px; color: var(--ink-3); }
.mydeck-main code { font-size: 11px; color: var(--ink-3); word-break: break-all; }
.mydeck-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.mydeck-acts .btn { padding: 3px 10px; font-size: 12px; }
/* ================= 特别资源下载 ================= */
.res-wrap { padding: 4px 0 40px; }
.res-head { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.res-head h2 { font-size: 21px; margin: 0 0 8px; }
.res-head p { margin: 0; font-size: 13px; color: var(--ink-3); line-height: 1.85; max-width: 720px; }
.res-kinds { display: flex; gap: 10px; flex-wrap: wrap; }
.res-kind { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--brand-line); background: rgba(201,133,90,.08); cursor: pointer; }
.res-kind b { font-size: 14px; color: var(--ink); }
.res-kind span { font-size: 11.5px; color: var(--ink-3); }
.res-kind.on { background: linear-gradient(135deg, rgba(239,231,220,.16), rgba(201,133,90,.28)); border-color: var(--brand); }
.res-kind.on b, .res-kind.on span { color: #fff3e2; }
.res-bar { display: flex; align-items: center; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.res-bar .field { max-width: 260px; }
.res-stat { font-size: 12.5px; color: var(--ink-3); }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.res-card { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); display: flex; flex-direction: column; }
.res-thumb { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; background: #0d0b0a; overflow: hidden; }
.res-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.res-card figcaption { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.res-card figcaption b { font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-meta { display: flex; align-items: center; gap: 6px; }
.res-badge { font-size: 10.5px; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--brand-line); color: var(--brand-3); white-space: nowrap; }
.res-badge.r2 { color: #e8c07d; border-color: rgba(232,192,125,.45); }
.res-badge.r3 { color: #f3dcb8; border-color: rgba(243,220,184,.6); }
.res-meta i { font-style: normal; font-size: 11px; color: var(--ink-3); }
.res-card-btns { display: flex; gap: 6px; }
.res-card-btns .btn { flex: 1; padding: 4px 0; font-size: 11.5px; text-align: center; text-decoration: none; }
.res-empty { grid-column: 1 / -1; color: var(--ink-3); font-size: 13px; padding: 30px 0; text-align: center; }
.res-more { text-align: center; margin: 16px 0; }
.res-note { margin-top: 18px; font-size: 12px; color: var(--ink-3); border-top: 1px dashed var(--brand-line); padding-top: 12px; line-height: 1.85; }
@media (max-width: 640px) { .res-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); } .res-bar .field { max-width: 100%; } }
/* 6 个导航页签名目下的窄屏兜底:横向滚动而不是挤压 */
@media (max-width: 1080px) { .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; } .tab { white-space: nowrap; } }
/* ================= DIY 舞台(画布 + 交互提示层) ================= */
.diy-stage { position: relative; display: inline-block; line-height: 0; touch-action: none; }
.diy-stage #diyCanvas { display: block; max-width: 100%; height: auto; }
.diy-stage #diyCanvas { cursor: grab; }
.diy-stage.dragging #diyCanvas { cursor: grabbing; }
.diy-overlay-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
/* ================= 卡牌浏览:选择条 / 构筑条 / 卡贴角标 / 回到顶部 ================= */
.selbar { position: sticky; top: calc(var(--topbar-h, 60px) + 2px); z-index: 30; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(18, 15, 13, .96); border: 1px solid var(--brand-line); border-radius: 12px; padding: 8px 12px; margin: 8px 0 12px; box-shadow: var(--shadow); }
.selbar.build { background: linear-gradient(135deg, rgba(201, 133, 90, .18), rgba(18, 15, 13, .97)); }
.selbar-txt { font-size: 13px; color: var(--ink-2); flex: 1 1 260px; line-height: 1.7; }
.selbar-txt b { color: var(--ink); }
.selbar-txt b.ok { color: #86d492; }
.selbar-txt b.warn { color: #e8b06a; }
.selbar .btn { padding: 6px 12px; font-size: 13px; }
.btn.ghost.active { background: rgba(201, 133, 90, .22); color: #fff3e2; border-color: var(--brand); }
.btn.ok { background: rgba(134, 212, 146, .18); border-color: rgba(134, 212, 146, .5); color: #cdf0d3; }
.tile-pick { position: absolute; right: 6px; bottom: 44px; z-index: 3; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 999px;
  background: rgba(10, 8, 7, .84); border: 1px solid var(--brand-line); color: #fff3e2; font-size: 11.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; }
.tile-pick.add { color: var(--brand-3); }
.card-tile.picked { outline: 2px solid var(--brand); outline-offset: -2px; }
.card-tile.sel { outline: 2px solid var(--brand); outline-offset: -2px; }
.tile-check { position: absolute; left: 6px; top: 6px; z-index: 3; width: 22px; height: 22px; border-radius: 7px; border: 1px solid var(--brand-line);
  background: rgba(10, 8, 7, .66); color: #fff3e2; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tile-check.on { background: var(--brand); border-color: var(--brand); color: #1a1512; }
.to-top { position: fixed; right: 18px; bottom: 24px; z-index: 60; width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; background: rgba(18, 15, 13, .94); border: 1px solid var(--brand-line);
  color: var(--brand-3); box-shadow: var(--shadow); transition: all .15s; }
.to-top:hover { background: var(--brand); color: #1a1512; }

/* ================= 创建卡组入口 ================= */
.mk-start { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 14px; align-items: end; margin-bottom: 14px; }
.mk-start .mk-btns { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }
.mk-summary { border-top: 1px dashed var(--brand-line); padding-top: 12px; }
.mk-summary .mk-hint { color: var(--ink-3); font-size: 13px; }

/* ================= A4 打印页 ================= */
.a4-pages { background: #23211f; border: 1px solid var(--line); border-radius: 12px; padding: 12px; max-height: 60vh; overflow: auto; margin: 12px 0; }
.a4-pages .a4-page { zoom: .34; }
/* 站主:打印前出现空白页 → 页面尺寸必须精确到 A4 的 210×297mm,并配合 @page margin:0 */
@page { size: A4 portrait; margin: 0; }
.a4-page { position: relative; width: 210mm; height: 297mm; box-sizing: border-box; background: #ffffff; color: #111; overflow: hidden; margin: 0 auto 8mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.a4-page:last-child { margin-bottom: 0; }
.a4-head { position: absolute; top: 7mm; right: 10.5mm; display: flex; align-items: center; gap: 2.5mm; }
.a4-mark { width: 7mm; height: 7mm; }
.a4-title { font-size: 3.6mm; font-weight: 700; letter-spacing: .2mm; color: #111; }
.a4-grid { position: absolute; left: 10.5mm; top: 19mm; width: 189mm; display: grid; grid-template-columns: repeat(3, 63mm); grid-auto-rows: 88mm; }
/* 扑克牌标准尺寸 63×88mm;box-sizing 保证边框不把卡片撑大 */
.a4-card { width: 63mm; height: 88mm; box-sizing: border-box; outline: .2mm solid #e2ded6; }
.a4-card img { width: 100%; height: 100%; object-fit: contain; display: block; }
.a4-foot { position: absolute; bottom: 5mm; left: 0; width: 100%; text-align: center; font-size: 2.6mm; color: #9a948c; }
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff !important; }
  body * { visibility: hidden !important; }
  #a4Modal, #a4Modal * { visibility: visible !important; }
  #a4Modal { position: static !important; background: #fff !important; padding: 0 !important; overflow: visible !important; backdrop-filter: none !important; }
  #a4Modal > .modal { position: static !important; width: auto !important; max-width: none !important; max-height: none !important;
    overflow: visible !important; background: #fff !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; min-height: 0 !important; }
  .a4-pages { background: #fff !important; border: 0 !important; padding: 0 !important; max-height: none !important; overflow: visible !important; margin: 0 !important; }
  .a4-pages .a4-page { zoom: 1; margin: 0; height: 297mm; page-break-after: always; break-after: page; page-break-inside: avoid; break-inside: avoid; }
  .a4-pages .a4-page:last-child { page-break-after: auto; break-after: auto; }
  .a4-pages .a4-card { outline: none; }
  #a4Modal .modal-x, #a4Modal .cd-act, #a4Modal .modal-title, #a4Modal .auth-extra { display: none !important; }
}
/* 白色简笔画标志:封面 / 顶栏 / 对话头像 统一为纯白线条
   (封面这一处以前漏了,所以进页面看到的还是旧的黑洞渐变图标)
   只补颜色,不动原来的尺寸/呼吸动画/暖色光晕。 */
.brand-mark, .ai-avatar svg, .cover-mark svg { color: #ffffff; }
.brand-mark { filter: none; }
/* ================= 管理员:段位管理 ================= */
.admin-rank { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.admin-rank .field { min-width: 120px; }
.auth-extra b.ok { color: #86d492; }
.rank-badge { color: #f3dcb8; }
/* 资源页:加载更多/全部按钮并排 */
.res-more { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
/* ================= 顶栏头像即「我的」入口(整个头像就是按钮,不加外框) ================= */
.top-avatar-btn { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; flex: none; cursor: pointer;
  background: transparent; color: #fff;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease; }
.top-avatar-btn:hover { transform: translateY(-1px); box-shadow: 0 0 0 2px rgba(201, 133, 90, .55); }
.top-avatar-btn:active { transform: none; }
.top-avatar-ph { width: 22px; height: 22px; }
@media (max-width: 640px) { .top-avatar-btn { width: 34px; height: 34px; border-radius: 9px; } }

/* ================= 专用名词快选 ================= */
.kw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kw-chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--brand-line); background: rgba(201, 133, 90, .1); color: var(--brand-3); }
.kw-chip.on { background: var(--brand); border-color: var(--brand); color: #1a1512; font-weight: 700; }

/* ================= 预备池标识 ================= */
/* 预备标识放**左下角**:原来在左上角,会压住费用数字与批量选择框 */
.tile-reserve { position: absolute; left: 6px; bottom: 6px; top: auto; z-index: 3; width: 22px; height: 24px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.7)); }
.card-tile.is-reserved .art { filter: saturate(.92); }

/* ================= 衍生 / 升级关系 ================= */
.cd-rel { margin: 12px 0 4px; border-top: 1px dashed var(--brand-line); padding-top: 10px; }
.cd-rel-title { font-size: 12.5px; color: var(--ink-3); margin-bottom: 8px; }
.cd-rel-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cd-rel-btn { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; cursor: pointer;
  border: 1px solid var(--brand-line); background: rgba(255, 255, 255, .03); color: var(--ink);
  border-radius: 10px; padding: 6px 10px; font-size: 13px; text-align: left; }
.cd-rel-btn em { font-style: normal; font-size: 11px; color: var(--ink-3); }
.cd-rel-btn.is-derived { border-color: rgba(232, 176, 106, .5); }
.cd-rel-btn:hover { border-color: var(--brand); background: rgba(201, 133, 90, .14); }

/* ================= 总部卡 ================= */
/* 总部卡在游戏里是有"基地边框"的正式卡。这里直接把官方 基地边框.png 叠在插画上,
   不再只给一张裸图 —— 这才是"总部的正式方框图片"。
   官方比例:画布 1000x1404,插画按卡宽居中(上方留 202/1404 = 14.39%)。 */
.hq-tile .hq-card { position: relative; width: 100%; aspect-ratio: 1000 / 1404; overflow: hidden; border-radius: 10px; background: #14100e; }
.hq-tile .hq-card .art { position: absolute; left: 0; top: 14.39%; width: 100%; height: auto; display: block; }
.hq-tile .hq-card .hq-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hq-tile .tname { color: #f3dcb8; }
.hq-tile .tile-make { position: absolute; right: 6px; bottom: 6px; z-index: 3; font-size: 10.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; cursor: pointer; color: #fff3e2;
  background: linear-gradient(135deg, rgba(201,133,90,.92), rgba(140,84,48,.92)); border: 1px solid rgba(255,220,180,.45); }
.hq-tile .tile-make:hover { filter: brightness(1.12); }
.hq-preview { display: flex; justify-content: center; }
.hq-preview .hq-card { width: 220px; }

/* ================= 首页介绍配图 ================= */
.cover-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 14px 0 22px; }
.cover-gallery figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cover-gallery img { width: 100%; height: 150px; object-fit: cover; display: block; background: #14100e; }
.cover-gallery figcaption { font-size: 12px; color: var(--ink-3); padding: 8px 10px; line-height: 1.7; }
/* 预备标识与批量选择框都靠在左上角,错开以免叠在一起 */
/* 选择了就在左下角右移一点,别和勾选框那条线重叠 */
.card-tile.sel .tile-reserve { left: 34px; }

/* 总部视图下隐藏构筑/批量的操作条(那两个模式对总部卡不适用) */
.selbar.hq-hidden { display: none; }
/* ================= 延伸卡(卡面上直接展开) ================= */
.tile-rel { position: absolute; right: 6px; bottom: 6px; z-index: 3; font-size: 10.5px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; cursor: pointer; color: #fff3e2;
  background: linear-gradient(135deg, rgba(201,133,90,.9), rgba(140,84,48,.9)); border: 1px solid rgba(255,220,180,.45); }
.tile-rel:hover { filter: brightness(1.12); }
.rel-panel { grid-column: 1 / -1; background: rgba(12, 10, 9, .94); border: 1px dashed var(--brand-line);
  border-radius: 14px; padding: 12px 14px; animation: msgIn .18s ease; }
.rel-panel-head { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.rel-close { margin-left: auto; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--ink-2);
  width: 26px; height: 26px; border-radius: 8px; cursor: pointer; }
.rel-close:hover { border-color: var(--brand); color: var(--brand-3); }
.rel-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.rel-card { display: flex; flex-direction: column; gap: 3px; padding: 6px; cursor: pointer; text-align: left;
  border: 1px solid var(--line); border-radius: 10px; background: #0e1018; color: var(--ink); }
.rel-card:hover { border-color: var(--brand); background: rgba(201,133,90,.12); }
.rel-card img { width: 100%; border-radius: 7px; display: block; aspect-ratio: 5/7; object-fit: cover; }
.rel-card b { font-size: 11.5px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-card em { font-style: normal; font-size: 10.5px; color: var(--ink-3); }
.rel-card.is-derived { border-color: rgba(232, 176, 106, .45); }
/* ================= DIY 预览更大 ================= */
.diy-wrap { grid-template-columns: minmax(320px, 560px) 1fr; }
@media (max-width: 980px) { .diy-wrap { grid-template-columns: 1fr; } }

/* ================= 界面切换与加载态(整体观感) ================= */
.view.active { animation: viewIn .26s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.grid-skeleton { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.grid-skeleton i { display: block; aspect-ratio: 5/7; border-radius: 12px;
  background: linear-gradient(100deg, #14110f 30%, #1e1a17 50%, #14110f 70%); background-size: 220% 100%;
  animation: skel 1.1s ease-in-out infinite; }
@keyframes skel { from { background-position: 120% 0; } to { background-position: -20% 0; } }
.section-hint { font-size: 12.5px; color: var(--ink-3); margin: 6px 0 12px; line-height: 1.8; }
/* ================= A4 总部卡牌(站主:只导总部本体 + 扑克牌大小) =================
   总部卡本体是 500×701 ≈ 5:7,和扑克牌 63×88mm 完全同比例,所以直接套普通卡位的尺寸。
   旧的"正方形桌布独占一条"那套(.a4-hq / .a4-hq-img / .a4-hq-txt)保留样式但已不再使用。 */
/* 站主:总部卡打印错位 → 显式定位到页头下方左上角,尺寸与普通卡完全一致(63×88mm 扑克牌) */
.a4-hq-card {
  position: absolute; left: 10.5mm; top: 19mm;
  width: 63mm; height: 88mm; box-sizing: border-box;
  border: .25mm solid #d8d2c6; border-radius: 1.5mm; overflow: hidden;
}
.a4-hq-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.a4-hq-preview { width: 34mm; height: 48mm; object-fit: cover; border: .2mm solid var(--line);
  border-radius: 1.5mm; background: #14100e; flex: none; }
.a4-hq { position: absolute; left: 10.5mm; top: 18mm; width: 189mm; height: 58mm; display: flex; align-items: center; gap: 5mm;
  border: .25mm dashed #cfc9bd; border-radius: 2mm; padding: 3mm; box-sizing: border-box; }
.a4-hq-img { width: 52mm; height: 52mm; flex: none; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.a4-hq-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.a4-hq-txt { display: flex; flex-direction: column; gap: 1.5mm; color: #222; }
.a4-hq-txt b { font-size: 4.4mm; }
.a4-hq-txt span { font-size: 3mm; color: #777; }
/* 总部卡占 19~107mm,网格必须从它下方开始,否则两张图会叠在一起(这就是"错位") */
.a4-grid.with-hq { top: 112mm; }
/* ================= 赞助整页 + 支持者滚动栏 ================= */
.sponsor-page { max-width: 980px; margin: 0 auto; }
.sponsor-h2 { font-size: 26px; margin: 0 0 12px; }
.sponsor-lead { font-size: 15px; line-height: 2; color: var(--ink-2); max-width: 780px; margin: 0 0 20px; }
.sponsor-grid { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 24px; align-items: center; margin-bottom: 22px; }
@media (max-width: 720px) { .sponsor-grid { grid-template-columns: 1fr; } }
.sponsor-qr-box { text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.sponsor-qr { width: 100%; max-width: 240px; border-radius: 12px; display: block; margin: 0 auto 10px; }
.sponsor-thanks { font-size: 12.5px; color: var(--ink-3); line-height: 1.8; }
.sponsor-where { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 14px; line-height: 2.1; }
.sup-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.sup-marquee { margin-top: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.03); padding: 12px 0; position: relative; }
.sup-marquee::before, .sup-marquee::after { content: ''; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 2; pointer-events: none; }
.sup-marquee::before { left: 0; background: linear-gradient(90deg, rgba(12,10,9,.95), transparent); }
.sup-marquee::after { right: 0; background: linear-gradient(270deg, rgba(12,10,9,.95), transparent); }
.sup-track { display: flex; gap: 26px; width: max-content; animation: supScroll linear infinite; padding-left: 20px; }
@keyframes supScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.sup-item { display: flex; align-items: center; gap: 9px; flex: none; }
.sup-item img, .sup-ph { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; display: flex; align-items: center; justify-content: center; background: #14100e; border: 1px solid var(--brand-line); color: var(--brand-3); font-weight: 800; }
.sup-txt { display: flex; flex-direction: column; }
.sup-txt b { font-size: 13.5px; color: var(--ink); }
.sup-txt em { font-style: normal; font-size: 11.5px; color: var(--brand-3); }
.sup-empty { text-align: center; color: var(--ink-3); font-size: 13px; padding: 12px 0; }
.sponsor-links { margin-top: 16px; font-size: 12.5px; color: var(--ink-3); }
.sponsor-links a { color: var(--brand-3); }

/* ================= 条款文档 ================= */
.doc-page { max-width: 860px; margin: 0 auto; }
.doc-page h2 { font-size: 24px; margin: 0 0 6px; }
.doc-meta { font-size: 12.5px; color: var(--ink-3); margin: 0 0 18px; }
.doc-page ol { padding-left: 22px; }
.doc-page li { font-size: 14px; line-height: 2.05; color: var(--ink-2); margin-bottom: 10px; }
.doc-page li b { color: var(--ink); }
.doc-page li em { font-style: normal; color: var(--brand-3); }
/* ================= 首页功能介绍 / 常见问题 ================= */
.cover-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 14px 0 24px; }
.cf { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.cf b { display: block; font-size: 15.5px; color: #f3dcb8; margin-bottom: 6px; }
.cf p { margin: 0; font-size: 13px; line-height: 1.95; color: var(--ink-2); }
.cf p b { display: inline; color: var(--brand-3); font-size: inherit; margin: 0; }
.cover-faq { margin: 12px 0 22px; }
.cover-faq details { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; background: rgba(255,255,255,.02); }
.cover-faq summary { cursor: pointer; font-size: 14px; color: var(--ink); font-weight: 600; }
.cover-faq details[open] summary { color: var(--brand-3); margin-bottom: 8px; }
.cover-faq p { margin: 0; font-size: 13px; line-height: 1.95; color: var(--ink-2); }

/* ================= 整体细节打磨 ================= */
html { scroll-behavior: smooth; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.btn { min-height: 34px; }
@media (max-width: 640px) {
  .btn { min-height: 40px; }              /* 手机上放大点击区域 */
  .tab { padding: 8px 14px; }
  .cover-features { grid-template-columns: 1fr; }
  .modal-mask.fullpage > .modal { padding: 16px 14px 60px; }
  .doc-page li { font-size: 13.5px; }
}
/* 表格/清单在窄屏可横向滚动,不撑破布局 */
.res-grid, .rel-list, .a4-pages { max-width: 100%; }

/* ================= 总部视图:卡牌 / 背景 分开 ================= */
.hq-filter { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.hq-tab { border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--ink-2);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; }
.hq-tab:hover { border-color: var(--brand-line); color: var(--ink); }
.hq-tab.active { background: linear-gradient(135deg, rgba(201,133,90,.28), rgba(140,84,48,.28)); border-color: var(--brand); color: #fff3e2; font-weight: 700; }
/* 总部背景是对局战场皮肤,不是卡 —— 原样方图展示,不套基地边框 */
.hq-plain { position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 10px; background: #14100e; }
.hq-plain .art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hq-nation { font-style: normal; font-size: 10.5px; font-weight: 400; color: var(--ink-3); margin-left: 6px; }

/* ================= AI 对话里"回答 + 卡图" ================= */
.chat-cardart { border: 1px solid var(--brand-line); background: rgba(255,255,255,.04); border-radius: 10px;
  padding: 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 5px; max-width: 96px; }
.chat-cardart img { width: 78px; border-radius: 6px; display: block; }
.chat-cardart span { font-size: 11px; color: var(--ink-2); text-align: center; line-height: 1.3;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.chat-cardart:hover { border-color: var(--brand); background: rgba(201,133,90,.14); }

/* ================= 创建卡组右侧「卡牌简略图」 ================= */
.mk-side { position: sticky; top: calc(var(--topbar-h, 60px) + 8px); align-self: start;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.mk-side-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.mk-side-title { font-size: 13px; font-weight: 800; color: var(--ink); }
.mk-side-count { font-size: 12px; color: var(--ink-3); }
.mk-side-empty { font-size: 12px; color: var(--ink-3); line-height: 1.7; padding: 8px 2px; }
.mk-side-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; padding-right: 2px; }
.mk-side { min-height: 140px; }
.mk-row { position: relative; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: rgba(255,255,255,.03); border-radius: 9px; padding: 5px 8px; cursor: default; }
.mk-row:hover { border-color: var(--brand-line); background: rgba(201,133,90,.10); z-index: 4; }
.mk-row img { width: 44px; height: 44px; object-fit: cover; border-radius: 5px; display: block; background: #1b1e29; }
.mk-row .mk-name { font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-row .mk-n { font-size: 12.5px; font-weight: 800; color: #f3dcb8; font-variant-numeric: tabular-nums; }
.mk-row .mk-pop { position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  width: 260px; background: #0d0f18; border: 1px solid var(--brand-line); border-radius: 12px; padding: 12px;
  box-shadow: var(--shadow-lg, 0 12px 40px rgba(0,0,0,.6)); display: none; z-index: 30; }
.mk-row:hover .mk-pop { display: block; }
.mk-pop-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.mk-pop-head img { width: 62px; border-radius: 6px; }
.mk-pop-name { font-weight: 800; color: var(--ink); font-size: 14px; }
.mk-pop-en { font-size: 11px; color: var(--ink-3); }
.mk-pop-stats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.mk-pop-chip { font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; color: var(--ink-2); }
.mk-pop-desc { font-size: 12px; line-height: 1.7; color: var(--ink-2); max-height: 150px; overflow-y: auto; }
.mk-pop-count { font-size: 12px; color: #f3dcb8; margin-top: 6px; }
.mk-side-tip { font-size: 11px; color: var(--ink-3); margin-top: 8px; line-height: 1.6; }
@media (max-width: 1100px) {
  .mk-row .mk-pop { left: auto; right: calc(100% + 10px); }
}
@media (max-width: 900px) {
  .mk-side { position: static; }
  .mk-row .mk-pop { position: fixed; left: 50%; top: 50%; right: auto; transform: translate(-50%, -50%); width: min(88vw, 300px); }
}

/* ================= 手机适配加强 ================= */
@media (max-width: 720px) {
  :root { --tap: 40px; }
  /* 顶栏与工具栏:允许横向滚动,不挤成一坨 */
  .browse-actions, .browse-head .row { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .browse-actions::-webkit-scrollbar, .browse-head .row::-webkit-scrollbar { height: 0; }
  .selbar, .selbar.build { flex-wrap: wrap; gap: 6px; padding: 8px 10px; }
  .selbar .btn, .selbar.build .btn { min-height: var(--tap); padding: 0 12px; font-size: 12.5px; }
  .btn { min-height: 34px; }
  /* 弹窗:dvh 处理手机浏览器地址栏吃高度的问题 */
  .modal { max-height: 88dvh; padding: 20px 16px 20px; }
  .modal-mask.fullpage > .modal { max-height: 100dvh; }
  .modal-btns { gap: 8px; }
  .modal-btns .btn { flex: 1 1 auto; }
  /* DIY:预览缩小、表单一行一个 */
  .diy-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .diy-preview { padding: 10px; }
  .diy-row4 { grid-template-columns: 1fr 1fr !important; }
  /* 资源页 */
  .res-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
  /* 论坛卡片 */
  .post-card { padding: 12px; }
  .post-cover-img { width: 100%; height: 130px; object-fit: cover; }
  /* 首页在线人数 */
  .cover-online-num b { font-size: 32px; }
  /* 输入框:手机上 16px 以下 iOS 会自动放大页面 */
  .field, textarea.field, input.field { font-size: 16px; }
}
@media (max-width: 420px) {
  .diy-grid { grid-template-columns: 1fr; }
  .mk-side-list { max-height: none; }
}

/* ================= 构筑模式:右侧「已选卡牌」面板 =================
   站主要求不要缩略图方阵,改成「国家色条 + 卡名 + ×N」的条,
   悬停时在条**左侧一点**弹出卡图。相关样式见文件末尾的 .cdp-row 一段。 */
.cards-deck-panel { position: fixed; right: 14px; top: calc(var(--topbar-h, 62px) + 96px); z-index: 46;
  width: 268px; max-height: calc(100dvh - var(--topbar-h, 62px) - 190px); overflow-y: auto;
  background: rgba(13,15,24,.96); border: 1px solid var(--brand-line); border-radius: 16px;
  padding: 12px; box-shadow: 0 16px 46px rgba(0,0,0,.6); backdrop-filter: blur(8px); }
.cdp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.cdp-head b { font-size: 14px; color: var(--ink); }
.cdp-count { font-size: 14px; font-weight: 800; color: #ffb3a6; font-variant-numeric: tabular-nums; }
.cdp-count.ok { color: #7ddc9a; }
.cdp-sub { font-size: 11px; color: var(--ink-3); margin-bottom: 9px; line-height: 1.6; }
.cdp-empty { font-size: 12px; color: var(--ink-3); padding: 10px 2px; line-height: 1.7; }
.cdp-tip { font-size: 11px; color: var(--ink-3); margin-top: 9px; line-height: 1.6; }
@media (max-width: 1100px) {
  .cards-deck-panel { right: 8px; width: 224px; }
}
@media (max-width: 760px) {
  .cards-deck-panel { position: fixed; left: 8px; right: 8px; top: auto; bottom: 8px;
    width: auto; max-height: 34dvh; }
}

/* ================= 顶栏在线人数 ================= */
.online-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2);
  border: 1px solid var(--line); background: rgba(125,220,154,.08); border-radius: 999px; padding: 3px 11px; white-space: nowrap; }
.online-chip b { color: #7ddc9a; font-variant-numeric: tabular-nums; }
.online-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: #7ddc9a; box-shadow: 0 0 0 0 rgba(125,220,154,.6);
  animation: onlineDot 2.2s infinite; }
@keyframes onlineDot { 0% { box-shadow: 0 0 0 0 rgba(125,220,154,.55); } 70% { box-shadow: 0 0 0 7px rgba(125,220,154,0); } 100% { box-shadow: 0 0 0 0 rgba(125,220,154,0); } }
@media (prefers-reduced-motion: reduce) { .online-chip .dot { animation: none; } }
@media (max-width: 720px) { .online-chip { font-size: 11.5px; padding: 2px 9px; } .online-chip span { display: none; } }

/* 我的卡组:封面缩略图 */
.mydeck-cover { width: 46px; height: 64px; flex: none; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); background: #131110; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.mydeck-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mydeck-cover:hover { border-color: var(--brand); }
.mydeck-cover-ph { font-size: 10.5px; color: var(--ink-3); text-align: center; line-height: 1.3; }

/* ================= 角落方向:把按钮/面板做方一点(不动任何配色) ================= */
/* 只改圆角半径,不覆盖 background / color / box-shadow,保持原有配色与背景 */
:root { --r-sm: 4px; --r-md: 5px; --r-lg: 6px; }
.btn, .field, textarea.field, input.field, .tab, .modal-x { border-radius: 4px; }
.modal, .card-tile, .post-card, .res-card, .cf, .hq-card, .hq-plain, .diy-preview,
.diy-panel, .mk-wrap, .mk-side, .cards-deck-panel, .chat-wrap, .selbar, .auth-extra,
.cover-online, .home-sig, .post-sig, .comp-note { border-radius: 5px; }
.mode-switch, .online-chip, .mk-chip, .cd-tag, .hq-tab, .tile-pick, .tile-rel,
.tile-make, .avatar-mini, .wholiked-item, .post-like, .rank-badge, .home-self { border-radius: 3px; }
/* 键盘操作的焦点提示(纯描边,不影响配色) */
:where(button, a, input, textarea, select, [tabindex]):focus-visible {
  outline: none; box-shadow: 0 0 0 3px rgba(201, 133, 90, .28);
}

/* ================= AI 拒答告警条 =================
   沿用站点既有告警色(.field-warn 的 #d9705a),不引入新配色。
   需求:AI 拒答时必须让用户一眼看到,而不是只在正文里塞一行小字。 */
.msg-warn {
  margin: 8px 0; padding: 10px 12px; border-radius: 4px;
  border: 1px solid #d9705a; border-left-width: 4px;
  background: rgba(217, 112, 90, .10);
  font-size: 13px; line-height: 1.7;
}
.msg-warn b { display: block; color: #d9705a; margin-bottom: 2px; font-size: 12.5px; letter-spacing: .5px; }
.msg-warn span { color: var(--ink-2, #cfc8c0); }

/* IP 封禁说明页:整站停用后必须还能看到原因 */
.ipban-mask {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg, #0f0d0c); padding: 24px;
}
.ipban-box {
  max-width: 520px; width: 100%; padding: 26px 24px;
  border: 1px solid #d9705a; border-radius: 5px; background: var(--panel, #17130f);
  text-align: left;
}
.ipban-box h2 { margin: 0 0 10px; font-size: 18px; color: #d9705a; }
.ipban-box p { margin: 6px 0; font-size: 13.5px; line-height: 1.8; color: var(--ink-2, #cfc8c0); }
.ipban-box code { background: rgba(255, 255, 255, .06); padding: 1px 6px; border-radius: 3px; font-size: 12.5px; }

/* ================= 管理员:模块化面板 =================
   每个模块是一个可折叠的 <details>,默认只展开「概览」。
   全部使用站点原有变量,不引入新配色。 */
#adminModules { margin-top: 10px; }
.adm-mod {
  border: 1px solid var(--line, #2a2320); border-radius: 5px;
  margin-bottom: 8px; background: rgba(255, 255, 255, .015);
}
.adm-mod > summary {
  cursor: pointer; list-style: none; padding: 9px 12px;
  display: flex; align-items: center; gap: 8px; font-size: 13.5px;
}
.adm-mod > summary::-webkit-details-marker { display: none; }
.adm-mod > summary::before { content: '▸'; color: var(--brand, #c9855a); font-size: 11px; }
.adm-mod[open] > summary::before { content: '▾'; }
.adm-mod[open] > summary { border-bottom: 1px solid var(--line, #2a2320); }
.adm-t { font-weight: 600; color: var(--ink, #ece6e0); }
.adm-n {
  min-width: 20px; text-align: center; padding: 1px 6px; border-radius: 3px;
  background: rgba(201, 133, 90, .18); color: var(--brand, #c9855a);
  font-size: 11.5px; font-variant-numeric: tabular-nums;
}
.adm-d { color: var(--ink-3, #8d8480); font-size: 11.5px; margin-left: auto; text-align: right; }
.adm-body { padding: 10px 12px 12px; }
.adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.adm-cell {
  border: 1px solid var(--line, #2a2320); border-radius: 4px;
  padding: 8px 10px; display: flex; flex-direction: column; gap: 2px;
}
.adm-cell b { font-size: 18px; font-variant-numeric: tabular-nums; color: var(--ink, #ece6e0); }
.adm-cell span { font-size: 11.5px; color: var(--ink-3, #8d8480); }
.adm-cell.warn { border-color: #d9705a; }
.adm-cell.warn b { color: #d9705a; }

.adm-search { margin-bottom: 8px; }
.adm-users { max-height: 340px; overflow: auto; }
.adm-user {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 0; border-bottom: 1px solid var(--line, #2a2320); font-size: 12.5px;
}
.adm-user:last-child { border-bottom: 0; }
.adm-user-main { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; flex: 1 1 240px; }
.adm-user-act { display: flex; align-items: center; gap: 6px; }
.adm-user-act .field { padding: 3px 6px; font-size: 12px; }
.adm-mail { color: var(--ink-3, #8d8480); font-size: 11.5px; }
.adm-rank { color: var(--ink-2, #cfc8c0); font-size: 11.5px; }
.adm-role { padding: 1px 6px; border-radius: 3px; font-size: 11px; border: 1px solid var(--line, #2a2320); }
.adm-role.role-owner { border-color: var(--brand, #c9855a); color: var(--brand, #c9855a); }
.adm-role.role-admin { border-color: #7fa8c9; color: #7fa8c9; }
.adm-ban, .adm-risk { padding: 1px 6px; border-radius: 3px; font-size: 11px; border: 1px solid #d9705a; color: #d9705a; }

.adm-ip-add { margin: 8px 0; }
.adm-hours { max-width: 130px; }
.adm-ip {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 0; border-bottom: 1px solid var(--line, #2a2320); font-size: 12.5px;
}
.adm-ip:last-child { border-bottom: 0; }
.adm-ip > b { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.adm-sub { margin: 12px 0 6px; font-size: 12.5px; color: var(--brand, #c9855a); font-weight: 600; }
.adm-line {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline;
  padding: 5px 0; border-bottom: 1px solid var(--line, #2a2320); font-size: 12px;
}
.adm-line:last-child { border-bottom: 0; }
.adm-line b { color: var(--ink, #ece6e0); }
.adm-line span { color: var(--ink-3, #8d8480); }
.adm-line em { margin-left: auto; font-style: normal; color: var(--ink-3, #8d8480); font-size: 11.5px; }
.adm-backup { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }

/* ================= AI 组牌结果:左大图 + 右缩略清单 ================= */
.build-body { display: grid; grid-template-columns: 1fr 320px; gap: 14px; align-items: start; margin-top: 12px; }
.build-left { min-width: 0; }
@media (max-width: 900px) { .build-body { grid-template-columns: 1fr; } }
.build-eval {
  margin-top: 12px; padding: 10px 12px; border-radius: 5px;
  border: 1px solid var(--line, #2a2320); background: rgba(255, 255, 255, .02); font-size: 12.5px; line-height: 1.8;
}
.build-eval .be-head { color: var(--ink, #ece6e0); margin-bottom: 4px; }
.build-eval .be-head b { color: var(--brand, #c9855a); }
.build-eval .be-body { color: var(--ink-2, #cfc8c0); }

/* ================= 特别下载:卡背三纹理区块 / 音效播放器 ================= */
.res-thumb-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; }
.res-thumb-3 img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; display: block; }
.res-tex-row { display: flex; flex-direction: column; gap: 5px; margin: 6px 0 4px; }
.res-tex { display: flex; align-items: center; gap: 6px; }
.res-tex .btn { flex: 1; padding: 3px 8px; font-size: 12px; }
.res-tex-orig { font-size: 11.5px; color: var(--brand, #c9855a); text-decoration: none; white-space: nowrap; }
.res-tex-orig:hover { text-decoration: underline; }
.res-tex-none { font-size: 11.5px; color: var(--ink-3, #8d8480); padding: 4px 0; }
.res-audio { width: 100%; height: 34px; }
.res-pack {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 8px 0 0; padding: 8px 10px; border: 1px solid var(--line, #2a2320); border-radius: 5px;
  background: rgba(255, 255, 255, .02); font-size: 12.5px;
}
.res-pack b { color: var(--brand, #c9855a); }
.res-sfx .res-sfx-name { font-family: ui-monospace, Consolas, monospace; font-size: 12px; word-break: break-all; }
/* 真实音效卡:带播放器 */
.res-audio-wrap { padding: 8px 8px 2px; }
.res-audio-wrap audio { width: 100%; height: 32px; display: block; }
.res-license { display: block; font-size: 11px; color: var(--ink-3, #8d8480); margin-top: 2px; }
.res-audio-card { border-color: var(--brand-line, #4a3a2c); }

/* ================= 吸顶体系:顶栏可收起,筛选栏自动归顶 =================
   站主要求:"筛选部分在顶部的其他状况栏消失之后,应该自动归为顶部"。
   做法:所有吸顶元素统一用 --sticky-top;顶栏可见时它 = 顶栏高度 + 2,
   顶栏被收起时它 = 2,于是筛选栏会接着滑到最上面,不会留一条空白。
   注意:只动定位与显隐,不动任何配色。 */
:root { --sticky-top: calc(var(--topbar-h, 60px) + 2px); }
body.topbar-hidden { --sticky-top: 2px; }
.browse-head, .selbar { top: var(--sticky-top); }
.topbar { transition: transform .22s ease; will-change: transform; }
body.topbar-hidden .topbar { transform: translateY(-100%); }

/* 卡牌浏览:往下滚过标题之后,只留筛选/搜索那一行,标题收起来 */
.browse-head.condensed { padding-top: 6px; padding-bottom: 8px; margin-bottom: 10px; }
.browse-head.condensed h1 { display: none; }

/* ---------- 右侧面板常驻 ----------
   站主要求:"卡组缩略控制部分应该长期保持在最右侧,不应该随着滑动而消失"。
   但这只针对**正在创建卡组的时候** —— 一旦退出创建,面板不能再霸占右手栏
   (站主反馈:"退出创建之后,卡牌创建[面板仍然]在右手栏")。
   所以固定定位挂在 body.deck-building 上:只有构筑中才 fixed,平时回到卡片内部正常排布。 */
@media (min-width: 1101px) {
  body.deck-building .mk-body { grid-template-columns: 1fr; padding-right: 336px; }
  body.deck-building #mkSide {
    position: fixed; right: 16px; top: var(--sticky-top); width: 320px; margin: 0;
    max-height: calc(100dvh - var(--sticky-top) - 16px); overflow-y: auto; z-index: 45;
  }
}
/* AI 组牌结果里的右侧清单:在弹窗内部保持可见(弹窗自己滚动) */
.build-body > #buildSide {
  position: sticky; top: 8px; align-self: start;
  max-height: calc(100dvh - 150px); overflow-y: auto;
}
/* 构筑时右侧「已选卡牌」面板:跟随顶栏状态调整位置,永远不会被顶栏压住 */
.cards-deck-panel { top: calc(var(--sticky-top) + 96px); max-height: calc(100dvh - var(--sticky-top) - 190px); }

/* ================= 手机适配加强(第二轮) =================
   新增的几块界面(管理面板 / 音效卡 / 常驻侧栏)都要在小屏上能用。 */
@media (max-width: 1100px) {
  /* 中屏:侧栏回到文档流,不再 fixed */
  .mk-body { padding-right: 0; grid-template-columns: 1fr 300px; }
  #mkSide { position: sticky; top: var(--sticky-top); }
}
@media (max-width: 900px) {
  .mk-body { grid-template-columns: 1fr; padding-right: 0; }
  #mkSide { position: static; max-height: none; }
  .build-body { grid-template-columns: 1fr; }
  .build-body > #buildSide { position: static; max-height: none; }
  /* 管理面板:每一行改成上下两块,按钮可点 */
  .adm-user { flex-direction: column; align-items: stretch; gap: 6px; }
  .adm-user-act { flex-wrap: wrap; }
  .adm-user-act .field { min-width: 96px; }
  .adm-ip { flex-direction: column; align-items: stretch; }
  .adm-ip-add { flex-direction: column; align-items: stretch; }
  .adm-ip-add .field { width: 100%; max-width: none; }
  .adm-hours { max-width: none; }
  .adm-d { display: none; }              /* 模块说明文字在小屏太占地方 */
  .adm-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
}
@media (max-width: 720px) {
  /* 音效卡:播放器铺满,按钮一行两个 */
  .res-audio-wrap audio { height: 36px; }
  .res-card-btns { flex-wrap: wrap; }
  .res-card-btns .btn { flex: 1 1 45%; }
  /* 浏览页顶部:按钮换行后不要让搜索框被压成一条线 */
  .browse-tools { gap: 8px; }
  .searchbox { min-width: 0; flex: 1 1 100%; }
  .browse-tools .btn { flex: 1 1 auto; }
  .browse-head { margin: 0 -2px 10px; padding: 8px 2px 10px; }
  .browse-head h1 { font-size: 18px; }
  /* 卡牌网格:更窄的屏放两列 */
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
  /* 资源页分类按钮横向滚动,不挤成多行 */
  .res-kinds { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .res-kinds .res-kind { flex: 0 0 auto; }
}
@media (max-width: 420px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .adm-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================= DIY 优化 =================
   1) 桌面:卡面预览吸顶,右边表单很长也不会看不到成品;
   2) 手机:预览同样吸在顶部(限制高度),边看边调,不用来回滚;
   3) 窄屏的 3/4 列输入并成 1 列,不出现挤成一团的数字框。 */
@media (min-width: 981px) {
  .diy-preview { position: sticky; top: var(--sticky-top); }
}
@media (max-width: 980px) {
  .diy-preview { position: sticky; top: var(--sticky-top); z-index: 20; }
  .diy-wrap { gap: 14px; }
}
@media (max-width: 720px) {
  .diy-preview { padding: 10px; }
  .diy-stage { display: block; }
  .diy-stage #diyCanvas { max-height: 40dvh; width: auto; max-width: 100%; margin: 0 auto; }
  .diy-preview-btns { flex-wrap: wrap; }
  .diy-preview-btns .btn { flex: 1 1 46%; }
  .diy-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .diy-row3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .diy-row3, .diy-row4 { grid-template-columns: 1fr; }
  .diy-stage #diyCanvas { max-height: 34dvh; }
}
/* 桌布上叠加总部卡本体(资源页预览) */
.hq-stack { position: relative; width: 100%; height: 100%; }
.hq-stack > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hq-stack .hq-stack-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 46%; height: auto; object-fit: contain;
  border-radius: 4px; box-shadow: 0 4px 14px rgba(0, 0, 0, .55);
}

/* ================= 专注选卡区(创建卡组) =================
   站主要求:单独的区域、只显示主国+盟国、除右上角退出外全是选卡区、
   搜索/筛选常在最上方且筛选在最左侧、右侧清单常驻(不随滚动消失)。
   整层 fixed,只有卡格区域自己滚动 → 右侧清单永远不会跟着滑动走。 */
.pick-mask { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column;
  background: var(--bg, #0f0d0c); }
.pick-mask.hidden { display: none; }
body.pick-open { overflow: hidden; }
.pick-top { flex: none; position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: rgba(8, 6, 5, .97); border-bottom: 1px solid var(--line); }
.pick-filterbtn { flex: none; }                 /* 筛选按钮固定在最左侧 */
.pick-search { flex: 1 1 auto; min-width: 160px; }
.pick-stat { flex: none; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.pick-exit { flex: none; margin-left: auto; }    /* 右上角唯一出口 */
.pick-filters { flex: none; display: grid; gap: 10px 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: start; padding: 10px 14px; background: rgba(12, 10, 9, .96); border-bottom: 1px solid var(--line); }
.pick-filters.hidden { display: none; }
.pick-filters label { font-size: 12px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pick-filters .field { min-width: 0; padding: 6px 8px; font-size: 13px; }
/* 花费:最小 ~ 最大 两个下拉并排 */
.pick-range { display: flex; align-items: center; gap: 6px; }
.pick-range .field { flex: 1 1 0; }
.pick-range i { font-style: normal; color: var(--ink-3); font-size: 12px; flex: none; }
/* 专用名词的快捷词条 */
.pick-filters .kw-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.pick-filter-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pick-note { flex: 1 1 auto; font-size: 11.5px; color: var(--ink-3); line-height: 1.6; }
.pick-body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 1fr 320px; gap: 12px;
  padding: 12px 14px; }
/* 卡格:必须显式锁定"卡片自己的长宽比 + 行高不被压"。
   踩过的坑(站主反馈"卡牌变成一根一根细小的,根本看不见"):
   只给 <img> 写 aspect-ratio 时,自动行的高度在固有尺寸计算阶段拿不到图片高度,
   于是窄屏上整行被压成 51px,而图片实际有 192px —— 卡片 overflow:hidden 把卡面裁成一条。
   实测(420px 宽):改前 139×51,改后 139×194。 */
.pick-grid { overflow-y: auto; display: grid; align-content: start; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); grid-auto-rows: max-content;
  padding-right: 4px; }
.pick-card { position: relative; padding: 0; border: 1px solid var(--line); border-radius: 5px;
  background: #131110; cursor: pointer; overflow: hidden; line-height: 0;
  aspect-ratio: 5 / 7; align-self: start; }
.pick-card img { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; }
.pick-card:hover { border-color: var(--brand); }
.pick-card.on { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(201, 133, 90, .35) inset; }
.pick-card .pick-cost { position: absolute; left: 3px; top: 3px; background: rgba(0, 0, 0, .75);
  color: #f3dcb8; font-size: 12px; font-weight: 800; border-radius: 4px; padding: 0 6px; line-height: 1.6; }
.pick-card .pick-n { position: absolute; right: 3px; top: 3px; background: var(--brand, #c9855a);
  color: #1a1210; font-size: 12px; font-weight: 800; border-radius: 4px; padding: 0 6px; line-height: 1.6; }
.pick-card .pick-name { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11.5px;
  color: #ece6e0; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); padding: 12px 5px 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; line-height: 1.5; }
.pick-empty { grid-column: 1 / -1; color: var(--ink-3); font-size: 13px; padding: 30px 4px; }
.pick-more { grid-column: 1 / -1; text-align: center; color: var(--ink-3); font-size: 12.5px; padding: 16px 4px; }
.pick-side { overflow-y: auto; border: 1px solid var(--line); border-radius: 5px; padding: 12px;
  background: var(--card); align-self: start; max-height: 100%; }
.pick-finish { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--line); }
.pick-finish .btn { flex: 1 1 auto; font-size: 12.5px; padding: 6px 10px; }
.pick-finish .btn:disabled { opacity: .45; cursor: not-allowed; }
/* 右侧清单行内的 −/＋ */
.cdp-step { flex: none; display: flex; gap: 3px; margin-left: 2px; }
.cdp-btn { width: 20px; height: 20px; padding: 0; line-height: 1; font-size: 13px; font-weight: 800;
  border: 1px solid var(--line); border-radius: 4px; background: rgba(255, 255, 255, .04);
  color: var(--ink-2); cursor: pointer; }
.cdp-btn:hover { border-color: var(--brand); color: var(--brand-3, #e0a878); }
/* 右侧「卡牌简略图」行内的 −/＋ */
.mk-step { flex: none; display: flex; gap: 3px; margin-left: 4px; }
.mk-btn { width: 22px; height: 22px; padding: 0; line-height: 1; font-size: 13px; font-weight: 800;
  border: 1px solid var(--line); border-radius: 4px; background: rgba(255, 255, 255, .04);
  color: var(--ink-2); cursor: pointer; }
.mk-btn:hover { border-color: var(--brand); color: var(--brand-3, #e0a878); }
.mk-row.editable { cursor: default; }
/* 「完成,选一种方式带走」面板 */
.pick-gate { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center;
  background: rgba(4, 3, 2, .74); backdrop-filter: blur(3px); }
.pick-gate.hidden { display: none; }
.pick-gate-box { width: min(560px, 92vw); background: #0d0f18; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-lg, 0 18px 50px rgba(0, 0, 0, .6)); padding: 22px; }
.pick-gate-title { font-size: 16px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.pick-gate-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 10px; }
.pick-gate-btns .btn { flex: 1 1 44%; }
.pick-gate-foot { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.pick-gate-foot .btn { flex: 1 1 auto; font-size: 12.5px; }
/* ================= 悬停卡图浮层(全站共用,挂在 body 上) =================
   为什么必须挂在 body 上:行所在的容器都是滚动容器(overflow-y:auto),
   写在行内部的绝对定位浮层会被整块裁掉 —— 站主反馈的"悬停看不到具体卡牌"就是这个原因。 */
.hovercard { position: fixed; z-index: 300; width: 300px; display: flex; gap: 10px; padding: 10px;
  background: rgba(13, 15, 24, .98); border: 1px solid var(--brand-line); border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .68); pointer-events: none; }
.hovercard.hidden { display: none; }
.hovercard-art { flex: none; width: 108px; }
.hovercard-art img { width: 100%; border-radius: 6px; display: block; }
.hovercard-body { min-width: 0; flex: 1 1 auto; }
.hovercard-name { font-size: 14px; font-weight: 800; color: var(--ink); line-height: 1.4; }
.hovercard-en { font-size: 11px; color: var(--ink-3); margin-bottom: 6px; word-break: break-all; }
.hovercard-stats { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.hovercard-chip { font-size: 11px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; color: var(--ink-2); }
.hovercard-desc { font-size: 12px; line-height: 1.7; color: var(--ink-2); max-height: 150px; overflow: hidden; }
@media (max-width: 900px) {
  .hovercard { display: none; }   /* 手机上悬停没有意义,别挡操作 */
}
/* 旧的"行内浮层"已废弃(会被滚动容器裁掉),这里显式关掉,避免残留 */
.cdp-pop, .mk-pop { display: none !important; }

/* ================= 卡牌玩家评分与评价(替代原美兰标签) =================
   沿用站内深色 + 暖金配色:只用既有变量(--ink/--ink-2/--ink-3/--line/--brand-3/--brand-line),
   点缀色 #d9a35c / #f3c98a 与 #d9705a 都是站内早已在用的色值,不改任何颜色变量。 */
.card-detail-body.has-reviews { display: block; }
.cd-top { display: flex; gap: 18px; }
.cd-reviews { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--brand-line); }
.cd-reviews-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cd-reviews-title { font-size: 14px; font-weight: 800; color: var(--ink); letter-spacing: .04em; }
.cd-reviews-avg { font-size: 12.5px; font-weight: 700; color: var(--brand-3); }
.rv-form { padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255, 255, 255, .03); }
.rv-form-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.rv-label { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.rv-scores { display: flex; flex-wrap: wrap; gap: 4px; }
.rv-score-btn { width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 5px;
  background: rgba(255, 255, 255, .03); color: var(--ink-2); font-size: 12.5px; font-weight: 700;
  cursor: pointer; transition: all .12s ease; }
.rv-score-btn:hover { border-color: var(--brand-3); color: var(--ink); }
.rv-score-btn.on { background: linear-gradient(135deg, #f3c98a, #d9a35c); border-color: #d9a35c;
  color: #1a1210; box-shadow: 0 0 10px rgba(217, 163, 92, .35); }
.rv-input { resize: vertical; min-height: 64px; font-size: 13px; line-height: 1.7; }
.rv-form-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.rv-count { font-size: 11.5px; color: var(--ink-3); }
.rv-count.over { color: #d9705a; }
.rv-form-hint { flex: 1; min-width: 120px; font-size: 11.5px; color: #d9705a; }
.rv-submit { margin-left: auto; padding: 6px 14px; font-size: 12.5px; }
.rv-del-row { display: flex; justify-content: flex-end; margin-top: 4px; }
.rv-del-mine, .rv-del { border: none; background: transparent; color: #d9705a; font-size: 11.5px;
  cursor: pointer; padding: 2px 4px; }
.rv-del-mine:hover, .rv-del:hover { text-decoration: underline; }
.rv-login { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px;
  border: 1px dashed var(--brand-line); border-radius: 7px; font-size: 12.5px; color: var(--ink-2); }
.rv-login-btn { padding: 4px 12px; font-size: 12.5px; }
.rv-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; max-height: 340px; overflow-y: auto; }
.rv-item { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255, 255, 255, .025); }
.rv-item.mine { border-color: rgba(201, 133, 90, .45); background: rgba(201, 133, 90, .07); }
.rv-item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rv-author { display: flex; align-items: center; gap: 6px; padding: 0; border: none; background: transparent;
  color: var(--ink); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.rv-author[data-rv-uid]:hover .rv-author-name { color: var(--brand-3); }
.rv-avatar { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px;
  border-radius: 50%; font-size: 11px; font-weight: 800; color: #1a1210;
  background: linear-gradient(135deg, #f3c98a, #d9a35c); }
.rv-mine-tag { font-size: 10px; color: var(--brand-3); border: 1px solid rgba(201, 133, 90, .5);
  border-radius: 999px; padding: 0 6px; }
.rv-score-chip { font-size: 11.5px; font-weight: 800; color: var(--brand-3);
  border: 1px solid rgba(201, 133, 90, .45); background: rgba(201, 133, 90, .1);
  border-radius: 4px; padding: 1px 7px; }
.rv-time { margin-left: auto; font-size: 11px; color: var(--ink-3); }
.rv-body { margin-top: 6px; font-size: 12.8px; line-height: 1.75; color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word; }
.rv-body-empty { color: var(--ink-3); }
.rv-empty, .rv-loading { padding: 18px 0; font-size: 12.5px; }
@media (max-width: 860px) {
  .cd-top { flex-direction: column; align-items: center; }
  .cd-top .cd-info { width: 100%; }
  .rv-time { margin-left: 0; }
}

/* ================= DIY 字体提示(8 MB 字体后台下载,不阻塞出图) ================= */
.diy-font-hint { margin: 8px 0 0; font-size: 12px; line-height: 1.7; color: var(--ink-3);
  border-left: 3px solid var(--brand-line); padding: 4px 0 4px 10px; }

/* ================= 异画(alt art) ================= */
.tile-altart { position: absolute; left: 6px; bottom: 6px; z-index: 3; font-size: 10px; font-weight: 800;
  color: #0d1b12; background: linear-gradient(180deg, #9fe8c0, #5fc48e); border-radius: 4px; padding: 1px 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45); }
.altart-box { margin: 10px 0 4px; padding: 10px 12px; border: 1px solid var(--brand-line);
  border-left: 3px solid #5fc48e; border-radius: 6px; background: rgba(95, 196, 142, .06); }
.altart-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.altart-badge { font-size: 11px; font-weight: 800; color: #0d1b12;
  background: linear-gradient(180deg, #9fe8c0, #5fc48e); border-radius: 4px; padding: 1px 8px; }
.altart-sub { font-size: 11.5px; color: var(--ink-3); }
.altart-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.altart-item { margin: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #131110; }
.altart-item img { width: 100%; aspect-ratio: 5/7; object-fit: cover; display: block; background: #14100e; }
.altart-item.altart-fail img { display: none; }
.altart-item.altart-fail::after { content: '图片加载失败(可换镜像)'; display: block; padding: 30px 6px;
  font-size: 11px; color: var(--ink-3); text-align: center; }
.altart-item figcaption { display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 5px 7px; font-size: 11.5px; color: var(--ink-2); }
.altart-item figcaption a { color: var(--brand-3); text-decoration: underline; white-space: nowrap; }
.altart-note { margin-top: 8px; font-size: 11px; color: var(--ink-3); line-height: 1.6; }

/* ================= 总部窗口详情(桌布 / 总部卡 / 组合,各有缩略与高清) ================= */
.hq-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 14px 0; }
.hq-detail-grid figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #131110; }
.hq-detail-grid img { width: 100%; display: block; aspect-ratio: 1/1; object-fit: cover; background: #14100e; }
.hq-detail-combo img { aspect-ratio: 1/1; object-fit: cover; }
.hq-detail-ph { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center;
  color: var(--ink-3); font-size: 12px; }
.hq-detail-grid figcaption { padding: 6px 9px; font-size: 12px; color: var(--ink-3); text-align: center; }
.hq-detail-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin: 12px 0; }
.hq-detail-btns .btn { justify-content: space-between; display: flex; align-items: center; }
.hq-detail-btns .btn em { font-style: normal; font-size: 11px; color: var(--ink-3); }
.hq-detail-btns .btn:hover em { color: #17120e; }

/* ================= DIY 词条选择(单位:重甲… 指令:情报…) ================= */
.diy-kw { margin: 10px 0 12px; }
.diy-kw-title { font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; }
.diy-kw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.diy-kw-chips .kw-chip { font-size: 12px; padding: 5px 11px; min-height: 32px; }
.diy-kw-none { font-size: 12px; color: var(--ink-3); }

/* 带数值的词条(重甲 N / 情报 N):词条按钮 + 数字下拉,玩家自己定数值 */
.kw-num-group { display: inline-flex; align-items: center; gap: 4px; }
.kw-num-group.on .kw-num { border-color: var(--brand); color: var(--ink); }
.kw-num {
  appearance: none; -webkit-appearance: none;
  background: rgba(255, 255, 255, .04); color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 6px;
  font-size: 12px; padding: 3px 6px; min-height: 26px; cursor: pointer;
}
.kw-num:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ================= 卡背详情(外面只显示纹理一,下载在详情里) ================= */
.cb-detail-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.cb-detail-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .02); }
.cb-detail-row img { width: 54px; height: 74px; object-fit: cover; border-radius: 6px; flex: none; background: #14100e; }
.cb-detail-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cb-detail-meta b { font-size: 13px; color: var(--ink); }
.cb-detail-meta span { font-size: 11.5px; color: var(--ink-3); }
.cb-detail-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cb-detail-btns .btn { padding: 5px 12px; font-size: 12.5px; min-height: 34px; }
@media (max-width: 640px) {
  .cb-detail-row { flex-wrap: wrap; }
  .cb-detail-btns { width: 100%; }
  .cb-detail-btns .btn { flex: 1; }
}

/* ================= 卡牌下载选项(压缩图 / 高清图) ================= */
.cd-dl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 6px;
  padding: 10px 12px; border: 1px solid var(--brand-line); border-radius: 8px; background: rgba(201, 133, 90, .07); }
.cd-dl-title { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.cd-dl .btn { padding: 5px 12px; font-size: 12.5px; }
.cd-dl-note { font-size: 11px; color: var(--ink-3); line-height: 1.7; margin: 4px 0 10px; }
.cd-dl-note code { font-size: 11px; color: var(--brand-3); }

/* ================= 花费筛选:0/1/2/…/7+ 发光按钮(站主) ================= */
.cost-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
.cost-chip { min-width: 40px; padding: 6px 0; font-size: 13px; font-weight: 700; cursor: pointer;
  border: 1px solid var(--line); border-radius: 6px; background: rgba(255, 255, 255, .03);
  color: var(--ink-2); transition: all .14s ease; }
.cost-chip:hover { border-color: var(--brand); color: var(--brand-3); }
.cost-chip.on { background: linear-gradient(135deg, #f7f1e8, #d9cbb9); color: #17120e; border-color: #f7f1e8;
  box-shadow: 0 3px 12px rgba(201, 133, 90, .35); }
.cost-hint { font-size: 11.5px; color: var(--ink-3); line-height: 1.7; }

/* ================= 网页公告横幅 ================= */
.notice-bar { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; padding: 10px 14px;
  border: 1px solid var(--brand-line); border-left: 3px solid var(--brand-3); border-radius: 8px;
  background: rgba(201, 133, 90, .08); }
.notice-bar.hidden { display: none; }
.notice-bar-title { font-size: 13px; font-weight: 800; color: var(--brand-3); white-space: nowrap; }
.notice-bar-body { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.8; color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word; }
.notice-bar-x { border: none; background: none; color: var(--ink-3); cursor: pointer; font-size: 14px; line-height: 1; }

/* ================= 违规申诉 ================= */
.appeal-box { display: flex; flex-direction: column; gap: 10px; }
.appeal-row { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: rgba(255, 255, 255, .02); }
.appeal-row-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.appeal-state { font-size: 11px; border-radius: 4px; padding: 1px 8px; border: 1px solid var(--line); }
.appeal-state.open { color: #e0a878; border-color: var(--brand-line); }
.appeal-state.replied, .appeal-state.resolved { color: #7fd6a0; border-color: rgba(127, 214, 160, .4); }
.appeal-body { margin-top: 6px; font-size: 12.5px; line-height: 1.8; color: var(--ink-2); white-space: pre-wrap; }
.appeal-reply { margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--brand); background: rgba(201, 133, 90, .08);
  font-size: 12.5px; line-height: 1.8; color: var(--ink); white-space: pre-wrap; }
.appeal-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* 封面卡选择器 */
.cover-pick { width: min(720px, 94vw); }
.cover-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px;
  margin-top: 12px; max-height: 56vh; overflow-y: auto; }
.cover-pick-card { padding: 0; border: 1px solid var(--line); border-radius: 5px; overflow: hidden;
  background: #131110; cursor: pointer; line-height: 0; }
.cover-pick-card img { width: 100%; aspect-ratio: 5 / 7; object-fit: cover; display: block; }
.cover-pick-card span { display: block; font-size: 11px; line-height: 1.5; padding: 4px 3px;
  color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover-pick-card:hover, .cover-pick-card.on { border-color: var(--brand); }
.cover-pick-card.on { box-shadow: 0 0 0 2px rgba(201, 133, 90, .4) inset; }
/* 浏览页右侧常驻面板里的长清单:自己滚动,面板本身不被撑爆 */
.cards-deck-panel .cdp-list { max-height: calc(100dvh - var(--sticky-top, 62px) - 330px); overflow-y: auto; }

/* ---------- 已选卡牌清单:国家色条 + 卡名 + ×N,悬停时在左侧弹卡图 ---------- */
.cdp-list { display: flex; flex-direction: column; gap: 5px; }
.cdp-row { position: relative; display: flex; align-items: center; gap: 8px; padding: 5px 8px;
  border: 1px solid var(--line); border-radius: 4px; background: rgba(255, 255, 255, .02);
  cursor: pointer; font-size: 12.5px; }
.cdp-row:hover { border-color: var(--brand); background: rgba(201, 133, 90, .10); }
.cdp-bar { width: 5px; align-self: stretch; min-height: 18px; border-radius: 2px; flex: none;
  background: var(--fac, #8a8a8a); }
.cdp-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.cdp-n { flex: none; font-weight: 800; color: #f3dcb8; font-variant-numeric: tabular-nums; }
.cdp-pop { position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  width: 200px; display: none; z-index: 90; pointer-events: none; }
.cdp-row:hover .cdp-pop { display: block; }
.cdp-pop img { width: 100%; border-radius: 5px; display: block; box-shadow: 0 12px 34px rgba(0, 0, 0, .7); }
/* 国家色(按卡牌阵营取色,只用于这一条色条) */
.cdp-row[data-fac="Germany"] { --fac: #767b83; }
.cdp-row[data-fac="Britain"] { --fac: #4d84bb; }
.cdp-row[data-fac="Japan"] { --fac: #c0524d; }
.cdp-row[data-fac="Soviet"] { --fac: #b0433a; }
.cdp-row[data-fac="USA"] { --fac: #7f8f52; }
.cdp-row[data-fac="France"] { --fac: #55719f; }
.cdp-row[data-fac="Italy"] { --fac: #5f8d63; }
.cdp-row[data-fac="Poland"] { --fac: #b06a5f; }
.cdp-row[data-fac="Finland"] { --fac: #8e9bab; }
.cdp-row[data-fac="Anzac"] { --fac: #a48d52; }
.cdp-row[data-fac="Neutral"] { --fac: #7d7d7d; }

/* 小屏:选卡区改成"上卡格 + 下清单",清单仍然固定可见 */
@media (max-width: 900px) {
  .pick-body { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .pick-side { max-height: 32dvh; }
  .pick-stat { display: none; }
  .cdp-pop { right: auto; left: 0; top: auto; bottom: calc(100% + 6px); transform: none; width: 160px; }
}
@media (max-width: 720px) {
  .pick-top { flex-wrap: wrap; padding: 8px 10px; gap: 8px; }
  .pick-search { order: 3; flex: 1 1 100%; }
  .pick-exit { order: 2; }
  .pick-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
  .pick-filters { padding: 8px 10px; }
  .pick-filters .field { min-width: 96px; }
}

/* ================= 手机端体验优化(站主:进一步优化手机端) =================
   这一版重点解决手机上四个真实痛点:
   ① 顶部区域按钮变多之后换行把页面顶下去 → 改成横向滑动,不换行、不占高度;
   ② 手指点不中太小的按钮 → 统一把可点区域的**最小高度提到 40px**(iOS 推荐 44px);
   ③ 对话页的输入框被手机键盘顶飞 → 用 dvh + sticky,并保证安全区留白;
   ④ 详情类弹窗在手机上内容溢出 → 一律单列 + 可滚动。 */
@media (max-width: 860px) {
  /* ① 顶部导航:横向滑动 */
  .topbar-inner { gap: 6px; padding: 8px 10px; }
  .tabs {
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; max-width: 100%;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; min-height: 40px; display: inline-flex; align-items: center; }
  .tab.active::after { left: 8px; right: 8px; }

  /* ② 可点区域够大 */
  .cost-chip { min-height: 40px; min-width: 46px; }
  .think-toggle { min-height: 40px; }
  .btn, .field, .mini-tab, .mode-btn, .forum-tab, .res-kind, .post-like { min-height: 40px; }
  /* 论坛折叠分区:整行可点,高度按 iOS 推荐 44px+ */
  .forum-nation > summary { min-height: 48px; padding: 12px; }
  .forum-nation-body { padding: 10px; }
  .cd-dl .btn, .hq-detail-btns .btn { min-height: 40px; }

  /* ③ 对话页:输入框贴底 + 安全区(刘海屏) */
  .chat-wrap { height: calc(100dvh - var(--sticky-top, 56px)); }
  .composer { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .chat-body { padding: 14px 12px 6px; }
  .chat-head { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  .chat-head-txt { min-width: 0; }
  .chat-hello { padding: 26px 14px 6px; }
  .chat-hello-tip { min-height: 38px; }

  /* ④ 弹窗单列、可滚 */
  .hq-detail-grid, .hq-detail-btns { grid-template-columns: 1fr; }
  .altart-list { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .ai-usage-table { gap: 6px; }
  .ai-usage-row { font-size: 12.5px; padding: 7px 8px; }
  .appeal-tools { flex-direction: column; align-items: stretch; }
  .modal { width: 100%; max-width: 100%; }
  .modal-mask { padding: 12px; }
  .modal-mask .modal.wide-modal { width: 100%; }
}

@media (max-width: 480px) {
  .brand-name { font-size: 15px; }
  .brand-sub { display: none; }
  .ai-mode-switch .mode-btn, .think-toggle span { font-size: 11.5px; }
  .chat-wrap { min-height: 0; }
  .guess-bar { flex-wrap: wrap; }
  .cost-chips { gap: 5px; }
  .cost-chip { min-width: 42px; }
  .notice-bar { padding: 8px 10px; }
  .notice-bar-title { display: none; }
}





/* ================= DIY 进入时的加载面板(站主要求:加载完再进入) ================= */
.diy-loading {
  position: absolute; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 8, 7, .92);
  backdrop-filter: blur(2px);
  border-radius: inherit;
}
.diy-loading.hidden { display: none; }
.diy-loading-inner {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 26px 30px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(23, 20, 18, .96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .55);
}
.diy-loading-txt { font-size: 13.5px; color: var(--ink); letter-spacing: .06em; }
.diy-loading-sub { font-size: 11.5px; color: var(--ink-3); }
.diy-loading .cover-loading-bar { width: min(240px, 62vw); }
#view-diy { position: relative; }

/* 识图模式切换(卡牌 / 局势) */
.identify-mode { font-size: 12px; padding: 4px 10px; min-height: 30px; white-space: nowrap; }
@media (max-width: 640px) { .identify-mode { font-size: 11px; padding: 3px 8px; } }

/* ================= 宣群 / 宣传(论坛视图里动态插入,见 assets/js/promoui.js) =================
   默认折叠,点开才拉列表;卡片 = 二维码缩略图 + 标题 + 类型 + 人数 + 主要内容 + 注意事项 + 作者 / 时间。
   发布表单与二维码大图都是站内自己的浮层(.promo-mask),手机上单列、可滚动。 */
.promo-box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 0 0 14px; }
.promo-box[open] { border-color: var(--brand-line); }
.promo-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; cursor: pointer; user-select: none; list-style: none;
}
.promo-head::-webkit-details-marker { display: none; }
.promo-head::marker { content: ''; }
.promo-head:hover { background: rgba(255, 255, 255, .03); }
.promo-head:focus-visible { outline: 2px solid var(--brand-line); outline-offset: -2px; }
.promo-name { flex: none; font-size: 14.5px; font-weight: 800; color: var(--ink); }
.promo-head-tip { flex: 1; min-width: 0; font-size: 12px; color: var(--ink-3); }
.promo-count {
  flex: none; font-size: 12px; color: var(--ink-3); background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px;
}
.promo-arrow {
  flex: none; width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(-45deg); transition: transform .14s ease;
}
.promo-box[open] .promo-arrow { transform: rotate(45deg); }
.promo-body { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-top: 1px solid var(--line); }
.promo-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.promo-tools .field { width: auto; min-width: 128px; }
.promo-tools-hint { flex: 1; min-width: 160px; font-size: 12px; color: var(--ink-3); }
.promo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.promo-card {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px;
  background: rgba(255, 255, 255, .02); border: 1px solid var(--line); border-radius: 12px;
}
.promo-qr {
  flex: none; width: 96px; height: 96px; padding: 0; border: 1px solid var(--line); border-radius: 10px;
  background: #0d0b09; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.promo-qr img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.promo-qr-none { font-size: 11px; line-height: 1.4; color: var(--ink-3); text-align: center; padding: 6px; }
.promo-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.promo-title { font-size: 14.5px; font-weight: 800; color: var(--ink); word-break: break-word; }
.promo-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.promo-tag {
  font-size: 11.5px; font-weight: 800; color: #17120e; border-radius: 999px; padding: 1px 9px;
  background: linear-gradient(135deg, #f7f1e8, #d9cbb9);
}
.promo-size { color: var(--brand-3); font-weight: 700; }
.promo-author { color: var(--ink-2); }
.promo-author[data-promo-uid] { cursor: pointer; text-decoration: underline dotted; }
.promo-topic, .promo-notes {
  font-size: 12.5px; line-height: 1.55; color: var(--ink-2);
  word-break: break-word; white-space: pre-wrap;
}
.promo-topic b, .promo-notes b { color: var(--ink); }
.promo-del { align-self: flex-start; min-height: 28px; padding: 2px 10px; font-size: 12px; }
.promo-empty { padding: 16px 6px; text-align: center; }
.promo-more-wrap { text-align: center; }
.promo-mask {
  position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center;
  padding: 14px; background: rgba(3, 3, 4, .72); backdrop-filter: blur(3px);
}
.promo-mask.hidden { display: none; }
body.promo-open { overflow: hidden; }
.promo-form {
  width: min(560px, 100%); max-height: calc(100dvh - 28px); overflow: auto;
  background: rgba(20, 17, 14, .98); border: 1px solid var(--brand-line);
  border-radius: 16px; box-shadow: var(--shadow-lg);
}
.promo-form-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(20, 17, 14, .98);
}
.promo-form-head b { font-size: 15px; }
.promo-close { min-height: 30px; padding: 3px 12px; font-size: 12.5px; }
.promo-form-body { padding: 2px 16px 16px; }
.promo-upload { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.promo-upload-tip { font-size: 12px; color: var(--ink-3); }
.promo-preview { width: 116px; height: 116px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.promo-form-msg { min-height: 20px; margin-top: 10px; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); word-break: break-word; }
.promo-form-msg.is-err { color: #ff8f7d; }
.promo-form-acts { margin-top: 6px; }
.promo-form-acts .btn { width: 100%; padding: 11px 16px; font-size: 15px; }
.promo-form-hint { margin-top: 8px; font-size: 11.5px; line-height: 1.6; color: var(--ink-3); }
.promo-qr-box {
  width: min(400px, 100%); max-height: calc(100dvh - 28px); overflow: auto; padding: 14px; text-align: center;
  background: rgba(20, 17, 14, .98); border: 1px solid var(--brand-line);
  border-radius: 16px; box-shadow: var(--shadow-lg);
}
.promo-qr-box img {
  display: block; width: 100%; max-width: 340px; height: auto; margin: 0 auto;
  padding: 10px; background: #fff; border-radius: 12px;
}
.promo-qr-cap { margin-top: 10px; font-size: 13px; color: var(--ink); word-break: break-word; }
.promo-qr-tip { margin-top: 4px; font-size: 11.5px; color: var(--ink-3); }
.promo-qr-box .btn { margin-top: 12px; }

/* 手机:单列卡片、大按钮、表单贴底 */
@media (max-width: 860px) {
  .promo-head { min-height: 48px; padding: 12px; }
  .promo-head-tip { flex: 1 1 100%; order: 3; }
  .promo-body { padding: 10px; }
  .promo-list { grid-template-columns: 1fr; }
  .promo-card { padding: 10px; }
  .promo-qr { width: 84px; height: 84px; }
  .promo-tools .field, .promo-tools .btn { min-height: 40px; }
  .promo-mask { align-items: flex-end; padding: 8px; }
  .promo-form { width: 100%; max-height: calc(100dvh - 16px); }
  .promo-form-acts .btn { min-height: 44px; }
}

/* ============================================================
   2026-11 追加:卡组装饰卡背 / 标志性卡牌叠放 · 段位进度 · 认证订阅
   约定:只在文件末尾追加,不覆盖上面的任何规则。
   ============================================================ */

/* ---------- 卡组卡片:标志性卡牌叠放 + 倾斜卡背 ---------- */
/* 结构: .deck-art > (.deck-art-stack > .deck-art-card×3~5) + .deck-art-back-wrap > .deck-art-back
   卡背在后、rotate(-6deg);卡牌略微错开叠放(每张 +19px / +6px,各自再有一点点旋转)。 */
.post-card.has-art { display: flex; gap: 14px; align-items: flex-start; }

.deck-art {
  position: relative;
  flex: none;
  width: 152px;
  height: 140px;
}

.deck-art-back-wrap {
  position: absolute;
  right: 0;
  top: 6px;
  z-index: 0;
  display: block;
  width: 84px;
  transform: rotate(-6deg);
  transform-origin: 70% 50%;
}

.deck-art-back {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(239, 231, 220, .3);
  border-radius: 7px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .55);
  background: #12100e;
}

.deck-art-stack {
  position: absolute;
  left: 0;
  top: 8px;
  z-index: 2;
  display: block;
  width: 62px;
  height: 112px;
}

.deck-art-card {
  position: absolute;
  left: calc(var(--i, 0) * 19px);
  top: calc(var(--i, 0) * 6px);
  z-index: calc(var(--i, 0) + 1);
  display: block;
  width: 62px;
  overflow: hidden;
  border: 1px solid rgba(239, 231, 220, .18);
  border-radius: 6px;
  background: #12100e;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .6);
  transform: rotate(var(--rot, 0deg));
  transition: transform .16s ease;
}

.deck-art-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 7;
  object-fit: cover;
}

.post-card:hover .deck-art-card {
  transform: rotate(var(--rot, 0deg)) translateY(-2px);
}

/* 详情页的大号展示 */
.deck-art.deck-art-lg {
  width: 100%;
  max-width: 420px;
  height: 252px;
  margin: 4px auto 16px;
}

.deck-art-lg .deck-art-stack {
  left: 12px;
  top: 16px;
  width: 108px;
  height: 196px;
}

.deck-art-lg .deck-art-card {
  width: 108px;
  left: calc(var(--i, 0) * 44px);
  top: calc(var(--i, 0) * 12px);
}

.deck-art-lg .deck-art-back-wrap {
  right: 16px;
  top: 16px;
  width: 150px;
}

/* 图源缺失时的兜底(卡图先回退到原图,再回退到站点图标) */
.deck-art img.is-art-fallback {
  object-fit: contain;
  padding: 8px;
  background: #17130f;
}

.deck-art img.is-art-broken { opacity: .35; }

/* ---------- 发布弹窗:装饰卡背选择器(必选)---------- */
.cbk-box {
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .02);
}

.cbk-loading { font-size: 12.5px; color: var(--ink-3); }

.cbk-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.cbk-head b { font-size: 13.5px; color: var(--ink); }
.cbk-note { margin-left: auto; font-size: 11.5px; color: var(--brand-3); }

.cbk-modes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

.cbk-mode {
  min-height: 38px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}

.cbk-mode:hover { border-color: var(--brand-line); color: var(--ink); }

.cbk-mode[aria-pressed="true"] {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--brand-soft);
}

.cbk-preview { display: flex; align-items: center; gap: 10px; }

.cbk-preview-img {
  flex: none;
  width: 72px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #141110;
}

.cbk-preview-img img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 7;
  object-fit: cover;
}

.cbk-preview-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cbk-preview-meta b { font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.cbk-preview-meta span { font-size: 11.5px; color: var(--ink-3); }

.cbk-shuffle {
  align-self: flex-start;
  min-height: 30px;
  padding: 2px 10px;
  font-size: 12px;
  color: var(--brand-3);
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  cursor: pointer;
}

.cbk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  max-height: 224px;
  overflow: auto;
  margin-top: 10px;
  padding: 2px;
}

.cbk-tile {
  padding: 0;
  overflow: hidden;
  text-align: left;
  background: #12100e;
  border: 2px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.cbk-tile:hover { border-color: var(--brand-line); }
.cbk-tile.is-on { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(201, 133, 90, .26) inset; }

.cbk-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: cover;
}

.cbk-tile-name {
  display: block;
  padding: 3px 5px;
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cbk-msg { min-height: 18px; margin-top: 8px; font-size: 12px; color: var(--ink-3); }
.cbk-msg.is-ok { color: #7ddc9a; }

/* 论坛浏览头里的 AI 自习室入口 */
.btn-study-room { border-style: dashed; }

/* ---------- 「我的」:段位进度 ---------- */
/* app.js 每次打开「我的」都会重建 #profileBody,这几块由 rankui.js 追加进去。 */
#profileModal .modal.small { width: min(560px, 100%); }

.rank-ext { margin-top: 4px; }
.rank-block, .sub-block { display: block !important; }

.rk-hero {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 2px;
}

.rk-name {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: .05em;
  color: var(--brand);
}

.rk-pts { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.rk-track { margin: 6px 0 6px; }
.rk-next { font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }

.rk-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.rk-chip {
  padding: 3px 8px;
  font-size: 11.5px;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .02);
}

.rk-chip b { color: var(--ink); }
.rk-chip i { margin-left: 4px; font-style: normal; color: var(--brand-3); }
.rk-chip.is-empty { color: var(--ink-3); }

.rk-tip {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

/* ---------- 「我的」:认证订阅 ---------- */
.sub-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 6px 0 10px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
}

.sub-badge {
  padding: 2px 8px;
  font-size: 11.5px;
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.sub-badge.is-on {
  color: #7ddc9a;
  border-color: rgba(125, 220, 154, .45);
  background: rgba(125, 220, 154, .1);
}

.sub-badge.is-off { color: var(--ink-3); }

.sub-form {
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .015);
}

.sub-shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.sub-shot {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 8px;
  font-size: 11.5px;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .02);
  cursor: pointer;
}

.sub-shot b { font-size: 12px; color: var(--ink); }
.sub-shot input { max-width: 100%; font-size: 10.5px; color: var(--ink-3); }

.sub-shot-tip {
  margin: 8px 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

.sub-note { width: 100%; min-height: 56px; }

.sub-submit {
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
}

.sub-msg {
  min-height: 18px;
  margin: 8px 0 4px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.sub-msg.is-ok { color: #7ddc9a; }
.sub-msg.is-warn { color: #e8b06a; }

.sub-gift {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .02);
}

.sub-cards {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.sub-cards b { font-size: 15px; color: var(--brand); }
.sub-reset-btn { min-height: 34px; padding: 4px 12px; font-size: 12px; }

.sub-think {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.sub-think-label { color: var(--ink-2); }
.sub-think-opts { display: flex; gap: 6px; }

.sub-think-btn {
  min-height: 32px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.sub-think-btn.is-on {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--brand-soft);
}

.sub-think-btn:disabled { opacity: .45; cursor: not-allowed; }
.sub-think-hint { margin-left: auto; font-size: 11.5px; color: var(--ink-3); }
.sub-think-hint.is-on { color: #7ddc9a; }

/* ---------- 新增模块的手机端 ---------- */
@media (max-width: 720px) {
  .post-card.has-art { flex-direction: column; }
  .deck-art { width: 100%; max-width: 230px; height: 152px; }
  .deck-art.deck-art-lg { height: 210px; }
  .deck-art-lg .deck-art-stack { left: 4px; top: 12px; width: 88px; height: 160px; }
  .deck-art-lg .deck-art-card { width: 88px; left: calc(var(--i, 0) * 32px); top: calc(var(--i, 0) * 10px); }
  .deck-art-lg .deck-art-back-wrap { right: 4px; top: 12px; width: 118px; }
  .sub-shots { grid-template-columns: 1fr; }
  .cbk-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); max-height: 180px; }
}

/* ===== 单国论坛:全屏(站主要求) ===== */
#view-forum.nation-only {
  position: fixed; inset: 0; z-index: 45;
  background: #0b0908;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 12px clamp(10px, 3vw, 40px) 40px;
}
#view-forum.nation-only .forum-nations-head,
#view-forum.nation-only .forum-nations-tip,
#view-forum.nation-only .forum-browse-head,
#view-forum.nation-only .forum-list,
#view-forum.nation-only .forum-pager { display: none !important; }
#view-forum.nation-only details.forum-nation:not([open]) { display: none !important; }
#view-forum.nation-only details.forum-nation { margin: 0 0 14px; }
/* 单国模式的顶部条 */
#view-forum .nation-bar { display: none; }
#view-forum.nation-only .nation-bar {
  display: flex; align-items: center; gap: 12px;
  position: sticky; top: 0; z-index: 3;
  padding: 12px 4px 14px; margin-bottom: 6px;
  background: linear-gradient(to bottom, #0b0908 70%, rgba(11,9,8,0));
}
#view-forum .nation-bar h3 { margin: 0; font-size: 19px; color: var(--ink); }
#view-forum .nation-bar .nation-back {
  margin-left: auto; padding: 7px 16px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--ink-2); font-size: 13px;
}
#view-forum .nation-bar .nation-back:hover { border-color: var(--brand); color: #fff3e2; }

/* 站主:进入单国论坛后,不要再显示卡牌浏览那排顶条 —— 只留国家名称与图标在左上角 */
body.in-nation-forum .topbar,
body.in-nation-forum .top-fixed,
body.in-nation-forum footer { display: none !important; }
#view-forum.nation-only .nation-bar { padding: 10px 4px 12px; }
#view-forum .nation-bar .nation-ico {
  width: 30px; height: 30px; border-radius: 8px; object-fit: contain;
  background: rgba(255,255,255,.06); padding: 3px;
}

/* 站主:宣群广场 / 卡组广场的页头(之前完全没有样式,标题贴边、副标题无层次) */
.promo-page-head { padding: 10px 6px 18px; border-bottom: 1px solid var(--line, rgba(255,255,255,.1)); margin-bottom: 16px; }
.promo-page-head h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: .04em; color: var(--ink, #f0e6d8); }
.promo-page-head p { margin: 0; font-size: 12.8px; line-height: 1.7; color: var(--ink-2, #c9bfb4); max-width: 720px; }
@media (max-width: 620px) {
  .promo-page-head { padding: 6px 4px 12px; }
  .promo-page-head h2 { font-size: 17px; }
  .promo-page-head p { font-size: 12px; }
}

/* 站主:两个新建的独立空间(卡组广场 / 宣群广场)在手机上需要留安全边距 */
#view-deckplaza, #view-promo { padding: 0 clamp(8px, 2.5vw, 28px) 24px; }
@media (max-width: 620px) {
  #view-deckplaza, #view-promo { padding: 0 10px 18px; }
  #view-deckplaza .post-card, #view-promo .promo-card { margin-left: 0; margin-right: 0; }
  #view-deckplaza h2, #view-promo h2 { font-size: 16.5px; }
}
