@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=Figtree:wght@400;500;600;700&display=swap");

:root {
  --bg: #121416;
  --bg-elev: #1a1d21;
  --ink: #f3f0ea;
  --muted: #9a958c;
  --line: rgba(243, 240, 234, 0.1);
  --accent: #e07a3d;
  --accent-soft: rgba(224, 122, 61, 0.14);
  --accent-ink: #1a120c;
  --ok: #3ecf8e;
  --danger: #e85d5d;
  --gold: #d4a24c;
  --radius: 16px;
  --font: "Figtree", sans-serif;
  --display: "Bricolage Grotesque", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.bg-plane {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(224, 122, 61, 0.16), transparent 58%),
    radial-gradient(700px 480px at 92% 8%, rgba(62, 207, 142, 0.08), transparent 55%),
    linear-gradient(180deg, #17191c 0%, var(--bg) 42%, #0e1012 100%);
}
.bg-plane::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image:
    linear-gradient(rgba(255,255,255,.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.55) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
}

a { color: var(--accent); text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* —— top —— */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 0;
  animation: fade-down .6s var(--ease) both;
}
.brand-mini {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.nav {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.who {
  color: var(--muted);
  font-size: .9rem;
}
.credit-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-size: .85rem;
}
.credit-chip b {
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
}
.btn-text {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 4px;
}
.btn-text:hover { color: var(--ink); }

/* —— hero: one composition —— */
.hero {
  min-height: min(78vh, 640px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
  padding: 48px 0 40px;
  position: relative;
}
.hero-copy {
  position: relative;
  z-index: 1;
  animation: rise .7s var(--ease) both;
}
.brand-mark {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 0 0 18px;
  color: var(--ink);
}
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin: 0 0 16px;
  max-width: 10ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero-lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 40ch;
  margin: 0 0 12px;
}
.hero-lead strong {
  color: var(--gold);
  font-weight: 700;
}
.store-link-line {
  margin: 0 0 22px;
  font-size: .95rem;
}
.store-link-line a {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 600;
}
.store-link-line a:hover { text-decoration: underline; }
.hero .notice.special {
  display: block;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold);
  font-weight: 600;
  font-size: .95rem;
  max-width: 40ch;
  animation: rise .6s var(--ease) .15s both;
}
.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-visual {
  position: relative;
  min-height: 320px;
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
  animation: fade-in .9s var(--ease) .1s both;
  background:
    linear-gradient(145deg, rgba(224,122,61,0.18), transparent 45%),
    linear-gradient(320deg, rgba(62,207,142,0.1), transparent 40%),
    var(--bg-elev);
  border: 1px solid var(--line);
}
.hero-orb {
  position: absolute;
  width: 280px;
  height: 280px;
  right: -40px;
  top: -60px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(224,122,61,0.55), transparent 68%);
  animation: drift 8s ease-in-out infinite;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at 60% 40%, #000 20%, transparent 75%);
}
.hero-code {
  position: absolute;
  left: 28px;
  bottom: 28px;
  display: grid;
  gap: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem;
  color: var(--muted);
}
.hero-code span {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.28);
  border-radius: 10px;
  width: fit-content;
  animation: rise .7s var(--ease) both;
}
.hero-code span:nth-child(1) { animation-delay: .25s; color: var(--ink); }
.hero-code span:nth-child(2) { animation-delay: .4s; }
.hero-code span:nth-child(3) { animation-delay: .55s; color: var(--accent); }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-18px, 14px) scale(1.06); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fade-down {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* —— sections —— */
.section {
  padding: 28px 0 8px;
  animation: rise .65s var(--ease) both;
}
.section-head {
  margin-bottom: 18px;
}
.section-head.row-between {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}
.order-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}
.auto-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: .88rem;
  cursor: pointer;
  user-select: none;
}
.auto-refresh input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}
.muted.sm { font-size: .8rem; }
.section-head h2,
.panel h2 {
  font-family: var(--display);
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  letter-spacing: -0.03em;
  margin: 0 0 6px;
}
.sub {
  color: var(--muted);
  margin: 0;
  font-size: .95rem;
}
.section-head .sub { margin-bottom: 0; }

#authSection:has(#authPanel.hidden) { display: none; }
#authSection .panel { max-width: 420px; }

/* 未登录：只展示介绍 + 登录注册 */
body:not(.is-logged-in) .auth-only { display: none !important; }
body.is-logged-in .guest-only { display: none !important; }

