/* ===== CSS Variables ===== */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-hover: #eef2f7;
  --bg-active: #e0f2fe;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --text-active: #008a00;
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --accent: #008a00;
  --accent-dark: #006b00;
  --accent-light: #e6f4e6;
  --accent-gradient: linear-gradient(135deg, #16a34a, #008a00);
  --danger: #dc2626;
  --success: #16a34a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --header-h: 60px;
  --sidebar-w: 320px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 全局触摸 / 滚动体验优化（移动端顺滑、去除点击高亮） */
* { -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { overscroll-behavior-y: none; }
.content, .sidebar-tree, .table-scroll, .mobile-list, .category-overview, .guide-index {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #0f172a;
  --bg-hover: #334155;
  --bg-active: #0c4a6e;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-active: #22c55e;
  --border-color: #1e293b;
  --border-hover: #334155;
  --accent: #22c55e;
  --accent-dark: #16a34a;
  --accent-light: #0c4a2e;
  --accent-gradient: linear-gradient(135deg, #22c55e, #16a34a);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
}

/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; position: relative; z-index: 1; }

/* ===== Product detail mode (product.html) ===== */
body.product-mode .sidebar { display: none; }
body.product-mode .sidebar-backdrop { display: none !important; }
body.product-mode .breadcrumb { display: none; }
body.product-mode .pdf-canvas-wrapper { padding-top: 16px; }

.product-header {
  flex-shrink: 0;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.product-header .ph-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.product-header .ph-back:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.product-header .ph-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent-gradient); color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,138,0,0.22);
}
.product-header .ph-text { min-width: 0; }
.product-header .ph-name {
  font-size: 16px; font-weight: 700; color: var(--text-primary);
  line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.product-header .ph-sub { font-size: 12px; color: var(--text-secondary); }
.product-header .ph-codes { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 50%; }
.product-header .ph-3d {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 10px; padding: 7px 14px;
  border: 1px solid rgba(99,102,241,.4); border-radius: var(--radius);
  background: rgba(99,102,241,.1); color: #6366f1;
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: var(--transition);
}
.product-header .ph-3d:hover { background: rgba(99,102,241,.2); border-color: #6366f1; }
.product-header .ph-3d svg { flex: none; }
.product-header .ph-code {
  font-size: 11px; font-family: "SF Mono","Fira Code",Consolas,monospace;
  background: var(--bg-secondary); border: 1px solid var(--border-color);
  color: var(--text-secondary); padding: 3px 8px; border-radius: 6px; font-weight: 600;
}
@media (max-width: 768px) {
  .product-header { padding: 10px 12px; gap: 10px; flex-wrap: wrap; }
  .product-header .ph-codes { max-width: 100%; margin-left: 0; width: 100%; justify-content: flex-start; }
  .product-header .ph-name { font-size: 14px; }
}

/* ===== Header ===== */
.header {
  height: var(--header-h);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  flex-shrink: 0;
  z-index: 100;
  position: relative;
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0.6;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  letter-spacing: -0.3px;
}

.header-logo .dual-logos {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  height: 46px;
  padding: 0 10px;
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(248,250,252,0.95));
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.10);
}

[data-theme="dark"] .header-logo .dual-logos {
  background: linear-gradient(135deg, rgba(30,41,59,0.95), rgba(15,23,42,0.95));
}

.header-logo .dual-logos .logo-shikai,
.header-logo .dual-logos .logo-hf {
  height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
}

.header-logo .dual-logos .logo-shikai {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
}

.header-logo .dual-logos-divider {
  width: 1px;
  height: 26px;
  background: var(--border-hover);
  display: inline-block;
  flex-shrink: 0;
}

.header-title-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.header-product-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.header-company-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0;
  line-height: 1.2;
}

