/* Celebration Calendar event photographs */
.cep-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.cep-img { display:block; width:100%; height:100%; object-fit:cover; opacity:0; transition:opacity .35s ease; }
.cep-img.cep-loaded { opacity:1; }

/* Grid cell: full-bleed photo, legible text on a scrim */
.day-cell.cep-has-photo { min-height:132px; padding:0; display:flex; flex-direction:column; justify-content:space-between; border-color:#2e2e29; }
.day-cell.cep-has-photo .cep-cell-photo { position:absolute; inset:0; z-index:0; }
.day-cell.cep-has-photo .cep-cell-photo .cep-img { transform:scale(1.01); transition:opacity .35s ease, transform .5s ease; }
.day-cell.cep-has-photo:hover .cep-cell-photo .cep-img { transform:scale(1.06); }
.day-cell.cep-has-photo::after { content:''; position:absolute; inset:0; z-index:1; pointer-events:none;
  background:linear-gradient(180deg, rgba(10,10,8,.55) 0%, rgba(10,10,8,0) 30%, rgba(10,10,8,.35) 52%, rgba(10,10,8,.94) 100%); }
.day-cell.cep-has-photo > .day-num,
.day-cell.cep-has-photo > .day-events { position:relative; z-index:2; }
.day-cell.cep-has-photo > .day-num { padding:6px 7px 0; font-weight:700; text-shadow:0 1px 3px #000; }
.day-cell.cep-has-photo > .day-events { padding:0 7px 7px; }
.day-cell.cep-has-photo .evt-name { text-shadow:0 1px 2px #000, 0 0 6px rgba(0,0,0,.8); font-weight:700; }
.day-cell.cep-has-photo .more-events { text-shadow:0 1px 2px #000; }
.day-cell.cep-has-photo.today-cell::before { content:''; position:absolute; inset:0; z-index:3; border:2px solid var(--accent); pointer-events:none; }
.cep-cell-tag { margin-left:auto; font-size:7px; letter-spacing:1.2px; padding:1px 4px; background:rgba(10,10,8,.7); color:#e8e8e0; border:1px solid rgba(255,255,255,.18); font-weight:400; }

/* Figures (detail, timeline) */
.cep-figure { margin:0 0 14px; border:1px solid var(--border); background:#0d0d0b; }
.cep-media { position:relative; overflow:hidden; background:#16160f; max-height:260px; }
.cep-badge { position:absolute; left:8px; top:8px; font-family:var(--font-mono); font-size:8px; letter-spacing:1.5px; text-transform:uppercase; padding:3px 7px; background:rgba(10,10,8,.82); color:var(--accent); border:1px solid rgba(255,159,67,.45); }
.cep-cap { padding:8px 10px 10px; font-family:var(--font-mono); }
.cep-subject { display:block; font-size:10px; color:#e8e8e0; line-height:1.5; margin-bottom:4px; }
.cep-credit { font-size:9px; color:#c8c8c0; line-height:1.6; overflow-wrap:anywhere; }
.cep-credit a { color:var(--accent); text-underline-offset:2px; }
.cep-note { font-size:9px; color:#a8a89c; line-height:1.55; margin-top:4px; }

.tl-item .cep-timeline { margin:10px 0 0; max-width:520px; }
.tl-item .cep-timeline .cep-media { max-height:200px; }
.tl-content { min-width:0; }

/* List thumbnail */
.list-row .cep-thumb { width:28px; height:28px; overflow:hidden; border:1px solid var(--border); }
.list-row.cep-row-photo { grid-template-columns:56px 100px 1fr 120px; }
.list-row.cep-row-photo .cep-thumb { width:48px; height:48px; }
.list-header.cep-list-photo { grid-template-columns:56px 100px 1fr 120px; }
.list-row:not(.cep-row-photo) .list-emoji { display:inline-block; }

/* Tooltip */
.tip-photo { margin:-2px 0 10px; height:120px; overflow:hidden; border:1px solid #222; flex-shrink:0; }

@media (max-width: 900px) {
  .list-header.cep-list-photo, .list-row.cep-row-photo { grid-template-columns:56px 70px 1fr; }
}
@media (max-width: 640px) {
  .day-cell.cep-has-photo { min-height:88px; }
  .day-cell.cep-has-photo .evt-emoji { display:none; }
  .cep-cell-tag { display:none; }
  .list-header.cep-list-photo, .list-row.cep-row-photo { grid-template-columns:48px 60px 1fr; }
  .list-row.cep-row-photo .cep-thumb { width:40px; height:40px; }
  .tl-item .cep-timeline { max-width:100%; }
}
@media (prefers-reduced-motion: reduce) {
  .cep-img, .day-cell.cep-has-photo .cep-cell-photo .cep-img { transition:none; transform:none !important; }
}
.tip-photo .cep-thumb { width:100%; height:100%; }
.cep-cell-photo .cep-img, .cep-thumb .cep-img { height:100%; }
.cep-status { margin:0; padding:6px 28px; background:var(--surface2); border-bottom:1px solid var(--border); font-family:var(--font-mono); font-size:10px; letter-spacing:.5px; color:#e8e8e0; }
.cep-status::before { content:'! '; color:var(--accent); font-weight:700; }
.cep-status[hidden] { display:none; }
@media (max-width: 900px) { .cep-status { padding:6px 12px; } }
