/* Quiet Luxury visual system — Step 1–4 skin. Legacy vars remapped. */
:root {
  --bg-primary: #0B0C0E;
  --bg-card: #14161A;
  --bg-elevated: #1C1F24;
  --border-hairline: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(201, 169, 110, 0.45);
  --text-primary: #F3F2EE;
  --text-secondary: #9A9CA3;
  --text-muted: #5E6168;
  --accent-gold: #C9A96E;
  --accent-gold-ink: #0B0C0E;
  --status-green: #4E9A7A;
  --status-amber: #C88A4B;
  --status-red: #B84A4A;
  --bg: var(--bg-primary);
  --bg-2: var(--bg-card);
  --bg-nav: var(--bg-primary);
  --card: var(--bg-card);
  --card-hover: var(--bg-elevated);
  --card-inset: var(--bg-elevated);
  --line: var(--border-hairline);
  --text: var(--text-primary);
  --text-content: var(--text-primary);
  --text-list: var(--text-primary);
  --text-strong: var(--text-primary);
  --muted: var(--text-secondary);
  --text-aux: var(--text-secondary);
  --text-faint: var(--text-muted);
  --gold-fill: var(--accent-gold);
  --gold-ink: var(--accent-gold-ink);
  --ok: var(--status-green);
  --danger: var(--status-red);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Inter", sans-serif;
  --font-ui: var(--font-sans);
  --font-title: var(--font-sans);
  --font-song: var(--font-sans);
  --font-kai: var(--font-sans);
  --font-fleet: var(--font-sans);
  --fs-brand: 20px;
  --fs-display: 20px;
  --fs-title: 20px;
  --fs-section: 15px;
  --fs-body: 15px;
  --fs-card: 15px;
  --fs-sub: 12px;
  --fs-aux: 12px;
  --lh-body: 1.65;
  --lh-content: 1.65;
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 20px;
  font-family: var(--font-sans);
}
html, body {
  background: #070809;
  color: var(--text-primary);
  font-family: var(--font-sans);
}
html.font-song,
html.font-kai,
html.font-fleet {
  --font-ui: var(--font-sans);
  --font-title: var(--font-sans);
  font-family: var(--font-sans);
}
#app, html:has(#app) #app, .help-page #app {
  max-width: 430px;
  background: var(--bg-primary);
}
body { justify-content: center; }

.primary, button.primary, .home-hero-send {
  background: var(--accent-gold);
  color: var(--accent-gold-ink);
  border-color: var(--accent-gold);
}
.sheet-card, .card, .ld-card, .tr-card, .scout-card, .tool-tile, .hb, .home-hero-ask {
  border-radius: var(--radius);
}
.home-hero-ask, #composer .composer-box, .composer, #input {
  border-radius: var(--radius-lg);
}

/* Hide instruction-only grey on the landing; keep errors/quota/legal */
html.is-tab-hongchen.is-home-landing #homeFirstTip,
html.is-tab-hongchen.is-home-landing .home-hero-examples-label,
html.is-tab-hongchen #homeQuick,
.ask-slot.row-folded,
#uiFontSetting,
html:not(.needs-ref-gate) #refGate { display: none !important; }

/* First-load: install card must not be a blocking overlay */
#installCard.install-card {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  margin: 12px 16px;
}
html.is-home-landing #installCard { display: none !important; }

/* Header: city left, quota + EN right */
.top {
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-hairline);
  align-items: center;
}
.top .watch-video-btn { display: none; }
.trial-capsule, .lang-switch, .header-city-chip {
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border-hairline);
  border-radius: 999px;
  background: transparent;
  color: var(--text-primary);
  min-height: 28px;
}

/* Bottom nav — 4 tabs, 60px, frosted */
.main-nav {
  z-index: 30;
  height: 60px;
  min-height: 60px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: rgba(11, 12, 14, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-hairline);
  max-width: 430px;
}
.main-nav-item {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  gap: 2px;
}
.main-nav-item.on,
.main-nav-item[aria-current="page"] { color: var(--accent-gold); }
.main-nav-item svg { width: 22px; height: 22px; stroke-width: 1.5; }

/* 红尘 home */
.home-first {
  padding: 24px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 0;
}
.home-first-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text-primary);
}
.home-first-title .brand-core { font-size: 22px; font-weight: 600; }
.home-first-title .brand-side {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 6px;
  letter-spacing: 0.08em;
}
.home-first-sub {
  margin: 6px 0 0;
  font-size: var(--fs-aux, 12px);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.4;
  letter-spacing: 0.04em;
  max-width: 100%;
}
.brand-block { display: flex; flex-direction: column; align-items: flex-start; }
.brand-block .brand-mark { width: 36px; height: 36px; margin-bottom: 12px; border-radius: 10px; }

.scout-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.scout-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 14px 14px 16px;
  min-height: 108px;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 16px;
  color: var(--text-primary);
  cursor: pointer;
}
.scout-card:focus, .scout-card:active, .home-hero-ask:focus-within {
  border-color: var(--border-accent);
  outline: none;
}
.scout-card-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-gold);
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  padding: 2px 6px;
}
.scout-card-badge.is-muted {
  color: var(--text-secondary);
  border-color: var(--border-hairline);
}
.scout-card-title { font-size: 15px; font-weight: 600; line-height: 1.35; }
.scout-card-desc { font-size: 12px; font-weight: 500; color: var(--text-secondary); line-height: 1.4; }

.home-hero-ask {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  border-radius: 20px;
}
.home-hero-input {
  min-height: 64px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  resize: none;
  width: 100%;
}
.home-hero-input::placeholder { color: var(--text-muted); }
.home-hero-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.home-hero-photo, .home-hero-hold, .home-hero-mode {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border-hairline);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}
.home-hero-toolbar .spacer { flex: 1; }
.home-hero-send {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 0;
}
.home-hero-send svg { width: 18px; height: 18px; }

.home-hero-examples {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 100%;
  overflow: visible;
  flex-wrap: nowrap;
}
.home-hero-ex, button.home-hero-ex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  text-align: left;
  padding: 12px 14px;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  white-space: normal;
}
.home-hero-ex::after {
  content: "→";
  color: var(--text-muted);
  flex: none;
  font-size: 14px;
}