.header-logo .version {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.header-logo .partner-tag {
  font-size: 10px;
  font-weight: 600;
  color: #c2410c;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1px solid #fdba74;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

[data-theme="dark"] .header-logo .partner-tag {
  color: #fdba74;
  background: linear-gradient(135deg, #431407, #7c2d12);
  border-color: #9a3412;
}

/* ===== Search ===== */
.search-box {
  flex: 1 1 360px;
  max-width: 760px;
  min-width: 200px;
  position: relative;
}

.search-box input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 44px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 16px;
  outline: none;
  transition: var(--transition);
  box-sizing: border-box;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
  background: var(--bg-primary);
}

.search-box input::placeholder { color: var(--text-tertiary); }

.search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  pointer-events: none;
  transition: var(--transition);
}

.search-box input:focus ~ .search-icon { color: var(--accent); }

.search-results-count {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  pointer-events: none;
  background: var(--bg-primary);
  padding: 2px 6px;
  border-radius: 4px;
}

.header-info {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.header-info a { color: var(--accent); text-decoration: none; font-weight: 500; }
.header-info a:hover { text-decoration: underline; }
.header-info .divider { color: var(--border-hover); }

/* ===== Brand switch (海德福斯 / 力士乐) ===== */
.brand-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
/* 十开科技（授权经销）logo：原图 680×237，必须限高，否则撑爆 header */
.header-logo .logo-shikai {
  height: 28px;
  width: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.header-logo .brand-logos-divider {
  width: 1px;
  height: 24px;
  background: var(--border-hover);
  display: inline-block;
  flex-shrink: 0;
}
.brand-switch {
  display: inline-flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}
.brand-switch-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  font-family: inherit;
}
.brand-switch-btn:hover { color: var(--text-primary); }
.brand-switch-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
[data-theme="dark"] .brand-switch-btn.active { color: #fff; }

.theme-toggle {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.theme-toggle .ic-sun,
.theme-toggle .ic-moon { position: absolute; width: 18px; height: 18px; transition: opacity .2s, transform .2s; }
.theme-toggle .ic-moon { opacity: 0; transform: rotate(-40deg) scale(.6); }
[data-theme="light"] .theme-toggle .ic-moon { opacity: 0; transform: rotate(-40deg) scale(.6); }
[data-theme="light"] .theme-toggle .ic-sun  { opacity: 1; transform: none; }
[data-theme="dark"]  .theme-toggle .ic-sun  { opacity: 0; transform: rotate(40deg) scale(.6); }
[data-theme="dark"]  .theme-toggle .ic-moon { opacity: 1; transform: none; }

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* ===== Main Layout ===== */
.main { display: flex; flex: 1; overflow: hidden; }

/* ===== Sidebar ===== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-primary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-header .badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: none;
  letter-spacing: 0;
}

.sidebar-tree {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}

/* ===== Sidebar Footer (Company Card) ===== */
.sidebar-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border-color);
  padding: 14px 16px;
  background: var(--bg-secondary);
}

.sidebar-footer .company-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-footer .company-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-footer .company-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
  overflow: hidden;
  padding: 2px;
}

.sidebar-footer .company-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.sidebar-footer .company-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.sidebar-footer .company-name-en {
  font-size: 10px;
  color: var(--text-tertiary);
  font-weight: 400;
  line-height: 1.3;
}

.sidebar-footer .company-info-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.sidebar-footer .company-info-list .info-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.sidebar-footer .company-info-list .info-row svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--text-tertiary);
}

.sidebar-footer .company-info-list a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.sidebar-footer .company-info-list a:hover { text-decoration: underline; }

.sidebar-footer .company-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 8px;
  border-radius: 6px;
  align-self: flex-start;
  margin-top: 2px;
}

.sidebar-footer .company-qr {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding: 8px 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}
.sidebar-footer .company-qr img {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  flex-shrink: 0;
}
.sidebar-footer .company-qr span {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===== Tree Nodes ===== */
.tree-cat { margin-bottom: 2px; }

.tree-cat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  transition: background var(--transition);
  user-select: none;
  border-radius: 0;
  position: relative;
}

.tree-cat-header:hover { background: var(--bg-hover); }

.tree-cat-header .chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform var(--transition);
  color: var(--text-tertiary);
}

.tree-cat-header.expanded .chevron { transform: rotate(90deg); }

.tree-cat-header .cat-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent);
}

.tree-cat-header .cat-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 6px;
  border-radius: 4px;
  min-width: 22px;
  text-align: center;
}

.tree-cat-header .cat-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
  background: var(--bg-secondary);
  padding: 2px 7px;
  border-radius: 10px;
}

