:root {
  /* 2026-12-02 Dickson 定：全部系统统一配色（AI 工作区/200_Reference/brand/DELUX_系统配色.md，照 CRM） */
  /* 品牌 */
  --bg: #03142c;        /* 官方藏青（这个 App 一直叫 --bg：顶栏、深色区块、主要按钮） */
  --navy: #03142c;
  --gold: #c8ad76;      /* 官方金：重点、选中 */
  --gold-ink: #7a5c24;  /* 金色底上的字、金色文字 */
  --gold-soft: #fbf3e0; /* 浅金底（浅色地方：提示框、选中的项目） */
  --gold-line: #e6cf9c; /* 浅金框线 */
  --gold-tint: rgba(200,173,118,.16); /* 深色地方选中的淡金底（顶栏的分页） */
  --navy-dark: #0b1a33; /* 照片后面的深色底 */
  --navy-3: #121b2e;    /* 深色渐层的另一头 */
  /* 底色和文字 */
  --page: #f7f5f0;      /* 页面底色（暖米白） */
  --panel: #ffffff;     /* 卡片、视窗 */
  --head: #faf8f3;      /* 表头、区块头 */
  --calm: #f1ede4;      /* 中性浅底：停用、灰色标签、图片还没出来前 */
  --ink: #1a1d29;       /* 主要文字 */
  --ink-2: #3d4655;     /* 次要文字 */
  --muted: #5e6776;     /* 说明、灰字（不要再淡） */
  --line: #ece6d8;      /* 分隔线 */
  --line-2: #e3dccb;    /* 按钮 / 输入框框线 */
  /* 状态色：字用深的、底用浅的 */
  --ok: #1f5e23;   --ok-bg: #e7f3e4;   /* 绿：成功、能做 */
  --err: #b4532a;  --err-bg: #f8e3da;  /* 红褐：错误、删除、不能做 */
  --warn: #8a5200; --warn-bg: #fff1d6; /* 橙：提醒、等待 */
  --blue: #1f5fad; --blue-bg: #e5eefa; /* 蓝：资讯 */
  --sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, var(--sans);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  flex-direction: column;
}

/* 顶栏 */
/* iPad 加到主屏幕后是全屏：上面的时间/电池那一条、下面的横条会盖到画面，要让出位置 */
body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* 「点 iPad 最上面（时间、电池）就回到顶部」：
   iPad 只会让「整个网页」回到顶部，所以让网页本身多出 2px 可以滑，
   点状态栏时网页会滑回 0，程序看到就把这一页滑回最上面（core.js） */
