/* Lumen — fresh UI for 数据牛 (not based on prior theme) */
:root {
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --bg: #f4f2f8;
  --surface: #ffffff;
  --surface-2: #faf9fc;
  --ink: #18181f;
  --ink-2: #3f3f50;
  --muted: #71718a;
  --line: rgba(24, 24, 31, .08);
  --primary: #6366f1;
  --primary-2: #818cf8;
  --primary-deep: #4338ca;
  --primary-soft: #eef2ff;
  --accent: #f97316;
  --accent-soft: #fff7ed;
  --ok: #10b981;
  --ok-bg: #ecfdf5;
  --warn: #d97706;
  --warn-bg: #fffbeb;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --night: #13131a;
  --night-2: #1c1c26;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --shadow: 0 1px 2px rgba(19, 19, 26, .04), 0 12px 40px rgba(99, 102, 241, .08);
  --shadow-sm: 0 1px 3px rgba(19, 19, 26, .06);
  --dock: 0 8px 32px rgba(19, 19, 26, .12), 0 2px 8px rgba(19, 19, 26, .06);
  --gold: var(--accent);
}

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }

body.sq {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.sq-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.sq-bg span {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .55;
  animation: drift 18s ease-in-out infinite alternate;
}
.sq-bg span:nth-child(1) {
  width: 55vw; height: 55vw; max-width: 520px; max-height: 520px;
  top: -12%; left: -8%;
  background: radial-gradient(circle, rgba(99, 102, 241, .35), transparent 70%);
}
.sq-bg span:nth-child(2) {
  width: 45vw; height: 45vw; max-width: 420px;
  top: 20%; right: -10%;
  background: radial-gradient(circle, rgba(249, 115, 22, .22), transparent 70%);
  animation-delay: -6s;
}
.sq-bg span:nth-child(3) {
  width: 50vw; height: 40vw; max-width: 480px;
  bottom: -5%; left: 25%;
  background: radial-gradient(circle, rgba(168, 85, 247, .18), transparent 70%);
  animation-delay: -12s;
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(24px, -16px) scale(1.05); }
}

#app {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  padding: 20px 16px calc(100px + env(safe-area-inset-bottom));
  max-width: 1280px;
}

a { color: var(--primary-deep); text-decoration: none; font-weight: 600; }
a:hover { color: var(--primary); }
button, input, select { font: inherit; color: inherit; }

/* —— Language —— */
.langbar {
  position: fixed;
  z-index: 50;
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-sm);
}
.langbar button {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: .15s ease;
}
.langbar button.on {
  background: var(--night);
  color: #fff;
}

.toast {
  position: fixed;
  left: 50%;
  top: max(16px, env(safe-area-inset-top));
  transform: translateX(-50%);
  z-index: 60;
  max-width: min(400px, calc(100% - 32px));
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--night);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--dock);
  animation: toast-in .3s cubic-bezier(.22, 1, .36, 1);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px) scale(.96); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* —— Navigation —— */
