/* 应阅读 · 阅灵统一皮肤（色谱与交互规范对齐 yueling-unified.css / triad-bg-stack.css） */

:root {
  --yueling-blue-light: #8EB8F0;
  --yueling-blue-pale: #D8E6F8;
  --yueling-pink-light: #FFD4DC;
  --yueling-white: #F5F5F7;
  --yueling-blue-soft: rgba(74, 144, 226, .12);
  --yueling-pink-soft: rgba(255, 182, 193, .14);
  --yueling-gradient: linear-gradient(
    165deg,
    #4A90E2 0%,
    #7EB0EA 16%,
    #D8E6F8 34%,
    #F5F5F7 50%,
    #FFF5F7 68%,
    #FFD4DC 84%,
    #FFB6C1 100%
  );
  --yueling-gradient-soft: linear-gradient(
    135deg,
    rgba(74, 144, 226, .1) 0%,
    rgba(255, 255, 255, .92) 42%,
    rgba(255, 182, 193, .12) 100%
  );
  --yueling-chat-bg:
    radial-gradient(ellipse 76% 64% at 50% 14%, #FFFFFF 0%, rgba(255, 255, 255, .94) 30%, rgba(255, 252, 253, .62) 50%, transparent 72%),
    radial-gradient(ellipse 118% 92% at 50% 108%, rgba(255, 228, 236, .24) 0%, rgba(248, 242, 246, .1) 38%, transparent 66%),
    linear-gradient(180deg, #FAFBFE 0%, #FCFAFB 44%, #F6F3F7 100%);
  --yueling-toolbar-bg: linear-gradient(180deg, rgba(255, 255, 255, .9) 0%, rgba(240, 246, 253, .84) 100%);
  --triad-paper-texture: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
  --bg: transparent;
  --surface: rgba(255, 255, 255, .72);
  --surface-strong: rgba(255, 255, 255, .88);
  --border: rgba(74, 144, 226, .08);
  --shadow: 0 8px 32px rgba(74, 144, 226, .08);
  --shadow-subtle: 0 2px 12px rgba(74, 144, 226, .05);
  --shadow-float: 0 12px 40px rgba(74, 144, 226, .12);
  --glass-bg: rgba(255, 255, 255, .78);
  --glass-card-bg: rgba(255, 255, 255, 0.52);
  --glass-card-border: rgba(255, 255, 255, 0.72);
  --glass-blur-radius: 18px;
  --glass-card-shadow: 0 8px 28px rgba(100, 116, 139, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --pill-bg: rgba(232, 241, 251, .85);
}

html.is-desktop,
html.is-desktop body,
.device-shell--desktop {
  background: linear-gradient(165deg, #7EB0EA 0%, #D8E6F8 35%, #F5F5F7 55%, #FFD4DC 100%);
  overflow: visible;
}

/* ── 主区域：阅灵书册同款全幅蓝白粉渐变 + 纸纹 ── */
.phone-screen {
  background: var(--yueling-gradient) !important;
}

.phone-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--triad-paper-texture);
  background-size: cover;
  opacity: .45;
}

.phone-screen #app {
  position: relative;
  z-index: 1;
  background: transparent !important;
}

#app {
  background: transparent !important;
}

#app::before {
  opacity: 0.35;
  background:
    radial-gradient(90% 70% at 8% 8%, rgba(74, 144, 226, .22) 0%, transparent 55%),
    radial-gradient(85% 65% at 95% 12%, rgba(255, 182, 193, .18) 0%, transparent 52%),
    radial-gradient(80% 60% at 50% 100%, rgba(216, 230, 248, .25) 0%, transparent 58%);
}

