/* 3 日常（日历）。class 一律 dl- 开头。质感照客户：顶上一幅油画 + 底边蕾丝，月历卡带蕾丝角，信纸底 */
.dl { position: relative; min-height: 100%; padding-bottom: calc(90px + var(--safe-b)); }
.dl .lace-edge { top: 0; z-index: 3; }

/* 顶上的油画 + 一道蕾丝 */
.dl-hero { position: relative; height: 236px; overflow: hidden; }
.dl-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 60%; }
.dl-hero .veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(137, 123, 141, .25), rgba(169, 154, 170, .08) 40%, rgba(248, 243, 236, .35) 85%, var(--paper)); }
.dl-hero .lace { position: absolute; left: 0; right: 0; bottom: -2px; height: 16px; background: url(../assets/lace-h.png) repeat-x; background-size: auto 16px; transform: scaleY(-1); filter: drop-shadow(0 -1px 1px rgba(81, 75, 74, .15)); }
.dl-hero .bar { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; padding: calc(var(--status-h) + 6px) 18px 0; }
.dl-hero .tt { position: absolute; left: 24px; bottom: 26px; display: flex; flex-direction: column; color: var(--ink); padding: 8px 16px 8px 14px; border-radius: 3px 14px 3px 14px;
  background: rgba(250, 246, 240, .74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .7), 0 4px 12px rgba(81, 75, 74, .15); }
.dl-hero h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: 6px; color: var(--teal-deep); }
.dl-hero .tt i { font-family: var(--font-script); font-style: normal; font-size: 19px; line-height: 1.1; color: var(--mauve-deep); }
.dl-hero .tt p { margin: 3px 0 0; font-size: 11.5px; letter-spacing: 1px; color: var(--ink-2); }

/* 月历卡（照客户参考图：月份两边小箭头，选中的那天一个藕紫实心圆） */
.dl-cal { position: relative; margin: 6px 22px 0; padding: 14px 14px 10px; border-radius: 4px;
  background-color: var(--card); background-image: radial-gradient(rgba(169, 154, 170, .14) .6px, transparent .7px); background-size: 5px 5px;
  box-shadow: 0 0 0 1px var(--lace), 0 0 0 4px var(--paper), 0 0 0 5px var(--lace), 0 10px 24px rgba(81, 75, 74, .1); }
.dl-cal .cn { position: absolute; width: 42px; pointer-events: none; }
.dl-cal .c1 { left: -6px; top: -6px; } .dl-cal .c2 { right: -6px; top: -6px; transform: scaleX(-1); }
.dl-cal .hd { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
.dl-cal .hd button { width: 30px; height: 30px; border: 0; background: none; color: var(--mauve-deep); padding: 0; display: flex; align-items: center; justify-content: center; }
.dl-cal .hd button.r .ico { transform: scaleX(-1); }
.dl-cal .hd b { font-family: var(--font-serif); font-weight: 500; font-size: 19px; letter-spacing: 1px; color: var(--ink); }
.dl-cal .hd b em { font-style: normal; margin-left: 6px; color: var(--ink-2); }
.dl-cal .wk, .dl-cal .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dl-cal .wk { margin-top: 6px; }
.dl-cal .wk span { text-align: center; font-family: var(--font-serif); font-size: 12px; color: var(--ink-2); padding: 4px 0; }
.dl-cal .d { height: 40px; border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink); }
.dl-cal .d b { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-serif); font-weight: 500; font-size: 14.5px; transition: background .2s; }
.dl-cal .d.today b { box-shadow: inset 0 0 0 1px var(--mauve); }
.dl-cal .d.on b { background: var(--mauve-btn); color: var(--paper); box-shadow: 0 3px 8px rgba(112, 100, 119, .3); }
.dl-cal .d i { display: flex; gap: 2px; height: 4px; }
.dl-cal .d u { width: 4px; height: 4px; border-radius: 50%; }
.k-diary { --kc: var(--mauve-btn); } .k-note { --kc: var(--teal-soft); } .k-ledger { --kc: #B79A6B; } .k-memory { --kc: #9A9E8C; }
.dl-cal .d u { background: var(--kc); }
.dl-cal .legend { margin: 6px 0 0; display: flex; justify-content: center; gap: 12px; font-size: 10.5px; color: var(--ink-2); }
.dl-cal .legend span::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin-right: 4px; vertical-align: middle; background: var(--kc); }

