/* ============ 王者立牌分享站 · 前端样式 ============ */
:root {
  --bg: #0a0b10;
  --bg-2: #12141d;
  --panel: #161822;
  --panel-2: #1c1f2b;
  --line: rgba(216, 178, 90, 0.16);
  --line-soft: rgba(255, 255, 255, 0.07);
  --gold: #d8b25a;
  --gold-light: #f3d894;
  --gold-deep: #a8842f;
  --text: #eae7e0;
  --muted: #94918a;
  --danger: #e5544b;
  --ok: #4bb36a;
  --radius: 18px;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select, button { font-size: 15px; }

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 480px at 15% -10%, rgba(216, 178, 90, 0.16), transparent 65%),
    radial-gradient(700px 420px at 88% 8%, rgba(120, 70, 200, 0.16), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(30, 60, 140, 0.22), transparent 65%);
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}
.wrap.narrow { max-width: 640px; padding-top: 34px; padding-bottom: 60px; }

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 11, 16, 0.82);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  font-weight: 800;
  font-size: 20px;
  color: #23190a;
  background: linear-gradient(150deg, #f6dc9e, #c99f45 60%, #9a7524);
  box-shadow: 0 6px 18px rgba(216, 178, 90, 0.3);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 17px; letter-spacing: .5px; }
.brand-text em { font-style: normal; font-size: 11px; color: var(--muted); letter-spacing: 2px; }

.nav { display: flex; gap: 6px; }
.nav-link {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--muted);
  transition: .18s;
}
.nav-link:hover { color: var(--gold-light); background: rgba(216, 178, 90, 0.08); }
.nav-link.is-active { color: var(--gold-light); background: rgba(216, 178, 90, 0.12); }