.tree-subcats { display: none; }
.tree-subcats.visible { display: block; }

.tree-subcat-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px 7px 44px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  transition: background var(--transition);
  user-select: none;
  position: relative;
}

.tree-subcat-header::before {
  content: '';
  position: absolute;
  left: 26px;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: var(--border-color);
}

.tree-subcat-header:hover { background: var(--bg-hover); }

.tree-subcat-header .chevron {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform var(--transition);
  color: var(--text-tertiary);
}

.tree-subcat-header.expanded .chevron { transform: rotate(90deg); }

.tree-subcat-header .subcat-models {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-left: 4px;
  font-weight: 400;
}

.tree-subcat-header .subcat-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.tree-subcat-header.active {
  background: var(--bg-active);
  color: var(--text-active);
  font-weight: 600;
}

.tree-subcat-header.active::before { background: var(--accent); width: 2.5px; }

.tree-files { display: none; }
.tree-files.visible { display: block; }

.tree-file {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 16px 5px 62px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
  user-select: none;
  position: relative;
}

.tree-file::before {
  content: '';
  position: absolute;
  left: 44px;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: var(--border-color);
}

.tree-file:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.tree-file.active {
  background: var(--bg-active);
  color: var(--text-active);
  font-weight: 600;
}

.tree-file.active::before { background: var(--accent); width: 2.5px; }

.tree-file .file-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--text-tertiary);
}

.tree-file.active .file-icon { color: var(--accent); }

/* ===== Content Area ===== */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
  position: relative;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 10px 20px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--accent); text-decoration: none; cursor: pointer; font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .separator { color: var(--text-tertiary); font-size: 11px; }
.breadcrumb .current { color: var(--text-primary); font-weight: 600; }
.breadcrumb .breadcrumb-back {
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  transition: color var(--transition);
}
.breadcrumb .breadcrumb-back:hover { color: var(--accent); text-decoration: none; }

/* ===== PDF Viewer ===== */
.viewer-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.viewer-toolbar {
  padding: 8px 20px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.viewer-toolbar button {
  height: 32px;
  min-width: 32px;
  padding: 0 10px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: var(--transition);
}

.viewer-toolbar button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.viewer-toolbar button:disabled { opacity: 0.35; cursor: not-allowed; }

.viewer-toolbar .page-info {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 4px;
  white-space: nowrap;
  font-weight: 500;
}

.viewer-toolbar input[type="number"] {
  width: 48px;
  height: 32px;
  text-align: center;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  outline: none;
  transition: var(--transition);
}

.viewer-toolbar input[type="number"]:focus { border-color: var(--accent); }

.viewer-toolbar .zoom-info {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 48px;
  text-align: center;
  font-weight: 500;
}

.viewer-toolbar .spacer { flex: 1; }

.viewer-toolbar .filename {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
}

.viewer-toolbar .download-btn { text-decoration: none; }

.viewer-toolbar .toolbar-divider {
  width: 1px;
  height: 22px;
  background: var(--border-color);
  margin: 0 4px;
}

.pdf-canvas-wrapper {
  flex: 1;
  overflow: auto;
  display: flex;
  justify-content: center;
  padding: 24px;
  background: var(--bg-tertiary);
}

#pdf-canvas-wrapper {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px;
  background: var(--bg-secondary);
}

#pdf-canvas {
  box-shadow: var(--shadow-lg);
  background: white;
  border-radius: 2px;
  max-width: 100%;
}

.pdf-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

/* ===== Empty State (Welcome Dashboard) ===== */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-tertiary);
  padding: 40px;
  text-align: center;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

[data-theme="dark"] .empty-state {
  background: rgba(15, 23, 42, 0.55);
}

.empty-state .welcome-icon {
  width: 80px;
  height: 80px;
  background: var(--accent-gradient);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 32px rgba(2, 132, 199, 0.25);
  margin-bottom: 8px;
}

.empty-state .welcome-icon svg { width: 40px; height: 40px; }

.empty-state h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.empty-state .subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.7;
}

.empty-state .stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
  max-width: 640px;
  width: 100%;
}

.empty-state .stat-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

.empty-state .stat-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.empty-state .stat-card .stat-icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 10px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.empty-state .stat-card .stat-icon svg { width: 20px; height: 20px; }

