/* 玄机排盘 —— 宣纸底 + 琉璃银(靛青顶栏、银线、石青点缀) */

:root {
  --paper: #fbf7ef;
  --paper-2: #f4eee1;
  --ink: #2b2620;
  --ink-2: #6b6154;
  --brand: #2f4d78;
  --brand2: #52709c;
  --cinnabar: #b03a2e;
  --line: #e3dccb;
  --card: #fffdf8;
  --wx-mu: #3a915f;
  --wx-huo: #d8382a;
  --wx-tu: #9a6b2f;
  --wx-jin: #bd9526;
  --wx-shui: #5b8ed6;
  --radius: 10px;
  /* 语义色 */
  --font: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", serif;
  --topbar-bg: #274060;
  --topbar-fg: #fff;
  --topbar-fg-soft: rgba(255, 255, 255, 0.85);
  --topbar-line: #b9c6d4;
  --ghost-border: rgba(255, 255, 255, 0.5);
  --ghost-hover: rgba(255, 255, 255, 0.12);
  --accent: #5c7893;               /* 发送按钮等主操作 */
  --on-accent: #fff;
  --on-brand: #fff;                /* 用户气泡文字 */
  --overlay: rgba(43, 38, 32, 0.45);
  --overlay-strong: rgba(43, 38, 32, 0.55);
  --sel-bg: #eef2fb;               /* 大运/流年点击选中格 */
  --row-alt: rgba(0, 0, 0, 0.02);  /* 表格斑马纹 */
  --note-bg: #fdf3f1;
  --note-border: #ecc8c2;
}

* { box-sizing: border-box; }
/* hidden 属性必须赢过任何 display 声明(.modal-overlay 的 flex 曾把它顶掉,
   导致登录弹窗永远关不上) */
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
/* 动态视口高:键盘弹出时(支持的浏览器)自然缩到键盘上方;不做 JS 跟随视口,
   避免 iOS Safari 上 fixed/transform 与键盘几何互斗产生的抖动与错位。 */
html, body { height: 100dvh; }
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  overflow: hidden; /* 整页不滚,滚动交给内部 .chat-log */
}

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: var(--topbar-bg);
  color: var(--topbar-fg);
  border-bottom: 3px solid var(--topbar-line);
}
.brand { font-size: 18px; font-weight: 700; letter-spacing: 2px; white-space: nowrap; cursor: pointer; }
.brand:hover { opacity: 0.85; }
.btn-ghost {
  background: transparent;
  color: var(--topbar-fg);
  border: 1px solid var(--ghost-border);
  border-radius: 6px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 13px;
}
.btn-ghost:hover { background: var(--ghost-hover); }

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.drawer-btn { display: none; font-size: 16px; padding: 3px 9px; }
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 50;
}
.topbar .quota, .topbar .user {
  font-size: 13px;
  color: var(--topbar-fg-soft);
}

/* ---------- 三栏 ---------- */
/* 桌面:grid —— 输入框恰在对话列正下方,盘面列贯通两行 */
.layout {
  flex: 1;
  min-height: 0;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 190px 1.1fr 1fr;
  grid-template-rows: 1fr auto;
  grid-template-areas:
    "side chat  panel"
    "side compose panel";
}
.layout > .sidebar { grid-area: side; }
.layout > .chat-pane { grid-area: chat; }
.layout > .composer { grid-area: compose; border-right: 1px solid var(--line); }
.layout > .panel-pane { grid-area: panel; }

