/* A small scrapbook: calendar paper, taped notes and soft monochrome stickers. */
#page-mood, .mood-editor, .mood-month-picker { --mood-user:var(--text); --mood-assistant:var(--text2); --mood-user-wash:var(--surface2); --mood-assistant-wash:var(--surface2); font-family:'CustomUserFont',-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif; }
#page-mood { background:var(--bg); color:var(--text); --mood-paper:color-mix(in srgb,var(--surface) 84%,var(--bg)); --mood-pencil:color-mix(in srgb,var(--text) 12%,transparent); --mood-tape:color-mix(in srgb,var(--text3) 20%,transparent); }
#page-mood .mood-day { color:var(--text2) !important; background:transparent !important; }
#page-mood .mood-day.selected { background:var(--surface2) !important; }
#page-mood .mood-month-trigger,#page-mood .app-page-back { color:var(--text) !important; background:transparent !important; }
.mood-editor .mood-side-switch button { color:var(--text2) !important; }
.mood-editor .mood-side-switch button.active { color:var(--text) !important; }
.mood-editor,.mood-month-picker { color:var(--text); }
.mood-editor,.mood-month-picker { top:var(--app-top,0px); bottom:auto; height:var(--app-height,100dvh); }
.mood-editor .sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
[data-theme="dark"] #page-mood,[data-theme="dark"] .mood-editor { --mood-user:var(--text); --mood-assistant:var(--text2); --mood-user-wash:var(--surface2); --mood-assistant-wash:var(--surface2); }
#page-mood [hidden],.mood-month-picker [hidden] { display:none !important; }
#page-mood .mood-topbar { display:flex !important; align-items:center; gap:12px; height:calc(68px + var(--safe-top)); padding:calc(12px + var(--safe-top)) 18px 12px; background:var(--bg) !important; border-bottom:0; box-shadow:none; }
#btn-mood-more { margin-left:auto; }
#page-mood .mood-icon-button { display:grid; place-items:center; width:40px; height:40px; flex:0 0 40px; padding:0; color:var(--text); background:transparent; border:0; border-radius:12px; }
#page-mood .mood-icon-button svg { width:22px; height:22px; }
#page-mood .mood-board { width:min(620px,100%); min-height:0; padding:12px 24px calc(40px + var(--safe-bottom)); }
.mood-calendar-paper { position:relative; padding:30px 14px 16px; background:var(--mood-paper); border:0; border-radius:8px 18px 12px 6px; box-shadow:0 3px 5px #00000003,0 12px 28px #00000006; }
.mood-calendar-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:18px; }
#page-mood .mood-month-trigger { display:flex; align-items:center; gap:8px; position:static; width:auto; transform:none; padding:0 2px; font-family:inherit; font-size:18px; font-weight:600; color:var(--text); }
#page-mood .mood-month-trigger:active { transform:none; }
.mood-month-trigger svg { width:14px; height:14px; }
.mood-month-arrows { display:flex; gap:2px; }
.mood-weekdays { font-family:inherit; font-size:11px; margin-bottom:14px; color:var(--text3); }
.mood-calendar { gap:4px 2px; }
.mood-day,.mood-day-spacer { min-height:46px; }
.mood-day { gap:2px; padding:2px 0; border-radius:12px; }
.mood-day-number { width:24px; height:24px; font-family:inherit; font-size:12px; border-radius:9px; }
.mood-day.today .mood-day-number { background:var(--text); color:var(--bg); font-weight:600; }
.mood-day.selected { background:var(--surface2); }
.mood-day-pair { display:flex; justify-content:center; align-items:center; gap:2px; width:100%; height:16px; }
.mood-day-person { position:static; width:17px; height:16px; font-size:13px; background:transparent; border:0; border-radius:0; transform:none; box-shadow:none !important; }
.mood-day-person:not(.filled) { display:none; }
.mood-day.has-mood .mood-day-pair { filter:none; }
.mood-day.selected .mood-day-pair { transform:none; }
.mood-day:not(.has-mood) .mood-day-pair::after { display:none; }
.mood-legend { display:flex; justify-content:center; gap:18px; padding:14px 0 0; margin-top:10px; border-top:1px dashed var(--mood-pencil); }
.mood-legend span { font-size:11px; max-width:44%; }
.mood-legend i { background:var(--text); width:6px; height:6px; }
.mood-legend .is-assistant i { background:var(--text3); }
.mood-day-detail { margin-top:32px; }
.mood-day-detail-head { display:flex; justify-content:space-between; align-items:center; margin:0 2px 16px; }
.mood-day-detail-head h2 { font-size:18px; font-weight:600; margin:0 0 5px; }
.mood-day-detail-head span { font-size:11px; color:var(--text3); }
#page-mood #btn-mood-add { width:38px; height:38px; background:var(--surface); color:var(--text2); border-radius:50%; box-shadow:0 3px 8px #0000000b; }
.mood-day-record { position:relative; display:flex; align-items:flex-start; gap:12px; padding:24px 20px 30px; margin:22px 0; background:var(--mood-paper); border:0; border-radius:5px 16px 30px 8px; box-shadow:0 6px 16px #00000006; }
.mood-record-avatar { display:grid; place-items:center; flex:0 0 34px; width:34px; height:34px; border-radius:50%; overflow:hidden; background:var(--surface2); font-size:13px; color:var(--text2); }
.mood-record-avatar img { width:100%; height:100%; object-fit:cover; }
.mood-record-content { flex:1; min-width:0; }
.mood-record-content header { display:flex; align-items:center; gap:12px; justify-content:space-between; min-height:22px; }
.mood-record-content b { font-size:12px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mood-record-content time { flex:0 0 auto; font-size:10px; color:var(--text3); }
.mood-record-emoji { display:inline-block; margin-top:8px; font-size:25px; }
.mood-record-content p { font-size:14px; line-height:1.95; margin:8px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.mood-day-empty { display:flex; flex-direction:column; align-items:center; gap:12px; padding:40px 16px; background:var(--mood-paper); border-radius:5px 18px 30px 8px; color:var(--text3); font-size:12px; }
.mood-day-empty svg { width:32px; height:32px; opacity:.55; }
#btn-mood-records-more { display:block; margin:16px auto; padding:10px; font-size:12px; color:var(--text2); }
.mood-editor-sheet { padding:10px 20px calc(20px + var(--safe-bottom)); background:var(--surface); border:1px solid var(--border); border-bottom:0; border-radius:22px 22px 0 0; max-height:calc(var(--app-height,100dvh) - 20px); }
.mood-editor-head h2,.mood-editor-date,.mood-month-picker-head h2 { font-family:inherit; font-size:18px; font-weight:600; }
.mood-editor-close,.mood-month-picker-close { background:transparent; border-radius:10px; }
.mood-side-switch { display:flex; gap:4px; padding:4px; margin:18px 0; background:var(--surface2); border:0; border-radius:12px; }
.mood-side-switch button { flex:1; justify-content:center; height:36px; padding:0 8px; border-radius:9px; font-size:12px; }
.mood-side-switch button i,.mood-side-switch button::after { display:none; }
.mood-side-switch button.active { background:var(--surface); color:var(--text); box-shadow:0 1px 4px rgba(0,0,0,.04); }
.mood-compose-question { font-family:inherit; font-size:12px; font-weight:500; }
.mood-quick-picks { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:6px; }
.mood-quick-picks button { width:100%; height:38px; border-radius:10px; background:var(--surface2); font-size:22px; }
.mood-editor .mood-quick-picks button.selected { box-shadow:inset 0 0 0 1px var(--text3); transform:none; }
.mood-custom-pick { margin-top:12px; border:1px solid var(--border); border-radius:10px; padding:8px 10px; }
.mood-note-input { min-height:86px; padding:12px; margin-top:12px; background:var(--surface2); border-radius:12px; line-height:1.7; font-family:inherit; }
.mood-note-input::placeholder { font-style:normal; }
.mood-note-input:focus { outline:none !important; box-shadow:inset 0 0 0 1px var(--text3); }
.mood-compose-foot { justify-content:flex-end; margin-top:16px; }
.mood-add-button { border-radius:12px; background:var(--text); color:var(--bg); padding:11px 18px; font-family:inherit; font-size:13px; }
.mood-entry-label,.mood-entry-time { font-family:inherit; }
.mood-entry-empty { min-height:48px; padding:14px 0; }
.mood-month-picker-sheet { background:var(--surface); border:1px solid var(--border); border-radius:20px; }
.mood-month-picker-sheet { max-height:calc(var(--app-height,100dvh) - 88px); }
.mood-year-field input { font-family:inherit; }
@media(max-width:360px){#page-mood .mood-board{padding:18px 12px 28px;}.mood-calendar-paper{padding:14px 10px;}.mood-day-person{width:15px;font-size:12px;}.mood-calendar-heading{margin-bottom:14px;}.mood-month-trigger{font-size:16px;}}
@media(prefers-reduced-motion:reduce){#page-mood .mood-day,#page-mood .mood-month-trigger,.mood-editor,.mood-editor-sheet{transition:none;}}

/* Decorative paper details never intercept gestures or enter the reading order. */
.mood-scrapbook-intro { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:4px 3px 30px; }
.mood-scrapbook-intro h1 { margin:0 0 6px; font-size:21px; font-weight:550; letter-spacing:.03em; }
.mood-scrapbook-intro small { color:var(--text3); font-size:11px; letter-spacing:.06em; }
.mood-scrapbook-sticker { display:grid; place-items:center; flex:0 0 52px; height:52px; border-radius:50%; color:var(--text2); background:var(--surface); box-shadow:0 3px 9px #00000008; transform:rotate(9deg); }
.mood-scrapbook-sticker svg { width:25px; height:25px; }
.mood-calendar-paper::before,.mood-day-record::before { content:''; position:absolute; z-index:1; pointer-events:none; width:78px; height:25px; top:-11px; left:calc(50% - 39px); background:var(--mood-tape); border-left:2px dotted var(--bg); border-right:2px dotted var(--bg); transform:rotate(-5deg); }
.mood-calendar-paper::after { content:''; position:absolute; pointer-events:none; inset:7px; border:1px solid var(--mood-pencil); border-radius:3px 12px 8px 3px; opacity:.4; }
.mood-day-record::before { width:48px; height:17px; left:23px; top:-7px; transform:rotate(-8deg); }
.mood-day-record::after { content:''; position:absolute; pointer-events:none; bottom:0; right:0; width:23px; height:23px; background:linear-gradient(135deg,transparent 48%,var(--surface2) 50%); border-radius:6px 0 24px 0; }
.mood-day-record[data-side="user"] { background:color-mix(in srgb,var(--surface2) 65%,var(--surface)); margin-right:8px; }
.mood-day-record[data-side="assistant"] { margin-left:8px; }
.mood-record-avatar { width:40px; height:40px; flex-basis:40px; border:3px solid var(--surface); box-shadow:0 2px 5px #00000008; }
.mood-record-content time { padding-top:3px; letter-spacing:.04em; }
.mood-day-detail-head h2 { font-size:20px; letter-spacing:.02em; }
#page-mood .mood-day.selected { background:color-mix(in srgb,var(--text3) 13%,transparent) !important; border-radius:45% 42% 46% 38%; }
.mood-day.today .mood-day-number { border-radius:50%; }
.mood-editor-sheet { border:0; border-radius:24px 24px 0 0; }
.mood-note-input { background:repeating-linear-gradient(transparent 0,transparent 27px,var(--border) 28px,transparent 29px); line-height:29px; border-radius:0; }
.mood-side-switch,.mood-add-button { border-radius:24px; }
.mood-editor .mood-quick-picks button { border-radius:50%; }
#page-mood button:focus-visible { outline:2px solid var(--text2); outline-offset:3px; }
@media(max-width:360px){.mood-scrapbook-intro h1{font-size:19px;}.mood-calendar-paper{padding-top:27px;}.mood-day-record{padding:22px 14px 26px;gap:10px;}}
