/* ================= 亚历山大 · 双端原型样式 ================= */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Nunito", sans-serif;
}

body {
  font-family: var(--font);
  min-height: 100vh;
  background: linear-gradient(160deg, #FFF3E4 0%, #FFE9F2 45%, #EDF3FF 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
}

.hidden { display: none !important; }
.muted { color: var(--sub); font-size: 13px; }
.small { font-size: 12px; line-height: 1.6; }

/* ---------- 身份启动页 ---------- */
#launcher {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(165deg, #FFF6E9 0%, #FFEAF2 50%, #EEF4FF 100%);
  padding: 24px; text-align: center;
}
.logo-big { font-size: 64px; animation: floaty 3s ease-in-out infinite; }
.launcher-title { font-size: 34px; letter-spacing: 4px; margin-top: 6px; color: #4A3B55; }
.launcher-slogan { margin-top: 12px; font-size: 16px; color: #7A6B85; }
.launcher-sub { margin-top: 6px; font-size: 12.5px; color: #A99EB5; }
.choose-title { margin: 34px 0 14px; font-size: 15px; color: #8A7A96; }
.launcher-cards { display: flex; gap: 18px; }
.launch-card {
  width: 150px; padding: 22px 14px; border-radius: 26px; border: none; cursor: pointer;
  background: #fff; box-shadow: 0 10px 30px rgba(140,100,160,.14);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: transform .2s;
}
.launch-card:active { transform: scale(.96); }
.lc-emoji { font-size: 44px; }
.lc-name { font-size: 17px; font-weight: 700; color: #4A3B55; }
.lc-desc { font-size: 12px; color: #A99EB5; line-height: 1.5; }
.proto-note { margin-top: 40px; font-size: 12px; color: #B7ADC0; }

/* ---------- 手机容器 ---------- */
.phone {
  position: relative; width: min(400px, 100vw); height: min(860px, 100vh);
  overflow: hidden; background: linear-gradient(180deg, var(--bg1), var(--bg2));
  transition: background .3s;
}
@media (min-width: 520px) and (min-height: 900px) {
  .phone { border-radius: 42px; box-shadow: 0 34px 90px rgba(90,60,120,.28); height: min(844px, 92vh); }
}
.theme-kid { --bg1:#FFF7EC; --bg2:#FFEAF3; --card:#ffffff; --ink:#4A3B32; --sub:#A0908A; --accent:#FF8A5C; --accent2:#6FC3FF; --soft:#FFF0F5; }
.theme-parent { --bg1:#F4F7FF; --bg2:#EFF8F4; --card:#ffffff; --ink:#2E3A4E; --sub:#7C8AA0; --accent:#5B7CFA; --accent2:#38BFA3; --soft:#EEF3FF; }

/* ---------- 页面 ---------- */
.page {
  position: absolute; inset: 0; padding: 22px 18px 96px; overflow-y: auto;
  display: none; animation: pageIn .25s ease;
}
.page.active { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.page-title { font-size: 22px; margin-bottom: 4px; color: var(--ink); }
.page-sub { font-size: 13px; color: var(--sub); margin-bottom: 18px; }

/* ---------- 通用卡片 ---------- */
.card {
  background: var(--card); border-radius: 20px; padding: 16px;
  margin-bottom: 14px; box-shadow: 0 4px 16px rgba(120,90,140,.07);
  color: var(--ink);
}
.card-title { font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.card-sub { font-size: 13px; color: var(--sub); margin-bottom: 10px; line-height: 1.6; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.proto-card { text-align: center; color: var(--sub); font-size: 12px; }

.cta {
  border: none; cursor: pointer; background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-size: 14px; font-weight: 700; font-family: var(--font);
  padding: 11px 20px; border-radius: 999px; box-shadow: 0 6px 16px rgba(255,138,92,.35);
  transition: transform .15s;
}
.cta:active { transform: scale(.95); }
.cta.ghost { background: var(--soft); color: var(--accent); box-shadow: none; }
.cta.danger { background: #FDECEC; color: #C04040; box-shadow: none; }
.cta.big { width: 100%; padding: 14px; font-size: 15px; margin-top: 8px; }

/* ---------- Toast / 切换按钮 ---------- */
.toast {
  position: fixed; bottom: 88px; left: 50%; transform: translateX(-50%);
  background: rgba(60,50,60,.88); color: #fff; padding: 10px 20px; border-radius: 999px;
  font-size: 13.5px; z-index: 300; max-width: 86vw; text-align: center;
  animation: toastIn .25s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

#switcher {
  position: fixed; top: 14px; right: 14px; z-index: 200; border: none; cursor: pointer;
  background: rgba(255,255,255,.85); backdrop-filter: blur(8px);
  padding: 8px 14px; border-radius: 999px; font-size: 12.5px; font-family: var(--font);
  color: #6A5B76; box-shadow: 0 4px 14px rgba(120,90,140,.18);
}

/* ---------- 学生端首页 ---------- */
.s-head { display: flex; justify-content: flex-start; margin-bottom: 10px; }
.char-chip {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--card); padding: 8px 14px; border-radius: 999px;
  box-shadow: 0 4px 12px rgba(120,90,140,.10); font-weight: 700; font-size: 14px;
}
.cc-emoji { font-size: 22px; }
.cc-change { background: var(--soft); color: var(--accent); font-size: 12.5px; padding: 4px 10px; border-radius: 999px; }

.privacy-pill {
  display: inline-block; background: #FFF3D6; color: #8A6B2F; font-size: 12px;
  padding: 7px 12px; border-radius: 999px; margin: 6px 0 18px;
}
.hero-title { font-size: 30px; line-height: 1.3; color: var(--ink); margin-bottom: 20px; animation: floaty 4s ease-in-out infinite; }

.faces-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.face-btn {
  background: var(--card); border: none; border-radius: 22px; cursor: pointer;
  padding: 14px 6px 12px; display: flex; flex-direction: column; align-items: center; gap: 7px;
  box-shadow: 0 5px 16px rgba(140,100,120,.10); transition: transform .15s;
  font-family: var(--font);
}
.face-btn:active { transform: scale(.92); }
.face-emoji { font-size: 40px; }
.face-label { font-size: 14px; color: var(--ink); font-weight: 700; }

.quick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-btn {
  border: none; cursor: pointer; background: var(--card); border-radius: 16px;
  padding: 13px 8px; font-size: 14px; font-weight: 700; font-family: var(--font); color: var(--ink);
  box-shadow: 0 4px 12px rgba(120,90,140,.08);
}
.quick-btn:active { transform: scale(.95); }

.home-bubble {
  margin-top: 18px; background: var(--card); border-radius: 18px 18px 18px 4px;
  padding: 14px 16px; font-size: 14px; color: var(--ink); line-height: 1.6;
  box-shadow: 0 4px 12px rgba(120,90,140,.08);
}

/* ---------- Tab 栏 ---------- */
.tabbar {
  position: absolute; bottom: 0; left: 0; right: 0; height: 72px;
  display: flex; background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(160,130,150,.10); z-index: 40;
}
.tab {
  flex: 1; border: none; background: none; cursor: pointer; font-family: var(--font);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 13px; color: var(--sub); transition: color .2s;
}
.tab span { font-size: 22px; }
.tab.active { color: var(--accent); font-weight: 800; }

/* ---------- 聊天 ---------- */
.chat-page { display: none; flex-direction: column; padding: 0 0 0 0; }
.chat-page.active { display: flex; }
.chat-head {
  display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px;
  background: rgba(255,255,255,.9); backdrop-filter: blur(8px); z-index: 5;
}
.back {
  border: none; background: var(--soft); width: 34px; height: 34px; border-radius: 50%;
  font-size: 20px; color: var(--ink); cursor: pointer; line-height: 1; font-family: var(--font);
}
.ch-emoji { font-size: 32px; }
.ch-info { flex: 1; }
.ch-info > div:first-child { font-size: 15px; font-weight: 800; }
.ch-status { font-size: 12.5px; color: var(--sub); }
.tts-btn { border: none; background: var(--soft); font-size: 16px; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; }
.tts-btn.off { filter: grayscale(1); opacity: .45; }

.chat-msgs { flex: 1; overflow-y: auto; padding: 14px 14px 6px; }
.msg { display: flex; gap: 8px; margin-bottom: 12px; animation: msgIn .25s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg .m-avatar { font-size: 30px; flex-shrink: 0; margin-top: 2px; }
.m-bubble { padding: 11px 14px; border-radius: 4px 18px 18px 18px; font-size: 15.5px; line-height: 1.7; max-width: 82%; }
.msg.bot .m-bubble { background: var(--card); color: var(--ink); box-shadow: 0 3px 10px rgba(120,90,140,.08); white-space: pre-line; }
.msg.user { flex-direction: row-reverse; }
.msg.user .m-bubble { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; border-radius: 18px 4px 18px 18px; }

.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--sub); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 70%, 100% { opacity: .25; } 35% { opacity: 1; } }

.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 14px 10px; }
.chip {
  border: 1.5px solid var(--accent); color: var(--accent); background: #fff;
  font-size: 13.5px; padding: 10px 16px; border-radius: 999px; cursor: pointer; font-family: var(--font);
}
.chip:active { background: var(--soft); }

.chat-input { display: flex; gap: 8px; padding: 10px 12px calc(14px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.95); }
.mic {
  border: none; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  background: var(--soft); font-size: 20px; flex-shrink: 0;
}
.mic.rec { background: #FFE2E2; animation: pulse 1s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,120,120,.5); } 100% { box-shadow: 0 0 0 12px rgba(255,120,120,0); } }
#chatInput {
  flex: 1; border: none; background: #fff; border-radius: 999px; padding: 0 18px;
  font-size: 14.5px; font-family: var(--font); box-shadow: inset 0 0 0 1.5px rgba(160,130,150,.14); outline: none;
}
.send {
  border: none; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; font-size: 17px; flex-shrink: 0;
}

.l2-banner {
  margin: 0 14px 10px; background: #FFF6D9; border-radius: 14px; padding: 10px 14px;
  font-size: 12.5px; color: #8A6B2F; line-height: 1.6; animation: msgIn .3s;
}

/* ---------- 急救站 ---------- */
.sos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sos-card {
  border: none; cursor: pointer; background: var(--card); border-radius: 20px; padding: 18px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--font); color: var(--ink);
  box-shadow: 0 5px 16px rgba(120,90,140,.09); transition: transform .15s;
}
.sos-card:active { transform: scale(.94); }
.sc-emoji { font-size: 38px; }
.sos-card b { font-size: 15px; }
.sos-card i { font-style: normal; font-size: 13px; color: var(--sub); }
.sos-tip { margin-top: 16px; text-align: center; font-size: 12.5px; color: var(--sub); }

/* ---------- 弹层 ---------- */
.overlay {
  position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--bg1), var(--bg2));
  padding: 0 20px 26px; animation: pageIn .25s ease;
}
.ov-head { display: flex; align-items: center; gap: 12px; padding: 18px 0 6px; }
.ov-title { font-size: 17px; font-weight: 800; color: var(--ink); }
.ov-sub { font-size: 13px; color: var(--sub); line-height: 1.7; margin: 6px 0 14px; }
.ov-q { font-size: 16px; font-weight: 800; color: var(--ink); margin: 14px 0 16px; text-align: center; }

/* 角色选择 */
.series-tabs { display: flex; gap: 8px; margin: 8px 0 14px; }
.series-tab {
  flex: 1; border: none; cursor: pointer; background: var(--card); padding: 10px 0; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; font-family: var(--font); color: var(--sub);
  box-shadow: 0 3px 10px rgba(120,90,140,.08);
}
.series-tab.active { background: var(--ink); color: #fff; }
.char-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.char-card {
  position: relative; border: none; cursor: pointer; background: var(--card); border-radius: 20px; padding: 18px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 7px; font-family: var(--font);
  box-shadow: 0 5px 16px rgba(120,90,140,.09); transition: transform .15s;
}
.char-card:active { transform: scale(.94); }
.char-card .cc-aud {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%;
  border: none; background: var(--soft); font-size: 13px; line-height: 30px; text-align: center;
  cursor: pointer; z-index: 2;
}
.char-card .cc-aud:active { transform: scale(.9); }
.char-card .cc2 { font-size: 44px; }
.char-card b { font-size: 16px; color: var(--ink); }
.char-card i { font-style: normal; font-size: 12.5px; color: var(--accent); font-weight: 700; }
.char-card p { font-size: 13px; color: var(--sub); text-align: center; line-height: 1.5; }

/* 签到三档 & 来源 */
.level-grid { display: grid; gap: 12px; }
.level-btn {
  border: none; cursor: pointer; background: var(--card); border-radius: 18px; padding: 16px 18px;
  display: flex; align-items: center; gap: 14px; font-family: var(--font);
  box-shadow: 0 4px 14px rgba(120,90,140,.09); font-size: 15px; font-weight: 700; color: var(--ink);
}
.level-btn:active { transform: scale(.97); }
.level-btn .lv-emoji { font-size: 30px; }
.src-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.src-btn {
  border: none; cursor: pointer; background: var(--card); border-radius: 16px; padding: 13px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 5px; font-family: var(--font);
  box-shadow: 0 4px 12px rgba(120,90,140,.09); font-size: 12.5px; font-weight: 700; color: var(--ink);
}
.src-btn span { font-size: 26px; }
.co-done-emoji { font-size: 54px; text-align: center; margin-top: 26px; }
.co-done-text { text-align: center; font-size: 15px; margin: 14px 0; color: var(--ink); }
.co-step { flex: 1; display: flex; flex-direction: column; justify-content: center; }

/* 急救工具 */
.tool-step { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.tool-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }

.breath-wrap { text-align: center; }
#breathCircle {
  width: 120px; height: 120px; border-radius: 50%; margin: 0 auto;
  background: radial-gradient(circle at 35% 30%, #A8D8FF, #6FC3FF);
  box-shadow: 0 10px 30px rgba(111,195,255,.45); display: flex; align-items: center; justify-content: center;
  font-size: 40px;
}
#breathText { font-size: 17px; font-weight: 800; color: var(--ink); margin-top: 26px; }
#breathRound { font-size: 12.5px; color: var(--sub); margin-top: 6px; }

#whackGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mole {
  border: none; cursor: pointer; aspect-ratio: 1; border-radius: 18px; background: var(--card);
  font-size: 40px; box-shadow: 0 4px 12px rgba(120,90,140,.10); font-family: var(--font);
}
.mole.up { background: var(--soft); transform: scale(1.03); }
.tool-meta { font-size: 14px; font-weight: 800; color: var(--ink); }
.tool-meta b { color: var(--accent); font-size: 20px; }

#starField { position: relative; width: 100%; height: 300px; background: #2B2A4A; border-radius: 22px; overflow: hidden; }
.star-btn {
  position: absolute; border: none; background: none; cursor: pointer; font-size: 30px;
  animation: starPop .4s ease; font-family: var(--font);
}
@keyframes starPop { from { transform: scale(0) rotate(90deg); } to { transform: scale(1) rotate(0); } }

#doodleCv { width: 100%; height: 300px; background: #fff; border-radius: 22px; box-shadow: 0 6px 18px rgba(120,90,140,.12); touch-action: none; cursor: crosshair; }
.doodle-colors { display: flex; gap: 10px; }
.dcolor { width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.dcolor.active { outline: 3px solid var(--ink); outline-offset: 2px; }
.tool-btn-row { display: flex; gap: 10px; }
.tool-btn-row .cta { flex: 1; }

#shoutBtn {
  width: 150px; height: 150px; border-radius: 50%; border: none; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #FFD3A8, #FF8A5C); font-size: 54px;
  box-shadow: 0 14px 34px rgba(255,138,92,.4); user-select: none; touch-action: none;
  font-family: var(--font);
}
#shoutBtn.holding { animation: shake .12s infinite; }
@keyframes shake { 0% { transform: translate(1px, -1px) rotate(1deg); } 50% { transform: translate(-1px, 1px) rotate(-1deg); } 100% { transform: translate(1px, 1px) rotate(1deg); } }
#shoutFx { height: 60px; font-size: 30px; position: relative; width: 100%; }
.shout-tip { font-size: 13px; color: var(--sub); text-align: center; }

/* 帮我说 */
.sit-list { display: flex; flex-direction: column; gap: 10px; }
.sit-btn {
  border: none; cursor: pointer; background: var(--card); border-radius: 16px; padding: 15px 18px;
  text-align: left; font-size: 14.5px; font-weight: 700; font-family: var(--font); color: var(--ink);
  box-shadow: 0 4px 12px rgba(120,90,140,.09);
}
.sit-btn:active { transform: scale(.97); }
.hs-script {
  background: var(--card); border-radius: 18px; padding: 20px 18px; font-size: 18px; line-height: 1.8;
  font-weight: 700; color: var(--ink); box-shadow: 0 6px 16px rgba(120,90,140,.10); text-align: center;
}
.hs-tip { margin: 12px 2px 18px; font-size: 13px; color: var(--sub); line-height: 1.7; text-align: center; }
.hs-actions { display: flex; flex-direction: column; gap: 10px; }
.hs-actions .cta { width: 100%; }

/* 翻译器 */
.tr-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 14px; }
.tr-input-row { display: flex; gap: 8px; margin-bottom: 16px; }
.tr-input-row .mic { width: 44px; height: 44px; font-size: 18px; }
.tr-input-row input {
  flex: 1; border: none; background: #fff; border-radius: 999px; padding: 0 16px; height: 42px;
  font-size: 14px; font-family: var(--font); box-shadow: inset 0 0 0 1.5px rgba(160,130,150,.14); outline: none;
}
.tr-result {
  background: #fff; border-radius: 20px; padding: 18px; box-shadow: 0 6px 18px rgba(120,90,140,.10);
  animation: pageIn .3s;
}
.tr-raw { font-size: 13px; color: var(--sub); margin-bottom: 8px; }
.tr-real { font-size: 15.5px; font-weight: 800; color: var(--ink); line-height: 1.7; margin-bottom: 12px; white-space: pre-line; }
.tr-need { font-size: 13.5px; color: #B4763B; background: #FFF3D6; border-radius: 12px; padding: 10px 12px; line-height: 1.6; }
.tr-actions { margin-top: 14px; }

/* 安全中心 & 安全模式 */
.safe-intro { font-size: 13.5px; line-height: 1.8; color: var(--ink); margin: 8px 0 14px; }
.safe-level { background: var(--card); border-radius: 16px; padding: 13px 15px; margin-bottom: 10px; box-shadow: 0 4px 12px rgba(120,90,140,.08); }
.safe-level b { font-size: 14px; }
.safe-level p { font-size: 12.5px; color: var(--sub); margin-top: 4px; line-height: 1.6; }
.hotlines p { font-size: 13.5px; line-height: 1.8; }

.safety-mode { background: linear-gradient(180deg, #FFF9EE 0%, #FFE9EF 60%, #EAF3FF 100%); align-items: center; text-align: center; padding-top: 60px; }
.sm-demo {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  background: #B4763B; color: #fff; font-size: 12px; padding: 5px 14px; border-radius: 999px;
}
.sm-emoji { font-size: 58px; margin-bottom: 14px; }
.sm-title { font-size: 24px; color: var(--ink); margin-bottom: 14px; }
.sm-text { font-size: 15px; color: var(--ink); line-height: 1.9; }
.sm-text2 { font-size: 14.5px; color: #8A6B2F; margin: 14px 0 24px; line-height: 1.8; }
.sm-script { width: 100%; margin-top: 18px; }
.sm-script p { font-size: 13.5px; color: var(--sub); margin-bottom: 8px; }
.sm-script-note { margin: 12px 0 16px; font-size: 13px; color: var(--sub); }
.sm-hotline { margin-top: auto; font-size: 12.5px; color: var(--sub); padding-top: 20px; }

/* 日历 & 地图 */
.cal-head { text-align: center; font-size: 14px; font-weight: 800; margin-bottom: 10px; color: var(--ink); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-cell {
  aspect-ratio: 1; border-radius: 12px; background: var(--soft); font-size: 12.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; color: var(--sub);
  cursor: pointer; position: relative;
}
.cal-cell.today { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal-cell.has-data { color: #fff; }
.src-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.src-bar-label { width: 76px; font-size: 13px; font-weight: 700; color: var(--ink); flex-shrink: 0; }
.src-bar-track { flex: 1; height: 12px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.src-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.src-bar-num { width: 24px; font-size: 12px; color: var(--sub); text-align: right; }
.diary-item { padding: 10px 0; border-bottom: 1px dashed rgba(160,130,150,.15); }
.diary-item:last-child { border-bottom: none; }
.diary-date { font-size: 11.5px; color: var(--sub); margin-bottom: 4px; }
.diary-text { font-size: 13.5px; line-height: 1.65; color: var(--ink); }

.day-sheet {
  position: absolute; inset: 0; z-index: 80; background: rgba(60,45,60,.35);
  display: flex; align-items: flex-end;
}
.ds-panel {
  width: 100%; background: #fff; border-radius: 26px 26px 0 0; padding: 22px 20px 34px;
  animation: sheetUp .25s ease;
}
@keyframes sheetUp { from { transform: translateY(40px); } to { transform: none; } }
.ds-title { font-size: 15px; font-weight: 800; margin-bottom: 12px; color: var(--ink); }
.ds-list { max-height: 300px; overflow-y: auto; }
.ds-item { display: flex; gap: 10px; padding: 8px 0; font-size: 13.5px; color: var(--ink); border-bottom: 1px dashed rgba(160,130,150,.12); }

/* ---------- 我的 ---------- */
.me-char { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.me-emoji { font-size: 46px; }
.me-info div:first-child { font-size: 17px; font-weight: 800; }
.me-info { flex: 1; }
.me-row { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 700; font-size: 15px; }
.me-row-icon { font-size: 22px; }
.me-row .muted { margin-left: auto; }
.privacy-card p { font-size: 13px; line-height: 1.8; color: var(--ink); }
/* 模仿我的声音（音色克隆） */
.clone-script {
  background: var(--bg, #FFF7EC); border-radius: 12px; padding: 12px 14px;
  font-size: 15px; line-height: 1.9; color: var(--ink); margin: 10px 0;
}
.rec-dot-row { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); margin: 8px 0; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #FF5A5A; animation: recPulse 1s infinite; flex: none; }
@keyframes recPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }
.ghost-btn {
  width: 100%; padding: 10px; border-radius: 12px; border: 1.5px dashed #C9B8A5;
  background: transparent; color: var(--ink); font-size: 14px; margin-top: 8px;
}
.clone-ok { font-size: 14px; color: #3B9A50; }
.clone-err { font-size: 13px; line-height: 1.8; color: #C04040; margin-bottom: 8px; }
.checkin-card .card-sub { margin-bottom: 0; }
.star-line { font-size: 14px; color: var(--ink); }
.star-line b { color: var(--accent); font-size: 18px; }

/* ---------- 家长端 ---------- */
.p-head {
  display: flex; align-items: center; padding: 14px 20px 10px;
  font-size: 14px; font-weight: 800; color: var(--ink);
}
.p-brand { background: #fff; padding: 8px 16px; border-radius: 999px; box-shadow: 0 3px 10px rgba(80,100,160,.08); }
.p-privacy {
  font-size: 12px; color: #3D5A86; background: #E8F0FF; border-radius: 14px;
  padding: 10px 14px; line-height: 1.7; margin-bottom: 14px;
}
.p-child { display: flex; align-items: center; gap: 12px; }
.p-child-emoji { font-size: 38px; }
.p-child > div { flex: 1; }
.p-child b { font-size: 15.5px; color: var(--ink); }
.p-bound { color: var(--accent2); font-weight: 800; font-size: 13px; }
.p-empty p { font-size: 13.5px; color: var(--sub); line-height: 1.7; margin-bottom: 12px; text-align: center; }

.stat-row { display: flex; gap: 10px; margin-bottom: 14px; }
.stat {
  flex: 1; background: #fff; border-radius: 18px; padding: 14px 6px; text-align: center;
  box-shadow: 0 4px 12px rgba(80,100,160,.08);
}
.stat span { font-size: 26px; font-weight: 800; color: var(--ink); display: block; }
.stat i { font-style: normal; font-size: 11px; color: var(--sub); }

.chart-box { min-height: 150px; }
.chart-box.tall { min-height: 210px; }
.p-top-sources { display: flex; flex-direction: column; gap: 8px; }
.top-src-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink); }
.top-src-row b { flex: 1; }
.top-src-pct { width: 110px; height: 10px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.top-src-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 999px; }

.alert-body { font-size: 13.5px; line-height: 1.75; color: var(--ink); }
.alert-body .hint { display: block; margin-top: 8px; font-size: 12.5px; color: var(--sub); background: var(--soft); border-radius: 12px; padding: 9px 12px; }
#pAlertCard.normal .card-title { color: var(--accent2); }
.seed-badge { text-align: center; font-size: 11.5px; color: var(--sub); margin: 4px 0 10px; }

/* 沟通课堂 */
.comm-item { background: #fff; border-radius: 18px; margin-bottom: 12px; overflow: hidden; box-shadow: 0 4px 12px rgba(80,100,160,.07); }
.comm-head {
  width: 100%; border: none; cursor: pointer; background: none; font-family: var(--font);
  padding: 15px 16px; display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 800; color: var(--ink);
}
.comm-head .ci-emoji { font-size: 24px; }
.comm-head .ci-arrow { margin-left: auto; transition: transform .2s; color: var(--sub); }
.comm-item.open .ci-arrow { transform: rotate(90deg); }
.comm-body { display: none; padding: 0 16px 16px; }
.comm-item.open .comm-body { display: block; animation: pageIn .25s; }
.comm-step { display: flex; gap: 10px; font-size: 13px; color: var(--ink); line-height: 1.7; margin-bottom: 8px; }
.comm-step .num {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--soft);
  color: var(--accent); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}

/* 开关 & 滑杆 */
.toggle-row { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--ink); margin: 14px 0; cursor: pointer; }
.toggle-row input { display: none; }
.toggle {
  width: 46px; height: 26px; border-radius: 999px; background: #D8DEE8; position: relative; transition: background .2s;
}
.toggle::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: left .2s; box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
input:checked + .toggle { background: var(--accent); }
input:checked + .toggle::after { left: 23px; }

#timeSlider { width: 100%; accent-color: var(--accent); margin: 6px 0 4px; }

/* ---------- 动画 ---------- */
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* 窄屏适配 */
@media (max-width: 520px), (max-height: 880px) {
  .phone { border-radius: 0; }
  #switcher { top: 8px; right: 8px; }
}
