/* ============================================================
   崩一把 · 样式表
   主题：崩坏：星穹铁道 —— 深空蓝黑 + 鎏金 + 星轨青
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  --bg: #060911;
  --bg-2: #0b1220;
  --bg-3: #101a2e;
  --panel: rgba(13, 21, 38, 0.72);
  --panel-solid: #0f1829;
  --line: rgba(120, 160, 220, 0.16);
  --line-strong: rgba(184, 135, 60, 0.42);
  --gold: #e8c078;
  --gold-deep: #b8873c;
  --cyan: #6fd6f2;
  --text: #e6edf8;
  --muted: #8b9dbb;
  --dim: #5d6c88;

  --ok-bg: rgba(31, 107, 71, 0.55);
  --ok-line: #46d08a;
  --ok-text: #b6f5d1;
  --mid-bg: rgba(122, 96, 26, 0.5);
  --mid-line: #e0b34a;
  --mid-text: #ffe6a8;
  --no-bg: rgba(38, 46, 66, 0.6);
  --no-line: #46536e;
  --no-text: #93a3c0;

  --radius: 12px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  --serif: "Songti SC", "SimSun", "Noto Serif SC", Georgia, serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
}

html[data-theme="light"] {
  --bg: #eef2f9;
  --bg-2: #e3eaf5;
  --bg-3: #ffffff;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-solid: #ffffff;
  --line: rgba(38, 66, 110, 0.14);
  --line-strong: rgba(150, 108, 38, 0.42);
  --gold: #a9772a;
  --gold-deep: #8a5f1d;
  --cyan: #1a86a8;
  --text: #16233a;
  --muted: #556785;
  --dim: #74849e;
  --ok-bg: rgba(198, 240, 218, 0.85);
  --ok-line: #2c9c68;
  --ok-text: #14512f;
  --mid-bg: rgba(252, 233, 178, 0.85);
  --mid-line: #c08c15;
  --mid-text: #6b4a05;
  --no-bg: rgba(226, 232, 242, 0.9);
  --no-line: #b9c4d6;
  --no-text: #63718a;
  --shadow: 0 18px 44px rgba(30, 52, 90, 0.16);
}

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
::selection { background: rgba(232, 192, 120, 0.32); }

/* ---------- 星轨背景 ---------- */
#stars {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.aurora {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(900px 620px at 78% -6%, rgba(232, 192, 120, 0.14), transparent 62%),
    radial-gradient(760px 520px at 6% 12%, rgba(111, 214, 242, 0.13), transparent 60%),
    radial-gradient(1100px 760px at 50% 118%, rgba(88, 62, 168, 0.16), transparent 66%);
}
html[data-theme="light"] .aurora {
  background:
    radial-gradient(900px 620px at 78% -6%, rgba(232, 192, 120, 0.34), transparent 62%),
    radial-gradient(760px 520px at 6% 12%, rgba(111, 214, 242, 0.3), transparent 60%);
}

/* ---------- 启动遮罩 ---------- */
#boot {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  padding: 24px; background: var(--bg);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
#boot.leaving { opacity: 0; visibility: hidden; }
.boot__card { width: min(100%, 340px); text-align: center; }
.boot__emblem {
  position: relative; width: 84px; height: 84px; margin: 0 auto 22px;
  border: 1px solid var(--line-strong); border-radius: 50%;
  box-shadow: inset 0 0 28px rgba(111, 214, 242, 0.18), 0 0 36px rgba(232, 192, 120, 0.14);
}
.boot__emblem::before, .boot__emblem::after {
  content: ""; position: absolute; inset: 10px; border: 1px solid rgba(111, 214, 242, 0.5);
  border-radius: 50%; animation: ripple 1.9s ease-in-out infinite;
}
.boot__emblem::after { inset: 26px; border-color: var(--gold); animation-delay: -0.95s; }
@keyframes ripple {
  0%, 100% { opacity: 0.4; transform: scale(0.84); }
  50% { opacity: 1; transform: scale(1.08); }
}
.boot__eyebrow { font: 700 0.66rem/1.4 Georgia, serif; letter-spacing: 0.26em; color: var(--gold); }
.boot__card h1 { font: 700 1.6rem/1.3 var(--serif); letter-spacing: 0.14em; margin: 6px 0 8px; }
.boot__msg { color: var(--muted); font-size: 0.78rem; min-height: 1.6em; }
.boot__bar {
  height: 4px; margin-top: 14px; border-radius: 99px; overflow: hidden;
  background: rgba(120, 160, 220, 0.16);
}
.boot__bar i { display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--gold)); transition: width 0.25s ease; }

