/* ============================================
   panels.css —— 面板【结构层】（零颜色，index 与 island 共享）
   ============================================

   只为这两块面板服务：
     · #parentOverlay  个人中心（含 VIP 卡 / 账号 / 语言 / 语音 / 绑定）
     · #quests         每日记录（日历 / 积分 / 本月书单）
     · .quests-backdrop 每日记录的遮罩

   【为什么拆三层】
   这两块面板要同时服务两个入口：index.html（经典版，深色）和 island.html（3D 岛，浅色毛玻璃）。
   过去配色散落在 core.css + index.html 的 inline 里，岛上只能靠 JS 去"洗" inline —— 那是补丁。
   现在按职责切成三层，物理分离、可整文件删除：

     css/panels.css          ← 本文件：结构（布局/尺寸/层级/圆角/动效），两端共享
     css/panels-dark.css     ← 深色配色，只有 index 加载
     css/island/panels-light.css ← 浅色配色，只有 island 加载

   约定（务必遵守，否则层与层会互相打架）：
     1) 本文件【不写任何颜色】：color / background* / border-color / box-shadow /
        backdrop-filter / fill / stroke / opacity(用于配色时) 一律不放，
        颜色只出现在两个配色层里。
     2) 拆分时逐属性对照原 core.css 与 index.html 的 inline，保证 index 侧
        "结构层 + 深色层" 的最终计算值与原状完全一致（视觉零变化）。
     3) 面板内部组件的命名：个人中心 .parent-*、每日 .dp-*、VIP 卡 .vip-*、绑定行 .bind-*。
        通用的间距/字号/字重/显示仍复用 utilities.css 的原子类（.mb-20 / .text-13 / .flex-between …）。
   ============================================ */


/* ================= 1. 个人中心 #parentOverlay ================= */

#parentOverlay {
  position: fixed; left: 0; right: 0; bottom: 0; top: 60px; z-index: 220;
  border-radius: 20px 20px 0 0;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.34, 1.15, 0.64, 1);
  display: block !important;
  overflow-y: auto;
}
#parentOverlay.open { transform: translateY(0); }

.parent-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 12px;
  position: sticky; top: 0; z-index: 10;
}
.parent-title { font-size: 20px; font-weight: 800; }
.parent-close-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: none;
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ---- 个人中心内部组件（自 index.html 的 inline 抽出） ---- */

/* 内容区外壳：原 <div style="padding:0 20px 40px;"> */
.parent-body { padding: 0 20px 40px; }

/* VIP 卡挂载点：原 #vipCard 的 inline */
.parent-vip-card { margin-bottom: 20px; border-radius: 20px; overflow: hidden; }

/* 账号行 / 密码行 */
.parent-acc-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.parent-acct-id { font-size: 22px; font-weight: 900; letter-spacing: 2px; }
.parent-pwd { font-size: 18px; letter-spacing: 2px; }

/* 小胶囊按钮（Copy / Show） */
.parent-mini-btn {
  border: none; border-radius: 8px; padding: 4px 10px;
  font-size: 12px; cursor: pointer;
  font-family: inherit;
}

/* 虚线分隔的两段式区块 */
.parent-divider { margin-top: 14px; padding-top: 14px; }
.parent-divider-lg { margin-top: 24px; padding-top: 20px; }

/* 紫色文字链（修改密码） */
.parent-link {
  font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 4px;
}

/* 修改密码折叠区：默认收起，.show 展开（原 inline display:none 由 JS 切换） */
.parent-pwd-box { display: none; margin-top: 12px; }
.parent-pwd-box.show { display: block; }

/* 行内错误提示：默认隐藏，.show 展开 */
.parent-err { font-size: 12px; margin-bottom: 8px; display: none; }
.parent-err.show { display: block; }

