/* ============================================================
   淘客推手 · 样式
   主题：淘宝电商橙红
   ============================================================ */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }

:root {
  --brand: #FF4D2D;
  --brand-2: #FF8A00;
  --brand-deep: #E03A18;
  --price: #FF2E2E;
  --bg: #F4F5F7;
  --card: #FFFFFF;
  --text: #17181A;
  --sub: #8B909A;
  --mute: #B4B9C2;
  --line: #EEEFF2;
  --gold: #FFB020;
  --r: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: #E8EAEF;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
}

/* ---------- 手机外框（桌面端展示用） ---------- */
.device {
  padding: 14px;
  border-radius: 54px;
  background: linear-gradient(160deg, #2A2D34, #14161A);
  box-shadow: 0 30px 90px rgba(20, 24, 32, .38), 0 2px 0 rgba(255,255,255,.08) inset;
}

.app {
  position: relative;
  width: 390px;
  height: 844px;
  background: var(--bg);
  border-radius: 42px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

/* ---------- 状态栏 ---------- */
.statusbar {
  height: 44px;
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px 0 30px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .2px;
  color: #fff;
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 60;
  pointer-events: none;
  mix-blend-mode: normal;
}
.statusbar.dark { color: var(--text); }
.sb-icons { display: flex; align-items: center; gap: 6px; }
.sb-battery {
  width: 24px; height: 12px;
  border: 1.2px solid currentColor;
  border-radius: 3px;
  padding: 1.5px;
  position: relative;
  opacity: .9;
}
.sb-battery::after {
  content: ''; position: absolute; right: -3.5px; top: 3.5px;
  width: 2px; height: 4px; border-radius: 0 1px 1px 0; background: currentColor;
}
.sb-battery i { display: block; height: 100%; width: 78%; background: currentColor; border-radius: 1.5px; }

/* ---------- 视图容器 ---------- */
.views { position: relative; flex: 1; overflow: hidden; }
.view {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  display: none;
  padding-bottom: 12px;
}
.view::-webkit-scrollbar { display: none; }
.view.is-active { display: block; }

/* ---------- 底部导航 ---------- */
.tabbar {
  flex: 0 0 auto;
  display: flex;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
  z-index: 30;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 0 7px;
  color: var(--mute);
  font-size: 10.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color .18s;
  position: relative;
}
.tab svg { width: 23px; height: 23px; }
.tab.on { color: var(--brand); }
.tab.on svg { transform: translateY(-1px); }
.tab .dot {
  position: absolute; top: 6px; right: calc(50% - 18px);
  min-width: 15px; height: 15px; padding: 0 4px;
  background: var(--price); color: #fff;
  font-size: 9px; line-height: 15px; text-align: center;
  border-radius: 8px; font-weight: 700;
}

/* ============================================================
   首页 · 选品
   ============================================================ */
.home-head {
  background: linear-gradient(165deg, #FF5C2B 0%, #FF7A28 46%, #FFA13A 100%);
  padding: 54px 14px 0;
  position: relative;
  overflow: hidden;
}
.home-head::before {
  content: '';
  position: absolute;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,.14);
  top: -120px; right: -70px;
}
.home-head::after {
  content: '';
  position: absolute;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,.10);
  top: 40px; right: 60px;
}
.hh-row {
  display: flex; align-items: center; justify-content: space-between;
  position: relative; z-index: 2;
}
.brand { display: flex; align-items: baseline; gap: 6px; color: #fff; }
.brand b { font-size: 20px; letter-spacing: .5px; font-weight: 800; }
.brand span {
  font-size: 10px; font-weight: 600; letter-spacing: .5px;
  background: rgba(255,255,255,.24);
  padding: 2px 6px; border-radius: 5px;
}
.hh-actions { display: flex; gap: 8px; }
.hh-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  color: #fff; cursor: pointer;
  transition: background .18s;
}
.hh-btn:active { background: rgba(255,255,255,.34); }
.hh-btn svg { width: 17px; height: 17px; }

.searchbar {
  margin-top: 13px;
  height: 38px;
  background: rgba(255,255,255,.96);
  border-radius: 19px;
  display: flex; align-items: center;
  padding: 0 6px 0 13px;
  gap: 8px;
  position: relative; z-index: 2;
  box-shadow: 0 4px 14px rgba(190, 70, 20, .16);
}
.searchbar svg { width: 16px; height: 16px; color: var(--mute); flex: 0 0 auto; }
.searchbar input {
  flex: 1; border: 0; outline: 0; background: none;
  font-size: 13.5px; color: var(--text); font-family: inherit;
  min-width: 0;
}
.searchbar input::placeholder { color: var(--mute); }
.searchbar .go {
  flex: 0 0 auto;
  height: 27px; padding: 0 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 12.5px; font-weight: 600;
  display: flex; align-items: center; cursor: pointer;
}

/* 类目横滑 */
.cats {
  display: flex; gap: 4px;
  margin-top: 12px;
  padding-bottom: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  position: relative; z-index: 2;
}
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: 0 0 auto;
  padding: 5px 13px;
  font-size: 13px;
  color: rgba(255,255,255,.86);
  border-radius: 13px;
  cursor: pointer;
  font-weight: 500;
  transition: all .18s;
  white-space: nowrap;
}
.cat.on {
  background: #fff;
  color: var(--brand-deep);
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(160, 60, 20, .2);
}

