:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: rgba(15, 23, 42, 0.075);
  --border-strong: rgba(15, 23, 42, 0.14);
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --brand: #0284c7;
  --brand-deep: #0369a1;
  --brand-soft: #f0f9ff;
  --brand-ring: rgba(2, 132, 199, 0.18);
  --grad: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
  --emerald: #059669;
  --emerald-soft: #ecfdf5;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --r-sm: 9px;
  --r-md: 13px;
  --r-lg: 18px;
  --shadow-card: 0 2px 12px rgba(15, 23, 42, 0.035), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-float: 0 14px 34px rgba(2, 132, 199, 0.14), 0 2px 8px rgba(15, 23, 42, 0.06);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: radial-gradient(circle at 10% -10%, rgba(14, 165, 233, 0.12), transparent 40%),
              radial-gradient(circle at 90% -8%, rgba(13, 148, 136, 0.10), transparent 38%),
              var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

/* Top Floating Glass Navbar */
.topnav {
  position: sticky; top: 0; z-index: 40;
  height: 60px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topnav-inner {
  max-width: 1080px; height: 100%; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand-logo {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--grad); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28);
}
.brand-text { display: flex; align-items: baseline; gap: 6px; }
.brand-en { font-weight: 800; font-size: 17px; letter-spacing: -0.4px; color: var(--ink); }
.brand-cn { font-weight: 600; font-size: 12px; color: var(--muted); }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  border: none; background: transparent;
  padding: 7px 13px; border-radius: 9px;
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  cursor: pointer; transition: all 0.14s;
}
.nav-link:hover { color: var(--ink); background: rgba(15, 23, 42, 0.04); }
.nav-link.active { color: var(--brand-deep); background: var(--brand-soft); }

.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pt-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--brand-soft); border: 1px solid rgba(2, 132, 199, 0.22);
  font-size: 12.5px; font-weight: 700; color: var(--brand-deep);
  cursor: pointer; transition: transform 0.12s;
}
.pt-chip:hover { transform: translateY(-1px); }

/* Main Container */
.page-wrap { max-width: 1080px; margin: 0 auto; padding: 22px 20px 104px; }

/* Bento Card */
.bento {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
}
.bento-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.bento-title { font-size: 14.5px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.bento-bar { width: 3.5px; height: 14px; border-radius: 4px; background: var(--grad); display: inline-block; }
.bento-divider { height: 1px; background: var(--border); margin: 16px 0; }

/* Segmented Switcher */
.seg {
  display: inline-flex; gap: 3px; padding: 3px;
  background: #edf2f7; border-radius: 11px;
  flex-wrap: wrap;
}
.seg-btn {
  border: none; background: transparent;
  padding: 6px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  cursor: pointer; transition: all 0.14s;
}
.seg-btn.active { background: #fff; color: var(--brand-deep); box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08); }

/* SKU Grid */
.sku-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px 10px; padding-top: 4px; }
.sku-card {
  position: relative;
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: var(--r-md);
  padding: 14px 15px;
  text-align: left; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  transition: all 0.14s;
}
.sku-card:hover:not(.disabled) { border-color: rgba(2, 132, 199, 0.45); transform: translateY(-1px); }
.sku-card.active {
  background: var(--brand-soft);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.sku-card.active::after {
  content: "✓";
  position: absolute; top: -7px; right: -7px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--grad); color: #fff;
  font-size: 10px; font-weight: 800;
  display: grid; place-items: center;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
}
.sku-card.disabled { opacity: 0.45; cursor: not-allowed; background: #f8fafc; }
.sku-mark {
  position: absolute; top: -8px; left: 12px;
  padding: 1px 8px; border-radius: 999px;
  background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
  color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1.5;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
  pointer-events: none;
}
.sku-name { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.sku-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* Chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.chip {
  padding: 6px 12px; border-radius: 9px;
  border: 1.5px solid var(--border); background: #fff;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  cursor: pointer; transition: all 0.14s;
  display: inline-flex; align-items: center; gap: 5px;
}
.chip:hover { border-color: rgba(2, 132, 199, 0.45); }
.chip.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-deep); }

.switch-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: #fff;
  font-size: 12px; font-weight: 600; color: var(--muted);
  cursor: pointer; user-select: none; transition: all 0.14s;
}
.switch-chip input { display: none; }
.switch-chip.on { background: var(--emerald-soft); border-color: rgba(5, 150, 105, 0.35); color: var(--emerald); }