/* ---------- 主框架 ---------- */
#app { position: relative; z-index: 2; display: flex; flex-direction: column; min-height: 100vh; }
#view { flex: 1; width: min(1220px, 100%); margin: 0 auto; padding: 18px 18px 40px; }
#view.is-game { padding-bottom: 128px; }

/* ---------- 顶栏 ---------- */
#topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  padding: 10px max(18px, calc((100% - 1220px) / 2 + 18px));
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand__mark {
  width: 9px; height: 9px; border-radius: 50%;
  background: linear-gradient(140deg, var(--cyan), var(--gold));
  box-shadow: 0 0 12px rgba(232, 192, 120, 0.8);
  transform: translateY(-1px);
}
.brand__cn { font: 700 1.12rem/1 var(--serif); letter-spacing: 0.16em; color: var(--gold); }
.brand__en { font: 600 0.6rem/1 Georgia, serif; letter-spacing: 0.22em; color: var(--dim); }
.mainnav { display: flex; gap: 4px; margin-left: auto; }
.mainnav a {
  padding: 6px 13px; border-radius: 999px; font-size: 0.85rem; color: var(--muted);
  border: 1px solid transparent; transition: 0.2s;
}
.mainnav a:hover { color: var(--text); border-color: var(--line); }
.mainnav a.active { color: var(--gold); border-color: var(--line-strong); background: rgba(232, 192, 120, 0.08); }
.topbar__right { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.78rem; color: var(--muted); transition: 0.2s;
}
.icon-btn:hover { color: var(--gold); border-color: var(--line-strong); }
.theme-dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(140deg, var(--cyan), var(--gold)); }

