/* 2-3 时间线。class 一律 tl- 开头；表单借日记的 dy-（信纸、分类签、开关）
   一条手绘藤蔓从上往下长：.vn 用 stroke-dashoffset 画出来（JS 跟着滚动改），枝条 / 叶子 / 花瓣加 .on 后用 transition 依次长开 */
.tl { position: relative; min-height: 100%; padding-bottom: calc(30px + var(--safe-b)); }
.tl .lace-edge { top: 0; }
.tl-lilac { position: absolute; z-index: 4; right: -2px; top: calc(var(--status-h) - 34px); width: 50px; pointer-events: none; opacity: .92; }
.tl .cl-bar > :last-child { margin-right: 34px; }
.tl > .cl-top { padding-bottom: 14px; background: linear-gradient(var(--paper) 86%, rgba(248, 243, 236, 0)); }
.tl-sum { margin: 0 0 6px; text-align: center; font-size: 12px; letter-spacing: 1px; color: var(--ink-2); }
.tl-sum em { font-style: normal; font-family: var(--font-serif); font-size: 16px; color: var(--teal); }

.tl-flow { position: relative; padding: 18px 24px 10px 80px; }
.tl-vine { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }

/* 藤蔓：深一道 + 错开一点的浅一道，像铅笔描了两遍 */
.vn { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.vn.main { stroke: var(--mauve-deep); stroke-width: 1.6; opacity: .85; }
.vn.ghost { stroke: var(--mauve); stroke-width: .9; opacity: .5; }

/* 枝条：自己从藤蔓画到卡片 */
.tl-br .bv { fill: none; stroke: var(--mauve-deep); stroke-width: 1.2; stroke-linecap: round; opacity: .8; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .7s ease-out .15s; }
.tl-br.on .bv { stroke-dashoffset: 0; }

/* 叶子：从叶柄那头展开 */
.lf { fill: rgba(169, 172, 158, .28); stroke: #7F8473; stroke-width: 1; stroke-linejoin: round; transform-box: fill-box; transform-origin: 0% 60%;
  transform: scale(0) rotate(-25deg); opacity: 0; transition: transform .6s cubic-bezier(.3, 1.5, .5, 1) calc(.1s + var(--i) * .08s), opacity .3s calc(.1s + var(--i) * .08s); }
.lf.on { transform: none; opacity: 1; }
.tl-br .lf { transition-delay: .55s; }

/* 小卷须 */
.tw { fill: none; stroke: var(--mauve-deep); stroke-width: 1; stroke-linecap: round; opacity: .7; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .8s ease-out .2s; }
.tw.on { stroke-dashoffset: 0; }

/* 花：花瓣一片一片从花心张开，花心最后点上 */
.tl-fl .pt { stroke-width: 1; stroke-linejoin: round; transform-box: fill-box; transform-origin: 50% 100%; transform: scale(0); opacity: 0;
  transition: transform .55s cubic-bezier(.3, 1.6, .5, 1) calc(.25s + var(--i) * .09s), opacity .3s calc(.25s + var(--i) * .09s); }
.tl-fl.on .pt { transform: none; opacity: 1; }
.tl-fl .ct { fill: var(--gold); stroke: #9A876F; stroke-width: .6; transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform .4s ease-out .8s; }
.tl-fl.on .ct { transform: none; }
.tl-fl .rc { fill: none; stroke: #6E5A70; stroke-width: 1.1; stroke-linecap: round; stroke-dasharray: 60; stroke-dashoffset: 60; transition: stroke-dashoffset .9s ease-out .7s; }
.tl-fl.on .rc { stroke-dashoffset: 0; }
.tl-fl.m1 .pt { fill: rgba(196, 169, 184, .55); stroke: #7A6578; }
.tl-fl.m2 .pt { fill: rgba(197, 185, 200, .6); stroke: #85778A; }
.tl-fl.m3 .pt { fill: rgba(170, 180, 181, .55); stroke: #627177; }
.tl-fl.m4 .pt { fill: rgba(205, 189, 166, .5); stroke: #8C7B66; }
.tl-fl.bud .pt { fill: rgba(197, 185, 200, .6); stroke: #85778A; }

/* 时刻卡：信纸，藤蔓长到才浮上来 */
.tl-item { position: relative; margin-bottom: 26px; opacity: 0; transform: translateY(16px); transition: opacity .6s ease-out .35s, transform .6s ease-out .35s; }
.tl-item.on { opacity: 1; transform: none; }
.tl-card { position: relative; padding: 13px 14px 10px; border-radius: 3px 16px 3px 16px;
  background-color: var(--card); background-image: radial-gradient(rgba(169, 154, 170, .16) .6px, transparent .7px); background-size: 5px 5px;
  border: 1px solid var(--lace); box-shadow: 0 6px 16px rgba(81, 75, 74, .08); }
.tl-card::before { content: ''; position: absolute; inset: 4px; border: 1px solid var(--line-soft); border-radius: 2px 13px 2px 13px; pointer-events: none; }
.tl-date { display: flex; align-items: center; gap: 10px; }
.tl-date b { font-family: var(--font-serif); font-weight: 500; font-size: 28px; line-height: 1; color: var(--teal); }
.tl-date b i { font-style: normal; color: var(--mauve); margin: 0 1px; }
.tl-date span { display: flex; flex-direction: column; gap: 1px; padding-left: 10px; border-left: 1px solid var(--lace); }
.tl-date em { font-family: var(--font-script); font-style: normal; font-size: 16px; line-height: 1.1; color: var(--mauve-deep); }
.tl-date small { font-size: 10.5px; color: var(--ink-2); letter-spacing: 1px; }
.tl-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.tl-mark { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 11px; color: var(--paper); }
.tl-mark.m1 { background: var(--mauve-btn); }
.tl-mark.m2 { background: #A99AAA; }
.tl-mark.m3 { background: var(--teal-soft); }
.tl-mark.m4 { background: #A9AC9E; }
.tl-yearly { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; color: var(--mauve-deep); }
.tl-pic { margin: 10px 0 0; padding: 4px; background: #fff; box-shadow: 0 0 0 1px var(--lace); border-radius: 2px 12px 2px 12px; }
.tl-pic img { display: block; width: 100%; height: 132px; object-fit: cover; border-radius: 1px 9px 1px 9px; filter: saturate(.88); }
.tl-card h2 { margin: 10px 0 0; font-size: 16px; font-weight: 600; letter-spacing: 1.5px; }
.tl-text { margin: 4px 0 0; font-size: 13px; line-height: 1.75; color: var(--ink); }
.tl-card footer { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding-top: 7px; border-top: 1px dashed var(--lace); }
.tl-more { margin: 4px 0 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-family: var(--font-serif); font-style: italic; font-size: 13px; color: var(--ink-2); }
.tl-more a { display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; border-radius: 16px; border: 1px dashed var(--mauve); font-family: var(--font); font-style: normal; font-size: 12.5px; color: var(--mauve-deep); }
.tl-empty { padding: 80px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 13px; line-height: 2; color: var(--ink-2); text-align: center; }
.tl-empty a { color: var(--mauve-deep); text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .tl-item, .lf, .tw, .tl-fl .pt, .tl-fl .ct, .tl-br .bv, .tl-fl .rc { transition: none !important; } }

/* 编辑页上的蕾丝角 */
.tl-lace { position: absolute; width: 50px; pointer-events: none; opacity: .95; }
.tl-lace.c-tl { left: -6px; top: -6px; }
.tl-lace.c-br { right: -6px; bottom: -6px; transform: rotate(180deg); }

/* 加 / 改 */
.tl-edit { min-height: 100%; }
.tl-form { position: relative; margin-top: 10px; }
.tl-when { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--lace); }
.tl-when span { font-size: 12px; letter-spacing: 1px; color: var(--ink-2); }
.tl-when input { border: 0; background: none; font-family: var(--font-serif); font-size: 18px; color: var(--teal); outline: 0; padding: 0; }
.tl-when em { margin-left: auto; font-style: normal; font-size: 11.5px; color: var(--mauve-deep); }
.tl-form .dy-cats.in button { gap: 4px; }
.tl-form textarea { min-height: 160px; }
.tl-img { display: flex; gap: 8px; }
.tl-img span { position: relative; }
.tl-img span img { width: 110px; height: 82px; object-fit: cover; border-radius: 3px; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(81, 75, 74, .16); display: block; }
.tl-img span button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; padding: 0; background: var(--teal); color: var(--paper); display: flex; align-items: center; justify-content: center; }
.tl-img .dy-addimg[hidden] { display: none; }
.tl-del { display: block; margin: 18px auto 0; border: 0; background: none; font-size: 12.5px; color: #8E5A63; text-decoration: underline; text-underline-offset: 3px; }