/* Tabs visibility */
html.is-tab-intel #homeFirst,
html.is-tab-tools #homeFirst,
html.is-tab-me #homeFirst { display: none !important; }
html.is-tab-hongchen #homeBlocks,
html.is-tab-tools #homeBlocks { display: none !important; }
html.is-tab-intel #homeBlocks { display: block !important; }
#toolboxPanel { display: none; padding: 16px 16px 20px; box-sizing: border-box; }
html.is-tab-tools #app,
html.is-tab-tools.is-home-landing #app {
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "header"
    "tools"
    "nav";
}
html.is-tab-tools #toolboxPanel {
  display: block;
  grid-area: tools;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
html.is-tab-tools #chatChrome,
html.is-tab-tools #trialHint,
html.is-tab-tools #introVideo,
html.is-tab-tools .ask-slot {
  display: none !important;
}
html.is-tab-intel #chat,
html.is-tab-tools #chat,
html.is-tab-intel #composer,
html.is-tab-tools #composer { display: none !important; }
html.is-tab-intel .home-mode-switch { display: none !important; }

/* 情报 */
.intel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 8px;
  gap: 12px;
}
.intel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.intel-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 16px;
  scrollbar-width: none;
}
.intel-filters button {
  flex: none;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-hairline);
  background: transparent;
  color: var(--text-secondary);
}
.intel-filters button.is-on {
  color: var(--text-primary);
  border-color: var(--border-accent);
}
html.is-tab-intel #homeBlocks { padding: 0 16px 24px; }
html.is-tab-intel .ld-rail, html.is-tab-intel .tr-rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
}
html.is-tab-intel .ld-card, html.is-tab-intel .tr-card {
  width: 100%;
  min-height: 0;
  padding: 16px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  text-align: left;
}
html.is-tab-intel .ld-card-name, html.is-tab-intel .tr-card-name {
  font-size: 16px;
  font-weight: 600;
}
.intel-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 8px;
  border: 1px solid var(--status-green);
  color: var(--status-green);
  margin-left: 8px;
}
.intel-badge.is-web {
  border-color: var(--border-hairline);
  color: var(--text-secondary);
}
.tr-lock {
  display: block;
  margin-top: 10px;
  padding: 8px 0 0;
  border-top: 1px solid var(--border-accent);
  color: var(--accent-gold);
  font-size: 12px;
  font-weight: 500;
  background: none;
}

/* 工具箱 */
.tool-sos {
  display: block;
  width: 100%;
  padding: 16px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid rgba(184, 74, 74, 0.45);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}
.tool-sos-title { font-size: 15px; font-weight: 600; }
.tool-sos-sub { margin-top: 4px; font-size: 12px; color: var(--text-secondary); }
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tool-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px 14px;
  min-height: 96px;
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 16px;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}
.tool-tile svg { width: 20px; height: 20px; color: var(--accent-gold); }
.tool-tile-title { font-size: 15px; font-weight: 600; }
.tool-tile-sub { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.tool-tile[hidden] { display: none; }

/* 工具箱分类：可展开收起，字号跟磁贴标题一致，选中（展开）用偏暗的金 */
.tool-cat { margin: 0 0 8px; }
.tool-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: 8px 2px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tool-cat-label { flex: 1 1 auto; min-width: 0; }
.tool-cat-caret {
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
  opacity: 0.7;
}
.tool-cat.is-open .tool-cat-head {
  color: var(--accent-gold);
  opacity: 0.82;
}
.tool-cat.is-open .tool-cat-caret {
  transform: rotate(45deg);
  margin-top: -3px;
}
.tool-cat .tool-grid { margin: 0 0 8px; }
.tool-cat .tool-grid[hidden] { display: none; }


/* 我的 — passport */
.pass-card {
  position: relative;
  margin: 8px 0 20px;
  padding: 20px 18px 18px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(201,169,110,0.08), transparent 42%),
    linear-gradient(180deg, #1A1C20 0%, #121418 55%, #0E1013 100%);
  border: 1px solid var(--accent-gold);
  color: var(--text-primary);
}
.pass-card-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  text-transform: uppercase;
}
.pass-card-status { float: right; font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.pass-card-title { margin: 18px 0 4px; font-size: 15px; font-weight: 600; clear: both; }
.pass-card-quota { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.pass-card-meta { margin-top: 8px; font-size: 12px; color: var(--text-secondary); }
.pass-card-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  min-height: 40px;
  border-radius: 8px;
  border: 0;
  background: var(--accent-gold);
  color: var(--accent-gold-ink);
  font-size: 13px;
  font-weight: 600;
}
#accountSheet .sheet-card { background: var(--bg-primary); }
.account-list {
  border: 1px solid var(--border-hairline);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
  margin: 0 0 20px;
}
.account-list .more-sheet-item,
.account-list a.more-sheet-item {
  min-height: 50px;
  margin: 0;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--border-hairline);
  background: transparent;
  font-size: 15px;
}
.account-list .more-sheet-item:last-child { border-bottom: 0; }
.more-sheet-item-sub { color: var(--text-muted); font-size: 12px; }