.empty-state .stat-card .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.empty-state .stat-card .stat-label {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 6px;
  font-weight: 500;
}

/* ===== Company Brand (Welcome Dashboard) ===== */
.company-brand {
  margin-top: 32px;
  padding: 24px 32px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 760px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow-sm);
}

.company-brand .brand-logos {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.company-brand .brand-logos .logo-box {
  background: #ffffff;
  border-radius: 10px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.18);
  overflow: hidden;
}

.company-brand .brand-logos .logo-box-hf {
  width: 100px;
  height: 32px;
}

.company-brand .brand-logos .logo-box-sk {
  width: 140px;
  height: 36px;
  padding: 4px 6px;
}

.company-brand .brand-logos .logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.company-brand .brand-logos .logo-divider {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 0 4px;
}

.company-brand .brand-info {
  flex: 1;
  text-align: left;
  min-width: 0;
}

.company-brand .brand-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 6px 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.company-brand .brand-qr:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.18);
  border-color: var(--accent);
}

.company-brand .brand-qr img {
  width: 72px;
  height: 72px;
  display: block;
  border-radius: 4px;
}

.company-brand .brand-qr .qr-caption {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.company-brand .brand-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.company-brand .brand-tagline {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.company-brand .brand-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  color: var(--text-tertiary);
}

.company-brand .brand-contact .contact-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.company-brand .brand-contact .contact-item svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.company-brand .brand-contact a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.company-brand .brand-contact a:hover { text-decoration: underline; }

/* ===== Loading ===== */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 50;
  backdrop-filter: blur(4px);
}

[data-theme="dark"] .loading-overlay { background: rgba(15,23,42,0.85); }

.loading-overlay .spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay .loading-text {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===== File List Panel ===== */
.file-list-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 220px;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  display: none;
  flex-direction: column;
  z-index: 10;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
}

.file-list-panel.visible { display: flex; }

.file-list-header {
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  background: var(--bg-secondary);
}

.file-list-header:hover { background: var(--bg-hover); }

.file-list-header .toggle-icon {
  display: flex;
  align-items: center;
  color: var(--text-tertiary);
}

.file-list-items {
  overflow-y: auto;
  padding: 6px 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2px;
  padding: 6px 12px;
}

