.coffee-intro .reading-content { max-width: none; }
.coffee-intro h1, .coffee-single h1 { margin-bottom: 1rem; }
.coffee-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 2.5rem 0 1.5rem; }
.coffee-filters { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.coffee-filters[hidden] { display: none; }
.coffee-filters button, .coffee-close { font: inherit; color: var(--secondary-color); background: none; border: 0; padding: .25rem 0; cursor: pointer; }
.coffee-filters button[aria-pressed="true"] { color: var(--font-color); text-decoration: underline; text-underline-offset: .4rem; }
.coffee-filters button:hover { color: var(--primary-color); }
.coffee-count { color: var(--secondary-color); font-size: .75rem; white-space: nowrap; }
.coffee-gallery { columns: 3; column-gap: 1.75rem; }
.coffee-moment { break-inside: avoid; margin: 0 0 2.5rem; }
.coffee-image-link { position: relative; display: block; overflow: hidden; background: var(--code-bg-color); }
.coffee-image-link img { display: block; width: 100%; height: auto; transition: transform .25s ease; }
.coffee-image-link:hover img { transform: scale(1.025); }
.coffee-expand { position: absolute; right: .75rem; bottom: .75rem; background: rgba(0,0,0,.65); color: white; font-size: .7rem; padding: .25rem .5rem; opacity: 0; transition: opacity .2s ease; }
.coffee-image-link:hover .coffee-expand, .coffee-image-link:focus-visible .coffee-expand { opacity: 1; }
.coffee-moment figcaption, .coffee-single-photo figcaption { margin-top: .75rem; }
.coffee-moment figcaption { text-align: left; }
.coffee-caption-heading { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.coffee-caption-heading span { color: var(--font-color); font-size: .85rem; }
.coffee-caption-heading time { color: var(--secondary-color); font-size: .65rem; white-space: nowrap; }
.coffee-moment figcaption p { font-family: "Libron", Georgia, serif; font-size: 1rem; letter-spacing: 0; line-height: 1.45; color: var(--secondary-color); margin: .35rem 0 0; }
.coffee-lightbox { box-sizing: border-box; width: min(58rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: 1.5rem; border: 0; border-radius: 12px; background: var(--background-color); color: var(--font-color); box-shadow: 0 24px 64px rgba(0, 0, 0, .24); }
.coffee-lightbox::backdrop { background: rgba(0,0,0,.7); }
.coffee-lightbox figure { margin: 0; }
.coffee-close { display: block; margin: 0 0 1rem auto; color: var(--font-color); }
.coffee-expanded-image { display: block; width: auto; max-width: 100%; max-height: min(65dvh, 42rem); margin: 0 auto; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.coffee-lightbox figcaption { text-align: center; margin-top: 1rem; }
.coffee-lightbox h2 { margin: 0; font-size: 1.25rem; }
.coffee-lightbox-notes { margin: .5rem auto 0; }
.coffee-lightbox-notes > :first-child { margin-top: 0; }
.coffee-lightbox-notes > :last-child { margin-bottom: 0; }
.coffee-lightbox-date { display: block; font-size: .75rem; color: var(--secondary-color); margin-top: .5rem; }
body:has(.coffee-lightbox[open]) { overflow: hidden; }
.coffee-single-photo { margin: 2rem 0; max-width: 48rem; }
.coffee-single-photo img { max-height: 75dvh; width: 100%; object-fit: contain; display: block; }
.coffee-single-photo figcaption { color: var(--secondary-color); }
.coffee-page :focus-visible { outline: 2px solid var(--primary-color); outline-offset: 5px; }
@media (max-width: 900px) { .coffee-gallery { columns: 2; } }
@media (max-width: 540px) {
  .coffee-gallery { columns: 1; }
  .coffee-toolbar { align-items: flex-start; }
  .coffee-filters { gap: .75rem; }
  .coffee-lightbox { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .coffee-image-link img, .coffee-expand { transition: none; } }
