/* =============================================================================
   OmniShop 样式：与主站同一套「深色 + 金色」气质，但更偏电商的信息密度。
   命名规则：os- 前缀，页面区块用 .os-xxx，状态色只用 --ok / --warn / --bad。
   ============================================================================= */
:root {
  color-scheme: dark;
  --bg: #070a0f;
  --bg-soft: #0b1018;
  --surface: #0f1520;
  --surface-2: #141c29;
  --surface-3: #1b2534;
  --line: rgba(148, 169, 196, 0.14);
  --line-strong: rgba(148, 169, 196, 0.26);
  --text: #eef2f8;
  --text-2: #c3cede;
  --muted: #8496ad;
  --gold: #f0b90b;
  --gold-2: #ffd766;
  --gold-soft: rgba(240, 185, 11, 0.12);
  --ok: #1fc48a;
  --ok-soft: rgba(31, 196, 138, 0.12);
  --warn: #f7a83a;
  --warn-soft: rgba(247, 168, 58, 0.14);
  --bad: #ef4b5c;
  --bad-soft: rgba(239, 75, 92, 0.13);
  --info: #5aa9ff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  --header-h: 68px;
  --max: 1240px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(240, 185, 11, 0.10), transparent 60%),
    radial-gradient(760px 480px at 92% 0%, rgba(90, 169, 255, 0.07), transparent 62%),
    linear-gradient(180deg, #080c13 0%, #070a0f 55%);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
::selection { background: rgba(240, 185, 11, 0.32); }

/* ---------------------------------------------------------------- 骨架 */
.os-shell { min-height: 100vh; display: flex; flex-direction: column; }
.os-main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 26px 20px 80px; }
.os-row { display: flex; align-items: center; gap: 12px; }
.os-row.wrap { flex-wrap: wrap; }
.os-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.os-between > * { min-width: 0; }
.os-col { display: flex; flex-direction: column; gap: 12px; }
.os-grid { display: grid; gap: 18px; }
.os-muted { color: var(--muted); }
.os-small { font-size: 12px; }
.os-mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.01em; }
.os-hide { display: none !important; }
.os-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.os-tag {
  display: inline-flex; align-items: center; gap: 6px;
  /* 徽章放在 .os-between 之类 flex 行里时不能被压窄，否则「投票中」会折成两行 */
  white-space: nowrap; flex: 0 0 auto;
  padding: 3px 9px; border-radius: 999px; font-size: 12px;
  background: var(--surface-3); color: var(--text-2); border: 1px solid var(--line);
}
.os-tag.gold { background: var(--gold-soft); color: var(--gold-2); border-color: rgba(240, 185, 11, 0.32); }
.os-tag.ok { background: var(--ok-soft); color: var(--ok); border-color: rgba(31, 196, 138, 0.3); }
.os-tag.bad { background: var(--bad-soft); color: #ff8b97; border-color: rgba(239, 75, 92, 0.3); }
.os-tag.warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(247, 168, 58, 0.3); }

