/* styles.css — 价值投资王国（daisyUI 补充层）
 * 框架由 daisyUI(cupcake 主题) + Tailwind 承担，本文件只保留：
 * ① 涨红跌绿（A股习惯） ② 火花喵喵灵动画 ③ 模态/气泡/Toast ④ 入场动效
 */

html { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; }
body { min-height: 100vh; }

/* ---------- 视图切换 / 空状态 ---------- */
.section { display: none; }
.section.active { display: block; }
.empty { text-align: center; padding: 30px 0; opacity: .5; }

/* ---------- A股习惯：涨红跌绿 ---------- */
.up { color: #e5484d !important; font-weight: 700; }
.down { color: #18a058 !important; font-weight: 700; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 总览今日盈亏卡片：按盈亏红/绿微着色，呼应涨红跌绿（现融入统计网格） */
.today-profit-card { transition: background .3s, border-color .3s; border: 1px solid transparent; }
.today-profit-card.up { background: linear-gradient(135deg, #fff5f3, #fff8f6); border-color: rgba(229,72,77,.18); }
.today-profit-card.down { background: linear-gradient(135deg, #f3faf5, #f7fdfa); border-color: rgba(24,160,88,.18); }
.today-profit-card #ovTodayProfit { font-variant-numeric: tabular-nums; }
.today-profit-card.up #ovTodayProfit { color: #e5484d; }
.today-profit-card.down #ovTodayProfit { color: #18a058; }

/* 总览统计卡片网格：5列自适应布局 */
#overviewStats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 1024px) {
  #overviewStats {
    grid-template-columns: repeat(5, 1fr);
  }
}
@media (max-width: 480px) {
  #overviewStats { gap: 10px; }
  #overviewStats .card-body { padding: 12px !important; }
}

/* ---------- 顶部每日名言 ---------- */
.kingdom-quote .quote-text { color: hsl(var(--nc)); }

/* ---------- 导航栏：小屏适配，图标在上文字在下 ---------- */
.nav-tabs {
  display: flex;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  margin-top: 1rem;
  padding: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: hsl(var(--b1));
  border-radius: var(--rounded-box, 1rem);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tabs .tab {
  flex: 1 0 auto;
  min-width: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 8px 6px;
  font-size: .75rem;
  line-height: 1;
  font-weight: 700;
  color: hsl(var(--bc) / .68);
  white-space: nowrap;
  border-radius: var(--rounded-btn, .5rem);
  border: 1px solid transparent;
  transition: background .15s, color .15s, transform .15s, box-shadow .15s;
}
.nav-tabs .tab:hover {
  background: hsl(var(--n) / .05);
  color: hsl(var(--bc) / .92);
}
.nav-tabs .tab.tab-active {
  background: linear-gradient(135deg, hsl(var(--p) / .24), hsl(var(--s) / .20));
  color: hsl(var(--p));
  border-color: hsl(var(--p) / .32);
  box-shadow: 0 4px 16px hsl(var(--p) / .18);
  font-weight: 800;
}
.nav-tabs .tab .nav-icon,
.nav-tabs .tab .nav-emoji {
  width: 20px;
  height: 20px;
  font-size: 18px;
  line-height: 20px;
  transition: transform .15s;
}
.nav-tabs .tab.tab-active .nav-icon,
.nav-tabs .tab.tab-active .nav-emoji { transform: scale(1.12); }
@media (min-width: 640px) {
  .nav-tabs { width: fit-content; gap: 6px; }
  .nav-tabs .tab {
    flex: 0 0 auto;
    min-width: 76px;
    flex-direction: row;
    gap: 5px;
    padding: 8px 12px;
    font-size: .875rem;
  }
  .nav-tabs .tab .nav-icon,
  .nav-tabs .tab .nav-emoji { width: 18px; height: 18px; font-size: 16px; line-height: 18px; }
}
.nav-icon--blog rect { stroke: #ff9a3c; }
.nav-icon--blog path[stroke] { stroke: #ffb27a; }

/* 持仓研报要闻 */
.digest-list { display: flex; flex-direction: column; gap: .6rem; max-height: 340px; overflow-y: auto; }
.digest-item {
  padding: .75rem .85rem;
  border-radius: .75rem;
  background: hsl(var(--b2));
  border: 1px solid hsl(var(--b3));
  transition: transform .1s, box-shadow .1s;
}
.digest-item:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.digest-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.digest-title { font-weight: 700; font-size: .9rem; }
.digest-tag {
  display: inline-block;
  margin-left: .35rem;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 700;
  background: hsl(var(--p) / .12);
  color: hsl(var(--p));
}
.digest-change { font-weight: 800; font-size: .95rem; }
.digest-item-title {
  margin-top: .35rem;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.4;
}
.digest-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed hsl(var(--p) / .5);
  transition: color .15s, border-color .15s;
}
.digest-link:hover { color: hsl(var(--p)); border-bottom-style: solid; }
.digest-summary { margin-top: .25rem; font-size: .82rem; line-height: 1.45; opacity: .78; }
.digest-source { margin-top: .35rem; font-size: .7rem; opacity: .5; }
.digest-item.up { border-left: 3px solid #e5484d; }
.digest-item.down { border-left: 3px solid #18a058; }
.digest-tag--news { background: rgba(24,160,88,.12); color: #18a058; }
.digest-tag--report { background: rgba(58,130,246,.12); color: #3a82f6; }
.digest-tag--quote { background: hsl(var(--p) / .12); color: hsl(var(--p)); }
.muted { opacity: .55; font-size: .85em; }

/* ---------- 表格排序（市场/数量/成本价/市值 可点排） ---------- */
.table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; transition: background .15s, color .15s; }
.table th.sortable:hover { background: hsl(var(--p) / .12); }
.table th.sortable.sorted { color: hsl(var(--p)); }
.sort-arrow { display: inline-block; margin-left: 3px; font-size: .8em; opacity: .5; transform: translateY(-1px); }
.table th.sortable.sorted .sort-arrow { opacity: 1; }
.badge { white-space: nowrap; }

/* ---------- 火花喵喵灵动画 ---------- */
.mz { display: inline-block; vertical-align: middle; }
.mz-mini { vertical-align: -6px; margin-right: 4px; }
.mz-float { animation: mzFloat 3s ease-in-out infinite; }
.mz-float-d { animation: mzFloat 3.4s ease-in-out .5s infinite; }
@keyframes mzFloat { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-9px) } }

.mz-eye { transform-box: fill-box; transform-origin: center; animation: mzBlink 4.2s infinite; }
@keyframes mzBlink { 0%,91%,100% { transform: scaleY(1) } 94.5% { transform: scaleY(.08) } }

.mz-flame { transform-box: fill-box; transform-origin: 50% 92%; animation: mzFlame 1.15s ease-in-out infinite; }
@keyframes mzFlame { 0%,100% { transform: scaleY(1) rotate(-2.5deg) } 50% { transform: scaleY(1.14) rotate(3deg) } }

.mz-tail { transform-box: fill-box; transform-origin: 0% 100%; animation: mzTail 1.7s ease-in-out infinite; }
@keyframes mzTail { 0%,100% { transform: rotate(-9deg) } 50% { transform: rotate(15deg) } }

.mz-ear { transform-box: fill-box; transform-origin: 50% 100%; animation: mzEar 3.2s ease-in-out infinite; }
@keyframes mzEar { 0%,100% { transform: rotate(0) } 50% { transform: rotate(-4deg) } }

/* 状态伙伴气泡（总览 hero / 登录页） */
.mz-buddy { display: flex; align-items: center; gap: 14px; }
.mz-bubble {
  position: relative; max-width: 340px; padding: 10px 16px; border-radius: 16px;
  background: hsl(var(--b1)); border: 2px solid hsl(var(--p) / .35);
  box-shadow: 0 8px 22px hsl(var(--p) / .12); font-size: 14px; line-height: 1.55;
  animation: bubblePop .5s cubic-bezier(.34,1.56,.64,1);
}
.mz-bubble::before {
  content: ''; position: absolute; left: -9px; top: 50%; transform: translateY(-50%) rotate(45deg);
  width: 14px; height: 14px; background: inherit; border-left: 2px solid hsl(var(--p) / .35);
  border-bottom: 2px solid hsl(var(--p) / .35); border-radius: 0 0 0 4px;
}
.mz-bubble.win { border-color: rgba(229,72,77,.4); }
.mz-bubble.lose { border-color: rgba(24,160,88,.4); }
@keyframes bubblePop { from { opacity: 0; transform: scale(.85) translateY(6px) } to { opacity: 1; transform: none } }

/* ---------- 模态（自定义 show 模式，daisyUI 配色） ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center;
  background: hsl(var(--n) / .45); backdrop-filter: blur(3px); padding: 16px;
}
.modal-mask.show { display: flex; }
.modal-mask .ik-modal {
  width: 100%; max-width: 520px; max-height: 88vh; overflow: auto;
  background: hsl(var(--b1)); color: hsl(var(--bc)); border-radius: var(--rounded-box, 1rem);
  padding: 24px; box-shadow: 0 24px 60px hsl(var(--n) / .3);
  animation: modalIn .28s cubic-bezier(.34,1.56,.64,1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.96) } to { opacity: 1; transform: none } }
.ik-modal h3 { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.ik-modal .field { margin-bottom: 12px; }
.ik-modal .field label { display: block; font-size: 13px; opacity: .65; margin-bottom: 5px; }
.ik-modal .field input, .ik-modal .field select, .ik-modal .field textarea { width: 100%; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ---------- Toast（成就/旁白） ---------- */
.narration-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.toast-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px;
  background: hsl(var(--b1)); border: 1.5px solid hsl(var(--p) / .4);
  box-shadow: 0 12px 32px hsl(var(--n) / .22); max-width: 320px;
  animation: toastIn .4s cubic-bezier(.34,1.56,.64,1);
}
.toast-item .t-ico { font-size: 24px; }
.toast-item .t-title { font-weight: 800; font-size: 14px; }
.toast-item .t-sub { font-size: 12px; opacity: .6; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) } to { opacity: 1; transform: none } }

/* ---------- 入场 stagger ---------- */
.stagger { animation: riseIn .5s both; animation-delay: calc(var(--i, 0) * 80ms); }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }

/* ---------- 成就殿堂 ---------- */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ach {
  text-align: center; padding: 14px 8px; border-radius: var(--rounded-box, 1rem);
  background: hsl(var(--b2)); border: 1.5px dashed hsl(var(--bc) / .18); transition: transform .2s;
}
.ach.unlocked { background: hsl(var(--p) / .12); border: 1.5px solid hsl(var(--p) / .45); }
.ach.unlocked:hover { transform: translateY(-3px); }
.ach.just-unlocked { animation: achPop .6s cubic-bezier(.34,1.56,.64,1); }
@keyframes achPop { 0% { transform: scale(.6) } 60% { transform: scale(1.12) } 100% { transform: scale(1) } }
.ach-ico { font-size: 26px; }
.ach.locked .ach-ico { filter: grayscale(1); opacity: .45; }
.ach-name { font-weight: 700; font-size: 13px; margin-top: 4px; }
.ach-desc { font-size: 11px; opacity: .55; margin-top: 2px; }
.ach.locked .ach-name, .ach.locked .ach-desc { opacity: .4; }

/* ---------- 搜索结果 ---------- */
.search-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  transition: background .15s;
}
.search-item:hover { background: hsl(var(--b2)); }
.search-item + .search-item { border-top: 1px dashed hsl(var(--bc) / .12); }
.si-main { flex: 1; min-width: 0; }
.si-name { font-weight: 700; }
.si-chg { font-size: 12px; margin-left: 6px; }

/* ---------- 博客 ---------- */
.blog-card {
  cursor: pointer; background: hsl(var(--b1)); border-radius: var(--rounded-box, 1rem);
  padding: 18px 20px; box-shadow: 0 2px 10px hsl(var(--n) / .06); border: 1px solid hsl(var(--bc) / .08);
  transition: transform .18s, box-shadow .18s;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px hsl(var(--n) / .12); }
.blog-card h4 { font-size: 16px; font-weight: 800; }
.blog-card .meta { font-size: 12px; opacity: .5; margin: 4px 0 8px; display: flex; gap: 8px; }
.blog-card .excerpt { font-size: 13.5px; opacity: .75; line-height: 1.6; }
.blog-view-body { white-space: pre-wrap; line-height: 1.8; font-size: 14.5px; margin: 10px 0; }
.blog-view-meta { font-size: 12px; opacity: .5; }

/* ---------- 新手引导 ---------- */
.onboard-mask {
  position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center;
  background: hsl(var(--n) / .5); backdrop-filter: blur(4px); padding: 16px;
}
.onboard-mask.show { display: flex; }
.onboard-card {
  width: 100%; max-width: 460px; text-align: center; background: hsl(var(--b1));
  border-radius: var(--rounded-box, 1rem); padding: 28px 26px; box-shadow: 0 24px 60px hsl(var(--n) / .3);
  animation: modalIn .35s cubic-bezier(.34,1.56,.64,1);
}
.onboard-card h3 { font-size: 20px; font-weight: 900; margin: 6px 0 8px; }
.onboard-card p { font-size: 14px; opacity: .7; line-height: 1.7; }
.onboard-mascots { display: flex; justify-content: center; gap: 6px; }
.onboard-steps { display: flex; justify-content: center; gap: 10px; margin: 16px 0; flex-wrap: wrap; }
.onboard-steps .os {
  font-size: 12.5px; padding: 6px 12px; border-radius: 999px;
  background: hsl(var(--b2)); border: 1px solid hsl(var(--bc) / .12);
}
.onboard-actions { display: flex; justify-content: center; gap: 12px; margin-top: 8px; }

/* ---------- 图表画布 ---------- */
canvas { display: block; width: 100%; }

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background:
    radial-gradient(600px 300px at 15% 10%, hsl(var(--p) / .14), transparent 60%),
    radial-gradient(500px 280px at 85% 85%, hsl(var(--s) / .16), transparent 60%),
    hsl(var(--b2));
}
.login-stage { display: flex; align-items: center; gap: 42px; flex-wrap: wrap; justify-content: center; }
.login-mascots { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.login-mascots .duo { display: flex; align-items: flex-end; gap: 6px; }
.login-card {
  width: 100%; max-width: 380px; background: hsl(var(--b1)); border-radius: var(--rounded-box, 1rem);
  padding: 30px 28px; box-shadow: 0 20px 50px hsl(var(--n) / .16);
}
.login-title { font-size: 24px; font-weight: 900; text-align: center; letter-spacing: 1px; }
.login-sub { text-align: center; font-size: 13px; opacity: .55; margin: 6px 0 18px; }
.msg { min-height: 22px; text-align: center; font-size: 13px; margin-top: 10px; }
.msg.err { color: #e5484d; }
.msg.ok { color: #18a058; }
.switch-line { text-align: center; font-size: 13px; opacity: .7; margin-top: 12px; }
.switch-line a { color: hsl(var(--p)); cursor: pointer; font-weight: 700; text-decoration: underline; }

/* ---------- 隐藏滚动条（导航横向滚动更干净） ---------- */
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ---------- 券商式建仓抽屉 ---------- */
.hs-grab { display: none; }
.holding-sheet { max-width: 540px; }
.hs-searchbar { display: flex; gap: 8px; }
.hs-manual-toggle { display: block; width: 100%; text-align: center; margin-top: 12px; font-size: 12.5px; color: hsl(var(--p)); opacity: .8; background: none; border: 0; cursor: pointer; }
.hs-manual-toggle:hover { opacity: 1; }
.hs-manual .field { margin-top: 10px; }
.hs-stock-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hs-stock-head .hs-name { font-size: 17px; font-weight: 900; }
.hs-quote { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 4px; padding: 10px 12px; border-radius: 14px; background: hsl(var(--b2)); }
.hs-quote .hs-price { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.hs-quote .hs-chg { font-size: 14px; font-weight: 700; }
.hs-quote .hs-live { margin-left: auto; font-size: 11px; opacity: .55; align-self: center; }
.hs-est { margin-top: 8px; font-size: 13px; opacity: .7; text-align: right; font-variant-numeric: tabular-nums; }
.hs-delete { display: block; width: 100%; margin-top: 12px; background: none; border: 0; color: #e5484d; font-size: 13px; cursor: pointer; opacity: .8; }
.hs-delete:hover { opacity: 1; }

/* ---------- 社交式个人中心 ---------- */
.profile-card {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, hsl(var(--p) / .14), hsl(var(--s) / .12));
  border-radius: 1.25rem; padding: 18px 20px; margin-top: 12px;
  box-shadow: 0 8px 22px hsl(var(--n) / .08);
}
.profile-avatar {
  width: 62px; height: 62px; flex: none; border-radius: 50%;
  background: hsl(var(--b1)); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px hsl(var(--n) / .15);
}
.profile-info { flex: 1; min-width: 0; }
.profile-name { font-size: 19px; font-weight: 900; }
.profile-sub { font-size: 12px; opacity: .6; margin-top: 3px; }
.set-group { margin-top: 16px; }
.set-group-title { font-size: 12px; opacity: .5; margin: 0 6px 6px; font-weight: 700; }
.set-row {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: hsl(var(--b1)); border: 1px solid hsl(var(--bc) / .08); border-radius: .9rem;
  padding: 14px 16px; margin-bottom: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .15s, transform .1s;
}
.set-row:hover { background: hsl(var(--b2)); }
.set-row:active { transform: scale(.995); }
.set-chev { font-size: 18px; opacity: .4; }
.set-logout { color: #e5484d; justify-content: center; }
.set-logout:hover { background: hsl(0 72% 51% / .08); }

/* ---------- 移动端卡片列表（替代横向滚动表格） ---------- */
.ht-mobile { display: none; }
.hcard {
  background: hsl(var(--b1)); border: 1px solid hsl(var(--bc) / .08); border-radius: 1rem;
  padding: 14px 16px; margin-bottom: 10px; box-shadow: 0 2px 10px hsl(var(--n) / .05);
  transition: transform .15s; cursor: pointer;
}
.hcard:active { transform: scale(.99); }
.hcard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hcard-name { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.hcard-name .hn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hcard-price { margin: 8px 0; display: flex; align-items: baseline; gap: 8px; }
.hcard-price .p { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hcard-price .c { font-size: 12px; font-weight: 700; }
.hcard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hcard-grid > div { display: flex; flex-direction: column; }
.hcard-grid .k { font-size: 11px; opacity: .5; }
.hcard-grid .v { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- 移动端：模态变底部抽屉 ---------- */
/* 断点提到 768px：平板/大屏手机竖屏（如 768px）改走卡片布局，
   修复此前 640px 断点下竖屏桌面表格被横向挤压的问题；横屏手机(通常>768)仍走桌面，保持原有手感 */
@media (max-width: 768px) {
  .login-stage { gap: 18px; }
  .mz-bubble { max-width: 260px; font-size: 13px; }

  .modal-mask { align-items: flex-end; padding: 0; }
  .modal-mask .ik-modal {
    max-width: 100%; width: 100%;
    border-radius: 1.25rem 1.25rem 0 0;
    padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
    animation: sheetUp .32s cubic-bezier(.34, 1.56, .64, 1);
  }
  .hs-grab { display: block; width: 40px; height: 4px; border-radius: 999px; background: hsl(var(--bc) / .2); margin: 4px auto 12px; }

  /* 表格 → 卡片：桌面表隐藏，移动卡片显示 */
  .ht-desktop { display: none !important; }
  .ht-mobile { display: block; }

  /* 概览紧凑化 */
  #overviewStats .card-body { padding: 12px !important; }
  .navbar { padding-left: 8px; padding-right: 8px; }

  /* 竖屏更细打磨：窄屏下卡片信息改 2×2，触控更舒适、信息不挤 */
  @media (max-width: 480px) {
    .hcard-grid, .ccard-grid { grid-template-columns: repeat(2, 1fr); gap: 10px 8px; }
    .hcard-price .p, .ccard-pl { font-size: 17px; }
    .hcard-name, .ccard-name { font-size: 15px; }
    #overviewStats { gap: 10px; }
    .navbar .text-base { font-size: 15px; }
    .profile-name { font-size: 18px; }
    .set-row { padding: 16px; font-size: 15px; }
    .profile-card { padding: 16px; }
  }
}

/* 动态视口高度：避免移动端浏览器地址栏遮挡/留白导致底部抽屉被截断 */
@supports (height: 100dvh) {
  .modal-mask .ik-modal { max-height: 92dvh; }
  .onboard-card { max-height: 92dvh; }
}

@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }

/* ---------- 已清仓卡片（与持仓卡片同语言，展示清仓盈亏） ---------- */
.ccard {
  background: hsl(var(--b1)); border: 1px solid hsl(var(--bc) / .08); border-radius: 1rem;
  padding: 14px 16px; margin-bottom: 10px; box-shadow: 0 2px 10px hsl(var(--n) / .05);
  transition: transform .15s;
}
.ccard:active { transform: scale(.995); }
.ccard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ccard-top-right { display: flex; align-items: center; gap: 8px; flex: none; }
.ccard-del { font-size: 12px; color: hsl(var(--er)); background: transparent; border: 1px solid hsl(var(--er) / .4); border-radius: 6px; padding: 2px 10px; cursor: pointer; line-height: 1.4; }
.ccard-del:hover { background: hsl(var(--er) / .12); }
.ccard-name { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.ccard-name .hn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccard-pl { margin: 8px 0; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ccard-pl .ccard-pct { font-size: 12px; font-weight: 700; margin-left: 8px; }
.ccard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ccard-grid > div { display: flex; flex-direction: column; }
.ccard-grid .k { font-size: 11px; opacity: .5; }
.ccard-grid .v { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ============================================================
   方向 A · 糖果乐园 Pro（UI 质感升级）
   仅新增自定义类，不改动既有 daisyUI 行为；改动后无需重跑 build-css
   设计约束：保留 .ik-modal、火花+喵喵 IP、涨红跌绿、人民币计价
   ============================================================ */

/* 弹窗整体：更柔的浮起感 + 定位上下文（供印章绝对定位） */
.ik-modal { position: relative; border: 1px solid hsl(var(--bc) / .06); }
.modal-mask .ik-modal { box-shadow: 0 28px 72px hsl(var(--n) / .30), 0 2px 10px hsl(var(--n) / .08); }

/* 主题光带：建仓=火花 / 清仓=喵喵 / 其余=柔和默认 */
.ik-band {
  display: flex; align-items: center; gap: 12px;
  border-radius: 18px; padding: 14px 16px; margin-bottom: 16px;
  position: relative; overflow: hidden;
}
.ik-band--fire { background: linear-gradient(135deg, #ffe2ba, #ffc4d7); }
.ik-band--grass { background: linear-gradient(135deg, #d8f3cf, #cfe9ff); }
.ik-band--soft { background: linear-gradient(135deg, hsl(var(--p) / .14), hsl(var(--s) / .14)); }
.ik-band--candy { background: linear-gradient(135deg, #ffd9e8, #ffe8f3 52%, #fff0f7); }
.ik-band h3 { margin: 0; }
.ik-band__mascot { flex: none; width: 52px; height: 52px; animation: mzFloat 3.2s ease-in-out infinite; }
.ik-band__txt { position: relative; z-index: 1; min-width: 0; }
.ik-band__txt b { display: block; font-size: 17px; font-weight: 900; letter-spacing: .3px; color: hsl(var(--bc)); }
.ik-band__txt small { font-size: 11.5px; opacity: .7; }

/* 步骤进度（建仓两步：选伙伴 → 签契约） */
.ik-stepper { display: flex; align-items: center; gap: 8px; margin: 0 2px 16px; }
.ik-step { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; }
.ik-dot {
  width: 23px; height: 23px; border-radius: 50%; flex: none;
  font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  background: hsl(var(--b1)); color: #ffb38a; box-shadow: inset 0 0 0 2px #ffd9c2;
  transition: background .3s, color .3s, box-shadow .3s, transform .3s;
}
.ik-step.on .ik-dot { background: #ff7a59; color: #fff; box-shadow: 0 4px 12px hsl(20 100% 63% / .4); transform: scale(1.05); }
.ik-step__t { font-size: 12.5px; font-weight: 700; color: #c9a99c; white-space: nowrap; transition: color .3s; }
.ik-step.on .ik-step__t { color: #ff7a59; }
.ik-bar { flex: 1; height: 3px; border-radius: 3px; background: #ffd9c2; transition: background .3s; }
.ik-bar.fill { background: linear-gradient(90deg, #ff8a3d, #ff5d8f); }

/* 玻璃质感输入（聚焦发光，不破坏 daisyUI 默认外观）
   2026-08-07：默认背景改为不透明 hsl(var(--b1))，避免弹窗下半部分透出后网页 */
.ik-modal .input, .ik-modal .select, .ik-modal .textarea {
  background: hsl(var(--b1));
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.ik-modal .input:focus, .ik-modal .select:focus, .ik-modal .textarea:focus {
  border-color: hsl(var(--p));
  box-shadow: 0 0 0 4px hsl(var(--p) / .18);
  outline: none;
}
/* 主题呼应：输入框实底跟随对应主题光带色调（仍不透明，避免透出后网页） */
.ik-modal--fire .input, .ik-modal--fire .select, .ik-modal--fire .textarea { background: #fff4ec; }
.ik-modal--grass .input, .ik-modal--grass .select, .ik-modal--grass .textarea { background: #edf8ef; }
.ik-modal--candy .input, .ik-modal--candy .select, .ik-modal--candy .textarea { background: #fff8fb; }

/* 主题整框（建仓=火花 / 清仓=喵喵 / 博客=糖果粉）：整框背景/边框/光晕跟随 IP 主色
   用 .modal-mask 前缀抬高优先级，盖过基础 .modal-mask .ik-modal 的默认底色 */
.modal-mask .ik-modal--fire {
  background:
    radial-gradient(120% 78% at 50% -12%, #ffe9d6 0%, rgba(255,233,214,0) 56%),
    linear-gradient(180deg, #fffaf4 0%, #fffdfb 72%, #fff 100%);
  border-color: #ffd8c2;
  box-shadow: 0 28px 72px rgba(255,122,89,.26), 0 2px 12px rgba(255,93,143,.14);
}
.modal-mask .ik-modal--grass {
  background:
    radial-gradient(120% 78% at 50% -12%, #e3f7e8 0%, rgba(227,247,232,0) 56%),
    linear-gradient(180deg, #f6fdf7 0%, #fbfffc 72%, #fff 100%);
  border-color: #c6e9cf;
  box-shadow: 0 28px 72px rgba(52,199,89,.22), 0 2px 12px rgba(58,160,255,.14);
}
.modal-mask .ik-modal--candy {
  background:
    radial-gradient(120% 78% at 50% -12%, #ffe4f0 0%, rgba(255,228,240,0) 56%),
    linear-gradient(180deg, #fff5f9 0%, #fffbfd 72%, #fff 100%);
  border-color: #ffd0e3;
  box-shadow: 0 28px 72px rgba(255,93,163,.22), 0 2px 12px rgba(255,143,199,.14);
}
/* 主题主按钮：呼应 IP 主色（覆盖 daisyUI 默认 primary） */
.modal-mask .ik-modal--fire .btn-primary {
  background: linear-gradient(135deg, #ff8a3d, #ff5d8f);
  border-color: transparent; color: #fff;
  box-shadow: 0 10px 24px rgba(255,93,143,.34);
}
.modal-mask .ik-modal--grass .btn-primary {
  background: linear-gradient(135deg, #34c759, #3aa0ff);
  border-color: transparent; color: #fff;
  box-shadow: 0 10px 24px rgba(52,199,89,.30);
}
.modal-mask .ik-modal--candy .btn-primary {
  background: linear-gradient(135deg, #ff8ab4, #ff5d9e);
  border-color: transparent; color: #fff;
  box-shadow: 0 10px 24px rgba(255,93,158,.34);
}
/* 主题提示气泡：跟随对应 IP 色调（原默认用 --p） */
.modal-mask .ik-modal--fire .ik-bubble { background: #fff1e8; border-color: #ffd0bb; }
.modal-mask .ik-modal--grass .ik-bubble { background: #eafaf0; border-color: #c5e9cf; }
/* 主题聚焦圈：输入框聚焦发光也跟随 IP 主色 */
.modal-mask .ik-modal--fire .input:focus,
.modal-mask .ik-modal--fire .select:focus,
.modal-mask .ik-modal--fire .textarea:focus {
  border-color: #ff8a3d; box-shadow: 0 0 0 4px rgba(255,138,61,.2);
}
.modal-mask .ik-modal--grass .input:focus,
.modal-mask .ik-modal--grass .select:focus,
.modal-mask .ik-modal--grass .textarea:focus {
  border-color: #34c759; box-shadow: 0 0 0 4px rgba(52,199,89,.2);
}
.modal-mask .ik-modal--candy .input:focus,
.modal-mask .ik-modal--candy .select:focus,
.modal-mask .ik-modal--candy .textarea:focus {
  border-color: #ff8ab4; box-shadow: 0 0 0 4px rgba(255,138,180,.2);
}
/* 主题按下态辉光也跟随 IP 主色 */
.modal-mask .ik-modal--fire .btn-primary:active { transform: translateY(1px) scale(.99); box-shadow: 0 6px 16px rgba(255,93,143,.3); }
.modal-mask .ik-modal--grass .btn-primary:active { transform: translateY(1px) scale(.99); box-shadow: 0 6px 16px rgba(52,199,89,.28); }
.modal-mask .ik-modal--candy .btn-primary:active { transform: translateY(1px) scale(.99); box-shadow: 0 6px 16px rgba(255,93,158,.3); }

/* 主按钮微光 */
.ik-modal .btn-primary { box-shadow: 0 10px 24px hsl(var(--p) / .28); transition: transform .12s, box-shadow .2s; }
.ik-modal .btn-primary:active { transform: translateY(1px) scale(.99); box-shadow: 0 6px 16px hsl(var(--p) / .25); }

/* 弹窗内吉祥物气泡 */
.ik-bubble {
  display: flex; align-items: center; gap: 9px; margin-top: 12px;
  background: hsl(var(--p) / .08); border: 1.5px solid hsl(var(--p) / .25);
  border-radius: 16px; padding: 10px 14px; font-size: 12.5px; color: hsl(var(--bc) / .82); line-height: 1.5;
  animation: bubblePop .45s cubic-bezier(.34,1.56,.64,1);
}
.ik-bubble--grass { background: hsl(140 50% 45% / .10); border-color: hsl(140 45% 45% / .28); }
.ik-bubble b { font-weight: 800; }

/* 成功印章（保存后弹出） */
.ik-stamp {
  position: absolute; right: 18px; top: 72px; z-index: 5;
  width: 66px; height: 66px; border-radius: 50%;
  border: 3px solid #ff7a59; color: #ff7a59; font-weight: 900; font-size: 12px; line-height: 1.15;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: hsl(var(--b1) / .92);
  box-shadow: 0 8px 20px hsl(20 100% 63% / .3);
  transform: rotate(-14deg) scale(0); opacity: 0; pointer-events: none;
}
.ik-stamp.show { animation: stampIn .5s cubic-bezier(.34,1.56,.64,1) forwards; }
.ik-stamp--grass { border-color: #3f9e6f; color: #3f9e6f; box-shadow: 0 8px 20px hsl(140 50% 45% / .3); }
@keyframes stampIn { 0% { transform: rotate(-14deg) scale(2.4); opacity: 0; } 60% { opacity: .95; } 100% { transform: rotate(-14deg) scale(1); opacity: .95; } }

/* 全局轻量抛光：卡片悬浮微浮起 */
.blog-card:hover, .hcard:hover, .ccard:hover { box-shadow: 0 14px 30px hsl(var(--n) / .12); }
.card { transition: box-shadow .2s, transform .2s; }

/* 清仓盈亏输入：大字号 + 等宽数字（实时红绿由 app.js 控制） */
.ik-profit { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* 页脚 / 备案信息（工信部要求：备案号须展示并链接至 beian.miit.gov.cn） */
.ik-footer { margin-top: 1.25rem; padding: .5rem 0 .25rem; }
.ik-footer-inner {
  display: flex; flex-wrap: wrap; gap: .3rem .75rem;
  align-items: center; justify-content: center;
  font-size: .72rem; line-height: 1.6; opacity: .5;
}
.ik-footer a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.ik-footer a:hover { opacity: .75; }

/* 站点：investvalue.monster ｜ 沪ICP备2026040613号 */