/* Floating Bottom Checkout Dock */
.checkout-dock {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: min(1040px, calc(100% - 32px));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(2, 132, 199, 0.22);
  border-radius: 15px;
  padding: 11px 16px;
  box-shadow: var(--shadow-float);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  z-index: 35;
}
.dock-meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; min-width: 0; }
.dock-item { display: flex; flex-direction: column; }
.dock-k { font-size: 11px; color: var(--muted); }
.dock-v { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.dock-cost { font-family: var(--font-mono); font-size: 19px; font-weight: 800; color: var(--brand-deep); }

/* Grid & Inputs */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field:last-child,
.grid-2 > .field,
.grid-3 > .field,
.grid-4 > .field { margin-bottom: 0; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; justify-content: space-between; }

.input, .select, .textarea {
  width: 100%; padding: 9px 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: #fff; color: var(--ink); font-size: 13.5px;
  outline: none; transition: border-color 0.14s, box-shadow 0.14s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.textarea { font-family: var(--font-mono); font-size: 12.5px; resize: vertical; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 15px; border-radius: 10px; border: 1px solid transparent;
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: all 0.14s; white-space: nowrap;
}
.btn-brand { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(2, 132, 199, 0.24); }
.btn-brand:hover:not(:disabled) { filter: brightness(1.05); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--border-strong); }
.btn-ghost:hover:not(:disabled) { border-color: var(--brand); color: var(--brand-deep); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-emerald { background: var(--emerald); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* KPI Row */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 15px 17px; box-shadow: var(--shadow-card); }
.kpi.accent { background: var(--grad); color: #fff; border: none; }
.kpi-k { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi.accent .kpi-k { color: rgba(255, 255, 255, 0.84); }
.kpi-v { font-size: 23px; font-weight: 800; font-family: var(--font-mono); margin-top: 4px; letter-spacing: -0.5px; }

/* Key Strip */
.key-box {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 11px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border-strong);
}
.key-val { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--ink); word-break: break-all; }

/* Badges & Tables */
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: #f1f5f9; color: var(--ink-2); }
.badge-ok { background: var(--emerald-soft); color: var(--emerald); }
.badge-err { background: var(--danger-soft); color: var(--danger); }
.badge-warn { background: var(--amber-soft); color: var(--amber); }
.badge-brand { background: var(--brand-soft); color: var(--brand-deep); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); }
table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
code { font-family: var(--font-mono); font-size: 12px; background: #f1f5f9; padding: 2px 6px; border-radius: 6px; }

/* Markdown Docs */
.md-body { color: var(--ink-2); line-height: 1.7; font-size: 13.5px; }
.md-body h1 { font-size: 20px; color: var(--ink); margin: 0 0 12px; }
.md-body h2 { font-size: 15.5px; color: var(--ink); margin: 22px 0 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.md-body h3 { font-size: 14px; color: var(--ink); margin: 16px 0 8px; }
.md-body pre { background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: 10px; overflow-x: auto; font-size: 12.5px; }
.md-body pre code { background: transparent; padding: 0; color: inherit; }
.md-body blockquote { margin: 10px 0; padding: 9px 12px; background: var(--brand-soft); border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; font-size: 13px; color: var(--ink-2); }
.md-body table { display: block; overflow-x: auto; margin: 10px 0; border: 1px solid var(--border); border-radius: 10px; }

/* Modal & Toast */
.overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(3px); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 18px; max-width: 500px; width: 100%; max-height: 88vh; overflow-y: auto; padding: 22px; box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h3 { margin: 0; font-size: 16px; }

.toast {
  position: fixed; left: 50%; top: 72px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 9px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 600; box-shadow: var(--shadow-float);
  z-index: 100; display: none; max-width: 90vw;
}

/* Auth Screen (River 协议支付统一登录/注册组件) */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background-color: #f3f7fa;
  background-image:
    radial-gradient(at 15% 15%, rgba(2, 132, 199, 0.11) 0px, transparent 48%),
    radial-gradient(at 85% 85%, rgba(13, 148, 136, 0.12) 0px, transparent 50%),
    radial-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 24px 24px;
}
.auth-card {
  width: 100%;
  max-width: 416px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 12px 32px -4px rgba(15, 23, 42, 0.07),
    0 28px 60px -12px rgba(2, 132, 199, 0.10);
  padding: 32px 30px 26px;
}
.auth-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 24px;
}
.auth-biz-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  border: 1px solid rgba(2, 132, 199, 0.16);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand-deep);
  white-space: nowrap;
}
.auth-biz-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.18);
}
.auth-segmented {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 20px;
}
.auth-segmented-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: #ffffff;
  border-radius: 9px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.auth-segmented[data-mode="register"] .auth-segmented-slider { transform: translateX(100%); }