/* ---------- 会话侧栏 ---------- */
.sidebar {
  width: 190px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.sidebar-title {
  font-size: 12px;
  color: var(--ink-2);
  padding: 10px 14px 6px;
}
.convo-list { display: flex; flex-direction: column; }
.convo-row {
  display: flex;
  align-items: center;
}
.convo-row:hover { background: var(--paper); }
.convo-row.active { background: var(--card); border-right: 2px solid var(--cinnabar); }
.convo-item {
  flex: 1;
  min-width: 0;
  text-align: left;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  padding: 8px 4px 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.convo-del {
  border: none;
  background: transparent;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}
.convo-row:hover .convo-del { opacity: 1; }
.convo-del:hover { color: var(--cinnabar); }
/* 触屏无 hover,删除键常显 */
@media (hover: none) {
  .convo-del { opacity: 1; }
}

/* 大运可点击步 */
.dayun-step.clickable { cursor: pointer; }
.dayun-step.clickable:hover { border-color: var(--brand2); }
.dayun-step.selected {
  border-color: var(--brand);
  background: var(--sel-bg);
  box-shadow: 0 0 0 1px var(--brand);
}
.chat-pane {
  flex: 1.1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0; /* 让内部 .chat-log 能收缩滚动,而非把 composer 撑出视口 */
  border-right: 1px solid var(--line);
}
.panel-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0; /* 让 .panel-body 内部滚动,而非整页滚 */
  background: var(--paper-2);
}

/* ---------- 聊天 ---------- */
.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bubble {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: var(--radius);
  line-height: 1.75;
  font-size: 15px;
  white-space: normal;
  overflow-wrap: break-word;
}
.bubble p { margin: 0 0 8px; }
.bubble p:last-child { margin-bottom: 0; }
.bubble ul, .bubble ol { margin: 4px 0; padding-left: 20px; }
.bubble li { margin: 2px 0; }
.bubble h1, .bubble h2, .bubble h3,
.bubble h4, .bubble h5, .bubble h6 {
  margin: 10px 0 6px;
  line-height: 1.3;
}
.bubble h1 { font-size: 19px; }
.bubble h2 { font-size: 17px; }
.bubble h3 { font-size: 15px; }
.bubble h4, .bubble h5, .bubble h6 { font-size: 14px; }
.bubble code {
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 0.92em;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
}
/* 围栏代码块 */
.bubble .md-code {
  margin: 6px 0;
  padding: 9px 11px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow-x: auto;
}
.bubble .md-code code {
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 13px;
  line-height: 1.5;
  background: none;
  border: none;
  padding: 0;
  white-space: pre;
}
/* markdown 表格 */
.bubble .md-table {
  border-collapse: collapse;
  margin: 6px 0;
  width: 100%;
  font-size: 14px;
  display: block;
  overflow-x: auto;
}
.bubble .md-table th, .bubble .md-table td {
  border: 1px solid var(--line);
  padding: 5px 9px;
  text-align: left;
}
.bubble .md-table thead th {
  background: var(--paper-2);
  font-weight: 700;
  white-space: nowrap;
}
.bubble .md-table tbody tr:nth-child(even) { background: var(--row-alt); }
.bubble.user {
  align-self: flex-end;
  background: var(--brand);
  color: var(--on-brand);
  border-bottom-right-radius: 3px;
}
.bubble.assistant {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-bottom-left-radius: 3px;
}
.bubble.error { border-color: var(--cinnabar); color: var(--cinnabar); }
/* 排盘后的快捷追问 chips */
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; margin: 2px 0 4px; }
.suggest-chip {
  font-family: inherit;
  font-size: 13px;
  color: var(--brand);
  background: var(--card);
  border: 1px solid var(--brand);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.suggest-chip:hover { background: var(--brand); color: var(--on-brand); }

.cursor::after { content: "▍"; color: var(--cinnabar); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0; } }

.tool-status {
  align-self: flex-start;
  font-size: 13px;
  color: var(--ink-2);
  background: var(--paper-2);
  border: 1px dashed var(--line);
  border-radius: 999px;
  padding: 4px 14px;
}
.tool-status.ok { color: var(--wx-mu); border-style: solid; }
.tool-status.fail { color: var(--cinnabar); border-style: solid; }

/* 输入框:桌面在对话列(chat-pane)底部,与原形态一致 */
.composer {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--card);
  flex-shrink: 0;
}
.composer textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  font: inherit;
  font-size: 15px;
  background: var(--paper);
  color: var(--ink);
}
.composer textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.composer button {
  align-self: flex-end;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 15px;
  cursor: pointer;
}
.composer button:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- 盘面 ---------- */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  font-weight: 700;
  color: var(--brand);
  border-bottom: 1px solid var(--line);
}
.panel-header select {
  font: inherit;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  padding: 3px 6px;
  max-width: 55%;
}
.panel-body { flex: 1; overflow-y: auto; padding: 14px 16px 40px; }
.panel-empty { color: var(--ink-2); text-align: center; margin-top: 40%; font-size: 14px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.card h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--brand);
  border-left: 3px solid var(--cinnabar);
  padding-left: 8px;
}