/* ---------------------------------------------------------------- 顶栏 */
.os-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  background: rgba(8, 12, 19, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.os-header-inner {
  max-width: var(--max); height: 100%; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 18px;
}
.os-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.os-logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #ffd766, #e2a300);
  color: #221a00; font-weight: 900; font-size: 17px;
  box-shadow: 0 6px 18px rgba(240, 185, 11, 0.28);
}
.os-logo-text { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.os-logo-text small { display: block; font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; }
.os-nav { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.os-nav a {
  padding: 8px 12px; border-radius: 9px; color: var(--text-2); font-size: 13.5px;
  transition: background 0.16s, color 0.16s; white-space: nowrap;
}
.os-nav a:hover { background: var(--surface-2); color: var(--text); }
.os-nav a.active { background: var(--gold-soft); color: var(--gold-2); }
.os-search { flex: 1; max-width: 460px; position: relative; }
.os-search input {
  width: 100%; height: 40px; padding: 0 40px 0 40px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; outline: none; color: var(--text);
  transition: border-color 0.16s, background 0.16s;
}
.os-search input:focus { border-color: rgba(240, 185, 11, 0.45); background: var(--surface-3); }
.os-search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.os-search .hint { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--muted); }
.os-header-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.os-balance-chip {
  display: flex; align-items: center; gap: 8px; padding: 7px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: 12.5px; cursor: pointer;
}
.os-balance-chip b { color: var(--gold-2); font-weight: 700; }
.os-wallet-btn {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px;
  border-radius: 999px; border: 1px solid rgba(240, 185, 11, 0.4);
  background: linear-gradient(140deg, rgba(240, 185, 11, 0.18), rgba(240, 185, 11, 0.06));
  color: var(--gold-2); font-weight: 600; font-size: 13px; cursor: pointer;
  transition: transform 0.16s, box-shadow 0.16s;
}
.os-wallet-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(240, 185, 11, 0.18); }
.os-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(31, 196, 138, 0.18); }
/* 未登录时圆点是灰色：绿点 + 「连接钱包」看起来像已经连上了 */
.os-wallet-btn.off .os-dot { background: var(--muted); box-shadow: 0 0 0 3px rgba(148, 169, 196, 0.14); }
/* 菜单按钮固定在窄屏才出现；用 .btn.xxx 提高特异性，否则会被后面的 .btn { display: inline-flex } 盖掉 */
.btn.os-mobile-menu { display: none; }