/* 卡片内小节标题（语言 / 语音 / 登录方式 / 成长报告） */
.parent-sec-label {
  font-size: 13px; display: flex; align-items: center; gap: 6px;
}
.parent-sec-label.mb { margin-bottom: 14px; }
/* 同级但更大更粗的标题（好友申请，当前 hidden） */
.parent-sec-title {
  font-size: 15px; font-weight: 700; margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
}

/* 表单字段 */
.parent-field { margin-bottom: 14px; }
.parent-field-label { font-size: 12px; margin-bottom: 6px; }
.parent-select {
  width: 100%; padding: 8px 12px; border-radius: 10px;
  border: 1px solid;
  font-size: 14px; font-weight: 600; cursor: pointer; outline: none;
  font-family: inherit;
}

/* 外语练习开关组 */
.parent-switches { padding-top: 4px; }
.parent-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.parent-toggle-row.last { margin-bottom: 4px; }
.parent-row-label { font-size: 15px; font-weight: 600; }
.parent-row-desc { font-size: 11px; margin-top: 2px; }

/* 开关（读/听/说 + 语音自动播放）：开=.on，由 JS 切 class，不再动 inline background */
.parent-switch {
  width: 64px; height: 32px; border-radius: 16px; border: none;
  cursor: pointer; position: relative; outline: none;
  transition: background 0.25s;
  flex: 0 0 auto;
}
.parent-knob {
  position: absolute; top: 4px; left: 4px;
  width: 24px; height: 24px; border-radius: 50%;
  transition: left 0.25s;
}
.parent-knob.on { left: 36px; }

/* 按钮族 */
.parent-btn-primary {
  padding: 12px 16px; border-radius: 12px; border: none;
  font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: inherit;
}
.parent-btn-sm {
  padding: 8px 16px; border-radius: 12px; border: none;
  font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: inherit;
}
.parent-btn-ghost {
  width: 100%; padding: 14px; border-radius: 14px;
  border: 1px solid;
  font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: inherit;
}
.parent-btn-danger {
  width: 100%; padding: 14px; border-radius: 14px;
  border: 1px solid;
  font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-family: inherit;
}
.parent-btn-row { display: flex; gap: 8px; }

/* 说明文字 / 占位 / 加载中 */
.parent-desc { font-size: 12px; margin-top: 8px; line-height: 1.6; }
.parent-note { font-size: 13px; text-align: center; padding: 8px; }

/* 登录方式列表容器（原 #parentBindingsList 的 inline） */
.parent-bind-list { display: flex; flex-direction: column; gap: 10px; }


/* ================= 2. 每日记录 #quests ================= */

.quests-backdrop { display: none; position: fixed; inset: 0; z-index: 200; }
.quests-backdrop.open { display: block; }

#quests {
  position: fixed; left: 0; right: 0; bottom: 0;
  max-height: 88vh; z-index: 201;
  border-radius: 24px 24px 0 0;
  border-top: 1px solid;
  padding: 0 16px 100px;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.34, 1.2, 0.64, 1);
  display: block !important;
}
#quests.open { transform: translateY(0); }

.quest-overlay-handle { width: 40px; height: 4px; border-radius: 99px; margin: 12px auto 0; }
.quest-overlay-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0 16px;
  position: sticky; top: 0; z-index: 10;
}
.quest-overlay-title { font-size: 17px; font-weight: 800; }
.quest-close-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: none;
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}

/* ---- 每日记录内部组件（自 index.html / app-reading.js 的 inline 抽出） ---- */

.dp-cal-wrap { padding: 0 4px 8px; }
.dp-month-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.dp-nav-btn {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.dp-month-label { font-size: 15px; font-weight: 700; }

.dp-week-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-bottom: 4px; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }

/* 日历格子（由 _dpRenderCalendar 生成）：等级色交给配色层 */
.dp-cell {
  min-height: 44px; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 4px 2px 2px;
}
.dp-cell.is-future { opacity: 0.3; }
.dp-cell-num { font-size: 11px; line-height: 1.2; }
.dp-cell-icon { margin-top: 2px; font-size: 13px; line-height: 1; }
.dp-cell-blank { min-height: 44px; }