.tabbar {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(420px, calc(100% - 24px));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: var(--dock);
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  transition: .15s ease;
}
.tab-ico {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: .15s ease;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--primary-deep);
}
.tab-ico svg {
  width: 14px;
  height: 14px;
  display: block;
}
.tabbar a[data-tab="home"] .tab-ico { background: linear-gradient(135deg, #eef2ff, #e0e7ff); }
.tabbar a[data-tab="assets"] .tab-ico { background: linear-gradient(135deg, #ecfdf5, #d1fae5); }
.tabbar a[data-tab="accounts"] .tab-ico { background: linear-gradient(135deg, #fff7ed, #ffedd5); }
.tabbar a[data-tab="docs"] .tab-ico { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.tabbar a[data-tab="me"] .tab-ico { background: linear-gradient(135deg, #fae8ff, #f3e8ff); }
.tabbar a.on {
  color: var(--primary-deep);
  background: var(--primary-soft);
}
.tabbar a.on .tab-ico {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(99, 102, 241, .35);
  color: #fff;
}
.side-brand { display: none; }

/* —— Home banner —— */
.banner {
  position: relative;
  margin-bottom: 22px;
  padding: 24px 22px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--night) 0%, #2d2a4a 50%, #3730a3 100%);
  color: #fff;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(19, 19, 26, .25);
}
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: .8;
  pointer-events: none;
}
.banner-inner {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.banner-mark {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 22px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(8px);
}
.banner-copy h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
}
.banner-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .78);
  max-width: 36em;
}
.eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255, 255, 255, .55);
}
.banner-tags {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}
.banner-tags li {
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .15);
  color: rgba(255, 255, 255, .9);
}

/* Legacy hero (if any) */
.hero, .brand-mark { /* mapped via profile/auth */ }

/* —— Chips —— */
.chips {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 2px 2px 14px;
  margin-bottom: 8px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: .15s ease;
}
.chip.on {
  background: var(--night);
  color: #fff;
  border-color: var(--night);
  box-shadow: 0 4px 16px rgba(19, 19, 26, .2);
}

/* —— Cards —— */
.card, .pcard, .auth, .panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.pcard {
  position: relative;
  padding: 18px;
  overflow: hidden;
  transition: transform .2s cubic-bezier(.22, 1, .36, 1), box-shadow .2s ease;
}
.panel { padding: 22px 20px; }

h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.03em;
}
h3 { margin: 0; font-weight: 700; }
.section {
  margin: 20px 0 10px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.sub { color: var(--muted); margin: 0 0 16px; font-size: 14px; line-height: 1.55; }

label {
  display: block;
  margin: 12px 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input, select {
  height: 48px;
  padding: 0 14px;
  font-size: 16px;
}
textarea { padding: 12px 14px; font-size: 16px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(99, 102, 241, .45);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .12);
}
.row { display: flex; gap: 10px; }
.row input { flex: 1; }

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  height: 48px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  box-shadow: 0 4px 14px rgba(99, 102, 241, .35);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s;
}
button:hover:not(:disabled), .btn:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 20px rgba(99, 102, 241, .4);
}
button:active:not(:disabled) { transform: scale(.98); }
button.ghost, .btn.ghost {
  background: var(--primary-soft);
  color: var(--primary-deep);
  box-shadow: none;
  border: 1px solid rgba(99, 102, 241, .15);
}
button.ghost:hover:not(:disabled) { filter: none; background: #e0e7ff; }
button.cancel-order {
  background: #fff;
  color: #b91c1c;
  box-shadow: none;
  border: 1.5px solid #ef4444;
}
button.cancel-order:hover:not(:disabled) { filter: none; background: #fef2f2; }
button.warn {
  background: linear-gradient(135deg, #f87171, var(--danger));
  box-shadow: 0 4px 14px rgba(239, 68, 68, .3);
}
button:disabled { opacity: .5; cursor: default; transform: none; }
.full { width: 100%; margin-top: 16px; }
.links {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 14px;
}

.top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.code {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-2);
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.desc { color: var(--muted); font-size: 13px; line-height: 1.55; min-height: 2.8em; }
.bot { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.price b { font-size: 1.5rem; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.price span { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.view-link { font-size: 13px; font-weight: 700; color: var(--primary); }

/* Quote cards */
.cards, #plist { display: grid; gap: 14px; }
.quote-card { cursor: pointer; }
.quote-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.q-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), #a855f7);
  opacity: .85;
}
.q-top { display: flex; gap: 12px; align-items: center; }
.q-mark {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(145deg, var(--night), var(--primary-deep));
  box-shadow: 0 6px 16px rgba(99, 102, 241, .25);
}
.q-name { min-width: 0; flex: 1; }
.q-cat {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--primary);
  margin-bottom: 2px;
}
.q-name h3 { font-size: 1.05rem; letter-spacing: -.02em; }
.pick {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  flex: none;
  border-radius: 10px;
  background: var(--surface-2);
  border: 2px solid var(--line);
  color: transparent;
  box-shadow: none;
}
.pick:hover { border-color: var(--primary-2); }
.pick.on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, .4);
}
.pick.on::after { content: "✓"; font-size: 14px; font-weight: 800; }
.syms { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.sym {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.sym.more { background: var(--primary-soft); color: var(--primary-deep); border-color: rgba(99, 102, 241, .2); }

/* Options & badges */
.opt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  cursor: pointer;
  transition: .15s ease;
}
.opt.on {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, .08);
}
.opt input { width: auto; height: auto; accent-color: var(--primary); }
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn);
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.off { background: var(--danger-bg); color: var(--danger); }
.badge.muted { background: #f1f1f6; color: var(--muted); }

/* Pay */
.pay-amount { text-align: center; margin: 16px 0; }
.pay-amount b { font-size: 2.75rem; font-weight: 800; color: var(--accent); letter-spacing: -.04em; }
.pay-amount span { font-size: 13px; color: var(--muted); font-weight: 600; }
.qr {
  display: block;
  width: 220px;
  height: 220px;
  margin: 16px auto;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.hint {
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.55;
  background: var(--warn-bg);
  color: #92400e;
  border: 1px solid rgba(217, 119, 6, .15);
}
.count {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-deep);
  margin: 10px 0;
}
.copyline { display: flex; gap: 10px; margin: 10px 0; }
.copyline input { flex: 1; min-width: 0; font-size: 14px; }
.copyline button { flex: none; height: 48px; }

.item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.meta { color: var(--muted); font-size: 13px; line-height: 1.6; }
.empty, .loading {
  text-align: center;
  padding: 56px 20px;
  color: var(--muted);
  font-weight: 500;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.actions button, .actions .btn { height: 42px; font-size: 14px; }
.small { font-size: 13px; color: var(--muted); }

.success { text-align: center; padding: 32px 16px; }
.success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 22px;
  background: var(--ok-bg);
  color: var(--ok);
}

/* Profile */
.profile-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 22px;
  margin-bottom: 16px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #fff 0%, var(--primary-soft) 100%);
  border: 1px solid rgba(99, 102, 241, .12);
  box-shadow: var(--shadow);
}
.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #a855f7);
  box-shadow: 0 8px 20px rgba(99, 102, 241, .35);
}
.profile-meta h1 { margin: 0 0 4px; font-size: 1.1rem; font-weight: 800; word-break: break-all; }
.profile-meta p { margin: 0; font-size: 13px; color: var(--muted); }