html.tap-top { height: calc(100% + 2px); overflow-y: scroll; overscroll-behavior: none; scrollbar-width: none; }
html.tap-top::-webkit-scrollbar { display: none; }
html.tap-top body { height: 100vh; height: 100dvh; position: sticky; top: 0; }
.scroll-view, .place-panel, .panel, .design-list, .summary-list { overscroll-behavior: contain; }
.topbar {
  height: calc(56px + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 16px;
  padding-right: 16px;
  background: var(--bg);
  color: #fff;
}
/* 从主屏幕打开（全屏）时：iPadOS 26 的状态栏下面还有一层毛玻璃，
   所以让出 56px（时间、电池、App 名字 + 毛玻璃），这一整条点下去 = 回到顶部 */
.topbar { position: relative; }
.top-hit { display: none; }
@media (display-mode: standalone) {
  .topbar {
    padding-top: max(env(safe-area-inset-top), 56px);
    height: calc(56px + max(env(safe-area-inset-top), 56px));
  }
  .top-hit { display: block; }
}
body.standalone .topbar {
  padding-top: max(env(safe-area-inset-top), 56px);
  height: calc(56px + max(env(safe-area-inset-top), 56px));
}
body.standalone .top-hit { display: block; }
/* 最上面整排的感应区：整条都可以按，按了回到顶部 */
.top-hit {
  position: absolute; left: 0; right: 0; top: 0;
  height: max(env(safe-area-inset-top), 56px);
  z-index: 5; cursor: pointer;
}
.app-icon { width: 34px; height: 34px; border-radius: 9px; cursor: pointer; }
.brand { cursor: pointer; }
.brand { font-weight: 800; letter-spacing: 1px; font-size: 19px; color: #fff; white-space: nowrap; }
.brand b { color: var(--gold); font-weight: 900; }
.brand span { color: rgba(255,255,255,.5); font-weight: 500; font-size: 11px; letter-spacing: 1px; margin-left: 2px; }
.model { color: rgba(255,255,255,.6); font-size: 14px; flex: 1; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body:not([data-view="explain"]) .model { visibility: hidden; }

/* 上面的两个页面切换 */
.tabs { display: flex; gap: 2px; margin-left: 6px; }
.tabs button {
  border: 0; background: transparent; color: rgba(255,255,255,.65);
  font-size: 15px; font-weight: 600; padding: 8px 12px; border-radius: 10px; white-space: nowrap;
}
.top-btn {
  border: 1px solid rgba(200,173,118,.35); background: rgba(255,255,255,.06); color: #fff;
  font-size: 13px; font-weight: 600; padding: 7px 11px; border-radius: 999px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.top-btn b { background: var(--gold); color: var(--bg); border-radius: 999px; min-width: 20px; height: 20px; line-height: 20px; text-align: center; font-size: 12px; }
.mode-btn.customer { background: var(--gold); color: var(--bg); border-color: var(--gold); }
/* 客户模式：内部资料不显示 */
body[data-mode="customer"] .sales-only { display: none !important; }

/* 分段切换（Gate / Door） */
.seg { display: inline-flex; background: var(--calm); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 9px 16px; border-radius: 9px; font-size: 15px; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--bg); color: #fff; box-shadow: inset 0 -2px 0 var(--gold); }
.seg.small { align-self: flex-start; margin-bottom: 14px; }
.seg.small button { padding: 7px 12px; font-size: 13px; }
.tabs button.on { background: var(--gold-tint); color: var(--gold); box-shadow: inset 0 -3px 0 var(--gold); }
.view.hidden { display: none !important; }

/* ---------- 首页 ---------- */
.scroll-view { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--page); }
.hero {
  background: linear-gradient(135deg, var(--bg) 0%, var(--navy-3) 100%);
  color: #fff;
  padding: 34px 36px 30px;
  display: flex; gap: 30px; align-items: flex-end; flex-wrap: wrap;
  border-bottom: 3px solid var(--gold);
}
.hero-text { flex: 1 1 360px; }
.eyebrow { color: var(--gold); font-size: 13px; letter-spacing: 3px; font-weight: 700; }
.hero h1 { font-size: 32px; line-height: 1.25; margin: 10px 0 10px; }
.hero p { color: rgba(255,255,255,.75); font-size: 16px; line-height: 1.6; margin: 0; max-width: 520px; }
.stats { display: grid; grid-template-columns: repeat(3, auto); gap: 14px 26px; }
.stat b { display: block; font-size: 28px; color: var(--gold); font-weight: 800; }
.stat span { font-size: 13px; color: rgba(255,255,255,.75); }
.stats.light { grid-template-columns: repeat(3, 1fr); background: var(--bg); padding: 22px 24px; border-radius: 16px; margin-bottom: 8px; }

.block { padding: 26px 36px 36px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.block-head h2 { font-size: 22px; margin: 0; color: var(--ink); }
.block-head h2::before { content: ''; display: inline-block; width: 6px; height: 20px; background: var(--gold); border-radius: 3px; margin-right: 10px; vertical-align: -3px; }
.block-head span { color: var(--muted); font-size: 14px; }
.featured-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin-top: 18px; }
.design-card {
  border: 0; padding: 0; text-align: left; background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(3,20,44,.08); transition: transform .2s, box-shadow .2s;
}
.design-card:active { transform: scale(.98); }
.dc-img { position: relative; aspect-ratio: 4 / 3; background: var(--navy-dark); }
.dc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rank {
  position: absolute; left: 10px; top: 10px; background: var(--gold); color: var(--bg);
  font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 6px; letter-spacing: 1px;
}
.dc-body { padding: 12px 14px 14px; }
.dc-body b { display: block; font-size: 17px; color: var(--ink); }
.dc-body small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.dc-go { display: inline-block; margin-top: 10px; color: var(--gold-ink); font-weight: 700; font-size: 14px; }

/* ---------- 产品资料 ---------- */
.products-view { flex: 1; display: flex; min-height: 0; }
.sub-nav {
  flex: 0 0 210px; background: #fff; border-right: 1px solid var(--line);
  padding: 16px 10px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
}
.sub-nav button {
  border: 0; background: transparent; text-align: left; padding: 13px 14px; border-radius: 10px;
  font-size: 15px; font-weight: 600; color: var(--muted);
}
.sub-nav button.on { background: var(--gold-soft); color: var(--bg); box-shadow: inset 3px 0 0 var(--gold); }
.products-body { padding: 26px 32px 40px; }
.p-title { font-size: 26px; margin: 0 0 16px; color: var(--ink); }
.products-body h3 { font-size: 18px; margin: 26px 0 12px; color: var(--bg); }
.lead { font-size: 16px; line-height: 1.7; color: var(--ink-2); margin: 14px 0; }
.note { font-size: 13px; color: var(--muted); }
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
thead th { background: var(--bg); color: #fff; font-weight: 700; padding: 12px 14px; text-align: center; white-space: nowrap; }
thead th:first-child { background: var(--bg); }
tbody th { text-align: left; font-weight: 600; color: var(--muted); padding: 11px 14px; white-space: nowrap; background: var(--head); }
tbody td { text-align: center; padding: 11px 14px; color: var(--ink); }
tbody tr + tr th, tbody tr + tr td { border-top: 1px solid var(--line); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.feature { border: 0; padding: 0 0 12px; background: #fff; border-radius: 14px; overflow: hidden; text-align: left; box-shadow: 0 1px 6px rgba(3,20,44,.07); }
.feature img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--bg); }
.feature b { display: block; font-size: 15px; padding: 10px 12px 2px; color: var(--ink); }
.feature small { display: block; font-size: 13px; padding: 0 12px; color: var(--muted); line-height: 1.5; }
.ticks { padding-left: 0; list-style: none; }
.ticks li { padding: 6px 0 6px 26px; position: relative; font-size: 15px; }
.ticks li::before { content: '✓'; position: absolute; left: 4px; color: var(--gold); font-weight: 800; }
.model-list, .point-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.model-list div, .point-list div { background: #fff; border-radius: 12px; padding: 14px 16px; border-left: 4px solid var(--gold); }
.model-list b, .point-list b { display: block; font-size: 15px; color: var(--ink); }
.model-list span, .point-list small { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.timeline li { display: flex; gap: 16px; background: #fff; border-radius: 12px; padding: 12px 16px; align-items: center; }
.timeline b { color: var(--bg); font-size: 16px; min-width: 44px; }
.timeline.gold b { color: var(--gold-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; }
.promise { background: var(--bg); color: #fff; border-radius: 16px; padding: 20px 22px; border-left: 5px solid var(--gold); }
.promise small { color: var(--gold); font-weight: 700; letter-spacing: 1px; }
.promise b { display: block; font-size: 18px; margin-top: 6px; line-height: 1.5; }
.lang { display: flex; background: rgba(255,255,255,.08); border: 1px solid rgba(200,173,118,.35); border-radius: 999px; padding: 3px; }
.lang button {
  border: 0; background: transparent; color: #d6d8de;
  font-size: 15px; font-weight: 600; padding: 6px 14px; border-radius: 999px;
}
.lang button.on { background: var(--gold); color: var(--ink); }

/* 主体：左边照片，右边说明 */
.layout { flex: 1; display: flex; min-height: 0; }
.stage {
  flex: 1 1 62%;
  position: relative;
  overflow: hidden;
  background: var(--navy-dark);
  touch-action: none;
}
.scene {
  position: absolute;
  left: 0; top: 0;
  transform-origin: 0 0;
  transition: transform 0.9s cubic-bezier(.2,.8,.2,1);
}
.scene img { display: block; pointer-events: none; }

/* 照片上的点 */
.hotspot {
  position: absolute;
  width: 0; height: 0;
  transform: scale(var(--inv, 1));
  transition: transform 0.9s cubic-bezier(.2,.8,.2,1);
}
.hotspot .tap {
  position: absolute;
  left: -30px; top: -30px; width: 60px; height: 60px;
  border: 0; background: transparent; padding: 0;
}
.hotspot .dot {
  position: absolute;
  left: -15px; top: -15px; width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: var(--bg); font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  transition: background .3s, transform .3s;
}
.hotspot .ring {
  position: absolute;
  left: -15px; top: -15px; width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.9);
  animation: pulse 1.8s ease-out infinite;
}
.hotspot.active .dot { background: var(--gold); transform: scale(1.15); }
.hotspot.active .ring { border-color: var(--gold); }

/* 会动的箭头（只有正在讲的那个点才出现） */
.arrow {
  position: absolute;
  left: 0; top: 0;
  width: 0; height: 0;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.hotspot.active .arrow { opacity: 1; }
.arrow svg {
  position: absolute;
  left: 22px; top: -18px;
  width: 110px; height: 36px;
  overflow: visible;
  animation: poke 1.1s ease-in-out infinite;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
}

@keyframes pulse {
  0% { transform: scale(1); opacity: .9; }
  100% { transform: scale(2.4); opacity: 0; }
}
@keyframes poke {
  0%, 100% { transform: translateX(14px); }
  50% { transform: translateX(0); }
}

.overview-btn {
  position: absolute; left: 16px; bottom: 16px;
  border: 0; border-radius: 999px;
  padding: 10px 18px;
  background: rgba(0,0,0,.6); color: #fff;
  font-size: 15px; font-weight: 600;
  backdrop-filter: blur(6px);
}

/* 右边说明 */
.panel {
  flex: 0 0 38%;
  max-width: 440px;
  background: var(--panel);
  padding: 32px 30px 26px;
  display: flex; flex-direction: column;
}
.step { color: var(--gold); font-weight: 700; font-size: 15px; letter-spacing: 1px; }
.panel h1 { font-size: 30px; line-height: 1.25; margin: 10px 0 16px; }
.panel p { font-size: 19px; line-height: 1.65; color: var(--ink-2); margin: 0 0 20px; }
.proof {
  align-self: flex-start;
  background: var(--gold-soft); color: var(--gold-ink);
  box-shadow: inset 3px 0 0 var(--gold);
  font-weight: 700; font-size: 16px;
  padding: 8px 14px; border-radius: 10px;
}
.proof:empty { display: none; }

/* 特写图（来自 Library） */
.media {
  position: relative;
  margin-top: 18px;
  height: 230px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg);
}
.media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.media.empty { display: none; }
.zoom-hint {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(0,0,0,.6); color: #fff;
  font-size: 13px; font-weight: 600;
  padding: 5px 10px; border-radius: 999px;
  pointer-events: none;
}
.thumbs { display: flex; gap: 8px; margin-top: 10px; }
.thumbs:empty { display: none; }
.thumbs button {
  width: 64px; height: 48px; padding: 0;
  border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--calm);
}
.thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs button.on { border-color: var(--gold); }

/* 点特写图后全屏看 */
.lightbox {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.lightbox.on { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 92%; max-height: 92%; border-radius: 12px; }
.panel .fade { animation: fadeIn .45s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.spacer { flex: 1; }

.dots { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; }
.dots button {
  width: 10px; height: 10px; border-radius: 50%;
  border: 0; padding: 0; background: var(--line);
}
.dots button.on { background: var(--gold); width: 26px; border-radius: 6px; }

.nav { display: flex; gap: 12px; }
.nav button {
  flex: 1; height: 56px; border-radius: 14px;
  font-size: 18px; font-weight: 700;
}
.nav .ghost { background: #fff; border: 2px solid var(--line); color: var(--ink); }
.nav .primary { background: var(--bg); border: 0; color: #fff; box-shadow: inset 0 -3px 0 var(--gold); }
.nav button:disabled { opacity: .35; }

/* ---------- 放在客户家 ---------- */
.place-wrap { position: absolute; }
.place-wrap > img#housePhoto { width: 100%; height: 100%; display: block; pointer-events: none; }
#gateOverlay {
  position: absolute; left: 0; top: 0;
  transform-origin: 0 0;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.handle {
  position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: rgba(200,173,118,.35);
  border: 3px solid var(--gold);
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
  touch-action: none; cursor: grab;
}
.handle::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-radius: 50%; background: #fff;
}
.place-tip {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 32px);
  text-align: center; pointer-events: none;
  color: #fff; font-size: 14px; font-weight: 600;
  background: rgba(43,48,58,.8); padding: 9px 16px; border-radius: 999px; backdrop-filter: blur(6px);
}

.photo-btns { display: flex; gap: 10px; margin-top: 4px; }
.big-btn {
  flex: 1; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; cursor: pointer;
}
.big-btn { gap: 8px; }
.big-btn .ic { width: 22px; height: 22px; color: var(--gold); }
.big-btn.primary { background: var(--bg); color: #fff; box-shadow: inset 0 -3px 0 var(--gold); }
.big-btn.ghost { background: #fff; border: 2px solid var(--line); color: var(--ink); }

.field-label { margin: 20px 0 8px; font-size: 14px; font-weight: 700; color: var(--muted); }
.design-list { display: flex; flex-direction: column; gap: 8px; }
.design-item {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 8px; border-radius: 12px; border: 2px solid var(--line); background: #fff;
}
.design-item img { width: 96px; height: 30px; object-fit: cover; border-radius: 4px; }
.design-item b { display: block; font-size: 15px; color: var(--ink); }
.design-item small { color: var(--muted); font-size: 12px; }
.design-item.on { border-color: var(--gold); background: var(--gold-soft); }
.note { margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.5; }
input[type="range"] { width: 100%; accent-color: var(--gold); }

/* 讯息：右上角弹出（CLAUDE.md：滚动时也看得到），在顶栏下面 */
.toast {
  position: fixed; right: 16px; top: calc(68px + env(safe-area-inset-top)); left: auto; bottom: auto;
  max-width: min(420px, calc(100% - 32px)); transform: translateY(-10px);
  background: var(--bg); color: #fff; padding: 12px 18px; border-radius: 12px; line-height: 1.45;
  font-weight: 600; opacity: 0; transition: .3s; pointer-events: none; z-index: 90;
  box-shadow: inset 4px 0 0 var(--gold), 0 8px 24px rgba(0,0,0,.25);
}
body.standalone .toast { top: 124px; }
.toast.on { opacity: 1; transform: translateY(0); }
.toast.ok { background: var(--ok); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.toast.err { background: var(--err); box-shadow: 0 8px 24px rgba(0,0,0,.25); }

/* ---------- 首页按钮 ---------- */
.hero-actions { margin-top: 18px; }
.pill { border: 0; border-radius: 999px; padding: 11px 20px; font-size: 15px; font-weight: 700; }
.pill.gold { background: var(--gold); color: var(--bg); }
.pill.ghost-light { background: transparent; color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.3); margin-left: 8px; }

/* ---------- 设计目录 ---------- */
.catalog-view { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--page); }
.cat-bar { display: flex; align-items: center; gap: 14px; padding: 16px 24px 8px; flex-wrap: wrap; }
.search {
  flex: 1; min-width: 180px; max-width: 360px; height: 42px; border-radius: 12px; border: 1px solid var(--line);
  padding: 0 14px; font-size: 15px; background: #fff; color: var(--ink); -webkit-user-select: text; user-select: text;
}
.search.small { width: 100%; max-width: none; height: 38px; font-size: 14px; margin-bottom: 8px; }
.cat-count { color: var(--muted); font-size: 14px; }
.chips-row { display: flex; gap: 8px; padding: 6px 24px; overflow-x: auto; flex: none; }
.chips-row button {
  border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px;
  padding: 7px 14px; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.chips-row button.on { background: var(--bg); color: #fff; border-color: var(--bg); box-shadow: inset 0 -2px 0 var(--gold); }
.cat-grid {
  padding: 12px 24px 40px; display: grid; gap: 14px; align-content: start; grid-auto-rows: max-content;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
.cat-card {
  border: 0; padding: 0 0 10px; background: #fff; border-radius: 14px; overflow: hidden; text-align: left; position: relative;
  box-shadow: 0 1px 6px rgba(3,20,44,.07);
}
.cc-img { aspect-ratio: 4 / 3; background: var(--calm); }
.cat-card.door .cc-img { aspect-ratio: 1 / 1.12; background: #fff; padding: 10px; }
.cc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-card.door .cc-img img { object-fit: contain; }
.cat-card b { display: block; font-size: 15px; padding: 8px 10px 0; color: var(--ink); }
.cat-card small { display: block; font-size: 12px; padding: 2px 10px 0; color: var(--muted); }
.cat-card.na { opacity: .38; }
.na-tag { position: absolute; left: 8px; top: 8px; background: var(--err); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.empty-note { color: var(--muted); }

/* ---------- 弹出卡片 ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 40; background: rgba(3,20,44,.55);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.sheet.on { opacity: 1; pointer-events: auto; }
.sheet-card {
  position: relative; background: #fff; border-radius: 20px; width: min(860px, 100%); max-height: 100%;
  display: flex; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.sheet-card.wide { flex-direction: column; padding: 26px 28px 22px; width: min(720px, 100%); }
.sheet-card.small { flex-direction: column; padding: 26px 26px 20px; width: min(420px, 100%); }
.sheet-card.small h1 { font-size: 22px; margin: 0 0 8px; }
.sheet-card.small p { color: var(--muted); line-height: 1.6; margin: 0 0 18px; }
.sheet-close { position: absolute; right: 12px; top: 10px; z-index: 2; border: 0; background: rgba(3,20,44,.08); width: 36px; height: 36px; border-radius: 50%; font-size: 22px; color: var(--ink); }
.detail-img { flex: 1 1 58%; background: var(--calm); display: flex; align-items: center; justify-content: center; min-height: 360px; }
.detail-img img { max-width: 100%; max-height: 70vh; display: block; }
.detail-body { flex: 1 1 42%; padding: 30px 26px 22px; display: flex; flex-direction: column; }
.detail-body h1 { font-size: 28px; margin: 6px 0 8px; }
.detail-body p { color: var(--muted); margin: 0 0 14px; }
.detail-sizes { font-size: 14px; line-height: 1.8; color: var(--ink); background: var(--head); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.detail-sizes b { display: block; color: var(--bg); margin-bottom: 2px; }
.detail-body .nav { margin-top: auto; }
.nav button:disabled { opacity: .4; }

/* ---------- 放在客户家：放大缩小、工具、对比 ---------- */
.place-zoom { position: absolute; inset: 0; transform-origin: 0 0; }
.place-wrap .handle { transform: scale(var(--inv, 1)); }
.gate-clip { position: absolute; inset: 0; pointer-events: none; }
.compare-line {
  position: absolute; top: 0; bottom: 0; width: 0; border-left: 3px solid #fff; box-shadow: 0 0 8px rgba(0,0,0,.5);
  cursor: ew-resize; touch-action: none;
}
.compare-line span {
  position: absolute; top: 50%; left: -22px; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%;
  background: var(--gold); border: 3px solid #fff; transform: scale(var(--inv, 1));
}
.compare-line span::before { content: '‹ ›'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--bg); font-weight: 900; font-size: 16px; }
.place-wrap.comparing .handle { display: none; }
.stage-arrow {
  position: absolute; top: 50%; margin-top: -28px; width: 48px; height: 56px; border: 0; border-radius: 12px;
  background: rgba(3,20,44,.6); color: #fff; font-size: 34px; line-height: 1; backdrop-filter: blur(6px); z-index: 3;
}
.stage-arrow.left { left: 10px; }
.stage-arrow.right { right: 10px; }
.stage-tools { position: absolute; right: 12px; top: 12px; display: flex; gap: 6px; z-index: 3; }
.stage-tools button {
  border: 0; min-width: 42px; height: 40px; padding: 0 12px; border-radius: 10px; font-size: 15px; font-weight: 700;
  background: rgba(3,20,44,.65); color: #fff; backdrop-filter: blur(6px);
}
.stage-tools #compareBtn { background: var(--gold); color: var(--bg); }
.place-name {
  position: absolute; left: 12px; top: 12px; z-index: 3; color: #fff; font-weight: 700; font-size: 14px;
  background: rgba(3,20,44,.65); padding: 9px 14px; border-radius: 10px; backdrop-filter: blur(6px); max-width: 45%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.place-panel { overflow-y: auto; overflow-x: hidden; }
.place-panel > * { flex-shrink: 0; }
.design-list.door .design-item img { width: 40px; height: 46px; object-fit: contain; background: #fff; }
.place-panel h1 { font-size: 22px; margin: 0 0 12px; }
.size-row { display: flex; gap: 10px; }
.size-row label { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--muted); }
.size-row input, .size-row select {
  flex: 1 1 0; width: 100%; min-width: 0; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; font-size: 16px; background: #fff; color: var(--ink);
  -webkit-user-select: text; user-select: text;
}
.size-result { margin-top: 8px; font-size: 13px; color: var(--ink); line-height: 1.9; }
.size-result small { color: var(--muted); }
.size-result .chip { display: inline-block; background: var(--gold-soft); color: var(--gold-ink); font-weight: 700; padding: 2px 9px; border-radius: 999px; margin: 0 4px 4px 0; }
.size-result .bad { color: var(--err); font-weight: 700; }
.size-result .warn { color: var(--warn); font-size: 12px; line-height: 1.5; }
.design-list { max-height: 260px; overflow-y: auto; }
.design-item.na { opacity: .4; }
.sticky-nav { position: sticky; bottom: -26px; background: #fff; padding: 12px 0 0; margin-top: 16px; }

/* ---------- 这位客户的总结 ---------- */
.summary-head h1 { font-size: 26px; margin: 0 0 4px; }
.summary-head p { color: var(--muted); margin: 0 0 14px; }
.summary-list { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; min-height: 60px; }
.sum-item { display: flex; align-items: center; gap: 14px; background: var(--head); border-radius: 12px; padding: 8px; }
.sum-item img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; background: #fff; }
.sum-item.place img { width: 128px; }
.sum-item div { flex: 1; min-width: 0; }
.sum-item b { display: block; font-size: 16px; }
.sum-item small { color: var(--muted); font-size: 13px; }
.sum-item button { border: 0; background: #fff; width: 36px; height: 36px; border-radius: 50%; font-size: 20px; color: var(--err); }

/* iPad 竖着拿：照片在上，说明在下 */
@media (orientation: portrait) {
  .layout { flex-direction: column; }
  .stage { flex: 1 1 58%; }
  .panel { flex: 0 0 auto; max-width: none; padding: 24px 26px 22px; }
  .panel h1 { font-size: 26px; margin: 6px 0 10px; }
  .panel p { font-size: 18px; margin-bottom: 14px; }
  .media { height: 170px; margin-top: 12px; }
  .brand, .app-icon { display: none; }
  .tabs button { padding: 8px 8px; font-size: 14px; }
  .top-btn { padding: 6px 8px; font-size: 12px; }
  .place-panel { max-height: 46%; }
  .sheet-card { flex-direction: column; }
  .detail-img { min-height: 260px; }
  .spacer { min-height: 12px; }
}

/* ---------- AlutechDoor 配色 ---------- */
.door-config:empty { display: none; }
.door-config { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 10px; }
.door-config .cfg-seg { margin-bottom: 8px; }
.door-config .cfg-seg button.na { opacity: .4; text-decoration: line-through; }
.cfg-row { margin-bottom: 8px; }
.cfg-row small { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.cfg-row small b { color: var(--ink); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; background: var(--c); box-shadow: 0 0 0 1px var(--line); padding: 0; }
.sw.on { box-shadow: 0 0 0 2px var(--gold); }

/* ---------- 目录 Catalogue ---------- */
.ctl-save { margin: 4px 0 8px; padding: 12px 18px; border-radius: 12px; font-weight: 700; }
.ctl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; grid-auto-rows: max-content; }
.ctl-card { display: flex; flex-direction: column; gap: 6px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.ctl-cover { display: block; width: 100%; border-radius: 8px; overflow: hidden; background: var(--calm); max-height: 230px; }
.ctl-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.ctl-card b { font-size: 13px; line-height: 1.3; color: var(--ink); }
.ctl-card small { font-size: 12px; color: var(--muted); }
.ctl-viewer { position: fixed; inset: 0; z-index: 60; background: #0b0f17; display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: opacity .2s; }
.ctl-viewer.on { opacity: 1; pointer-events: auto; }
.ctl-bar { flex: none; display: flex; align-items: center; gap: 12px; color: #fff; background: var(--bg); padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
body.standalone .ctl-bar { padding-top: 56px; }
.ctl-bar b { flex: 1; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctl-bar span { color: var(--gold); font-weight: 700; font-size: 14px; }
.ctl-close { border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 26px; width: 40px; height: 40px; border-radius: 10px; line-height: 1; }
.ctl-pages { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 12px 0 40px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ctl-page { width: min(100%, 900px); background: #1b2230; flex: none; }
.ctl-page img { width: 100%; height: 100%; display: block; }

/* ---------- 放在客户家：调门 / 调照片 ---------- */
.stage-tools { align-items: center; }
.mode-seg { display: flex; background: rgba(3,20,44,.65); border-radius: 10px; padding: 3px; gap: 2px; backdrop-filter: blur(6px); }
.stage-tools .mode-seg button { background: transparent; height: 34px; border-radius: 8px; color: rgba(255,255,255,.75); }
.stage-tools .mode-seg button.on { background: #fff; color: var(--bg); }
.place-name { max-width: calc(100% - 330px); }
.adj-bar {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 3;
  display: flex; align-items: center; gap: 8px; max-width: calc(100% - 20px); overflow-x: auto;
  background: rgba(3,20,44,.75); padding: 6px; border-radius: 14px; backdrop-filter: blur(6px);
}
.adj-bar.hidden { display: none; }
.adj-group { display: flex; align-items: center; gap: 4px; background: rgba(255,255,255,.08); border-radius: 10px; padding: 0 0 0 10px; }
.adj-group span { color: rgba(255,255,255,.8); font-size: 13px; font-weight: 700; white-space: nowrap; margin-right: 2px; }
.adj-bar button {
  border: 0; min-width: 44px; height: 42px; border-radius: 10px; font-size: 22px; font-weight: 700; line-height: 1;
  background: rgba(255,255,255,.14); color: #fff; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.adj-bar button:active { background: var(--gold); color: var(--bg); }
.adj-bar .adj-text { font-size: 14px; padding: 0 14px; white-space: nowrap; }
.place-tip { bottom: 72px; }
.place-wrap.photo-mode .handle { display: none; }
/* 调整按钮紧凑一点（iPad 直拿也放得下） */
.adj-bar { gap: 6px; padding: 5px; scrollbar-width: none; }
.adj-bar::-webkit-scrollbar { display: none; }
.adj-bar button { min-width: 38px; height: 38px; font-size: 20px; }
.adj-group { padding-left: 8px; }
.adj-bar .adj-text { padding: 0 10px; font-size: 13px; }
.place-tip { bottom: 64px; font-size: 13px; padding: 7px 14px; }

/* ---------- 反馈箱 ---------- */
.fb-btn svg { display: block; }
.fb-card { max-height: calc(100% - 20px); overflow-y: auto; gap: 0; }
.fb-tabs { margin-bottom: 14px; }
.fb-card h1 { font-size: 22px; margin: 0 0 6px; }
.fb-sub { color: var(--muted); margin: 0 0 14px; line-height: 1.5; font-size: 14px; }
.fb-types { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.fb-types button, .fb-filter button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--ink); }
.fb-types button.on, .fb-filter button.on { background: var(--bg); color: #fff; border-color: var(--bg); box-shadow: inset 0 -2px 0 var(--gold); }
#fbText { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 12px; padding: 12px; font: inherit; font-size: 16px; resize: vertical; min-height: 110px; }
.fb-row { display: flex; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
#fbName { flex: 1 1 200px; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; font-size: 16px; }
.fb-photo { border: 1px dashed var(--gold); border-radius: 12px; padding: 11px 14px; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; }
.fb-preview { max-height: 140px; max-width: 100%; border-radius: 10px; margin-bottom: 8px; align-self: flex-start; }
.fb-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.fb-filter b { color: var(--gold); margin-left: 4px; }
.fb-list { display: flex; flex-direction: column; gap: 12px; }
.fb-empty { color: var(--muted); }
.fb-item { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff; }
.fb-item.st-new { border-left: 4px solid var(--gold); }
.fb-item.st-done { opacity: .6; }
.fb-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fb-head small { color: var(--muted); font-size: 12px; }
.fb-when { margin-left: auto; color: var(--muted); font-size: 12px; }
.fb-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.fb-tags span { font-size: 12px; background: var(--calm); border-radius: 6px; padding: 3px 8px; color: var(--muted); }
.fb-tags .fb-type { background: var(--bg); color: #fff; }
.fb-item p { margin: 6px 0; line-height: 1.55; font-size: 15px; }
.fb-shot { max-height: 160px; max-width: 100%; border-radius: 8px; cursor: zoom-in; }
.fb-status { display: flex; gap: 6px; margin-top: 8px; }
.fb-status button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 600; }
.fb-status button.on { background: var(--gold); border-color: var(--gold); color: var(--bg); }

[hidden] { display: none !important; }

/* =========================================================
   手机版（宽度 640px 以下）：分页放到最下面，顶栏只留按钮
   ========================================================= */
@media (max-width: 640px) {
  .topbar { gap: 6px; padding-left: 12px; padding-right: 10px; }
  .app-icon, .brand { display: block !important; }
  .app-icon { width: 30px; height: 30px; border-radius: 8px; }
  .brand { font-size: 16px; }
  .brand span { display: none; }
  .model { display: none; }
  .topbar .top-btn { padding: 6px 8px; font-size: 12px; gap: 4px; }
  .fb-btn { margin-left: auto; }
  #fbLabel, #summaryLabel { display: none; }
  .lang button { padding: 4px 8px; font-size: 12px; }

  /* 5 个分页：固定在最下面 */
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0;
    background: var(--bg); border-top: 1px solid rgba(200,173,118,.35);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); gap: 0; justify-content: space-around;
  }
  .tabs button { flex: 1 1 0; padding: 8px 2px; font-size: 12px; border-radius: 8px; text-align: center; }
  body { padding-bottom: calc(54px + env(safe-area-inset-bottom)); }

  /* 页面 */
  .hero { padding: 24px 18px !important; }
  .hero h1 { font-size: 28px !important; }
  .stats { gap: 14px 18px !important; }
  .stat b { font-size: 26px !important; }
  .layout { flex-direction: column; }
  .stage { flex: 1 1 52%; min-height: 0; }
  .panel { padding: 16px 16px 14px !important; max-width: none; }
  .panel h1 { font-size: 21px; }
  .place-panel { max-height: 48%; }
  .place-name { display: none; }
  .stage-tools { right: 8px; top: 8px; }
  .stage-tools button { height: 34px; min-width: 34px; padding: 0 9px; font-size: 13px; }
  .stage-arrow { width: 38px; height: 46px; font-size: 26px; margin-top: -23px; }
  .adj-bar { bottom: 8px; gap: 4px; padding: 4px; }
  .adj-bar button { min-width: 34px; height: 34px; font-size: 18px; }
  .adj-group { padding-left: 6px; }
  .adj-group span { font-size: 11px; }
  .place-tip { display: none; }
  .photo-btns .big-btn { padding: 12px; font-size: 15px; }

  /* 弹出卡片：几乎全屏 */
  .sheet { padding: 10px; align-items: flex-end; }
  .sheet-card, .sheet-card.wide { width: 100%; max-height: calc(100% - 10px); border-radius: 18px; }
  .sheet-card { flex-direction: column; overflow-y: auto; }
  .sheet-card.wide { padding: 20px 16px 16px; }
  .detail-img { min-height: 220px; }
  .fb-types button { padding: 7px 10px; font-size: 13px; }

  /* 产品资料：左边的小目录改成上面横着滑 */
  .products-view { flex-direction: column !important; }
  .sub-nav { flex-direction: row !important; overflow-x: auto; width: auto !important; max-width: none !important; padding: 8px 10px !important; gap: 6px; flex: none !important; border-right: 0 !important; }
  .sub-nav button { white-space: nowrap; flex: none; }
  .products-body { padding: 16px !important; }
  .ctl-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (max-width: 640px) {
  .cat-bar { padding: 10px 12px 4px; gap: 8px; }
  .cat-bar .search { min-width: 0; flex: 1 1 100%; max-width: none; height: 38px; }
  .cat-count { display: none; }
  .chips-row { padding: 4px 12px; }
  .chips-row button { padding: 6px 11px; font-size: 13px; }
  .cat-grid { padding: 10px 12px 30px; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-card b { font-size: 13px; }
  .section-head small, .featured-head small { display: none; }
}

.chips-row, .sub-nav, .adj-bar { scrollbar-width: none; }
.chips-row::-webkit-scrollbar, .sub-nav::-webkit-scrollbar { display: none; }

@media (max-width: 640px) { #placeView .stage { flex: 1 1 58%; } #placeView .place-panel { max-height: 42%; flex: 0 1 42%; } }

/* ---------- 搜系列：每个型号能不能做 ---------- */
.series-sum { grid-column: 1 / -1; background: var(--bg); color: #fff; border-radius: 14px; padding: 12px 16px; border-left: 4px solid var(--gold); }
.ss-head { margin-bottom: 8px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ss-head b { color: var(--gold); font-size: 17px; }
.ss-head small { color: rgba(255,255,255,.75); font-size: 12px; }
.ss-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.ss-tag { font-size: 13px; font-weight: 800; padding: 6px 10px; border-radius: 8px; }
.ss-tag.ok { background: var(--ok-bg); color: var(--ok); }
.ss-tag.no { background: var(--err-bg); color: var(--err); }
.ss-chip { border: 1px solid rgba(255,255,255,.4); background: transparent; color: #fff; border-radius: 8px; padding: 5px 10px; font-size: 13px; }

/* ---------- 圈出 Library 照片里的大门 ---------- */
.crop-mode { position: absolute; inset: 0; z-index: 8; background: rgba(3,20,44,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 10px 60px; }
.crop-wrap { position: relative; touch-action: none; }
.crop-wrap img { width: 100%; height: 100%; display: block; pointer-events: none; }
.crop-poly { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.crop-poly polygon { fill: rgba(200,173,118,.18); stroke: var(--gold); stroke-width: .5; vector-effect: non-scaling-stroke; }
.crop-wrap .handle { transform: none; }
.crop-bar { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 8px; }
.crop-bar span { flex: 1; color: #fff; font-size: 13px; line-height: 1.35; }
.crop-bar button { border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 700; font-size: 14px; }
.crop-bar .ghost { background: rgba(255,255,255,.15); color: #fff; }
.crop-bar .primary { background: var(--gold); color: var(--bg); }
.sw.orig { background: repeating-linear-gradient(45deg, #fff 0 4px, var(--line-2) 4px 8px); }
.door-config .recrop { align-self: flex-start; border: 1px dashed var(--gold); background: #fff; border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 13px; margin-bottom: 8px; color: var(--ink); }
.door-config .note { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 2px 0 0; }

/* 圈大门：上面的说明 */
.crop-mode { justify-content: flex-start; padding-top: 12px; gap: 10px; }
.crop-head { width: 100%; max-width: 900px; background: var(--gold); color: var(--bg); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 3px; }
.crop-head b { font-size: 17px; }
.crop-head span { font-size: 13px; line-height: 1.45; }
.crop-bar span { color: var(--gold); font-weight: 700; }

/* 放在客户家：型号 / 系列筛选 */
.place-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 8px; flex: none; }
.place-chips::-webkit-scrollbar { display: none; }
.place-chips button { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 6px 11px; font-size: 13px; font-weight: 600; white-space: nowrap; flex: none; }
.place-chips button.on { background: var(--bg); color: #fff; border-color: var(--bg); box-shadow: inset 0 -2px 0 var(--gold); }

/* 背景存图进度 */
.offline-pill { position: fixed; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 35; background: rgba(3,20,44,.9); color: #fff; border: 1px solid var(--gold); border-radius: 999px; padding: 7px 14px; font-size: 12px; font-weight: 700; pointer-events: none; }
@media (max-width: 640px) { .offline-pill { bottom: calc(64px + env(safe-area-inset-bottom)); } }

/* 版本号、有新版提示 */
.app-ver { text-align: center; color: var(--muted); font-size: 12px; padding: 18px 0 28px; }
.update-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 80; border: 0; background: var(--gold); color: var(--bg); font-weight: 800; font-size: 15px; padding: 12px 22px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
@media (max-width: 640px) { .update-bar { bottom: calc(70px + env(safe-area-inset-bottom)); } }

/* 还有新图片没存：首页上面的提醒 */
.offline-remind { display: block; width: calc(100% - 32px); margin: 12px 16px 0; border: 1px dashed var(--gold); background: var(--warn-bg); color: var(--ink); border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 700; text-align: left; }

@media (display-mode: standalone) { .toast { top: 124px; } }
/* 弹出视窗四边都留白（CLAUDE.md），手机也居中，不贴底 */
@media (max-width: 640px) { .sheet { align-items: center; padding: 16px; } .sheet-card, .sheet-card.wide { max-height: calc(100% - 32px); border-radius: 16px; } .toast { right: 12px; top: calc(60px + env(safe-area-inset-top)); } }

/* ===== 登录页（login.html） ===== */
.login-page { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(135deg, var(--bg) 0%, var(--navy-3) 100%); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif; }
.login-card { width: min(400px, 100%); background: #fff; border-radius: 20px; padding: 28px 26px 22px; display: flex; flex-direction: column; gap: 12px; border-bottom: 4px solid var(--gold); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.login-logo { width: 64px; height: 64px; border-radius: 14px; align-self: center; }
.login-card h1 { margin: 0; text-align: center; font-size: 24px; color: var(--ink); }
.login-sub { margin: -6px 0 6px; text-align: center; color: var(--muted); font-size: 14px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink); }
.login-card input { border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 17px; font-weight: 400; }
.login-card input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.login-msg { margin: 0; background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.5; }
.login-btn { margin-top: 4px; border: 0; border-radius: 12px; padding: 14px; font-size: 17px; font-weight: 800; background: var(--bg); color: #fff; box-shadow: inset 0 -3px 0 var(--gold); }
.login-btn:disabled { opacity: .6; }
.login-note { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: center; }

/* ===== 帐号管理（管理员，在反馈视窗的「帐号」分页） ===== */
.ad-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ad-head input[type=search] { flex: 1 1 180px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 15px; }
.ad-btn { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 700; color: var(--ink); }
.ad-btn.primary { background: var(--bg); color: #fff; border-color: var(--bg); box-shadow: inset 0 -2px 0 var(--gold); }
.ad-btn.danger { color: var(--err); border-color: var(--err-bg); }
.ad-form { border: 1px solid var(--gold); background: var(--gold-soft); border-radius: 14px; padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.ad-form input { border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 15px; min-width: 0; }
.ad-form label.ad-check { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.ad-form .ad-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
.ad-list { display: flex; flex-direction: column; gap: 10px; }
.ad-user { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; background: #fff; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ad-user.off { opacity: .55; }
.ad-user .ad-who { flex: 1 1 200px; }
.ad-user .ad-who b { font-size: 15px; }
.ad-user .ad-who small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.ad-tag { font-size: 11px; font-weight: 800; background: var(--gold); color: var(--bg); border-radius: 6px; padding: 2px 6px; margin-left: 6px; }
.ad-tag.off { background: var(--calm); color: var(--muted); }
.ad-setting { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.ad-setting input { width: 90px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; font-size: 15px; }
@media (max-width: 560px) { .ad-form { grid-template-columns: 1fr; } }

/* 确认框要在别的视窗上面（例：在「帐号」分页按停用） */
#askSheet { z-index: 70; }

/* ===== 「设定」分页（admin-settings.js） ===== */
.st-group { font-size: 13px; letter-spacing: 1px; color: var(--muted); margin: 16px 0 8px; text-transform: uppercase; }
.st-item { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 10px 14px; margin-bottom: 8px; }
.st-item.open { border-color: var(--gold); background: var(--head); }
.st-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-what { flex: 1 1 260px; }
.st-what b { font-size: 15px; }
.st-what small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.5; }
.st-now { color: var(--ink-2); font-size: 13px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-edit { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.st-input { width: 100%; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 16px; background: #fff; }
.st-input:focus, .st-row input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.st-num { width: 120px; }
.st-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.st-row input { border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; font-size: 15px; min-width: 0; flex: 1 1 90px; background: #fff; }
.st-row input[type=checkbox] { flex: none; width: 20px; height: 20px; }
.st-order .st-row label { flex: 1; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.st-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.st-log { display: flex; flex-direction: column; gap: 6px; }
.st-logrow { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; border-bottom: 1px solid var(--line); padding: 8px 0; font-size: 14px; }
.st-logrow small { flex-basis: 100%; color: var(--muted); font-size: 12.5px; }
.st-logrow .ad-btn { margin-left: auto; }
.st-when { color: var(--muted); font-size: 12.5px; }

/* 改密码视窗 */
#pwForm { gap: 10px; }
#pwForm p { margin: 0 0 4px; }

/* 详情：这款的全部照片（小图一排） */
.detail-img { position: relative; flex-direction: column; }
.detail-thumbs { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 6px; padding: 8px; overflow-x: auto; background: linear-gradient(transparent, rgba(3,20,44,.55)); }
.detail-thumbs button { flex: none; width: 64px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--calm); }
.detail-thumbs button.on { border-color: var(--gold); }
.detail-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-thumbs small { align-self: center; color: #fff; font-size: 12px; white-space: nowrap; }

/* 确认框的内容可以有换行（例：反馈处理好的通知） */
#askBody { white-space: pre-line; }

/* 品牌数字：手机上也一行放完（数字窄一点） */
.st-stats .st-row { flex-wrap: nowrap; }
.st-stats .st-row input { flex: 1 1 0; }
.st-stats .st-row input[data-f=n] { flex: 0.7 1 0; }
.st-stats .st-row .ad-btn { flex: none; padding: 8px 10px; }