/* Chat typography */
.bubble.user, .bubble-row.user .bubble {
  background: #2A2C31;
  color: var(--text-primary);
  border-radius: 16px 16px 6px 16px;
  max-width: 82%;
  font-size: 15px;
  line-height: 1.65;
}
.bubble.bot, .bubble-row.bot .bubble {
  background: transparent;
  border: 0;
  box-shadow: none;
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-primary);
}
#chat, #chat .bubble, #chat p { font-size: 15px; line-height: 1.7; }
.welcome-line {
  margin: 12px 16px 16px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Day mode */
html.theme-light {
  --bg-primary: #F6F3EC;
  --bg-card: #FFFFFF;
  --bg-elevated: #EFEBE3;
  --border-hairline: rgba(28, 24, 18, 0.10);
  --border-accent: rgba(201, 169, 110, 0.55);
  --text-primary: #1C1A16;
  --text-secondary: #5C5A56;
  --text-muted: #8A8680;
  --bg: var(--bg-primary);
  --bg-2: var(--bg-card);
  --bg-nav: var(--bg-primary);
  --card: var(--bg-card);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --text-aux: var(--text-secondary);
  --line: var(--border-hairline);
}
html.theme-light, html.theme-light body { background: #E8E4DB; color: var(--text-primary); }
html.theme-light #app, html.theme-light.theme-light #app { background: var(--bg-primary); }
html.theme-light .main-nav { background: rgba(246, 243, 236, 0.88); }
html.theme-light .bubble.user, html.theme-light .bubble-row.user .bubble { background: #E8E3D8; color: var(--text-primary); }
html.theme-light .pass-card {
  background: linear-gradient(180deg, #2A2C30, #16181C);
  color: #F3F2EE;
}


@media (max-height: 540px) {
  .home-first { padding-top: 12px; gap: 12px; }
  .scout-card { min-height: 88px; padding: 10px 12px; }
  .home-hero-input { min-height: 44px; }
}

/* toolbox panel scrolling is handled in the is-tab-tools grid rules above */
.intel-title { margin: 8px 0 0; font-size: 15px; font-weight: 600; }
#uiFontSetting[hidden], #uiFontSetting { display: none !important; }
.council-home-card-title { font-size: 15px; }

.home-hero-photo, .home-hero-hold, .home-hero-mode { white-space: nowrap; }
.home-hero-mode { max-width: 46%; overflow: hidden; text-overflow: ellipsis; }

/* ---- 2026-11-27: 内容不让一键全选复制（输入框、我的、求助电话照常） ---- */
html.no-copy body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
html.no-copy input,
html.no-copy textarea,
html.no-copy [contenteditable="true"],
html.no-copy #accountSheet,
html.no-copy #accountSheet *,
html.no-copy #sosSheet,
html.no-copy #sosSheet *,
html.no-copy .allow-copy,
html.no-copy .allow-copy * {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

/* ---- 2026-11-27: 情报页顶部 宝藏小店 / 政策与入境 ---- */
.intel-feature { display: none; }
html.is-tab-intel .intel-feature {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 12px;
  margin: 0 0 16px;
}
.intel-feature-main,
.intel-feature-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px 14px;
  min-height: 108px;
  border-radius: 16px;
  text-align: left;
  color: var(--text-primary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.intel-feature-main {
  position: relative;
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.16), rgba(201, 169, 110, 0.03) 60%), var(--bg-card);
  border: 1px solid var(--border-accent);
}
.intel-feature-side {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
}
.intel-feature-kicker { font-size: 11px; font-weight: 500; color: var(--accent-gold); letter-spacing: .02em; }
.intel-feature-title { font-size: 17px; font-weight: 600; line-height: 1.3; }
.intel-feature-title.is-sm { font-size: 15px; }
.intel-feature-desc { font-size: 12px; font-weight: 500; color: var(--text-secondary); line-height: 1.4; }
.intel-feature-go { margin-top: auto; font-size: 12px; font-weight: 600; color: var(--accent-gold); }
.intel-feature-main:active, .intel-feature-side:active { background-color: var(--bg-elevated); }
.tool-tile.is-feature { border-color: var(--border-accent); }

/* ---- 2026-11-27: 底栏永远露在最上层可点：弹层、抽屉、详情页都停在底栏上方 ---- */
html[data-tab] { --v2-nav-h: calc(60px + env(safe-area-inset-bottom, 0px)); }
html[data-tab]:not(.kb-typing) body > .more-sheet,
html[data-tab]:not(.kb-typing) #customToolSheet,
html[data-tab]:not(.kb-typing) .council-root,
html[data-tab]:not(.kb-typing) #imagePicker,
html[data-tab]:not(.kb-typing) #placeSheet {
  bottom: var(--v2-nav-h) !important;
}
/* .sheet keeps its keyboard-frame sizing (inline top/height from placeSheet);
   its bottom strip is clipped away so the nav under it shows and takes taps. */
html[data-tab]:not(.kb-typing) body > .sheet {
  padding-bottom: var(--v2-nav-h);
  clip-path: inset(0 0 var(--v2-nav-h) 0);
}

/* ---- 2026-11-27: 旧版「找店为主」存档不能让红尘首页空白 ---- */
html.is-tab-hongchen.is-home-landing.home-mode-guide #homeFirst { display: flex !important; }

/* ---- 2026-11-27: 首页输入框操作行：等高、垂直居中、不截断（360–465，直达和深链都一样） ---- */
#homeHeroAsk .home-hero-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-height: 36px;
}
#homeHeroAsk .home-hero-photo,
#homeHeroAsk .home-hero-hold,
#homeHeroAsk .home-hero-mode {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  flex: 0 0 auto;
  height: 36px;
  min-height: 36px;
  max-width: none;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}
#homeHeroAsk .home-hero-toolbar .spacer { flex: 1 1 0; min-width: 0; }
#homeHeroAsk .home-hero-send { align-self: center; flex: 0 0 36px; margin: 0; }
@media (max-width: 380px) {
  #homeHeroAsk .home-hero-toolbar { gap: 4px; }
  #homeHeroAsk .home-hero-photo,
  #homeHeroAsk .home-hero-hold,
  #homeHeroAsk .home-hero-mode { padding: 0 8px; font-size: 11.5px; }
}

/* ---- 2026-11-27: 地图暂未开放，「地图」入口不再出现（以前点了会被送回红尘首页） ---- */
#homeMapBtn, #mapEntry { display: none !important; }
html.is-tab-intel #homeShopBar { display: none !important; }

/* ---- 2026-11-27: 四栏底导航后不再有「推荐 / 找店 / 聊天」切换（点「找店」会让红尘首页空白） ---- */
#homeModeSwitch, #chatModeBar, #homeShopBar { display: none !important; }

/* ==== 2026-11-27 红尘首页（一屏）：品牌栏 → 输入框 → 三块并列 → 三条提示 → 底栏 ==== */
:root {
  --hc-tile-on-border: #C9A96E;
  --hc-tile-on-bg: #1C1914;
  --hc-tile-on-text: #F3F2EE;
  --hc-tile-off-bg: #141619;
  --hc-tile-off-text: #8E8D8A;
  --hc-hint-bg: #141619;
  --hc-hint-key: #C9A96E;
}
html.theme-light {
  --hc-tile-on-border: #B08D57;
  --hc-tile-on-bg: #F4ECDD;
  --hc-tile-on-text: #2A2621;
  --hc-tile-off-bg: #F3F1EC;
  --hc-tile-off-text: #8A857D;
  --hc-hint-bg: #FBFAF7;
  --hc-hint-key: #9A7641;
}
.header-wordmark { display: none; }
html.is-tab-hongchen .header-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  margin: 0 6px 0 2px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text-primary);
  white-space: nowrap;
}
.header-wordmark small { font-size: 11px; font-weight: 500; color: var(--accent-gold); letter-spacing: .04em; }
@media (max-width: 370px) {
  html.is-tab-hongchen .header-wordmark { font-size: 15px; margin-right: 4px; }
}