/* ---------- 通用组件 ---------- */
.panel {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow); position: relative;
}
.panel::before {
  content: ""; position: absolute; inset: 6px; border-radius: calc(var(--radius) - 5px);
  border: 1px solid rgba(232, 192, 120, 0.08); pointer-events: none;
}
.eyebrow {
  font: 700 0.62rem/1.4 Georgia, serif; letter-spacing: 0.26em;
  color: var(--gold); text-transform: uppercase;
}
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font: 700 1.18rem/1.3 var(--serif); letter-spacing: 0.1em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; border-radius: 999px; font-size: 0.86rem; font-weight: 600;
  border: 1px solid var(--line-strong); color: var(--gold);
  background: rgba(232, 192, 120, 0.08); transition: 0.2s;
}
.btn:hover { background: rgba(232, 192, 120, 0.18); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--ghost { border-color: var(--line); color: var(--muted); background: transparent; }
.btn--ghost:hover { color: var(--text); border-color: var(--line-strong); background: rgba(120, 160, 220, 0.08); }
.btn--primary {
  color: #1a1206; border-color: transparent;
  background: linear-gradient(120deg, #f3d494, #e8c078 45%, #cf9c4a);
  box-shadow: 0 10px 26px rgba(232, 192, 120, 0.24);
}
.btn--primary:hover { box-shadow: 0 14px 32px rgba(232, 192, 120, 0.36); }
.btn--danger { border-color: rgba(214, 106, 122, 0.5); color: #ee9aa8; background: rgba(214, 106, 122, 0.1); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 0.76rem; color: var(--muted); transition: 0.18s;
}
button.chip:hover { color: var(--text); border-color: var(--line-strong); }
button.chip.on { color: #1a1206; background: linear-gradient(120deg, #f3d494, #cf9c4a); border-color: transparent; font-weight: 600; }

/* ---------- 首页 ---------- */
.home-hero { position: relative; overflow: hidden; margin-bottom: 22px; padding: 46px 30px 40px; text-align: center; }
.home-hero__glow {
  position: absolute; width: 460px; height: 460px; border-radius: 50%;
  filter: blur(70px); opacity: 0.5; pointer-events: none;
}
.home-hero__glow--a { left: -120px; top: -140px; background: rgba(111, 214, 242, 0.4); }
.home-hero__glow--b { right: -130px; bottom: -180px; background: rgba(232, 192, 120, 0.35); }
.home-hero__inner { position: relative; z-index: 2; }
.home-hero h1 {
  font: 700 clamp(2.6rem, 8vw, 4.2rem)/1.1 var(--serif);
  letter-spacing: 0.14em; margin: 10px 0 4px;
  background: linear-gradient(180deg, #fff 8%, var(--gold) 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 12px 40px rgba(232, 192, 120, 0.28);
}
.home-hero__sub { color: var(--muted); font-size: 0.92rem; letter-spacing: 0.08em; }

.hero-figure {
  position: absolute; z-index: 1; bottom: 0; width: 260px; pointer-events: none;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.55));
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
}
.hero-figure--l { left: 2%; }
.hero-figure--r { right: 2%; transform: scaleX(-1); }

.hero-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 30px 0 6px; position: relative; z-index: 3; }
.hero-main {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: min(360px, 88vw); padding: 15px 24px; border-radius: 16px;
  border: 1px solid var(--line-strong); color: var(--gold);
  background: linear-gradient(160deg, rgba(232, 192, 120, 0.16), rgba(111, 214, 242, 0.07));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42), inset 0 0 30px rgba(232, 192, 120, 0.1);
  transition: 0.22s;
}
.hero-main:hover { transform: translateY(-2px); box-shadow: 0 22px 52px rgba(232, 192, 120, 0.24); }
.hero-main strong { font: 700 1.28rem/1.4 var(--serif); letter-spacing: 0.16em; }
.hero-main small { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.14em; }
.hero-sub-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hero-sub {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px;
  border-radius: 12px; border: 1px solid var(--line); background: rgba(120, 160, 220, 0.06);
  font-size: 0.85rem; color: var(--text); transition: 0.2s;
}
.hero-sub:hover { border-color: var(--line-strong); background: rgba(232, 192, 120, 0.1); }

.home-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; margin-bottom: 22px; }
@media (max-width: 900px) { .home-grid { grid-template-columns: 1fr; } }

.notice-list li { border-bottom: 1px dashed var(--line); }
.notice-list li:last-child { border-bottom: none; }
.notice-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 4px; text-align: left; transition: 0.2s;
}
.notice-item:hover { padding-left: 9px; }
.notice-item__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: none; box-shadow: 0 0 8px var(--gold); }
.notice-item__t { flex: 1; font-size: 0.88rem; }
.notice-item__d { font: 600 0.72rem/1 Georgia, serif; color: var(--dim); font-variant-numeric: tabular-nums; }
.notice-item__x { color: var(--dim); font-size: 1.1rem; line-height: 1; transition: transform 0.25s; }
.notice-item.open .notice-item__x { transform: rotate(45deg); color: var(--gold); }
.notice-body { display: none; padding: 0 6px 16px 22px; color: var(--muted); font-size: 0.83rem; }
.notice-body.show { display: block; animation: fadeUp 0.28s ease; }
.notice-body ul { display: grid; gap: 5px; }
.notice-body li::before { content: "▸ "; color: var(--gold); }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat {
  padding: 14px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(120, 160, 220, 0.05);
}
.stat b { display: block; font: 700 1.6rem/1.1 Georgia, serif; color: var(--gold); font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.74rem; color: var(--muted); letter-spacing: 0.06em; }

