:root {
  --bg: oklch(1 0 0);
  --surface: oklch(0.965 0.008 150);
  --panel: oklch(0.2 0.03 150);
  --panel-ink: oklch(0.96 0.01 150);
  --ink: oklch(0.2 0.03 150);
  --muted: oklch(0.38 0.025 150);
  --line: oklch(0.9 0.014 150);
  --primary: oklch(0.38 0.1 150);
  --primary-hover: oklch(0.32 0.09 150);
  --accent: oklch(0.48 0.16 28);
  --accent-soft: oklch(0.94 0.03 28);
  --ok: oklch(0.4 0.09 150);
  --warn: oklch(0.58 0.13 70);
  --danger: oklch(0.48 0.16 25);
  --on-primary: oklch(1 0 0);
  --radius: 8px;
  --radius-sm: 4px;
  --font-sans: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --font-serif: "Songti SC", "STSong", "SimSun", serif;
  --z-dropdown: 20;
  --z-sticky: 30;
  --z-modal-backdrop: 40;
  --z-modal: 50;
  --z-toast: 60;
  --z-tooltip: 70;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  text-wrap: balance;
  letter-spacing: -0.02em;
}

.serif {
  font-family: var(--font-serif);
}

.wrap {
  width: min(1180px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.muted {
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--on-primary);
  cursor: pointer;
  transition: background 180ms var(--ease);
}

.btn:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn:focus-visible,
.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible,
.icon-btn:focus-visible,
.lang-switch button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface);
}

.btn-accent {
  background: var(--accent);
}

.btn-accent:hover:not(:disabled) {
  background: oklch(0.42 0.15 28);
}

.btn-danger {
  background: var(--danger);
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field span {
  font-size: 0.8125rem;
  color: var(--muted);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.textarea {
  min-height: 6.5rem;
  resize: vertical;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: oklch(1 0 0 / 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.site-header .bar {
  display: flex;
  align-items: center;
  min-height: 3.5rem;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  flex-shrink: 0;
}

.brand i {
  width: 1.5rem;
  height: 1.5rem;
  background: var(--primary);
  color: var(--on-primary);
  font-style: normal;
  font-size: 0.8rem;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  margin-right: auto;
}

.nav a {
  color: var(--muted);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.header-actions .btn {
  min-height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
}

.header-guest {
  color: var(--muted);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  font-size: 0.875rem;
}

.header-guest:hover {
  color: var(--ink);
}

.lang-switch {
  display: inline-flex;
  gap: 0.15rem;
}

.lang-switch button {
  border: 0;
  background: transparent;
  min-height: 1.75rem;
  padding: 0 0.4rem;
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--muted);
}

.lang-switch button.is-active {
  color: var(--ink);
  font-weight: 600;
}

.tabbar {
  display: none;
}

.h5-only,
.h5-buybar {
  display: none;
}

.hero-market {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: min(72vh, 640px);
}

.hero-photo {
  position: relative;
  display: block;
  min-height: 420px;
  background: var(--surface);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 420px;
}

.plaque {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  background: var(--bg);
  color: var(--ink);
  padding: 0.7rem 1rem 0.55rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
}

.plaque small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
  margin-top: 0.2rem;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 3.5rem;
  border-bottom: 1px solid var(--line);
}

.hero-copy h1 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.3;
  max-width: 16em;
}

.hero-copy p {
  margin: 0;
  max-width: 36em;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.rate-strip {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--muted);
}

.rate-strip strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.section {
  padding: 2.75rem 0 3.25rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
}

.section-head a {
  font-size: 0.875rem;
  color: var(--muted);
}

.section-head a:hover {
  color: var(--primary);
}

.stall-street {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 0.85rem;
}

.stall {
  display: block;
}

.stall img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  background: var(--surface);
}

.stall:first-child img {
  height: 340px;
}

.stall-cap {
  padding: 0.7rem 0 0;
}

.stall-cap b {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
}

.stall-cap span {
  font-size: 0.8125rem;
  color: var(--muted);
}

.stall:hover img {
  filter: brightness(0.96);
}

.goods-spread {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: start;
}

.good {
  display: grid;
  gap: 0.6rem;
}

.good img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--surface);
}

.good h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
}

.good-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.good-list {
  display: grid;
  gap: 0;
}