/* 首页去掉重复大标题、旧示例、旧快捷行；保留一行低调副标题 */
html.is-tab-hongchen #homeFirst .home-first-title,
html.is-tab-hongchen #homeHeroExamples,
html.is-tab-hongchen .home-hero-examples-label,
.scout-cards { display: none !important; }
html.is-tab-hongchen #homeFirst .brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}
html.is-tab-hongchen #homeFirst .home-first-sub {
  margin: 0;
}
html.is-tab-hongchen #homeFirst {
  padding: 14px 16px 12px;
  gap: 12px;
  margin: 0;
}
html.is-tab-hongchen.is-home-landing #onboardPick,
html.is-tab-hongchen.is-home-landing #onboard { overflow: hidden; }

#homeHeroAsk { padding: 12px; gap: 8px; }
#homeHeroAsk .home-hero-input {
  min-height: 52px;
  max-height: 96px;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 2px 2px 0;
}
#homeHeroAsk .home-hero-photo.is-icon,
#homeHeroAsk .home-hero-hold.is-icon {
  width: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: 50%;
  color: var(--text-primary);
}
#homeHeroAsk .home-hero-photo.is-icon svg,
#homeHeroAsk .home-hero-hold.is-icon svg { width: 20px; height: 20px; }
#homeHeroAsk .home-hero-hold.is-icon.is-holding { border-color: var(--accent-gold); color: var(--accent-gold); }
#homeHeroAsk .home-hero-mode { padding: 0 10px; border-radius: 18px; }