/* 命局摘要 */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 6px 14px;
  font-size: 14px;
}
.summary-grid .k { color: var(--ink-2); margin-right: 6px; font-size: 13px; }
.meta-line { color: var(--ink-2); font-size: 13px; margin-top: 8px; line-height: 1.7; }

/* 四柱表 */
.sizhu-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.sizhu-table th, .sizhu-table td {
  text-align: center;
  padding: 5px 2px;
  border-bottom: 1px solid var(--paper-2);
  font-size: 14px;
}
.sizhu-table th { color: var(--ink-2); font-weight: 400; font-size: 12px; }
.sizhu-table .rowlab { color: var(--ink-2); font-size: 12px; width: 3.2em; }
.gz { font-size: 26px; font-weight: 700; line-height: 1.25; }
.hidden-list { font-size: 12px; line-height: 1.6; }
.small { font-size: 12px; color: var(--ink-2); }

.wx-mu { color: var(--wx-mu); }
.wx-huo { color: var(--wx-huo); }
.wx-tu { color: var(--wx-tu); }
.wx-jin { color: var(--wx-jin); }
.wx-shui { color: var(--wx-shui); }

/* 大运时间轴 */
/* 等分铺满整行,不横向滚动 */
.dayun-strip { display: flex; gap: 4px; overflow-x: visible; padding: 4px 2px 8px; }
.dayun-step {
  min-width: 0;
  flex: 1 1 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  text-align: center;
  padding: 8px 4px;
}
.dayun-step .gz2 { font-size: 17px; font-weight: 700; }
.dayun-step .ss { font-size: 11px; color: var(--ink-2); }
.dayun-step .age { font-size: 11px; color: var(--ink-2); margin-top: 2px; }
/* 流年格更多(12),字号略缩防挤 */
.dayun-strip.liunian .dayun-step { padding: 6px 2px; }
.dayun-strip.liunian .dayun-step .gz2 { font-size: 15px; }
.dayun-strip.liunian .dayun-step .ss { font-size: 10px; }
.qiyun-line { font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }

.note {
  font-size: 13px;
  color: var(--cinnabar);
  background: var(--note-bg);
  border: 1px solid var(--note-border);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 14px;
}

/* 面板高亮闪烁 */
@keyframes flash { 0% { outline-color: var(--cinnabar); } 100% { outline-color: transparent; } }
.panel-flash { outline: 2px solid transparent; animation: flash 1.2s ease-out; }

/* ---------- 节气表 ---------- */
.jieqi-table { width: 100%; border-collapse: collapse; }
.jieqi-table td { padding: 4px 8px; border-bottom: 1px solid var(--paper-2); font-size: 14px; }
.jieqi-table td.jie { color: var(--cinnabar); font-weight: 700; }
.jieqi-table td.zhongqi { color: var(--brand); }

/* ---------- 登录模态 ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal {
  position: relative;
  width: min(92vw, 360px);
  background: var(--paper);
  border-radius: 12px;
  border-top: 4px solid var(--cinnabar);
  padding: 22px 26px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-2);
  cursor: pointer;
  border-radius: 6px;
}
.modal-close:hover { background: rgba(0, 0, 0, 0.06); color: var(--ink); }
/* 付费墙 */
.pay-modal { width: min(94vw, 400px); }
.pay-note { font-size: 14px; color: var(--ink-2); margin: 6px 0 14px; text-align: center; }
.pay-pkgs { display: flex; flex-direction: column; gap: 10px; }
.pay-pkg {
  display: flex; align-items: center; gap: 10px;
  font: inherit; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); padding: 12px 14px;
  transition: border-color 0.15s, background 0.15s;
}
.pay-pkg:hover { border-color: var(--brand); background: var(--sel-bg); }
.pay-pkg-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.pay-pkg-desc { flex: 1; font-size: 12px; color: var(--ink-2); }
.pay-pkg-price { font-size: 17px; font-weight: 700; color: var(--accent); }
.pay-qr {
  display: flex; align-items: center; justify-content: center;
  min-height: 150px; padding: 14px; margin: 4px 0 12px;
  border: 1px dashed var(--line); border-radius: 10px; background: var(--paper-2);
}
.pay-qr-code { font-size: 12px; color: var(--ink-2); word-break: break-all; text-align: center; }
.pay-status { text-align: center; font-size: 13px; color: var(--ink-2); margin: 6px 0 12px; }
.pay-mock-btn, .pay-close {
  display: block; width: 100%; font: inherit; font-size: 15px; cursor: pointer;
  border-radius: 8px; padding: 10px; border: 1px solid var(--line);
}
.pay-mock-btn { background: var(--accent); color: var(--on-accent); border-color: var(--accent); margin-bottom: 8px; }
.pay-close { background: transparent; color: var(--ink-2); margin-top: 8px; }