.good-row {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.good-row:first-child {
  padding-top: 0;
}

.good-row img {
  width: 88px;
  height: 88px;
  object-fit: cover;
}

.good-row h3 {
  margin: 0 0 0.2rem;
  font-family: var(--font-serif);
  font-size: 1rem;
}

.price {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.price-usdt {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28rem;
  color: var(--primary);
}

.price-usdt b {
  font-size: 1.05em;
  font-weight: 700;
}

.price-usdt small {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.price small {
  font-weight: 400;
  color: var(--muted);
  margin-left: 0.35rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 5.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: start;
}

.product-page {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: calc(100vh - 3.5rem);
}

.product-page .cover {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  background: var(--surface);
}

.buy-col {
  padding: 3rem 3rem 4rem;
  position: sticky;
  top: 3.5rem;
  align-self: start;
}

.buy-col h1 {
  margin: 0.4rem 0 1rem;
  font-family: var(--font-serif);
  font-size: 1.75rem;
}

.buy-col .price {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.product-story {
  max-width: 720px;
  padding: 1.75rem 0 4rem;
}

.product-story h2 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: 1.2rem;
}

.product-story p {
  margin: 0 0 1rem;
  line-height: 1.75;
}

.product-story img {
  width: 100%;
  margin: 0.65rem 0;
  background: var(--surface);
}

.shop-banner {
  position: relative;
}

.shop-banner img {
  width: 100%;
  height: min(52vh, 460px);
  object-fit: cover;
}

.shop-intro {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  padding: 1.75rem 0 0.5rem;
}

.shop-intro h1 {
  margin: 0.25rem 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 2rem;
}

.shelf {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem 1rem;
}

.auth-page {
  min-height: calc(100vh - 3.5rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-page.desk-auth-minimal {
  grid-template-columns: 1fr;
  min-height: 100vh;
  place-items: center;
  padding: 1.5rem;
  background:
    linear-gradient(165deg, oklch(0.16 0.04 150 / 0.72), oklch(0.22 0.05 145 / 0.55) 45%, oklch(0.12 0.03 160 / 0.82)),
    url("https://images.unsplash.com/photo-1610701596007-11502861dcfa?auto=format&fit=crop&w=2000&q=80")
      center / cover no-repeat;
}

.auth-page.desk-auth-minimal .desk-auth-card {
  width: min(100%, 24rem);
  padding: 2rem 1.75rem 1.65rem;
  margin: 0 auto;
  background: oklch(0.99 0.006 95 / 0.93);
  border-radius: 1rem;
  box-shadow:
    0 1.25rem 3.5rem oklch(0.12 0.04 150 / 0.38),
    0 0 0 1px oklch(1 0 0 / 0.45) inset;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.auth-page.desk-auth-minimal .desk-auth-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
  color: var(--primary);
}

.auth-page.desk-auth-minimal .desk-auth-brand i {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-style: normal;
  font-family: var(--font-serif);
  font-size: 1rem;
}

.auth-page.desk-auth-minimal .desk-auth-brand span {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
}

.auth-page.desk-auth-minimal .auth-form h2 {
  margin: 0 0 0.85rem;
  font-size: 1.35rem;
}

.auth-page.desk-auth-minimal .auth-form .btn {
  margin-top: 0.35rem;
}

.auth-visual {
  background:
    linear-gradient(to top, oklch(0.18 0.03 150 / 0.72), oklch(0.18 0.03 150 / 0.15)),
    url("https://images.unsplash.com/photo-1610701596007-11502861dcfa?auto=format&fit=crop&w=1400&q=80")
      center / cover;
  color: var(--panel-ink);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.auth-visual h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin: 0 0 0.75rem;
}

.auth-form {
  padding: 3rem 4rem;
  max-width: 30rem;
  display: grid;
  align-content: center;
  gap: 0.9rem;
}

.demo-list {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.demo-chip {
  display: flex;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 0;
  padding: 0.7rem 0.8rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.demo-chip:hover {
  background: oklch(0.94 0.01 150);
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.85rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.4rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--surface);
}

.badge-accent {
  background: var(--accent);
  color: var(--on-primary);
}

.badge-ok {
  background: var(--primary);
  color: var(--on-primary);
}

.cart-layout,
.me-layout,
.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.7fr);
  gap: 3rem;
  padding: 2rem 0 4rem;
  align-items: start;
}

.page-title {
  margin: 0 0 1.25rem;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
}

.panel {
  background: var(--surface);
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius);
}

.panel-sticky {
  position: sticky;
  top: 4.5rem;
}

.line-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.line-item img {
  width: 88px;
  height: 88px;
  object-fit: cover;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.qty button {
  width: 2rem;
  height: 2rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.qty span {
  min-width: 1.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.me-links {
  display: grid;
  gap: 0;
  margin-top: 1.5rem;
}

/* —— 我的页 —— */
.me-page {
  display: grid;
  gap: 0.85rem;
  padding: 0.75rem 0 5.5rem;
  max-width: 28rem;
  margin: 0 auto;
}

.me-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.15rem;
  border-radius: calc(var(--radius) + 2px);
  background:
    linear-gradient(145deg, oklch(0.96 0.035 150), oklch(0.99 0.008 95) 55%, oklch(0.98 0.02 28 / 0.35));
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px oklch(0.2 0.03 150 / 0.06);
}

.me-avatar {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 650;
  flex-shrink: 0;
  box-shadow: inset 0 -2px 0 oklch(0 0 0 / 0.12);
}

.me-hero-body {
  min-width: 0;
}

.me-role {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: oklch(0.97 0.02 150);
  border: 1px solid oklch(0.9 0.03 150);
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  margin-bottom: 0.35rem;
}

.me-name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.2;
}

.me-meta {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-all;
}

.me-stats-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.me-stats-card article {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 0.5rem;
  text-align: center;
}

.me-stats-card span {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.me-stats-card b {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-menu-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.me-menu-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s var(--ease);
}

.me-menu-item:last-child {
  border-bottom: 0;
}

.me-menu-item:hover {
  background: oklch(0.98 0.01 150);
  color: var(--primary);
}

.me-menu-ico {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: oklch(0.96 0.02 150);
  color: var(--primary);
}

.me-ico {
  width: 1rem;
  height: 1rem;
}

.me-menu-label {
  font-size: 0.95rem;
  font-weight: 500;
}

.me-menu-arrow {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
}

.me-invite-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.05rem 0.95rem;
}

.me-invite-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.me-invite-kicker {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.me-invite-head h2 {
  margin: 0.15rem 0 0;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
}

.me-invite-code {
  display: flex;
  justify-content: center;
  padding: 0.85rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, oklch(0.99 0.01 28 / 0.5), oklch(0.98 0.015 150));
  border: 1px dashed oklch(0.85 0.06 28);
}

.me-invite-code code {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  letter-spacing: 0.22em;
  color: var(--accent);
  font-weight: 650;
}

.me-invite-tip {
  margin: 0.65rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.45;
  text-align: center;
}

.me-logout {
  width: 100%;
  margin-top: 0.15rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.me-logout:hover {
  color: var(--ink);
  border-color: oklch(0.85 0.02 150);
}

.me-links a,
.me-links button {
  display: flex;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
  cursor: pointer;
  font-size: 1rem;
}

.me-links a:hover,
.me-links button:hover {
  color: var(--primary);
}

.stats-row {
  display: flex;
  gap: 1.5rem;
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.stats-row b {
  display: block;
  color: var(--ink);
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
}

.seal {
  width: 9.5rem;
  aspect-ratio: 1;
  margin: 0.5rem auto 0;
  display: grid;
  place-items: center;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-serif);
  text-align: center;
  background: var(--bg);
}

.seal b {
  display: block;
  font-size: 1.5rem;
  letter-spacing: 0.14em;
}

.seal em {
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
}

.stream {
  display: grid;
  border-left: 1px solid var(--primary);
  margin-left: 0.5rem;
  padding-left: 1.15rem;
}

.stream-node {
  position: relative;
  padding: 0.55rem 0 1rem;
}

.stream-node::before {
  content: "";
  position: absolute;
  left: -1.4rem;
  top: 0.9rem;
  width: 0.45rem;
  height: 0.45rem;
  background: var(--primary);
}

.stream-node.me::before {
  background: var(--accent);
}

.stream-node strong {
  font-family: var(--font-serif);
}

.dash {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: oklch(0.955 0.012 150);
}

.dash-side {
  flex: 0 0 248px;
  width: 248px;
  background: oklch(0.97 0.014 150);
  color: var(--ink);
  padding: 1.15rem 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  border-right: 1px solid var(--line);
}

.dash-seal {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.2rem 0.4rem 0.85rem;
  color: inherit;
  border-bottom: 1px solid var(--line);
}

.dash-seal i {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: var(--on-primary);
  border: 0;
  font-family: var(--font-serif);
  font-style: normal;
  font-size: 1.15rem;
  flex: 0 0 2.35rem;
}

.dash-seal b {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.dash-seal small {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.dash-side nav {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  flex: 1;
}

.dash-group {
  display: grid;
  gap: 0.12rem;
}

.dash-sec {
  margin: 0 0.7rem 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.dash-side nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.2rem;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  color: oklch(0.36 0.04 150);
  font-size: 0.9rem;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}

.dash-side nav a:hover {
  background: oklch(0.94 0.02 150);
  color: var(--ink);
}

.dash-side nav a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.dash-side nav a[aria-current="page"] {
  background: oklch(0.93 0.03 150);
  color: var(--primary);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--accent);
}

.nav-ico {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  opacity: 0.72;
}

.dash-side nav a[aria-current="page"] .nav-ico {
  opacity: 1;
  color: var(--accent);
}

.dash-who {
  display: grid;
  gap: 0.12rem;
  padding: 0.85rem 0.7rem 0.15rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
}

.dash-who em {
  font-style: normal;
  font-weight: 650;
  color: var(--ink);
}

.dash-who small {
  color: var(--muted);
  letter-spacing: 0.08em;
}

.dash-who a {
  color: var(--primary);
  width: fit-content;
}

.dash-who-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-top: 0.35rem;
}

.dash-logout {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dash-logout:hover {
  color: var(--ink);
}

.dash-logout-inline {
  font-size: inherit;
  vertical-align: baseline;
}

.dash-work {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.impersonation-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  flex-wrap: wrap;
  padding: .55rem 1rem;
  background: #fff4e5;
  border-bottom: 1px solid #f0d78a;
  color: #7a5a12;
  font-size: .88rem;
  position: sticky;
  top: 0;
  z-index: 40;
}
.impersonation-banner .btn {
  padding: .25rem .65rem;
  font-size: .8rem;
}

.dash-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.5rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.dash-kicker {
  display: none;
}

.dash-head h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dash-sub {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

.dash-head-meta {
  font-size: 0.8125rem;
  color: var(--muted);
  padding-bottom: 0.15rem;
}

.dash-main {
  flex: 1;
  padding: 1.1rem 1.5rem 1.75rem;
  min-width: 0;
}

.dash-kpis,
.desk-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.dash-kpis article,
.desk-kpis article {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 0.9rem 1rem 0.85rem;
}

.dash-kpis span,
.desk-kpis span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.dash-kpis b,
.desk-kpis b {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.desk-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.desk-panel {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 1.1rem 1.15rem 1.2rem;
}

.desk-panel.grow {
  min-width: 0;
}

.desk-board .dash-home-split {
  padding: 1rem;
  border: 0;
}

.desk-board .desk-panel {
  border: 0;
  background: transparent;
  padding: 0.35rem 0.25rem 0.5rem;
}

.desk-panel > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.desk-panel > header h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
}

.desk-panel > header p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.pay-grid {
  display: grid;
  gap: 0.45rem;
}

.pay-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  background: oklch(0.985 0.004 150);
  cursor: pointer;
}

.pay-tile.tight {
  padding: 0.45rem 0.6rem;
}

.pay-tile span {
  display: grid;
  gap: 0.1rem;
}

.pay-tile b {
  font-size: 0.9rem;
  font-weight: 650;
}

.pay-tile small {
  color: var(--muted);
  font-size: 0.72rem;
}

.rate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 0.85rem;
}

.input.narrow {
  max-width: 8.5rem;
}

.rate-readout {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

.rate-readout li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.55rem 0.65rem;
  background: oklch(0.985 0.004 150);
  border: 1px solid var(--line);
}

.rate-readout span {
  font-size: 0.78rem;
  color: var(--muted);
}

.desk-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.desk-links a {
  display: block;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: oklch(0.985 0.004 150);
  font-size: 0.9rem;
}

.desk-links a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.desk-table-wrap {
  overflow: auto;
  min-height: min(28rem, calc(100vh - 16rem));
  background: var(--bg);
}

.desk-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}

.desk-table th,
.desk-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.desk-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--muted);
  background: oklch(0.97 0.01 150);
  border-bottom: 1px solid oklch(0.86 0.02 150);
}

.desk-table tbody tr:nth-child(even) td {
  background: oklch(0.985 0.006 150);
}

.desk-table tbody tr:hover td {
  background: oklch(0.95 0.02 150);
}

.desk-board {
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 oklch(0.2 0.03 150 / 0.04);
  min-height: calc(100vh - 8.5rem);
  display: flex;
  flex-direction: column;
}

.desk-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.desk-stats.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.desk-stats article {
  padding: 0.95rem 1.1rem;
  border-right: 1px solid var(--line);
}

.desk-stats article:last-child {
  border-right: 0;
}

.desk-stats span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.desk-stats b {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.desk-stats small {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.desk-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: oklch(0.98 0.008 150);
}

.desk-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0 0.7rem;
  border: 1px solid transparent;
  background: transparent;
  font-size: 0.8125rem;
  color: var(--muted);
}

.desk-tab i {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--ink);
}

.desk-tab.is-on {
  background: var(--bg);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--primary);
}