.app-main,
.view:not(#view-reader),
.view-stack:not(.meet-chat-view),
.meet-list-view,
.meet-contacts-view,
.home-dashboard,
.profile-view {
  background: transparent !important;
}

/* ── 底栏导航 ── */
.app-nav {
  background: var(--yueling-toolbar-bg);
  border-top: 1px solid rgba(74, 144, 226, .1);
  box-shadow: 0 -4px 24px rgba(74, 144, 226, .06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-btn.active {
  color: var(--yueling-blue);
}

.nav-btn.active svg {
  color: var(--yueling-blue);
  opacity: 1;
}

/* ── 顶栏 / 首页 ── */
.app-header {
  background: var(--yueling-toolbar-bg) !important;
  border-color: rgba(74, 144, 226, .1) !important;
}

#view-reader {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#view-reader.reader-theme-sepia {
  background: rgba(244, 236, 216, 0.28) !important;
}

#view-reader.reader-theme-dark {
  background: rgba(28, 28, 30, 0.52) !important;
}

#view-reader .reader-chrome-top {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: 1px solid rgba(74, 144, 226, 0.1) !important;
  box-shadow: none !important;
}

#view-reader.reader-theme-dark .reader-chrome-top {
  background: transparent !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: none;
}

#view-reader.reader-theme-sepia .reader-chrome-top {
  border-bottom-color: rgba(120, 100, 60, 0.12) !important;
}

#view-article-intro.view.active {
  background: transparent !important;
}

.sub-topbar,
.meet-list-nav,
.meet-sub-nav,
.chat-header {
  background: transparent !important;
  border-bottom: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
}