.file-list-item {
  padding: 7px 12px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.file-list-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.file-list-item.active {
  background: var(--bg-active);
  color: var(--text-active);
  font-weight: 600;
}

.file-list-item .file-icon { width: 14px; height: 14px; flex-shrink: 0; }

/* ===== Mobile ===== */
.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.mobile-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* Safe area insets for notch / punch-hole phones */
.header {
  padding-top: env(safe-area-inset-top);
  height: calc(var(--header-h) + env(safe-area-inset-top));
}

.viewer-toolbar {
  padding-bottom: env(safe-area-inset-bottom);
}

/* ===== Mobile Responsive (≤768px) ===== */
@media (max-width: 768px) {
  :root {
    --header-h: 52px;
    --sidebar-w: 100%;
  }

  .mobile-toggle { display: flex; }
  .header-info { display: none; }
  .header-logo .logo-shikai { height: 22px; }
  .header-logo .brand-logos-divider { height: 18px; }
  .header-product-name { font-size: 12px; }
  .header-company-name { display: none; }
  .partner-tag { display: none; }
  .header-logo .version { font-size: 9px; padding: 2px 5px; }

  .header {
    padding: 6px 8px;
    gap: 6px;
    flex-wrap: wrap;
    height: auto;
  }

  .brand-logo-img { height: 30px; }
  .brand-switch { order: 3; }
  .brand-switch-btn { padding: 5px 10px; font-size: 12px; }
  .search-box {
    order: 10;
    flex-basis: 100%;
    max-width: 100%;
    margin-top: 2px;
  }

  .search-box {
    max-width: none;
  }

  .search-box input {
    height: 44px;
    font-size: 15px;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
  }

  .company-brand {
    flex-direction: column;
    text-align: center;
    gap: 14px;
    padding: 18px;
  }
  .company-brand .brand-info { text-align: center; }
  .company-brand .brand-contact { justify-content: center; }

  .sidebar {
    position: fixed;
    left: 0;
    top: calc(var(--header-h) + env(safe-area-inset-top));
    bottom: 0;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform var(--transition);
    box-shadow: var(--shadow-lg);
    width: 85%;
    max-width: 320px;
  }

  .sidebar.open { transform: translateX(0); }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    top: calc(var(--header-h) + env(safe-area-inset-top));
    background: rgba(0,0,0,0.4);
    z-index: 150;
    backdrop-filter: blur(2px);
  }

  .sidebar-backdrop.visible { display: block; }

  /* Toolbar: horizontal scroll on mobile */
  .viewer-toolbar {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 6px 8px;
    gap: 6px;
    flex-wrap: nowrap;
  }

  .viewer-toolbar button {
    height: 36px;
    min-width: 36px;
    flex-shrink: 0;
  }

  .viewer-toolbar input[type="number"] {
    height: 36px;
    width: 44px;
    flex-shrink: 0;
  }

  .viewer-toolbar .filename {
    max-width: 100px;
    flex-shrink: 0;
  }

  .viewer-toolbar .toolbar-divider {
    flex-shrink: 0;
  }

  .empty-state .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 18px;
  }

  .empty-state .stat-card {
    padding: 14px 10px;
  }

  .empty-state .stat-card .stat-value {
    font-size: 20px;
  }

  .empty-state .stat-card .stat-label {
    font-size: 10px;
  }

  .empty-state h3 {
    font-size: 18px;
  }

  .empty-state .subtitle {
    font-size: 12px;
  }

  .empty-state {
    padding: 20px 16px;
  }

  .company-brand {
    flex-direction: column;
    text-align: center;
    padding: 16px;
    gap: 12px;
  }
  .company-brand .brand-logos { justify-content: center; }
  .company-brand .brand-info { text-align: center; }
  .company-brand .brand-contact { justify-content: center; }
  .company-brand .brand-logos .logo-box-sk { width: 110px; }
  .company-brand .brand-logos .logo-box-hf { width: 80px; }
  .company-brand .brand-qr img { width: 64px; height: 64px; }

  .file-list-items { grid-template-columns: 1fr; }

  .pdf-canvas-wrapper {
    padding: 8px;
  }

  .breadcrumb {
    padding: 8px 12px;
    font-size: 11px;
  }

  /* Larger touch targets for tree items */
  .tree-cat-header {
    padding: 12px 16px;
    font-size: 14px;
  }

  .tree-subcat-header {
    padding: 10px 16px 10px 44px;
    font-size: 13px;
  }

  .tree-file {
    padding: 9px 16px 9px 62px;
    font-size: 13px;
  }

  .tree-cat-header .chevron,
  .tree-subcat-header .chevron {
    width: 16px;
    height: 16px;
  }

  .tree-cat-header .cat-icon {
    width: 20px;
    height: 20px;
  }

  .tree-file .file-icon {
    width: 16px;
    height: 16px;
  }

  .file-list-item {
    padding: 10px 12px;
    font-size: 13px;
  }

  .sidebar-footer {
    padding: 12px;
  }

  .sidebar-footer .company-logo {
    width: 36px;
    height: 36px;
  }

  /* 移动端：加大触控目标 ≥44px */
  .viewer-toolbar button { height: 44px; min-width: 44px; }
  .viewer-toolbar input[type="number"] { height: 44px; width: 48px; }
  .ph-back, .brand-switch button, .theme-toggle,
  .mobile-toggle, .nav-btn, .pg-btn {
    min-height: 44px; min-width: 44px;
  }
  .search-box input { height: 44px; font-size: 15px; }
  .params-search input { height: 44px; font-size: 15px; }
  .gi-item, .file-list-item { padding: 12px 14px; }
  .sr-item { padding: 12px 14px; }

  /* PDF 预览：移动端最大化显示区域 */
  .pdf-canvas-wrapper, #pdf-canvas-wrapper {
    padding: 2px;
  }
  .pdf-iframe {
    min-height: 75vh;
  }
}