.cell-dash {
  color: var(--muted);
}

.desk-table .num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.desk-table .acts {
  white-space: nowrap;
}

.desk-table .acts .btn + .btn {
  margin-left: 0.3rem;
}

/* —— 用户管理页 —— */
.users-page {
  display: grid;
  gap: 1rem;
}

.users-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}

.users-kpis article {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem 0.95rem 0.75rem;
}

.users-kpis article.is-muted {
  background: oklch(0.985 0.006 150);
}

.users-kpis span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.users-kpis b {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.users-board {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 2px oklch(0.2 0.02 150 / 0.06);
}

.users-toolbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  background: oklch(0.985 0.008 150);
}

.users-board .desk-tabs {
  flex: 1;
  min-width: 0;
  border-bottom: 0;
  background: transparent;
  padding: 0.55rem 0.65rem;
}

.users-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem 0.55rem 0;
}

.desk-toolbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  background: oklch(0.985 0.008 150);
}

.desk-toolbar .desk-tabs {
  flex: 1;
  min-width: 0;
  border-bottom: 0;
  background: transparent;
  padding: 0.55rem 0.65rem;
}

.desk-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.85rem 0.55rem 0;
}

.desk-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.desk-search-input {
  min-width: 10rem;
  max-width: 14rem;
  font-size: 0.875rem;
}

