/* 时光胶囊：夜空 + 烛光金 + 信纸。浪漫仪式感，固定深色（不跟随夜间模式变化）。前缀 tc- */
.tc-overlay {
    --tc-gold: #e9c880; --tc-gold2: #b98d4a; --tc-ink: #f3ebd9; --tc-sub: rgba(243, 235, 217, .58); --tc-line: rgba(233, 200, 128, .26);
    --tc-paper: #f7f0df; --tc-pink: #f3d6d0; --tc-paper-ink: #3a2f22;
    --tc-serif: "Iowan Old Style", "Palatino Linotype", "Noto Serif SC", "Songti SC", Georgia, serif;
    --tc-hand: "Kaiti SC", "STKaiti", "KaiTi", "楷体", "Noto Serif SC", "Songti SC", serif;
    position: fixed; inset: 0; z-index: 12042; visibility: hidden; opacity: 0; transition: opacity .3s, visibility .3s;
    color: var(--tc-ink); font-family: inherit; -webkit-font-smoothing: antialiased; background: #0b1020;
}
.tc-overlay.is-open { visibility: visible; opacity: 1; }
.tc-overlay :where(button, input, textarea) { font-family: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
.tc-overlay i { font-style: italic; }
.tc-panel {
    position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; padding-top: env(safe-area-inset-top, 0px);
    background: radial-gradient(120% 60% at 50% 0%, #2b2559 0%, rgba(43, 37, 89, 0) 62%), radial-gradient(90% 38% at 50% 108%, rgba(233, 160, 110, .22), rgba(233, 160, 110, 0) 70%), linear-gradient(#0b1020 0%, #151433 55%, #231a3d 100%);
}

/* 星空 */
.tc-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.tc-st { position: absolute; left: 0; top: 0; width: 1px; height: 1px; border-radius: 50%; background: transparent; }
.tc-st.a { animation: tc-tw 5s ease-in-out infinite; }
.tc-st.b { width: 1.5px; height: 1.5px; animation: tc-tw 7s ease-in-out -2.2s infinite; }
.tc-st.c { width: 2px; height: 2px; animation: tc-tw 4.2s ease-in-out -1s infinite; }
@keyframes tc-tw { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

/* 顶栏 */
.tc-bar { position: relative; z-index: 2; flex: none; display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; width: calc(100% - 20px); max-width: 540px; margin: 0 auto; padding: 4px 0 6px; }
.tc-ib { width: 38px; height: 38px; border: 0; background: transparent; font-size: 24px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0 0 3px; border-radius: 50%; }
.tc-ib.tc-more { font-size: 15px; letter-spacing: 1px; padding-bottom: 6px; }
.tc-ib:active { background: rgba(255, 255, 255, .08); }
.tc-title { text-align: center; line-height: 1.25; }
.tc-title i { display: block; font-family: var(--tc-serif); font-size: 13px; color: var(--tc-gold); letter-spacing: .04em; }
.tc-title span { display: block; font-size: 10px; letter-spacing: .3em; color: var(--tc-sub); margin-top: 1px; }
.tc-panel[data-view="burying"] .tc-more, .tc-panel[data-view="opening"] .tc-more { visibility: hidden; }

.tc-scroll { position: relative; z-index: 1; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 6px 18px calc(26px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; }
#tc-body { width: 100%; max-width: 520px; margin: 0 auto; flex: 1; display: flex; flex-direction: column; }

/* 通用文字 */
.tc-hd { text-align: center; padding: 14px 0 20px; }
.tc-hd i { display: block; font-family: var(--tc-serif); font-size: 12.5px; letter-spacing: .12em; color: var(--tc-gold); }
.tc-hd p { margin: 8px 0 0; font-size: 15px; line-height: 1.7; color: var(--tc-ink); letter-spacing: .06em; }
.tc-k { display: block; font-family: var(--tc-serif); font-size: 12px; letter-spacing: .16em; color: var(--tc-gold); margin-top: 18px; }
.tc-big { margin: 6px 0 0; font-size: 20px; letter-spacing: .14em; color: var(--tc-ink); font-weight: 400; line-height: 1.6; }
.tc-sm { margin: 8px 0 0; font-size: 12.5px; line-height: 1.9; color: var(--tc-sub); letter-spacing: .06em; }
.tc-btn { display: block; margin: 24px auto 0; min-width: 210px; padding: 13px 28px; border-radius: 999px; border: 1px solid var(--tc-gold); background: linear-gradient(180deg, #efd593, #cfa65a); color: #2a1f0e; font-size: 14px; letter-spacing: .2em; cursor: pointer; box-shadow: 0 12px 30px -14px rgba(233, 200, 128, .8); transition: transform .15s, opacity .2s; }
.tc-btn:active { transform: scale(.98); }
.tc-btn:disabled { opacity: .55; }
.tc-btn.ghost { background: transparent; color: var(--tc-gold); box-shadow: none; }
.tc-link2 { display: block; margin: 16px auto 0; border: 0; border-bottom: .5px solid var(--tc-sub); background: transparent; padding: 4px 1px; font-family: var(--tc-serif); font-style: italic; font-size: 12.5px; letter-spacing: .08em; color: var(--tc-sub); cursor: pointer; }
.tc-hide { opacity: 0; pointer-events: none; }
.tc-btn, .tc-link2, .tc-lines p, .tc-open > p.tc-big { transition: opacity .9s ease, transform .9s ease; }
.tc-lines p:not(.is-in), .tc-open > p.tc-big:not(.is-in) { opacity: 0; transform: translateY(8px); }
.tc-lines { min-height: 96px; margin-top: 18px; }
.tc-skip { position: absolute; right: 2px; bottom: 6px; border: 0; background: transparent; color: var(--tc-sub); font-size: 11.5px; letter-spacing: .14em; padding: 8px; cursor: pointer; }

/* 舞台页（等待 / 就绪 / 动画） */
.tc-stage { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6px 0 26px; }
.tc-capbig { position: relative; width: 132px; margin: 0 auto; }
.tc-capbig .tc-svg { position: relative; z-index: 1; }
.tc-halo { position: absolute; inset: -46px; border-radius: 50%; background: radial-gradient(circle, rgba(233, 200, 128, .3), rgba(233, 200, 128, 0) 66%); animation: tc-breathe 4s ease-in-out infinite; }
@keyframes tc-breathe { 0%, 100% { opacity: .55; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.06); } }
.tc-empty { text-align: center; padding: 26px 0 6px; }
.tc-empty .tc-svg { width: 84px; margin: 0 auto 10px; opacity: .9; }
.tc-banner { margin: 0 0 12px; text-align: center; font-size: 12.5px; letter-spacing: .12em; color: var(--tc-gold); }

/* ── 胶囊 SVG ── */
.tc-svg { display: block; width: 100%; height: auto; overflow: visible; }
.tc-svg .tc-glass { fill: rgba(190, 215, 255, .13); stroke: rgba(225, 238, 255, .78); stroke-width: 2.2; stroke-linejoin: round; }
.tc-svg .tc-shine { fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: 2.4; stroke-linecap: round; }
.tc-svg .tc-gold { fill: #d9b46a; stroke: #f4e0a6; stroke-width: 1.6; }
.tc-svg .tc-gold2 { fill: #a98040; }
.tc-svg .tc-ring { fill: none; stroke: #d9b46a; stroke-width: 2.4; }
.tc-svg .tc-ins { opacity: 0; transition: opacity .8s; }
.tc-svg.s-filled .tc-ins { opacity: 1; }
.tc-svg .tc-in rect { fill: #f6efe0; }
.tc-svg .tc-in path { fill: none; stroke: #bba67a; stroke-width: 1.4; }
.tc-svg .tc-in.ta rect { fill: #f3d6d0; }
.tc-svg .tc-lid { transition: transform .9s cubic-bezier(.3, .7, .2, 1); transform-box: fill-box; transform-origin: 50% 100%; }
.tc-svg.s-lidup .tc-lid { transform: translateY(-22px) rotate(-12deg); }
.tc-svg .tc-wax { transition: opacity .5s; transform-box: fill-box; transform-origin: center; }
.tc-svg.s-nowax .tc-wax { opacity: 0; }
.tc-svg .tc-wax .wh { fill: #b8423b; stroke: #8e2f2a; stroke-width: .8; transform-box: fill-box; transform-origin: center; transition: transform .8s ease, opacity .8s; }
.tc-svg .wheart { fill: #f2bfb0; opacity: .92; transition: opacity .4s; }
.tc-svg .wcrack { fill: none; stroke: #2f0f0c; stroke-width: 1.1; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .7s ease-out; }
.tc-svg.s-crack .wcrack { stroke-dashoffset: 0; }
.tc-svg.s-split .wl { transform: translate(-9px, 3px) rotate(-24deg); opacity: 0; }
.tc-svg.s-split .wr { transform: translate(9px, 3px) rotate(24deg); opacity: 0; }
.tc-svg.s-split .wheart, .tc-svg.s-split .wcrack { opacity: 0; }
.tc-svg.s-stamp .tc-wax { animation: tc-stamp .8s cubic-bezier(.2, .9, .3, 1.15); }
@keyframes tc-stamp { 0% { transform: scale(2.8); opacity: 0; } 55% { transform: scale(.86); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.tc-svg.s-glow { filter: drop-shadow(0 0 10px rgba(233, 200, 128, .5)); animation: tc-pulse 3.4s ease-in-out infinite; }
@keyframes tc-pulse { 0%, 100% { filter: drop-shadow(0 0 7px rgba(233, 200, 128, .35)); } 50% { filter: drop-shadow(0 0 18px rgba(233, 200, 128, .85)); } }

.tc-plant { display: block; width: 66px; margin: -12px auto 0; overflow: visible; }
.tc-plant .tc-soil { fill: #3c2b24; }
.tc-plant .tc-seed { fill: #d1ab6e; }
.tc-plant .tc-stem { stroke: #82c391; stroke-width: 1.6; fill: none; stroke-linecap: round; }
.tc-plant .tc-leaf { fill: #82c391; }
.tc-plant .tc-flower circle { fill: #f3b6c4; }
.tc-plant .tc-flower .c { fill: #f6e0a0; }

/* ── 书架 ── */
.tc-list { display: flex; flex-direction: column; gap: 12px; }
.tc-card { width: 100%; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px 14px 12px; text-align: left; border: 1px solid var(--tc-line); border-radius: 18px; background: rgba(255, 255, 255, .045); cursor: pointer; transition: transform .15s, border-color .3s, box-shadow .3s; }
.tc-card:active { transform: scale(.99); }
.tc-card.is-due { border-color: var(--tc-gold); box-shadow: 0 0 28px -8px rgba(233, 200, 128, .6); animation: tc-cardglow 3.4s ease-in-out infinite; }
@keyframes tc-cardglow { 0%, 100% { box-shadow: 0 0 14px -8px rgba(233, 200, 128, .4); } 50% { box-shadow: 0 0 30px -6px rgba(233, 200, 128, .75); } }
.tc-card.is-opened { opacity: .82; }
.tc-card.is-shake { animation: tc-shake .5s; }
@keyframes tc-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-4px) rotate(-.4deg); } 40% { transform: translateX(4px) rotate(.4deg); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.tc-draft { border-style: dashed; }
.tc-mini .tc-svg { width: 54px; margin: 0 auto; }
.tc-ci { min-width: 0; }
.tc-c1 { display: block; font-family: var(--tc-serif); font-size: 11.5px; letter-spacing: .14em; color: var(--tc-gold); }
.tc-c2 { display: block; margin-top: 3px; font-size: 16px; font-weight: 400; letter-spacing: .08em; }
.tc-c3 { display: block; margin-top: 4px; font-size: 12px; color: var(--tc-sub); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-bar2 { display: block; height: 2px; margin-top: 10px; border-radius: 2px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.tc-bar2 u { display: block; height: 100%; background: linear-gradient(90deg, var(--tc-gold2), var(--tc-gold)); border-radius: 2px; }
.tc-c4 { display: block; margin-top: 7px; font-size: 11px; color: var(--tc-sub); letter-spacing: .06em; }
.tc-c4.is-ms { color: var(--tc-gold); }
.tc-card.is-due .tc-c4 { color: var(--tc-gold); }

/* ── 写信 ── */
.tc-sec { margin: 0 0 26px; }
.tc-sec h4 { margin: 0 0 12px; font-weight: 400; font-size: 13px; letter-spacing: .14em; color: var(--tc-ink); }
.tc-sec h4 em { font-family: var(--tc-serif); font-size: 11.5px; color: var(--tc-gold); margin-right: 9px; }
.tc-when { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.tc-w0 { font-size: 14px; color: var(--tc-sub); }
.tc-stepper { display: inline-flex; align-items: center; border: 1px solid var(--tc-line); border-radius: 999px; background: rgba(255, 255, 255, .04); }
.tc-stepper button { width: 38px; height: 40px; border: 0; background: transparent; font-size: 18px; cursor: pointer; color: var(--tc-gold); }
.tc-stepper input { width: 54px; height: 40px; border: 0; background: transparent; text-align: center; font-family: var(--tc-serif); font-size: 21px; outline: none; -moz-appearance: textfield; appearance: textfield; }
.tc-stepper input::-webkit-outer-spin-button, .tc-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tc-stepper input.is-dim { opacity: .4; }
.tc-seg { display: inline-flex; border: 1px solid var(--tc-line); border-radius: 999px; overflow: hidden; }
.tc-seg button { border: 0; background: transparent; padding: 0 16px; height: 40px; font-size: 14px; cursor: pointer; letter-spacing: .1em; }
.tc-seg button.on { background: var(--tc-gold); color: #2a1f0e; }
.tc-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.tc-chips button { border: 1px solid var(--tc-line); background: transparent; border-radius: 999px; padding: 5px 13px; font-size: 12px; letter-spacing: .06em; cursor: pointer; color: var(--tc-sub); }
.tc-chips button.on { border-color: var(--tc-gold); color: var(--tc-gold); background: rgba(233, 200, 128, .1); }
.tc-whendate { margin: 16px 0 0; text-align: center; }
.tc-whendate b { display: block; font-family: var(--tc-serif); font-size: 18px; font-weight: 400; color: var(--tc-gold); letter-spacing: .06em; }
.tc-whendate span { display: block; margin-top: 4px; font-size: 11.5px; color: var(--tc-sub); letter-spacing: .1em; }
.tc-abs { display: none; margin: 12px auto 0; padding: 9px 14px; border: 1px solid var(--tc-line); border-radius: 12px; background: rgba(255, 255, 255, .05); font-size: 14px; color-scheme: dark; }
.tc-abs.show { display: block; }
.tc-styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tc-styles button { border: 1px solid var(--tc-line); border-radius: 16px; background: rgba(255, 255, 255, .035); padding: 12px 6px 10px; cursor: pointer; transition: border-color .25s, background .25s; }
.tc-styles button span { display: block; width: 40px; margin: 0 auto 8px; }
.tc-styles button b { display: block; font-weight: 400; font-size: 12px; letter-spacing: .12em; color: var(--tc-sub); }
.tc-styles button.on { border-color: var(--tc-gold); background: rgba(233, 200, 128, .09); }
.tc-styles button.on b { color: var(--tc-gold); }

/* 信纸 */
.tc-paper { position: relative; border-radius: 6px; padding: 18px 20px 28px; color: var(--tc-paper-ink); font-family: var(--tc-hand); font-size: 17px; line-height: 32px; box-shadow: 0 22px 44px -22px rgba(0, 0, 0, .8), inset 0 0 40px rgba(170, 130, 70, .14);
    background: var(--tc-paper) repeating-linear-gradient(transparent 0 31px, rgba(150, 120, 70, .2) 31px 32px) 0 18px / 100% 100% no-repeat; background-attachment: local; }
.tc-compose textarea { display: block; width: 100%; min-height: 256px; border: 0; outline: 0; background: transparent; resize: none; padding: 0; font: inherit; line-height: 32px; color: var(--tc-paper-ink); overflow: hidden; }
.tc-compose textarea::placeholder { color: rgba(58, 47, 34, .38); }
.tc-count { position: absolute; right: 14px; bottom: 6px; font-family: var(--tc-serif); font-size: 10.5px; color: rgba(58, 47, 34, .45); }
.tc-tip { margin: 12px 0 0; text-align: center; font-size: 11.5px; line-height: 1.8; color: var(--tc-sub); letter-spacing: .04em; }

/* ── 等待 TA 写信 ── */
.tc-pen svg { width: 66px; height: 66px; fill: none; stroke: var(--tc-gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.tc-pen .tc-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: tc-write 2.8s ease-in-out infinite; }
.tc-pen .tc-quill { animation: tc-quill 2.8s ease-in-out infinite; fill: rgba(233, 200, 128, .12); }
@keyframes tc-write { 0% { stroke-dashoffset: 1; opacity: 1; } 80% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes tc-quill { 0% { transform: translate(-16px, 10px); } 80%, 100% { transform: translate(22px, 10px); } }
#tc-cap { transition: opacity .4s; }
#tc-cap:not(.is-in) { opacity: .0; }
#tc-cap.is-in { opacity: 1; }

/* ── 按住：你和 TA 一起 ── */
.tc-holdwrap { margin-top: 26px; display: flex; flex-direction: column; align-items: center; }
.tc-hold { border: 0; background: none; padding: 0; width: min(264px, 72vw); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer; outline: none; }
.tc-hold svg { display: block; width: 100%; overflow: visible; }
.tc-hold .bg { fill: rgba(255, 255, 255, .035); stroke: rgba(233, 200, 128, .28); stroke-width: 2.5; transition: stroke .3s; }
.tc-hold .fg { fill: none; stroke: var(--tc-gold); stroke-width: 3.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transform-box: fill-box; transform-origin: center; transform: rotate(-90deg); }
.tc-hold .hh { fill: var(--tc-gold); opacity: .3; }
.tc-hold .tc-ring.me .hh { opacity: calc(.3 + var(--hp, 0) * .7); }
.tc-hold .tc-ring.ta .hh { opacity: calc(.3 + var(--hq, 0) * .7); }
.tc-hold.is-hold .bg { stroke: rgba(233, 200, 128, .55); }
.tc-hold .tc-link-line { fill: none; stroke: rgba(233, 200, 128, .32); stroke-width: 1.5; stroke-dasharray: 2 5; stroke-linecap: round; transition: stroke .3s; }
.tc-hold.is-hold .tc-link-line { stroke: var(--tc-gold); }
.tc-hold.is-done .hh { filter: drop-shadow(0 0 7px rgba(233, 200, 128, .95)); }
.tc-hold.is-done .bg { stroke: var(--tc-gold); }
.tc-hold-cap { margin: 8px 0 0; min-height: 1.6em; font-size: 13px; letter-spacing: .14em; color: var(--tc-ink); }
.tc-hold-names { display: grid; grid-template-columns: 1fr 1fr; text-align: center; width: min(264px, 72vw); margin-top: 2px; font-size: 11px; color: var(--tc-sub); letter-spacing: .1em; }

/* ── 埋下 / 打开 动画 ── */
.tc-env2 { position: absolute; z-index: 2; width: 46px; height: 30px; border-radius: 3px; opacity: 0; pointer-events: none; box-shadow: 0 8px 18px rgba(0, 0, 0, .45);
    background: linear-gradient(to bottom right, transparent 47%, rgba(150, 120, 70, .5) 48% 52%, transparent 53%) 0 0 / 50% 62% no-repeat, linear-gradient(to bottom left, transparent 47%, rgba(150, 120, 70, .5) 48% 52%, transparent 53%) 100% 0 / 50% 62% no-repeat, #f6efe0; }
.tc-env2.e2 { background-color: #f3d6d0; }
.tc-bury .e1 { opacity: 1; left: -92px; top: 52px; transform: rotate(-14deg); }
.tc-bury .e2 { opacity: 1; left: 178px; top: 88px; transform: rotate(12deg); }
.tc-bury .env-in .tc-env2 { left: 43px; top: 34px; transform: rotate(0) scale(.5); opacity: 0; transition: left 1.25s cubic-bezier(.55, 0, .25, 1), top 1.25s cubic-bezier(.55, 0, .25, 1), transform 1.25s cubic-bezier(.55, 0, .25, 1), opacity .35s ease .9s; }
.tc-bury .env-in .e2 { transition-delay: .18s, .18s, .18s, 1.05s; }
.tc-bury .tc-capbig.fly { transform: translateY(-40vh) scale(.14); opacity: .9; transition: transform 1.8s cubic-bezier(.4, 0, .2, 1), opacity 1.8s; }
.tc-bury .tc-capbig { transition: transform .6s; }
.tc-open .tc-env2 { left: 43px; top: 70px; transform: scale(.5); }
.tc-open .env-out .e1 { opacity: 1; left: -78px; top: -34px; transform: rotate(-9deg) scale(1.25); transition: all 1.15s cubic-bezier(.2, .8, .2, 1); }
.tc-open .env-out .e2 { opacity: 1; left: 164px; top: -14px; transform: rotate(8deg) scale(1.25); transition: all 1.15s cubic-bezier(.2, .8, .2, 1) .15s; }
/* 打开时的光：暖金色柔光从瓶口升起（滤色混合，没有硬边），再飘出一些细小的光点 */
.tc-beam { position: absolute; z-index: 0; left: 50%; bottom: calc(100% - 54px); width: 270px; height: 320px; margin-left: -135px; opacity: 0; pointer-events: none; mix-blend-mode: screen; transform-origin: 50% 100%; transform: scaleY(.25);
    background: radial-gradient(ellipse 36% 40% at 50% 90%, rgba(255, 236, 190, .95) 0%, rgba(255, 200, 110, .55) 42%, rgba(255, 170, 80, 0) 80%), radial-gradient(ellipse 22% 90% at 50% 90%, rgba(255, 210, 130, .42), rgba(255, 190, 100, 0) 92%);
    -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 16%, rgba(0, 0, 0, .7) 48%, transparent 100%); mask-image: linear-gradient(to top, transparent 0%, #000 16%, rgba(0, 0, 0, .7) 48%, transparent 100%);
    filter: blur(8px); transition: opacity 1.4s ease, transform 1.6s cubic-bezier(.2, .8, .2, 1); }
.tc-capbig.beam-on .tc-beam { opacity: .95; transform: scaleY(1); animation: tc-flick 3.6s ease-in-out 1.6s infinite; }
@keyframes tc-flick { 0%, 100% { opacity: .9; } 50% { opacity: .62; } }
.tc-sparks { position: absolute; z-index: 3; left: 50%; bottom: calc(100% - 50px); width: 190px; height: 280px; margin-left: -95px; pointer-events: none; opacity: 0; transition: opacity 1s; }
.tc-capbig.beam-on .tc-sparks { opacity: 1; }
.tc-sparks i { position: absolute; left: var(--x); bottom: 0; width: var(--s); height: var(--s); border-radius: 50%; background: #ffe7ae; box-shadow: 0 0 6px 1px rgba(255, 214, 130, .9); opacity: 0; animation: tc-rise var(--t) ease-out var(--d) infinite; }
@keyframes tc-rise { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(var(--dx), -250px) scale(.2); opacity: 0; } }

/* ── 读信 ── */
.tc-read { padding-top: 6px; }
.tc-rhd { text-align: center; margin: 4px 0 16px; }
.tc-rhd i { display: block; font-family: var(--tc-serif); font-size: 16px; color: var(--tc-gold); letter-spacing: .06em; }
.tc-rhd span { display: block; margin-top: 4px; font-size: 11.5px; letter-spacing: .16em; color: var(--tc-sub); }
.tc-letter { padding-top: 52px; min-height: 280px; background-position: 0 40px; }
.tc-letter p { margin: 0; text-indent: 2em; word-break: break-all; }
.tc-letter .tc-c { opacity: 1; }
.tc-letter:not(.all) .tc-c { opacity: 0; animation: tc-clause .8s ease forwards; animation-delay: calc(var(--i) * var(--st, 100ms) + .4s); }
@keyframes tc-clause { from { opacity: 0; transform: translateY(3px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
.tc-postmark { position: absolute; top: 12px; right: 14px; width: 62px; height: 62px; border-radius: 50%; border: 1.5px solid rgba(184, 66, 59, .5); color: rgba(184, 66, 59, .62); display: grid; place-items: center; font-family: var(--tc-serif); font-size: 9.5px; letter-spacing: .02em; transform: rotate(-14deg); text-indent: 0; }
.tc-postmark::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; border: .5px solid rgba(184, 66, 59, .35); }
.tc-since { text-align: center; padding: 34px 0 10px; }
.tc-numrow { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-top: 10px; }
.tc-num { font-family: var(--tc-serif); font-size: 64px; font-weight: 400; color: var(--tc-gold); letter-spacing: .02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tc-numrow > span { font-size: 15px; color: var(--tc-sub); letter-spacing: .1em; }
.tc-n2 { margin-top: 26px; }
.tc-n2 .tc-num { font-size: 36px; }
.tc-since-line { margin: 30px 0 0; font-size: 13px; line-height: 2; color: var(--tc-ink); letter-spacing: .1em; }
.tc-end { text-align: center; padding: 22px 0 8px; }
.tc-react { text-align: left; margin-top: 18px; }
.tc-react i { display: block; font-family: var(--tc-serif); font-size: 12.5px; color: rgba(150, 100, 50, .85); margin-bottom: 4px; letter-spacing: .08em; }
.tc-react p { margin: 0; text-indent: 2em; }
.tc-endbtns { margin-top: 8px; }
.tc-del { margin: 26px auto 0; display: block; border: 0; background: transparent; font-size: 11px; color: rgba(243, 235, 217, .32); letter-spacing: .1em; cursor: pointer; }
.tc-rnav { position: sticky; bottom: 0; margin-top: auto; padding: 18px 0 4px; display: flex; align-items: center; justify-content: space-between; }
.tc-rp, .tc-rn { min-width: 74px; border: 0; background: transparent; font-size: 12.5px; letter-spacing: .1em; color: var(--tc-sub); cursor: pointer; padding: 8px 0; }
.tc-rn { text-align: right; color: var(--tc-gold); }
.tc-rp:disabled { opacity: .25; cursor: default; }
.tc-dots { display: inline-flex; gap: 7px; }
.tc-dots u { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .22); transition: background .3s, transform .3s; }
.tc-dots u.on { background: var(--tc-gold); transform: scale(1.35); }

/* ── 弹层 / 提示 ── */
.tc-sheet { position: absolute; inset: 0; z-index: 8; display: flex; align-items: flex-end; background: rgba(0, 0, 0, 0); visibility: hidden; transition: background .25s, visibility .25s; }
.tc-sheet.is-open { background: rgba(0, 0, 0, .55); visibility: visible; }
.tc-sheet-card { width: 100%; max-height: 74%; overflow-y: auto; background: #17163a; border-top: 1px solid var(--tc-line); border-radius: 20px 20px 0 0; padding: 20px 22px calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateY(100%); transition: transform .32s cubic-bezier(.3, .7, .2, 1); box-sizing: border-box; }
.tc-sheet.is-open .tc-sheet-card { transform: none; }
.tc-sh { margin: 0 0 14px; font-weight: 400; font-size: 15px; letter-spacing: .16em; color: var(--tc-gold); text-align: center; }
.tc-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 0 10px; }
.tc-row b { display: block; font-weight: 400; font-size: 14px; }
.tc-row small { display: block; margin-top: 4px; font-size: 11.5px; line-height: 1.7; color: var(--tc-sub); }
.tc-sel { flex: none; max-width: 150px; padding: 7px 8px; border: 1px solid var(--tc-line); border-radius: 10px; background: rgba(255, 255, 255, .06); font-size: 12.5px; color-scheme: dark; outline: none; }
.tc-sw { flex: none; position: relative; width: 48px; height: 28px; border-radius: 999px; border: 1px solid var(--tc-line); background: rgba(255, 255, 255, .08); cursor: pointer; padding: 0; transition: background .25s; }
.tc-sw i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #aaa; transition: left .25s, background .25s; }
.tc-sw.on { background: rgba(233, 200, 128, .32); }
.tc-sw.on i { left: 23px; background: var(--tc-gold); }
.tc-fine { margin: 12px 0 0; font-size: 11.5px; line-height: 1.85; color: var(--tc-sub); }
.tc-lock { display: flex; align-items: center; gap: 18px; padding: 6px 4px 4px; }
.tc-lock .tc-svg { width: 62px; flex: none; }
.tc-lock p { margin: 3px 0; font-size: 13px; line-height: 1.7; }
.tc-lock b { font-weight: 400; color: var(--tc-gold); font-family: var(--tc-serif); font-size: 15px; }
.tc-note { position: absolute; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); z-index: 10; transform: translate(-50%, 16px); opacity: 0; max-width: 80%; padding: 9px 18px; border-radius: 999px; background: rgba(0, 0, 0, .72); color: #fff; font-size: 12.5px; letter-spacing: .06em; pointer-events: none; transition: opacity .3s, transform .3s; text-align: center; }
.tc-note.show { opacity: 1; transform: translate(-50%, 0); }

/* 拓展面板入口：有胶囊到期时，图标右上角一个金色小点（只是提醒） */
#time-capsule-btn .expansion-item-icon { position: relative; }
.tc-dot { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: #e0a83c; box-shadow: 0 0 0 2px #fff; animation: tc-dotp 2.4s ease-in-out infinite; }
@keyframes tc-dotp { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }
html[data-ui="dark"] .tc-dot { box-shadow: 0 0 0 2px #2b2b2b; }

@media (max-width: 350px) {
    .tc-card { grid-template-columns: 62px minmax(0, 1fr); gap: 10px; padding: 12px 10px; }
    .tc-mini .tc-svg { width: 46px; }
    .tc-plant { width: 56px; }
    .tc-styles { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    .tc-st, .tc-halo, .tc-sparks i, .tc-svg.s-glow, .tc-card.is-due, .tc-dot, .tc-pen .tc-line, .tc-pen .tc-quill { animation: none !important; }
    .tc-letter:not(.all) .tc-c { animation-duration: .01s; animation-delay: 0s; }
}


/* ═════════ 动画加强：夜空、开屏、页面入场 ═════════ */
/* 夜空：星云慢慢漂、月牙、四角闪光星、流星、往上飘的光点 */
.tc-neb { position: absolute; width: 90vw; height: 90vw; max-width: 560px; max-height: 560px; border-radius: 50%; }
.tc-neb.n1 { left: -30vw; top: 8vh; background: radial-gradient(circle, rgba(110, 86, 210, .26), rgba(110, 86, 210, 0) 66%); animation: tc-drift 26s ease-in-out infinite alternate; }
.tc-neb.n2 { right: -34vw; top: 44vh; background: radial-gradient(circle, rgba(222, 128, 150, .16), rgba(222, 128, 150, 0) 66%); animation: tc-drift 32s ease-in-out -9s infinite alternate-reverse; }
@keyframes tc-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(7vw, -5vh) scale(1.15); } }
.tc-moon { position: absolute; right: 13%; top: 9%; width: 30px; height: 30px; border-radius: 50%; box-shadow: inset -9px -3px 0 0 #f6e8c6; filter: drop-shadow(0 0 12px rgba(246, 232, 198, .5)); transform: rotate(-18deg); animation: tc-moon 7s ease-in-out infinite; opacity: .9; }
@keyframes tc-moon { 0%, 100% { filter: drop-shadow(0 0 8px rgba(246, 232, 198, .35)); } 50% { filter: drop-shadow(0 0 18px rgba(246, 232, 198, .75)); } }
.tc-st.d { width: 1.5px; height: 1.5px; animation: tc-tw 3.3s ease-in-out -.7s infinite; }
.tc-sk { position: absolute; width: var(--z); height: var(--z); background: #fff3d0; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); opacity: 0; filter: drop-shadow(0 0 4px rgba(255, 240, 200, .9)); animation: tc-spark var(--t) ease-in-out var(--d) infinite; }
@keyframes tc-spark { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 45% { opacity: 1; transform: scale(1) rotate(45deg); } 70% { opacity: .5; transform: scale(.7) rotate(70deg); } }
.tc-shoot { position: absolute; width: 96px; height: 1.5px; opacity: 0; background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 244, 214, .95)); border-radius: 2px; transform: rotate(32deg); transform-origin: 100% 50%; animation: tc-shoot var(--t) linear var(--d) infinite; }
@keyframes tc-shoot { 0% { opacity: 0; transform: translate(0, 0) rotate(32deg); } 1.5% { opacity: 1; } 7% { opacity: 0; transform: translate(240px, 150px) rotate(32deg); } 100% { opacity: 0; transform: translate(240px, 150px) rotate(32deg); } }
.tc-mote { position: absolute; bottom: -12px; width: var(--s); height: var(--s); border-radius: 50%; background: #ffe2a0; box-shadow: 0 0 6px 1px rgba(255, 214, 130, .75); opacity: 0; animation: tc-float var(--t) linear var(--d) infinite; }
@keyframes tc-float { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .85; } 85% { opacity: .5; } 100% { transform: translate(var(--dx), -108vh); opacity: 0; } }

/* 页面入场：每次换页，内容轻轻浮上来；书架上的卡片依次出现 */
@keyframes tc-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
#tc-body > * { animation: tc-up .6s cubic-bezier(.2, .7, .2, 1) both; }
#tc-body > .tc-stage, #tc-body > .tc-rnav { animation-duration: .8s; }
.tc-list > * { animation: tc-up .65s cubic-bezier(.2, .7, .2, 1) both; }
.tc-list > :nth-child(2) { animation-delay: .08s; } .tc-list > :nth-child(3) { animation-delay: .16s; } .tc-list > :nth-child(4) { animation-delay: .24s; } .tc-list > :nth-child(n+5) { animation-delay: .3s; }
.tc-list > .tc-card.is-due { animation: tc-up .65s cubic-bezier(.2, .7, .2, 1) both, tc-cardglow 3.4s ease-in-out .7s infinite; }
.tc-list > .tc-card.is-shake { animation: tc-shake .5s; }
/* 常驻的小动态：胶囊轻轻浮动、小植物微微摇、等你按住的圆环在呼吸 */
@keyframes tc-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes tc-sway { 0%, 100% { transform: rotate(-2.2deg); } 50% { transform: rotate(2.2deg); } }
.tc-mini .tc-svg { animation: tc-bob 5.2s ease-in-out infinite; }
.tc-mini .tc-svg.s-glow { animation: tc-bob 5.2s ease-in-out infinite, tc-pulse 3.4s ease-in-out infinite; }
.tc-plant { transform-origin: 50% 90%; animation: tc-sway 6s ease-in-out infinite; }
.tc-ready .tc-capbig, .tc-wake .tc-capbig, .tc-empty .tc-svg { animation: tc-bob 5.6s ease-in-out infinite; }
.tc-hold:not(.is-hold):not(.is-done) .bg { animation: tc-ringp 2.6s ease-in-out infinite; }
@keyframes tc-ringp { 0%, 100% { stroke: rgba(233, 200, 128, .26); } 50% { stroke: rgba(233, 200, 128, .7); } }

/* 开屏 */
.tc-panel.is-splash .tc-bar, .tc-panel.is-splash .tc-scroll { opacity: 0; pointer-events: none; }
.tc-bar, .tc-scroll { transition: opacity .7s ease; }
.tc-splash { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: opacity .6s ease; }
.tc-splash.out { opacity: 0; pointer-events: none; }
.tc-sp-stage { position: relative; width: 150px; margin-bottom: 34px; }
.tc-sp-cap { position: relative; z-index: 1; opacity: 0; transform: translateY(46px) scale(.82); filter: drop-shadow(0 0 0 rgba(233, 200, 128, 0)); animation: tc-sp-rise 1.6s cubic-bezier(.2, .8, .2, 1) .35s forwards; }
@keyframes tc-sp-rise { 0% { opacity: 0; transform: translateY(46px) scale(.82); } 70% { opacity: 1; } 100% { opacity: 1; transform: translateY(0) scale(1); filter: drop-shadow(0 0 18px rgba(233, 200, 128, .6)); } }
.tc-sp-cap .tc-ins { opacity: 1; }
.tc-sp-cap .tc-wax { animation: tc-stamp .8s cubic-bezier(.2, .9, .3, 1.15) 1.5s both; }
.tc-sp-ring { position: absolute; left: 50%; top: 56%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; border: 1px solid rgba(233, 200, 128, .55); opacity: 0; animation: tc-sp-ring 2.2s ease-out forwards; }
.tc-sp-ring.r1 { animation-delay: 1.5s; } .tc-sp-ring.r2 { animation-delay: 1.95s; }
@keyframes tc-sp-ring { 0% { opacity: .8; transform: scale(.4); } 100% { opacity: 0; transform: scale(2.6); } }
.tc-sp-t { font-family: var(--tc-serif); font-size: 26px; color: var(--tc-gold); opacity: 0; letter-spacing: .7em; filter: blur(6px); animation: tc-sp-title 1.5s ease 1.4s forwards; }
@keyframes tc-sp-title { to { opacity: 1; letter-spacing: .14em; filter: blur(0); } }
.tc-sp-s { margin-top: 10px; font-size: 11px; letter-spacing: .5em; color: var(--tc-sub); opacity: 0; animation: tc-sp-fade 1s ease 2s forwards; }
@keyframes tc-sp-fade { to { opacity: 1; } }
.tc-sp-shoot { position: absolute; left: -20%; top: 16%; width: 150px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff6dc); opacity: 0; transform: rotate(24deg); animation: tc-sp-shoot 1.3s ease-in .2s forwards; filter: drop-shadow(0 0 5px rgba(255, 240, 200, .9)); }
@keyframes tc-sp-shoot { 0% { opacity: 0; transform: translate(0, 0) rotate(24deg); } 12% { opacity: 1; } 100% { opacity: 0; transform: translate(130vw, 58vw) rotate(24deg); } }
.tc-panel.is-splash ~ .tc-sheet { display: none; }

@media (prefers-reduced-motion: reduce) {
    .tc-neb, .tc-moon, .tc-sk, .tc-shoot, .tc-mote, .tc-mini .tc-svg, .tc-plant, .tc-ready .tc-capbig, .tc-wake .tc-capbig, .tc-empty .tc-svg, .tc-hold .bg { animation: none !important; }
    #tc-body > *, .tc-list > * { animation: none !important; }
    .tc-sk, .tc-shoot, .tc-mote { display: none; }
}

/* 空书架：整组内容在屏幕正中间 */
.tc-shelf.is-empty { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-bottom: 28px; }
.tc-shelf.is-empty .tc-empty { padding-top: 0; }