/* 筛选条 */
.filters {
  display: flex; align-items: center;
  gap: 18px;
  padding: 11px 15px 9px;
  background: var(--bg);
  position: sticky; top: 0; z-index: 12;
  border-bottom: 1px solid rgba(0,0,0,.03);
}
.filter {
  font-size: 13px; color: var(--sub);
  display: flex; align-items: center; gap: 3px;
  cursor: pointer; font-weight: 500;
  transition: color .16s;
  white-space: nowrap;
}
.filter.on { color: var(--brand); font-weight: 700; }
.filter .arrow { font-size: 9px; opacity: .55; transition: transform .2s; }
.filter.on .arrow { opacity: 1; }

/* ---------- 数据来源提示 ---------- */
.demo-tip {
  background: #FFF6E5;
  color: #A9700B;
  font-size: 11.5px;
  line-height: 1.65;
  padding: 8px 14px;
  text-align: center;
  border-bottom: 1px solid #FFE7BC;
}

/* ---------- 选品雷达 ---------- */
.radar {
  display: flex;
  gap: 9px;
  padding: 0 12px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.radar::-webkit-scrollbar { display: none; }
.radar-card {
  flex: 0 0 158px;
  border-radius: 12px;
  padding: 10px 11px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .16s;
}
.radar-card:active { transform: scale(.97); }
.radar-card::after {
  content: '';
  position: absolute;
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(255,255,255,.16);
  right: -26px; top: -30px;
}
.rc-hot  { background: linear-gradient(135deg, #FF5C2B, #FF8A3D); color: #fff; }
.rc-rate { background: linear-gradient(135deg, #7B5BFF, #A78BFA); color: #fff; }
.rc-low  { background: linear-gradient(135deg, #12A05F, #34C77B); color: #fff; }
.rc-tag {
  font-size: 10.5px;
  font-weight: 700;
  opacity: .92;
  letter-spacing: .3px;
}
.rc-title {
  margin-top: 5px;
  height: 32px;
  font-size: 11.5px;
  line-height: 1.45;
  opacity: .95;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.rc-val {
  position: relative;
  z-index: 2;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 800;
}

/* ---------- 快捷筛选 ---------- */
.presets {
  display: flex;
  gap: 7px;
  padding: 0 12px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.presets::-webkit-scrollbar { display: none; }
.preset {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: var(--sub);
  background: #fff;
  border: 1px solid var(--line);
  padding: 4px 11px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .16s;
}
.preset.on {
  color: #fff;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  border-color: transparent;
  font-weight: 600;
}

/* ---------- 智能标签（替换原来的灰标签） ---------- */
.badge.b-comm,
.badge.b-rate,
.badge.b-cpn,
.badge.b-hot,
.badge.b-low {
  color: #fff;
  border: 0;
  padding: 1.5px 5px;
  font-weight: 600;
}
.badge.b-comm { background: #F5A623; }
.badge.b-rate { background: #7B5BFF; }
.badge.b-cpn  { background: linear-gradient(135deg, #FF5C2B, #FF8A3D); }
.badge.b-hot  { background: #12A05F; }
.badge.b-low  { background: #3E7BFA; }

/* 双列瀑布 */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 2px 12px 16px;
}

/* 商品图占位 */
.thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(150deg,
    hsl(var(--h) 82% 93%),
    hsl(calc(var(--h) + 26) 78% 84%));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
/* 真实商品主图（盖在渐变底上面） */
.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}
/* 图片加载失败时：隐藏图片，露出类目图标兜底 */
.thumb img.hide { display: none; }
.thumb .ticon {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}
.thumb img.hide + .ticon { display: flex; }
.thumb::before {
  content: '';
  position: absolute;
  width: 62%; height: 62%; border-radius: 50%;
  background: rgba(255,255,255,.42);
  filter: blur(2px);
}
.thumb::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 82% 16%, rgba(255,255,255,.6) 0 8%, transparent 8.5%),
    radial-gradient(circle at 16% 88%, rgba(255,255,255,.32) 0 14%, transparent 14.5%);
}
.thumb svg {
  position: relative; z-index: 2;
  width: 42%; height: 42%;
  color: hsl(var(--h) 46% 42%);
  stroke-width: 1.25;
  opacity: .85;
}
.thumb.big { aspect-ratio: 1 / 1; }
.thumb.big svg { width: 34%; height: 34%; }

/* 商品卡 */
.card {
  background: var(--card);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(23, 28, 38, .05);
  cursor: pointer;
  transition: transform .16s, box-shadow .16s;
  display: flex; flex-direction: column;
}
.card:active { transform: scale(.976); box-shadow: 0 1px 5px rgba(23,28,38,.09); }
.card-body { padding: 8px 9px 10px; display: flex; flex-direction: column; flex: 1; }
.card-title {
  font-size: 12.8px; line-height: 1.42;
  color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 500;
  min-height: 36px;
}
.badges { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.badge {
  font-size: 9.5px; padding: 1px 4px; border-radius: 3px;
  color: var(--brand); border: .5px solid rgba(255,77,45,.4);
  line-height: 1.4; font-weight: 500;
}
.badge.gray { color: var(--sub); border-color: var(--line); }

.price-row {
  display: flex; align-items: baseline; gap: 5px;
  margin-top: 7px;
}
.price-row .cur { font-size: 11px; color: var(--price); font-weight: 700; }
.price-row .num {
  font-size: 19px; color: var(--price); font-weight: 800;
  letter-spacing: -.5px; line-height: 1;
}
.price-row .num small { font-size: 12px; font-weight: 700; }
.price-row .orig {
  font-size: 10.5px; color: var(--mute);
  text-decoration: line-through;
}
.coupon-row {
  display: flex; align-items: center; gap: 5px;
  margin-top: 6px;
}
.coupon {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #FF5C2B, #FF8A3D);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: .2px;
  position: relative;
}
.sales { font-size: 10px; color: var(--mute); margin-left: auto; }
.earn {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10.5px;
}
.earn .lbl { color: var(--sub); }
.earn .val { color: #F5A623; font-weight: 800; font-size: 12px; }

/* 空状态 */
.empty {
  text-align: center; padding: 60px 30px; color: var(--mute);
  font-size: 13px; line-height: 1.9;
}
.empty svg { width: 54px; height: 54px; opacity: .3; margin-bottom: 10px; }

/* ============================================================
   商品详情页
   ============================================================ */
.detail-page {
  position: absolute; inset: 0;
  background: var(--bg);
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  z-index: 45;
  display: flex; flex-direction: column;
  visibility: hidden;
}
.detail-page.open { transform: translateX(0); visibility: visible; }

.dp-scroll { flex: 1; overflow-y: auto; scrollbar-width: none; }
.dp-scroll::-webkit-scrollbar { display: none; }

.dp-nav {
  position: absolute; top: 48px; left: 12px; right: 12px;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 10;
}
.dp-nav .circ {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0,0,0,.34);
  backdrop-filter: blur(6px);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.dp-nav .circ svg { width: 17px; height: 17px; }

.dp-hero { position: relative; }

.dp-price-block {
  background: linear-gradient(120deg, #FF4D2D, #FF7C2E 60%, #FFA13A);
  padding: 13px 16px 15px;
  color: #fff;
  display: flex; align-items: flex-end; justify-content: space-between;
}
.dp-price-block .l .row1 { display: flex; align-items: baseline; gap: 8px; }
.dp-price-block .l .cur { font-size: 14px; font-weight: 700; }
.dp-price-block .l .big { font-size: 34px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.dp-price-block .l .orig { font-size: 12px; opacity: .78; text-decoration: line-through; }
.dp-price-block .l .cTip { font-size: 11.5px; opacity: .9; margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.dp-price-block .l .cTip b {
  background: rgba(255,255,255,.22); padding: 2px 7px; border-radius: 4px;
  font-size: 11px; font-weight: 600;
}
.dp-price-block .r {
  text-align: right;
  background: rgba(255,255,255,.16);
  border-radius: 10px;
  padding: 7px 11px;
}
.dp-price-block .r .k { font-size: 10px; opacity: .85; }
.dp-price-block .r .v { font-size: 18px; font-weight: 800; margin-top: 1px; letter-spacing: -.3px; }

.dp-sec {
  background: var(--card);
  margin: 9px 12px 0;
  border-radius: var(--r);
  padding: 13px 14px;
}
.dp-title {
  font-size: 15px; font-weight: 600; line-height: 1.5;
  color: var(--text);
}
.dp-shop {
  display: flex; align-items: center; gap: 8px;
  margin-top: 11px; padding-top: 11px;
  border-top: 1px solid var(--line);
}
.dp-shop .ava {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #FFEDE6, #FFD9C8);
  color: var(--brand); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.dp-shop .nm { font-size: 13px; font-weight: 600; }
.dp-shop .meta { font-size: 11px; color: var(--sub); margin-top: 2px; display: flex; gap: 10px; }
.dp-shop .star { color: var(--gold); font-weight: 700; }

.dp-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.dp-tag {
  font-size: 11px; color: var(--sub);
  background: #F7F8FA; border-radius: 4px;
  padding: 3px 8px;
}

.dp-desc { font-size: 13px; line-height: 1.75; color: #4A4F58; margin-top: 2px; }

/* 佣金说明条 */
.comm-card {
  margin: 9px 12px 0;
  background: linear-gradient(135deg, #FFF7E8, #FFF1DC);
  border: 1px solid #FFE3B8;
  border-radius: var(--r);
  padding: 13px 14px;
  display: flex; align-items: center; gap: 12px;
}
.comm-card .ico {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #FFB020, #FF8A00);
  color: #fff; display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.comm-card .ico svg { width: 19px; height: 19px; }
.comm-card .txt { flex: 1; }
.comm-card .txt .t1 { font-size: 12px; color: #8A6520; }
.comm-card .txt .t2 { font-size: 16px; font-weight: 800; color: #B4720C; margin-top: 2px; }
.comm-card .txt .t2 small { font-size: 11px; font-weight: 600; margin-left: 4px; }

.dp-bottom-space { height: 90px; }

/* 底部操作条 */
.dp-bar {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 13px calc(9px + var(--safe-b));
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.dp-bar .mini {
  width: 46px; text-align: center;
  font-size: 10px; color: var(--sub);
  cursor: pointer;
}
.dp-bar .mini svg { width: 21px; height: 21px; display: block; margin: 0 auto 2px; }
.dp-bar .mini.on { color: var(--brand); }
.dp-bar .mini.on svg { fill: rgba(255,77,45,.14); }
.btn-main {
  flex: 1;
  height: 44px;
  border-radius: 22px;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 77, 45, .3);
  border: 0; font-family: inherit;
  transition: transform .14s;
}
.btn-main:active { transform: scale(.98); }
.btn-ghost {
  height: 44px; padding: 0 16px;
  border-radius: 22px;
  border: 1.5px solid var(--brand);
  color: var(--brand); font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; background: #fff;
  white-space: nowrap;
}

/* ============================================================
   弹层 / 底部面板
   ============================================================ */
.overlay {
  position: absolute; inset: 0;
  background: rgba(16, 18, 22, .45);
  opacity: 0; pointer-events: none;
  transition: opacity .24s;
  z-index: 70;
}
.overlay.on { opacity: 1; pointer-events: auto; }

.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-radius: 20px 20px 0 0;
  transform: translateY(102%);
  transition: transform .3s cubic-bezier(.32, .72, 0, 1);
  z-index: 80;
  max-height: 86%;
  display: flex; flex-direction: column;
  padding-bottom: var(--safe-b);
}
.sheet.on { transform: translateY(0); }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 10px;
  flex: 0 0 auto;
}
.sheet-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.sheet-head .x {
  width: 26px; height: 26px; border-radius: 50%;
  background: #F2F3F5; color: var(--sub);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 15px;
}
.sheet-body {
  padding: 4px 18px 18px;
  overflow-y: auto;
  scrollbar-width: none;
}
.sheet-body::-webkit-scrollbar { display: none; }

/* 淘口令块 */
.tpwd-box {
  background: linear-gradient(135deg, #FFF4EE, #FFE9DD);
  border: 1px dashed rgba(255, 77, 45, .4);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  position: relative;
}
.tpwd-box .k { font-size: 11px; color: #B26A50; letter-spacing: .5px; }
.tpwd-box .v {
  font-size: 19px; font-weight: 800; color: var(--brand-deep);
  letter-spacing: 1px; margin-top: 6px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  word-break: break-all;
}
.copy-btn {
  margin-top: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 16px;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: #fff; border-radius: 15px; font-size: 12.5px; font-weight: 700;
  cursor: pointer; border: 0; font-family: inherit;
}
.copy-btn svg { width: 13px; height: 13px; }

.field { margin-top: 14px; }
.field .fk {
  font-size: 11.5px; color: var(--sub); margin-bottom: 6px;
  display: flex; align-items: center; justify-content: space-between;
}
.field .fk .mini-btn { color: var(--brand); font-weight: 600; cursor: pointer; font-size: 11.5px; }
.field .fv {
  background: #F7F8FA;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  color: #3C424C;
  line-height: 1.7;
  word-break: break-all;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.field textarea.fv {
  width: 100%; border: 0; outline: 0; resize: none;
  font-family: inherit; font-size: 12.5px; line-height: 1.75;
  min-height: 96px;
}
.sheet-actions { display: flex; gap: 10px; margin-top: 16px; }
.sheet-actions .btn-main, .sheet-actions .btn-ghost { height: 46px; flex: 1; }

/* 海报预览 */
.poster-wrap { text-align: center; padding: 6px 0 4px; }
.poster-wrap img {
  width: 232px; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(20, 24, 32, .18);
}
.poster-tip { font-size: 11.5px; color: var(--sub); margin-top: 12px; line-height: 1.7; }

/* ============================================================
   推广页
   ============================================================ */
.pg-head {
  padding: 54px 16px 18px;
  background: linear-gradient(165deg, #FF5C2B, #FF8A32);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.pg-head::after {
  content: ''; position: absolute;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,.12); top: -90px; right: -60px;
}
.pg-head h1 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: .3px; }
.pg-head p { margin: 6px 0 0; font-size: 12px; opacity: .86; }
.pg-stats {
  display: flex; gap: 10px; margin-top: 16px;
  position: relative; z-index: 2;
}
.pg-stat {
  flex: 1; background: rgba(255,255,255,.17);
  border-radius: 11px; padding: 9px 10px;
  backdrop-filter: blur(4px);
}
.pg-stat .v { font-size: 19px; font-weight: 800; letter-spacing: -.4px; }
.pg-stat .k { font-size: 10.5px; opacity: .84; margin-top: 1px; }

.sec-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 9px;
}
.sec-title h2 { margin: 0; font-size: 14.5px; font-weight: 700; }
.sec-title .more { font-size: 11.5px; color: var(--sub); cursor: pointer; }

.pid-list { padding: 0 12px; }
.pid-card {
  background: #fff; border-radius: var(--r);
  padding: 12px 13px;
  display: flex; align-items: center; gap: 11px;
  margin-bottom: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: border-color .18s;
}
.pid-card.on { border-color: rgba(255,77,45,.5); background: #FFFAF8; }
.pid-card .ico {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #FFEDE6, #FFDCCB);
  color: var(--brand); display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.pid-card .ico svg { width: 18px; height: 18px; }
.pid-card .info { flex: 1; min-width: 0; }
.pid-card .info .n { font-size: 13.5px; font-weight: 600; }
.pid-card .info .p {
  font-size: 10.5px; color: var(--mute); margin-top: 2px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pid-card .chk {
  width: 19px; height: 19px; border-radius: 50%;
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.pid-card.on .chk {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.pid-card .chk svg { width: 11px; height: 11px; }

/* 素材列表 */
.mat-list { padding: 0 12px 8px; }
.mat-card {
  background: #fff; border-radius: var(--r);
  padding: 11px;
  display: flex; gap: 11px;
  margin-bottom: 9px;
  align-items: center;
}
.mat-card .thumb {
  width: 58px; height: 58px; flex: 0 0 58px;
  border-radius: 9px; aspect-ratio: auto;
}
.mat-card .thumb svg { width: 46%; height: 46%; }
.mat-card .m {
  flex: 1; min-width: 0;
}
.mat-card .m .t {
  font-size: 12.5px; line-height: 1.4; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mat-card .m .tp {
  font-size: 11px; color: var(--brand-deep); margin-top: 4px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mat-card .m .tm { font-size: 10px; color: var(--mute); margin-top: 3px; }
.mat-card .act {
  flex: 0 0 auto;
  height: 28px; padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,77,45,.45);
  color: var(--brand); font-size: 11.5px; font-weight: 600;
  display: flex; align-items: center; cursor: pointer;
  background: #fff;
}

/* ============================================================
   收益页
   ============================================================ */
.inc-head {
  padding: 54px 16px 0;
  background: linear-gradient(165deg, #FF5C2B 0%, #FF7B2C 52%, #FF9C38 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding-bottom: 46px;
}
.inc-head::after {
  content: ''; position: absolute;
  width: 240px; height: 240px; border-radius: 50%;
  background: rgba(255,255,255,.1); top: -110px; right: -80px;
}
.inc-head .lbl { font-size: 12px; opacity: .86; position: relative; z-index: 2; }
.inc-head .big {
  font-size: 40px; font-weight: 800; letter-spacing: -1.5px;
  margin-top: 4px; line-height: 1.1;
  position: relative; z-index: 2;
}
.inc-head .big small { font-size: 17px; font-weight: 700; margin-right: 3px; }
.inc-head .sub {
  display: flex; gap: 22px; margin-top: 14px;
  position: relative; z-index: 2;
}
.inc-head .sub div { font-size: 11px; opacity: .85; }
.inc-head .sub div b { display: block; font-size: 15px; font-weight: 700; margin-top: 2px; opacity: 1; }

.inc-cards {
  display: flex; gap: 9px;
  margin: -34px 12px 0;
  position: relative; z-index: 5;
}
.inc-card {
  flex: 1; background: #fff; border-radius: var(--r);
  padding: 11px 10px;
  box-shadow: 0 4px 16px rgba(23, 28, 38, .07);
  text-align: center;
}
.inc-card .v { font-size: 17px; font-weight: 800; color: var(--text); letter-spacing: -.4px; }
.inc-card .v.gold { color: #E8951B; }
.inc-card .v.blue { color: #3E7BFA; }
.inc-card .k { font-size: 10.5px; color: var(--sub); margin-top: 3px; }

.chart-card {
  background: #fff; border-radius: var(--r);
  margin: 12px 12px 0;
  padding: 13px 12px 6px;
}
.chart-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.chart-head h3 { margin: 0; font-size: 13.5px; font-weight: 700; }
.seg {
  display: flex; background: #F4F5F7; border-radius: 8px; padding: 2px;
}
.seg span {
  font-size: 11px; padding: 3px 9px; border-radius: 6px;
  color: var(--sub); cursor: pointer; transition: all .16s;
}
.seg span.on { background: #fff; color: var(--brand); font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
#trendCanvas { display: block; width: 100%; height: 132px; }

/* 订单 */
.order {
  background: #fff; border-radius: var(--r);
  margin: 0 12px 9px;
  padding: 12px;
  display: flex; gap: 11px;
  align-items: center;
}
.order .thumb { width: 50px; height: 50px; flex: 0 0 50px; border-radius: 9px; aspect-ratio: auto; }
.order .thumb svg { width: 44%; height: 44%; }
.order .o { flex: 1; min-width: 0; }
.order .o .t {
  font-size: 12.5px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.order .o .m { font-size: 10.5px; color: var(--mute); margin-top: 4px; display: flex; gap: 8px; }
.order .r { text-align: right; flex: 0 0 auto; }
.order .r .c { font-size: 15px; font-weight: 800; color: var(--price); }
.order .r .c small { font-size: 10px; }
.order .r .st {
  font-size: 10px; margin-top: 3px; padding: 1px 6px; border-radius: 3px;
  display: inline-block;
}
.st.pending { color: #C77F00; background: #FFF4DF; }
.st.settled { color: #12905B; background: #E4F7EE; }
.st.invalid { color: var(--mute); background: #F3F4F6; }

/* ---------- 落地页转化看板 ---------- */
.stat-wrap {
  background: #fff;
  border-radius: var(--r);
  margin: 0 12px;
  padding: 14px;
}
.stat-nums {
  display: flex;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}
.stat-nums div {
  flex: 1;
  text-align: center;
  border-right: 1px solid var(--line);
}
.stat-nums div:last-child { border-right: 0; }
.stat-nums b {
  display: block;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--text);
}
.stat-nums span {
  display: block;
  font-size: 10.5px;
  color: var(--sub);
  margin-top: 2px;
}
.stat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.stat-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.sr-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.sr-nums {
  color: var(--sub);
  font-size: 11px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.sr-nums b {
  color: var(--brand);
  font-weight: 700;
}
.sr-rate {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 700;
  color: #12905B;
  min-width: 42px;
  text-align: right;
}
.stat-empty {
  background: #fff;
  border-radius: var(--r);
  margin: 0 12px;
  padding: 22px 20px;
  text-align: center;
  font-size: 12px;
  color: var(--mute);
  line-height: 1.9;
}
.stat-none {
  padding: 16px 0 6px;
  text-align: center;
  font-size: 11.5px;
  color: var(--mute);
}

/* 热门搜索词 */
.kw-block {
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.kw-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.kw-title span {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--mute);
}
.kw-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.kw-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: #7A4520;
  background: #FFF3E8;
  border: 1px solid #FFE0C7;
  padding: 3px 9px;
  border-radius: 11px;
}
.kw-chip b {
  font-size: 10px;
  color: #fff;
  background: var(--brand);
  border-radius: 7px;
  padding: 0 5px;
  line-height: 14px;
  font-weight: 700;
}

/* ============================================================
   我的
   ============================================================ */
.mine-head {
  padding: 56px 18px 56px;
  background: linear-gradient(165deg, #FF5C2B, #FF8A32);
  color: #fff;
  position: relative; overflow: hidden;
}
.mine-head::after {
  content: ''; position: absolute;
  width: 230px; height: 230px; border-radius: 50%;
  background: rgba(255,255,255,.11); top: -100px; left: -70px;
}
.mine-user { display: flex; align-items: center; gap: 13px; position: relative; z-index: 2; }
.mine-user .ava {
  width: 58px; height: 58px; border-radius: 50%;
  background: rgba(255,255,255,.92);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: var(--brand);
  box-shadow: 0 4px 14px rgba(160,60,20,.2);
  flex: 0 0 auto;
}
.mine-user .nm { font-size: 18px; font-weight: 800; }
.mine-user .lv {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 600;
  background: linear-gradient(120deg, #FFE9A8, #FFC94D);
  color: #7A5100;
  padding: 2px 8px; border-radius: 9px;
  margin-top: 5px;
}
.mine-user .code { font-size: 11px; opacity: .82; margin-top: 5px; }

.mine-stats {
  display: flex;
  background: #fff; border-radius: var(--r);
  margin: -32px 12px 0;
  position: relative; z-index: 5;
  box-shadow: 0 4px 16px rgba(23,28,38,.07);
  padding: 14px 0;
}
.mine-stats div {
  flex: 1; text-align: center;
  border-right: 1px solid var(--line);
}
.mine-stats div:last-child { border-right: 0; }
.mine-stats .v { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.mine-stats .k { font-size: 10.5px; color: var(--sub); margin-top: 3px; }

.menu-group {
  background: #fff; border-radius: var(--r);
  margin: 12px 12px 0;
  overflow: hidden;
}
.menu {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .15s;
}
.menu:last-child { border-bottom: 0; }
.menu:active { background: #FAFBFC; }
.menu .mi {
  width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.menu .mi svg { width: 16px; height: 16px; }
.menu .mi.c1 { background: #FFEDE6; color: #FF6A3D; }
.menu .mi.c2 { background: #E9F0FF; color: #3E7BFA; }
.menu .mi.c3 { background: #E7F8EF; color: #12A05F; }
.menu .mi.c4 { background: #FFF4DF; color: #D39200; }
.menu .mi.c5 { background: #F0EDFF; color: #6C5CE7; }
.menu .mt { flex: 1; font-size: 13.5px; font-weight: 500; }
.menu .mv { font-size: 12px; color: var(--mute); }
.menu .ar { color: #D3D7DE; font-size: 15px; line-height: 1; }

.foot-note {
  text-align: center; font-size: 10.5px; color: var(--mute);
  padding: 22px 0 16px; line-height: 1.8;
}

/* ---------- 手动选品 ---------- */
.manual-tip {
  background: #F0F7FF;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 12px;
  line-height: 1.85;
  color: #2B5FA8;
  margin-bottom: 12px;
}
.manual-tip b { color: #1A4173; }

.manual-input {
  width: 100%;
  min-height: 74px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  font-family: inherit;
  line-height: 1.7;
  resize: vertical;
  outline: none;
  margin-bottom: 9px;
}
.manual-input:focus { border-color: var(--brand); }

.manual-price {
  width: 100%;
  height: 40px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  margin-bottom: 10px;
}
.manual-price:focus { border-color: var(--brand); }

.manual-add {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 21px;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.manual-add:disabled { opacity: .6; }

.manual-csv {
  width: 100%;
  height: 44px;
  border: 1.5px solid var(--brand);
  border-radius: 22px;
  background: #fff;
  color: var(--brand);
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-bottom: 12px;
}
.manual-csv:disabled { opacity: .6; }

.manual-or {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--mute);
  margin-bottom: 10px;
}
.manual-or::before,
.manual-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.manual-list { margin-top: 14px; }
.manual-empty {
  text-align: center;
  font-size: 12px;
  color: var(--mute);
  padding: 22px 0;
}
.manual-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.manual-row:last-child { border-bottom: 0; }
.mr-main { flex: 1; min-width: 0; }
.mr-title {
  font-size: 12.5px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mr-meta { font-size: 11px; color: var(--sub); margin-top: 4px; }
.mr-ok { color: #12A05F; font-weight: 600; }
.mr-bad { color: #E03A18; font-weight: 600; }
.mr-del {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: #E03A18;
  padding: 6px 10px;
  border-radius: 8px;
  background: #FFEAE6;
  cursor: pointer;
}

/* ---------- 接口自检 ---------- */
.diag-loading {
  padding: 40px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--sub);
  line-height: 1.9;
}
.diag-loading span {
  display: block;
  font-size: 11.5px;
  color: var(--mute);
  margin-top: 6px;
}
.diag-sum {
  background: linear-gradient(120deg, #E7F8EF, #F0FBF5);
  color: #12905B;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}
.diag-sum.warn {
  background: #FFF6E5;
  color: #A9700B;
}
.diag-row {
  display: flex;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.diag-row:last-of-type { border-bottom: 0; }
.dr-ico {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  margin-top: 1px;
}
.diag-row.ok .dr-ico { background: #E7F8EF; color: #12905B; }
.diag-row.bad .dr-ico { background: #FFEAE6; color: #E03A18; }
.diag-row.skip .dr-ico { background: #F2F3F5; color: var(--mute); }
.diag-row.skip .dr-name { color: var(--mute); }
.diag-row.skip .dr-fix { background: #F7F8FA; color: var(--sub); }
.dr-body { flex: 1; min-width: 0; }
.dr-name { font-size: 13px; font-weight: 600; }
.diag-row.bad .dr-name { color: #E03A18; }
.dr-detail {
  font-size: 11.5px;
  color: var(--sub);
  line-height: 1.7;
  margin-top: 3px;
  word-break: break-all;
}
.dr-fix {
  font-size: 11.5px;
  color: #A9700B;
  background: #FFF6E5;
  border-radius: 6px;
  padding: 7px 9px;
  margin-top: 7px;
  line-height: 1.7;
}
.diag-foot {
  text-align: center;
  font-size: 10.5px;
  color: var(--mute);
  padding: 18px 0 6px;
}

/* ---------- Toast ---------- */
.toast {
  position: absolute;
  left: 50%; top: 46%;
  transform: translate(-50%, -50%) scale(.9);
  background: rgba(24, 26, 30, .88);
  color: #fff;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 10px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 200;
  max-width: 76%;
  text-align: center;
  line-height: 1.5;
  backdrop-filter: blur(6px);
}
.toast.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ---------- 移动端全屏 ---------- */
@media (max-width: 520px), (max-height: 900px) and (pointer: coarse) {
  body { background: var(--bg); display: block; }
  .device { padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .app {
    width: 100vw; height: 100vh; height: 100dvh;
    border-radius: 0;
  }
  .statusbar { display: none; }
  .home-head, .pg-head, .inc-head, .mine-head { padding-top: 18px; }
  .mine-head { padding-top: 26px; }
  .dp-nav { top: 14px; }
}