/* ---------- Hero ---------- */
.hero { padding: 46px 0 26px; text-align: center; }
.hero h1 {
  font-size: clamp(26px, 4.2vw, 40px);
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.3;
}
.hero h1 .gold {
  background: linear-gradient(120deg, #f7e0a8, #d8b25a 45%, #a8842f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub { margin-top: 12px; color: var(--muted); font-size: 15px; }
.hero-stats {
  margin: 26px auto 0;
  display: inline-flex;
  gap: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(22, 24, 34, 0.7);
}
.hero-stats .stat {
  padding: 10px 26px;
  text-align: center;
  border-right: 1px solid var(--line-soft);
}
.hero-stats .stat:last-child { border-right: 0; }
.hero-stats b {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
}
.hero-stats span { font-size: 12px; color: var(--muted); }

/* ---------- Notice / Toast ---------- */
.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 8px 0 18px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(216, 178, 90, 0.07);
  font-size: 13.5px;
  color: #cfc6b2;
}
.notice-icon {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold);
  color: #23190a;
  font-weight: 800;
  font-size: 13px;
  margin-top: 1px;
}
.toast {
  margin: 0 0 16px;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 14px;
  border: 1px solid;
}
.toast-ok { border-color: rgba(75, 179, 106, .4); background: rgba(75, 179, 106, .1); color: #a8e0b9; }
.toast-error { border-color: rgba(229, 84, 75, .4); background: rgba(229, 84, 75, .1); color: #f0b3ae; }

/* ---------- Toolbar ---------- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.search {
  display: flex;
  flex: 1 1 320px;
  max-width: 460px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .18s;
}
.search:focus-within { border-color: rgba(216, 178, 90, .45); }
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 12px 15px;
}
.search input::placeholder { color: #6d6a64; }
.search button {
  border: 0;
  padding: 0 20px;
  background: linear-gradient(150deg, #e6c479, #b8903b);
  color: #23190a;
  font-weight: 700;
}
.search button:hover { filter: brightness(1.06); }

.sorts { display: flex; gap: 6px; }
.sort {
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: .18s;
}
.sort:hover { color: var(--text); background: var(--panel); }
.sort.is-active {
  color: var(--gold-light);
  border-color: var(--line);
  background: rgba(216, 178, 90, 0.1);
}

/* ---------- Grid / Card ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px 18px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: linear-gradient(170deg, var(--panel-2), var(--panel) 55%);
  box-shadow: var(--shadow);
  transition: transform .2s, border-color .2s;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(216, 178, 90, .75), transparent);
  opacity: .55;
}
.card:hover { transform: translateY(-3px); border-color: rgba(216, 178, 90, .32); }
.card.is-done { opacity: .5; }

.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tag {
  font-size: 11px;
  letter-spacing: 1px;
  padding: 3px 9px;
  border-radius: 6px;
  color: #e6cc92;
  background: rgba(216, 178, 90, .12);
  border: 1px solid rgba(216, 178, 90, .22);
}
.left-badge { font-size: 12px; color: #8fd3a6; font-variant-numeric: tabular-nums; }
.left-badge.is-low { color: #e8a04c; }

.card-name {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1.4;
  word-break: break-all;
}

.card-score {
  margin-top: 12px;
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.score-num {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, #fff3cf, #e2bd6b 40%, #b08a33);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 10px rgba(216, 178, 90, .18));
}
.score-unit { font-size: 12px; color: var(--muted); letter-spacing: 1px; }

.meter {
  margin-top: 13px;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .07);
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #b8903b, #f0d190);
  transition: width .35s ease;
}

.copy-btn {
  margin-top: 15px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .5px;
  color: #23190a;
  background: linear-gradient(150deg, #f2d794, #c99f45);
  box-shadow: 0 6px 18px rgba(200, 160, 70, .22);
  transition: transform .14s, filter .18s;
}
.copy-btn:hover { filter: brightness(1.05); }
.copy-btn:active { transform: scale(.985); }
.copy-btn[disabled] { cursor: not-allowed; filter: grayscale(.35); box-shadow: none; }
.copy-btn.is-loading { pointer-events: none; filter: saturate(.6) brightness(.85); }
.copy-btn.is-flash { background: linear-gradient(150deg, #8ee0a6, #4bb36a); color: #0b2413; }

.card-foot {
  margin-top: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.hint { font-size: 11.5px; color: #6f6c66; }
.report-btn {
  background: none;
  border: 0;
  padding: 2px 0;
  font-size: 12px;
  color: #7d7a73;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.report-btn:hover { color: var(--danger); }

/* ---------- Empty ---------- */
.empty {
  text-align: center;
  padding: 70px 20px 90px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(22, 24, 34, .45);
}
.empty-emoji { font-size: 40px; opacity: .8; }
.empty h3 { margin-top: 12px; font-size: 19px; }
.empty p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.empty .btn-ghost { margin-top: 18px; display: inline-block; }

.btn-ghost {
  padding: 10px 20px;
  border-radius: 11px;
  border: 1px solid var(--line);
  color: var(--gold-light);
  font-size: 14px;
  transition: .18s;
}
.btn-ghost:hover { background: rgba(216, 178, 90, .1); }

/* ---------- Pager ---------- */
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 34px 0 10px;
}
.pager a, .pager span {
  min-width: 38px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  text-align: center;
  border: 1px solid var(--line-soft);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pager a:hover { color: var(--gold-light); border-color: var(--line); }
.pager .is-current { color: #23190a; background: linear-gradient(150deg, #e6c479, #b8903b); border-color: transparent; font-weight: 700; }
.pager .is-disabled { opacity: .35; }
.pager .gap { border: 0; min-width: 20px; padding: 8px 2px; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 50px;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
  color: #6f6c66;
  font-size: 12.5px;
}
.site-footer .copyright { margin-top: 6px; font-size: 11.5px; color: #5b5852; }
.site-footer a:hover { color: var(--gold); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(4, 5, 9, .72); backdrop-filter: blur(3px); }
.modal-box {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  animation: pop .18s ease-out;
}
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal-box h3 { font-size: 18px; }
.modal-sub { margin-top: 5px; color: var(--muted); font-size: 13px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions button { flex: 1; }

.btn-plain {
  padding: 12px 18px;
  border-radius: 11px;
  border: 1px solid var(--line-soft);
  background: transparent;
  color: var(--text);
  font-size: 14px;
}
.btn-plain:hover { border-color: var(--line); background: rgba(255, 255, 255, .03); }
.btn-danger {
  padding: 12px 18px;
  border-radius: 11px;
  border: 0;
  background: linear-gradient(150deg, #e76a61, #c53d34);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.btn-danger:hover { filter: brightness(1.06); }

/* ---------- Copy toast ---------- */
.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(10px);
  z-index: 95;
  max-width: min(92vw, 460px);
  padding: 12px 18px;
  border-radius: 13px;
  border: 1px solid rgba(75, 179, 106, .4);
  background: rgba(18, 40, 26, .96);
  color: #d8f5e1;
  font-size: 13.5px;
  text-align: center;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .5);
  opacity: 0;
  transition: opacity .22s, transform .22s;
  word-break: break-all;
}
.copy-toast[hidden] { display: none; }
.copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.copy-toast.is-error {
  border-color: rgba(229, 84, 75, .45);
  background: rgba(46, 16, 17, .96);
  color: #f4c3bf;
}
.copy-toast.is-error strong { color: #f0a29b; }
.copy-toast.is-error span { color: #ffe9e7; font-weight: 600; letter-spacing: 0; }
.copy-toast strong { display: block; font-size: 13px; color: #9fe0b3; }
.copy-toast span { display: block; margin-top: 3px; color: #fff; font-weight: 700; letter-spacing: .5px; }

/* ---------- Panel / Form ---------- */
.panel {
  padding: 26px 24px;
  border-radius: 20px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(170deg, var(--panel-2), var(--panel));
  box-shadow: var(--shadow);
}
.panel-ok { text-align: center; }
.ok-icon {
  width: 54px; height: 54px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 26px;
  color: #0b2413;
  background: linear-gradient(150deg, #8ee0a6, #4bb36a);
  box-shadow: 0 8px 24px rgba(75, 179, 106, .3);
}
.panel-title { font-size: 22px; font-weight: 800; letter-spacing: .5px; }
.panel-sub { margin-top: 8px; color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.panel-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.panel-actions .btn-primary, .panel-actions .btn-plain { display: inline-block; text-align: center; }

.btn-primary {
  display: inline-block;
  padding: 12px 22px;
  border: 0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #23190a;
  background: linear-gradient(150deg, #f2d794, #c99f45);
  box-shadow: 0 6px 18px rgba(200, 160, 70, .2);
  text-align: center;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-block { display: block; width: 100%; margin-top: 6px; }

.alert {
  margin-top: 16px;
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid rgba(229, 84, 75, .38);
  background: rgba(229, 84, 75, .09);
  color: #f0b3ae;
  font-size: 13.5px;
}
.alert li + li { margin-top: 4px; }

.form { margin-top: 22px; display: flex; flex-direction: column; gap: 16px; }
.field { display: block; }
.field > span {
  display: block;
  margin-bottom: 7px;
  font-size: 13.5px;
  color: #cfc9bd;
  font-weight: 600;
}
.field > span i { color: var(--danger); font-style: normal; }
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--line-soft);
  background: rgba(10, 11, 16, .55);
  color: var(--text);
  outline: 0;
  transition: border-color .18s, box-shadow .18s;
  font-family: inherit;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(216, 178, 90, .5);
  box-shadow: 0 0 0 3px rgba(216, 178, 90, .1);
}
.field input::placeholder, .field textarea::placeholder { color: #61605b; }
.field textarea { resize: vertical; min-height: 82px; }
.field small { display: block; margin-top: 6px; font-size: 11.5px; color: #6f6c66; }
.field select option { background: var(--panel-2); color: var(--text); }

.captcha-row { display: flex; align-items: center; gap: 12px; }
.captcha-q {
  flex: 0 0 auto;
  padding: 11px 16px;
  border-radius: 11px;
  border: 1px dashed var(--line);
  background: rgba(216, 178, 90, .08);
  color: var(--gold-light);
  font-weight: 700;
  letter-spacing: 1.5px;
  font-variant-numeric: tabular-nums;
}
.captcha-row input { flex: 1; }

.form-tip { font-size: 11.5px; color: #6f6c66; text-align: center; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  .header-inner { height: 60px; }
  .brand-text em { display: none; }
  .nav-link { padding: 7px 11px; font-size: 13px; }
  .hero { padding: 30px 0 20px; }
  .hero-sub { font-size: 13.5px; }
  .hero-stats { width: 100%; display: flex; }
  .hero-stats .stat { flex: 1; padding: 9px 6px; }
  .hero-stats b { font-size: 20px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .search { max-width: none; flex: none; }
  .sorts { justify-content: space-between; }
  .sort { flex: 1; text-align: center; padding: 8px 6px; }
  .panel { padding: 22px 17px; }
  .pager a, .pager span { min-width: 34px; padding: 7px 10px; font-size: 13px; }
}

/* ============ 粘贴识别（v2） ============ */
.parse-box {
  margin-top: 18px;
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .025);
}
.parse-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #cfc6b2;
}
.parse-clear {
  border: 0;
  background: none;
  color: #7d7a73;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 2px 0;
}
.parse-clear:hover { color: var(--danger); }

.parse-list { display: flex; flex-direction: column; gap: 6px; }
.parse-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(10, 11, 16, .45);
  border: 1px solid rgba(255, 255, 255, .05);
  font-size: 13.5px;
}
.parse-item.is-bad { border-color: rgba(229, 84, 75, .3); background: rgba(229, 84, 75, .06); }
.parse-item.is-dup { border-color: rgba(216, 178, 90, .25); }
.parse-name { flex: 1 1 130px; min-width: 0; font-weight: 600; word-break: break-all; }
.parse-code {
  font-size: 12px;
  padding: 1px 7px;
  border-radius: 5px;
  background: rgba(216, 178, 90, .12);
  border: 1px solid rgba(216, 178, 90, .22);
  color: var(--gold-light);
  letter-spacing: .5px;
}
.parse-score { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.parse-state { margin-left: auto; font-size: 12px; color: #8fd3a6; }
.parse-state.is-error { color: #f0a29b; }
.parse-state.is-dup { color: #e8b95c; }

.parse-empty {
  margin-top: 16px;
  padding: 14px 15px;
  border-radius: 12px;
  border: 1px dashed rgba(229, 84, 75, .35);
  background: rgba(229, 84, 75, .06);
  font-size: 13px;
  color: #f0b3ae;
}
.parse-empty code {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 7px;
  background: rgba(0, 0, 0, .3);
  color: #e6d9b4;
  font-size: 12px;
  word-break: break-all;
}

.submit-hint {
  margin-top: 12px;
  font-size: 11.5px;
  color: #6f6c66;
  text-align: center;
  line-height: 1.7;
}

/* 提交结果清单 */
.result-list, .result-note {
  margin-top: 18px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.result-note { margin-top: 14px; padding-top: 14px; border-top: 1px dashed rgba(255, 255, 255, .08); }
.result-note > strong { font-size: 12.5px; color: var(--muted); }
.result-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .05);
  font-size: 13px;
}
.result-row.is-muted { opacity: .62; }
.result-name { flex: 1; min-width: 0; font-weight: 600; word-break: break-all; }
.result-code {
  font-size: 11.5px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(216, 178, 90, .12);
  color: var(--gold-light);
  letter-spacing: .5px;
}
.result-score { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.result-skip { font-size: 11.5px; color: #9a8f78; margin-left: auto; }
.badge-mini {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 99px;
  white-space: nowrap;
}
.badge-wait { color: #e8c97f; background: rgba(216, 178, 90, .12); border: 1px solid rgba(216, 178, 90, .25); }

@media (max-width: 640px) {
  .parse-state { margin-left: 0; width: 100%; }
  .result-row { flex-wrap: wrap; gap: 5px 8px; }
  .result-skip { margin-left: 0; width: 100%; }
}

/* ============ 自动刷新倒计时（v3） ============ */
.refresh-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  padding: 9px 11px 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: rgba(22, 24, 34, .72);
  color: var(--muted);
  font-size: 12.5px;
  overflow: hidden;
  transition: border-color .2s, background .2s;
}
.refresh-bar.is-error { border-color: rgba(229, 84, 75, .35); background: rgba(229, 84, 75, .07); }

.refresh-status { display: flex; align-items: center; gap: 8px; min-width: 0; }
.refresh-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  animation: refreshPulse 2.4s ease-out infinite;
}
.refresh-bar.is-error .refresh-dot { background: var(--danger); animation: none; }
.refresh-bar.is-syncing .refresh-dot { background: var(--gold); animation: refreshBlink .9s linear infinite; }
@keyframes refreshPulse {
  0% { box-shadow: 0 0 0 0 rgba(75, 179, 106, .45); }
  70% { box-shadow: 0 0 0 6px rgba(75, 179, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(75, 179, 106, 0); }
}
@keyframes refreshBlink { 50% { opacity: .25; } }

.refresh-text {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.refresh-text b {
  min-width: 1.1em;
  color: var(--gold-light);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.refresh-text b[hidden] { display: none; }
.refresh-sep { opacity: .45; }

.refresh-now {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: #e6d9b4;
  font-size: 12.5px;
  white-space: nowrap;
  transition: background .18s, transform .12s;
}
.refresh-now:hover { background: rgba(216, 178, 90, .1); }
.refresh-now:active { transform: scale(.97); }

.refresh-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, .05);
}
.refresh-track i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #a8842f, #f3d894);
  transition: width .96s linear;
}
.refresh-bar.is-error .refresh-track i { background: linear-gradient(90deg, #a83a33, #e5544b); }

/* 卡片增删动效 */
.card { min-width: 0; }
.card.is-removing { opacity: 0; transform: scale(.96); transition: opacity .24s, transform .24s; }
.card.is-new { border-color: rgba(216, 178, 90, .5); animation: cardIn .32s ease-out; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to { opacity: 1; transform: none; }
}

/* ============ 移动端两列布局（v3） ============ */
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { padding: 12px 12px 10px; border-radius: 14px; }
  .card-top { gap: 4px; }
  .tag { padding: 2px 6px; font-size: 10px; letter-spacing: .5px; border-radius: 5px; white-space: nowrap; }
  .left-badge { font-size: 11px; white-space: nowrap; }
  .card-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-top: 9px;
    font-size: 14px;
    line-height: 1.35;
    overflow: hidden;
    word-break: break-all;
  }
  .card-score { margin-top: 8px; gap: 4px; }
  .score-num { font-size: 28px; letter-spacing: -.5px; }
  .score-unit { font-size: 10px; letter-spacing: 0; white-space: nowrap; }
  .meter { margin-top: 9px; height: 4px; }
  .copy-btn {
    margin-top: 10px;
    min-height: 42px;
    padding: 11px 6px;
    border-radius: 10px;
    font-size: 13px;
    letter-spacing: 0;
    white-space: nowrap;
  }
  .card-foot { margin-top: 8px; justify-content: flex-end; }
  .hint { display: none; }
  .report-btn { min-height: 30px; padding: 6px 2px; font-size: 11px; }

  .refresh-bar { margin-bottom: 12px; padding: 8px 10px 10px 12px; border-radius: 11px; font-size: 12px; }
  .refresh-text b { font-size: 13px; }
  .refresh-now { min-height: 30px; padding: 5px 10px; font-size: 12px; }
}

@media (max-width: 360px) {
  .wrap { padding: 0 10px; }
  .header-inner { gap: 8px; }
  .brand-text strong { font-size: 15px; }
  .nav { gap: 3px; }
  .nav-link { padding: 7px 8px; font-size: 12px; white-space: nowrap; }
  .grid { gap: 8px; }
  .card { padding: 10px 10px 9px; }
  .score-num { font-size: 25px; }
  .tag { padding: 2px 5px; font-size: 9.5px; }
  .left-badge { font-size: 10px; }
  .copy-btn { font-size: 12.5px; min-height: 40px; padding: 10px 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .refresh-dot { animation: none; }
  .refresh-track i { transition: none; }
  .card.is-new { animation: none; }
}