/* 确认/提示框 */
.confirm-modal { border-top-color: var(--brand); }
.confirm-msg { margin: 4px 0 18px; font-size: 15px; line-height: 1.6; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.confirm-actions button {
  font: inherit;
  font-size: 14px;
  padding: 7px 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.confirm-actions button.danger {
  background: var(--cinnabar);
  border-color: var(--cinnabar);
  color: #fff;
}

.modal-title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 14px;
}
.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.modal-tabs button {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--ink-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.modal-tabs button.active {
  color: var(--cinnabar);
  font-weight: 700;
  border-bottom-color: var(--cinnabar);
}
#auth-form { display: flex; flex-direction: column; gap: 10px; }
#auth-form input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  font: inherit;
  font-size: 14px;
  background: var(--card);
}
#auth-form input:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
#auth-form button {
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: 8px;
  padding: 10px;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
#auth-form button:disabled { opacity: 0.5; }
.auth-error { color: var(--cinnabar); font-size: 13px; }
.auth-error.ok { color: var(--wx-mu); }
.modal-note {
  text-align: center;
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 12px;
}

/* ---------- 未登录首屏(落地页) ---------- */
/* z-index 80:盖住 app 内容(≤60),但低于登录/付费弹窗(.modal-overlay=100),
   否则点「登录」时弹窗会被首屏挡住。 */
.landing {
  position: fixed;
  inset: 0;
  z-index: 80;
  overflow-y: auto;
  overflow-x: hidden; /* 背景盘面放大后可能出界,裁掉避免横向滚动 */
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 82% -6%, rgba(82, 112, 156, 0.20), transparent 60%),
    radial-gradient(720px 520px at 6% 110%, rgba(176, 58, 46, 0.07), transparent 60%),
    linear-gradient(180deg, var(--paper), var(--paper-2));
}

/* 顶栏 */
.lp-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 56px);
}
.lp-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--brand);
}
.lp-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--cinnabar);
  color: #fff;
  font-size: 17px;
  box-shadow: 0 2px 8px rgba(176, 58, 46, 0.35);
}
.lp-nav-actions { display: flex; align-items: center; gap: 10px; }
.lp-nav-login {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--brand);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 18px;
  transition: background 0.15s, border-color 0.15s;
}
.lp-nav-login:hover { background: var(--card); border-color: var(--brand2); }

/* 主体容器 */
.lp-main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 68px) clamp(20px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 7vw, 92px);
}

/* 英雄区 */
.lp-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  min-height: 52vh;
}
.lp-copy { position: relative; z-index: 1; max-width: 620px; }
.lp-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--brand2);
}
.lp-title {
  margin: 16px 0 0;
  font-size: clamp(40px, 6.4vw, 68px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--ink);
}
.lp-sub {
  margin: 22px 0 0;
  max-width: 30em;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.85;
  color: var(--ink-2);
}
.lp-cta {
  margin: 30px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.lp-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: 12px;
  padding: 15px 30px;
  box-shadow: 0 10px 26px rgba(47, 77, 120, 0.30);
  transition: transform 0.08s, box-shadow 0.2s, background 0.2s;
}
.lp-btn-primary:hover {
  background: var(--brand2);
  box-shadow: 0 14px 32px rgba(47, 77, 120, 0.38);
  transform: translateY(-1px);
}
.lp-btn-primary:active { transform: translateY(0); }
.lp-btn-primary:disabled { opacity: 0.55; cursor: default; box-shadow: none; transform: none; }
.lp-arrow { transition: transform 0.2s; }
.lp-btn-primary:hover .lp-arrow { transform: translateX(3px); }
.lp-btn-ghost {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  color: var(--brand);
  background: transparent;
  border: none;
  padding: 12px 6px;
  text-underline-offset: 4px;
}
.lp-btn-ghost:hover { text-decoration: underline; }
.lp-trust { margin: 20px 0 0; font-size: 13px; color: var(--ink-2); opacity: 0.85; }
.landing-error { margin-top: 14px; font-size: 13px; color: var(--cinnabar); }

