:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #7c3aed;
  --primary-2: #2563eb;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow: 0 18px 45px rgba(15, 23, 42, .08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
code { background: rgba(124,58,237,.08); padding: 2px 6px; border-radius: 8px; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(18px); background: rgba(255,255,255,.82); border-bottom: 1px solid rgba(229,231,235,.8); }
.header-grid { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-logo { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: white; font-weight: 900; background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 10px 22px rgba(124,58,237,.25); }
.brand strong { display: block; font-size: 18px; }
.brand small { display: block; color: var(--muted); margin-top: 3px; }
html:not(.site-settings-ready) .brand-logo,
html:not(.site-settings-ready) .brand strong,
html:not(.site-settings-ready) .brand small {
  opacity: 0;
}
html:not(.site-settings-ready) .brand-logo {
  background: rgba(15, 23, 42, .06);
  box-shadow: none;
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-link { padding: 10px 14px; border-radius: 999px; color: #374151; }
.nav-link:hover { background: #f3f4f6; }
.nav-admin { border: 1px solid var(--line); background: white; }
.hero { padding: 58px 0 28px; }
.hero-grid { display: grid; grid-template-columns: 1.45fr .75fr; gap: 28px; align-items: stretch; }
.eyebrow { margin: 0 0 10px; color: var(--primary); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
h1 { margin: 0; font-size: clamp(34px, 5vw, 62px); line-height: 1.05; letter-spacing: -0.04em; }
h2 { margin: 0; font-size: 26px; }
.hero-text { color: var(--muted); font-size: 18px; line-height: 1.8; max-width: 720px; }
.hero-search { margin-top: 24px; display: flex; gap: 12px; max-width: 680px; }
input, textarea { width: 100%; border: 1px solid var(--line); background: white; color: var(--text); border-radius: 16px; padding: 14px 16px; outline: none; font: inherit; }
input:focus, textarea:focus { border-color: rgba(124,58,237,.7); box-shadow: 0 0 0 4px rgba(124,58,237,.12); }
.btn { border: 0; border-radius: 16px; padding: 13px 18px; font-weight: 800; cursor: pointer; white-space: nowrap; font: inherit; }
.btn-primary { color: white; background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 12px 24px rgba(37,99,235,.18); }
.btn-ghost { color: #374151; background: #f3f4f6; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.hero-card, .panel, .dialog { background: rgba(255,255,255,.92); border: 1px solid rgba(229,231,235,.85); box-shadow: var(--shadow); border-radius: 28px; }
.hero-card { padding: 28px; display: flex; flex-direction: column; justify-content: center; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 8px rgba(22,163,74,.1); margin-bottom: 16px; }
.hero-card p { color: var(--muted); margin: 10px 0 0; }
.panel { padding: 28px; margin: 28px auto; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.tab { border: 1px solid var(--line); background: white; color: #374151; padding: 10px 14px; border-radius: 999px; cursor: pointer; }
.tab.active { color: white; background: var(--text); border-color: var(--text); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.product-card { display: flex; flex-direction: column; min-height: 260px; padding: 20px; border: 1px solid var(--line); background: white; border-radius: 24px; transition: transform .18s ease, box-shadow .18s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(15,23,42,.08); }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.badge { font-size: 12px; padding: 5px 9px; border-radius: 999px; background: #f3f4f6; color: #4b5563; }
.badge.stock { background: rgba(22,163,74,.1); color: var(--success); }
.badge.empty-stock { background: rgba(220,38,38,.1); color: var(--danger); }
.product-card h3 { margin: 0 0 10px; font-size: 20px; }
.product-desc { color: var(--muted); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 76px; }
.price-row { margin-top: auto; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.price { font-size: 24px; font-weight: 900; color: var(--primary); }
.price small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 2px; }
.empty { text-align: center; color: var(--muted); padding: 50px 10px; border: 1px dashed var(--line); border-radius: 22px; }
.query-form { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(180px, .55fr) auto; gap: 12px; }
.result-card { margin-top: 16px; border: 1px solid var(--line); border-radius: 20px; padding: 18px; background: #fafafa; line-height: 1.8; }
.dialog { width: min(720px, calc(100% - 28px)); padding: 0; border: 0; }
.dialog::backdrop { background: rgba(15,23,42,.48); backdrop-filter: blur(4px); }
.dialog-close-form { margin: 0; }
.dialog-close { position: absolute; right: 16px; top: 14px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f3f4f6; cursor: pointer; font-size: 24px; }
.dialog-content { padding: 30px; }
.detail-title { padding-right: 45px; }
.detail-desc { color: var(--muted); line-height: 1.8; white-space: pre-wrap; }
.order-form { display: grid; gap: 12px; margin-top: 20px; }
.form-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; }
.notice { padding: 12px 14px; border-radius: 16px; background: rgba(124,58,237,.08); color: #4c1d95; line-height: 1.7; }
.price-notice { text-align: center; }
.tier-lines { margin-top: 12px; display: grid; gap: 4px; }
.tier-line { color: #16a34a; font-weight: 800; }
.pay-estimate-row {
  padding: 12px 14px;
  border: 1px solid rgba(34, 197, 94, .18);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(240, 253, 244, .92), rgba(236, 253, 245, .72));
}
.pay-estimate {
  display: grid;
  gap: 2px;
  color: #166534;
}
.pay-estimate strong {
  color: #16a34a;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -.02em;
}
.pay-estimate span {
  color: #059669;
  font-weight: 900;
}
.pay-estimate small {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.error { color: var(--danger); }
.success { color: var(--success); }
.cards-output { padding: 12px; border-radius: 14px; background: #111827; color: #f9fafb; white-space: pre-wrap; overflow: auto; }
.site-footer { color: var(--muted); padding: 36px 0 50px; text-align: center; }
@media (max-width: 900px) {
  .hero-grid, .product-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 34px; }
}
@media (max-width: 640px) {
  .header-grid, .section-title, .hero-search, .query-form { align-items: stretch; flex-direction: column; display: flex; }
  .header-actions { width: 100%; justify-content: space-between; }
  .panel { padding: 18px; border-radius: 22px; }
  .form-row { grid-template-columns: 1fr; }
}

.pay-box { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: #f8fafc; color: #111827; line-height: 1.8; }
.pay-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.pay-info { margin-top: 10px; }
.pay-info span { display: block; font-size: 13px; font-weight: 800; color: #4b5563; margin-bottom: 6px; }


/* 20260815: frontend storefront layout */
[hidden] { display: none !important; }
.announcement-wrap { padding: 42px 0 18px; }
.announcement-box {
  min-height: 230px;
  padding: 34px 36px;
  border-radius: 28px;
  border: 1px solid rgba(229,231,235,.88);
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
}
.announcement-title { font-size: clamp(32px, 4.5vw, 54px); }
.announcement-content {
  margin-top: 18px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
  white-space: pre-wrap;
}
#products-panel { scroll-margin-top: 92px; }
.catalog-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin: 28px auto;
}
.catalog-layout .panel { margin: 0; }
.category-sidebar {
  position: sticky;
  top: 88px;
  padding: 18px 14px;
  border-radius: 20px;
}
.category-sidebar h3 {
  margin: 0 0 14px;
  padding: 0 2px;
  font-size: 14px;
  font-weight: 900;
  color: #374151;
}
.category-tabs-vertical {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
}
.category-tabs-vertical .tab {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 14px;
  border-color: transparent;
  background: transparent;
  color: #4b5563;
  font-weight: 900;
  text-align: left;
}
.category-tabs-vertical .tab.active {
  color: var(--text);
  background: #f8ede9;
  border-color: transparent;
}
.product-grid { display: block; }
.category-section { scroll-margin-top: 96px; margin-top: 26px; }
.category-section:first-child { margin-top: 8px; }
.category-heading { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.category-heading::after { content: ''; height: 1px; flex: 1; background: linear-gradient(90deg, rgba(124,58,237,.18), rgba(229,231,235,.72)); }
.category-heading h3 { margin: 0; font-size: 18px; font-weight: 900; }
.category-heading span { color: var(--muted); font-size: 13px; font-weight: 700; }
.product-list { display: grid; gap: 8px; }
.product-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 120px 108px;
  align-items: center;
  gap: 18px;
  min-height: 66px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.product-row:hover { background: #fffaf7; border-color: rgba(124,58,237,.18); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(15,23,42,.05); }
.product-row.is-disabled { opacity: .58; cursor: not-allowed; }
.product-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: block;
  overflow: hidden;
  background: #e0f2fe;
  box-shadow: none;
}
.product-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.product-row-main h4 { margin: 0; font-size: 15px; font-weight: 700; color: var(--text); }
.product-row-main { min-width: 0; }
.product-row-main p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: none; }
.product-row-stock { justify-self: end; min-width: 104px; display: grid; gap: 2px; text-align: right; transform: none; }
.product-row-price { justify-self: center; min-width: 98px; display: grid; gap: 2px; text-align: right; transform: translateX(18px); }
.product-row-price small { color: var(--muted); font-size: 12px; }
.row-stock { color: #22c55e; font-size: 13px; font-weight: 900; }
.row-stock.empty { color: #22c55e; }
.row-price { color: #e11fcf; font-size: 18px; }
.row-wholesale { color: #2563eb; font-size: 12px; font-weight: 800; }
.product-page { margin-top: 34px; }
.page-loading { padding: 40px; text-align: center; color: var(--muted); }
.back-link { display: inline-flex; align-items: center; margin-bottom: 18px; color: #374151; font-weight: 800; }
.back-link:hover { color: var(--primary); }
.product-detail-page { display: grid; grid-template-columns: 1fr minmax(340px, 460px); gap: 22px; align-items: start; }
.detail-main-card, .order-page-form { border: 1px solid var(--line); border-radius: 24px; background: white; padding: 24px; }
.detail-title-page { font-size: clamp(28px, 4vw, 42px); margin: 8px 0 14px; }
.order-page-form { box-shadow: 0 16px 38px rgba(15,23,42,.06); }
.payment-select { padding: 14px; border: 1px solid rgba(124,58,237,.12); border-radius: 18px; background: #fffdfb; }
.payment-title { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); color: #3f3f46; }
.payment-icon { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #8b5e4a; color: white; font-size: 12px; }
.payment-method {
  margin-top: 12px;
  min-width: 165px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 14px;
  padding: 13px 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: default;
  color: #6b7280;
  font: inherit;
}
.payment-method.active { border-color: rgba(16,185,129,.22); background: #ffffff; box-shadow: 0 8px 18px rgba(16,185,129,.06); }
.usdt-icon { width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; color: white; background: #10b981; font-weight: 900; }
.payment-method strong { color: #6b7280; }
.submit-order { width: 100%; border-radius: 14px; }
.query-panel { margin-top: 34px; }
.error-page { padding: 30px; }
@media (max-width: 900px) {
  .product-detail-page { grid-template-columns: 1fr; }
  .catalog-layout { grid-template-columns: 1fr; }
  .category-sidebar { position: static; }
  .category-tabs-vertical { display: flex; flex-wrap: wrap; }
  .category-tabs-vertical .tab { width: auto; min-height: 42px; border: 1px solid var(--line); background: white; border-radius: 999px; }
  .product-row { grid-template-columns: 48px minmax(0, 1fr) 104px; }
  .product-row-price { grid-column: 2; grid-row: 2; justify-self: start; text-align: left; min-width: 0; transform: none; }
  .product-row-stock { grid-column: 3; grid-row: 1 / 3; justify-self: end; text-align: right; transform: none; }
}
@media (max-width: 640px) {
  .announcement-box { padding: 24px 20px; border-radius: 22px; }
  .product-row { gap: 12px; padding: 12px; }
  .product-row-main p { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

/* 20260815: payment dialog */
.pay-dialog { width: min(620px, calc(100% - 28px)); }
.pay-dialog .dialog-content { padding: 26px; }
.pay-dialog-title { margin: 0 48px 14px 0; font-size: 22px; }
.pay-box-modal { margin-top: 0; text-align: center; }
.pay-box-modal .notice { text-align: left; }
.pay-box-modal .pay-actions { justify-content: center; }
.pay-box-modal .pay-info { text-align: left; }
/* 20260815 notice panel same size as product panel */
.announcement-box { min-height: auto; padding: 28px; }
.announcement-title { font-size: 22px; line-height: 1.25; letter-spacing: 0; }
.announcement-content { margin-top: 14px; font-size: 15px; line-height: 1.8; }
.announcement-box .announcement-content:first-child { margin-top: 0; }
/* 20260815 pay qr modal + telegram floating button */
.pay-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.pay-summary div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: left; }
.pay-summary span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; margin-bottom: 3px; }
.pay-summary strong { color: var(--text); font-size: 15px; word-break: break-all; }
.pay-countdown-value { color: var(--primary) !important; font-size: 18px !important; }
.payment-qr-wrap { display: flex; justify-content: center; margin: 16px 0 12px; }
.payment-qr { width: 210px; height: 210px; border-radius: 18px; border: 1px solid var(--line); background: white; padding: 10px; box-shadow: 0 12px 28px rgba(15,23,42,.08); }
.pay-box-modal .pay-actions { display: none; }
.tg-float { position: fixed; right: 28px; bottom: 28px; z-index: 40; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: white; background: linear-gradient(135deg,#38bdf8,#0284c7); box-shadow: 0 14px 30px rgba(2,132,199,.35); transition: transform .18s ease, box-shadow .18s ease; }
.tg-float:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(2,132,199,.42); }
.tg-float svg { width: 24px; height: 24px; }
@media (max-width: 640px) { .pay-summary { grid-template-columns: 1fr; } .payment-qr { width: 190px; height: 190px; } .tg-float { right: 18px; bottom: 18px; width: 44px; height: 44px; } }

/* 20260815 premium homepage visual polish */
:root {
  --bg: #f4f7fb;
  --text: #101828;
  --muted: #667085;
  --line: #e6eaf1;
  --primary: #7058ff;
  --primary-2: #2f80ed;
  --shadow: 0 22px 60px rgba(15, 23, 42, .075);
}
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(112, 88, 255, .11), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(45, 212, 191, .10), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #f4f7fb 48%, #f7f8fb 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.container { width: min(1200px, calc(100% - 36px)); }
.site-header {
  background: rgba(255, 255, 255, .78);
  border-bottom: 1px solid rgba(226, 232, 240, .72);
  box-shadow: 0 8px 30px rgba(15, 23, 42, .035);
}
.header-grid { min-height: 68px; }
.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(135deg, #111827, #334155);
  box-shadow: 0 12px 24px rgba(15, 23, 42, .16);
}
.brand strong { font-size: 17px; letter-spacing: -.02em; }
.brand small { color: #7b8794; font-size: 12px; }
.nav-link {
  padding: 9px 15px;
  border: 1px solid rgba(226, 232, 240, .9);
  background: rgba(255,255,255,.72);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
  font-weight: 800;
}
.nav-link:hover { background: #fff; border-color: rgba(112, 88, 255, .28); color: #4338ca; }
.panel, .dialog {
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(226,232,240,.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.announcement-box {
  padding: 22px 26px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.90)),
    radial-gradient(circle at 100% 0%, rgba(112, 88, 255, .10), transparent 34%);
  box-shadow: 0 18px 50px rgba(15,23,42,.055);
}
.announcement-content {
  color: #475467;
  font-size: 15px;
  line-height: 1.85;
}
.catalog-layout {
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.category-sidebar {
  top: 84px;
  padding: 18px 14px;
  border-radius: 24px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 18px 48px rgba(15, 23, 42, .07);
}
.category-sidebar h3 {
  margin-bottom: 12px;
  padding: 0 4px;
  font-size: 13px;
  letter-spacing: .02em;
  color: #475467;
}
.category-tabs-vertical { gap: 7px; }
.category-tabs-vertical .tab {
  min-height: 44px;
  padding: 10px 13px;
  border-radius: 15px;
  color: #475467;
  font-size: 14px;
  letter-spacing: -.01em;
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.category-tabs-vertical .tab:hover {
  background: rgba(112, 88, 255, .075);
  color: #1f2937;
  transform: translateX(2px);
}
.category-tabs-vertical .tab.active {
  color: #111827;
  background: linear-gradient(135deg, #fff7ed, #f6edff);
  box-shadow: inset 0 0 0 1px rgba(234, 179, 8, .08), 0 10px 24px rgba(15, 23, 42, .055);
}
.catalog-main {
  border-radius: 24px;
  padding: 24px;
}
.catalog-main .section-title {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(226, 232, 240, .74);
}
.catalog-main .section-title h2 {
  font-size: 22px;
  letter-spacing: -.03em;
}
.btn-ghost {
  background: #f8fafc;
  border: 1px solid #e6eaf1;
  color: #475467;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .035);
}
.btn-ghost:hover { background: #fff; color: #111827; }
.category-section { margin-top: 22px; }
.category-section:first-child { margin-top: 2px; }
.category-heading {
  margin-bottom: 9px;
  color: #101828;
}
.category-heading h3 {
  font-size: 17px;
  letter-spacing: -.02em;
}
.category-heading span {
  color: #98a2b3;
  font-size: 12px;
}
.product-list { gap: 9px; }
.product-row {
  grid-template-columns: 54px minmax(0, 1fr) 118px 122px;
  min-height: 70px;
  padding: 13px 16px;
  gap: 16px;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, .92);
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .035);
}
.product-row:hover {
  background: #ffffff;
  border-color: rgba(112, 88, 255, .24);
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .075);
}
.product-avatar {
  width: 42px;
  height: 42px;
  box-shadow: 0 8px 18px rgba(2, 132, 199, .18);
}
.product-row-main h4 {
  font-size: 15.5px;
  line-height: 1.42;
  font-weight: 850;
  letter-spacing: -.015em;
  color: #101828;
}
.product-row-price {
  justify-self: center;
  text-align: left;
  transform: translateX(8px);
}
.product-row-price small {
  margin-top: 1px;
  color: #98a2b3;
  font-size: 11.5px;
}
.row-price {
  color: #e11fcf;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.02em;
}
.product-row-stock {
  min-width: 116px;
  justify-self: end;
  text-align: right;
  align-content: center;
}
.row-stock {
  color: #22c55e;
  font-size: 14px;
  font-weight: 950;
}
.row-wholesale {
  justify-self: end;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  color: #7c3aed;
  background: rgba(124, 58, 237, .10);
  font-size: 11.5px;
  font-weight: 900;
}
.site-footer {
  color: #98a2b3;
  font-size: 13px;
}
.tg-float {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  box-shadow: 0 18px 38px rgba(2, 132, 199, .34);
}
@media (max-width: 900px) {
  .catalog-layout { gap: 14px; }
  .category-sidebar { border-radius: 22px; }
  .category-tabs-vertical .tab { min-height: 40px; }
  .product-row { grid-template-columns: 48px minmax(0, 1fr) 110px; }
  .product-row-price { transform: none; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 24px, 1200px); }
  .catalog-main, .category-sidebar, .announcement-box { padding: 18px; }
  .product-row {
    min-height: 68px;
    border-radius: 16px;
    padding: 12px;
  }
  .product-row-main h4 { font-size: 14.5px; }
  .row-price { font-size: 16.5px; }
  .row-stock { font-size: 13px; }
}


/* 20260815: homepage price/stock visual tweak */
.product-row-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-width: 112px;
  text-align: left;
}
.product-row-price .row-price {
  color: #7c3aed;
  font-size: 22px;
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -.03em;
}
.product-row-price small {
  color: #667085;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 650;
}
.product-row-stock .row-stock {
  display: inline-flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 5px;
  color: inherit;
}
.row-stock .stock-label {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}
.row-stock .stock-num {
  color: #22c55e;
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
}
.row-stock.empty .stock-num { color: #94a3b8; }
@media (max-width: 640px) {
  .product-row-price .row-price { font-size: 19px; }
  .product-row-stock .row-stock { gap: 4px; }
  .row-stock .stock-num { font-size: 14px; }
}


/* 20260815: PC adaptive layout width */
:root {
  --pc-page-max: 1200px;
  --pc-page-gap: clamp(18px, 2.4vw, 36px);
}
.container {
  width: min(var(--pc-page-max), calc(100% - (var(--pc-page-gap) * 2)));
}
@media (min-width: 1280px) {
  .container { --pc-page-max: 1200px; }
  .announcement-box,
  .catalog-layout,
  .product-page,
  .query-panel {
    max-width: 1200px;
  }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  :root { --pc-page-gap: 18px; }
  .container { width: calc(100% - 36px); }
  .catalog-layout {
    grid-template-columns: 205px minmax(0, 1fr);
    gap: 14px;
  }
  .category-sidebar { padding: 16px 12px; }
  .catalog-main { padding: 20px; }
  .product-row {
    grid-template-columns: 50px minmax(0, 1fr) 104px 108px;
    gap: 12px;
    padding: 12px 14px;
  }
  .product-row-main h4 { font-size: 14.5px; }
  .product-row-price .row-price { font-size: 20px; }
  .row-stock .stock-num { font-size: 14px; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .product-detail-page {
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 16px;
  }
  .detail-main-card,
  .order-page-form { padding: 20px; }
  .detail-title-page { font-size: 32px; }
  .form-row { grid-template-columns: 120px 1fr; }
}
@media (min-width: 1600px) {
  .announcement-box { margin-top: 30px; }
  .catalog-layout { margin-top: 30px; }
}


/* 20260815: homepage price inner position */
.product-row-price .row-price {
  display: block;
  white-space: nowrap;
}
.product-row-price small {
  display: block;
  padding-left: 20px;
  margin-top: 4px;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .product-row-price small { padding-left: 17px; margin-top: 3px; }
}


/* 20260815: free price alignment */
.product-row-price.is-free {
  align-items: center;
  text-align: center;
}
.product-row-price.is-free .row-price {
  width: 86px;
  text-align: center;
}
.product-row-price.is-free small {
  width: 86px;
  padding-left: 0;
  text-align: center;
}


/* 20260815: product detail retail bold */
.price-notice .retail-line {
  display: block;
  font-weight: 800;
}
.price-notice .retail-line strong {
  font-weight: 950;
}


/* 20260815: mobile storefront optimization */
@media (max-width: 640px) {
  body {
    background:
      radial-gradient(circle at 12% 0%, rgba(112, 88, 255, .10), transparent 30%),
      radial-gradient(circle at 90% 8%, rgba(45, 212, 191, .10), transparent 26%),
      #f6f8fb;
  }
  .site-header { position: sticky; top: 0; }
  .header-grid {
    min-height: 58px;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  .brand { gap: 9px; min-width: 0; }
  .brand-logo { width: 34px; height: 34px; border-radius: 11px; flex: 0 0 auto; }
  .brand strong { font-size: 15px; }
  .brand small { font-size: 11px; white-space: nowrap; }
  .header-actions { width: auto; flex: 0 0 auto; }
  .nav-link { padding: 8px 11px; font-size: 13px; }
  .announcement-box {
    margin-top: 14px;
    padding: 16px;
    border-radius: 20px;
  }
  .announcement-content { font-size: 13.5px; line-height: 1.75; }
  .catalog-layout {
    display: block;
    margin-top: 12px;
  }
  .category-sidebar {
    position: sticky;
    top: 66px;
    z-index: 9;
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 18px;
  }
  .category-sidebar h3 {
    margin: 0 0 9px;
    font-size: 13px;
  }
  .category-tabs-vertical {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding: 1px 2px 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .category-tabs-vertical::-webkit-scrollbar { display: none; }
  .category-tabs-vertical .tab {
    flex: 0 0 auto;
    width: auto;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid rgba(226,232,240,.9);
    border-radius: 999px;
    background: rgba(255,255,255,.82);
    white-space: nowrap;
    font-size: 13px;
  }
  .category-tabs-vertical .tab.active {
    background: linear-gradient(135deg, #fff7ed, #f6edff);
    border-color: rgba(124,58,237,.16);
  }
  .catalog-main {
    display: block;
    padding: 15px;
    border-radius: 20px;
  }
  .catalog-main .section-title {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
  }
  .catalog-main .section-title h2 { font-size: 19px; }
  #refresh-btn { padding: 8px 11px; border-radius: 12px; font-size: 13px; }
  .category-section { margin-top: 18px; }
  .category-section:first-child { margin-top: 2px; }
  .category-heading { gap: 8px; margin-bottom: 8px; }
  .category-heading h3 { font-size: 15px; }
  .category-heading span { font-size: 11px; white-space: nowrap; }
  .product-grid,
  .product-list { display: grid !important; }
  .product-list { gap: 8px; }
  .product-row {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 82px;
    grid-template-rows: auto auto;
    grid-template-areas:
      "avatar title stock"
      "avatar price stock";
    align-items: center;
    gap: 4px 10px;
    min-height: 62px;
    padding: 10px;
    border-radius: 16px;
  }
  .product-avatar {
    grid-area: avatar;
    width: 38px;
    height: 38px;
  }
  .product-row-main {
    grid-area: title;
    min-width: 0;
  }
  .product-row-main h4 {
    font-size: 13.5px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .product-row-price {
    grid-area: price;
    justify-self: start;
    align-items: flex-start;
    min-width: 0;
    transform: none;
    text-align: left;
  }
  .product-row-price .row-price { font-size: 17px; }
  .product-row-price small {
    padding-left: 15px;
    margin-top: 2px;
    font-size: 11px;
  }
  .product-row-price.is-free {
    align-items: flex-start;
    text-align: left;
  }
  .product-row-price.is-free .row-price,
  .product-row-price.is-free small {
    width: auto;
    text-align: left;
  }
  .product-row-price.is-free small { padding-left: 0; }
  .product-row-stock {
    grid-area: stock;
    justify-self: end;
    min-width: 78px;
    text-align: right;
    align-content: center;
    gap: 3px;
  }
  .row-stock .stock-label { font-size: 11px; }
  .row-stock .stock-num { font-size: 13px; }
  .row-wholesale { font-size: 10.5px; padding: 2px 6px; }
  .product-page,
  .query-panel { margin-top: 16px; }
  .product-detail-page { gap: 14px; }
  .detail-main-card,
  .order-page-form { padding: 16px; border-radius: 20px; }
  .detail-title-page { font-size: 25px; line-height: 1.16; text-align: left; }
  .detail-desc { font-size: 13.5px; line-height: 1.75; }
  .price-notice { text-align: center; }
  .tier-line { font-size: 13.5px; }
  .order-form { gap: 10px; }
  .form-row { grid-template-columns: 1fr; gap: 7px; }
  .form-row label { font-size: 13px; color: #667085; font-weight: 800; }
  input, textarea { border-radius: 14px; padding: 12px 13px; }
  .pay-estimate-row { padding: 12px; }
  .pay-estimate strong { font-size: 20px; }
  .payment-select { padding: 12px; border-radius: 16px; }
  .payment-method { width: 100%; justify-content: center; }
  .query-form { display: grid; grid-template-columns: 1fr; }
}


/* 20260815: mobile product content sizing */
@media (max-width: 640px) {
  .product-row {
    grid-template-columns: 40px minmax(0, 1fr) 76px;
    gap: 4px 9px;
    min-height: 60px;
    padding: 9px 10px;
  }
  .product-avatar {
    width: 36px;
    height: 36px;
  }
  .product-row-main h4 {
    font-size: 13.2px;
    line-height: 1.32;
    font-weight: 850;
  }
  .product-row-price .row-price {
    font-size: 16.5px;
    line-height: 1.05;
  }
  .product-row-price small {
    padding-left: 14px;
    font-size: 10.5px;
    line-height: 1.15;
  }
  .row-stock .stock-label { font-size: 10.5px; }
  .row-stock .stock-num { font-size: 12.8px; }
  .row-wholesale {
    font-size: 10px;
    padding: 2px 6px;
  }

  .product-page {
    width: min(100% - 20px, 1200px);
    padding: 14px;
    border-radius: 22px;
  }
  .back-link {
    margin-bottom: 12px;
    font-size: 13px;
  }
  .product-detail-page { gap: 12px; }
  .detail-main-card,
  .order-page-form {
    padding: 14px;
    border-radius: 18px;
  }
  .badges {
    gap: 6px;
    margin-bottom: 9px;
  }
  .badge {
    font-size: 10.5px;
    padding: 4px 8px;
  }
  .detail-title-page {
    margin: 6px 0 10px;
    font-size: 22px;
    line-height: 1.18;
    letter-spacing: -.03em;
  }
  .detail-desc {
    font-size: 13px;
    line-height: 1.62;
  }
  .price-notice {
    padding: 11px 12px;
    border-radius: 15px;
    font-size: 13px;
    line-height: 1.55;
  }
  .price-notice .retail-line strong {
    font-size: 13.5px;
  }
  .tier-lines {
    margin-top: 9px;
    gap: 4px;
  }
  .tier-line {
    font-size: 12.8px;
    line-height: 1.5;
  }
  .order-page-form { margin-top: 0; }
  .order-form { gap: 9px; }
  .form-row { gap: 6px; }
  .form-row label {
    font-size: 12.5px;
    line-height: 1.2;
  }
  input, textarea {
    min-height: 43px;
    padding: 11px 12px;
    font-size: 14px;
  }
  .pay-estimate-row {
    padding: 11px 12px;
    border-radius: 15px;
  }
  .pay-estimate strong {
    font-size: 19px;
    line-height: 1.15;
  }
  .pay-estimate span { font-size: 13px; }
  .pay-estimate small { font-size: 11px; }
  .payment-title { font-size: 13px; }
  .payment-method {
    min-width: 0;
    padding: 11px 13px;
    font-size: 13px;
  }
  .submit-order {
    min-height: 44px;
    font-size: 14px;
  }
}


/* 20260815: mobile product detail width fix */
#product-page-body:not(.page-loading) {
  padding: 0;
  text-align: initial;
  color: inherit;
}
@media (max-width: 640px) {
  .product-page {
    width: calc(100% - 8px);
    padding: 8px;
    margin-top: 8px;
    border-radius: 20px;
  }
  #product-page-body:not(.page-loading) {
    width: 100%;
  }
  .product-detail-page {
    width: 100%;
    gap: 10px;
  }
  .detail-main-card,
  .order-page-form {
    width: 100%;
    padding: 13px;
  }
  .detail-title-page {
    font-size: 23px;
  }
  .detail-desc {
    text-align: left;
  }
}


/* 20260815: pay estimate U alignment */
.pay-estimate {
  justify-items: center;
  text-align: center;
}
.pay-estimate span {
  display: block;
  text-align: center;
}







/* 20260815: desktop fixed proportion layout */
#desktop-scale-outer,
#desktop-scale-inner { width: 100%; }

@media (min-width: 901px) {
  html { overflow-x: hidden; }
  body.desktop-autoscaled { overflow-x: hidden; }
  body.desktop-autoscaled #desktop-scale-outer {
    width: 100%;
    position: relative;
    overflow: visible;
  }
  body.desktop-autoscaled #desktop-scale-inner {
    width: 1920px;
    max-width: none;
    position: relative;
    left: 50%;
    margin-left: -960px;
    transform: scale(var(--desktop-auto-scale));
    transform-origin: top center;
  }
  body.desktop-autoscaled .container,
  body.desktop-autoscaled .announcement-box,
  body.desktop-autoscaled .catalog-layout,
  body.desktop-autoscaled .product-page,
  body.desktop-autoscaled .query-panel,
  body.desktop-autoscaled .site-header .container {
    width: 1200px !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  body.desktop-autoscaled .announcement-box {
    margin-top: 32px !important;
    margin-bottom: 0 !important;
  }
  body.desktop-autoscaled .catalog-layout {
    grid-template-columns: 228px minmax(0, 1fr) !important;
    gap: 18px !important;
    margin-top: 30px !important;
  }
  body.desktop-autoscaled .catalog-main { padding: 24px !important; }
  body.desktop-autoscaled .category-sidebar { padding: 18px 14px !important; }
  body.desktop-autoscaled .product-row {
    grid-template-columns: 54px minmax(0, 1fr) 122px 120px !important;
    gap: 16px !important;
    padding: 13px 16px !important;
  }
}


/* 20260815: desktop order input width */
@media (min-width: 901px) {
  .order-page-form .form-row {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 10px;
  }
  .order-page-form .form-row label {
    white-space: nowrap;
  }
}



/* 20260815: desktop homepage product title size */
@media (min-width: 901px) {
  .catalog-main .product-row-main h4 {
    font-size: 18px;
  }
}


/* 20260815: ?????????? */
.brand-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

/* 20260815: fix zero-stock row inheriting generic .empty box style */
.product-row .row-stock.empty {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  text-align: inherit !important;
}
.product-row.is-disabled {
  min-height: 70px;
}


/* 20260815: order limit, copy/download tools, white card/address boxes */
.pay-estimate-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.pay-limit-badge {
  min-width: 86px;
  padding: 8px 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(124,58,237,.16);
  text-align: center;
  box-shadow: 0 8px 18px rgba(15,23,42,.04);
}
.pay-limit-badge span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}
.pay-limit-badge strong {
  display: block;
  color: #ef4444;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.1;
}
.wallet-info,
.delivery-cards {
  text-align: left;
}
.wallet-head,
.text-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0;
}
.wallet-head span {
  margin: 0 !important;
  color: #111827 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}
.text-tool-btn {
  appearance: none;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 999px;
  background: #fff;
  color: #111827;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15,23,42,.05);
}
.text-tool-btn:hover { border-color: rgba(124,58,237,.32); color: #6d28d9; }
.cards-output.wallet-address,
.cards-output.delivery-cards {
  background: #fff !important;
  color: #111827 !important;
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
  user-select: text;
}
.cards-output.wallet-address { word-break: break-all; }
.front-toast {
  position: fixed;
  left: 50%;
  top: 24px;
  bottom: auto;
  transform: translateX(-50%) translateY(-12px);
  z-index: 2147483647;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(17,24,39,.92);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: 0 16px 36px rgba(15,23,42,.24);
}
.front-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 640px) {
  .pay-estimate-wrap { grid-template-columns: 1fr; gap: 8px; }
  .pay-limit-badge { width: 100%; }
  .wallet-head,
  .text-tools { justify-content: center; flex-wrap: wrap; }
}

/* 20260815: ????????????????????????? */
body.front-modal-open { overflow: hidden; }
dialog[open] .dialog-content { position: relative; }
dialog[open] .dialog-content > .front-toast,
dialog[open] > .front-toast {
  position: absolute;
  top: 12px;
  bottom: auto;
  left: 50%;
  right: auto;
  z-index: 2147483647;
  transform: translateX(-50%) translateY(-8px);
  white-space: nowrap;
  pointer-events: none;
}
dialog[open] .dialog-content > .front-toast.show,
dialog[open] > .front-toast.show {
  transform: translateX(-50%) translateY(0);
}
dialog[open]::backdrop { pointer-events: auto; }

/* 20260815: ????/????????????????? */
.dialog { position: relative; }
.dialog-close-form {
  position: absolute;
  right: 16px;
  top: 14px;
  z-index: 2147483647;
  margin: 0;
}
.dialog-close {
  position: static;
  display: grid;
  place-items: center;
  color: #111827;
  line-height: 1;
}

/* 20260815: clean order query result */
.query-result-card {
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(148, 163, 184, .22);
  box-shadow: 0 18px 48px rgba(15, 23, 42, .08);
  line-height: 1.55;
}
.query-result-card.is-loading { color: var(--muted); text-align: center; }
.query-result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid rgba(148, 163, 184, .2); }
.query-kicker { display: block; color: #7c3aed; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.query-result-head h3 { margin: 0; font-size: 22px; color: #0f172a; }
.query-status { display: inline-grid; place-items: center; min-width: 72px; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 900; }
.query-status.is-completed { background: #dcfce7; color: #15803d; }
.query-status.is-pending { background: #fef3c7; color: #b45309; }
.query-status.is-other { background: #fee2e2; color: #b91c1c; }
.query-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.query-info-grid > div { padding: 12px 14px; border: 1px solid rgba(148, 163, 184, .18); border-radius: 14px; background: #f8fafc; }
.query-info-grid span { display: block; color: #64748b; font-size: 12px; font-weight: 800; margin-bottom: 5px; }
.query-info-grid strong { color: #0f172a; font-size: 14px; word-break: break-word; }
.query-notice { margin-top: 14px; }
.query-actions { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.query-delivery { margin-top: 14px; }
.query-section-title { font-weight: 900; margin-bottom: 8px; }
.query-error { display: grid; gap: 6px; text-align: center; color: #b91c1c; }
.query-error strong { font-size: 18px; }
.query-error span { color: #7f1d1d; }
@media (max-width: 640px) {
  .query-result-head { flex-direction: column; }
  .query-info-grid { grid-template-columns: 1fr; }
}


/* 20260816: frontend web user login/register */
.auth-login-btn { border: 1px solid rgba(229,231,235,.95); background: #111827; color: #fff; font-weight: 900; }
.auth-login-btn:hover { background: #0f172a; color: #fff; }
.user-chip { border: 1px solid rgba(124,58,237,.25); background: linear-gradient(135deg, rgba(124,58,237,.10), rgba(37,99,235,.08)); color: #111827; border-radius: 999px; padding: 9px 14px; font-weight: 900; cursor: pointer; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-dialog { width: min(520px, calc(100% - 28px)); }
.auth-form { display: grid; gap: 14px; }
.auth-form h2, .account-panel h2, .auth-success h2 { margin: 0; font-size: 24px; }
.auth-desc { margin: -4px 0 4px; color: var(--muted); line-height: 1.7; }
.auth-form label { display: grid; gap: 7px; color: #475569; font-weight: 800; }
.auth-submit { width: 100%; margin-top: 4px; }
.auth-switch { border: 0; background: transparent; color: #2563eb; font-weight: 800; cursor: pointer; padding: 6px; }
.auth-error { padding: 10px 12px; border-radius: 14px; background: rgba(220,38,38,.08); color: #dc2626; font-weight: 800; }
.auth-bind-card { margin-top: 14px; padding: 16px; border: 1px solid rgba(22,163,74,.22); border-radius: 20px; background: linear-gradient(135deg, rgba(236,253,245,.98), rgba(255,255,255,.92)); }
.auth-bind-card span { display: block; color: #64748b; font-size: 13px; font-weight: 800; }
.auth-bind-card strong { display: block; margin: 6px 0; color: #16a34a; font-size: 36px; letter-spacing: .16em; font-variant-numeric: tabular-nums; }
.auth-bind-card p { margin: 0; color: #475569; line-height: 1.7; }
.auth-success { display: grid; gap: 12px; }
.auth-success > p { color: #475569; line-height: 1.7; margin: 0; }
.account-panel { display: grid; gap: 16px; }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.account-grid > div { padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.account-grid span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.account-grid strong { display: block; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.danger-text { color: #dc2626; }
@media (max-width: 640px) {
  .header-actions { gap: 6px; }
  .nav-link, .auth-login-btn, .user-chip { padding: 8px 10px; font-size: 13px; }
  .account-grid { grid-template-columns: 1fr; }
  .auth-bind-card strong { font-size: 30px; }
}


/* 20260817: web register waits for Telegram binding */
.auth-bind-wait .bind-countdown { color: #16a34a; font-weight: 950; font-variant-numeric: tabular-nums; }
.auth-bind-wait .bind-countdown.expired { color: #dc2626; }
.auth-bind-card-wait { text-align: center; }
.auth-bind-card-wait strong { color: #059669; text-shadow: 0 8px 26px rgba(16,185,129,.14); }
.auth-bind-card-wait .text-tool-btn { margin: 6px auto 10px; }
.auth-wait-status { padding: 12px 14px; border-radius: 16px; background: rgba(124,58,237,.08); color: #4c1d95; font-weight: 850; text-align: center; }

/* 20260817: web account profile */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
}
.user-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-chip strong {
  color: #059669;
  font-size: 12px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}
.profile-panel { margin-top: 34px; }
.profile-page { display: grid; gap: 22px; }
.profile-hero {
  min-height: 170px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px auto;
  gap: 18px;
  align-items: center;
  padding: 24px;
  border: 1px solid rgba(226,232,240,.9);
  border-radius: 26px;
  background:
    radial-gradient(circle at 12% 0%, rgba(124,58,237,.11), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(16,185,129,.11), transparent 30%),
    rgba(255,255,255,.86);
}
.profile-eyebrow { margin: 0 0 8px; color: #7c3aed; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
.profile-hero h1 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -.035em; }
.profile-hero span { display: block; margin-top: 8px; color: #64748b; font-weight: 750; }
.profile-balance-card {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(236,253,245,.96), rgba(255,255,255,.9));
  border: 1px solid rgba(16,185,129,.2);
  text-align: center;
}
.profile-balance-card span { margin: 0 0 8px; color: #64748b; font-size: 13px; }
.profile-balance-card strong { display: block; color: #059669; font-size: 30px; font-weight: 950; }
.profile-actions { display: flex; flex-direction: column; gap: 10px; min-width: 120px; }
.profile-orders-panel { display: grid; gap: 12px; }
.profile-section-title { padding-bottom: 14px; border-bottom: 1px solid #e6eaf1; }
.profile-subtitle { color: #64748b; font-size: 13px; font-weight: 750; }
.profile-orders { display: grid; gap: 10px; }
.profile-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 92px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(226,232,240,.95);
  border-radius: 18px;
  background: rgba(255,255,255,.92);
}
.profile-order-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.profile-order-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-platform { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 24px; border-radius: 999px; font-size: 12px; font-weight: 950; }
.profile-platform.web { color: #1d4ed8; background: #dbeafe; border: 1px solid #bfdbfe; }
.profile-platform.tg { color: #0369a1; background: #e0f2fe; border: 1px solid #bae6fd; }
.profile-order-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 5px; color: #64748b; font-size: 12px; }
.profile-order-money { text-align: right; font-variant-numeric: tabular-nums; }
.profile-order-money strong { display: block; color: #7c3aed; font-size: 17px; font-weight: 950; }
.profile-order-money span { color: #64748b; font-size: 12px; font-weight: 800; }
.profile-order-state { text-align: center; padding: 7px 10px; border-radius: 999px; background: #f1f5f9; color: #475569; font-weight: 900; font-size: 13px; }
.profile-order-state.ok { background: #dcfce7; color: #15803d; }
.profile-order-state.pending { background: #fef3c7; color: #b45309; }
.profile-login-required { max-width: 520px; margin: 20px auto; text-align: center; display: grid; gap: 14px; }
.profile-login-required p { color: #64748b; line-height: 1.7; }
@media (min-width: 1280px) { .profile-panel { max-width: 1200px; } }
@media (min-width: 901px) {
  body.desktop-autoscaled .profile-panel { width: 1200px !important; max-width: 1200px !important; margin-left: auto !important; margin-right: auto !important; }
}
@media (max-width: 760px) {
  .profile-hero { grid-template-columns: 1fr; padding: 18px; }
  .profile-actions { flex-direction: row; flex-wrap: wrap; }
  .profile-order-row { grid-template-columns: 1fr; align-items: start; }
  .profile-order-money { text-align: left; }
  .profile-order-state { width: fit-content; }
  .user-chip { max-width: 170px; gap: 5px; }
  .user-chip strong { font-size: 11px; }
}


/* 20260817 profile order tabs + balance recharge */
.category-tabs-vertical .tab { font-size: 15px; }
@media (max-width: 640px) { .category-tabs-vertical .tab { font-size: 14px; } }
.profile-meta-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  color: #64748b;
  font-size: 14px;
  font-weight: 750;
}
.profile-meta-list strong { color: #111827; }
.profile-member-tag { font-weight: 950; }
.profile-member-tag.is-member { color: #16a34a; }
.profile-member-tag.not-member { color: #dc2626; }
.account-note {
  margin-top: 8px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}
.profile-order-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.profile-order-tab {
  appearance: none;
  border: 1px solid rgba(226,232,240,.95);
  background: #fff;
  color: #475467;
  border-radius: 999px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15,23,42,.04);
  transition: background .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
}
.profile-order-tab small { color: #7c3aed; font-weight: 950; }
.profile-order-tab.active {
  background: linear-gradient(135deg, #fff7ed, #f6edff);
  color: #111827;
  box-shadow: inset 0 0 0 1px rgba(124,58,237,.12), 0 10px 24px rgba(15,23,42,.06);
  transform: translateY(-1px);
}
button.profile-order-row {
  appearance: none;
  border: 1px solid rgba(226,232,240,.95);
  background: rgba(255,255,255,.92);
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
button.profile-order-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(15,23,42,.08);
  border-color: rgba(124,58,237,.22);
}
button.profile-order-row .profile-order-main,
button.profile-order-row .profile-order-money,
button.profile-order-row .profile-order-state {
  pointer-events: none;
}
.payment-select { padding: 14px; border: 1px solid rgba(124,58,237,.12); border-radius: 18px; background: #fffdfb; }
.payment-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.payment-method {
  width: 100%;
  min-height: 82px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  cursor: pointer;
}
.payment-method strong { color: #111827; font-size: 16px; }
.payment-method small { color: #6b7280; font-weight: 800; line-height: 1.4; }
.payment-method.active {
  border-color: rgba(124,58,237,.24);
  background: linear-gradient(135deg, #fff7ed, #f5f3ff);
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
}
.payment-method.is-disabled { opacity: .55; cursor: not-allowed; }
.payment-method.payment-balance strong { color: #7c3aed; }
.payment-method.payment-balance small { color: #059669; }
.payment-method.payment-upay .usdt-icon { margin-bottom: 2px; }
@media (max-width: 760px) {
  .profile-order-tabs { gap: 8px; }
}


/* 20260817: ??????????????? */
.profile-topline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.profile-topline .profile-eyebrow { margin: 0; }
.profile-back-link {
  appearance: none;
  border: 1px solid rgba(226,232,240,.95);
  background: rgba(255,255,255,.9);
  color: #0f172a;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
}
.profile-back-link:hover { border-color: rgba(124,58,237,.35); color: #7c3aed; }
@media (max-width: 640px) {
  .profile-topline { align-items: flex-start; flex-direction: column; gap: 8px; }
}

.profile-balance-card small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 13px;
  font-weight: 850;
}

.login-required-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid rgba(251,146,60,.28);
}
.login-required-note .btn {
  white-space: nowrap;
}
@media (max-width: 640px) {
  .login-required-note {
    align-items: center;
    flex-direction: column;
    text-align: center;
  }
  .login-required-note .btn {
    align-self: center;
    margin-left: auto;
    margin-right: auto;
  }
}

.profile-eyebrow-down {
  display: block;
  margin: 10px 0 0 4px;
  color: #7c3aed;
  font-size: 18px;
  font-weight: 900;
}

.member-discount-note,
.estimate-member {
  color: #16a34a;
  font-weight: 900;
}
.member-discount-note {
  margin-top: 8px;
}


/* 20260817: mobile bottom navigation + compact mobile pages */
.mobile-bottom-nav { display: none; }
@media (max-width: 640px) {
  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
  }
  main { padding-bottom: 10px; }
  .container { width: calc(100% - 16px) !important; }
  .site-header { z-index: 30; }
  .header-grid { min-height: 54px; }
  .header-actions { display: none !important; }
  .brand strong { font-size: 15.5px; }
  .brand small { font-size: 10.5px; }

  .mobile-bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(226,232,240,.92);
    border-radius: 22px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 18px 42px rgba(15,23,42,.16);
    backdrop-filter: blur(18px);
  }
  .mobile-nav-item {
    appearance: none;
    border: 0;
    background: transparent;
    color: #64748b;
    border-radius: 16px;
    min-height: 48px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
  }
  .mobile-nav-item strong { font-size: 12px; line-height: 1.05; }
  .mobile-nav-icon { font-size: 18px; line-height: 1; }
  .mobile-nav-item.active {
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    box-shadow: 0 10px 22px rgba(37,99,235,.22);
  }

  /* ????????????????? */
  .category-sidebar {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    margin-bottom: 10px;
  }
  .category-sidebar h3 { font-size: 14px; }
  .category-tabs-vertical .tab { font-size: 14.5px; font-weight: 900; }

  .announcement-box,
  .catalog-layout,
  .product-page,
  .query-panel,
  .profile-panel {
    margin-top: 10px !important;
    margin-bottom: 12px !important;
  }
  .announcement-box,
  .catalog-main,
  .category-sidebar,
  .product-page,
  .query-panel,
  .profile-panel {
    border-radius: 18px !important;
  }
  .announcement-box { padding: 14px !important; }
  .announcement-content { font-size: 13.5px; line-height: 1.65; }

  .catalog-main { padding: 13px !important; }
  .catalog-main .section-title { margin-bottom: 8px; padding-bottom: 8px; }
  .catalog-main .section-title h2 { font-size: 18px; }
  .category-section { margin-top: 14px; }
  .category-heading h3 { font-size: 16px; }
  .product-list { gap: 7px; }
  .product-row {
    grid-template-columns: 40px minmax(0, 1fr) 78px !important;
    min-height: 58px !important;
    padding: 8px 9px !important;
    border-radius: 15px !important;
    gap: 3px 9px !important;
  }
  .product-avatar { width: 36px !important; height: 36px !important; }
  .product-row-main h4 { font-size: 13.8px !important; line-height: 1.28 !important; }
  .product-row-price .row-price { font-size: 16px !important; }
  .product-row-price small { font-size: 10.5px !important; margin-top: 1px !important; }
  .row-stock .stock-label { font-size: 10.5px !important; }
  .row-stock .stock-num { font-size: 12.8px !important; }
  .row-wholesale { font-size: 9.8px !important; padding: 1px 5px !important; }

  /* ???????????? */
  .product-page { width: calc(100% - 8px) !important; padding: 8px !important; }
  .back-link { margin-bottom: 7px !important; font-size: 12.5px !important; }
  .product-detail-page { gap: 8px !important; }
  .detail-main-card,
  .order-page-form {
    padding: 10px !important;
    border-radius: 16px !important;
  }
  .badges { gap: 5px !important; margin-bottom: 6px !important; }
  .badge { padding: 3px 7px !important; font-size: 10px !important; }
  .detail-title-page {
    margin: 4px 0 6px !important;
    font-size: 20px !important;
    line-height: 1.12 !important;
    text-align: left !important;
  }
  .detail-desc {
    margin: 0 0 7px !important;
    max-height: 92px;
    overflow: auto;
    font-size: 12.5px !important;
    line-height: 1.48 !important;
    text-align: left !important;
  }
  .price-notice {
    padding: 8px 9px !important;
    border-radius: 13px !important;
    font-size: 12px !important;
    line-height: 1.38 !important;
  }
  .price-notice .retail-line strong { font-size: 12.5px !important; }
  .tier-lines { margin-top: 5px !important; gap: 2px !important; }
  .tier-line { font-size: 12px !important; line-height: 1.35 !important; }
  .member-discount-note { margin-top: 4px !important; font-size: 11.5px !important; }
  .order-form { gap: 7px !important; margin-top: 0 !important; }
  .order-page-form .form-row,
  .form-row.pay-estimate-row {
    grid-template-columns: 74px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 7px !important;
    margin: 0 !important;
  }
  .order-page-form .form-row label {
    font-size: 12px !important;
    line-height: 1.15 !important;
    white-space: nowrap;
  }
  .order-page-form input,
  .order-page-form textarea {
    min-height: 38px !important;
    padding: 8px 10px !important;
    border-radius: 12px !important;
    font-size: 13.5px !important;
  }
  .pay-estimate-row { padding: 8px !important; }
  .pay-estimate-wrap { grid-template-columns: minmax(0, 1fr) auto !important; gap: 6px !important; }
  .pay-estimate { min-height: 0 !important; gap: 0 !important; padding: 0 !important; }
  .pay-estimate strong { font-size: 18px !important; line-height: 1.05 !important; }
  .pay-estimate span { font-size: 12px !important; line-height: 1.1 !important; }
  .pay-estimate small { font-size: 10px !important; line-height: 1.18 !important; }
  .pay-limit-badge { width: auto !important; min-width: 58px !important; padding: 5px 7px !important; border-radius: 10px !important; }
  .pay-limit-badge span { font-size: 9.5px !important; }
  .pay-limit-badge strong { font-size: 15px !important; }
  .payment-select { padding: 8px !important; border-radius: 13px !important; }
  .payment-title { padding-bottom: 6px !important; margin-bottom: 0 !important; font-size: 12px !important; }
  .payment-methods { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 7px !important; margin-top: 7px !important; }
  .payment-method { min-height: 42px !important; padding: 7px 8px !important; border-radius: 12px !important; gap: 4px !important; align-items: center !important; justify-content: center !important; text-align: center !important; }
  .payment-method strong { font-size: 13px !important; }
  .payment-method small { font-size: 10px !important; line-height: 1.1 !important; }
  .usdt-icon { width: 18px !important; height: 18px !important; font-size: 11px !important; }
  .submit-order { min-height: 40px !important; padding: 9px 12px !important; border-radius: 12px !important; font-size: 13.5px !important; }

  /* ????????????? */
  .query-panel { padding: 16px !important; }
  .query-panel .section-title { margin-bottom: 10px; }
  .query-panel h2 { font-size: 21px; }
  .query-form { gap: 8px !important; }
  .query-result-card { padding: 12px !important; border-radius: 16px !important; }
  .query-result-head { gap: 8px; margin-bottom: 10px; padding-bottom: 9px; }
  .query-result-head h3 { font-size: 18px; }
  .query-info-grid { gap: 8px; }
  .query-info-grid > div { padding: 9px 10px; border-radius: 12px; }

  .profile-panel { padding: 12px !important; }
  .profile-page { gap: 12px; }
  .profile-hero { padding: 14px !important; border-radius: 18px; gap: 10px; }
  .profile-topline { margin-bottom: 4px; }
  .profile-back-link { padding: 6px 10px; font-size: 12px; }
  .profile-eyebrow-down { margin-top: 6px; font-size: 18px; }
  .profile-meta-list { gap: 5px; font-size: 12.5px; }
  .profile-balance-card { padding: 13px; border-radius: 16px; }
  .profile-balance-card strong { font-size: 24px; }
  .profile-actions { gap: 8px; }
  .profile-actions .btn { padding: 9px 12px; border-radius: 13px; font-size: 13px; }
  .profile-section-title { gap: 8px; margin-bottom: 8px; padding-bottom: 10px; }
  .profile-section-title h2 { font-size: 20px; }
  .profile-order-tabs { gap: 7px; }
  .profile-order-tab { padding: 7px 10px; font-size: 12.5px; }
  .profile-order-row { padding: 11px 12px; border-radius: 15px; gap: 8px; }

  .dialog { width: calc(100% - 18px) !important; max-height: calc(100dvh - 24px); overflow: auto; border-radius: 20px !important; }
  .dialog-content { padding: 20px 16px !important; }
  .dialog-close-form { right: 10px !important; top: 10px !important; }
  .dialog-close { width: 34px !important; height: 34px !important; }
  .auth-form { gap: 10px; }
  .auth-form h2, .account-panel h2, .auth-success h2 { font-size: 21px; }
  .auth-desc, .auth-bind-card p { line-height: 1.55; font-size: 13px; }
  .auth-bind-card { padding: 12px; border-radius: 16px; }
  .auth-bind-card strong { font-size: 28px; }
  .tg-float { right: 16px !important; bottom: calc(90px + env(safe-area-inset-bottom, 0px)) !important; width: 42px !important; height: 42px !important; }
}


/* 20260817: compact mobile payment/order dialogs and profile */
@media (max-width: 640px) {
  .pay-dialog {
    width: calc(100% - 16px) !important;
    max-height: calc(100dvh - 18px) !important;
    border-radius: 18px !important;
  }
  .pay-dialog .dialog-content {
    padding: 14px 12px 12px !important;
  }
  .pay-dialog-title {
    margin: 0 42px 8px 2px !important;
    font-size: 18px !important;
    line-height: 1.18 !important;
  }
  .pay-box {
    padding: 10px !important;
    border-radius: 15px !important;
    line-height: 1.45 !important;
  }
  .pay-box-modal > .success {
    margin: 0 0 8px !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
  }
  .pay-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    margin: 8px 0 !important;
  }
  .pay-summary div {
    padding: 7px 8px !important;
    border-radius: 11px !important;
    min-width: 0;
  }
  .pay-summary span {
    font-size: 10px !important;
    margin-bottom: 1px !important;
    line-height: 1.15 !important;
  }
  .pay-summary strong {
    font-size: 12px !important;
    line-height: 1.2 !important;
  }
  .pay-countdown-value {
    font-size: 14px !important;
  }
  .payment-qr-wrap {
    margin: 8px 0 7px !important;
  }
  .payment-qr {
    width: 148px !important;
    height: 148px !important;
    padding: 7px !important;
    border-radius: 14px !important;
  }
  .wallet-head,
  .text-tools {
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    margin: 6px 0 !important;
  }
  .wallet-head span {
    font-size: 12px !important;
  }
  .text-tool-btn {
    padding: 5px 9px !important;
    font-size: 11.5px !important;
  }
  .cards-output {
    padding: 8px !important;
    border-radius: 11px !important;
    font-size: 12px !important;
    line-height: 1.42 !important;
  }
  .cards-output.wallet-address {
    max-height: 58px !important;
    overflow: auto !important;
  }
  .cards-output.delivery-cards {
    max-height: 150px !important;
    overflow: auto !important;
  }
  .pay-box-modal .notice {
    margin: 8px 0 0 !important;
    padding: 8px 9px !important;
    border-radius: 12px !important;
    font-size: 11.5px !important;
    line-height: 1.45 !important;
    max-height: 68px !important;
    overflow: auto !important;
  }
  .pay-dialog .dialog-close-form {
    right: 8px !important;
    top: 8px !important;
  }
  .pay-dialog .dialog-close {
    width: 32px !important;
    height: 32px !important;
    font-size: 22px !important;
  }

  .profile-panel {
    width: calc(100% - 10px) !important;
    padding: 9px !important;
    border-radius: 17px !important;
  }
  .profile-page {
    gap: 9px !important;
  }
  .profile-hero {
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 11px !important;
    border-radius: 16px !important;
  }
  .profile-hero > div:first-child {
    grid-column: 1 / -1;
  }
  .profile-topline {
    margin: 0 !important;
  }
  .profile-back-link {
    padding: 5px 9px !important;
    font-size: 11.5px !important;
    border-radius: 999px !important;
  }
  .profile-eyebrow-down {
    margin: 6px 0 0 2px !important;
    font-size: 17px !important;
    line-height: 1.1 !important;
  }
  .profile-meta-list {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
    margin-top: 6px !important;
    font-size: 11.5px !important;
    line-height: 1.25 !important;
  }
  .profile-meta-list span {
    margin-top: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .profile-balance-card {
    padding: 10px 8px !important;
    border-radius: 14px !important;
  }
  .profile-balance-card span {
    font-size: 11px !important;
    margin: 0 0 4px !important;
  }
  .profile-balance-card strong {
    font-size: 21px !important;
    line-height: 1.05 !important;
  }
  .profile-balance-card small {
    margin-top: 4px !important;
    font-size: 11px !important;
  }
  .profile-actions {
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
  .profile-actions .btn {
    width: 100%;
    min-height: 34px;
    padding: 7px 8px !important;
    border-radius: 11px !important;
    font-size: 12px !important;
  }
  .profile-orders-panel {
    gap: 8px !important;
  }
  .profile-section-title {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    align-items: center !important;
    margin-bottom: 6px !important;
    padding-bottom: 8px !important;
  }
  .profile-section-title h2 {
    font-size: 18px !important;
  }
  .profile-subtitle {
    font-size: 11px !important;
  }
  .profile-section-title .btn {
    padding: 7px 10px !important;
    font-size: 12px !important;
    border-radius: 11px !important;
  }
  .profile-order-tabs {
    gap: 5px !important;
  }
  .profile-order-tab {
    padding: 6px 8px !important;
    font-size: 12px !important;
    gap: 5px !important;
  }
  .profile-orders {
    gap: 7px !important;
  }
  .profile-order-row {
    grid-template-columns: minmax(0,1fr) auto !important;
    grid-template-areas:
      "main state"
      "money money";
    padding: 9px 10px !important;
    border-radius: 13px !important;
    gap: 5px 8px !important;
  }
  .profile-order-main { grid-area: main; min-width: 0; }
  .profile-order-money { grid-area: money; text-align: left !important; }
  .profile-order-state { grid-area: state; padding: 5px 8px !important; font-size: 11px !important; }
  .profile-order-title { gap: 6px !important; }
  .profile-platform { min-width: 36px !important; height: 21px !important; font-size: 10.5px !important; }
  .profile-order-title strong { font-size: 13px !important; }
  .profile-order-meta {
    gap: 6px !important;
    margin-top: 3px !important;
    font-size: 10.5px !important;
    line-height: 1.25 !important;
  }
  .profile-order-meta span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .profile-order-money strong {
    display: inline !important;
    font-size: 14px !important;
    margin-right: 8px;
  }
  .profile-order-money span {
    font-size: 11px !important;
  }
}

/* 20260817: restore mobile category expanded */
.mobile-category-toggle { display: none !important; }

/* 20260817: register bind bot account */
.auth-bot-account {
  margin: 12px auto 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  border: 1px solid rgba(37,99,235,.16);
  border-radius: 14px;
  background: rgba(255,255,255,.88);
}
.auth-bind-card .auth-bot-account span {
  display: inline;
  color: #475569;
  font-size: 13px;
  font-weight: 900;
}
.auth-bind-card .auth-bot-account strong {
  display: inline;
  margin: 0;
  color: #2563eb;
  font-size: 17px;
  letter-spacing: 0;
  font-variant-numeric: normal;
  text-shadow: none;
  word-break: break-all;
}
.auth-bot-account .text-tool-btn { margin: 0 !important; }
@media (max-width: 640px) {
  .auth-bot-account { gap: 7px; padding: 9px 10px; }
  .auth-bind-card .auth-bot-account strong { font-size: 15px; }
}


/* 20260817-mobilezoom2: prevent mobile login/register input auto zoom */
@media (max-width: 768px) {
  html {
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
  }
  input,
  textarea,
  select,
  button,
  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  input[type="tel"],
  input[type="email"] {
    font-size: 16px !important;
    line-height: 1.35 !important;
  }
  .auth-dialog input,
  .auth-dialog textarea,
  .auth-form input,
  .auth-form textarea,
  .dialog input,
  .dialog textarea,
  .query-form input,
  .profile-panel input,
  .order-page-form input,
  .order-page-form textarea,
  .pay-dialog input {
    font-size: 16px !important;
    line-height: 1.35 !important;
  }
}



/* 平台维护页 */
.maintenance-active .product-list,
.maintenance-active .category-section {
  display: none;
}
.maintenance-card {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(241,245,249,.92));
  box-shadow: 0 28px 80px rgba(15, 23, 42, .10);
  text-align: center;
  color: #0f172a;
}
.maintenance-card h2 {
  margin: 0 0 14px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
}
.maintenance-card p {
  margin: 0 auto 16px;
  max-width: 620px;
  color: #475569;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.8;
  white-space: pre-wrap;
}
.maintenance-card small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(124, 58, 237, .10);
  color: #6d28d9;
  font-weight: 800;
}
@media (max-width: 640px) {
  .maintenance-card {
    border-radius: 22px;
    padding: 28px 18px;
  }
}

body.front-maintenance-active #products-panel {
  display: none !important;
}
body.front-maintenance-active #product-view,
body.front-maintenance-active #query-view,
body.front-maintenance-active #profile-view {
  display: none !important;
}

/* 20260821: free-channel shortcut follows retry text and matches text height */
.free-channel-note {
  display: grid;
  gap: 2px;
}
.free-channel-note > strong,
.free-channel-note > span,
.free-channel-note > small {
  display: block;
}
.free-channel-note > small {
  font-size: inherit;
}
.free-channel-note .free-channel-join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  height: 1.7em;
  padding: 0 8px;
  margin-left: 6px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 4px 10px rgba(37,99,235,.16);
  font: inherit;
  font-size: inherit;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}
.free-channel-note .free-channel-join:hover {
  filter: brightness(1.04);
}
.free-channel-note .free-channel-join-disabled {
  font-weight: 700;
}


/* 20260829: shared free-claim allowance and channel status */
.pay-estimate-wrap {
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 8px;
  padding-right: 8px;
  box-sizing: border-box;
}
.pay-limit-badges {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}
.pay-limit-badge {
  min-width: 62px;
  padding: 6px 8px;
}
.pay-limit-badge span { font-size: 10px; line-height: 1.1; }
.pay-limit-badge strong { font-size: 16px; line-height: 1.05; }
.pay-available-badge strong { color: #16a34a; }
.free-channel-line {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.free-channel-note.is-joined {
  background: rgba(16,185,129,.10);
  color: #065f46;
}
.free-channel-note .free-channel-join {
  height: 1.45em;
  min-height: 0;
  padding: 0 .7em;
  line-height: 1;
  font-size: .88em;
}
@media (max-width: 640px) {
  .pay-estimate-wrap { grid-template-columns: minmax(0, 1fr) max-content !important; gap: 6px !important; padding-right: 4px !important; }
  .pay-limit-badges { gap: 5px !important; }
  .pay-limit-badge { width: auto !important; min-width: 54px !important; padding: 5px 6px !important; }
  .pay-limit-badge span { font-size: 9px !important; }
  .pay-limit-badge strong { font-size: 14px !important; }
}
@media (max-width: 360px) {
  .pay-limit-badges { flex-direction: column; gap: 4px !important; }
}