.dp-summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-radius: 12px; margin: 4px 4px 16px;
}
.dp-summary-label { font-size: 13px; }
.dp-total { font-size: 20px; font-weight: 800; }
.dp-hint { font-size: 11px; margin: -8px 4px 16px; line-height: 1.8; }
.dp-books-label {
  font-size: 12px; margin: 0 4px 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.dp-book-list { padding-bottom: 32px; }

/* 本月书单卡片（_dpRenderBookList 生成） */
.dp-book-card { border-radius: 14px; margin: 0 4px 10px; overflow: hidden; }
.dp-book-head { padding: 12px 14px; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.dp-book-title {
  font-size: 14px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dp-book-meta { font-size: 11px; margin-top: 2px; }
.dp-chevron { font-size: 18px; flex-shrink: 0; transition: transform 0.2s; }
.dp-chevron.open { transform: rotate(180deg); }
.dp-book-detail { display: none; padding: 12px 14px 16px; }
.dp-book-detail.show { display: block; }
.dp-ai-comment { border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 12px; line-height: 1.6; }
.dp-empty { text-align: center; padding: 24px 0; font-size: 13px; }
.dp-empty.sm { padding: 8px 0; font-size: 12px; }

/* 问答明细（_dpQAHtml 生成） */
.dp-qa-item { margin-bottom: 10px; }
.dp-qa-q { font-size: 12px; font-weight: 700; line-height: 1.5; }
.dp-qa-a { font-size: 12px; margin-top: 3px; padding-left: 12px; line-height: 1.5; }


/* ================= 3. VIP 卡片（_loadVipCard / _renderVipCards 生成） ================= */

.vip-card { border-radius: 20px; padding: 20px; }
.vip-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.vip-card-title { font-size: 18px; font-weight: 900; display: flex; align-items: center; gap: 4px; }
.vip-days { font-size: 13px; font-weight: 700; }
.vip-upgrade-title {
  font-size: 17px; font-weight: 900; margin-bottom: 4px;
  display: flex; align-items: center; gap: 4px;
}
.vip-upgrade-sub { font-size: 12px; margin-bottom: 16px; }
.vip-input-row { display: flex; gap: 8px; margin-bottom: 16px; }
.vip-input-row.tight { margin-bottom: 8px; }
.vip-icon-btn {
  padding: 10px 12px; border-radius: 12px; border: none;
  font-size: 14px; cursor: pointer;
  display: flex; align-items: center;
  font-family: inherit;
}
.vip-cta-btn {
  padding: 10px 14px; border-radius: 12px; border: none;
  font-size: 13px; font-weight: 800; cursor: pointer;
  font-family: inherit;
}
.vip-msg { font-size: 12px; display: none; }
.vip-msg.show { display: block; }
.vip-msg.mb { margin-bottom: 12px; }
.vip-msg.mt { margin-top: 6px; }
.vip-feat-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.vip-feat { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }

.vip-list { margin-top: 12px; }
.vip-list-title { font-size: 12px; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.vip-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 0;
  border-bottom: 1px solid;
}
.vip-row.is-expired { opacity: 0.45; }
.vip-code { font-size: 11px; font-family: monospace; }
.vip-type { font-size: 11px; margin-top: 2px; }
.vip-right { text-align: right; flex-shrink: 0; }
.vip-status { font-size: 12px; font-weight: 700; }


/* ================= 4. 账号绑定行（_renderBindings 生成） ================= */

.bind-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 12px;
  border: 1px solid;
}
.bind-left { display: flex; align-items: center; gap: 10px; }
.bind-icon { font-size: 20px; }
.bind-name { font-size: 14px; font-weight: 500; }
.bind-mark { font-size: 16px; }
.bind-btn {
  padding: 4px 10px; border-radius: 8px;
  border: 1px solid;
  font-size: 12px; cursor: pointer; font-weight: 600;
  font-family: inherit;
}
