/* ============================================================
   喜乐工作台 · 星粉色渐变主题样式
   ============================================================ */
:root {
  --pink-1: #ffe3f3;
  --pink-2: #ffd0ec;
  --pink-3: #f6c8ff;
  --pink-deep: #ff7eb6;
  --pink-rose: #ff5fa2;
  --ink: #5a3a4d;
  --ink-soft: #8a6a7a;
  --card: rgba(255, 255, 255, 0.82);
  --card-solid: #ffffff;
  --shadow: 0 10px 30px rgba(255, 126, 182, 0.18);
  --radius: 22px;
  --radius-sm: 14px;
  --sidebar-w: 248px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, var(--pink-1) 0%, var(--pink-2) 45%, var(--pink-3) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}
/* 星点背景 */
.bg-stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-stars .star {
  position: absolute; width: 10px; height: 10px;
  background: radial-gradient(circle, #fff 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  animation: twinkle 3.5s ease-in-out infinite;
  opacity: .8;
}
@keyframes twinkle { 0%,100%{ transform: scale(.6); opacity:.35 } 50%{ transform: scale(1.1); opacity:.95 } }

.app { position: relative; z-index: 1; display: flex; min-height: 100vh; }

/* ---------------- 侧边栏 ---------------- */
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  padding: 22px 16px; display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 0; height: 100vh;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(14px);
  border-right: 2px solid rgba(255,255,255,0.7);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 14px; }