/* ---------- 页脚 ---------- */
#footer {
  display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between;
  width: min(1220px, 100%); margin: 0 auto; padding: 22px 18px 34px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8rem;
}
#footer h4 { font: 700 0.82rem/1.4 var(--serif); color: var(--text); letter-spacing: 0.1em; margin-bottom: 8px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 14px; }
.footer__links a { color: var(--muted); border-bottom: 1px dashed transparent; }
.footer__links a:hover { color: var(--gold); border-bottom-color: var(--line-strong); }
.footer__col--meta { text-align: right; max-width: 460px; }
.footer__ver { font-family: Georgia, serif; font-variant-numeric: tabular-nums; }
.footer__note { color: var(--dim); font-size: 0.74rem; margin-top: 5px; }

/* ---------- 难度选择 ---------- */
.stage { display: grid; gap: 12px; max-width: 700px; margin: 26px auto 0; }
.stage-head { text-align: center; margin-bottom: 8px; }
.stage-head h1 { font: 700 1.95rem/1.3 var(--serif); letter-spacing: 0.14em; margin: 8px 0 4px; }
.stage-head p { color: var(--muted); font-size: 0.86rem; }
.stage-opt {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 15px 18px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel); transition: 0.2s;
}
.stage-opt:hover { border-color: var(--line-strong); transform: translateX(3px); background: rgba(232, 192, 120, 0.08); }
.stage-opt__icon { width: 40px; height: 40px; flex: none; }
.stage-opt__t { flex: 1; }
.stage-opt__t b { display: block; font-size: 1rem; letter-spacing: 0.08em; }
.stage-opt__t small { color: var(--muted); font-size: 0.78rem; }
.stage-opt__n { font: 600 0.76rem/1 Georgia, serif; color: var(--gold); }
.stage-opt__arrow { color: var(--dim); }

/* ---------- 对局 ---------- */
.gamebar {
  position: sticky; top: 54px; z-index: 30; display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}
.gamebar__title { font: 700 0.96rem/1.3 var(--serif); letter-spacing: 0.1em; }
.gamebar__meta { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.meter {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px;
  border-radius: 999px; border: 1px solid var(--line); font-size: 0.76rem; color: var(--muted);
}
.meter b { color: var(--text); font-family: Georgia, serif; font-variant-numeric: tabular-nums; }

.rules { margin-bottom: 14px; padding: 0; overflow: hidden; }
.rules__toggle {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px;
  text-align: left; font-size: 0.85rem;
}
.rules__toggle b { color: var(--gold); }
.rules__body { display: none; padding: 0 16px 14px; color: var(--muted); font-size: 0.82rem; }
.rules__body.show { display: block; }
.rules__body ul { display: grid; gap: 6px; margin-top: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid; }

.table-scroll { overflow-x: auto; border-radius: var(--radius); }
table.guess { width: 100%; border-collapse: separate; border-spacing: 0 6px; min-width: 1040px; }
table.guess th {
  padding: 8px 10px; text-align: center; font-size: 0.74rem; font-weight: 600;
  color: var(--muted); letter-spacing: 0.06em; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
table.guess th:first-child, table.guess td:first-child { text-align: left; }
table.guess td {
  padding: 9px 10px; text-align: center; font-size: 0.82rem;
  border-top: 1px solid var(--cell-line, var(--line));
  border-bottom: 1px solid var(--cell-line, var(--line));
  background: var(--cell-bg, var(--panel));
  transition: 0.2s;
}
table.guess td:first-child {
  border-left: 1px solid var(--cell-line, var(--line));
  border-radius: 10px 0 0 10px;
}
table.guess td:last-child { border-right: 1px solid var(--cell-line, var(--line)); border-radius: 0 10px 10px 0; }
td.hit   { --cell-bg: var(--ok-bg);  --cell-line: var(--ok-line);  color: var(--ok-text); }
td.part  { --cell-bg: var(--mid-bg); --cell-line: var(--mid-line); color: var(--mid-text); }
td.miss  { --cell-bg: var(--no-bg);  --cell-line: var(--no-line);  color: var(--no-text); }
td.hit .arrow, td.part .arrow { font-weight: 700; }
.cell-avatar { display: flex; align-items: center; gap: 9px; }
.cell-avatar img {
  width: 34px; height: 46px; object-fit: cover; object-position: top center;
  border-radius: 6px; border: 1px solid var(--cell-line, var(--line)); background: rgba(0, 0, 0, 0.25);
}
.cell-avatar b { font-size: 0.86rem; font-weight: 600; white-space: nowrap; }
.cell-avatar em { font-style: normal; font-size: 0.68rem; color: var(--dim); display: block; }
.icon-cell { display: inline-flex; align-items: center; gap: 5px; }
.icon-cell img { width: 20px; height: 20px; }
.star-row { letter-spacing: 2px; font-size: 0.8rem; }
.star-gold { color: var(--gold); }
.empty-row td {
  padding: 34px 14px; text-align: center; color: var(--dim); font-size: 0.85rem;
  border: 1px dashed var(--line); background: rgba(120, 160, 220, 0.04);
}
.empty-row td:first-child { border-radius: 12px 0 0 12px; }
.empty-row td:last-child { border-radius: 0 12px 12px 0; }

/* 输入区 */
.guess-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--panel); backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}
.guess-dock__inner { width: min(760px, 100%); margin: 0 auto; position: relative; }
.guess-input {
  display: flex; gap: 10px; padding: 6px 6px 6px 8px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(6, 9, 17, 0.55);
}
html[data-theme="light"] .guess-input { background: rgba(255, 255, 255, 0.9); }
.guess-input input {
  flex: 1; min-width: 0; padding: 8px 6px 8px 14px; border: none; background: none; outline: none;
  font-size: 0.92rem;
}
.guess-input input::placeholder { color: var(--dim); }
.autocomplete {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 8px);
  max-height: 320px; overflow-y: auto; padding: 6px;
  border: 1px solid var(--line-strong); border-radius: 14px;
  background: var(--panel-solid); box-shadow: var(--shadow); display: none;
}
.autocomplete.show { display: block; }
.ac-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px;
  border-radius: 9px; text-align: left; transition: 0.15s;
}
.ac-item:hover, .ac-item.on { background: rgba(232, 192, 120, 0.14); }
.ac-item img { width: 28px; height: 38px; object-fit: cover; object-position: top; border-radius: 5px; border: 1px solid var(--line); }
.ac-item__main { flex: 1; min-width: 0; }
.ac-item__main b { font-size: 0.84rem; }
.ac-item__main small { display: block; color: var(--dim); font-size: 0.7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-tag { font-size: 0.62rem; padding: 2px 7px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--gold); flex: none; }
.ac-empty { padding: 14px; text-align: center; color: var(--dim); font-size: 0.8rem; }

