/* 游客免费体验面板（B 方案，纠偏 2026-08-03）：
 * 登录前自包含的轻量对话面——独立于 Core 工作台 DOM，
 * 提供 mini composer + 预检动画 + 登录闸；登录后由 resumeGuestTrialAfterAuth 接进工作台。 */
.guest-trial-panel {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  flex-direction: row;
  background: #f7f5f0;
  color: #1a1a2e;
}
.guest-trial-panel[hidden] { display: none; }
/* 游客态以 body 类为准显示面板；必须压过残留的 [hidden] 属性（渲染流程会偶发把
   hidden 置回 true），否则游客入口整页白屏（面板 display:none）。用 !important 兜死。 */
body.guest-trial-active .guest-trial-panel { display: flex !important; }

/* 左侧导航栏 */
.guest-nav {
  width: 220px; flex-shrink: 0; background: #fffdf9; border-right: 1px solid #ece6da;
  display: flex; flex-direction: column; padding: 22px 16px;
}
.guest-nav-brand { font-weight: 700; font-size: 17px; letter-spacing: .5px; margin-bottom: 26px; }
.guest-nav-brand sup { color: #c9a96e; }
.guest-nav-links { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.guest-nav-links a { color: #4a463c; font-size: 14px; text-decoration: none; padding: 10px 12px; border-radius: 8px; }
.guest-nav-links a:hover { background: #f4f1ea; color: #1a1a2e; }
.guest-nav-back { margin-top: auto; background: none; border: none; color: #8a8272; font-size: 13px; cursor: pointer; text-align: left; padding: 8px 12px; }
.guest-nav-back:hover { color: #1a1a2e; }

/* 主区：顶栏（右上登录/注册）+ 内容 */
.guest-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.guest-topbar { flex-shrink: 0; height: 56px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #ece6da; }
.guest-trial-tag { font-size: 13px; color: #8a8272; }
.guest-topbar-auth { display: flex; align-items: center; gap: 10px; }
.guest-auth-link { color: #4a463c; font-size: 14px; text-decoration: none; padding: 7px 14px; border-radius: 8px; }
.guest-auth-link:hover { background: #f4f1ea; }
.guest-auth-btn { background: #1a1a2e; color: #fff; font-size: 14px; text-decoration: none; padding: 7px 18px; border-radius: 8px; }
.guest-auth-btn:hover { opacity: .9; }

/* 内容区：对话卡片占页面约 2/3 宽 */
.guest-content { flex: 1; min-height: 0; display: flex; justify-content: center; align-items: stretch; padding: 26px 24px; overflow: auto; }
.guest-trial-shell {
  width: min(66vw, 1000px); max-width: 100%; min-width: 0; display: flex; flex-direction: column;
  background: #fffdf9; border: 1px solid #ece6da; border-radius: 16px;
  box-shadow: 0 12px 48px rgba(26, 26, 46, .08); overflow: hidden;
}

/* 窄屏：收起导航，卡片占满 */
@media (max-width: 820px) {
  .guest-nav { display: none; }
  .guest-content { padding: 14px; }
  .guest-trial-shell { width: 100%; }
}

.guest-trial-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.guest-trial-empty {
  margin: auto;
  text-align: center;
  color: #9b9384;
  max-width: 420px;
}
.guest-trial-empty h2 { font-size: 20px; color: #4a4636; margin-bottom: 10px; }
.guest-trial-empty p { font-size: 14px; line-height: 1.7; }

.guest-trial-bubble {
  align-self: flex-end;
  max-width: 82%;
  background: #efe7d6;
  color: #2a2518;
  border-radius: 14px 14px 4px 14px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.guest-preflight-row {
  align-self: flex-start;
  max-width: 88%;
  background: #fbf8f1;
  border: 1px solid #ece3d1;
  border-radius: 14px;
  padding: 14px 16px;
}
.guest-preflight-title { font-size: 12px; color: #a89f8f; margin-bottom: 10px; letter-spacing: .5px; }
.guest-preflight-step { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 4px 0; color: #8a8578; }
.guest-preflight-step span { width: 16px; text-align: center; }
.guest-preflight-step.active { color: #8B7355; font-weight: 600; }
.guest-preflight-step.done { color: #4a8f6a; }

.guest-auth-gate, .guest-mode-access-card, .guest-resume-failure {
  align-self: stretch;
  border: 1px solid #e2d9c8;
  border-radius: 16px;
  padding: 20px;
  background: linear-gradient(180deg, #fffdf9, #faf6ee);
}
.guest-auth-gate-kicker { font-size: 12px; color: #c9a96e; letter-spacing: 1px; }
.guest-auth-gate h2 { font-size: 20px; margin: 6px 0 8px; color: #3a3628; }
.guest-auth-gate p, .guest-mode-access-card p, .guest-resume-failure p { font-size: 13.5px; color: #6b6553; line-height: 1.7; }
.guest-auth-gate ul { margin: 12px 0 0; padding-left: 18px; color: #8a8578; font-size: 12.5px; line-height: 1.9; }
.guest-auth-gate small { display: block; margin-top: 12px; color: #a89f8f; font-size: 11.5px; }
.guest-auth-gate-actions { margin-top: 14px; }
.guest-auth-primary {
  border: 0; border-radius: 11px; padding: 11px 20px; cursor: pointer;
  background: #1a1a2e; color: #fff; font-size: 14px; font-weight: 600;
}
.guest-auth-primary:hover { background: #2a2a46; }

.guest-trial-composer {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #ece7dc;
  background: #fffdf9;
}
.guest-trial-composer textarea {
  flex: 1;
  resize: none;
  border: 1px solid #e2d9c8;
  border-radius: 14px;
  padding: 11px 14px;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  max-height: 180px;
  outline: none;
  background: #fff;
  color: #1a1a2e;
}
.guest-trial-composer textarea:focus { border-color: #c9a96e; }
.guest-trial-composer textarea:disabled { background: #f4f1ea; color: #a89f8f; }
.guest-trial-send {
  flex-shrink: 0;
  border: 0;
  border-radius: 12px;
  padding: 0 20px;
  height: 44px;
  background: #1a1a2e;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.guest-trial-send:hover { background: #2a2a46; }
.guest-trial-send:disabled { background: #c8c2b4; cursor: not-allowed; }

@media (max-width: 640px) {
  .guest-trial-shell { width: 100%; }
  .guest-trial-body { padding: 18px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .guest-preflight-step { transition: none; }
}

/* 免费体验欢迎页(方案:文案优化,布局不变)——复用暖纸/金褐/藏青配色 */
.guest-trial-welcome { display: flex; flex-direction: column; }
.gt-kicker { font-size: 12px; color: #c9a96e; letter-spacing: 1px; font-weight: 700; }
.gt-title { font-size: 24px; color: #3a3628; font-weight: 800; margin: 6px 0 2px; }
.gt-sec { margin-top: 20px; }
.gt-sec-label { font-size: 12px; color: #a89f8f; letter-spacing: .5px; margin-bottom: 9px; }
.gt-benefit { display: flex; gap: 11px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #f1ece0; }
.gt-benefit .ic { width: 20px; height: 20px; border-radius: 50%; background: #eaf3ee; color: #4a8f6a; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; flex: none; margin-top: 1px; }
.gt-benefit .tx { font-size: 14.5px; color: #4a4636; line-height: 1.6; }
.gt-benefit .tx b { color: #8B7355; }
.gt-scope { font-size: 13.5px; color: #6b6553; line-height: 1.9; }
.gt-scope b { color: #8B7355; }
.gt-login { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.gt-login .opt { border: 1px solid #dcd4c4; border-radius: 10px; padding: 12px 20px; font-size: 14px; color: #3a3628; background: #fffdf9; cursor: pointer; font-weight: 600; text-decoration: none; }
.gt-login .opt.primary { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }
.gt-login .opt:hover { border-color: #c9a96e; }
.gt-agree { margin-top: 18px; font-size: 11.5px; color: #a89f8f; line-height: 1.7; }
.gt-agree a { color: #8B7355; text-decoration: none; }