.desk-filter-select {
  min-width: 6.5rem;
  font-size: 0.875rem;
  padding: 0.45rem 0.55rem;
}

.desk-count {
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
}

.desk-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-top: 1px solid var(--line);
  background: oklch(0.99 0.006 150);
  font-size: 0.8125rem;
}

.desk-pager-meta {
  color: var(--muted);
}

.desk-pager-nav {
  display: flex;
  gap: 0.35rem;
}

.desk-pager-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  background: var(--bg);
}

.desk-pager-btn:hover:not(.is-disabled) {
  border-color: var(--brand);
  color: var(--brand);
}

.desk-pager-btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.desk-tabs-sm {
  padding: 0.35rem 0.5rem;
}

.desk-tabs-sm .desk-tab {
  font-size: 0.8125rem;
  padding: 0.35rem 0.55rem;
}

/* —— 授权归集页 —— */
.pool-admin {
  display: grid;
  gap: 1rem;
  max-width: 100%;
}

.pool-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.pool-kpis article {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(165deg, oklch(0.99 0.01 150), oklch(0.97 0.02 155));
  box-shadow: 0 1px 2px oklch(0.2 0.02 150 / 0.05);
}

.pool-kpis span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.pool-kpis b {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.5rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.pool-kpis small {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.pool-view-nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.15rem 0;
}

.pool-view-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 550;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.pool-view-tab span {
  display: inline-flex;
  min-width: 1.35rem;
  justify-content: center;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: oklch(0.94 0.02 150);
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pool-view-tab:hover {
  border-color: oklch(0.72 0.08 155);
  color: var(--brand);
}

.pool-view-tab.is-on {
  border-color: var(--brand);
  background: oklch(0.94 0.04 155);
  color: var(--brand);
  box-shadow: 0 1px 0 oklch(0.55 0.12 155 / 0.12);
}

.pool-view-tab.is-on span {
  background: var(--brand);
  color: var(--bg);
}

.pool-board {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
  box-shadow: 0 1px 3px oklch(0.2 0.02 150 / 0.06);
}

.pool-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: oklch(0.985 0.008 150);
}

.pool-board-head .desk-tabs,
.pool-board-head .desk-tabs-sm {
  border-bottom: 0;
  background: transparent;
  padding: 0;
  flex: 1;
  min-width: 0;
}

.pool-board-desc {
  margin: 0;
  flex: 1;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.45;
}

.pool-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pool-filter-select {
  min-width: 6.5rem;
  font-size: 0.875rem;
  padding: 0.45rem 0.55rem;
}

.pool-board .desk-table-wrap {
  border: 0;
}

.pool-board .desk-pager {
  border-top: 1px solid var(--line);
  margin: 0;
}

.pool-user {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.pool-user b {
  font-size: 0.875rem;
}

.pool-user span {
  font-size: 0.75rem;
  color: var(--muted);
}

.pool-wallet {
  display: grid;
  gap: 0.2rem;
  min-width: 8rem;
}

.pool-wallet code {
  font-size: 0.78rem;
  word-break: break-all;
}

.pool-wallet span {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.pool-ref {
  font-size: 0.78rem;
  color: var(--muted);
}

.pool-tx {
  font-size: 0.78rem;
}

.pool-board td.num.is-accent {
  color: var(--brand);
  font-weight: 650;
}

.pool-board .desk-search-input {
  min-width: 12rem;
}

@media (max-width: 900px) {
  .pool-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pool-board-head {
    flex-direction: column;
    align-items: stretch;
  }

  .pool-filters {
    width: 100%;
  }

  .pool-filters .desk-search {
    flex: 1;
  }

  .pool-filters .desk-search-input {
    flex: 1;
    min-width: 0;
  }
}

.users-count {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.users-board .desk-table-wrap {
  border: 0;
}

.users-board .desk-table th {
  background: oklch(0.99 0.006 150);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.users-last-seen .cell-sub {
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.users-board .desk-table th:nth-child(5),
.users-board .desk-table th:nth-child(6),
.users-board .desk-table td:nth-child(5),
.users-board .desk-table td:nth-child(6) {
  white-space: nowrap;
}

.users-sheet {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem 1.05rem;
  box-shadow: 0 10px 28px oklch(0.2 0.03 150 / 0.08);
}

.users-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.users-sheet-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
}

.users-sheet-head p {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.users-sheet-close {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: oklch(0.96 0.01 150);
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none;
}

.users-sheet-close:hover {
  background: oklch(0.93 0.02 150);
  color: var(--ink);
}

.users-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem 0.85rem;
}

.users-form-actions {
  grid-column: 1 / -1;
  margin-top: 0.15rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
}

.user-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(145deg, oklch(0.94 0.04 150), oklch(0.9 0.06 145));
  color: var(--primary);
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-weight: 650;
  flex-shrink: 0;
}

.users-id-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.users-cell-id .cell-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.12rem;
}

.invite-code {
  font-size: 0.78rem;
  padding: 0.18rem 0.45rem;
  background: oklch(0.97 0.012 150);
  border-radius: 4px;
  border: 1px solid var(--line);
}

.btn-row {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .users-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .users-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .users-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .users-form-grid {
    grid-template-columns: 1fr;
  }

  .users-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .users-toolbar-actions {
    justify-content: space-between;
    padding: 0 0.85rem 0.65rem;
  }
}

/* —— 商品管理页 —— */
.goods-page {
  display: grid;
  gap: 1rem;
}

.goods-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.goods-kpis article {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem 0.95rem 0.75rem;
}

.goods-kpis article.is-muted {
  background: oklch(0.985 0.006 150);
}

.goods-kpis span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.goods-kpis b {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.goods-board {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 2px oklch(0.2 0.02 150 / 0.06);
}

.goods-toolbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  background: oklch(0.985 0.008 150);
}

.goods-board .desk-tabs {
  flex: 1;
  min-width: 0;
  border-bottom: 0;
  background: transparent;
  padding: 0.55rem 0.65rem;
}

.goods-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.85rem 0.55rem 0;
}

.goods-board .desk-table-wrap {
  border: 0;
}

.goods-board .desk-table th {
  letter-spacing: 0.06em;
}

.goods-sheet {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem 1.05rem;
  box-shadow: 0 10px 28px oklch(0.2 0.03 150 / 0.08);
}

.goods-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.goods-sheet-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
}

.goods-sheet-head p {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.goods-sheet-close {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: oklch(0.96 0.01 150);
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none;
}

.goods-sheet-close:hover {
  background: oklch(0.93 0.02 150);
  color: var(--ink);
}

.goods-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 0.85rem;
}

.goods-form-grid .rate-grid,
.goods-form-grid .field:has(textarea),
.goods-form-grid .field:has(.up-row) {
  grid-column: 1 / -1;
}

.goods-form-actions {
  grid-column: 1 / -1;
  margin-top: 0.15rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
}

.goods-prod-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.goods-thumb {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: oklch(0.97 0.008 150);
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.goods-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.goods-thumb span {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--brand);
}

.goods-cell-prod .cell-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.12rem;
}