/* ---------- 角色图鉴 ---------- */
.roster-tools { display: grid; gap: 12px; margin-bottom: 16px; padding: 16px; }
.search-row { display: flex; gap: 10px; flex-wrap: wrap; }
.search-box {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 200px;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(6, 9, 17, 0.4);
}
html[data-theme="light"] .search-box { background: rgba(255, 255, 255, 0.9); }
.search-box input { flex: 1; min-width: 0; border: none; background: none; outline: none; }
.filter-group { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.filter-group__label { flex: none; width: 58px; padding-top: 5px; font-size: 0.76rem; color: var(--dim); }
.filter-group__opts { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.filter-hint { font-size: 0.74rem; color: var(--dim); }
.roster-count { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.roster-count b { color: var(--gold); font-family: Georgia, serif; font-size: 1.05rem; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.card {
  position: relative; overflow: hidden; padding: 0; text-align: left;
  border-radius: 12px; border: 1px solid var(--line); background: var(--panel);
  transition: 0.22s;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4); }
.card__pic { position: relative; aspect-ratio: 376 / 460; background: linear-gradient(180deg, rgba(120, 160, 220, 0.1), transparent); }
.card__pic img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.card__rarity { position: absolute; top: 6px; left: 6px; font-size: 0.62rem; padding: 1px 7px; border-radius: 99px; color: #1a1206; background: linear-gradient(120deg, #f3d494, #cf9c4a); font-weight: 700; }
.card__el { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); }
.card__info { padding: 8px 10px 11px; }
.card__info b { display: block; font-size: 0.85rem; letter-spacing: 0.02em; }
.card__info small { color: var(--dim); font-size: 0.7rem; }
.card__path { position: absolute; bottom: 52px; left: 8px; width: 20px; height: 20px; opacity: 0.9; }

/* 详情弹窗 */
.modal-back {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  padding: 20px; background: rgba(3, 5, 11, 0.72); backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}
.modal {
  width: min(880px, 100%); max-height: 88vh; overflow-y: auto;
  border: 1px solid var(--line-strong); border-radius: 16px;
  background: var(--panel-solid); box-shadow: var(--shadow);
  animation: fadeUp 0.26s ease;
}
.modal__close { position: absolute; top: 12px; right: 14px; font-size: 1.4rem; line-height: 1; color: var(--muted); z-index: 3; }
.modal__close:hover { color: var(--gold); }
.detail { display: grid; grid-template-columns: 280px 1fr; gap: 0; }
@media (max-width: 700px) { .detail { grid-template-columns: 1fr; } }
.detail__art { position: relative; background: linear-gradient(180deg, rgba(120, 160, 220, 0.14), rgba(6, 9, 17, 0.2)); }
.detail__art img { width: 100%; height: 100%; max-height: 420px; object-fit: cover; object-position: top center; }
.detail__body { padding: 22px 24px; }
.detail__body h3 { font: 700 1.5rem/1.3 var(--serif); letter-spacing: 0.08em; }
.detail__title { color: var(--gold); font-size: 0.82rem; margin-top: 3px; }
.detail__tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 14px; }
.detail__rows { display: grid; gap: 0; border-top: 1px solid var(--line); }
.drow { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 0.83rem; }
.drow dt { flex: none; width: 74px; color: var(--dim); }
.drow dd { flex: 1; color: var(--text); }
.detail__lore { margin-top: 16px; padding: 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(120, 160, 220, 0.05); color: var(--muted); font-size: 0.82rem; }
.detail__lore h4 { font: 700 0.8rem/1.4 var(--serif); color: var(--gold); letter-spacing: 0.12em; margin-bottom: 6px; }

/* ---------- 双人对战 ---------- */
.duel-modes { display: grid; gap: 12px; max-width: 700px; margin: 26px auto 0; }
.code-display {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 22px; margin: 16px 0; border-radius: 14px;
  border: 1px dashed var(--line-strong); background: rgba(232, 192, 120, 0.06);
}
.code-display b { font: 700 2.1rem/1 Georgia, serif; letter-spacing: 0.34em; color: var(--gold); }
.duel-board { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 760px) { .duel-board { grid-template-columns: 1fr; } }
.duel-side { padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.duel-side.turn { border-color: var(--line-strong); box-shadow: 0 0 0 1px var(--line-strong), 0 14px 34px rgba(232, 192, 120, 0.16); }
.duel-side h4 { font: 700 1rem/1.4 var(--serif); letter-spacing: 0.1em; margin-bottom: 4px; }
.duel-side .duel-n { font: 700 1.9rem/1.2 Georgia, serif; color: var(--gold); }
.duel-side small { color: var(--muted); font-size: 0.76rem; }

/* 对手的推演记录：左侧青色标记，便于区分先后手 */
table.guess tr.row.opp td:first-child { box-shadow: inset 3px 0 0 var(--cyan); }

/* ---------- 账户 / 人机验证 ---------- */
.account-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--dim);
  box-shadow: 0 0 0 3px rgba(111, 214, 242, 0.1); transition: 0.2s;
}
#account-btn.is-on .account-dot { background: var(--cyan); box-shadow: 0 0 0 3px rgba(111, 214, 242, 0.22); }

.auth-panel { max-width: 620px; margin: 24px auto 0; padding: 26px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.auth-current {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; margin-bottom: 16px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: rgba(232, 192, 120, 0.07);
}
.auth-current b { font-size: 0.9rem; }
.auth-current span { flex: 1; min-width: 120px; color: var(--muted); font-size: 0.78rem; }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 6px; }
.auth-form label > span,
.captcha-field > span { font-size: 0.76rem; color: var(--dim); letter-spacing: 0.06em; }
.auth-form input {
  width: 100%; padding: 10px 16px; border-radius: 999px; font-size: 0.9rem; color: var(--text);
  border: 1px solid var(--line); background: rgba(6, 9, 17, 0.5); outline: none; transition: 0.18s;
}
html[data-theme="light"] .auth-form input { background: rgba(255, 255, 255, 0.9); }
.auth-form input:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(232, 192, 120, 0.12); }
.auth-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.captcha-field { display: grid; gap: 8px; }
.captcha-loading { padding: 10px 0; font-size: 0.78rem; color: var(--dim); }
.captcha-fail { font-size: 0.78rem; color: var(--muted); line-height: 1.9; }