/* ---------------------------------------------------------------- 按钮/表单 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--text); font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: background 0.16s, transform 0.12s, border-color 0.16s;
  white-space: nowrap; user-select: none;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn.primary { background: linear-gradient(140deg, #ffd766, #eeb000); color: #241b00; border-color: transparent; }
.btn.primary:hover { background: linear-gradient(140deg, #ffdf85, #f5bc19); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--bad-soft); color: #ff97a1; border-color: rgba(239, 75, 92, 0.35); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.link { background: none; border: none; color: var(--gold-2); padding: 0; height: auto; font-weight: 600; }
.btn.link:hover { text-decoration: underline; background: none; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.field .hint { font-size: 11.5px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; outline: none; color: var(--text);
  transition: border-color 0.16s, background 0.16s;
}
.input:focus, .select:focus, .textarea:focus { border-color: rgba(240, 185, 11, 0.45); background: var(--surface); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.7; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .span-2 { grid-column: span 2; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { display: none; }
.switch i { width: 38px; height: 22px; border-radius: 999px; background: var(--surface-3); position: relative; transition: background 0.18s; }
.switch i::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform 0.18s; }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(16px); }

/* ---------------------------------------------------------------- 卡片/面板 */
.os-card {
  background: linear-gradient(180deg, var(--surface) 0%, rgba(15, 21, 32, 0.86) 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.os-card-pad { padding: 20px; }
.os-panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.os-panel-title h3 { font-size: 16px; }
.os-panel-title .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.os-divider { height: 1px; background: var(--line); margin: 18px 0; }

/* ---------------------------------------------------------------- 首页 */
.os-hero {
  position: relative; overflow: hidden; border-radius: 22px;
  border: 1px solid rgba(240, 185, 11, 0.22);
  background:
    radial-gradient(720px 300px at 12% 0%, rgba(240, 185, 11, 0.16), transparent 60%),
    radial-gradient(620px 320px at 88% 10%, rgba(90, 169, 255, 0.12), transparent 62%),
    linear-gradient(145deg, #121a26 0%, #0b111a 60%);
  padding: 46px 44px;
}
.os-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(600px 300px at 30% 20%, #000, transparent 78%);
}
.os-hero-inner { position: relative; z-index: 1; max-width: 660px; }
.os-hero .eyebrow { color: var(--gold-2); font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.os-hero h1 { font-size: 38px; line-height: 1.18; margin: 12px 0 12px; letter-spacing: -0.03em; }
.os-hero h1 em { font-style: normal; background: linear-gradient(120deg, #ffe08a, #f0b90b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.os-hero p { color: var(--text-2); font-size: 15px; max-width: 560px; }
.os-hero-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.os-hero-side {
  position: absolute; right: 44px; top: 50%; transform: translateY(-50%);
  width: 300px; display: grid; gap: 10px; z-index: 1;
}
.os-hero-stat {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(10, 15, 22, 0.6); backdrop-filter: blur(6px);
}
.os-hero-stat b { font-size: 18px; color: var(--gold-2); font-weight: 700; }
.os-hero-stat span { font-size: 12px; color: var(--muted); }

.os-trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.os-trust-item { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.os-trust-item .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-2); flex-shrink: 0; font-weight: 800; }
.os-trust-item b { display: block; font-size: 13.5px; }
.os-trust-item span { font-size: 12px; color: var(--muted); }

.os-section { margin-top: 34px; }
.os-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.os-section-head h2 { font-size: 21px; }
.os-section-head p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.os-section-head .more { color: var(--gold-2); font-size: 13px; font-weight: 600; }
.os-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.os-chip {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-2); font-size: 12.5px; cursor: pointer;
  transition: all 0.16s;
}
.os-chip:hover { border-color: var(--line-strong); color: var(--text); }
.os-chip.active { background: var(--gold-soft); border-color: rgba(240, 185, 11, 0.42); color: var(--gold-2); font-weight: 600; }

/* ---------------------------------------------------------------- 商品卡 */
.os-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.os-products.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.os-product {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s; cursor: pointer;
}
.os-product:hover { transform: translateY(-4px); border-color: rgba(240, 185, 11, 0.35); box-shadow: var(--shadow); }
.os-product-media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.os-product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.os-product:hover .os-product-media img { transform: scale(1.045); }
.os-product-media .ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.os-product-badge { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; }
.os-product-body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.os-product-title { font-size: 14px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.os-product-sub { font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.os-product-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.os-price { color: var(--gold-2); font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.os-price small { font-size: 11px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.os-price-was { font-size: 12px; color: var(--muted); text-decoration: line-through; margin-left: 6px; }
.os-product-meta { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex: 0 0 auto; white-space: nowrap; }
/* 商家名 + 评分同一行：名称过长就截断，评分不换行也不被挤 */
.os-product-shoprow { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.os-shop-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); min-width: 0; }
.os-shop-chip i { width: 18px; height: 18px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-style: normal; font-size: 10px; color: var(--gold-2); overflow: hidden; }
.os-shop-chip .os-truncate { min-width: 0; }
.os-shop-chip img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; }

/* ---------------------------------------------------------------- 店铺卡 */
.os-shops { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.os-shop {
  padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  display: flex; gap: 12px; align-items: center; cursor: pointer; transition: border-color 0.16s, transform 0.16s;
}
.os-shop:hover { border-color: rgba(240, 185, 11, 0.3); transform: translateY(-2px); }
.os-shop-logo { width: 46px; height: 46px; border-radius: 12px; background: var(--surface-3); display: grid; place-items: center; overflow: hidden; color: var(--gold-2); font-weight: 800; flex-shrink: 0; }
.os-shop-logo img { width: 100%; height: 100%; object-fit: cover; }
.os-shop b { font-size: 14px; display: block; }
.os-shop .os-small { color: var(--muted); }
/* 独立店铺页封面：高度用媒体查询控制，图片本身是抽象图，cover 裁切不会切到文字 */
.os-store-cover { height: 190px; position: relative; }
.os-store-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, rgba(7, 10, 15, 0.85)); }

/* ---------------------------------------------------------------- 列表页 */
.os-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 24px; align-items: start; }
/* grid 子项默认按内容撑开，表格/横向导航会把整列顶出去，必须显式归零 */
.os-layout > * { min-width: 0; }
/* 商家中心 / 平台后台：左侧导航 + 内容区。用类而不是内联样式，
   否则窄屏的媒体查询会被内联 grid-template-columns 盖掉，内容被压成一条。 */
.os-layout.portal { grid-template-columns: 224px minmax(0, 1fr); }
.os-layout.portal > aside { position: sticky; top: calc(var(--header-h) + 18px); }
.os-layout.split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.os-filter { position: sticky; top: calc(var(--header-h) + 18px); display: flex; flex-direction: column; gap: 18px; }
.os-filter-block { padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.os-filter-block h4 { font-size: 13px; margin-bottom: 10px; color: var(--text-2); }
.os-filter-list { display: flex; flex-direction: column; gap: 2px; }
.os-filter-list button {
  text-align: left; padding: 7px 10px; border-radius: 8px; background: none; border: none;
  color: var(--text-2); font-size: 13px; cursor: pointer;
}
.os-filter-list button:hover { background: var(--surface-2); color: var(--text); }
.os-filter-list button.active { background: var(--gold-soft); color: var(--gold-2); font-weight: 600; }
.os-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.os-sort { display: flex; gap: 6px; flex-wrap: wrap; }
.os-sort button { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.os-sort button.active { background: var(--gold-soft); border-color: rgba(240,185,11,0.4); color: var(--gold-2); font-weight: 600; }

/* ---------------------------------------------------------------- 商品详情 */
/* 左列：主图 + 商品详情卡；右列：标题/价格/购买区（跨两行，滚动时不跟着走）。
   用 grid-template-areas 而不是靠 DOM 顺序，窄屏才能把「购买区」提到详情卡前面。 */
.os-detail {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 30px;
  align-items: start; grid-template-areas: "media buy" "desc buy";
}
.os-detail > * { min-width: 0; }
.os-detail-media { grid-area: media; }
.os-detail-buy { grid-area: buy; }
.os-detail-desc { grid-area: desc; }
.os-gallery-main { aspect-ratio: 1 / 0.86; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.os-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.os-gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.os-gallery-thumbs button { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); padding: 0; background: var(--surface-2); cursor: pointer; }
.os-gallery-thumbs button.active { border-color: var(--gold); }
.os-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.os-detail-title { font-size: 25px; line-height: 1.35; }
.os-detail-sub { color: var(--muted); margin-top: 8px; }
.os-price-block { margin: 20px 0 6px; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(160deg, rgba(240,185,11,0.08), transparent 70%); }
.os-price-block .usd { font-size: 34px; font-weight: 800; color: var(--gold-2); letter-spacing: -0.03em; }
.os-price-block .usd small { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 6px; }
.os-quote { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--text-2); }
.os-quote b { color: var(--text); }
.os-token-list { display: flex; flex-wrap: wrap; gap: 8px; }
.os-token {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-soft); cursor: pointer; font-size: 12.5px;
}
.os-token:hover { border-color: var(--line-strong); }
.os-token.active { border-color: rgba(240,185,11,0.5); background: var(--gold-soft); color: var(--gold-2); }
.os-token .sym { font-weight: 700; }
.os-token .net { color: var(--muted); font-size: 11px; }
.os-buy-actions { display: flex; gap: 12px; margin-top: 20px; }
.os-seller { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); margin-top: 18px; }
.os-seller .os-shop-logo { width: 42px; height: 42px; }
.os-spec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.os-spec-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.os-spec-table td:first-child { color: var(--muted); width: 130px; }
.os-reviews { display: flex; flex-direction: column; gap: 12px; }
.os-review { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.os-review-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.os-stars { color: var(--gold); letter-spacing: 2px; font-size: 12px; }

/* ---------------------------------------------------------------- 订单 */
.os-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.os-tabs button {
  padding: 11px 16px; background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--muted); font-size: 13.5px; cursor: pointer; white-space: nowrap;
}
.os-tabs button:hover { color: var(--text); }
.os-tabs button.active { color: var(--gold-2); border-bottom-color: var(--gold); font-weight: 600; }
.os-order { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; margin-bottom: 14px; }
.os-order-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.os-order-body { display: flex; gap: 16px; padding: 16px; }
.os-order-item { display: flex; gap: 14px; flex: 1; min-width: 0; }
.os-order-thumb { width: 76px; height: 76px; border-radius: 10px; background: var(--surface-3); overflow: hidden; flex-shrink: 0; }
.os-order-thumb img { width: 100%; height: 100%; object-fit: cover; }
.os-order-title { font-size: 14px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.os-order-side { text-align: right; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.os-order-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.os-timeline { display: flex; flex-direction: column; gap: 0; padding: 4px 0 4px 6px; }
.os-timeline-item { position: relative; padding: 0 0 18px 20px; border-left: 1px solid var(--line); }
.os-timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.os-timeline-item::before { content: ""; position: absolute; left: -4.5px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--line-strong); }
.os-timeline-item.active::before { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 4px rgba(240, 185, 11, 0.14); }
.os-timeline-item b { font-size: 12.5px; display: block; }
.os-timeline-item span { font-size: 11.5px; color: var(--muted); }

/* ---------------------------------------------------------------- 仪表盘/表格 */
.os-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
/* 指标卡列数变体：内联写死会在窄屏挤成一团，统一用类 + 断点 */
.os-stats.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.os-stats.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.os-stat { padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.os-stat span { font-size: 12px; color: var(--muted); }
.os-stat b { display: block; font-size: 24px; margin-top: 6px; letter-spacing: -0.02em; }
.os-stat em { font-style: normal; font-size: 12px; color: var(--gold-2); }
.os-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); scrollbar-width: thin; }
/* 窄屏表格是横向滚动的，右边缘加一道内阴影，提示「后面还有列」而不是看起来被截断 */
.os-table-wrap::-webkit-scrollbar { height: 8px; }
.os-table-wrap::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
.os-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.os-table th { text-align: left; padding: 11px 14px; background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; }
.os-table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.os-table tr:hover td { background: rgba(255, 255, 255, 0.015); }
.os-table .cell-title { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.os-table .cell-title img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; background: var(--surface-3); }
.os-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.os-side-nav { display: flex; flex-direction: column; gap: 3px; }
.os-side-nav button {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px;
  background: none; border: none; color: var(--text-2); text-align: left; cursor: pointer; font-size: 13.5px;
}
.os-side-nav button:hover { background: var(--surface-2); color: var(--text); }
.os-side-nav button.active { background: var(--gold-soft); color: var(--gold-2); font-weight: 600; }
.os-side-nav .count { margin-left: auto; font-size: 11px; background: var(--surface-3); padding: 1px 7px; border-radius: 999px; color: var(--text-2); }

/* ---------------------------------------------------------------- 弹窗 */
.os-modal-mask {
  position: fixed; inset: 0; z-index: 200; background: rgba(4, 7, 11, 0.72);
  backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  animation: osFade 0.18s ease;
}
@keyframes osFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes osPop { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } }
.os-modal {
  width: 100%; max-width: 560px; max-height: calc(100vh - 48px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px;
  box-shadow: var(--shadow); animation: osPop 0.2s ease;
}
.os-modal.wide { max-width: 860px; }
.os-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 0; }
.os-modal-head h3 { font-size: 17px; }
.os-modal-body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 16px; }
.os-modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 22px 22px; }
.os-close { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.os-close:hover { color: var(--text); background: var(--surface-3); }

.os-toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.os-toast {
  min-width: 240px; max-width: 380px; padding: 12px 16px; border-radius: 12px;
  background: var(--surface-3); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  font-size: 13px; animation: osPop 0.2s ease;
}
.os-toast.ok { border-color: rgba(31, 196, 138, 0.45); }
.os-toast.bad { border-color: rgba(239, 75, 92, 0.5); }

/* ---------------------------------------------------------------- 空状态/骨架 */
.os-empty { padding: 56px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 16px; }
.os-empty b { display: block; color: var(--text-2); font-size: 15px; margin-bottom: 6px; }
.os-skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: osShimmer 1.3s ease infinite; border-radius: 12px; }
@keyframes osShimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------------------------------------------------------------- 页脚 */
.os-footer { border-top: 1px solid var(--line); padding: 28px 20px 40px; color: var(--muted); font-size: 12.5px; }
.os-footer-inner { max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.os-footer a:hover { color: var(--gold-2); }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1080px) {
  .os-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .os-shops { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .os-hero-side { display: none; }
  .os-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .os-stats.cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .os-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
  .os-nav { display: none; }
  .os-header-right .os-balance-chip { display: none; }
  .os-layout { grid-template-columns: 1fr; }
  .os-layout.portal, .os-layout.split { grid-template-columns: 1fr; }
  .os-layout.portal > aside { position: static; top: auto; }
  /* 后台导航在窄屏变成横向滚动的分段条，不再占一整列 */
  .os-layout.portal .os-side-nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
  .os-layout.portal .os-side-nav button { flex: 0 0 auto; white-space: nowrap; padding: 8px 12px; }
  /* 窄屏横向导航里地址只会把一行撞满，钱包按钮已经显示短地址了 */
  .os-admin-addr { display: none; }
  /* 窄屏表格可横向滚动：右缘加内阴影提示还有列（桌面不滚动，不留痕迹） */
  .os-table-wrap { box-shadow: inset -14px 0 14px -14px rgba(0, 0, 0, 0.9); }
  .os-filter { position: static; }
  .os-detail { grid-template-columns: 1fr; grid-template-areas: "media" "buy" "desc"; gap: 20px; }
  .os-hero { padding: 32px 24px; }
  .os-hero h1 { font-size: 29px; }
  .os-products, .os-products.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .os-shops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn.os-mobile-menu { display: inline-flex; }
  .os-main { padding: 18px 14px 60px; }
  .os-header-inner { padding: 0 14px; gap: 10px; }
  .os-search { max-width: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .os-order-body { flex-direction: column; }
  .os-order-side { align-items: flex-start; text-align: left; }
  .os-order-actions { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .os-hero h1 { font-size: 25px; }
  .os-hero-actions .btn { flex: 1; }
  .os-trust { grid-template-columns: 1fr; }
  .os-stats { grid-template-columns: 1fr 1fr; }
  .os-stats.cols-3, .os-stats.cols-5 { grid-template-columns: 1fr 1fr; }
  .os-logo-text small { display: none; }
  .os-wallet-btn { padding: 0 12px; white-space: nowrap; flex: 0 0 auto; }
  .os-detail-title { font-size: 20px; }
  .os-price-block .usd { font-size: 27px; }
  /* 手机上顶栏分两行：第一行 logo + 菜单 + 钱包，第二行搜索框铺满。
     否则搜索框被挤成一个圆点、钱包按钮的文字折成两行。 */
  :root { --header-h: 118px; }
  .os-header-inner { flex-wrap: wrap; height: auto; padding: 10px 14px; row-gap: 10px; align-content: center; }
  .os-search { order: 3; flex: 1 0 100%; }
  .os-search .hint { display: none; }
  .os-wallet-btn { height: 34px; font-size: 12.5px; }
  .os-store-cover { height: 132px; }
  /* 店铺卡在 2 列时 logo + 名称 + 评分挤不开，手机上直接单列 */
  .os-shops { grid-template-columns: 1fr; }
  /* 窄屏下「标题 + 右侧操作」抢空间时改上下排，别把按钮文字挤成竖排 */
  .os-between { flex-wrap: wrap; }
}