.home-topbar {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.goal-switcher,
.goal-switcher--status {
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(74, 144, 226, .1);
  box-shadow: var(--shadow-subtle);
}

.goal-switcher-level {
  background: var(--yueling-blue-soft);
  color: var(--accent-dark);
}

.rec-card,
.goal-card,
.path-card,
.archive-card,
.profile-stat-card {
  background: var(--glass-bg);
  border: 1px solid rgba(74, 144, 226, .08);
  box-shadow: var(--shadow-subtle);
}

.rec-card.featured {
  background: var(--yueling-gradient-soft);
  border-color: rgba(74, 144, 226, .12);
}

/* ── 按钮 ── */
.btn-primary {
  background: linear-gradient(135deg, #4A90E2 0%, #6BA3E8 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(74, 144, 226, .28);
}

.btn-primary:active {
  filter: brightness(1.04);
}

.btn-secondary,
.btn-ghost {
  background: rgba(255, 255, 255, .72);
  border-color: rgba(74, 144, 226, .12);
}

.chip,
.filter-chip.active {
  background: linear-gradient(135deg, #4A90E2 0%, #6BA3E8 100%);
  border-color: transparent;
  color: #fff;
}

/* ── 弹窗 / 抽屉 / 浮层 ── */
#ai-overlay.overlay {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#ai-overlay .sheet {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px) saturate(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
}

#ai-overlay .sheet-scroll,
#ai-overlay .sheet-hiai,
#ai-overlay .sheet-body {
  background: #fff;
}

#sel-overlay,
#ai-explain-overlay,
.overlay:not(#ai-overlay) {
  background: rgba(232, 241, 251, .55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.sheet-panel,
.selection-dock,
.reader-bottom-sheet .sheet,
.goal-picker-sheet {
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(74, 144, 226, .1);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.sheet-dict-tab.active,
.sheet-phrase-tab.active {
  background: linear-gradient(135deg, #4A90E2 0%, #6BA3E8 100%);
  border-color: transparent;
  color: #fff;
}

.toast {
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(74, 144, 226, .12);
  color: var(--text);
  box-shadow: var(--shadow-float);
}

/* ── 对话列表 / 通讯录 ── */
.meet-list-view,
.meet-contacts-view {
  background: transparent;
}

.meet-list-nav,
.meet-sub-nav {
  background: transparent !important;
  border-bottom: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
}

.meet-search-wrap {
  background: rgba(255, 255, 255, .82);
  border-color: rgba(74, 144, 226, .1);
}

.meet-search-input:focus {
  outline: none;
}

.meet-session-list {
  background: transparent;
  border: none;
}

.meet-session-item {
  margin: 0 0 8px;
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(74, 144, 226, .08);
  background: rgba(255, 255, 255, .72);
  box-shadow: var(--shadow-subtle);
}

.meet-session-item:active {
  background: rgba(232, 241, 251, .9);
}

.meet-session-meta {
  background: linear-gradient(135deg, #4A90E2 0%, #6BA3E8 100%);
  color: #fff;
}

.meet-contacts-tab {
  flex: 1;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(74, 144, 226, .1);
  background: rgba(255, 255, 255, .72);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.meet-contacts-tab.active {
  background: linear-gradient(135deg, #4A90E2 0%, #6BA3E8 100%);
  border-color: transparent;
  color: #fff;
}

.meet-contacts-book-list,
.meet-contacts-char-list {
  border-color: rgba(74, 144, 226, .08);
  background: rgba(255, 255, 255, .82);
}

.meet-contacts-group {
  margin-bottom: 16px;
}

.meet-contact-row {
  border-radius: 14px;
  border: 1px solid rgba(74, 144, 226, .06);
  background: rgba(255, 255, 255, .62);
  margin-bottom: 6px;
}

.meet-contacts-btn {
  color: var(--yueling-blue);
}

/* ── 对话窗口（对齐阅灵 realm-chat） ── */
.meet-chat-view {
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(255, 255, 255, .55) 0%, transparent 62%),
    transparent !important;
}

.chat-header {
  background: transparent !important;
}

.chat-header-icon,
.chat-segment-more {
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(74, 144, 226, .08);
  color: var(--text);
}

.chat-header-title {
  color: #1D1D1F;
}

.chat-header-sub {
  color: #86868B;
}

.chat-segment-control {
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(74, 144, 226, .08);
  box-shadow: var(--shadow-subtle);
}

.chat-segment-btn.active {
  background: linear-gradient(135deg, #4A90E2 0%, #6BA3E8 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(74, 144, 226, .24);
}

.chat-feed {
  gap: 14px;
}

.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
  max-width: 100%;
}

.chat-row--user {
  justify-content: flex-end;
  flex-direction: row;
}

.chat-row--peer {
  justify-content: flex-start;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  overflow: hidden;
}

.chat-avatar--user {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #FFB6C1 0%, #4A90E2 100%);
  box-shadow: 0 2px 10px rgba(74, 144, 226, .16);
}

.chat-avatar--user span {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.chat-avatar--user.chat-avatar--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-avatar--char {
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 2px 8px rgba(74, 144, 226, .08);
}

.chat-avatar--char.meet-avatar {
  width: 36px !important;
  height: 36px !important;
}

.chat-bubble {
  max-width: min(78%, 320px);
  padding: 11px 15px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.68;
  white-space: pre-wrap;
  word-break: break-word;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.chat-bubble--user {
  background: rgba(74, 144, 226, .1);
  border: 1px solid rgba(74, 144, 226, .12);
  color: #1D1D1F;
  border-bottom-right-radius: 6px;
}

.chat-bubble--peer {
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .68);
  color: #1D1D1F;
  border-bottom-left-radius: 6px;
  box-shadow: 0 2px 14px rgba(255, 182, 193, .06), 0 1px 4px rgba(74, 144, 226, .04);
}

.chat-bubble--lead {
  font-weight: 600;
}

.chat-bubble--typing {
  font-style: italic;
  opacity: .8;
}

.chat-bubble--en {
  font-family: "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.01em;
}

.ari-chat-mode-switch--inline {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: 6px;
  justify-content: center;
}

.ari-chat-mode-switch--inline .ari-chat-mode-btn {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  flex: 0 1 auto;
}

.ari-chat-mode-switch {
  flex-shrink: 0;
  display: flex;
  gap: 6px;
  margin: 0 var(--page-x) 10px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.ari-chat-mode-btn {
  flex: 1;
  min-height: 34px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #86868b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.ari-chat-mode-btn.active {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #2563eb;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.08);
}

.ari-en-panel {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 0 10px;
}

.ari-en-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
}

.ari-en-panel-label {
  font-size: 12px;
  font-weight: 700;
  color: #374151;
}

.ari-en-panel-hint {
  font-size: 11px;
  color: #86868b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ari-en-scenario-scroll,
.ari-en-starter-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.ari-en-scenario-scroll::-webkit-scrollbar,
.ari-en-starter-scroll::-webkit-scrollbar {
  display: none;
}

.ari-en-scenario-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(74, 144, 226, 0.14);
  background: rgba(255, 255, 255, 0.72);
  color: #1d1d1f;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.14s ease;
}

.ari-en-scenario-chip.active {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(74, 144, 226, 0.12);
  color: #2563eb;
}

.ari-en-scenario-icon {
  font-size: 14px;
  line-height: 1;
}

.ari-en-starter-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ari-en-starter-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: #86868b;
}

.ari-en-starter-chip {
  flex-shrink: 0;
  max-width: 240px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px dashed rgba(74, 144, 226, 0.22);
  background: rgba(255, 255, 255, 0.55);
  color: #4b5563;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meet-chat-view--en .chat-bottom-dock {
  gap: 0;
}

.chat-suggest-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0 8px;
}

.chat-suggest-hint {
  font-size: 12px;
  color: #86868B;
  text-align: center;
  margin: 0;
}

.chat-suggest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.chat-quick-chip {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(74, 144, 226, .14);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(10px);
  font-family: var(--font);
  font-size: 11px;
  color: #86868B;
  cursor: pointer;
  transition: all .18s ease;
}

.chat-quick-chip:active {
  border-color: rgba(74, 144, 226, .28);
  color: var(--yueling-blue);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 2px 12px rgba(74, 144, 226, .08);
}

.meet-chat-view .chat-bottom-dock,
.meet-chat-view .chat-compose-foot {
  background: transparent;
}

#ai-overlay .sheet-hiai-input-row.chat-compose-foot {
  background: #fff;
}

#ai-overlay .sheet-hiai-input-row .chat-compose-bar {
  background: rgba(255, 255, 255, .92);
  border-color: rgba(74, 144, 226, .12);
  box-shadow: var(--shadow-float);
}

.meet-chat-view .chat-compose-bar {
  background: rgba(255, 255, 255, .92);
  border-color: rgba(74, 144, 226, .12);
  box-shadow: var(--shadow-float);
}
.reader-chrome,
.reader-settings-sheet,
.report-card {
  border-color: rgba(74, 144, 226, .08);
}

.reader-icon-btn.active {
  background: var(--yueling-blue-soft);
  color: var(--accent-dark);
}

.shelf-tab.active,
.filter-pill.active {
  background: linear-gradient(135deg, #4A90E2 0%, #6BA3E8 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(74, 144, 226, .22);
}

.onboard-card,
.path-card,
.path-article-item {
  background: var(--glass-bg);
  border: 1px solid rgba(74, 144, 226, .08);
  box-shadow: var(--shadow-subtle);
}

/* 书架网格：仅封面+标题，不要卡片底 */
.shelf-item {
  background: transparent;
  border: none;
  box-shadow: none;
}

.path-detail-hero {
  background: var(--yueling-gradient-soft);
  border: 1px solid rgba(74, 144, 226, .1);
}

.profile-hero,
.profile-quick-item {
  border-color: rgba(74, 144, 226, .08);
}

/* ── 我的：毛玻璃卡片（对齐 APE 空间站 frost 风格）── */
#view-profile .profile-card,
#view-profile .menu-list,
#view-profile .data-box,
#view-profile .settings-group,
#view-profile .about-card {
  background: var(--glass-card-bg);
  backdrop-filter: blur(var(--glass-blur-radius)) saturate(1.08);
  -webkit-backdrop-filter: blur(var(--glass-blur-radius)) saturate(1.08);
  border: 1px solid var(--glass-card-border);
  box-shadow: var(--glass-card-shadow);
}

#view-profile .profile-toolbar-btn {
  background: var(--glass-card-bg);
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  border: 1px solid var(--glass-card-border);
  box-shadow: var(--shadow-subtle);
  color: rgba(30, 41, 59, 0.72);
}

#view-profile .profile-toolbar-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

#view-profile .profile-member-banner {
  background: rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(var(--glass-blur-radius)) saturate(1.1);
  -webkit-backdrop-filter: blur(var(--glass-blur-radius)) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--glass-card-shadow);
  color: #1e293b;
}

#view-profile .profile-member-icon {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: #5b8fc9;
}

