/* diary.css · 页面级样式（由 diary.html 提取） */
/* ============ 页头（沿用首页 hero 渐变面板） ============ */
.dp-hero{padding:26px 0 6px}
.dp-hero .hero-panel{padding:26px 36px 28px}
.dp-hero .hero-inner{gap:32px}
.dp-crumb{
  display:flex;align-items:center;gap:7px;font-size:12px;
  color:rgba(255,255,255,.66);margin-bottom:12px;
}
.dp-crumb a{color:rgba(255,255,255,.82);transition:.16s}
.dp-crumb a:hover{color:#fff}
.dp-crumb .sep{opacity:.5}
.dp-hero .hero-badge{margin-bottom:14px}
.dp-hero h1{font-size:30px;margin-bottom:8px}
.dp-hero .lead{max-width:560px}
.dp-hero .lead b{color:#fff;font-weight:600}
.dp-hero .cta{margin-top:18px}
.hero-search{
  display:flex;align-items:center;gap:8px;background:#fff;border-radius:999px;
  padding:10px 18px;flex:1 1 240px;max-width:320px;
  box-shadow:0 12px 26px -16px rgba(0,0,0,.55);transition:.18s;
}
.hero-search:focus-within{box-shadow:0 0 0 4px rgba(255,255,255,.28),0 12px 26px -16px rgba(0,0,0,.55)}
.hero-search svg{width:15px;height:15px;stroke:var(--faint);fill:none;stroke-width:2;flex-shrink:0}
.hero-search input{
  border:none;outline:none;background:none;font-family:inherit;
  font-size:13.5px;line-height:1.5;color:var(--ink);width:100%;min-width:0;
}
.hero-search input::placeholder{color:var(--faint)}
.dp-hero .btn-glass{
  cursor:pointer;font-family:inherit;letter-spacing:.01em;
  padding:10px 20px;font-size:13.5px;
}

/* ============ 正文区 ============ */
/* 注意：这里与 .wrap 同元素，绝不能用 padding 简写（会把左右 24px 归零） */
.dp-body{padding-top:26px;padding-bottom:10px}
.dp-main{min-width:0}

/* ============ 月度小结（正文区视觉重点） ============ */
.mcard{
  position:relative;overflow:hidden;isolation:isolate;
  margin-bottom:18px;padding:17px 20px 16px;border-radius:18px;
  border:1px solid #D8E3FA;
  background:
    radial-gradient(115% 130% at 100% -10%, rgba(123,97,255,.15), transparent 58%),
    radial-gradient(90% 120% at -8% 118%, rgba(47,107,255,.10), transparent 60%),
    linear-gradient(180deg,#F6FAFF,#F0F4FF 92%);
  box-shadow:0 20px 44px -34px rgba(47,107,255,.85),0 1px 2px rgba(24,42,90,.04);
}
.mcard::before{  /* 顶部渐变色带 */
  content:"";position:absolute;left:0;right:0;top:0;height:3px;z-index:2;
  background:linear-gradient(90deg,var(--blue),#7B61FF 48%,#F0A35E);
}
.mcard::after{   /* 右上角柔光 */
  content:"";position:absolute;right:-64px;top:-96px;width:240px;height:240px;border-radius:50%;
  background:radial-gradient(circle,rgba(123,97,255,.18),transparent 70%);
  pointer-events:none;z-index:0;
}
.mcard-top{position:relative;z-index:1;display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.mhead{display:flex;align-items:center;gap:11px;min-width:0;margin-right:auto}
.mico{
  width:36px;height:36px;flex:0 0 36px;border-radius:11px;
  display:inline-flex;align-items:center;justify-content:center;
  background:linear-gradient(145deg,#3B74FF,#6B5BFF);
  box-shadow:0 10px 20px -12px rgba(59,116,255,.95);
}
.mico svg{width:18px;height:18px;fill:none;stroke:#fff;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.mcard .ml{display:block;font-family:var(--mono);font-size:10.5px;letter-spacing:.08em;color:var(--blue);opacity:.85;margin-bottom:1px}
.mcard .mt{font-size:16.5px;font-weight:700;color:var(--ink);line-height:1.35;letter-spacing:.01em;margin:0}
.mstats{display:flex;align-items:center}
/* 迷你走势图（本月 8 个交易日累计涨跌） */
.mtick{display:flex;flex-direction:column;gap:7px;margin-right:18px;flex:0 0 auto}
.mtick small{font-size:10.5px;line-height:1;color:var(--faint);letter-spacing:.03em}
.mspark{display:block;width:148px;height:42px;overflow:visible}

.mcell{display:flex;flex-direction:column;gap:2px;padding-left:16px;margin-left:16px;border-left:1px solid #DBE5FA}
.mcell:first-child{padding-left:0;margin-left:0;border-left:none}
.mcell b{font-family:var(--mono);font-size:20px;font-weight:700;color:var(--ink);line-height:1.25;letter-spacing:-.01em}
.mcell b em{font-style:normal;font-weight:700}
.mcell b .win{color:var(--red)}
.mcell b .lose{color:var(--green)}
.mcell b .tie{color:var(--muted)}
.mcell b .slash{color:#C6D3EC;font-weight:400;font-size:15px;margin:0 2px}
.mcell b.g{color:var(--green)}
.mcell b.b{color:var(--blue)}
.mcell small{font-size:11px;color:var(--muted)}
.mbar{display:block;width:100%;min-width:64px;height:4px;border-radius:2px;background:rgba(47,107,255,.15);margin-top:5px;overflow:hidden}
.mbar i{display:block;height:100%;border-radius:2px;background:linear-gradient(90deg,var(--blue),#7B61FF)}
.mscore{min-width:80px}
.mnote{
  position:relative;z-index:1;display:flex;align-items:flex-start;gap:9px;flex-wrap:wrap;
  margin-top:13px;padding-top:12px;border-top:1px dashed #D5E1F8;
  font-size:12.5px;line-height:1.82;color:var(--ink-2);
}
.mnote .mtag{
  flex:0 0 auto;font-size:11px;font-weight:600;color:var(--blue);
  background:#fff;border:1px solid #DCE6FA;border-radius:999px;
  padding:1px 9px;line-height:1.75;margin-top:1px;
}
.mnote p{margin:0;min-width:0;flex:1 1 180px}
.mnote b{color:var(--orange-deep);font-weight:600}

/* 日记卡（复用 .note 骨架，只补日记特有元素） */
.dlog{scroll-margin-top:84px}
.dlog[data-cat="建仓"]{--acc:var(--blue)}
.dlog[data-cat="加减仓"]{--acc:#7B61FF}
.dlog[data-cat="止损"]{--acc:#F0913F}
.dlog[data-cat="空仓"]{--acc:var(--green)}
.dlog[data-cat="心态"]{--acc:#E5607F}

.dl-ops{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  margin-top:9px;font-size:12.5px;color:var(--ink-2);line-height:1.7;
}
.op{
  font-size:11px;font-weight:600;line-height:1.7;padding:1px 8px;border-radius:6px;white-space:nowrap;
}
.op.buy{background:var(--red-soft);color:var(--red)}
.op.sell{background:var(--green-soft);color:var(--green)}
.op.none{background:#F2F5FB;color:var(--muted)}

.dl-more{margin-top:11px;border-top:1px dashed var(--line)}
.dl-more summary{
  list-style:none;cursor:pointer;padding:9px 0 0;font-size:12px;color:var(--muted);
  display:flex;align-items:center;gap:6px;transition:.16s;width:fit-content;
}
.dl-more summary::-webkit-details-marker{display:none}
.dl-more summary:hover{color:var(--blue)}
.dl-more summary::before{
  content:"＋";font-family:var(--mono);font-size:11px;color:var(--blue);
  width:15px;height:15px;border-radius:5px;background:var(--blue-soft);
  display:grid;place-items:center;flex-shrink:0;line-height:1;
}
.dl-more[open] summary::before{content:"－"}
.dl-more .t2{display:none}
.dl-more[open] .t1{display:none}
.dl-more[open] .t2{display:inline}
.dl-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px;margin-top:6px}
.dl-grid div{display:flex;gap:9px;padding:7px 0;border-bottom:1px dashed var(--line);font-size:12.5px}
.dl-grid div:last-child,.dl-grid div:nth-last-child(2):nth-child(odd){border-bottom:none}
.dl-grid dt{flex:0 0 46px;font-size:11.5px;color:var(--faint);letter-spacing:.04em;line-height:1.9}
.dl-grid dd{color:var(--ink-2);line-height:1.8;min-width:0}
.dl-grid dd b{color:var(--ink);font-weight:600}

.dl-score{margin-left:auto;font-size:11.5px;color:var(--faint);white-space:nowrap}
.dl-score b{font-family:var(--mono);color:var(--ink-2);font-weight:700;font-size:12px}

.dl-arch{
  margin-top:14px;font-size:12px;line-height:1.9;color:var(--faint);
  background:#fff;border:1px dashed var(--line-2);border-radius:12px;padding:12px 16px;
}
.dl-arch a{color:var(--blue)}

/* 纪律分条 */
.meter{height:5px;border-radius:99px;background:var(--line);overflow:hidden;margin-top:7px}
.meter i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,var(--blue),var(--violet))}
.dstat{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px dashed var(--line);font-size:12.5px}
.dstat:last-of-type{border-bottom:none;padding-bottom:2px}
.dstat span{color:var(--muted)}
.dstat b{font-family:var(--mono);font-size:13.5px;color:var(--ink);font-weight:700}
.dstat b.g{color:var(--red)}
.dstat b.r{color:var(--green)}
.dstat b.n{color:var(--muted)}

@media(max-width:1040px){
  .dp-body{padding-top:20px}
}
/* 有右侧栏且主栏偏窄时，卡片放不下走势图，直接收起，避免数据换行 */
@media(min-width:1041px) and (max-width:1140px){
  .mtick{display:none}
}
@media(max-width:760px){
  .dp-hero{padding-top:16px}
  .dp-hero .hero-panel{padding:22px 20px 24px;border-radius:18px}
  .dp-hero h1{font-size:24px;margin-bottom:7px}
  .dp-hero .lead{font-size:13px;max-width:100%}
  .dp-crumb{margin-bottom:10px}
  .hero-search{max-width:100%;padding:10px 15px}
  .mcard{padding:15px 15px 14px;border-radius:16px}
  .mcard-top{gap:13px}
  .mhead{width:100%;margin-right:0}
  .mico{width:32px;height:32px;flex-basis:32px;border-radius:10px}
  .mico svg{width:16px;height:16px}
  .mcard .mt{font-size:15.5px}
  .mtick{display:none}
  /* 移动端：小结数据两列栅格，避免第 4 项单独换行 */
  .mstats{display:grid;grid-template-columns:1fr 1fr;gap:13px 0;width:100%}
  .mcell{padding-left:0;margin-left:0;border-left:none}
  .mcell:nth-child(even){padding-left:14px;border-left:1px solid #DBE5FA}
  .mcell b{font-size:18px}
  .mnote{display:block;margin-top:12px;padding-top:11px}
  .mnote .mtag{display:inline-block;margin:0 0 6px}
  .dl-grid{grid-template-columns:1fr}
  .dl-grid div{border-bottom:1px dashed var(--line)}
  .dl-grid div:last-child{border-bottom:none}
  .dl-score{margin-left:0}
  .dl-ops{font-size:12px;gap:6px}
}