.agent-collect-addr .desk-form.tight {
  margin-top: 0.35rem;
}

.agent-addr-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: end;
}

.agent-addr-form .desk-actions {
  margin: 0;
}

@media (max-width: 640px) {
  .agent-addr-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .goods-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .goods-form-grid {
    grid-template-columns: 1fr;
  }

  .goods-toolbar-actions {
    width: 100%;
    padding-left: 0.65rem;
    padding-bottom: 0.65rem;
  }
}

/* —— 设置页 —— */
.settings-page {
  display: grid;
  gap: 1rem;
}

.settings-alert {
  padding: 0.75rem 1rem;
  border: 1px solid #f0d78a;
  border-radius: var(--radius);
  background: #fff8e6;
  font-size: 0.88rem;
  line-height: 1.45;
}

.settings-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.settings-summary article {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem 0.95rem 0.75rem;
}

.settings-summary span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.settings-summary b {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.settings-summary b small {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
}

.settings-form {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.settings-nav {
  display: grid;
  gap: 0.35rem;
  padding: 0.65rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.settings-nav-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.7rem;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  font-size: 0.84rem;
  font-weight: 550;
  color: var(--text);
  cursor: pointer;
}

.settings-nav-item:hover {
  background: oklch(0.985 0.008 150);
}

.settings-nav-item.is-on {
  background: oklch(0.96 0.03 150);
  border-color: oklch(0.88 0.06 150);
  color: var(--brand);
}

.settings-body {
  min-width: 0;
}

.settings-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem 1.1rem;
  box-shadow: 0 1px 2px oklch(0.2 0.02 150 / 0.06);
}

.settings-card-secure {
  border-color: oklch(0.88 0.05 50);
  background: oklch(0.99 0.01 80);
}

.settings-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.settings-card-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
}

.settings-card-head p {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.settings-secure-tag {
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: oklch(0.95 0.06 50);
  color: oklch(0.45 0.12 50);
}

.settings-group {
  margin-top: 0.85rem;
}

.settings-group:first-of-type {
  margin-top: 0;
}

.settings-group.is-muted .settings-toggle {
  opacity: 0.72;
}

.settings-group-title {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

.settings-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.settings-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 2px);
  background: oklch(0.985 0.006 150);
  cursor: pointer;
}