#view-profile .profile-member-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

#view-profile .profile-member-sub {
  color: rgba(30, 41, 59, 0.58);
}

#view-profile .profile-member-arrow {
  color: rgba(30, 41, 59, 0.36);
}

#view-profile .profile-quick-icon {
  background: rgba(255, 255, 255, 0.48);
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 4px 16px rgba(100, 116, 139, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

#view-profile .profile-quick-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

#view-profile .profile-quick-icon--wordbook { color: #5b8fc9; }
#view-profile .profile-quick-icon--archive { color: #5aab80; }
#view-profile .profile-quick-icon--report { color: #c9924a; }
#view-profile .profile-quick-icon--meet { color: #4aabb0; }
#view-profile .profile-quick-item--wide {
  background: var(--glass-card-bg);
  backdrop-filter: blur(var(--glass-blur-radius)) saturate(1.08);
  -webkit-backdrop-filter: blur(var(--glass-blur-radius)) saturate(1.08);
  border: 1px solid var(--glass-card-border);
  box-shadow: var(--glass-card-shadow);
}
#view-profile .profile-quick-icon--practice { color: #c97a8e; }

#view-profile .menu-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.65);
  color: rgba(30, 41, 59, 0.62);
  flex-shrink: 0;
}

#view-profile .menu-item-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