/* ---------- 匹配等待 ---------- */
.queue-dots { display: flex; justify-content: center; gap: 10px; }
.queue-dots i {
  width: 10px; height: 10px; border-radius: 50%; background: var(--gold);
  animation: queuePulse 1.1s ease-in-out infinite;
}
.queue-dots i:nth-child(2) { animation-delay: 0.18s; }
.queue-dots i:nth-child(3) { animation-delay: 0.36s; }
@keyframes queuePulse {
  0%, 100% { transform: translateY(0) scale(0.7); opacity: 0.35; }
  50% { transform: translateY(-6px) scale(1); opacity: 1; }
}
.guess-input input[disabled] { opacity: 0.55; }

/* ---------- 鸣谢 ---------- */
.credits { max-width: 700px; margin: 20px auto 0; padding: 26px; }
.credits h1 { font: 700 1.7rem/1.3 var(--serif); letter-spacing: 0.14em; margin: 8px 0 18px; }
.credits h4 { font: 700 0.84rem/1.4 var(--serif); color: var(--gold); letter-spacing: 0.16em; margin: 18px 0 6px; }
.credits p { color: var(--muted); font-size: 0.85rem; }
.credits .tail { margin-top: 26px; text-align: center; color: var(--dim); letter-spacing: 0.2em; }