/* Auth */
.auth-page {
  width: min(960px, 100%);
  margin: 0 auto;
  min-height: calc(100vh - 40px);
  display: grid;
  gap: 20px;
  align-items: center;
}
.auth-showcase {
  position: relative;
  padding: 32px 28px;
  border-radius: var(--radius-xl);
  background: var(--night);
  color: #fff;
  overflow: hidden;
  min-height: 200px;
}
.showcase-orbs {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(99, 102, 241, .45), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(249, 115, 22, .25), transparent 40%);
  pointer-events: none;
}
.showcase-body { position: relative; z-index: 1; }
.showcase-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
  background: rgba(255, 255, 255, .1);
  margin-bottom: 20px;
}
.auth-showcase h1 {
  margin: 0 0 10px;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.03em;
}
.auth-showcase p { margin: 0; color: rgba(255, 255, 255, .75); line-height: 1.6; font-size: 15px; }
.auth.panel h1 { margin: 4px 0 6px; font-size: 1.5rem; font-weight: 800; }

/* Sheet */
.sheet { position: fixed; inset: 0; z-index: 45; }
.sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(19, 19, 26, .45);
  backdrop-filter: blur(6px);
  animation: fade-in .2s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.sheet-card {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(560px, 100%);
  max-height: min(88vh, 720px);
  overflow: auto;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--dock);
  animation: sheet-up .35s cubic-bezier(.22, 1, .36, 1);
}
@keyframes sheet-up {
  from { transform: translateX(-50%) translateY(100%); }
  to { transform: translateX(-50%) translateY(0); }
}
.sheet-card h2 { margin: 4px 0 10px; font-size: 1.35rem; }
.sheet-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: none;
  font-size: 22px;
  line-height: 1;
}
.sheet-alone { display: block; text-align: center; margin-top: 14px; font-weight: 700; }