#view-profile .menu-item:active {
  background: rgba(255, 255, 255, 0.28);
}

#view-profile .intro-action-btn {
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
}

/* —— 阅读讲解入口 · 双图标左右对齐 —— */
.reader-narrate-entry {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin: 0 var(--page-x) 12px;
  padding: 0;
  gap: 0;
  width: auto;
  box-sizing: border-box;
}

.reader-narrate-action {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 2px 4px;
  border: none;
  background: transparent;
  color: #86868b;
  cursor: pointer;
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, transform 0.12s ease;
}

.reader-narrate-action:active {
  transform: scale(0.96);
}

.reader-narrate-action svg {
  width: 28px;
  height: 28px;
  display: block;
}

.reader-narrate-action.is-rec {
  color: #2563eb;
}

.reader-narrate-action-label {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

/* legacy entry btn — 已废弃 */
.reader-narrate-entry-btn,
.reader-narrate-entry-icon,
.reader-narrate-entry-text {
  display: none;
}

.reader-narrate-view.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  padding-bottom: 0;
  background: linear-gradient(165deg, #dceeff 0%, #eef4ff 42%, #fde8f0 100%);
}

.reader-narrate-board--top {
  order: 1;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

/* 板书底边内收：padding 缩小内容区，教室卡片底边才会真正上移 */
.reader-narrate-view .reader-narrate-board.reader-narrate-board--top {
  margin-bottom: 0;
  padding: 0 var(--page-x) 40px;
  box-sizing: border-box;
}

.reader-narrate-view .reader-narrate-board.reader-narrate-board--top .reader-narrate-classroom,
.reader-narrate-view .reader-narrate-board.reader-narrate-board--top .reader-narrate-blackboard {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: 100%;
}

.reader-narrate-bottom-dock {
  order: 2;
  flex-shrink: 0;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: max(27px, calc(env(safe-area-inset-bottom, 0px) + 15px));
  transform: translateY(-7px);
}

.reader-narrate-stage--bottom {
  order: 1;
  flex-shrink: 0;
  padding-top: 0;
  padding-bottom: 2px;
}

.reader-narrate-footer {
  order: 2;
  flex-shrink: 0;
}

/* 教室 · 毛玻璃板书区（固定比例，无内部滚动） */
.reader-narrate-classroom,
.reader-narrate-blackboard {
  position: relative;
  height: 100%;
  padding: 10px 12px 12px;
  border-radius: 18px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0.38) 100%);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 10px 28px rgba(74, 144, 226, 0.1);
  overflow: hidden;
}