.brand-kitty {
  width: 52px; height: 52px; flex: 0 0 52px;
  border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 4px 10px rgba(255,126,182,.25);
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-kitty img,
.brand-kitty svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.brand-text h1 { font-size: 20px; margin: 0; color: var(--pink-rose); letter-spacing: 1px; }
.brand-text p { font-size: 11px; margin: 2px 0 0; color: var(--ink-soft); }

.nav { display: flex; flex-direction: column; gap: 10px; flex: 1; overflow-y: auto; padding-right: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: none; cursor: pointer; text-align: left;
  background: rgba(255,255,255,0.5); border-radius: 18px;
  color: var(--ink); font-size: 15px; font-weight: 600;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.nav-item .ni-icon { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 14px; overflow: hidden; box-shadow: 0 4px 10px rgba(255,126,182,.25); background: transparent; }
.nav-item .ni-icon img,
.nav-item .ni-icon svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.nav-item:hover { transform: translateX(3px); background: rgba(255,255,255,0.8); }
.nav-item.active { background: #fff; box-shadow: var(--shadow); color: var(--pink-rose); }
.nav-item.active .ni-icon { box-shadow: 0 6px 16px rgba(255,95,162,.4); }
.nav-badge { margin-left: auto; background: var(--pink-deep); color: #fff; font-size: 11px; min-width: 20px; height: 20px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }

.sidebar-foot { font-size: 12px; color: var(--ink-soft); padding: 8px; text-align: center; }

/* ---------------- 内容区 ---------------- */
.content { flex: 1; padding: 26px 30px 60px; min-width: 0; }
.module-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.module-head .mh-icon { width: 58px; height: 58px; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.module-head .mh-icon img,
.module-head .mh-icon svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.module-head h2 { margin: 0; font-size: 24px; color: var(--pink-rose); }
.module-head p { margin: 2px 0 0; font-size: 13px; color: var(--ink-soft); }

.card { background: var(--card); backdrop-filter: blur(8px); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1.5px solid rgba(255,255,255,0.7); }
.card + .card { margin-top: 18px; }
.card h3 { margin: 0 0 14px; font-size: 17px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px){ .grid-3{ grid-template-columns: repeat(2,1fr);} }

/* 按钮 */
.btn { border: none; cursor: pointer; font-weight: 700; font-size: 14px; padding: 10px 16px; border-radius: 14px; background: linear-gradient(135deg, #ffa9d4, #ff7eb6); color: #fff; box-shadow: 0 6px 14px rgba(255,126,182,.35); transition: transform .12s ease, filter .2s; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: #fff; color: var(--pink-rose); border: 1.5px solid var(--pink-deep); box-shadow: none; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 11px; }
.btn.danger { background: linear-gradient(135deg,#ff9a9a,#ff6b6b); box-shadow:0 6px 14px rgba(255,107,107,.35); }

/* 表单 */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
input[type=text], input[type=number], input[type=date], input[type=password], input[type=month], textarea, select {
  font-family: inherit; font-size: 14px; color: var(--ink);
  padding: 10px 12px; border-radius: 12px; border: 1.5px solid #ffd2e8;
  background: rgba(255,255,255,0.9); outline: none; width: 100%;
}
input:focus, textarea:focus, select:focus { border-color: var(--pink-deep); box-shadow: 0 0 0 3px rgba(255,126,182,.18); }
textarea { resize: vertical; min-height: 70px; }

/* 统计卡 */
.stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.stat { background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(255,224,243,.8)); border-radius: 18px; padding: 16px; text-align: center; box-shadow: var(--shadow); }
.stat .v { font-size: 22px; font-weight: 800; }
.stat .l { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.stat.income .v { color: #2bb673; }
.stat.expense .v { color: #ff5fa2; }
.stat.balance .v { color: #7b61ff; }

/* 列表项 */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.7); border-radius: 14px; padding: 12px 14px; }
.item .grow { flex: 1; min-width: 0; }
.item .title { font-weight: 600; }
.item .sub { font-size: 12px; color: var(--ink-soft); }
.check { width: 26px; height: 26px; border-radius: 9px; border: 2px solid var(--pink-deep); background: #fff; cursor: pointer; flex: 0 0 26px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; }
.check.done { background: var(--pink-deep); }
.item.done .title { text-decoration: line-through; color: var(--ink-soft); }
.icon-btn { border: none; background: rgba(255,126,182,.12); color: var(--pink-rose); width: 32px; height: 32px; border-radius: 10px; cursor: pointer; font-size: 15px; }
.icon-btn:hover { background: rgba(255,126,182,.25); }

/* 支出类型选择 */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px,1fr)); gap: 10px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; background: #fff; border: 2px solid transparent; cursor: pointer; font-size: 12px; }
.cat.sel { border-color: var(--pink-deep); background: #fff0f8; }
.cat .emo { font-size: 22px; }

/* 日历 */
.cal { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; }
.cal .dow { text-align: center; font-size: 12px; color: var(--ink-soft); padding: 4px 0; }
.cal .cell { aspect-ratio: 1/1; border-radius: 12px; background: rgba(255,255,255,0.6); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; font-size: 13px; position: relative; }
.cal .cell.other { opacity: .35; }
.cal .cell.has { background: #ffe1f1; font-weight: 700; }
.cal .cell.today { outline: 2px solid var(--pink-deep); }
.cal .cell .amt { font-size: 9px; color: var(--pink-rose); margin-top: 1px; }

/* 图表 */
.chart { width: 100%; height: 220px; }
.mini-note { font-size: 12px; color: var(--ink-soft); }

/* 视频/卡片网格 */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 16px; }
.vcard { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.vcard .thumb { aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 30px; position: relative; }
.vcard .body { padding: 12px 14px; }
.vcard .vt { font-weight: 700; font-size: 14px; }
.vcard .vs { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.vcard .tag { display: inline-block; margin-top: 8px; font-size: 11px; background: #ffe1f1; color: var(--pink-rose); padding: 2px 8px; border-radius: 8px; }

/* 书卡 */
.book { background: #fff; border-radius: 16px; padding: 14px; box-shadow: var(--shadow); display: flex; gap: 12px; }
.book .cover { width: 56px; height: 78px; border-radius: 8px; flex: 0 0 56px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; text-align: center; font-weight: 700; padding: 4px; }
.book .bt { font-weight: 700; }
.book .ba { font-size: 12px; color: var(--ink-soft); }
.tab-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tab { padding: 7px 14px; border-radius: 12px; background: rgba(255,255,255,.7); border: 1.5px solid transparent; cursor: pointer; font-weight: 600; font-size: 13px; }
.tab.active { background: #fff; border-color: var(--pink-deep); color: var(--pink-rose); }

/* 照片预览 */
.photo-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.photo-grid img { width: 80px; height: 80px; object-fit: cover; border-radius: 12px; border: 2px solid #ffd2e8; }

/* 密码遮罩 */
.locked { text-align: center; padding: 26px; color: var(--ink-soft); }
.locked .big { font-size: 40px; }

/* 经期状态条 */
.period-banner { background: linear-gradient(135deg,#ffd6ec,#ff9ec8); color:#7a2a4d; border-radius: 18px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow); }
.period-banner .big { font-size: 26px; font-weight: 800; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px); background: rgba(90,58,77,.92); color: #fff; padding: 10px 18px; border-radius: 14px; font-size: 14px; opacity: 0; transition: all .25s; z-index: 999; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 移动端导航按钮 */
.nav-toggle { display: none; position: fixed; right: 16px; bottom: 16px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; border: none; background: linear-gradient(135deg,#ffa9d4,#ff7eb6); color: #fff; font-size: 22px; box-shadow: 0 8px 20px rgba(255,126,182,.5); cursor: pointer; }

/* ---------------- 响应式：手机像 App ---------------- */
@media (max-width: 760px) {
  .app { flex-direction: column; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 50;
    transform: translateX(-100%); transition: transform .25s ease;
    width: 240px; flex: none; height: 100vh;
  }
  .sidebar.open { transform: translateX(0); }
  .content { padding: 18px 16px 90px; }
  .nav-toggle { display: block; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
  .module-head h2 { font-size: 20px; }
  .module-head .mh-icon { width: 46px; height: 46px; }
}
.scrim { display: none; }
@media (max-width: 760px){ .scrim.show { display: block; position: fixed; inset: 0; background: rgba(90,58,77,.35); z-index: 45; } }

/* ============================================================
   首页 · 喜乐工作台
   ============================================================ */
.home-hero {
  background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(255,224,243,0.85));
  border-radius: var(--radius);
  padding: 28px 22px 22px;
  box-shadow: var(--shadow);
  border: 1.5px solid rgba(255,255,255,0.7);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,211,77,.25), transparent 40%),
    radial-gradient(circle at 88% 22%, rgba(255,158,200,.28), transparent 45%),
    radial-gradient(circle at 50% 92%, rgba(184,156,255,.22), transparent 50%);
  pointer-events: none;
}
.home-greet { font-size: 14px; color: var(--ink-soft); display: flex; gap: 6px; align-items: center; justify-content: center; position: relative; z-index: 1; }
.home-greet .g-emoji { font-size: 18px; }
.home-greet .g-text { font-weight: 600; }
.home-time-row { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 8px; position: relative; z-index: 1; }
.home-time { font-size: 56px; font-weight: 900; color: var(--ink); letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.refresh-btn { width: 38px; height: 38px; border-radius: 50%; font-size: 18px; background: #fff; color: var(--pink-rose); border: 1.5px solid #ffd2e8; box-shadow: 0 4px 10px rgba(255,126,182,.18); }
.refresh-btn:hover { background: #fff0f8; }
.home-date { font-size: 14px; color: var(--ink-soft); margin-top: 4px; position: relative; z-index: 1; }
.home-date .dow { color: var(--pink-rose); font-weight: 700; margin-left: 4px; }
.home-name-row { margin-top: 12px; position: relative; z-index: 1; }
.home-name-row input { max-width: 260px; margin: 0 auto; text-align: center; background: rgba(255,255,255,0.85); }

.home-quote-card { position: relative; text-align: center; padding: 26px 18px 18px; }
.home-quote-card .quote-zh { font-size: 18px; font-weight: 700; color: var(--ink); }
.home-quote-card .quote-en { font-size: 13px; color: var(--ink-soft); margin-top: 8px; font-style: italic; line-height: 1.6; }
.home-quote-card .quote-paw { position: absolute; font-size: 28px; opacity: .25; }
.home-quote-card .quote-paw.left { top: 16px; left: 18px; transform: rotate(-20deg); }
.home-quote-card .quote-paw.right { bottom: 12px; right: 18px; transform: rotate(20deg); }
.quote-refresh-row { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; gap: 10px; flex-wrap: wrap; }

.ck-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.ck-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pink-deep); box-shadow: 0 0 0 4px rgba(255,126,182,.18); }
.ck-head h3 { margin: 0; font-size: 17px; }
.ck-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .ck-grid { grid-template-columns: repeat(2, 1fr); } }
.ck-card {
  background: #fff; border-radius: 18px; padding: 18px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  box-shadow: var(--shadow); cursor: pointer; border: 2px solid transparent;
  transition: transform .12s ease, border-color .15s ease;
}
.ck-card:hover { transform: translateY(-2px); }
.ck-card.done { border-color: #5ec98a; background: #f3fbf6; }
.ck-card.done .ck-status { color: #5ec98a; }
.ck-card .ck-emoji {
  width: 56px; height: 56px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; box-shadow: 0 6px 14px rgba(255,95,162,.18);
}
.ck-card:not(.done) .ck-emoji { filter: grayscale(0.4); opacity: 0.85; }
.ck-card .ck-label { font-weight: 700; font-size: 15px; }
.ck-card .ck-status { font-size: 12px; color: var(--ink-soft); }
.ck-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }

/* 运动视频卡（仿图2） */
.fit-chips { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin: -4px 0 14px; }
.fit-chip { padding: 8px 14px; border-radius: 14px; background: rgba(255,255,255,.85); border: 1.5px solid transparent; cursor: pointer; font-weight: 600; font-size: 13px; white-space: nowrap; color: var(--ink); }
.fit-chip.active { background: linear-gradient(135deg,#ffd6ec,#ff9ec8); color: #fff; border-color: var(--pink-deep); box-shadow: 0 4px 10px rgba(255,126,182,.25); }
.fit-chip.fav-chip { background: linear-gradient(135deg,#fff0f6,#ffe1ef); border-color: #ffb6d3; color: #ff5fa2; margin-left: auto; }
.fit-chip.fav-chip:hover { background: linear-gradient(135deg,#ffe1ef,#ffc9dc); }
.fit-chip.fav-chip.active { background: linear-gradient(135deg,#ff9ec8,#ff5fa2); color: #fff; border-color: #ff5fa2; }
.fit-checkin { background: linear-gradient(135deg,#ffb1dc,#ff5fa2); color: #fff; border-radius: 18px; padding: 16px 20px; display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 16px; margin-bottom: 14px; box-shadow: 0 8px 16px rgba(255,126,182,.3); }
.fit-checkin .emo { font-size: 24px; }
.fit-vid-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 760px) { .fit-vid-grid { grid-template-columns: 1fr; } }
/* 读书笔记视频推荐：3 列更紧凑 */
.rd-vid-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 760px) { .rd-vid-grid { grid-template-columns: repeat(2, 1fr); } }
.rd-vid-grid .fit-vid .info { padding: 8px 10px; }
.rd-vid-grid .fit-vid .ft { font-size: 12.5px; line-height: 1.35; }
.rd-vid-grid .fit-vid .fa { font-size: 11px; }
.rd-vid-grid .fit-vid .thumb { font-size: 26px; aspect-ratio: 16/9; }
.rd-vid-grid .fit-vid .thumb::after { width: 40px; height: 40px; font-size: 15px; }
.fit-vid { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.fit-vid .thumb { aspect-ratio: 16/10; position: relative; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 34px; }
.fit-vid .thumb::after { content: "▶"; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 54px; height: 54px; border-radius: 50%; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff; backdrop-filter: blur(4px); }
.fit-vid .badge-row { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; pointer-events: none; }
.fit-vid .badge { background: rgba(0,0,0,.5); color: #fff; font-size: 11px; padding: 4px 8px; border-radius: 8px; font-weight: 700; }
.fit-vid .info { padding: 12px 14px; }
.fit-vid .ft { font-weight: 700; font-size: 14px; line-height: 1.4; }
.fit-vid .fa { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.fit-vid-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.fit-vid-card-head h3 { margin: 0; }
.refresh-circle { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid #ffd2e8; background: #fff; color: var(--pink-rose); cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(255,126,182,.18); }
.refresh-circle:hover { background: #fff0f8; }
.refresh-circle.spin { animation: spin .8s ease; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* ---------------- Modal 通用 ---------------- */
.modal { position: fixed; inset: 0; background: rgba(60,40,55,0.45); display: none; align-items: center; justify-content: center; z-index: 200; backdrop-filter: blur(4px); }
.modal.show { display: flex; }
.modal-card { background: #fff; border-radius: 22px; padding: 24px; max-width: 480px; width: 92vw; max-height: 86vh; overflow: auto; box-shadow: 0 20px 60px rgba(120,60,100,0.3); }
.modal-card h3 { margin: 0 0 14px; color: var(--pink-rose); font-size: 20px; }
.modal-card .field { margin-bottom: 12px; }
.modal-card .field label { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 4px; }
.modal-card .field input, .modal-card .field select, .modal-card .field textarea { width: 100%; padding: 10px 14px; border: 1.5px solid #f0d7e3; border-radius: 12px; box-sizing: border-box; font-size: 14px; color: var(--ink); font-family: inherit; }
.modal-card .field textarea { resize: vertical; min-height: 80px; }
.modal-card .field input:focus, .modal-card .field select:focus, .modal-card .field textarea:focus { border-color: var(--pink-deep); outline: none; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* ---------------- 收藏按钮 ---------------- */
.fav-btn { background: rgba(255,255,255,0.9); border: 1.5px solid #ffd6e7; border-radius: 50%; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 16px; color: #ff8aa8; transition: transform .15s, background .15s; padding: 0; box-shadow: 0 2px 6px rgba(255,126,182,0.2); position: absolute; right: 8px; bottom: 8px; z-index: 3; }
.fav-btn:hover { transform: scale(1.12); background: #ffe6ef; }
.fav-btn.on { color: #ff5b7e; background: #ffe0ea; border-color: #ff9bbf; }
/* 收藏视频封面的右下角（thumb 已 position:relative）*/
.fit-vid .fav-btn, .mk-vid .fav-btn { right: 8px; bottom: 8px; }
/* 食谱收藏卡 */
.recipe-card { position: relative; }
.recipe-card .fav-btn { right: 6px; top: 6px; bottom: auto; }

/* ---------------- 行内编辑/删除按钮 ---------------- */
.row-actions { display: inline-flex; gap: 4px; margin-left: auto; }
.row-actions button { border: none; background: transparent; cursor: pointer; padding: 4px 8px; border-radius: 8px; font-size: 12px; color: var(--ink-soft); transition: background .15s, color .15s; }
.row-actions button:hover { background: rgba(255,126,182,0.12); color: var(--pink-deep); }
.row-actions .del { color: #ff7a8a; }
.row-actions .del:hover { background: #ffe2e7; }

/* ---------------- AI 推荐食谱 ---------------- */
.ai-recommend { background: linear-gradient(135deg,#fff6f0,#ffe2f0); border-radius: 16px; padding: 14px 16px; }
.ai-recommend .ai-row { display: flex; gap: 8px; margin-top: 10px; }
.ai-recommend input { flex: 1; padding: 10px 14px; border-radius: 12px; border: 1.5px solid #f0d7e3; background: #fff; font-size: 13px; }
.ai-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-top: 10px; }
@media (min-width: 720px) { .ai-result-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.ai-result-card { background: #fff; border-radius: 14px; padding: 10px; box-shadow: 0 4px 12px rgba(255,126,182,0.12); display: flex; gap: 10px; position: relative; }
.ai-result-emo { width: 56px; height: 56px; min-width: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.ai-result-info { flex: 1; min-width: 0; }
.ai-result-name { font-weight: 700; font-size: 13px; color: var(--ink); line-height: 1.3; }
.ai-result-kcal { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.ai-result-tag { font-size: 10px; background: #fff0f8; padding: 1px 6px; border-radius: 6px; color: var(--pink-deep); margin-top: 4px; display: inline-block; }
.ai-video { display: inline-block; margin-top: 6px; font-size: 11px; color: var(--pink-deep); text-decoration: none; }
.ai-video:hover { text-decoration: underline; }

/* === 读书进度条（在读书籍） === */
.rd-progress { margin-top: 8px; }
.rd-progress-bar { width: 100%; height: 8px; border-radius: 999px; background: rgba(255,126,182,.12); overflow: hidden; }
.rd-progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg,#ff9ec8,#ff5fa2); transition: width .3s ease; }
.rd-progress-info { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; font-size: 11px; color: var(--ink-soft); }
.rd-progress-pages { display: inline-flex; align-items: center; gap: 2px; color: var(--ink); font-weight: 600; }
.rd-cur-input { width: 56px !important; padding: 3px 6px !important; font-size: 11px !important; border-radius: 6px !important; border: 1px solid #ffd2e8 !important; text-align: center; }
.rd-progress-pct { color: var(--pink-rose); font-weight: 700; }

/* 推荐书籍卡片上的收藏按钮 */
.book-wrap .book-fav { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; font-size: 16px; }
.book-wrap .book-fav.on { color: #ff5b7e; background: #ffe0ea; border-color: #ff9bbf; }

/* 历史数据日期折叠 */
.date-fold { background: rgba(255,255,255,.85); border-radius: 14px; padding: 10px 14px; cursor: pointer; font-weight: 700; color: var(--pink-rose); margin: 14px 0 8px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 8px rgba(255,126,182,.1); user-select: none; }
.date-fold .date-fold-arrow { transition: transform .25s; font-size: 12px; }
.date-fold.collapsed .date-fold-arrow { transform: rotate(-90deg); }
.date-fold.collapsed + .list { display: none; }
.date-fold .date-fold-count { background: var(--pink-deep); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 10px; margin-left: 6px; font-weight: 600; }

/* === 数据备份面板（纪念日板块） === */
.backup-card { background: linear-gradient(135deg,#fff6fb,#fff0f6); }
.backup-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.backup-btn { padding: 14px 22px; font-size: 15px; border-radius: 14px; flex: 1 1 calc(50% - 6px); min-width: 130px; box-shadow: 0 4px 12px rgba(255,126,182,.15); }
.backup-btn.danger { background: linear-gradient(135deg,#ff9a9a,#ff5b7e); color: #fff; box-shadow: 0 4px 12px rgba(255,91,126,.3); }
.backup-btn.danger:hover { filter: brightness(1.05); }

/* === 运动类别两行 + 下拉 === */
.fit-chips-more { margin-top: -6px; }
.fit-chips-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 0 10px;
  padding: 6px 12px; border-radius: 999px;
  background: #fff; color: var(--ink);
  border: 1px dashed #ffb6d9; cursor: pointer;
  font-size: 12px; font-weight: 600;
  transition: all .2s;
}
.fit-chips-toggle:hover { background: #fff0f8; }
.fit-chips-toggle-arrow { font-size: 10px; transition: transform .25s; }
@media (max-width: 760px) {
  .fit-chips { flex-wrap: wrap; }
}

/* === 妆容穿搭 · 仿图1 === */
.mk-tabs { position: relative; }
.mk-tabs .tab { background: #fff; }
.mk-tabs .refresh-circle { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.mk-tabs .tab.active { background: linear-gradient(135deg,#ff9ec8,#ff5fa2); color: #fff; }
.mk-vid-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 760px) { .mk-vid-grid { grid-template-columns: repeat(2, 1fr); } }
.mk-vid-wrap { position: relative; }
.mk-vid { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .2s; }
.mk-vid:hover { transform: translateY(-2px); }
.mk-vid .thumb { aspect-ratio: 3/4; position: relative; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 40px; }
.mk-vid .mk-emoji { font-size: 34px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.15)); }
.mk-vid .mk-tag-left { position: absolute; top: 6px; left: 6px; background: rgba(255,255,255,.92); color: #ff5fa2; font-size: 9.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.mk-vid .mk-tag-right { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.4); color: #fff; font-size: 9.5px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.mk-vid .mk-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; font-size: 15px; color: #fff; backdrop-filter: blur(4px); }
.mk-vid .info { padding: 8px 10px; }
.mk-vid .vt { font-weight: 700; font-size: 12.5px; line-height: 1.35; }
.mk-vid .va { font-size: 10.5px; color: var(--ink-soft); margin-top: 2px; }
.mk-tips { background: linear-gradient(135deg, #fff7fb, #fff0f8); }

/* === 首页打卡 · 6项 + 饮水进度条 === */
.ck-grid-3 { grid-template-columns: repeat(3, 1fr) !important; }
@media (max-width: 760px) { .ck-grid-3 { grid-template-columns: repeat(2, 1fr) !important; } }
.ck-card-water { position: relative; }
.ck-card-water .ck-water-count {
  display: flex; align-items: baseline; justify-content: center; gap: 2px;
  font-size: 13px; color: #5aa9e6; font-weight: 700; margin: 2px 0 6px;
}
.ck-card-water .ck-water-count .cur { font-size: 18px; color: #2978c2; }
.ck-card-water .ck-water-count .slash { opacity: .4; margin: 0 1px; }
.ck-card-water .ck-water-count .tgt { font-size: 13px; }
.ck-water-bar {
  width: 80%; height: 6px; border-radius: 999px; background: rgba(90,169,230,.18);
  margin: 0 auto 4px; overflow: hidden;
}
.ck-water-bar-fill {
  height: 100%; border-radius: 999px; background: linear-gradient(90deg,#7ad7ff,#5aa9e6);
  transition: width .35s ease;
}
.ck-card-water.done .ck-water-bar-fill { background: linear-gradient(90deg,#5ec98a,#3fbfa0); }
.ck-card-water.done { border-color: #5ec98a; background: #f3fbf6; }
.ck-card-water.done .ck-status { color: #5ec98a; }
.quote-refresh-row { justify-content: flex-end !important; }

/* === 播客精选 · 仿图2 === */
.pc-search-card { padding: 6px 12px !important; }
.pc-search-card input {
  width: 100%; max-width: 200px; padding: 6px 10px; border: 1.5px solid #f0cfe2;
  background: #fff6fb; border-radius: 999px; font-size: 12.5px; color: var(--ink);
  outline: none; transition: all .2s;
}
.pc-search-card input:focus { border-color: #ff9ec8; background: #fff; box-shadow: 0 3px 8px rgba(255,126,182,.18); }
@media (max-width: 760px) {
  .pc-search-card { margin-bottom: 8px !important; }
}

/* 待办：输入框长度对齐（date 与 text 看起来一致） */
#tuInput, #tuDate { min-width: 0; }
#tuDate { appearance: none; -webkit-appearance: none; padding: 10px 12px; }
@media (max-width: 760px) {
  #tdInput, #tuInput, #tuDate { font-size: 14px; }
}

/* 播客分类两行 + 下拉 */
.pc-tabs-row1 { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; align-items: center; }
.pc-tabs-row2 { display: none; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.pc-tabs-row2.open { display: flex; }
.pc-tabs-more {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: 999px;
  background: #fff; color: var(--ink); font-size: 12.5px; font-weight: 600;
  border: 1px dashed #ffb6d9; cursor: pointer; transition: all .2s;
}
.pc-tabs-more:hover { background: #fff0f8; }
.pc-tabs-more .arrow { font-size: 10px; transition: transform .25s; }
.pc-tabs-more.open .arrow { transform: rotate(180deg); }
.pc-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px;
}
.pc-tab {
  padding: 6px 14px; border-radius: 999px;
  background: #fff; color: var(--ink); font-size: 13px; font-weight: 600;
  border: 1px solid #e6f4ec; cursor: pointer; transition: all .2s;
}
.pc-tab:hover { background: #fff0f7; }
.pc-tab.active { background: linear-gradient(135deg,#ffb1dc,#ff5fa2); color: #fff; border-color: transparent; box-shadow: 0 4px 10px rgba(255,126,182,.3); }
.pc-refresh-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 12px; padding: 0 4px;
}
/* === 每日食谱推荐（减脂·饮食）=== */
.recipe-row { display: flex; gap: 12px; flex-wrap: wrap; }
.recipe-col { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 10px; }
.recipe-meal { font-size: 14px; font-weight: 700; color: var(--pink-rose); margin-bottom: 2px; }
.recipe-card {
  border-radius: 16px; padding: 14px 12px; color: #5a3a4a;
  box-shadow: 0 6px 14px rgba(255,126,182,.16);
}
.recipe-emo { font-size: 26px; }
.recipe-name { font-weight: 700; font-size: 14px; margin-top: 6px; line-height: 1.3; color: #4a2a38; }
.recipe-kcal { font-size: 13px; font-weight: 700; color: #ff5fa2; margin-top: 4px; }
.recipe-tag { display: inline-block; font-size: 11px; background: rgba(255,255,255,.6); color: #c2185b; padding: 2px 8px; border-radius: 999px; margin-top: 6px; font-weight: 600; }
.recipe-desc { font-size: 11px; color: #6a4a55; margin-top: 6px; line-height: 1.45; }
.pc-list { display: flex; flex-direction: column; gap: 10px; }
.pc-item {
  display: flex; align-items: stretch; gap: 12px;
  background: #fff; border-radius: 16px; padding: 12px;
  text-decoration: none; color: inherit; box-shadow: 0 4px 12px rgba(255,126,182,.12);
  transition: transform .2s, box-shadow .2s;
}
.pc-item:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(255,126,182,.22); }
.pc-thumb {
  width: 64px; height: 64px; min-width: 64px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: #fff; flex-shrink: 0;
}
.pc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pc-title { font-weight: 700; font-size: 14px; line-height: 1.35; color: var(--ink); }
.pc-desc { font-size: 12px; color: var(--ink-soft); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-meta { display: flex; gap: 6px; font-size: 11px; color: var(--ink-soft); margin-top: 2px; align-items: center; flex-wrap: wrap; }
.pc-meta-src { color: #ff5fa2; font-weight: 700; }
.pc-dot { opacity: .4; }
.pc-meta-cat { background: #fff0f7; padding: 1px 6px; border-radius: 6px; color: #ff5fa2; font-weight: 600; }
.pc-meta-fav { background: #fff3e6; padding: 1px 6px; border-radius: 6px; color: #ff8a3d; font-weight: 600; }
.pc-new { background: #ff6b9d; color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; vertical-align: middle; }
.pc-fav {
  width: 36px; min-width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid #f0cfe2; background: #fff; color: #ffb14d;
  cursor: pointer; font-size: 19px; display: flex; align-items: center; justify-content: center;
  align-self: center; transition: all .2s; box-shadow: 0 3px 8px rgba(255,126,182,.12);
}
.pc-fav:hover { background: #fff7ec; transform: scale(1.08); }
.pc-fav.on { color: #ff8a3d; background: #fff0e0; border-color: #ffd2a8; }

/* === 云端同步：登录/注册覆盖层 + 同步状态 === */
.modal-bg {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(255,150,200,.18);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto; padding: 20px;
}
.login-card {
  width: min(360px, 90vw); max-height: calc(100vh - 40px); overflow-y: auto;
  background: #fff; border-radius: 22px;
  padding: 28px 24px; box-shadow: 0 20px 50px rgba(255,120,180,.25);
  text-align: center; animation: loginPop .35s ease;
}
@keyframes loginPop { from { transform: translateY(12px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.login-kitty {
  width: 80px; height: 80px; margin: 0 auto 8px;
  border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, #ffe0ec, #ffd0e6);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; line-height: 1;
  box-shadow: 0 4px 12px rgba(255, 126, 182, .22);
}
.login-kitty img { width: 100%; height: 100%; object-fit: cover; display: block; }
.login-kitty:empty::before { content: "🎀"; }
.login-card h2 { margin: 0 0 4px; color: #ff5fa2; font-size: 22px; }
.login-sub { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 16px; }
.login-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.login-tab {
  flex: 1; padding: 8px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid #f0cfe2; background: #fff; color: var(--ink);
  font-weight: 600; font-size: 13.5px; transition: all .2s;
}
.login-tab.active { background: linear-gradient(135deg,#ff9ec8,#ff5fa2); color: #fff; border-color: transparent; }
.login-err { color: #e2557a; font-size: 12px; min-height: 16px; margin: 6px 0 2px; }
.login-note { font-size: 11px; color: var(--ink-soft); margin-top: 12px; }
.login-card .field { text-align: left; margin: 0 0 10px; }
.login-card .field label { font-size: 12.5px; color: var(--ink-soft); }
.login-card .field input {
  width: 100%; padding: 10px 12px; border: 1.5px solid #f0cfe2; border-radius: 12px;
  font-size: 14px; outline: none; transition: all .2s; box-sizing: border-box;
}
.login-card .field input:focus { border-color: #ff9ec8; box-shadow: 0 3px 8px rgba(255,126,182,.18); }
.login-card .modal-actions { margin-top: 6px; }
.login-card .btn { width: 100%; padding: 11px; font-size: 14.5px; }
.login-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0 12px; color: var(--ink-soft); font-size: 11px; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: #f0cfe2; }

/* 同步状态指示（侧边栏底部） */
.sync-status { display: block; font-size: 11px; margin-top: 4px; color: var(--ink-soft); }
.sync-status.online { color: #3fbfa0; }
.sync-status.syncing { color: #5aa9e6; }
.sync-status.offline { color: #b08968; }
.sidebar-link {
  background: none; border: none; color: var(--ink-soft); font-size: 11px;
  cursor: pointer; text-decoration: underline; margin-top: 4px; padding: 0;
}
.sidebar-link:hover { color: #ff5fa2; }
@media (max-width: 760px) {
  .login-card { padding: 24px 18px; }
}

/* ===== 账号安全 / 隐私 / 设备管理（安全增强） ===== */
.login-link { display: inline-block; margin-top: 12px; color: #ff5fa2; font-size: 11.5px; cursor: pointer; text-decoration: underline; }
.login-link:hover { color: #e23e86; }
.cap-q { color: #ff5fa2; font-weight: 600; }

.account-modal .modal-card, #accountModal .modal-card { text-align: left; }
#accountModal h3, #privacyModal h3 { margin: 0 0 6px; }
#accountModal .mini-note, #privacyModal .mini-note { color: var(--ink-soft); font-size: 12px; margin: 4px 0; }
.sec { border-top: 1px solid #f3d8e7; margin-top: 12px; padding-top: 10px; }
.sec-title { font-weight: 600; font-size: 13.5px; color: var(--ink); margin-bottom: 6px; }
.sec.danger .sec-title { color: #d9534f; }
.device-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #f0d4e3; }
.device-info { min-width: 0; }
.device-name { font-size: 13px; color: var(--ink); }
.device-time { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.badge-current { font-size: 11px; color: #3fbfa0; background: #e6f7f1; border: 1px solid #b8eada; border-radius: 10px; padding: 2px 8px; }
.privacy-body p { font-size: 12.5px; line-height: 1.7; color: var(--ink); margin: 8px 0; }
.privacy-body b { color: #e23e86; }

.btn.xs { padding: 4px 10px; font-size: 11.5px; }
.btn.sm { padding: 7px 12px; font-size: 12.5px; }
.btn.danger { background: #ff5b6e; border-color: #ff5b6e; color: #fff; }
.btn.danger:hover { background: #ed4458; }

/* ===== 图形验证码（canvas） ===== */
.cap-row { display: flex; gap: 8px; align-items: center; margin: 2px 0 6px; }
.cap-canvas { display: block; width: 110px; height: 36px; border: 1.5px solid #f3c9de; border-radius: 10px; cursor: pointer; background: #fff0f6; flex-shrink: 0; }
.cap-input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 2px; font-weight: 600; }
