/* ===== 适老化设计 · 大字模式 ===== */
/* 大字模式切换按钮 */
.large-font-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(212, 160, 74, 0.15), rgba(212, 160, 74, 0.08));
  border: 1px solid rgba(212, 160, 74, 0.4);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gold);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  white-space: nowrap;
}

.large-font-toggle svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.large-font-toggle .lf-a-plus {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -1px;
  line-height: 1;
  font-family: var(--font-serif, serif);
}

.large-font-toggle:hover {
  background: linear-gradient(135deg, rgba(212, 160, 74, 0.3), rgba(212, 160, 74, 0.15));
  border-color: var(--gold);
  color: var(--gold-light);
  box-shadow: 0 2px 12px rgba(212, 160, 74, 0.3);
  transform: translateY(-1px);
}

.large-font-toggle.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #fff;
  border-color: var(--gold-deep);
  box-shadow: 0 2px 10px rgba(212, 160, 74, 0.35);
}

.large-font-toggle .lf-text {
  font-size: 12px;
  letter-spacing: 1px;
}

/* 全局平滑过渡，避免切换时跳变 */
html.large-font,
html.large-font *:not(.no-scale) {
  transition: font-size 0.25s ease, line-height 0.25s ease, padding 0.25s ease, margin 0.25s ease;
}

/* ===== 大字模式核心样式 ===== */
html.large-font {
  font-size: 18px;
  line-height: 1.85;
}

/* ===== 小字模式核心样式 ===== */
html.small-font {
  font-size: 13px;
  line-height: 1.5;
}

/* 保护圆形组件不被变形 */
html.large-font .avatar-btn,
html.large-font .avatar-btn::before,
html.large-font .user-avatar {
  font-size: 16px !important;
  line-height: 1 !important;
}

html.large-font .ink-blob,
html.large-font .gold-sparkle {
  font-size: 1px !important;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
}

html.large-font .jk-particle,
html.large-font .jk-tl-dot {
  font-size: 1px !important;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
}

html.large-font .attraction-tl-dot,
html.large-font .attraction-badge {
  font-size: 1px !important;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
}

html.large-font .attraction-comment-avatar,
html.large-font .attraction-comment-avatar-placeholder {
  font-size: 16px !important;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
}

html.large-font .ai-guide-hero-icon,
html.large-font .speak-btn {
  font-size: 1px !important;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
}

html.large-font .chat-history-item-avatar,
html.large-font .diary-card-avatar {
  font-size: 16px !important;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
}

html.large-font [style*="border-radius: 50%"],
html.large-font [style*="border-radius:50%"],
html.large-font [style*="border-radius: 100%"],
html.large-font [style*="border-radius:100%"] {
  font-size: inherit !important;
  line-height: 1 !important;
}

/* 标题放大 */
html.large-font h1 { font-size: 2.6rem; }
html.large-font h2 { font-size: 2.2rem; }
html.large-font h3 { font-size: 1.8rem; }
html.large-font h4 { font-size: 1.5rem; }
html.large-font h5 { font-size: 1.3rem; }
html.large-font h6 { font-size: 1.2rem; }

/* 段落与正文（排除圆形组件和特殊元素） */
html.large-font p,
html.large-font li,
html.large-font span,
html.large-font a:not(.avatar-btn):not(.speak-btn),
html.large-font label,
html.large-font td,
html.large-font th,
html.large-font div:not(.avatar-btn):not(.user-avatar):not(.ink-blob):not(.gold-sparkle):not(.jk-particle):not(.jk-tl-dot):not(.attraction-tl-dot):not(.attraction-badge):not(.attraction-comment-avatar):not(.attraction-comment-avatar-placeholder):not(.ai-guide-hero-icon):not(.speak-btn):not(.chat-history-item-avatar):not(.diary-card-avatar) {
  line-height: 1.85;
}

html.large-font small {
  font-size: 0.9rem;
}

/* 导航栏 */
html.large-font .nav-link {
  font-size: 1.05rem;
  padding: 12px 18px;
}

html.large-font .nav-login-btn,
html.large-font .ai-guide-nav-btn,
html.large-font .nav-logout-btn {
  font-size: 1rem;
  padding: 8px 16px;
}

html.large-font .user-avatar {
  width: 44px;
  height: 44px;
  font-size: 1.2rem !important;
  line-height: 1 !important;
}

/* 按钮放大（排除圆形按钮） */
html.large-font .btn-primary,
html.large-font .btn-secondary {
  font-size: 1.05rem;
  padding: 14px 28px;
}

html.large-font button:not(.avatar-btn):not(.speak-btn):not(.no-scale) {
  font-size: 1.05rem;
  padding: 14px 28px;
}

html.large-font .btn-primary {
  padding: 16px 32px;
}

/* 表单输入框：增加高度、字号 */
html.large-font input,
html.large-font select,
html.large-font textarea {
  font-size: 1.05rem;
  padding: 16px 18px;
  min-height: 52px;
}

html.large-font textarea {
  min-height: 120px;
}

html.large-font .form-group {
  margin-bottom: 24px;
}

html.large-font .form-group label {
  font-size: 1rem;
  margin-bottom: 12px;
}

/* AI 导游页面：放大回答与按钮 */
html.large-font .ai-guide-hero-title {
  font-size: 3rem;
  letter-spacing: 4px;
}

html.large-font .ai-guide-hero-subtitle {
  font-size: 1.5rem;
}

html.large-font .ai-guide-hero-desc {
  font-size: 1.15rem;
}

html.large-font .ai-guide-tab {
  font-size: 1.1rem;
  padding: 16px 32px;
}

html.large-font .ai-guide-card {
  padding: 32px;
}

html.large-font .chat-card-header h3,
html.large-font .plan-card-header h3,
html.large-font .diary-card-header h3 {
  font-size: 1.6rem;
}

html.large-font .chat-result,
html.large-font .plan-result,
html.large-font .diary-result {
  font-size: 1.1rem;
  padding: 28px;
}

html.large-font .ai-guide-answer {
  padding: 28px;
  padding-right: 64px;
}

html.large-font .speak-btn {
  width: 48px;
  height: 48px;
}

html.large-font .speak-btn svg {
  width: 22px;
  height: 22px;
}

/* 卡片与区块间距增加 */
html.large-font .ai-guide-section,
html.large-font .ai-guide-hero {
  padding: 70px 0;
}

/* 增强对比度 */
html.large-font {
  color: #0a1a2e;
}

html.large-font .ink-muted,
html.large-font .text-muted {
  color: #2b4b6d !important;
}

html.large-font .btn-primary {
  font-weight: 600;
}

html.large-font a {
  text-decoration-thickness: 2px;
}

html.large-font .nav-link.active {
  font-weight: 600;
}

/* 焦点可见性增强（适老化） */
html.large-font a:focus-visible,
html.large-font button:focus-visible,
html.large-font input:focus-visible,
html.large-font select:focus-visible,
html.large-font textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* 大字模式按钮在导航中的间距 */
html.large-font .nav-user {
  gap: 14px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  html.large-font {
    font-size: 17px;
  }

  html.large-font .ai-guide-hero-title {
    font-size: 2.2rem;
  }

  html.large-font .ai-guide-card {
    padding: 24px;
  }

  html.large-font .nav-link {
    font-size: 1rem;
    padding: 10px 12px;
  }

  html.large-font .large-font-toggle .lf-text {
    display: none;
  }
}