.reader-narrate-classroom-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.reader-narrate-classroom-tag {
  position: absolute;
  top: 10px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(37, 99, 235, 0.72);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(74, 144, 226, 0.12);
}

.reader-narrate-board-play {
  display: none;
}

.reader-narrate-classroom-light {
  position: absolute;
  top: -20px;
  left: 50%;
  width: 120px;
  height: 60px;
  margin-left: -60px;
  background: radial-gradient(ellipse at center, rgba(255, 248, 220, 0.45) 0%, transparent 70%);
}

.reader-narrate-blackboard-tray {
  display: none;
}

.reader-narrate-blackboard .reader-narrate-card,
.reader-narrate-classroom .reader-narrate-card {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  margin: 0;
  padding: 30px 14px 14px;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.reader-narrate-card-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  padding-top: 16px;
}

.reader-narrate-card-body-inner {
  flex: 0 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
}

/* 教室板书 · 统一块间距（8px），避免 margin 叠加 + 垂直居中撑空 */
.reader-narrate-classroom .reader-narrate-board-head,
.reader-narrate-blackboard .reader-narrate-board-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reader-narrate-classroom .reader-narrate-board-head .reader-narrate-h1,
.reader-narrate-classroom .reader-narrate-board-head .reader-narrate-h1-cn,
.reader-narrate-blackboard .reader-narrate-board-head .reader-narrate-h1,
.reader-narrate-blackboard .reader-narrate-board-head .reader-narrate-h1-cn,
.reader-narrate-classroom .reader-narrate-card-body-inner > *,
.reader-narrate-blackboard .reader-narrate-card-body-inner > * {
  margin: 0;
}

.reader-narrate-classroom .reader-narrate-body-lines,
.reader-narrate-blackboard .reader-narrate-body-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reader-narrate-classroom .reader-narrate-body-lines > *,
.reader-narrate-blackboard .reader-narrate-body-lines > * {
  margin: 0;
}

.reader-narrate-classroom .reader-narrate-h2 + .reader-narrate-h2-cn,
.reader-narrate-blackboard .reader-narrate-h2 + .reader-narrate-h2-cn {
  margin-top: -4px;
}

.reader-narrate-classroom .reader-narrate-pair,
.reader-narrate-blackboard .reader-narrate-pair {
  margin-bottom: 0;
  padding: 6px 10px;
}

.reader-narrate-classroom .reader-narrate-list,
.reader-narrate-blackboard .reader-narrate-list {
  margin: 0;
}

.reader-narrate-classroom .reader-narrate-list li,
.reader-narrate-blackboard .reader-narrate-list li {
  margin-bottom: 4px;
}

.reader-narrate-classroom .reader-narrate-list li:last-child,
.reader-narrate-blackboard .reader-narrate-list li:last-child {
  margin-bottom: 0;
}