/* 示例盘面:英雄区背景装饰层 —— 在英雄区内水平+垂直居中,倾斜淡化,置于标题之下 */
.lp-visual {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(92%, 780px);
  opacity: 0.26;
  transform: translate(-50%, -50%) rotate(-6deg) scale(1.06);
  pointer-events: none;
  z-index: 0;
}
.lp-card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 22px 20px;
}
.lp-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--ink-2);
}
.lp-live { font-size: 12px; color: var(--wx-mu); }
.lp-sizhu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.lp-pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.lp-pillar-day { border-color: var(--brand2); box-shadow: inset 0 0 0 1px var(--brand2); }
.lp-gz-lbl { font-size: 11px; color: var(--ink-2); }
.lp-gan, .lp-zhi { font-size: 26px; font-weight: 700; line-height: 1.1; }
.lp-wx {
  display: flex;
  gap: 6px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 700;
}
.lp-wx span {
  flex: 1;
  text-align: center;
  padding: 6px 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
}

/* 特性 */
.lp-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(16px, 2.2vw, 26px);
}
.lp-feat-ic {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 20px;
  color: var(--brand);
  background: var(--sel-bg);
  border-radius: 11px;
}
.lp-feat h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: var(--ink); }
.lp-feat p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink-2); }

/* 页脚 */
.lp-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 22px clamp(20px, 5vw, 56px);
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-2);
}

/* 响应式:窄屏单列;背景盘面移到右下、更淡,避免挤压文字 */
@media (max-width: 860px) {
  .lp-visual {
    width: 132%;
    opacity: 0.13;
    transform: translate(-50%, -50%) rotate(-6deg) scale(1);
  }
  .lp-hero { min-height: 60vh; }
}

/* ---------- 移动端 ---------- */
.mobile-tabs { display: none; }
.badge {
  display: inline-block;
  min-width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--cinnabar);
  margin-left: 5px;
}

@media (max-width: 900px) {
  /* 手机:正常流单列(覆盖桌面 grid),键盘弹出时布局随视口自然缩放,不用 fixed */
  .layout {
    display: flex;
    flex-direction: column;
  }
  /* 侧栏变为抽屉 */
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 240px;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: 4px 0 18px rgba(0, 0, 0, 0.18);
  }
  .sidebar.open { transform: translateX(0); }
  /* 加载期禁过渡:防刷新首帧抽屉从初始位滑出的闪现(app.js 首帧后移除 preload) */
  .preload .sidebar { transition: none !important; }
  .drawer-btn { display: inline-block; }
  /* iOS:输入字号 ≥16px 防聚焦自动缩放 */
  .composer textarea, #auth-form input { font-size: 16px; }
  .chat-pane { border-right: none; }
  /* tab 切换对话/盘面;输入框(layout 直属子)始终在列底常驻、两 tab 都可见 */
  .layout > .chat-pane, .layout > .panel-pane { display: none; }
  .layout > .show { display: flex; }
  .layout > .composer { border-right: none; }
  /* 抽屉侧栏始终参与布局(靠 transform 滑入),否则被藏掉、点击只见变暗不见栏 */
  .layout > .sidebar { display: flex; }
  /* 标题栏减负:品牌缩一点、用户名隐去,额度移出栏、淡显在标题栏右下角 */
  .brand { font-size: 16px; letter-spacing: 1px; }
  .topbar-right { gap: 6px; }
  .topbar .user { display: none; }
  .topbar .quota {
    position: fixed;
    top: 46px;
    right: 10px;
    z-index: 5;
    font-size: 11px;
    opacity: 0.55;
    background: var(--paper);
    padding: 1px 7px;
    border-radius: 8px;
  }
  .mobile-tabs {
    display: flex;
    border-top: 1px solid var(--line);
    background: var(--card);
  }
  .mobile-tabs button {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 15px;
    color: var(--ink-2);
    cursor: pointer;
  }
  .mobile-tabs button.active { color: var(--cinnabar); font-weight: 700; }
}