/* ===== Very small screens (≤480px) ===== */
@media (max-width: 480px) {
  .header-logo .logo-shikai { height: 20px; }
  .header-logo .brand-logos-divider { height: 16px; }
  .header-product-name { font-size: 11px; }
  .header-logo .version { display: none; }

  .empty-state .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .empty-state .stat-card {
    padding: 10px 8px;
  }

  .empty-state .stat-card .stat-icon {
    width: 28px;
    height: 28px;
  }

  .empty-state .stat-card .stat-icon svg {
    width: 16px;
    height: 16px;
  }

  .empty-state .stat-card .stat-value {
    font-size: 18px;
  }

  .company-brand {
    padding: 12px;
  }

  .company-brand .brand-name {
    font-size: 14px;
  }

  .company-brand .brand-tagline {
    font-size: 11px;
  }

  .company-brand .brand-contact {
    font-size: 10px;
    gap: 8px;
  }

  .viewer-toolbar .filename {
    display: none;
  }
}

/* ===== Landscape phone ===== */
@media (max-height: 480px) and (orientation: landscape) {
  .empty-state .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .company-brand {
    flex-direction: row;
    text-align: left;
  }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ===== Animations ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.empty-state { animation: fadeIn 0.3s ease; }
.file-list-panel.visible { animation: slideUp 0.2s ease; }
.tree-subcats.visible { animation: fadeIn 0.15s ease; }
.tree-files.visible { animation: fadeIn 0.15s ease; }

/* ===== 中文为主 / 英文为副 双语显示 ===== */
.zh-name { font-weight: 600; }
.en-sub {
  display: block;
  font-size: 0.72em;
  font-weight: 400;
  line-height: 1.25;
  opacity: 0.58;
  margin-top: 2px;
}
.en-only { font-weight: 500; }
/* 树形目录：中英文同行，避免换行撑高 */
.tree-cat-header .en-sub,
.tree-subcat-header .en-sub {
  display: inline;
  margin-top: 0;
  margin-left: 5px;
  font-size: 0.74em;
}
/* 类别卡片 / 产品详情 副行留白 */
.stat-label .en-sub,
.ph-name .en-sub { margin-top: 3px; }
/* 表格内产品系列名 */
.model-link .en-sub { margin-top: 1px; }
[data-theme="dark"] .en-sub { opacity: 0.5; }

/* ===== Category Overview（扁平化导航：分类 → 产品系列 → 文档) ===== */
.category-overview {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px 28px;
  display: none;
  flex-direction: column;
  gap: 18px;
  background: var(--bg-tertiary);
}
.category-overview::-webkit-scrollbar { width: 10px; }
.category-overview::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 6px; }

.ov-head { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.ov-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
}
.ov-icon svg { width: 24px; height: 24px; }
.ov-icon .ov-sym { width: 30px; height: 30px; object-fit: contain; }
.ov-title { font-size: 18px; font-weight: 700; color: var(--text-primary); display: flex; flex-direction: column; }
.ov-sub { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }

.ov-group {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}
.ov-group-title {
  padding: 10px 16px;
  font-size: 13px; font-weight: 700; color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}
.ov-files {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2px;
  padding: 6px 10px;
}
.ov-file {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 12px; font-weight: 500;
  color: var(--text-secondary); transition: var(--transition);
}
.ov-file:hover { background: var(--bg-hover); color: var(--text-primary); }
.ov-file.active { background: var(--bg-active); color: var(--text-active); font-weight: 600; }
.ov-file svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--accent); }
.ov-file-model { font-family: "SF Mono", "Fira Code", "Consolas", monospace; }

/* ===== Search Results Panel（含 PDF 内文检索结果) ===== */
.search-results-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: -60px;
  right: -60px;
  min-width: 420px;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  display: none;
  flex-direction: column;
  padding: 6px;
  gap: 2px;
}
.search-results-panel.visible { display: flex; }
.search-results-panel::-webkit-scrollbar { width: 9px; }
.search-results-panel::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 6px; }