/* Cart */
.cartbar {
  position: fixed;
  z-index: 35;
  left: 16px;
  right: 16px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: rgba(19, 19, 26, .92);
  backdrop-filter: blur(16px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: var(--dock);
}
.cartbar b { font-size: 14px; font-weight: 700; }
.cart-side { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cart-side > b { color: #fdba74; font-size: 1.1rem; font-weight: 800; }
.cartbar button { height: 42px; font-size: 14px; border-radius: 12px; }
.cartbar .ghost { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .12); box-shadow: none; }
.terms { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.term {
  height: 30px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .85);
  box-shadow: none;
  border: 1px solid transparent;
}
.term.on { background: #fff; color: var(--night); }
.lines { margin-top: 12px; }
.line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
body.cart-on #app { padding-bottom: calc(200px + env(safe-area-inset-bottom)); }

.meta, .item, .desc { overflow-wrap: anywhere; }

@media (min-width: 640px) {
  .cards, #plist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chips { flex-wrap: wrap; overflow: visible; }
}
@media (min-width: 720px) {
  .auth-page {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    min-height: calc(100vh - 48px);
  }
  .auth-showcase { min-height: 420px; display: flex; flex-direction: column; justify-content: flex-end; }
}
@media (min-width: 800px) {
  .pay-sheet { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 24px 32px; align-items: start; }
  .sheet-card {
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: var(--radius-xl);
    padding: 28px;
    animation: sheet-center .35s cubic-bezier(.22, 1, .36, 1);
  }
  @keyframes sheet-center {
    from { opacity: 0; transform: translate(-50%, -48%) scale(.96); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  }
}
@media (min-width: 960px) {
  body.sq:has(#tabbar:not([hidden])) .sq-bg span:nth-child(1) { left: 200px; }
  #tabbar:not([hidden]) {
    left: 0;
    top: 0;
    bottom: 0;
    transform: none;
    width: 248px;
    max-width: none;
    height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 24px 16px;
    background: var(--night);
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, .06);
    box-shadow: none;
  }
  #tabbar:not([hidden]) .side-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 24px;
  }
  .side-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex: none;
    object-fit: cover;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
  }
  .side-mark {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.02em;
  }
  #tabbar:not([hidden]) a {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 14px;
    font-size: 14px;
    color: rgba(255, 255, 255, .55);
    border-radius: var(--radius);
  }
  #tabbar:not([hidden]) a .tab-ico {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border-color: rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .72);
  }
  #tabbar:not([hidden]) a .tab-ico svg {
    width: 18px;
    height: 18px;
  }
  #tabbar:not([hidden]) a.on {
    color: #fff;
    background: rgba(99, 102, 241, .2);
  }
  #tabbar:not([hidden]) a.on .tab-ico {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 4px 14px rgba(99, 102, 241, .4);
    color: #fff;
  }
  body.sq:has(#tabbar:not([hidden])) #app {
    margin-left: 248px;
    max-width: none;
    padding: 32px 40px 48px;
  }
  body.sq:has(#tabbar:not([hidden])) .langbar { right: 28px; }
  .cards, #plist { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
  .detail, .account-layout, .me-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 400px);
    gap: 24px;
    align-items: start;
  }
  .account-layout > .card, .me-layout form { position: sticky; top: 28px; }
  body.sq:has(#tabbar:not([hidden])) .cartbar {
    left: 272px;
    right: 40px;
    bottom: 28px;
  }
  body.cart-on:has(#tabbar:not([hidden])) #app { padding-bottom: 120px; }
}
.doc-page { max-width: 820px; }
.doc-head h1 { margin-bottom: 8px; }
.doc-block { padding: 20px; margin-bottom: 14px; }
.doc-block h2 { font-size: 1.05rem; margin-bottom: 12px; }
.doc-steps { margin: 0; padding-left: 1.2rem; color: var(--ink-2); font-size: 14px; }
.doc-steps li { margin-bottom: 8px; }
.doc-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.doc-ep {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 14px; margin-bottom: 10px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--line);
}
.doc-ep-label { font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--muted); min-width: 4.5em; }
.doc-ep-val { flex: 1; min-width: 0; font-size: 14px; word-break: break-all; }
.doc-copy { height: 36px !important; padding: 0 12px !important; font-size: 13px !important; }
.doc-flow { list-style: none; margin: 0 0 16px; padding: 0; }
.doc-flow li { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.doc-flow li b { display: block; margin-bottom: 4px; color: var(--primary-deep); }
.doc-flow li span { color: var(--muted); line-height: 1.5; }
.doc-samples { display: grid; gap: 12px; }
.doc-sample { position: relative; }
.doc-sample-title { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.code-block {
  margin: 0; padding: 14px; border-radius: var(--radius);
  background: #1e1e2e; color: #e2e8f0; font-size: 12px; line-height: 1.55;
  overflow: auto; border: 1px solid rgba(255, 255, 255, .06);
}
.doc-sample .doc-copy { margin-top: 8px; }
.doc-code-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; align-items: center; }
.doc-code-actions .doc-copy { margin-top: 0; }
.ws-playground { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.ws-playground h3 { margin: 0 0 12px; font-size: 1rem; }
.ws-log {
  min-height: 120px;
  max-height: 220px;
  margin: 8px 0 0;
  padding: 12px;
  border-radius: var(--radius);
  background: #1e1e2e;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.5;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid rgba(255, 255, 255, .06);
}
.doc-codes { font-family: ui-monospace, monospace; font-size: 13px; color: var(--ink-2); word-break: break-all; }

@media (max-width: 639px) {
  .tabbar { width: min(100%, calc(100% - 12px)); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { font-size: 9px; padding: 6px 2px; }
  .tabbar a .tab-ico { width: 20px; height: 20px; }
  .tabbar a .tab-ico svg { width: 12px; height: 12px; }
  .banner { padding-right: 90px; }
  .pay-amount b { font-size: 2.25rem; }
  .cartbar { flex-direction: column; align-items: stretch; }
  .cart-side { justify-content: space-between; width: 100%; }
}