.dl-money { margin: 14px 26px 0; display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--ink-2); }
.dl-money b { font-weight: 500; font-family: var(--font-serif); font-size: 13px; }
.dl-money .out { color: var(--mauve-deep); margin-left: auto; } .dl-money .in { color: var(--sage); }

/* 那一天 */
.dl-day { margin: 14px 22px 0; }
.dl-day h2 { margin: 0; display: flex; align-items: baseline; gap: 10px; font-size: 16px; font-weight: 600; letter-spacing: 2px; }
.dl-day h2 em { font-family: var(--font-script); font-style: normal; font-weight: 400; font-size: 20px; color: var(--mauve-deep); letter-spacing: 0; }
.dl-day h2::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--lace), transparent); align-self: center; }
.dl-kinds { display: flex; gap: 6px; margin: 10px 0 0; }
.dl-kinds button { height: 26px; padding: 0 11px; border-radius: 13px; border: 1px solid var(--lace); background: var(--card); font-size: 11.5px; color: var(--ink-2); }
.dl-kinds button[aria-pressed="true"] { background: var(--mauve-btn); border-color: var(--mauve-btn); color: var(--paper); }
.dl-day .list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.dl-empty { padding: 30px 10px; text-align: center; font-size: 12.5px; line-height: 2; color: var(--ink-2); }
.dl-day .dy-av { width: 16px; height: 16px; font-size: 8.5px; }