/* —— captcha —— */
.captcha-box {
  margin: 14px 0 4px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}
.captcha-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: .9rem;
  font-weight: 600;
}
.slide-stage {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto 10px;
  border-radius: 10px;
  overflow: hidden;
  background: #0e1218;
  touch-action: none;
  user-select: none;
}
.slide-bg {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}
.slide-piece {
  position: absolute;
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  max-width: 30%;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.45));
}
.slide-track {
  position: relative;
  height: 44px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  overflow: hidden;
  touch-action: none;
  user-select: none;
}
.slide-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 44px;
  background: linear-gradient(90deg, rgba(224,122,61,.25), rgba(224,122,61,.45));
  border-radius: 22px;
}
.slide-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-weight: 800;
  cursor: grab;
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
  z-index: 2;
}
.slide-knob:active { cursor: grabbing; }
.slide-tip {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: .85rem;
  pointer-events: none;
  padding-left: 36px;
}
.slide-track.ok {
  border-color: rgba(62, 207, 142, .45);
  background: rgba(62, 207, 142, .1);
}
.slide-track.ok .slide-fill {
  background: rgba(62, 207, 142, .35);
  width: 100% !important;
}
.slide-track.ok .slide-knob {
  background: var(--ok);
  color: #062016;
  left: calc(100% - 42px) !important;
}
.captcha-status { margin: 8px 0 0; font-size: .82rem; min-height: 1.2em; }
.captcha-status.ok { color: var(--ok); }
.captcha-status.err { color: var(--danger); }
.tencent-mount { margin-top: 4px; }
.auth-actions { margin-top: 12px; }
.auth-actions .btn { min-height: 44px; flex: 1; }

.panel {
  border: 1px solid var(--line);
  background: rgba(26, 29, 33, 0.72);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(8px);
}

/* —— packs —— */
.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}
.pack-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: rgba(255,255,255,0.02);
  transition: transform .2s var(--ease), border-color .2s ease, background .2s ease;
  animation: rise .55s var(--ease) both;
}
.pack-card:hover {
  transform: translateY(-3px);
  border-color: rgba(224, 122, 61, 0.35);
  background: rgba(224, 122, 61, 0.06);
}
.pack-card.pro {
  border-color: rgba(212, 162, 76, 0.45);
  background: linear-gradient(160deg, rgba(212, 162, 76, 0.12), rgba(26, 29, 33, 0.9));
}
.pack-card.single {
  border-color: rgba(212, 162, 76, 0.4);
  background: rgba(212, 162, 76, 0.06);
}
.pack-card .pack-times {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.pack-card .pack-unit {
  color: var(--muted);
  font-size: .82rem;
  margin-bottom: 10px;
  min-height: 2.4em;
}
.pack-card .pack-total {
  font-weight: 700;
  margin-bottom: 12px;
  font-size: 1.05rem;
}
.catalog-tip {
  margin-top: 14px;
  color: var(--muted);
  font-size: .88rem;
}

/* —— workspace —— */
.workspace {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 20px 0;
  padding: 28px 0;
}
.tool-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.tool-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.batch-label {
  color: var(--muted);
  font-size: .88rem;
}
.batch-input {
  width: 72px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.28);
  border-radius: 10px;
  padding: 9px 10px;
}
.batch-input:focus {
  outline: 1px solid rgba(224,122,61,.45);
  border-color: transparent;
}

/* —— forms / buttons —— */
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { color: var(--muted); font-size: .86rem; }
.field input, .field textarea, .field select,
.tool-textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.28);
  padding: 11px 12px;
}
.field input:focus, .tool-textarea:focus {
  outline: 1px solid rgba(224,122,61,.45);
  border-color: transparent;
}
.tool-textarea {
  min-height: 84px;
  margin: 8px 0 4px;
  resize: vertical;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem;
  line-height: 1.45;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s ease, opacity .18s ease;
}
.btn:hover { transform: translateY(-2px); background: #eb8850; }
.btn:active { transform: translateY(0); }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn.ghost:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(243,240,234,0.22);
}
.btn.danger { background: var(--danger); color: #1a0505; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.sm { padding: 8px 12px; font-size: .86rem; border-radius: 10px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

.msg {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-all;
  font-size: .92rem;
}
.msg.ok { color: var(--ok); border: 1px solid rgba(62,207,142,.25); }
.msg.err { color: var(--danger); border: 1px solid rgba(232,93,93,.3); }

/* —— credential / tools —— */
.cred-panel, .tool-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(0,0,0,0.22);
  padding: 16px;
  animation: rise .45s var(--ease) both;
}
.cred-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: .92rem;
}
.cred-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.cred-row label { color: var(--muted); font-size: .82rem; }
.cred-val { word-break: break-all; font-size: .95rem; }
.cred-val.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem;
  line-height: 1.45;
}
.cred-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.otp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}
.otp-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.pay-link {
  color: var(--accent);
  text-decoration: underline;
  word-break: break-all;
  font-weight: 600;
}
.pay-link:hover { color: #eb8850; }
.pay-link-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 12px;
}
.pay-link-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0,0,0,.18);
}
.pay-link-item .meta {
  color: var(--muted);
  font-size: .85rem;
  flex: 1;
  min-width: 160px;
}