/* ---------- 结果弹窗 ---------- */
.result { width: min(560px, 100%); padding: 30px 26px; text-align: center; }
.result__badge { width: 76px; height: 76px; margin: 0 auto 14px; }
.result h3 { font: 700 1.7rem/1.3 var(--serif); letter-spacing: 0.14em; margin-bottom: 6px; }
.result p { color: var(--muted); font-size: 0.86rem; }
.result__answer { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 18px 0; padding: 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(232, 192, 120, 0.07); }
.result__answer img { width: 68px; height: 92px; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid var(--line); }
.result__answer div { text-align: left; }
.result__answer b { display: block; font-size: 1.1rem; letter-spacing: 0.08em; }
.result__answer small { color: var(--muted); font-size: 0.76rem; }
.result__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.result__stats { display: flex; gap: 22px; justify-content: center; margin-top: 14px; }
.result__stats div { text-align: center; }
.result__stats b { display: block; font: 700 1.3rem/1.2 Georgia, serif; color: var(--gold); }
.result__stats span { font-size: 0.72rem; color: var(--dim); }
.share-box { margin-top: 14px; padding: 12px; border-radius: 10px; border: 1px dashed var(--line); color: var(--dim); font-size: 0.72rem; text-align: left; white-space: pre-wrap; word-break: break-all; }

/* ---------- 提示条 ---------- */
#toast-root { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 95; display: grid; gap: 8px; }
.toast {
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--panel-solid); color: var(--text); font-size: 0.82rem;
  box-shadow: var(--shadow); animation: fadeUp 0.24s ease;
}
.toast.warn { border-color: rgba(224, 179, 74, 0.6); color: var(--mid-text); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  body { font-size: 14px; }
  .brand__en { display: none; }
  .mainnav a { padding: 6px 9px; font-size: 0.78rem; }
  .theme-label { display: none; }
  .hero-figure { width: 150px; opacity: 0.5; }
  .home-hero { padding: 30px 16px 26px; }
  #view { padding: 14px 12px 40px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 9px; }
  .footer__col--meta { text-align: left; }
  .guess-dock { padding-left: 12px; padding-right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}