.settings-toggle-main {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.settings-toggle b {
  font-size: 0.88rem;
  font-weight: 650;
}

.settings-toggle small {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
}

.settings-fields {
  display: grid;
  gap: 0.75rem;
}

.settings-fields-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-callout {
  margin-top: 1rem;
  padding: 0.85rem 0.95rem;
  border: 1px dashed oklch(0.88 0.05 150);
  border-radius: calc(var(--radius) - 2px);
  background: oklch(0.985 0.012 150);
}

.settings-callout p {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.settings-chain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.settings-chain-card {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 2px);
  padding: 0.75rem 0.8rem 0.85rem;
  background: oklch(0.985 0.006 150);
}

.settings-chain-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.settings-chain-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  background: var(--bg);
  border: 1px solid var(--line);
}

.settings-chain-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.settings-chain-field span {
  font-size: 0.72rem;
}

.settings-mono {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.78rem;
}

.settings-footnote {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

  .settings-footer {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: oklch(0.985 0.008 150);
  }

/* —— 日志页 —— */
.logs-page {
  display: grid;
  gap: 0.75rem;
}

.logs-filter-hint {
  margin: 0;
  padding: 0.55rem 0.85rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: oklch(0.985 0.008 150);
  font-size: 0.82rem;
}

.logs-board {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 2px oklch(0.2 0.02 150 / 0.06);
}

.logs-toolbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  background: oklch(0.985 0.008 150);
}

.logs-toolbar .desk-tabs {
  flex: 1;
  min-width: 0;
  border-bottom: 0;
  background: transparent;
  padding: 0.55rem 0.65rem;
}

.logs-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.85rem 0.55rem 0;
}

.logs-board .desk-table-wrap {
  border: 0;
}

.logs-path code {
  font-size: 0.78rem;
  word-break: break-all;
}

.logs-detail {
  max-width: 16rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.logs-ref {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .logs-toolbar-actions {
    width: 100%;
    padding-left: 0.65rem;
    padding-bottom: 0.65rem;
  }
}

@media (max-width: 960px) {
  .settings-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-form {
    grid-template-columns: 1fr;
  }

  .settings-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .settings-nav-item {
    width: auto;
  }

  .settings-toggle-grid,
  .settings-fields-3,
  .settings-chain-grid {
    grid-template-columns: 1fr;
  }
}

.cell-sub {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.desk-empty {
  padding: 2rem 1rem;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  background: var(--bg);
}

.desk-board .desk-empty {
  border: 0;
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 16rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: 0 0.5rem;
  font-size: 0.72rem;
  background: var(--surface);
}

.pill-ok { background: oklch(0.93 0.04 150); color: var(--primary); }
.pill-go { background: var(--accent-soft); color: var(--accent); }
.pill-wait { background: oklch(0.95 0.04 85); color: oklch(0.42 0.1 70); }
.pill-info { background: oklch(0.94 0.03 230); color: oklch(0.38 0.08 230); }
.pill-mute { color: var(--muted); }

.btn-sm {
  min-height: 1.85rem;
  padding: 0 0.65rem;
  font-size: 0.78rem;
}

.desk-form.tight {
  display: grid;
  gap: 0.75rem;
}

.up-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.cover-preview {
  width: 88px;
  height: 88px;
  border: 1px solid var(--line);
  background: oklch(0.97 0.008 150);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-preview span {
  font-size: 0.72rem;
  color: var(--muted);
}

.up-fields {
  display: grid;
  gap: 0.45rem;
}

.up-btn {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 0.8125rem;
  width: fit-content;
  cursor: pointer;
}

.up-btn input {
  display: none;
}

.desk-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.chain-grid {
  display: grid;
  gap: 0.65rem;
}

.chain-row {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin: 0.5rem 0 1.75rem;
}

.kpi {
  padding: 1rem 1.25rem 1rem 0;
  border-top: 1px solid var(--line);
}

.kpi b {
  display: block;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  margin-top: 0.15rem;
}

.kpi span {
  color: var(--muted);
  font-size: 0.75rem;
}

body:has(.dash) .tabbar {
  display: none !important;
}

body:has(.dash) {
  padding-bottom: 0;
}

.dash-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin: 0.75rem 0 1rem;
}

.dash-tools .input {
  max-width: 280px;
}

.dash-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chip {
  min-height: 2rem;
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 0.8125rem;
  cursor: pointer;
}

.chip.is-on {
  border-color: var(--primary);
  color: var(--primary);
}

.dash-detail p {
  margin: 0.2rem 0;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin: 0.5rem 0 1.75rem;
}

.kpi {
  padding: 1rem 1.25rem 1rem 0;
  border-top: 1px solid var(--line);
}

.kpi b {
  display: block;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  margin-top: 0.15rem;
}

.kpi span {
  color: var(--muted);
  font-size: 0.75rem;
}

.empty {
  padding: 2.5rem 0;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 5rem;
  z-index: var(--z-toast);
  background: var(--ink);
  color: var(--bg);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  max-width: 22rem;
  font-size: 0.875rem;
}

.error {
  color: var(--danger);
  font-size: 0.875rem;
}

.form-grid {
  display: grid;
  gap: 0.85rem;
}

.row-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.pay-methods {
  display: grid;
  gap: 0.4rem;
  margin: 0.75rem 0 1rem;
}

.pay-methods label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.8rem;
  background: var(--bg);
  border: 1px solid var(--line);
  cursor: pointer;
}

.pay-methods label:has(input:checked) {
  border-color: var(--primary);
}

.usdt-box {
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem 0 0.35rem;
  border-top: 1px solid var(--line);
}

.usdt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.usdt-copy {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}

.usdt-copy i {
  font-style: normal;
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--muted);
}

.usdt-addr {
  display: grid;
  gap: 0.35rem;
}

.usdt-addr code {
  display: block;
  font-size: 0.78rem;
  line-height: 1.45;
  word-break: break-all;
  padding: 0.65rem 0.7rem;
  background: var(--bg);
  border: 1px solid var(--line);
}

.usdt-hint {
  margin: 0;
  font-size: 0.75rem;
}