/* 日记：一张小卡，点进日记页 */
.dl-diary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 4px 16px 4px 16px; background: var(--card); border: 1px solid var(--lace); box-shadow: var(--shadow); color: var(--ink); }
.dl-diary .ic { width: 36px; height: 36px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; background: rgba(169, 154, 170, .16); color: var(--mauve-deep); }
.dl-diary .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dl-diary em { font-style: normal; font-size: 11px; color: var(--mauve-deep); letter-spacing: 1px; }
.dl-diary b { display: flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 500; }
.dl-diary b i { font-style: normal; font-size: 11px; font-weight: 400; color: var(--ink-2); margin-left: 4px; }
/* 留言：一张便条，左边一个圈，做到了就打勾 */
.dl-note { display: flex; gap: 10px; padding: 11px 14px; border-radius: 3px; background: #FBF6EA; box-shadow: var(--shadow); border-left: 3px solid var(--teal-pale); }
.dl-note .ck { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--teal-soft); background: none; padding: 0; flex: none; margin-top: 1px; display: flex; align-items: center; justify-content: center; }
.dl-note .ck i { width: 9px; height: 5px; border-left: 1.6px solid var(--paper); border-bottom: 1.6px solid var(--paper); transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.dl-note.done .ck { background: var(--teal-soft); } .dl-note.done .ck i { opacity: 1; }
.dl-note.done .tx { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--teal-pale); }
.dl-note .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dl-note .tx { font-size: 13.5px; line-height: 1.6; color: var(--ink); }
.dl-note .mt { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--ink-2); }
.dl-note .mt em { font-style: normal; display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; color: var(--teal); }
/* 账本 */
.dl-ledger { padding: 10px 14px; border-radius: 4px; background: var(--card); border: 1px solid var(--lace); box-shadow: var(--shadow); }
.dl-ledger .lh { margin: 0 0 4px; display: flex; justify-content: space-between; font-size: 11px; letter-spacing: 2px; color: #9A876F; }
.dl-ledger .lh span { font-family: var(--font-serif); font-size: 13px; letter-spacing: 0; }
.dl-ledger .row { margin: 0; display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px dashed var(--lace); }
.dl-ledger .cat { font-size: 10px; padding: 1px 7px; border-radius: 8px; background: rgba(183, 154, 107, .14); color: #8C7B66; flex: none; }
.dl-ledger .row b { flex: 1; min-width: 0; font-size: 13px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-ledger .row em { font-style: normal; font-family: var(--font-serif); font-size: 14px; }
.dl-ledger .out { color: var(--mauve-deep); } .dl-ledger .in { color: var(--sage); }
/* 记忆：克记住了一句，可以屏蔽 */
.dl-mem { display: flex; gap: 8px; padding: 12px 12px 12px 14px; border-radius: 4px 16px 4px 16px; background: linear-gradient(135deg, #F2F3EE, var(--card)); border: 1px solid var(--lace); }
.dl-mem .q { font-family: var(--font-serif); font-size: 28px; line-height: .8; color: #A9AC9E; }
.dl-mem .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dl-mem em { font-style: normal; font-size: 10.5px; color: #7F8473; letter-spacing: 1px; }
.dl-mem .tx { font-size: 13.5px; line-height: 1.6; color: var(--ink); }
.dl-mem.hidden .tx { color: #B3A9A2; text-decoration: line-through; }
.dl-mem .sw { flex: none; align-self: center; border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.dl-mem .sw i { width: 32px; height: 18px; border-radius: 9px; background: var(--lace); position: relative; transition: background .2s; }
.dl-mem .sw i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s; }
.dl-mem .sw[aria-pressed="true"] i { background: var(--mauve-btn); } .dl-mem .sw[aria-pressed="true"] i::after { transform: translateX(14px); }
.dl-mem .sw small { font-size: 9.5px; color: var(--ink-2); }

/* 右下角 + */
.dl-fab { position: fixed; z-index: 20; right: max(22px, calc(50% - var(--app-max) / 2 + 22px)); bottom: calc(24px + var(--safe-b)); width: 54px; height: 54px; border-radius: 50%; border: 0;
  background: var(--mauve-btn); color: var(--paper); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-accent), 0 0 0 4px rgba(248, 243, 236, .9); }
.dl-add .tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.dl-add .tabs > * { flex: 1; height: 38px; border-radius: 19px; border: 1px solid var(--lace); background: var(--card); font-size: 13px; color: var(--ink-2); display: flex; align-items: center; justify-content: center; gap: 5px; }
.dl-add .tabs [aria-pressed="true"] { background: var(--mauve-btn); border-color: var(--mauve-btn); color: var(--paper); }
.dl-add textarea, .dl-add input { display: block; width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font: inherit; font-size: 14px; color: var(--ink); padding: 10px 12px; outline: 0; resize: none; }
.dl-add .rm, .dl-add .cats { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--ink-2); }
.dl-add .rm > span { display: inline-flex; align-items: center; gap: 3px; margin-right: 2px; }
.dl-add .rm button, .dl-add .cats button, .dl-add .amt button { height: 28px; padding: 0 11px; border-radius: 14px; border: 1px solid var(--lace); background: var(--card); font-size: 12px; color: var(--ink-2); }
.dl-add [aria-pressed="true"]:is(.rm button, .cats button, .amt button) { background: var(--teal); border-color: var(--teal); color: var(--paper); }
.dl-add .amt { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.dl-add .amt input { flex: 1; font-family: var(--font-serif); font-size: 22px; text-align: right; border: 0; border-bottom: 1px solid var(--lace); border-radius: 0; background: none; padding: 4px 2px; }
.dl-add .dy-save { width: 100%; height: 42px; margin-top: 14px; border-radius: 21px; }
.dl-add form[hidden] { display: none; }

/* 搜索 */
.dl-search { position: fixed; z-index: 30; top: 0; bottom: 0; left: 50%; width: min(100%, var(--app-max)); transform: translateX(-50%); background: var(--paper); padding: calc(var(--status-h) + 8px) 20px 20px; box-sizing: border-box; display: flex; flex-direction: column; animation: toast-in .15s ease-out; }
.dl-search .box { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 6px 0 14px; border-radius: 21px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); }
.dl-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 14px; color: var(--ink); }
.dl-search .box button { border: 0; background: none; font-size: 13px; color: var(--mauve-deep); padding: 0 8px; }
.dl-search .res { flex: 1; overflow-y: auto; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.dl-search .hit { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--lace); background: var(--card); text-align: left; color: var(--ink); }
.dl-search .hit .k { flex: none; font-size: 10px; padding: 1px 7px; border-radius: 8px; color: var(--paper); background: var(--kc); margin-top: 2px; }
.dl-search .hit .tx { flex: 1; font-size: 13px; line-height: 1.6; }
.dl-search .hit time { font-family: var(--font-serif); font-size: 12px; color: var(--ink-2); }
.dl-search mark { background: rgba(169, 154, 170, .35); color: inherit; border-radius: 3px; padding: 0 1px; }

/* 顶部油画的藕粉紫滤镜：和主页头图同一套（tokens.css 的 --hero-tint / --hero-glow） */
.dl-hero .tint { position: absolute; inset: 0; background: var(--hero-tint); mix-blend-mode: color; opacity: var(--hero-tint-a); }
.dl-hero .glow { position: absolute; inset: 0; background: var(--hero-glow); mix-blend-mode: soft-light; opacity: var(--hero-glow-a); }
/* 底下弹出的「写日记 / 留个言 / 记一笔」：表单一行一行往下排 */
.dl-add form { display: block !important; margin-top: 0 !important; }
.dl-add form[hidden] { display: none !important; }