.sr-section-title {
  font-size: 11px; font-weight: 700; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 6px 8px 2px;
}
.sr-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition);
}
.sr-item:hover { background: var(--bg-hover); }
.sr-icon { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.sr-icon svg { width: 15px; height: 15px; }
.sr-main { min-width: 0; flex: 1; }
.sr-title { font-size: 13px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.sr-badge {
  font-size: 10px; font-weight: 700; color: #fff;
  background: var(--accent); border-radius: 10px; padding: 1px 7px; flex-shrink: 0;
}
.sr-snippet {
  font-size: 12px; color: var(--text-secondary); margin-top: 2px; line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.sr-snippet mark { background: rgba(255, 214, 0, 0.45); color: inherit; border-radius: 2px; padding: 0 1px; }
.sr-empty { padding: 14px; font-size: 13px; color: var(--text-tertiary); text-align: center; }
.sr-more { padding: 8px; font-size: 12px; color: var(--text-tertiary); text-align: center; }

/* 移动端：搜索结果面板固定全宽，避免被 header 遮挡 / 横向溢出 */
@media (max-width: 768px) {
  .search-results-panel {
    position: fixed;
    left: 8px; right: 8px;
    top: calc(var(--header-h) + 6px + env(safe-area-inset-top, 0px));
    max-height: calc(78vh - var(--header-h));
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
  }
  .ov-files { grid-template-columns: 1fr; }
}

/* ===== 顶栏 总目录 按钮 ===== */
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding: 7px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--text, #1f2937);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.nav-btn:hover { border-color: var(--accent); color: var(--accent); }
.nav-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.nav-btn svg { flex: none; }

/* ===== 选型总目录 ===== */
.guide-index {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 22px 26px 60px;
  background: var(--bg, #f5f7fa);
}
.gi-head { margin-bottom: 18px; }
.gi-head-title { font-size: 20px; font-weight: 700; color: var(--text); }
.gi-head-sub { margin-top: 4px; font-size: 13px; color: var(--text-tertiary); }

.gi-group { margin-bottom: 22px; }
.gi-group-head {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: var(--accent-light, #e6f4e6);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  margin-bottom: 10px;
}
.gi-group-name { font-size: 15px; font-weight: 700; color: var(--accent-dark, #006b00); }
.gi-count { font-size: 12px; color: var(--text-tertiary); }

.gi-sub { margin: 0 0 12px 8px; border-left: 2px solid var(--border, #e2e8f0); }
.gi-sub-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; cursor: pointer; border-radius: 6px;
  font-size: 13.5px; font-weight: 600; color: var(--text);
}
.gi-sub-head:hover { background: rgba(0,138,0,.06); }
.gi-sub-name { flex: 1; }
.gi-chev { width: 14px; height: 14px; transition: transform .15s ease; color: var(--text-tertiary); }
.gi-sub-head.gi-collapsed .gi-chev { transform: rotate(-90deg); }
.gi-sub-body { padding: 2px 0 4px; }
.gi-sub-body-hidden { display: none; }

.gi-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px 7px 14px;
  border-radius: 6px; cursor: pointer;
  font-size: 13px;
}
.gi-item:hover { background: var(--accent-light, #e6f4e6); }
.gi-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.gi-model { font-weight: 600; color: var(--text); font-family: SF Mono, Consolas, monospace; }
.gi-type { color: var(--text-tertiary); font-size: 12px; }
.gi-open { margin-left: auto; color: var(--accent); font-size: 12px; font-weight: 600; opacity: 0; transition: opacity .15s; }
.gi-item:hover .gi-open { opacity: 1; }
.gi-3d {
  display: inline-block; margin-left: 6px; padding: 1px 7px;
  border-radius: 6px; font-size: 11px; font-weight: 600; line-height: 1.7;
  color: #6366f1; background: rgba(99,102,241,.12);
  border: 1px solid rgba(99,102,241,.3); cursor: pointer;
}
.gi-3d:hover { background: rgba(99,102,241,.22); }

.gi-item.gi-missing { cursor: default; opacity: .65; }
.gi-item.gi-missing:hover { background: transparent; }
.gi-dot-x { background: #cbd5e1; }
.gi-tag {
  margin-left: auto; font-size: 11px; padding: 1px 7px;
  border-radius: 10px; background: #f1f5f9; color: var(--text-tertiary);
  border: 1px solid var(--border, #e2e8f0);
}
.gi-empty { padding: 40px; text-align: center; color: var(--text-tertiary); font-size: 14px; }

@media (max-width: 768px) {
  .guide-index { padding: 16px 14px 50px; }
  .gi-open { opacity: 1; }
}