.auth-segmented-btn {
  position: relative;
  z-index: 1;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  border-radius: 9px;
  transition: color 0.2s ease;
}
.auth-segmented-btn.active { color: var(--brand-deep); font-weight: 700; }

.auth-subtabs {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}
.auth-subtab {
  position: relative;
  border: none;
  background: transparent;
  padding: 2px 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.16s ease;
}
.auth-subtab:hover { color: var(--ink); }
.auth-subtab.active { color: var(--brand-deep); }
.auth-subtab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

.auth-group { margin-bottom: 14px; }
.auth-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-icon {
  position: absolute;
  left: 13px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.18s ease;
}
.auth-input {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 38px;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.auth-input::placeholder { color: #94a3b8; }
.auth-input:hover { border-color: #cbd5e1; }
.auth-input:focus {
  background: #ffffff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.auth-input-wrap:focus-within .auth-icon { color: var(--brand); }
.auth-input.is-error { border-color: var(--danger); background: #fffafb; }
.auth-input.is-error:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12); }

.auth-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-code-row .auth-input-wrap { flex: 1; }
.auth-code-btn {
  height: 44px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid rgba(2, 132, 199, 0.28);
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.auth-code-btn:hover:not(:disabled) {
  background: #e0f2fe;
  border-color: var(--brand);
}
.auth-code-btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.auth-toggle-pwd {
  position: absolute;
  right: 8px;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.auth-toggle-pwd:hover { color: var(--ink-2); background: rgba(15, 23, 42, 0.04); }

.auth-err {
  display: none;
  font-size: 12px;
  color: var(--danger);
  margin-top: 5px;
}
.auth-err.visible { display: block; }

.auth-pwd-strength {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
}
.auth-pwd-strength.visible { display: flex; }
.auth-strength-bars {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.auth-strength-bar {
  height: 3px;
  border-radius: 99px;
  background: #e2e8f0;
  transition: background-color 0.2s ease;
}
.auth-strength-label {
  font-size: 11px;
  color: var(--muted);
  min-width: 20px;
  text-align: right;
  font-weight: 600;
}

.auth-submit-btn {
  width: 100%;
  height: 44px;
  margin-top: 8px;
  border: none;
  border-radius: 10px;
  background: var(--grad);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow:
    0 8px 18px -6px rgba(2, 132, 199, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.14s ease, filter 0.16s ease, opacity 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-submit-btn:hover:not(:disabled) { filter: brightness(1.04); }
.auth-submit-btn:active:not(:disabled) { transform: translateY(1px); }
.auth-submit-btn:disabled { opacity: 0.68; cursor: not-allowed; }
.auth-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: rvSpin 0.7s linear infinite;
  display: none;
}
.auth-submit-btn.loading .auth-spinner { display: inline-block; }
@keyframes rvSpin { to { transform: rotate(360deg); } }

.auth-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.auth-footer-links { display: flex; align-items: center; gap: 8px; }
.auth-footer-links a { color: var(--ink-2); transition: color 0.15s ease; }
.auth-footer-links a:hover { color: var(--brand-deep); }
.auth-sec-badge { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.auth-sec-badge svg { color: var(--emerald); }

@media (max-width: 480px) {
  .auth-page {
    padding: max(40px, env(safe-area-inset-top)) 14px max(24px, env(safe-area-inset-bottom));
    justify-content: flex-start;
  }
  .auth-card { padding: 26px 20px 22px; border-radius: 18px; }
  .auth-input, .auth-code-btn, .auth-submit-btn { height: 46px; font-size: 16px; }
  .auth-code-btn { font-size: 13.5px; }
  .auth-segmented-btn { height: 40px; }
}

/* H5 Floating Bottom Dock */
.h5-dock {
  display: none;
  position: fixed; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom));
  height: 58px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  z-index: 45;
  padding: 0 4px;
}
.h5-btn {
  flex: 1; border: none; background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.h5-btn svg { width: 19px; height: 19px; }
.h5-btn.active { color: var(--brand-deep); }

.hidden { display: none !important; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.flex-gap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .h5-dock { display: flex; }
  .topnav-inner { padding: 0 14px; }
  .page-wrap { padding: 14px 12px 152px; }
  .sku-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .bento { padding: 15px; border-radius: 14px; }
  .checkout-dock { bottom: 76px; width: calc(100% - 20px); padding: 10px 14px; }
  .dock-cost { font-size: 17px; }
}