.h5-banner {
  position: relative;
  display: block;
}

.h5-banner img {
  width: 100%;
  height: 42vw;
  min-height: 168px;
  max-height: 220px;
  object-fit: cover;
  background: var(--surface);
}

.h5-banner-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem 1rem 0.9rem;
  background: linear-gradient(to top, oklch(0.16 0.03 150 / 0.82), transparent);
  color: var(--on-primary);
}

.h5-banner-text b {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
}

.h5-banner-text small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  opacity: 0.88;
}

.h5-cats {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.7rem 0.85rem 0.15rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.h5-cats::-webkit-scrollbar,
.h5-stalls::-webkit-scrollbar {
  display: none;
}

.h5-cats a {
  flex: none;
  padding: 0.38rem 0.8rem;
  background: var(--surface);
  font-size: 0.8125rem;
  border-radius: 999px;
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
}

.h5-rate {
  margin: 0.4rem 0.85rem 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.h5-block {
  padding: 1rem 0 0.15rem;
}

.h5-stalls {
  display: flex;
  gap: 0.7rem;
  overflow-x: auto;
  padding: 0 0 0.4rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.h5-stall {
  flex: none;
  width: 112px;
  scroll-snap-align: start;
}

.h5-stall img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  background: var(--surface);
}

.h5-stall b {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h5-stall span {
  font-size: 0.7rem;
  color: var(--muted);
}

.h5-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 0.65rem;
  padding-bottom: 0.5rem;
}

.h5-good h3 {
  margin: 0.4rem 0 0.12rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-sans);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.h5-good img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--surface);
}

.h5-good .price {
  color: var(--primary);
  font-size: 0.95rem;
}

.h5-good .muted {
  display: block;
  font-size: 0.7rem;
  margin-top: 0.08rem;
}

.h5-shop {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.h5-shop img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  background: var(--surface);
}

.h5-shop b {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
}

.h5-shop span {
  font-size: 0.75rem;
  color: var(--muted);
}

.h5-shop i {
  font-style: normal;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  a,
  button {
    -webkit-tap-highlight-color: transparent;
  }

  .h5-only {
    display: block;
  }

  body:has(.tabbar) {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom));
  }

  .desk-only,
  .desk-link,
  .header-guest,
  .header-actions .btn,
  .nav,
  .site-footer {
    display: none !important;
  }

  .wrap {
    width: calc(100% - 1.25rem);
  }

  .site-header .bar {
    min-height: 2.75rem;
    gap: 0.75rem;
  }

  .brand {
    font-size: 1.1rem;
  }

  .header-actions {
    margin-left: auto;
  }

  .section {
    padding: 1.05rem 0 1.35rem;
  }

  .section-head {
    margin-bottom: 0.7rem;
  }

  .section-head h2 {
    font-size: 1.05rem;
  }

  .hero-market,
  .product-page,
  .shop-intro,
  .auth-page,
  .cart-layout,
  .me-layout,
  .checkout-layout,
  .goods-spread,
  .stall-street,
  .shelf,
  .kpis,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .shop-banner img {
    height: 168px;
  }

  .shop-intro {
    padding-top: 0.95rem;
    gap: 0.55rem;
  }

  .shop-intro h1 {
    font-size: 1.4rem;
  }

  .shelf {
    grid-template-columns: 1fr 1fr;
    gap: 0.95rem 0.65rem;
  }

  .shelf .good img {
    aspect-ratio: 1;
  }

  .shelf .good h3 {
    font-size: 0.875rem;
    font-family: var(--font-sans);
  }

  .shelf .price {
    color: var(--primary);
  }

  .buy-col {
    padding: 1rem 0.9rem 1.15rem;
    position: static;
  }

  .product-story {
    padding: 0.25rem 0 5.5rem;
  }

  .buy-col h1 {
    font-size: 1.3rem;
  }

  .buy-col .row-actions {
    display: none;
  }

  .product-page .cover {
    min-height: 0;
    height: 62vw;
    max-height: 360px;
  }

  .h5-buybar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(3.25rem + env(safe-area-inset-bottom));
    z-index: calc(var(--z-sticky) + 1);
    background: oklch(1 0 0 / 0.96);
    border-top: 1px solid var(--line);
    padding: 0.55rem 0.85rem;
    backdrop-filter: blur(10px);
  }

  .h5-buybar .price {
    font-size: 1.15rem;
    color: var(--primary);
  }

  .h5-buybar .btn {
    min-width: 0;
    flex: 1;
  }

  .h5-buybar .btn:not(.btn-ghost) {
    flex: 1.35;
  }

  .h5-buybar .fav-btn {
    flex: 0 0 auto;
    min-width: 0;
    padding-inline: 0.55rem;
  }

  .auth-visual {
    display: none;
  }

  .auth-form {
    padding: 1.25rem 0.9rem 2.5rem;
    max-width: none;
    gap: 0.75rem;
  }

  .page-title {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
  }

  .cart-layout,
  .me-layout,
  .checkout-layout {
    gap: 1.1rem;
    padding: 0.85rem 0 4.75rem;
  }

  .line-item {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 0.7rem;
    padding: 0.75rem 0;
  }

  .line-item img {
    width: 72px;
    height: 72px;
  }

  .panel-sticky {
    position: static;
  }

  .kpis {
    grid-template-columns: 1fr 1fr;
  }

  .tabbar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.15rem;
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(0.55rem + env(safe-area-inset-bottom));
    z-index: var(--z-sticky);
    background: oklch(0.995 0.004 150 / 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid oklch(0.9 0.015 150);
    border-radius: 1.15rem;
    padding: 0.35rem 0.3rem;
    box-shadow:
      0 10px 30px oklch(0.18 0.03 150 / 0.14),
      0 0 0 1px oklch(1 0 0 / 0.35) inset;
  }

  .tab-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-height: 3.2rem;
    border-radius: 0.85rem;
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: color 0.15s var(--ease), background 0.15s var(--ease), transform 0.15s var(--ease);
  }

  .tab-item:active {
    transform: scale(0.96);
  }

  .tab-item[aria-current="page"] {
    color: var(--primary);
    background: oklch(0.96 0.035 150);
    font-weight: 650;
  }

  .tab-ico {
    width: 1.35rem;
    height: 1.35rem;
  }

  .tab-item[aria-current="page"] .tab-ico {
    stroke-width: 2;
  }

  .tab-badge {
    position: absolute;
    top: 0.28rem;
    left: calc(50% + 0.45rem);
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.24rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.58rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1rem;
    text-align: center;
    box-shadow: 0 1px 3px oklch(0.3 0.05 25 / 0.25);
  }

  .tabbar a {
    display: flex;
    min-height: 0;
    color: inherit;
  }

  .dash {
    flex-direction: column;
  }

  .dash-side {
    flex: 0 0 auto;
    width: auto;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    height: auto;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.7rem 0.85rem 0.6rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: oklch(0.97 0.014 150);
  }

  .dash-seal {
    padding: 0.1rem 0.15rem 0.55rem;
  }

  .dash-sec {
    display: none;
  }

  .dash-side nav {
    flex-direction: row;
    gap: 0.35rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.1rem;
  }

  .dash-group {
    display: flex;
    flex-direction: row;
    gap: 0.12rem;
  }

  .desk-stats {
    grid-template-columns: 1fr;
  }

  .desk-stats article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .desk-board {
    min-height: 0;
  }

  .dash-side nav {
    display: flex;
    gap: 0.2rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.15rem;
  }

  .dash-side nav a {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.4rem 0.65rem;
    box-shadow: none;
  }

  .dash-side nav a[aria-current="page"] {
    box-shadow: inset 0 -2px 0 var(--accent);
  }

  .dash-who {
    display: none;
  }

  .dash-head,
  .dash-main {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .dash-kpis,
  .desk-kpis,
  .desk-split,
  .rate-grid,
  .desk-links,
  .chain-row {
    grid-template-columns: 1fr;
  }

  .toast {
    bottom: 5.5rem;
    left: 0.75rem;
    right: 0.75rem;
    max-width: none;
  }
}