.reader-narrate-card-body.is-beat-swap {
  animation: narrateBeatSwap 0.22s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

@keyframes narrateBeatSwap {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.reader-narrate-blackboard .reader-narrate-card-title,
.reader-narrate-classroom .reader-narrate-card-title,
.reader-narrate-blackboard .reader-narrate-h1,
.reader-narrate-classroom .reader-narrate-h1,
.reader-narrate-blackboard .reader-narrate-h2,
.reader-narrate-classroom .reader-narrate-h2,
.reader-narrate-blackboard .reader-narrate-p,
.reader-narrate-classroom .reader-narrate-p,
.reader-narrate-blackboard .reader-narrate-note,
.reader-narrate-classroom .reader-narrate-note,
.reader-narrate-blackboard .reader-narrate-list,
.reader-narrate-classroom .reader-narrate-list,
.reader-narrate-blackboard .reader-narrate-quote,
.reader-narrate-classroom .reader-narrate-quote {
  color: #1d1d1f;
}

.reader-narrate-blackboard .reader-narrate-h1-cn,
.reader-narrate-classroom .reader-narrate-h1-cn,
.reader-narrate-blackboard .reader-narrate-h2-cn,
.reader-narrate-classroom .reader-narrate-h2-cn,
.reader-narrate-blackboard .reader-narrate-cn,
.reader-narrate-classroom .reader-narrate-cn,
.reader-narrate-blackboard .reader-narrate-quote-cn,
.reader-narrate-classroom .reader-narrate-quote-cn {
  color: #5c6678;
}

.reader-narrate-blackboard .reader-narrate-en,
.reader-narrate-classroom .reader-narrate-en {
  color: #2563eb;
}

.reader-narrate-blackboard .reader-narrate-pair,
.reader-narrate-classroom .reader-narrate-pair {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(74, 144, 226, 0.14);
}

.reader-narrate-blackboard .reader-narrate-card-index,
.reader-narrate-classroom .reader-narrate-card-index,
.reader-narrate-blackboard .reader-narrate-card-kicker,
.reader-narrate-classroom .reader-narrate-card-kicker {
  color: #2563eb;
}

.reader-narrate-caption {
  display: none;
}

.reader-narrate-subtitle {
  display: none !important;
}

/* 阅读页 · 带读/解读胶囊入口（与 reader-scroll 正文同宽对齐，不再叠加 inset） */
.reader-narrate-capsule-wrap {
  margin: 0 0 10px;
}

.reader-narrate-capsule-wrap--post {
  margin-top: 16px;
}

.reader-narrate-capsule {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 16px rgba(74, 144, 226, 0.08);
  cursor: pointer;
  font-family: var(--font);
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.reader-narrate-capsule:active {
  transform: scale(0.99);
}

.reader-narrate-capsule svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: #2563eb;
}

.reader-narrate-capsule-label {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #1d1d1f;
}

.reader-narrate-capsule-hint {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: #86868b;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reader-narrate-capsule--brief svg {
  color: #e8a317;
}

.reader-narrate-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 6px 1px 4px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: #7c3aed;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.14), rgba(37, 99, 235, 0.12));
  border: 1px solid rgba(124, 58, 237, 0.22);
  box-shadow: 0 1px 4px rgba(124, 58, 237, 0.12);
}

.reader-narrate-ai-badge-icon {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

.reader-post-read-dock-brief {
  margin-bottom: 4px;
}

.reader-narrate-entry--pre,
.reader-narrate-entry--post {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin: 12px 0 0;
}

.reader-narrate-entry--post {
  margin-top: 20px;
  margin-bottom: 8px;
}

.reader-narrate-entry-hint {
  margin: 0;
  font-size: 12px;
  color: #86868b;
  text-align: center;
}

.reader-narrate-entry--pre .reader-narrate-action,
.reader-narrate-entry--post .reader-narrate-action {
  width: 100%;
  justify-content: center;
}

.reader-narrate-finish {
  opacity: 0;
  animation: narrateFinishIn 0.18s ease forwards;
}

@keyframes narrateFinishIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.reader-narrate-header {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 8px;
  padding: 8px var(--page-x) 10px;
}

.reader-narrate-header .top-back {
  width: auto;
  min-width: 0;
  height: 40px;
  padding: 0;
  margin: 0;
  justify-content: flex-start;
}

.reader-narrate-header .icon-chevron-left {
  width: 20px;
  height: 20px;
}

.reader-narrate-header-text {
  flex: 1;
  min-width: 0;
}

.reader-narrate-header-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: #1d1d1f;
}

.reader-narrate-header-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: calc(16px * 1.35);
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #2563eb;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.reader-narrate-header-play:active {
  opacity: 0.72;
}

