/* DuelDeck 社区网站样式。浅色、蓝白(和软件同一套:浅灰底 + 白卡片 + 蓝色强调),不引任何外链字体 / 图标。 */
:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --fill: #eef1f5;
  --border: #dfe4ec;
  --text: #1c2533;
  --muted: #667085;
  --accent: #2f6feb;
  --accent-hover: #2560d4;
  --accent-soft: #e8f0fe;
  --accent-border: #b9d0fb;
  --danger: #d33f3f;
  --danger-soft: #fdecec;
  --ok: #17884f;
  --ok-soft: #e6f6ed;
  --warn: #b86a00;
  --warn-soft: #fff4e0;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  word-break: break-word;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; line-height: 1.35; margin: 0 0 .5rem; }
h2 { font-size: 1.2rem; margin: 0 0 .75rem; }
h3 { font-size: 1.05rem; margin: 0 0 .4rem; }
p { margin: 0 0 .75rem; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- 顶栏 ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .bar {
  max-width: 980px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); white-space: nowrap; }
.brand span { color: var(--accent); }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--text);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
.nav a:hover { background: var(--fill); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.account { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.account .who { font-weight: 600; max-width: 10em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 布局 ---------- */
.wrap { max-width: 980px; margin: 0 auto; padding: 16px 16px 48px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.hint { color: var(--muted); font-size: .92rem; margin-top: 4px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 200px; min-width: 0; }
.mt { margin-top: 12px; }
.sep { height: 1px; background: var(--border); margin: 14px 0; border: 0; }

/* ---------- 按钮 / 表单 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: var(--fill); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--danger); border-color: #f0c2c2; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.on { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent); font-weight: 600; }
.btn.small { min-height: 36px; padding: 4px 12px; font-size: .92rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

label.field { display: block; margin-bottom: 12px; font-weight: 600; }
label.field > .hint { font-weight: 400; }
input[type=text], input[type=password], input[type=search], select, textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-weight: 400;
}
textarea { min-height: 150px; font-family: Consolas, "Cascadia Mono", monospace; font-size: .92rem; line-height: 1.5; }
input[type=file] { display: block; margin-top: 4px; max-width: 100%; font-size: .95rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-bottom: 12px; }
.check input { width: 22px; height: 22px; margin-top: 4px; flex: none; }

.toolbar { display: grid; grid-template-columns: 1fr; gap: 10px; }
.toolbar .field { margin: 0; }
@media (min-width: 720px) {
  .toolbar { grid-template-columns: 2fr 1.2fr 1fr auto; align-items: end; }
}

/* ---------- 提示条 ---------- */
.notice { padding: 10px 14px; border-radius: 10px; margin: 10px 0; border: 1px solid transparent; }
.notice.err { background: var(--danger-soft); color: #8f2121; border-color: #f3c4c4; }
.notice.ok { background: var(--ok-soft); color: #0e6a3a; border-color: #bfe6cf; }
.notice.info { background: var(--accent-soft); color: #1d4fb8; border-color: var(--accent-border); }
.notice.warn { background: var(--warn-soft); color: #7a4600; border-color: #f2d9a8; }
.notice ul { margin: 4px 0 0; padding-left: 1.2rem; }

/* ---------- 标签 ---------- */
.chip {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.6;
  white-space: nowrap;
}
.chip.series { background: var(--accent-soft); color: var(--accent); }
.chip.s-pending { background: var(--warn-soft); color: var(--warn); }
.chip.s-published { background: var(--ok-soft); color: var(--ok); }
.chip.s-rejected, .chip.s-hidden { background: var(--danger-soft); color: var(--danger); }
.chip.s-withdrawn { background: var(--fill); color: var(--muted); }
.chip.deck { background: var(--ok-soft); color: var(--ok); }

/* ---------- 列表卡片 ---------- */
.rule-list { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .rule-list { grid-template-columns: 1fr 1fr; } }
.rule-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--text);
  box-shadow: var(--shadow);
}
.rule-card:hover { border-color: var(--accent-border); background: #fbfdff; text-decoration: none; }
.rule-card .title { font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; }
.rule-card .sum { color: var(--muted); font-size: .95rem; margin: 4px 0 8px; min-height: 1.5em; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: .9rem; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.empty { text-align: center; color: var(--muted); padding: 32px 8px; }

/* ---------- 详情:规则逐条 ---------- */
.notes { white-space: pre-wrap; background: var(--fill); border-radius: 10px; padding: 12px 14px; }
.cardchips { display: flex; flex-wrap: wrap; gap: 6px; }
.card-name {
  display: inline-block;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: #1d4fb8;
  border: 1px solid var(--accent-border);
  font-weight: 600;
  font-size: .95em;
  line-height: 1.5;
}
.card-name.unknown { background: var(--fill); border-color: var(--border); color: var(--muted); font-weight: 400; }

/* ---------- 详情:对应卡组(10-04)---------- */
.deck-code {
  display: block;
  background: var(--fill);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 8px;
  word-break: break-all;
  font-size: .9rem;
  line-height: 1.5;
  cursor: text;
  user-select: all;
}
details.deck-list { margin-top: 10px; }
details.deck-list > summary { color: var(--accent); }
.deck-sec { margin: 6px 0 12px; }
.deck-sec-title { font-weight: 600; color: var(--muted); font-size: .92rem; margin-bottom: 6px; }
.deck-card { display: inline-flex; align-items: center; gap: 2px; }
.deck-n { color: var(--muted); font-size: .88rem; font-weight: 600; }
.offscreen { position: fixed; top: -1000px; left: -1000px; width: 1px; height: 1px; opacity: 0; }
.rule-item { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; overflow: hidden; background: #fff; }
.rule-item .head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px; background: var(--fill); }
.rule-item .head .no { font-weight: 700; color: var(--muted); }
.rule-item .head .rid { color: var(--muted); font-size: .85rem; font-family: Consolas, monospace; }
.rule-item .body { padding: 10px 12px; }
.rule-item .line { margin: 0 0 8px; padding-left: 3.6em; position: relative; }
.rule-item .tag { position: absolute; left: 0; top: 0; font-weight: 700; color: var(--muted); }
.rule-item ul { margin: 0; padding-left: 1.1rem; }
.rule-item li { margin: 2px 0; }
.rule-item .why { color: var(--text); }
.chip.t-never { background: var(--danger-soft); color: var(--danger); }
.chip.t-first { background: var(--ok-soft); color: var(--ok); }
.chip.t-pick { background: var(--accent-soft); color: var(--accent); }
.chip.t-position { background: var(--warn-soft); color: var(--warn); }
.chip.t-unknown { background: var(--fill); color: var(--muted); }
.chip.t-place { background: #efe9fd; color: #6a3fc8; }
.chip.t-answer { background: #e0f4f6; color: #0b7a85; }
.chip.t-line { background: #fdebf3; color: #b3286f; }
.rule-item ol.steps { list-style: none; margin: 0; padding: 0; }
.rule-item ol.steps > li { margin: 3px 0; }
.unrec { color: var(--muted); font-size: .9rem; margin: 4px 0 0; }
pre.raw {
  margin: 6px 0 0;
  padding: 10px 12px;
  background: #f7f8fa;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: auto;
  max-height: 360px;
  font-size: .85rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}
details > summary { cursor: pointer; padding: 6px 0; font-weight: 600; }

/* ---------- 账号页 ---------- */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.list-row {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.list-row:first-child { border-top: 0; }
.list-row .main { flex: 1 1 220px; min-width: 0; }
.mono { font-family: Consolas, "Cascadia Mono", monospace; letter-spacing: .5px; }

/* ---------- 积分 ---------- */
.account .pts {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  font-size: .92rem;
  font-weight: 600;
  white-space: nowrap;
}
.account .pts:hover { text-decoration: none; background: #dbe8fd; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.price { background: var(--warn-soft); color: var(--warn); }
.chip.free { background: var(--ok-soft); color: var(--ok); }
.row.center { justify-content: center; }
.locked-box {
  border: 2px dashed var(--accent-border);
  background: #fbfdff;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.locked-box .lock-title { font-weight: 700; font-size: 1.1rem; margin: 10px 0 4px; }
.skel { display: grid; gap: 8px; max-width: 420px; margin: 0 auto; }
.skel i { display: block; height: 12px; border-radius: 6px; background: var(--fill); }
.skel i:nth-child(1) { width: 92%; }
.skel i:nth-child(2) { width: 76%; }
.skel i:nth-child(3) { width: 84%; }
#points { scroll-margin-top: 72px; }
.bal { font-size: 1rem; }
.bal .num { font-size: 2.6rem; font-weight: 700; color: var(--accent); line-height: 1.1; }
.today { display: grid; gap: 10px; }
.today-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; }
.today-row .tv { color: var(--muted); font-size: .95rem; text-align: right; }
.meter { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.meter.full > i { background: var(--ok); }
.delta { font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.delta.pos { color: var(--ok); }
.delta.neg { color: var(--danger); }
.list-row .amt { text-align: right; flex: none; }
.list-row.earn .delta { flex: none; }
ul.plain { margin: 0; padding-left: 1.2rem; }
ul.plain li { margin: 4px 0; }

/* ---------- 版本号、评论、改进建议、作者管理 ---------- */
.ver {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.7;
  white-space: nowrap;
}
.chip.adopted { background: var(--ok-soft); color: var(--ok); }
#comments { scroll-margin-top: 72px; }
@media (max-width: 480px) { #comments { scroll-margin-top: 120px; } }
.comment { border-top: 1px solid var(--border); padding: 12px 0; }
.comment:first-child { border-top: 0; padding-top: 4px; }
.comment.adopted { border-left: 3px solid var(--ok); padding-left: 12px; }
.c-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.c-head .floor { font-weight: 700; color: var(--muted); min-width: 3em; }
.c-head .c-user { font-weight: 600; max-width: 14em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-head .c-time { margin-left: auto; color: var(--muted); font-size: .88rem; }
.c-body { white-space: pre-wrap; margin: 6px 0 8px; }
.c-sug { border: 1px solid var(--accent-border); background: #fbfdff; border-radius: 10px; padding: 2px 12px 10px; margin: 6px 0 8px; }
.c-sug > summary { color: var(--accent); }
.c-sug .rule-item:last-child { margin-bottom: 0; }
.c-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.composer { border-top: 2px solid var(--border); margin-top: 10px; padding-top: 14px; }
textarea.plain { font-family: inherit; font-size: 1rem; line-height: 1.6; min-height: 110px; }
.count { color: var(--muted); font-size: .9rem; text-align: right; margin: -6px 0 8px; }
.count.over { color: var(--danger); font-weight: 700; }
details.sug-input, details.upd { border: 1px solid var(--border); border-radius: 10px; padding: 2px 12px 10px; margin: 8px 0 12px; background: #fff; }
details.sug-input > summary, details.upd > summary { color: var(--accent); }
.rule-item.bad { border-color: #f3c4c4; box-shadow: 0 0 0 2px var(--danger-soft); }
.rule-item.bad .head { background: var(--danger-soft); }
.notice .hint { color: inherit; opacity: .85; }
.author-panel { border-color: var(--accent-border); }

/* ---------- 弹窗 ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, .45);
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 16px;
}
.modal {
  background: var(--surface);
  border-radius: 14px;
  width: 100%;
  max-width: 460px;
  margin: 4vh auto;
  padding: 18px;
  box-shadow: 0 12px 40px rgba(16, 24, 40, .25);
}
.modal .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.modal .x { border: 0; background: transparent; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 4px 10px; color: var(--muted); border-radius: 8px; }
.modal .x:hover { background: var(--fill); }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs .btn { flex: 1; }
.progress { height: 8px; background: var(--fill); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.progress > i { display: block; height: 100%; width: 30%; background: var(--accent); border-radius: 999px; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -30%; } 100% { margin-left: 100%; } }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #1c2533;
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  z-index: 60;
  max-width: calc(100vw - 32px);
  box-shadow: 0 6px 20px rgba(16, 24, 40, .3);
}
.foot { max-width: 980px; margin: 0 auto; padding: 0 16px 32px; color: var(--muted); font-size: .88rem; }

@media (max-width: 480px) {
  body { font-size: 17px; }
  .wrap { padding: 12px 16px 40px; }
  .card { padding: 14px; }
  .btn { padding: 8px 14px; }
  .nav { order: 3; flex-basis: 100%; }
  .account { margin-left: auto; }
  .account .who { max-width: 6em; }
  .bal .num { font-size: 2.2rem; }
}

/* ---------- 卡组库(10-07,decks.html)---------- */
.nowrap { white-space: nowrap; }
.dk-filters { display: grid; gap: 12px; }
.dk-filters .field { margin: 0; }
.dk-filters .hint { margin: 0; }
.seg { display: flex; gap: 0; flex-wrap: wrap; }
.seg .btn { border-radius: 0; margin-left: -1px; flex: 1 1 0; min-width: 0; padding: 8px 10px; }
.seg .btn:first-child { border-radius: 10px 0 0 10px; margin-left: 0; }
.seg .btn:last-child { border-radius: 0 10px 10px 0; }
.seg .btn.on { position: relative; z-index: 1; }
.dk-search { position: relative; }
.dk-search label.field { margin-bottom: 0; }
.dk-sugg {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 30;
  margin: 4px 0 0;
  padding: 4px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .14);
  max-height: 340px;
  overflow-y: auto;
}
.dk-sugg li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; min-height: 40px; }
.dk-sugg li.on, .dk-sugg li:hover { background: var(--accent-soft); }
.dk-sugg li.none { color: var(--muted); cursor: default; background: transparent; }
.dk-sugg .kind { flex: none; font-size: .78rem; padding: 0 8px; border-radius: 999px; background: var(--fill); color: var(--muted); line-height: 1.7; }
.dk-sugg .kind.arch { background: var(--accent-soft); color: var(--accent); }
.dk-sugg .lbl { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-sugg .sub { color: var(--muted); font-size: .88rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-sugg .cnt { margin-left: auto; flex: none; color: var(--muted); font-size: .85rem; }
.dk-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.dk-tags:empty { display: none; }
.tagchip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 2px 0 12px;
  border-radius: 999px;
  background: #f1f4f8;
  border: 1px solid var(--border);
  font-size: .92rem;
  max-width: 100%;
}
.tagchip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tagchip.arch { background: var(--accent-soft); border-color: var(--accent-border); color: #1d4fb8; }
.tagchip .x { border: 0; background: transparent; cursor: pointer; font-size: 1.2rem; line-height: 1; min-width: 32px; min-height: 32px; border-radius: 999px; color: var(--muted); }
.tagchip .x:hover { background: rgba(16, 24, 40, .08); color: var(--text); }
.dk-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 720px) {
  .dk-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
  .dk-filters .seg, .dk-filters .dk-tags, .dk-filters .hint { grid-column: 1 / -1; }
  .seg .btn { flex: 0 1 auto; padding: 8px 20px; }
}
.dk-count { margin: 0 0 10px; }
.dk-list { display: grid; gap: 12px; }
.dk-list > .card { margin-bottom: 0; }

.dk-deck { padding: 14px 16px; }
.dk-deck.st-owned { border-left: 4px solid var(--ok); }
.dk-deck.st-craftable { border-left: 4px solid var(--accent); }
.dk-deck.st-short { border-left: 4px solid #e6b45a; }
.dk-head { display: flex; gap: 12px; align-items: flex-start; }
.dk-cover { flex: none; width: 52px; }
.dk-title { flex: 1 1 auto; min-width: 0; }
.dk-titleline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.dk-name {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.dk-name:hover { color: var(--accent); text-decoration: underline; }
.dk-en { color: var(--muted); font-size: .9rem; }
.dk-st { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.dk-st.owned { background: var(--ok-soft); color: var(--ok); }
.dk-st.craftable { background: var(--accent-soft); color: var(--accent); }
.dk-st.short { background: var(--warn-soft); color: var(--warn); }
.dk-stats { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 4px; }
.dk-stat { display: inline-flex; align-items: baseline; gap: 4px; }
.dk-stat b { font-size: 1.05rem; }
.dk-stat small { color: var(--muted); font-size: .82rem; order: -1; }
.dk-stat.up b { color: var(--ok); }
.dk-stat.down b { color: var(--danger); }
.dk-line { margin: 10px 0 0; padding: 6px 10px; border-radius: 8px; font-size: .95rem; background: var(--fill); }
.dk-line.ok { background: var(--ok-soft); color: #0e6a3a; }
.dk-line.craftable { background: var(--accent-soft); color: #1d4fb8; }
.dk-line.short { background: var(--warn-soft); color: #7a4600; }
.dk-line .hint { display: inline; margin-left: 4px; color: inherit; opacity: .8; }
.dk-sec { margin-top: 12px; }
.dk-sec-title { font-weight: 600; color: var(--muted); font-size: .9rem; margin-bottom: 6px; }
.dk-sec-miss { color: var(--danger); }
.dk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 6px; }
.dk-card { position: relative; min-width: 0; }
.dk-pic, .dk-cover {
  display: block;
  aspect-ratio: 100 / 146;
  border-radius: 4px;
  overflow: hidden;
  background: var(--fill);
  border: 1px solid var(--border);
}
.dk-pic img, .dk-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dk-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 3px;
  font-size: .68rem;
  line-height: 1.25;
  text-align: center;
  color: #1d4fb8;
  background: var(--accent-soft);
  overflow: hidden;
  word-break: break-all;
}
.dk-card.miss .dk-pic { filter: grayscale(1); opacity: .45; }
.dk-n, .dk-miss {
  position: absolute;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.4;
  padding: 0 5px;
  border-radius: 6px;
  pointer-events: none;
}
.dk-n { right: 2px; bottom: 2px; background: rgba(28, 37, 51, .82); color: #fff; }
.dk-miss { left: 2px; top: 2px; background: var(--danger); color: #fff; }
.dk-actions { margin-top: 12px; }
@media (max-width: 480px) {
  .dk-deck { padding: 12px; }
  .dk-grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; }
  .dk-cover { width: 44px; }
  .dk-stats { gap: 2px 12px; }
  .dk-name { font-size: 1.05rem; }
}

/* ---------- 模型区(10-07,models.html / model.html)---------- */
.chip.net { background: #efe9fd; color: #6a3fc8; }
.stat-line { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: .92rem; margin: 0 0 8px; }
.stat-line small { color: var(--muted); font-size: .88rem; }
.stat-line b { color: var(--text); font-weight: 700; }
.mstats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 4px; }
.mstat { background: var(--fill); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.mstat b { display: block; font-size: 1.3rem; line-height: 1.3; overflow-wrap: anywhere; }
.mstat small { color: var(--muted); font-size: .88rem; }
ol.howto { margin: 0 0 8px; padding-left: 1.4rem; }
ol.howto li { margin: 4px 0; }
code.sha { font-size: .82rem; line-height: 1.5; word-break: break-all; color: var(--muted); cursor: text; user-select: all; }
@media (max-width: 480px) {
  /* 顶栏五个入口(规则库 / 卡组库 / 模型区 / 积分规则 / 我的):窄屏收紧间距,放不下就折行,不出横向滚动 */
  .nav { flex-wrap: wrap; gap: 2px; }
  .nav a { padding: 6px 8px; }
  .mstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
