/* 生活与随记 · a dotted-grid notebook.
   The cover is an instant photo that develops as the page opens; headings get a highlighter stroke when you reach them. */

.w-life {
  --bg: #F6F3EC; --paper: #FFFFFF; --ink: #2E2B28; --muted: #66605A; --line: rgba(46, 43, 40, .15);
  --acc: #B83A32; --acc-ink: #FFFFFF; --mark: #F6E39B; --tape: #BFE3D5; --tape2: #F7C6B5;
  --f-kuai: "YH Gu KuaiLe", "ZCOOL KuaiLe", var(--f-ui); --f-hand: "YH Gu Hand", "Long Cang", var(--f-ui); --f-body: var(--f-ui);
  background-color: #F6F3EC;
  background-image: radial-gradient(#D6D0C4 1.1px, transparent 1.5px);
  background-size: 24px 24px;
}
.w-life .bar { background: rgba(246, 243, 236, .93); }
.w-life .bar__nav .nav__a[aria-current="page"] { border-bottom-color: var(--acc); }
.w-life .bar__btn { border-radius: 19px; }
.w-life .prog i { background: linear-gradient(90deg, var(--tape), var(--tape2)); height: 4px; }

/* ---------- hero ---------- */
.w-life .ah { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 64px; align-items: center; width: min(1180px, calc(100% - 64px)); margin: 0 auto; padding-top: 72px; }
.w-life .ah__cat { position: relative; display: inline-flex; align-items: center; height: 30px; padding: 0 14px; font-family: var(--f-kuai); font-size: 15px; background: repeating-linear-gradient(45deg, rgba(191, 227, 213, .95) 0 8px, rgba(168, 214, 197, .95) 8px 16px); transform: rotate(-2deg); }
.w-life .ah__t { margin-top: 24px; font-family: var(--f-kuai); font-weight: 400; font-size: 58px; line-height: 1.22; letter-spacing: .02em; text-wrap: balance; }
.w-life .ah__lede { position: relative; margin-top: 26px; font-family: var(--f-hand); font-size: 31px; line-height: 1.35; color: var(--acc); }
.w-life .ah__lede::after { content: ""; display: block; width: 78%; height: 12px; margin-top: 2px; border-bottom: 2.5px solid rgba(184, 58, 50, .7); border-radius: 0 0 60% 40% / 0 0 100% 100%; transform: rotate(-1deg); }
.w-life .ah__meta { margin-top: 22px; display: grid; gap: 2px; }

.w-life .ah__pola { position: relative; justify-self: center; width: 100%; max-width: 560px; padding: 16px 16px 0; background: #FFFFFF; transform: rotate(2.4deg); box-shadow: 0 2px 4px rgba(0, 0, 0, .08), 0 22px 40px -14px rgba(46, 43, 40, .35); animation: life-drop .9s cubic-bezier(.2, 1.2, .4, 1) both; }
.w-life .ah__pola::before { content: ""; position: absolute; z-index: 2; top: -14px; left: 50%; width: 120px; height: 28px; margin-left: -60px; background: repeating-linear-gradient(45deg, rgba(247, 198, 181, .95) 0 8px, rgba(242, 178, 158, .95) 8px 16px); transform: rotate(-4deg); }
.w-life .ah__ph { display: block; overflow: hidden; background: #2E2B28; }
.w-life .ah__ph img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 50%; animation: life-develop 3.2s ease-out .5s both; }
.w-life .ah__pola figcaption { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 6px 18px; font-family: var(--f-hand); font-size: 25px; line-height: 1.2; color: #3A3632; }
.w-life .ah__pola figcaption small { font-family: var(--f-ui); font-size: 12.5px; color: var(--muted); }
@keyframes life-drop { from { opacity: 0; transform: translateY(-40px) rotate(-6deg); } to { opacity: 1; transform: rotate(2.4deg); } }
@keyframes life-develop { 0% { filter: brightness(.18) saturate(0) contrast(.6); } 35% { filter: brightness(.9) saturate(.2) sepia(.5) contrast(.7); } 100% { filter: none; } }

/* ---------- text ---------- */
.w-life .ag { margin-top: 90px; }
.w-life .prose { padding: 48px 56px 58px; background: var(--paper); border-radius: 4px; box-shadow: 0 1px 2px rgba(46, 43, 40, .08), 0 20px 36px -24px rgba(46, 43, 40, .3); }
.w-life.deco .prose h2 {
  display: table; margin-top: 2.2em; padding: 0 6px; margin-left: -6px; font-family: var(--f-kuai); font-weight: 400; font-size: 28px; line-height: 1.45;
  background: linear-gradient(transparent 52%, var(--mark) 52% 92%, transparent 92%) no-repeat 0 0 / 100% 100%;
  animation: life-mark linear both; animation-timeline: view(); animation-range: entry 40% cover 40%;
}
@keyframes life-mark { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }
.w-life.deco .prose a { text-decoration-color: var(--acc); text-decoration-style: wavy; text-decoration-thickness: 1.5px; }
.w-life .cut::before { background: linear-gradient(rgba(255, 255, 255, 0), #FFFFFF); }
.w-life .cut a { border-radius: 22px; }

.w-life .toc h2 { font-family: var(--f-kuai); font-weight: 400; font-size: 16px; color: var(--ink); }
.w-life .toc a { border-radius: 16px; }
.w-life .toc a[aria-current="true"] { background: var(--mark); }

.w-life .rail__note { position: relative; padding: 24px 18px 18px; background: #FFF6B3; transform: rotate(2deg); box-shadow: 0 10px 16px -10px rgba(0, 0, 0, .35); }
.w-life .rail__note::before { content: ""; position: absolute; top: -10px; left: 50%; width: 74px; height: 20px; margin-left: -37px; background: repeating-linear-gradient(45deg, rgba(191, 227, 213, .95) 0 6px, rgba(168, 214, 197, .95) 6px 12px); transform: rotate(-3deg); }
.w-life .rail__note b { font-family: var(--f-kuai); font-weight: 400; font-size: 16px; color: var(--acc); }
.w-life .rail__note p { color: #4E4838; }
.w-life .rail__btn { border-radius: 18px; }

/* ---------- end matter ---------- */
.w-life .ae h2 { font-family: var(--f-kuai); font-weight: 400; font-size: 20px; }
.w-life .tags a { border-radius: 16px; background: #FFFFFF; }
.w-life .tags a:hover { background: var(--mark); border-color: transparent; }
.w-life .author { background: #FFFFFF; border-radius: 6px; box-shadow: 0 16px 30px -22px rgba(46, 43, 40, .5); }
.w-life .author img { border-radius: 50%; }
.w-life .author h3 { font-family: var(--f-kuai); font-weight: 400; font-size: 22px; }
.w-life .cmt__one { position: relative; padding: 22px 22px 18px; background: #FFFFFF; border-radius: 4px; box-shadow: 0 12px 22px -16px rgba(46, 43, 40, .5); transform: rotate(-.6deg); }
.w-life .cmt__one::before { content: ""; position: absolute; top: -10px; right: 40px; width: 64px; height: 20px; background: repeating-linear-gradient(45deg, rgba(247, 198, 181, .95) 0 6px, rgba(242, 178, 158, .95) 6px 12px); transform: rotate(4deg); }
.w-life .cmt__one i { background: var(--tape); }
.w-life .cmt__form textarea { background: #FFFFFF; border-radius: 6px; }
.w-life .cmt__form button { border-radius: 22px; background: var(--acc); }
.w-life .sub input[type="email"], .w-life .sub button { border-radius: 21px; }

@container yh (max-width: 760px) {
  .w-life .ah { grid-template-columns: minmax(0, 1fr); gap: 34px; width: calc(100% - 32px); padding-top: 34px; }
  .w-life .ah__t { font-size: 36px; }
  .w-life .ah__lede { font-size: 25px; }
  .w-life .ah__pola { width: calc(100% - 12px); padding: 10px 10px 0; }
  .w-life .ah__pola figcaption { font-size: 21px; padding: 10px 4px 14px; }
  .w-life .ag { margin-top: 48px; }
  .w-life .prose { padding: 28px 20px 36px; }
  .w-life.deco .prose h2 { font-size: 23px; }
}