.reader-narrate-header-play .reader-narrate-play-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.reader-narrate-header-sub {
  display: none;
}

.reader-narrate-stage {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 2px 0 6px;
  min-height: auto;
}

.reader-narrate-tutor-stage {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-height: 96px;
  margin: 0 auto;
}

.reader-narrate-avatar-wrap {
  display: none;
}

.reader-narrate-board {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 var(--page-x) 6px;
  overflow: hidden;
}

.reader-narrate-board.reader-narrate-board--top {
  flex: 1 1 auto;
  max-height: none;
  padding-bottom: 40px;
  box-sizing: border-box;
}

.reader-narrate-card {
  flex: 1;
  min-height: 0;
  max-height: 100%;
  padding: 0;
  border-radius: 16px;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: hidden;
}

.reader-narrate-caption {
  width: 100%;
  max-width: none;
  font-size: 14px;
  line-height: 1.65;
  color: #374151;
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.reader-narrate-steps {
  display: none;
}

.reader-narrate-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}

.reader-narrate-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(74, 144, 226, 0.22);
  cursor: pointer;
}

.reader-narrate-dot.is-active {
  width: 18px;
  border-radius: 999px;
  background: #4a90e2;
}

.reader-narrate-dot.is-done {
  background: rgba(74, 144, 226, 0.55);
}

.reader-narrate-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.reader-narrate-card-index {
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
}

.reader-narrate-card-kicker {
  font-size: 11px;
  font-weight: 600;
  color: #86868b;
  letter-spacing: 0;
  text-transform: none;
}

.reader-narrate-step {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(74, 144, 226, 0.14);
  background: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  color: #6b7280;
  cursor: pointer;
}

.reader-narrate-step.active {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(74, 144, 226, 0.12);
  color: #2563eb;
  font-weight: 600;
}

.reader-narrate-step.done .reader-narrate-step-dot {
  background: #4a90e2;
}

.reader-narrate-step-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
}

.reader-narrate-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0;
  line-height: 1.35;
}

.reader-narrate-classroom .reader-narrate-card-title,
.reader-narrate-blackboard .reader-narrate-card-title {
  font-size: 15px;
  margin: 0;
}

.reader-narrate-quote {
  margin: 0 0 6px;
  padding: 0;
  border: none;
  font-size: 14px;
  line-height: 1.6;
  font-style: italic;
  color: #1e3a5f;
}

.reader-narrate-quote-cn {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.55;
  color: #6b7280;
}

.reader-narrate-classroom .reader-narrate-card-body,
.reader-narrate-blackboard .reader-narrate-card-body {
  font-size: 13px;
  line-height: 1.45;
  color: #4b5563;
  white-space: pre-wrap;
}

.reader-narrate-footer {
  flex-shrink: 0;
  padding: 4px var(--page-x) 0;
}

.reader-narrate-progress {
  height: 4px;
  border-radius: 999px;
  background: rgba(74, 144, 226, 0.12);
  margin-bottom: 10px;
  overflow: hidden;
}

.reader-narrate-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4a90e2, #7eb8f0);
  transition: width 0.35s ease;
}

.reader-narrate-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.reader-narrate-control {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: #2563eb;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(74, 144, 226, 0.18);
}

.reader-narrate-progress-text {
  font-size: 12px;
  color: #86868b;
  flex: 1;
}

.reader-narrate-finish {
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  background: #4a90e2;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.app-main--stack .reader-narrate-view {
  height: 100%;
  max-height: 100%;
  min-height: 0;
}