.usdt-hint {
  font-size: 0.8rem;
  margin: 0;
}

.wallet-pay-block {
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem 0;
  border-top: 1px dashed var(--line);
}

.wallet-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
}

.wallet-modal-root {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  place-items: end center;
}

.wallet-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: oklch(0 0 0 / 0.55);
  cursor: pointer;
}

.wallet-modal {
  position: relative;
  width: min(420px, 100%);
  max-height: min(86vh, 640px);
  overflow: auto;
  background: #0b0b0b;
  color: #f5f5f5;
  border-radius: 16px 16px 0 0;
  padding: 1rem 1rem 1.25rem;
  box-shadow: 0 -8px 40px oklch(0 0 0 / 0.35);
}

.wallet-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.wallet-modal-head .btn {
  color: #aaa;
  min-height: 2rem;
}

.wallet-mobile-hint {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  color: #9a9a9a;
  line-height: 1.45;
}

.wallet-sec {
  margin: 0.85rem 0 0.45rem;
  font-size: 0.8rem;
  color: #9a9a9a;
}

.wallet-sec.installed {
  color: #3dd68c;
}

.wallet-list {
  display: grid;
  gap: 0.35rem;
}

.wallet-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  border: 0;
  background: #161616;
  color: #fff;
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.wallet-row:hover {
  background: #1e1e1e;
}

.wallet-row b {
  flex: 1;
  font-weight: 650;
}

.wallet-row em {
  font-style: normal;
  color: #888;
  font-size: 0.75rem;
}

.wallet-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  flex: 0 0 auto;
}

.wallet-wc-guide {
  display: grid;
  gap: 0.75rem;
  color: #ddd;
}

.wallet-wc-guide ol {
  margin: 0;
  padding-left: 1.1rem;
  color: #aaa;
}

.wallet-modal .error {
  color: #ff8d8d;
}

@media (min-width: 861px) {
  .wallet-modal-root {
    place-items: center;
  }

  .wallet-modal {
    border-radius: 16px;
  }
}

.channel-list {
  display: grid;
  gap: 0.45rem;
}

.channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.channel-row > div {
  display: grid;
  gap: 0.15rem;
}

.channel-row b {
  font-weight: 650;
}

input.switch {
  appearance: none;
  width: 2.4rem;
  height: 1.35rem;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  cursor: pointer;
  flex: 0 0 auto;
  border: 0;
}

input.switch::after {
  content: "";
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s var(--ease);
}

input.switch:checked {
  background: var(--primary);
}

input.switch:checked::after {
  transform: translateX(1.05rem);
}

input.switch:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.search-bar {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 1rem;
  align-items: stretch;
}

.search-bar .input {
  flex: 1;
  min-width: 0;
}

.h5-search {
  padding: 0.75rem 0.9rem 0.15rem;
}

.goods-grid {
  margin-top: 0.15rem;
}

.fav-list,
.addr-list {
  display: grid;
  gap: 0.65rem;
}

.fav-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.fav-row img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.addr-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.addr-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.addr-chip {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}

.addr-chip.is-on {
  border-color: var(--primary);
  color: var(--primary);
}

.check-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.cart-link,
.tab-icon-wrap {
  position: relative;
}

.tab-icon-wrap {
  display: grid;
  place-items: center;
}

.cart-badge {
  position: absolute;
  top: -0.4rem;
  right: -0.7rem;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.22rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-primary);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 650;
  display: grid;
  place-items: center;
  line-height: 1;
}

.fav-on,
.fav-btn.fav-on {
  color: var(--accent);
}

.lang-toggle {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  min-width: 2.2rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
