/* Runtime fixes: square previews, swipe galleries and zoomable calendar covers. */
.upload-preview-item{aspect-ratio:1;min-height:0;height:auto}
.upload-preview-item video{height:100%;object-fit:cover}
.calendar-day.has-cover i{top:38px;right:auto;bottom:auto;left:8px;width:calc(100% - 16px);height:auto;aspect-ratio:1;cursor:zoom-in}
.calendar-period-cover{display:block;width:100%;padding:0;border:0;text-align:left;cursor:zoom-in}
.calendar-period-cover:focus-visible{outline:3px solid var(--sage);outline-offset:3px}
.day-focus-card i{inset:0 0 auto;height:auto;aspect-ratio:1}
.year-month-card i{height:auto;aspect-ratio:1}
.swipe-gallery{display:flex!important;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;gap:12px;padding-bottom:8px;touch-action:pan-x}
.swipe-gallery>*{flex:0 0 min(82%,560px);height:min(68vw,460px);scroll-snap-align:start}
.swipe-gallery>button{border-radius:12px;background-position:center;background-size:cover}
.swipe-gallery>video{border-radius:12px;object-fit:contain;background:#1f2420}
.hero-photo-main.image-load-failed{background:linear-gradient(145deg,rgba(119,136,112,.28),rgba(169,121,95,.2)),var(--soft)!important}
@media(max-width:760px){.calendar-day.has-cover i{top:35px;right:auto;bottom:auto;left:4px;width:calc(100% - 8px);height:auto;aspect-ratio:1}.swipe-gallery>*{flex-basis:88%;height:min(82vw,420px)}}

/* 育儿笔记：IMA 风格的轻量富文本编辑与可见性标签。 */
.parenting-notes-intro{margin:-8px 0 24px;padding:12px 16px;border:1px solid rgba(74,91,70,.16);border-radius:12px;background:rgba(255,255,255,.48);color:var(--muted);font-size:13px}
.parenting-list{display:grid;gap:20px;max-width:980px}
.parenting-note-card{padding:24px;border:1px solid rgba(47,55,43,.12);border-radius:18px;background:rgba(255,255,255,.76);box-shadow:0 12px 34px rgba(60,54,42,.06)}
.parenting-note-card>header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.parenting-note-card h2{margin:6px 0 0}.note-head-actions{display:flex;align-items:center;gap:12px}.visibility-chip{display:inline-flex;padding:5px 9px;border-radius:999px;background:#eef2eb;color:#50634d;font-size:12px;white-space:nowrap}.visibility-private{background:#f0edf1;color:#66586b}.visibility-public{background:#e8f1fb;color:#2d5f8f}.note-summary{margin:14px 0;color:var(--muted)}
.note-rich-content{line-height:1.8;word-break:break-word}.note-rich-content h2{font-size:1.3rem}.note-rich-content p{margin:8px 0}.note-rich-content table{border-collapse:collapse;width:100%;margin:16px 0}.note-rich-content th,.note-rich-content td{border:1px solid rgba(47,55,43,.18);padding:8px;text-align:left}.note-rich-content img{max-width:100%;height:auto}.note-attachments{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}.note-attachments button{width:160px;height:130px;border:0;border-radius:12px;background-position:center;background-size:cover;cursor:zoom-in}.note-attachments video{width:240px;max-width:100%;border-radius:12px;background:#222}.note-attachments audio{width:280px;max-width:100%}.note-file-link{display:inline-flex;align-items:center;gap:6px;padding:10px 14px;border-radius:10px;background:#f1f4ef;color:var(--ink);text-decoration:none}.note-file-link .line-icon{width:18px;height:18px}.parenting-form-modal{max-width:900px}.note-editor-shell{border:1px solid rgba(47,55,43,.18);border-radius:12px;overflow:hidden;background:#fff}.note-editor-toolbar{display:flex;flex-wrap:wrap;gap:6px;padding:9px;border-bottom:1px solid rgba(47,55,43,.12);background:#f7f8f5}.note-editor-toolbar button,.note-editor-toolbar select{border:1px solid rgba(47,55,43,.14);border-radius:7px;background:#fff;padding:6px 9px;color:var(--ink);cursor:pointer}.note-rich-editor{min-height:240px;padding:16px;outline:0;line-height:1.8}.note-rich-editor:empty:before{content:attr(data-placeholder);color:#9da59a}.public-note-warning{margin:8px 0 14px;color:#8b6b32;font-size:13px}.note-attachment-preview{background:#f3f5f1;position:relative}.note-attachment-preview .upload-remove{right:6px;top:6px}.note-upload-control .upload-preview{min-height:80px}
.admin-note-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--soft)}.admin-note-row strong,.admin-note-row small{display:block}.admin-note-row small{margin-top:4px;color:var(--muted);font-size:12px}.admin-note-row>span{color:var(--muted);font-size:12px;white-space:nowrap}
@media(max-width:760px){.parenting-note-card{padding:18px}.parenting-note-card>header{display:block}.note-head-actions{margin-top:10px;justify-content:space-between}.note-editor-toolbar{gap:4px}.note-editor-toolbar button,.note-editor-toolbar select{font-size:12px;padding:5px 6px}.admin-note-row{align-items:flex-start;flex-direction:column}}