/* —— orders —— */
.order-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.02);
  transition: border-color .2s ease, background .2s ease;
  animation: rise .5s var(--ease) both;
}
.order-card:hover { border-color: rgba(224,122,61,.28); }
.order-card.selected {
  border-color: rgba(224,122,61,.5);
  background: rgba(224,122,61,.07);
}
.order-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.order-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: .85rem;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}
.order-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.usage-box {
  margin: 4px 0 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.18);
}
.usage-top { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; align-items: center; }
.usage-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: .86rem;
  padding: 2px 0;
}
.usage-row span { color: var(--muted); }
.usage-row b { font-weight: 600; }
.usage-row.usage-split {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  align-items: center;
  gap: 6px 10px;
}
.usage-row.usage-split .usage-sep { text-align: right; }
.usage-auto { color: #7dd3a0; }
.usage-auto.alert { color: #ff6b6b; }
.usage-api { color: #f0b35a; }
.usage-box.alert-auto {
  border-color: rgba(232,93,93,.55);
  box-shadow: 0 0 0 1px rgba(232,93,93,.15) inset;
}
.badge.warn {
  background: rgba(232,93,93,.18);
  color: #ff8e8e;
}
.badge.pulse {
  animation: alertPulse 1.4s ease-in-out infinite;
}
@keyframes alertPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
.auto-alert-banner {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(232,93,93,.45);
  background: rgba(232,93,93,.12);
  color: #ffb0b0;
  font-size: .9rem;
  line-height: 1.45;
}
.auto-alert-banner strong { color: #ff7a7a; }
.order-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: start;
}
.group-panel {
  position: sticky;
  top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.22);
}
.group-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: .92rem;
}
.group-list { display: grid; gap: 4px; }
.group-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: .86rem;
}
.group-item:hover { background: rgba(255,255,255,.05); }
.group-item.active {
  border-color: rgba(125,211,160,.35);
  background: rgba(125,211,160,.1);
}
.group-item.auto.active {
  border-color: rgba(232,93,93,.4);
  background: rgba(232,93,93,.1);
}
.group-item.auto-ck.active {
  border-color: rgba(100,180,255,.45);
  background: rgba(100,180,255,.12);
}
.settings-title {
  font-weight: 600;
  margin-bottom: 8px;
  font-size: .86rem;
}
.chk-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
  cursor: pointer;
  font-size: .8rem;
}
.order-card.auto-ck-on {
  box-shadow: 0 0 0 1px rgba(100,180,255,.25) inset;
}
.badge.ck-tag {
  background: rgba(100,180,255,.18);
  color: #9ecfff;
}
.group-item .g-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-item .g-count {
  font-size: .75rem;
  opacity: .7;
  min-width: 1.2em;
  text-align: right;
}
.group-item .g-ops { display: flex; gap: 2px; }
.btn.xs { padding: 2px 6px; font-size: .72rem; }
.auto-refund-settings {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: .8rem;
}
.auto-refund-settings label { display: block; margin-bottom: 6px; opacity: .85; }
.thr-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.thr-row input {
  width: 72px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.35);
  color: inherit;
}
.auto-refund-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  font-size: .84rem;
}
.order-card.auto-refund-on {
  border-color: rgba(232,93,93,.4);
}
.switch-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 600;
}
.auto-refund-err {
  color: #ff8e8e;
  font-size: .75rem;
  width: 100%;
}
.group-move-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 10px;
  font-size: .84rem;
}
.group-move-row select {
  flex: 1;
  max-width: 220px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.35);
  color: inherit;
}
.badge.group-tag {
  font-size: .72rem;
  font-weight: 500;
  opacity: .95;
}
.badge.muted-badge {
  background: rgba(255,255,255,.08);
  color: inherit;
  opacity: .75;
}
@media (max-width: 860px) {
  .order-layout { grid-template-columns: 1fr; }
  .group-panel { position: static; }
}
.usage-bars {
  display: grid;
  gap: 5px;
  margin: 4px 0 6px;
}
.usage-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.usage-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3d9a6a, #7dd3a0);
  min-width: 0;
}
.usage-bar.api i {
  background: linear-gradient(90deg, #c9852d, #f0b35a);
}
.usage-bar em {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: .62rem;
  font-style: normal;
  color: rgba(255,255,255,.55);
  pointer-events: none;
}
.usage-meta { margin-top: 6px; color: var(--muted); font-size: .75rem; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: .75rem;
  background: var(--accent-soft);
  color: var(--accent);
}
.badge.bad { background: rgba(232,93,93,.15); color: var(--danger); }
.badge.ok { background: rgba(62,207,142,.15); color: var(--ok); }
.badge.gold { background: rgba(212,162,76,.18); color: var(--gold); }
.badge.free { background: rgba(62,207,142,.15); color: var(--ok); }
.badge.pay { background: var(--accent-soft); color: var(--accent); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(8px);
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 12px;
  z-index: 99;
  animation: rise .25s var(--ease) both;
}

.footer {
  padding: 28px 0 48px;
  color: var(--muted);
  font-size: .88rem;
}
.footer p { margin: 0 0 8px; max-width: 52ch; }
.footer-meta { opacity: .75; font-size: .82rem; }

.price {
  font-family: var(--display);
  font-size: 2rem;
  margin: 8px 0 14px;
}
.price small { font-size: .95rem; color: var(--muted); font-family: var(--font); }

.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  vertical-align: top;
}
.table th { color: var(--muted); font-weight: 600; }
.tabs { display: flex; gap: 8px; margin: 18px 0; flex-wrap: wrap; }
.tab {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.tab.active { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 700; }
.pill {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
}
.pill.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
  font-weight: 700;
}
.secret {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0,0,0,0.28);
  border: 1px dashed var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85rem;
  line-height: 1.55;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 28px 0 24px;
  }
  .hero-visual {
    min-height: 180px;
    order: -1;
  }
  .brand-mark { font-size: clamp(1.8rem, 8vw, 2.6rem); }
  .hero h1 { max-width: none; }
  .section-head.row-between {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .order-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }
}
@media (max-width: 700px) {
  .shell {
    width: min(1120px, calc(100% - 20px));
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .top {
    padding-top: max(12px, env(safe-area-inset-top, 0px));
    gap: 10px;
  }
  .nav { gap: 8px; }
  .who {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .hero { padding: 20px 0 16px; }
  .hero-visual { display: none; }
  .hero-lead { max-width: none; font-size: 1rem; }
  .cta .btn { flex: 1 1 auto; min-height: 44px; }
  #authSection .panel {
    max-width: none;
    padding: 18px 14px;
  }
  .field input,
  .batch-input,
  .tool-textarea,
  .thr-row input,
  .group-move-row select {
    font-size: 16px; /* 避免 iOS 聚焦自动放大 */
    min-height: 44px;
  }
  .pack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .pack-card { padding: 12px; }
  .pack-card .pack-times { font-size: 1.2rem; }
  .cred-row { grid-template-columns: 1fr; gap: 6px; }
  .cred-row .btn { justify-self: start; min-height: 40px; }
  .tool-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .tool-group,
  .tool-group.export {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .tool-group .batch-label { grid-column: 1 / -1; }
  .tool-group .batch-input { grid-column: 1; }
  .tool-group #btnBatchBuy { grid-column: 2; }
  .tool-group.export .btn { width: 100%; min-height: 44px; }
  .cred-actions,
  .cred-head .row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .cred-actions .btn { flex: 1 1 calc(50% - 8px); min-height: 44px; }
  .order-card .row-ops,
  .order-card .ops-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .order-card .btn,
  .order-card .btn.sm {
    min-height: 40px;
  }
  .footer { padding-bottom: max(28px, env(safe-area-inset-bottom)); }
  .footer p { max-width: none; }
}
@media (max-width: 380px) {
  .pack-grid { grid-template-columns: 1fr; }
  .tool-group.export { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