.hc-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.hc-tile {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 64px;
  min-width: 0;
  margin: 0;
  padding: 0 4px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--hc-tile-off-bg);
  color: var(--hc-tile-off-text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hc-tile svg { width: 20px; height: 20px; flex: none; }
.hc-tile span { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hc-tile.is-on {
  border-color: var(--hc-tile-on-border);
  background: var(--hc-tile-on-bg);
  color: var(--hc-tile-on-text);
}
.hc-tile.is-on svg { color: var(--hc-tile-on-border); }
html.theme-light .hc-tile:not(.is-on) { border-color: rgba(0, 0, 0, 0.04); }

.hc-hints {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hc-hint {
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  margin: 0;
  padding: 9px 30px 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-hairline);
  background: var(--hc-hint-bg);
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hc-hint:active { border-color: var(--border-accent); }
.hc-hint-k { font-size: 13px; font-weight: 600; color: var(--hc-hint-key); line-height: 1.3; }
.hc-hint-t { font-size: 12px; font-weight: 400; color: var(--text-secondary); line-height: 1.4; }
.hc-hint-go {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text-muted);
}
@media (max-height: 700px) {
  html.is-tab-hongchen #homeFirst { padding-top: 10px; gap: 10px; }
  #homeHeroAsk .home-hero-input { min-height: 44px; }
  .hc-hint { padding: 7px 30px 7px 12px; }
}
html.is-tab-hongchen #homeFirst { width: 100%; max-width: none; box-sizing: border-box; align-self: stretch; }
html.is-tab-hongchen #homeFirst > * { width: 100%; box-sizing: border-box; }
html.is-tab-hongchen #onboardPick.home-hero { width: 100% !important; max-width: none !important; box-sizing: border-box; padding: 0 !important; margin: 0 !important; align-self: stretch !important; }

/* 2026-11-27 首页细节：提示为独立圆角按钮条（左金色短标签、右 ›）；选中块底部 4px 香槟金圆点 */
:root { --hc-tile-off-border: rgba(255, 255, 255, 0.06); --hc-tile-off-icon: #7A7975; --hc-tile-on-icon: #C9A96E; }
html.theme-light { --hc-tile-off-border: rgba(0, 0, 0, 0.07); --hc-tile-off-icon: #9A958C; --hc-tile-on-icon: #A9844C; }
.hc-tile { position: relative; border-color: var(--hc-tile-off-border); }
.hc-tile svg { color: var(--hc-tile-off-icon); }
.hc-tile.is-on svg { color: var(--hc-tile-on-icon); }
.hc-tile.is-on::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--hc-tile-on-icon);
}
html.theme-light .hc-tile:not(.is-on) { border-color: var(--hc-tile-off-border); }
.hc-hint {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 30px 8px 12px;
  border-color: transparent;
}
html.theme-light .hc-hint { border-color: rgba(0, 0, 0, 0.06); }
.hc-hint-k { flex: none; white-space: nowrap; }
.hc-hint-t {
  flex: 1 1 auto;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- 2026-11-27 b2: 情报只放内容（城市 + 三分栏），5 栏底部导航，多视角拆局 ---- */
.intel-v3 { display: none; }
html.is-tab-intel .intel-v3 { display: block; }
html.is-tab-intel #intelHead,
html.is-tab-intel #homePlacesBlock,
html.is-tab-intel #homeTreasureBlock,
html.is-tab-intel #homeShopBar,
html.is-tab-intel #homeQuick,
html.is-tab-intel .intel-feature { display: none !important; }
html.is-tab-intel #homeBlocks { padding-top: 0; }
.iv-top { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 12px 16px 8px; display: flex; flex-direction: column; gap: 10px; }
.iv-city { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 3px; border-radius: 12px; background: var(--hc-tile-off-bg); border: 1px solid var(--hc-tile-off-border); }
.iv-city-btn { height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--hc-tile-off-text); font: inherit; font-size: 14px; font-weight: 500; }
.iv-city-btn.is-on { background: var(--hc-tile-on-bg); color: var(--hc-tile-on-text); box-shadow: inset 0 0 0 1px var(--hc-tile-on-border); }
.iv-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.iv-tab { height: 40px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 500; position: relative; white-space: nowrap; }
.iv-tab.is-on { color: var(--text); font-weight: 600; }
.iv-tab.is-on::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent-gold); }
.iv-foot, .iv-policy, .iv-circle { padding: 4px 16px 24px; display: flex; flex-direction: column; gap: 10px; }
.iv-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.iv-filter { height: 34px; padding: 0 4px; border-radius: 10px; border: 1px solid var(--hc-tile-off-border); background: var(--hc-tile-off-bg); color: var(--hc-tile-off-text); font: inherit; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iv-filter.is-on { border-color: var(--hc-tile-on-border); background: var(--hc-tile-on-bg); color: var(--hc-tile-on-text); }
.iv-list { display: flex; flex-direction: column; gap: 10px; }
.iv-card { border-radius: 12px; border: 1px solid var(--hc-tile-off-border); background: var(--hc-hint-bg); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.iv-card-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n g" "m g"; align-items: center; column-gap: 8px; row-gap: 2px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; }
.iv-name { grid-area: n; font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-meta { grid-area: m; font-size: 12px; color: var(--muted); line-height: 1.4; display: flex; flex-wrap: wrap; gap: 0 8px; }
.iv-origin { color: var(--hc-hint-key); }
.iv-go { grid-area: g; color: var(--muted); font-size: 18px; line-height: 1; }
.iv-rows { display: flex; flex-direction: column; gap: 6px; }
.iv-row { display: grid; grid-template-columns: 16px auto minmax(0, 1fr); column-gap: 6px; align-items: start; font-size: 13px; line-height: 1.5; }
.iv-row svg { margin-top: 2px; color: var(--hc-tile-on-icon); }
.iv-row-k { color: var(--hc-hint-key); font-weight: 600; white-space: nowrap; }
.iv-row-t { color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.iv-ask { display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border-radius: 10px; border: 1px solid var(--hc-tile-off-border); background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; }
.iv-ask svg { color: var(--hc-tile-on-icon); flex: 0 0 auto; }
.iv-ask.is-gold { border-color: var(--hc-tile-on-border); background: var(--hc-tile-on-bg); color: var(--hc-tile-on-text); height: 42px; font-size: 14px; }
.iv-more { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border-radius: 10px; border: 1px dashed var(--hc-tile-on-border); background: transparent; color: var(--hc-hint-key); font: inherit; font-size: 13px; }
.iv-more.iv-more-top { border-style: solid; min-height: 36px; font-weight: 500; }
.iv-empty { margin: 12px 0; font-size: 13px; color: var(--muted); text-align: center; }
.iv-pol-h { display: flex; align-items: center; gap: 8px; color: var(--hc-tile-on-icon); }
.iv-pol-t { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text); }
.iv-pol-src { margin: 0; font-size: 12px; color: var(--muted); }
.iv-note { margin: 0; font-size: 12px; line-height: 1.55; color: var(--muted); }
.iv-circle-item { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--hc-tile-off-border); background: var(--hc-hint-bg); color: inherit; font: inherit; text-align: left; }
.iv-circle-item svg { width: 20px; height: 20px; color: var(--hc-tile-on-icon); }
.iv-circle-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.iv-circle-tx .iv-name, .iv-circle-tx .iv-meta { grid-area: auto; }

/* 5 栏导航 */
#mainNav { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
#mainNav .main-nav-item .nav-label { white-space: nowrap; }
#navSos.on, #navSos[aria-current="page"] { color: var(--accent-gold); }

/* 多视角拆局 */
.lens-root { position: fixed; left: 0; right: 0; top: 0; bottom: var(--v2-nav-h, 60px); z-index: 26; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.lens-root[hidden] { display: none !important; }
html.kb-typing .lens-root { bottom: 0; }
@media (min-width: 431px) { .lens-root { max-width: 430px; margin: 0 auto; } }
.lens-top { position: sticky; top: 0; z-index: 1; display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; height: 52px; padding: 0 8px; background: var(--bg); border-bottom: 1px solid var(--line); }
.lens-back { height: 36px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; text-align: left; padding: 0 8px; }
.lens-title { margin: 0; text-align: center; font-size: 17px; font-weight: 600; color: var(--text); white-space: nowrap; }
.lens-body { padding: 14px 16px 28px; display: flex; flex-direction: column; gap: 12px; }
.lens-sub { margin: 0; font-size: 14px; color: var(--muted); }
.lens-field { display: flex; flex-direction: column; gap: 6px; }
.lens-field-k { font-size: 13px; color: var(--hc-hint-key); font-weight: 600; }
.lens-input { width: 100%; box-sizing: border-box; min-height: 104px; resize: vertical; border-radius: 12px; border: 1px solid var(--hc-tile-off-border); background: var(--hc-hint-bg); color: var(--text); font: inherit; font-size: 15px; line-height: 1.55; padding: 10px 12px; }
.lens-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lens-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 64px; border-radius: 12px; border: 1px solid var(--hc-tile-off-border); background: var(--hc-tile-off-bg); color: var(--hc-tile-off-text); font: inherit; font-size: 13px; white-space: nowrap; }
.lens-opt svg { color: var(--hc-tile-off-icon); }
.lens-opt.is-all { grid-column: 1 / -1; height: 44px; flex-direction: row; font-size: 14px; font-weight: 600; }
.lens-opt.is-on { border-color: var(--hc-tile-on-border); background: var(--hc-tile-on-bg); color: var(--hc-tile-on-text); font-weight: 600; }
.lens-opt.is-on svg { color: var(--hc-tile-on-icon); }
.lens-go { height: 46px; border-radius: 12px; border: 0; background: var(--accent-gold); color: var(--accent-gold-ink); font: inherit; font-size: 16px; font-weight: 600; }
.lens-go[disabled] { opacity: .6; }
.lens-cost { margin: -4px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.lens-err { margin: 0; font-size: 13px; color: var(--status-amber); text-align: center; }
.lens-result { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 60px; }
.lens-cards { display: grid; grid-template-columns: 1fr; gap: 10px; }
.lens-card { border-radius: 12px; border: 1px solid var(--hc-tile-off-border); background: var(--hc-hint-bg); padding: 12px 14px; }
.lens-card-h { display: flex; align-items: center; gap: 8px; color: var(--hc-tile-on-icon); margin-bottom: 6px; }
.lens-card-t { margin: 0; font-size: 15px; font-weight: 600; color: var(--text); }
.lens-pts { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 6px; }
.lens-pt { font-size: 14px; line-height: 1.6; color: var(--text); margin: 0; }
.lens-card.is-crisis .lens-go { width: 100%; margin-top: 10px; }
.lens-ask { border-radius: 12px; border: 1px solid var(--hc-tile-on-border); background: var(--hc-tile-on-bg); padding: 12px 14px; }
.lens-ask-k { font-size: 12px; color: var(--hc-hint-key); font-weight: 600; }
.lens-ask-t { margin: 4px 0 0; font-size: 15px; line-height: 1.55; color: var(--hc-tile-on-text); }
/* 店铺详情也停在底栏上方，点底栏任何一项都能直接收起 */
html[data-tab]:not(.kb-typing) .shop-chat-sheet { bottom: var(--v2-nav-h) !important; }

/* ==== 2026-11-27 b3 首页对比度：日间更实、夜间更清楚；提示行两行（粗标题 + 一行说明 + ›） ==== */
:root {
  --hc2-page: var(--bg-primary);
  --hc2-card: #141619;
  --hc2-border: #2E323B;
  --hc2-text: #F4F4F5;
  --hc2-sub: #B4B0A8;
  --hc2-gold: #D4AF37;
  --hc2-on-border: #D4AF37;
  --hc2-on-bg: #1C1914;
  --hc2-on-w: 1px;
  --hc2-placeholder: #8F8B84;
}
html.theme-light {
  --hc2-page: #F2EFE9;
  --hc2-card: #FFFFFF;
  --hc2-border: #CFC8BA;
  --hc2-text: #18181B;
  --hc2-sub: #4B5563;
  --hc2-gold: #9E7428;
  --hc2-on-border: #9E7428;
  --hc2-on-bg: #FBF5E8;
  --hc2-on-w: 1.5px;
  --hc2-placeholder: #6B7280;
}
html.is-tab-hongchen.is-home-landing body,
html.is-tab-hongchen.is-home-landing #app,
html.is-tab-hongchen.is-home-landing #onboard,
html.is-tab-hongchen.is-home-landing #onboardPick,
html.is-tab-hongchen.is-home-landing #homeFirst { background: var(--hc2-page) !important; }
html.is-tab-hongchen .header-wordmark { color: var(--hc2-text); font-weight: 700; }
html.is-tab-hongchen .header-wordmark small { color: var(--hc2-gold); font-weight: 600; }
#homeHeroAsk { background: var(--hc2-card) !important; border: 1px solid var(--hc2-border) !important; }
#homeHeroAsk .home-hero-input { color: var(--hc2-text) !important; font-size: 15px; font-weight: 500; }
#homeHeroAsk .home-hero-input::placeholder { color: var(--hc2-placeholder) !important; opacity: 1; font-weight: 500; }
#homeHeroAsk .home-hero-photo.is-icon,
#homeHeroAsk .home-hero-hold.is-icon { color: var(--hc2-text); border-color: var(--hc2-border) !important; }
#homeHeroAsk .home-hero-mode { color: var(--hc2-sub) !important; font-weight: 600; border-color: var(--hc2-border) !important; }
.hc-tile { background: var(--hc2-card); border: 1px solid var(--hc2-border); color: var(--hc2-sub); font-weight: 600; }
.hc-tile svg { color: var(--hc2-sub); }
.hc-tile.is-on { background: var(--hc2-on-bg); border: var(--hc2-on-w) solid var(--hc2-on-border); color: var(--hc2-text); }
.hc-tile.is-on svg { color: var(--hc2-gold); }
.hc-tile.is-on::after { background: var(--hc2-gold); }
html.theme-light .hc-tile:not(.is-on) { border-color: var(--hc2-border); }
.hc-hints { gap: 8px; }
.hc-hint,
html.theme-light .hc-hint {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 3px;
  align-items: center;
  min-height: 60px;
  padding: 9px 12px 9px 14px;
  background: var(--hc2-card);
  border: 1px solid var(--hc2-border);
}
.hc-hint-k {
  grid-column: 1; grid-row: 1;
  font-size: 15.5px; font-weight: 700; line-height: 1.3;
  color: var(--hc2-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.hc-hint-t {
  grid-column: 1; grid-row: 2;
  font-size: 13.5px; font-weight: 500; line-height: 1.35;
  color: var(--hc2-sub);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
  display: block; -webkit-line-clamp: unset;
}
.hc-hint-go {
  position: static; transform: none;
  grid-column: 2; grid-row: 1 / span 2;
  justify-self: end;
  font-size: 22px; font-weight: 500; line-height: 1;
  color: var(--hc2-gold);
}
@media (min-width: 400px) { .hc-hint-k { font-size: 16px; } }
@media (max-height: 800px) {
  html.is-tab-hongchen #homeFirst { padding-top: 10px; gap: 10px; }
  .hc-hint, html.theme-light .hc-hint { min-height: 56px; padding-top: 7px; padding-bottom: 7px; }
}

/* 补充条件小标签：引导气泡下、输入框上；可多选，自动换行 */
.ctx-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 6px; }
.ctx-chip { height: 30px; padding: 0 11px; border-radius: 15px; border: 1px solid var(--hc2-border); background: var(--hc2-card); color: var(--hc2-sub); font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.ctx-chip.is-on { border-color: var(--hc2-on-border); background: var(--hc2-on-bg); color: var(--hc2-text); }
.ctx-chip.is-on::before { content: "✓ "; color: var(--hc2-gold); }
@media (max-width: 370px) { .ctx-chip { padding: 0 9px; font-size: 12.5px; } .ctx-chips { gap: 5px; padding: 6px 10px 4px; } }
html.kb-typing .ctx-chips { padding-top: 6px; padding-bottom: 4px; }
.bubble-ctx-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.bubble-ctx-tags span { font-size: 11.5px; line-height: 1.4; padding: 1px 7px; border-radius: 9px; background: rgba(212, 175, 55, 0.14); color: inherit; opacity: .9; }
.bubble.is-guide { border: 1px dashed var(--hc2-border); }
.bubble.is-guide .act-row, .bubble.is-guide .retry-row, .bubble.is-guide .council-hint { display: none !important; }

/* 首页（t3826）：不垂直居中。顶栏下固定 48px 后自然往下排；默认三块都不选、提示收起，点块才在下面展开 3 张卡。 */
.hc-hints[hidden] { display: none !important; }
html.is-tab-hongchen.is-home-landing #onboardPick { display: flex !important; flex-direction: column; height: 100%; min-height: 0; }
html.is-tab-hongchen.is-home-landing #homeFirst,
html.is-tab-hongchen.is-home-landing:not(.hc-collapsed) #homeFirst {
  flex: 1 1 auto;
  min-height: 0;
  justify-content: flex-start !important;
  gap: 14px;
  padding: 48px 16px 12px !important;
}
html.is-tab-hongchen.is-home-landing #homeFirst > #homeHeroAsk { margin-top: 0 !important; }
:root { --hc3-title: #F5F3EE; --hc3-sub: #9A958C; }
html.theme-light { --hc3-title: #1C1B18; --hc3-sub: #7A756C; }
.hc-hints { gap: 12px !important; }
.hc-hint,
html.theme-light .hc-hint {
  min-height: 0 !important;
  row-gap: 6px !important;
  column-gap: 12px;
  padding: 14px 16px !important;
}
.hc-hint-k,
html.theme-light .hc-hint-k {
  font-size: 15px !important; font-weight: 700; line-height: 1.3;
  color: var(--hc3-title);
  white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere;
}
.hc-hint-t,
html.theme-light .hc-hint-t {
  font-size: 13px !important; font-weight: 400; line-height: 1.35;
  color: var(--hc3-sub);
  white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere;
}

/* 多视角拆局：结果下方的举报 */
.lens-report { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.lens-report-btn { margin-left: auto; padding: 4px 8px; border: 0; background: transparent; color: var(--hc2-sub); font-size: 12.5px; font-weight: 500; cursor: pointer; }
.lens-report-reasons { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; }
.lens-report-reasons[hidden] { display: none; }
.lens-report-k, .lens-report-done { font-size: 12.5px; color: var(--hc2-sub); }
.lens-report-r { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--hc2-border); background: var(--hc2-card); color: var(--hc2-text); font-size: 13px; cursor: pointer; }

/* 情报店卡「3 秒扫一眼」（t3829）：店名 + 浅色小标签同一行（放不下就换行，不叠、不截店名）；亮点/提前知道各一行 */
.iv-card-head { grid-template-areas: "n g"; }
.iv-head-line { grid-area: n; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.iv-card-head .iv-name { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; font-weight: 700; color: var(--hc2-text); }
.iv-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 500; line-height: 1; white-space: nowrap; color: var(--hc2-sub); background: rgba(212, 175, 55, 0.10); border: 1px solid rgba(212, 175, 55, 0.22); }
html.theme-light .iv-tag { background: #F4EEE2; border-color: #E4D9C3; color: #6B6457; }
.iv-row { grid-template-columns: 14px auto minmax(0, 1fr); align-items: center; font-size: 13px; }
.iv-row svg { width: 14px; height: 14px; margin-top: 0; }
.iv-row-k { font-size: 12px; }
.iv-row-t { display: block; -webkit-line-clamp: unset; white-space: nowrap; overflow: visible; text-overflow: clip; color: var(--hc2-text); }

/* 情报页、工具箱页左上角也显示「红尘 AI」，与首页一致 */
html.is-tab-intel .header-wordmark, html.is-tab-tools .header-wordmark {
  display: inline-flex; align-items: baseline; gap: 3px; margin: 0 6px 0 2px;
  font-size: 17px; letter-spacing: .02em; white-space: nowrap;
  color: var(--hc2-text); font-weight: 700;
}
html.is-tab-intel .header-wordmark small, html.is-tab-tools .header-wordmark small { color: var(--hc2-gold); font-weight: 600; }
@media (max-width: 370px) { html.is-tab-intel .header-wordmark, html.is-tab-tools .header-wordmark { font-size: 15px; margin-right: 4px; } }

/* 入境政策三张常驻卡（t3830）：标题、要点、办事处信息、来源链接 + 核验日期；黑金 / 暖米 */
.iv-policy { display: flex; flex-direction: column; gap: 12px; }
.iv-pol { gap: 10px; }
.iv-pol-h { display: flex; align-items: center; gap: 8px; color: var(--hc2-gold); }
.iv-pol-h .iv-name { color: var(--hc2-text); font-weight: 700; font-size: 15px; white-space: normal; }
.iv-pol-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.iv-pol-item { display: flex; flex-direction: column; gap: 2px; }
.iv-pol-k { font-size: 12.5px; font-weight: 700; color: var(--hc2-gold); }
.iv-pol-t { font-size: 13.5px; line-height: 1.55; color: var(--hc2-text); margin: 0; }
.iv-pol-office { border-radius: 10px; padding: 10px 12px; background: var(--hc2-on-bg); border: 1px solid var(--hc2-border); display: flex; flex-direction: column; gap: 6px; }
.iv-pol-office-n { margin: 0; font-size: 14px; font-weight: 700; color: var(--hc2-text); }
.iv-pol-note { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--hc2-sub); }
.iv-pol-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; margin: 0; font-size: 13px; line-height: 1.45; }
.iv-pol-dl dt { color: var(--hc2-sub); font-weight: 600; }
.iv-pol-dl dd { margin: 0; color: var(--hc2-text); overflow-wrap: anywhere; }
.iv-pol-src { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; border-top: 1px solid var(--hc2-border); font-size: 12px; line-height: 1.45; }
.iv-pol-src-k { color: var(--hc2-sub); font-weight: 600; }
.iv-link { color: var(--hc2-gold); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }

/* 首页展开卡片（t3833，以此为准）：纯单行，左字右箭头，垂直居中；上下 14px，卡间 12px；标题 15px 加粗 */
.hc-hints { gap: 12px !important; }
.hc-hint,
html.theme-light .hc-hint {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 0 !important;
  padding: 14px 16px !important;
}
.hc-hint-k,
html.theme-light .hc-hint-k {
  flex: 1 1 auto; min-width: 0;
  font-size: 15px !important; font-weight: 700; line-height: 1.35;
  color: var(--hc3-title);
  white-space: nowrap; overflow: visible; text-overflow: clip;
}
.hc-hint-t { display: none !important; }
.hc-hint-go { flex: 0 0 auto; position: static; transform: none; font-size: 22px; line-height: 1; color: var(--hc2-gold); }

/* 底栏（t3834）：五项图标+文字整体垂直居中，不再贴底。网页与 App（Capacitor）都生效；viewport-fit=cover 已设，env() 有效。 */
html[data-tab] { --v2-nav-safe: max(env(safe-area-inset-bottom, 0px), var(--app-safe-bottom, 0px)); --v2-nav-h: calc(60px + var(--v2-nav-safe)); }
#mainNav.main-nav,
html.is-app #mainNav.main-nav {
  display: flex !important;
  align-items: center;
  box-sizing: border-box;
  height: var(--v2-nav-h);
  min-height: var(--v2-nav-h);
  padding: 10px 4px calc(10px + var(--v2-nav-safe)) !important;
}
#mainNav .main-nav-item {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  height: 100%;
  justify-content: center;
  align-items: center;
  padding: 0 2px;
  gap: 3px;
}

/* 声波 / 发送 two-state button: same gold circle; the chat composer's 发送 pill turns
   into the same 36px circle with the wave while the box is empty. */
.home-hero-send.is-call .vc-wave { width: 20px; height: 20px; }
.composer.has-call:not(.has-text):not(.voice-busy) .composer-bar #sendBtn.is-call {
  display: grid !important;
  place-items: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
}
.composer-bar #sendBtn.is-call .vc-wave { width: 20px; height: 20px; display: block; }
.vc-notice {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 96px);
  z-index: 2147483000;
  max-width: min(92vw, 360px);
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(20, 19, 17, 0.94);
  border: 1px solid rgba(212, 175, 95, 0.55);
  color: #f5f3ee;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  transform: translate(-50%, 8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.vc-notice.show { opacity: 1; transform: translate(-50%, 0); }

/* 情报店卡（t3842/t3854）：第一行只放店名（单行省略号），第二行【业态 + 人均】小标签可换行，
   短语行允许自动换行（不再 nowrap + 裁切），任何标签不超过卡片宽度。 */
.iv-card { min-width: 0; max-width: 100%; overflow: hidden; }
.iv-card-head { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n g" "t t"; row-gap: 6px; min-width: 0; width: 100%; }
.iv-card-head .iv-name { grid-area: n; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.iv-tags { grid-area: t; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; max-width: 100%; }
.iv-tag { max-width: 100%; height: auto; min-height: 20px; padding: 2px 7px; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; box-sizing: border-box; }
.iv-row { min-width: 0; }
.iv-row-t { white-space: normal; overflow: visible; overflow-wrap: anywhere; min-width: 0; }
/* 业态小胶囊：单行横向，放不下时横滑，不撑宽页面。 */
.iv-kinds { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; max-width: calc(100% + 32px); }
.iv-kinds::-webkit-scrollbar { display: none; }
.iv-kind { flex: none; height: 28px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--hc2-border, var(--hc-tile-off-border)); background: transparent; color: var(--hc2-sub, var(--muted)); font: inherit; font-size: 12.5px; white-space: nowrap; }
.iv-kind.is-on { border-color: var(--hc2-gold, var(--hc-tile-on-border)); color: var(--hc2-gold, var(--hc-tile-on-text)); background: var(--hc2-on-bg, var(--hc-tile-on-bg)); font-weight: 600; }
html.theme-light .iv-kind { border-color: #E4D9C3; color: #6B6457; }
html.theme-light .iv-kind.is-on { border-color: #B8923A; color: #8A6A1F; background: #F4EEE2; }
.iv-row { align-items: start; }
.iv-row svg { margin-top: 2px; }

/* 默认头像：深色圆底上的金色线条，日夜一致 */
html .avatar-presets button.avatar-line,
html .avatar-preview .avatar-line-svg,
html .bubble-avatar .avatar-line-svg { color: #D4AF37; }
/* 游客：会员专属小店的说明 */
.iv-locked { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.iv-locked p { margin: 0; }
.iv-locked-btn { min-height: 36px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--hc2-gold, #D4AF37); background: transparent; color: var(--hc2-gold, #D4AF37); font-weight: 600; }

/* Mini-games should not show the main chat composer. Restore when the game closes. */
html.game-open #composer,
html.game-open #homeHeroAsk,
html:has(#diceSheet:not(.hidden)) #composer,
html:has(#diceSheet:not(.hidden)) #homeHeroAsk {
  display: none !important;
  pointer-events: none;
}
/* 会员严选入口：只给中文界面，一行低调的入口。 */
html[lang^="en"] #yanxuanEntry { display: none; }
