/* The diary itself: weekly issue + daily card. Used by the web page and by the image
   renderer, so it must not depend on anything outside this file. */
.xy-issue, .xy-card {
  --paper: #FBF6EC; --card: #FFFDF8; --ink: #3B332B; --muted: #8C8173; --line: #EBE1CF;
  --green: #5FA36A; --green-d: #3E7D4B; --coral: #EE8566; --mustard: #EDBE55; --sky: #9CCBEA;
  --serif: "XY Display", "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased;
}
.xy-issue { background: var(--paper); font-size: 16px; line-height: 1.7; padding: 0 0 26px; max-width: 480px; margin: 0 auto; }
.xy-issue * { box-sizing: border-box; }

.xy-mast { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 12px; font-size: 13px; color: var(--muted); letter-spacing: .12em; }
.xy-mast .b { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--green-d); letter-spacing: .08em; }
.xy-mast svg { width: 22px; height: 22px; display: block; }

.xy-cover { position: relative; margin: 0 16px; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 5; background: #eee; }
.xy-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xy-cover .t { position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 20px 18px; color: #fff; background: linear-gradient(180deg, rgba(48, 36, 24, 0) 0%, rgba(48, 36, 24, .66) 100%); }
.xy-cover h1 { font-family: var(--serif); font-weight: 900; font-size: 34px; line-height: 1.2; margin: 0 0 6px; letter-spacing: .02em; }
.xy-cover p { margin: 0; font-size: 14px; opacity: .96; }
.xy-title { margin: 6px 16px 0; padding: 22px 20px 20px; border-radius: 22px; background: var(--green-d); color: #fff; }
.xy-title h1 { font-family: var(--serif); font-weight: 900; font-size: 32px; line-height: 1.25; margin: 0 0 6px; letter-spacing: .02em; }
.xy-title p { margin: 0; font-size: 14px; opacity: .96; }

.xy-headline { margin: 18px 16px 0; padding: 18px 20px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; }
.xy-kicker { display: inline-block; font-size: 12px; letter-spacing: .2em; color: #fff; background: var(--coral); padding: 3px 9px 3px 12px; border-radius: 999px; font-weight: 700; }
.xy-headline h2 { font-family: var(--serif); font-weight: 900; font-size: 30px; line-height: 1.3; margin: 10px 0 4px; }
.xy-headline .meta { font-size: 13px; color: var(--muted); margin: 0; }
.xy-headline .more { font-size: 14px; margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); }

.xy-sec { margin: 28px 16px 0; }
.xy-sec h3 { font-family: var(--serif); font-weight: 700; font-size: 19px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.xy-sec h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }

.xy-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.xy-tile { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 14px 13px; min-height: 124px; display: flex; flex-direction: column; }
.xy-tile:last-child:nth-child(odd) { grid-column: span 2; }
.xy-tile .l { font-size: 13px; color: var(--muted); }
.xy-tile .n { font-family: var(--serif); font-weight: 900; font-size: 34px; line-height: 1.2; margin: 2px 0 4px; white-space: nowrap; }
.xy-tile .n small { font-family: var(--sans); font-weight: 500; font-size: 14px; margin: 0 5px 0 3px; }
.xy-tile .s { font-size: 13px; }
.xy-tile .bd { margin-top: auto; padding-top: 6px; }
.xy-badge { display: inline-block; font-size: 12px; font-weight: 700; color: #7A5200; background: #FCEFC8; border-radius: 8px; padding: 2px 8px; }
.xy-badge.plain { color: var(--muted); background: #F3ECDD; font-weight: 500; }

.xy-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 132px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 14px 10px; }
.xy-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.xy-bar .track { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.xy-bar i { display: block; width: 100%; border-radius: 8px 8px 4px 4px; background: var(--sky); }
.xy-bar b { font-size: 11px; font-weight: 500; color: var(--muted); margin-bottom: 3px; }
.xy-bar span { font-size: 12px; color: var(--muted); margin-top: 4px; }

.xy-voice { background: #FFF3D9; border-radius: 20px; padding: 40px 18px 18px; position: relative; }
.xy-voice::before { content: "\201C"; font-family: Georgia, serif; font-size: 64px; line-height: 1; color: var(--mustard); position: absolute; top: 8px; left: 14px; }
.xy-voice p { margin: 0; font-size: 16px; line-height: 1.95; }

.xy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.xy-grid figure { margin: 0; position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #eee; }
.xy-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xy-grid figcaption { position: absolute; left: 6px; bottom: 6px; font-size: 11px; color: #fff; background: rgba(48, 36, 24, .55); border-radius: 6px; padding: 0 6px; line-height: 1.6; }

.xy-quote { margin: 0 0 10px; padding: 12px 14px 10px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 6px 14px 14px 6px; }
.xy-quote p { margin: 0 0 4px; font-size: 15px; }
.xy-quote cite { font-style: normal; font-size: 12px; color: var(--muted); }

.xy-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.xy-chip { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; font-size: 14px; }
.xy-chip b { font-weight: 700; margin-right: 4px; }

.xy-foot { margin: 30px 16px 0; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; font-size: 12px; color: var(--muted); }
.xy-foot .send { font-family: var(--serif); font-weight: 700; font-size: 15px; color: var(--green-d); margin: 0 0 4px; }
.xy-foot p { margin: 0; }
.xy-foot .ai { display: inline-block; margin-top: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; }

/* ---- daily card: a fixed 1080 x 1350 picture ---- */
.xy-card { width: 1080px; height: 1350px; background: var(--paper); position: relative; overflow: hidden; }
.xy-card * { box-sizing: border-box; }
.xy-card .ph { position: absolute; left: 56px; top: 56px; width: 968px; height: 820px; border-radius: 48px; overflow: hidden; background: #eee; }
.xy-card .ph img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.xy-card .tag { position: absolute; left: 88px; top: 88px; background: #FFFDF8; color: var(--ink); font-family: var(--serif); font-weight: 900; font-size: 44px; padding: 10px 30px 12px; border-radius: 999px; box-shadow: 0 6px 24px rgba(48, 36, 24, .14); }
.xy-card .body { position: absolute; left: 72px; right: 72px; top: 900px; bottom: 146px; display: flex; flex-direction: column; justify-content: center; }
.xy-card .row { display: flex; align-items: center; gap: 18px; font-size: 32px; color: var(--muted); margin-bottom: 14px; }
.xy-card .ms { background: var(--coral); color: #fff; font-weight: 700; border-radius: 999px; padding: 4px 22px 6px; font-size: 30px; }
.xy-card .q { font-family: var(--serif); font-weight: 700; font-size: 46px; line-height: 1.45; margin: 0; }
.xy-card .by { font-size: 30px; color: var(--muted); margin: 10px 0 0; }
.xy-card .sum { position: absolute; left: 72px; right: 72px; bottom: 56px; height: 76px; display: flex; align-items: center; justify-content: space-between; border-top: 2px solid var(--line); padding-top: 18px; font-size: 30px; }
.xy-card .sum .items { display: flex; gap: 12px; }
.xy-card .sum .items span { background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: 4px 20px 6px; }
.xy-card .sum .br { display: flex; align-items: center; gap: 10px; color: var(--green-d); font-weight: 700; letter-spacing: .06em; }
.xy-card .sum .br svg { width: 40px; height: 40px; }

/* ---- added 2026-11-14: last week beside this week, the seven days, the long view, the rhythm ---- */
.xy-tile .pv { font-size: 12px; color: var(--muted); margin-top: 2px; }
.xy-bars.feed i { background: var(--mustard); }
.xy-cover.wide { aspect-ratio: 1 / 1; }

.xy-days { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 4px 14px; }
.xy-day { display: grid; grid-template-columns: 44px 46px 1fr; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.xy-day:last-child { border-bottom: 0; }
.xy-day .when { text-align: center; line-height: 1.25; }
.xy-day .when b { display: block; font-family: var(--serif); font-size: 18px; }
.xy-day .when span { font-size: 11px; color: var(--muted); }
.xy-day img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; display: block; }
.xy-day .dot { width: 46px; height: 46px; border-radius: 12px; background: #F3ECDD; position: relative; }
.xy-day .dot::after { content: ""; position: absolute; left: 19px; top: 19px; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.xy-day .what p { margin: 0; }
.xy-day .line { font-size: 14.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xy-day .line.first { font-weight: 700; color: #B4512F; }
.xy-day .stats { font-size: 12px; color: var(--muted); margin-top: 1px; }
/* Each figure stays in one piece ("尿布 4 片" never breaks after 尿布); a dot between neighbours. */
.xy-day .stats span { white-space: nowrap; display: inline-block; }
.xy-day .stats span:not(:last-child)::after { content: "·"; margin: 0 5px; }
.xy-day .busy { font-size: 13.5px; color: var(--muted); }
.xy-day.quiet .when b { color: var(--muted); }

.xy-back { display: flex; gap: 12px; align-items: center; background: #EAF3EC; border-radius: 18px; padding: 12px 14px; }
.xy-back img { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; flex: none; }
.xy-back p { margin: 0 0 4px; font-size: 15px; line-height: 1.6; }
.xy-back cite { font-style: normal; font-size: 12px; color: var(--muted); }

.xy-rhythm { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px 16px 12px; }
.xy-rhythm ul { margin: 0; padding: 0; list-style: none; }
.xy-rhythm li { position: relative; padding: 5px 0 5px 18px; font-size: 14.5px; line-height: 1.55; }
.xy-rhythm li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.xy-rhythm .need li::before { background: var(--mustard); }
.xy-rhythm .age li::before { background: var(--sky); }
.xy-rhythm h4 { margin: 10px 0 2px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); font-weight: 700; }
.xy-rhythm .none { margin: 2px 0; font-size: 14.5px; }
.xy-rhythm .src { margin: 4px 0 0; font-size: 11px; color: var(--muted); }
.xy-tries { margin: 0; padding: 0; list-style: none; counter-reset: xy; }
.xy-tries li { counter-increment: xy; position: relative; background: #FFF3D9; border-radius: 14px; padding: 10px 14px 10px 44px; margin-bottom: 8px; font-size: 14.5px; line-height: 1.55; }
.xy-tries li::before { content: counter(xy); position: absolute; left: 12px; top: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--mustard); color: #fff; font-weight: 700; font-size: 13px; line-height: 22px; text-align: center; }
.xy-fine { margin: 8px 2px 0; font-size: 11px; line-height: 1.6; color: var(--muted); }
.xy-ahead { margin: 0; padding: 0; list-style: none; }
.xy-ahead li { background: #FDE9E2; border-radius: 14px; padding: 10px 14px; margin-bottom: 8px; font-size: 14.5px; }

.xy-journey .big { background: var(--green-d); color: #fff; border-radius: 18px; padding: 14px 18px 13px; margin-bottom: 12px; }
.xy-journey .big b { display: block; font-family: var(--serif); font-weight: 900; font-size: 28px; line-height: 1.25; }
.xy-journey .big span { font-size: 13px; opacity: .92; }
.xy-journey h4 { font-size: 14px; margin: 18px 0 8px; color: var(--muted); font-weight: 700; letter-spacing: .08em; }
.xy-journey .none, .xy-journey .more { font-size: 13px; color: var(--muted); margin: 6px 2px 0; }
.xy-thennow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.xy-thennow figure { margin: 0; position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 1; background: #eee; }
.xy-thennow img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xy-thennow figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 8px; color: #fff; background: linear-gradient(180deg, rgba(48, 36, 24, 0), rgba(48, 36, 24, .7)); line-height: 1.35; }
.xy-thennow figcaption b { display: block; font-family: var(--serif); font-size: 17px; }
.xy-thennow figcaption span { font-size: 11px; opacity: .95; }
.xy-grow { display: grid; grid-template-columns: 44px auto 1fr; gap: 4px 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; margin-bottom: 8px; }
.xy-grow .l { font-size: 13px; color: var(--muted); }
.xy-grow .v { font-family: var(--serif); font-weight: 900; font-size: 22px; white-space: nowrap; }
.xy-grow .v i { font-style: normal; font-family: var(--sans); font-weight: 500; color: var(--muted); margin: 0 6px; font-size: 16px; }
.xy-grow .v small { font-family: var(--sans); font-weight: 500; font-size: 12px; margin-left: 4px; }
.xy-grow svg { width: 100%; height: 34px; display: block; overflow: visible; }
.xy-grow polyline { fill: none; stroke: var(--green); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.xy-grow circle { fill: var(--green-d); }
.xy-grow .s { grid-column: 2 / 4; font-size: 11px; color: var(--muted); }
.xy-firsts { margin: 0; padding: 0 0 0 14px; list-style: none; border-left: 2px solid var(--line); }
.xy-firsts li { position: relative; padding: 0 0 12px 12px; line-height: 1.4; }
.xy-firsts li:last-child { padding-bottom: 2px; }
.xy-firsts li::before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); border: 2px solid var(--paper); }
.xy-firsts b { display: block; font-size: 15px; }
.xy-firsts span { font-size: 12px; color: var(--muted); }
.xy-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.xy-months figure { margin: 0; position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #eee; }
.xy-months img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xy-months figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 6px 5px; color: #fff; background: linear-gradient(180deg, rgba(48, 36, 24, 0), rgba(48, 36, 24, .68)); line-height: 1.3; }
.xy-months figcaption b { display: block; font-size: 12px; }
.xy-months figcaption span { display: block; font-size: 10px; opacity: .95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xy-totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.xy-totals div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 9px 4px 8px; text-align: center; }
.xy-totals b { display: block; font-family: var(--serif); font-weight: 900; font-size: 20px; line-height: 1.2; }
.xy-totals span { font-size: 11px; color: var(--muted); }
.xy-journey .thanks { margin: 10px 2px 0; font-size: 14px; line-height: 1.7; color: var(--green-d); font-weight: 700; }

/* One page of the issue as a picture for LINE. Each page says which week it is and is as
   tall as what it has to say: a first week with three records is short, not half empty. */
.xy-page { display: flex; flex-direction: column; padding-bottom: 14px; }
.xy-nocover { margin: 22px 16px 0; padding: 22px 20px; border: 2px dashed var(--line); border-radius: 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--muted); font-size: 14px; }
.xy-nocover svg { width: 40px; height: 40px; display: block; opacity: .8; }
.xy-nocover p { margin: 0; }
.xy-pagehead { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 0; font-size: 12px; color: var(--muted); }
.xy-pagehead .b { display: flex; align-items: center; gap: 6px; font-family: var(--serif); font-weight: 900; font-size: 17px; color: var(--green-d); }
.xy-pagehead svg { width: 22px; height: 22px; display: block; }
.xy-page .xy-pagehead + .xy-sec { margin-top: 16px; }
.xy-pageno { margin-top: auto; padding-top: 18px; text-align: center; font-size: 11px; letter-spacing: .2em; color: var(--muted); }
.xy-page .xy-foot { margin-top: 22px; }
