.lyra {
  --gallery-line: var(--lyra-border);
  --gallery-text: var(--lyra-text);
  --gallery-muted: var(--lyra-muted);
  --gallery-shell: 1460px;
  --gallery-gutter: clamp(1rem, 4.2vw, 4rem);
  --gallery-radius: 1.25rem;
  min-height: 100vh;
  margin: 0;
  background: var(--lyra-bg);
  color: var(--gallery-text);
  font-family: var(--lyra-font);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body a { color: inherit; text-decoration: none; }
body :focus-visible { outline: 2px solid var(--lyra-accent); outline-offset: 4px; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
.shell { max-width: var(--gallery-shell); margin-inline: auto; padding-inline: var(--gallery-gutter); }
.skip-link { position: fixed; z-index: 2; inset: 1rem auto auto 1rem; transform: translateY(-200%); padding: .75rem 1rem; background: var(--lyra-surface); }
.skip-link:focus { transform: none; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: clamp(.6rem, 3vw, 2.5rem); min-height: 5.15rem; }
.lyra .wordmark { display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; font-size: clamp(1rem, 2.5vw, 1.28rem); letter-spacing: -.045em; font-weight: 740; color: var(--gallery-text); }
.wordmark strong { font-weight: 480; }
.brand-name { display: inline-flex; align-items: center; gap: .01em; font-size: 1.26em; line-height: 1; }
.brand-mark { display: inline-block; width: 1.04em; height: 1.04em; margin-inline: -.1em; }
.pivots { display: flex; gap: clamp(.65rem, 3vw, 2rem); margin-right: auto; align-items: center; }
.pivots a { color: var(--gallery-muted); font-size: .91rem; font-weight: 640; padding-block: .65rem; border-bottom: 2px solid transparent; }
.pivots a[aria-current] { color: var(--gallery-text); border-color: var(--lyra-accent); }
#saved-count { margin-inline-start: .2rem; font-size: .72rem; color: var(--gallery-muted); }
#theme-toggle, #close-viewer { flex: none; min-width: 2.7rem; min-height: 2.7rem; }

.hero { display: grid; position: relative; isolation: isolate; align-items: center; min-height: clamp(22rem, 42vw, 35rem); padding: clamp(1.4rem, 5.7vw, 5.4rem); border-radius: var(--gallery-radius); overflow: hidden; background: radial-gradient(ellipse at 88% 50%, #63384e, #222032 43%, #151522 85%); color: #fff9fa; }
.hero > img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 68% 56%; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none; background: linear-gradient(90deg, #10111bea 1%, #10111bcd 33%, #10111b60 64%, #10111b13), linear-gradient(0deg, #10111bb8, transparent 36%); }
.hero-copy { max-width: min(47rem, 80%); }
.overline { font-size: .71rem; line-height: 1.5; font-weight: 760; text-transform: uppercase; letter-spacing: .17em; margin: 0 0 .75rem; }
.hero .overline { color: #ffc7b4; }
.hero h1 { font-size: clamp(3rem, 7vw, 7.75rem); line-height: .92; letter-spacing: -.07em; overflow-wrap: anywhere; margin: 0; text-wrap: balance; }
.hero h1 em { color: #ffc4ac; letter-spacing: -.06em; }
.hero p:not(.overline) { max-width: 36ch; font-size: clamp(.98rem, 1.45vw, 1.22rem); line-height: 1.6; margin: 1.25rem 0 0; color: #fff4f1; }
#cover-link { display: inline-flex; align-items: center; gap: .7rem; width: fit-content; margin-top: 1.6rem; padding: .75rem 1rem; }
#cover-credit { position: absolute; right: clamp(1rem, 3.4vw, 3rem); bottom: 1.1rem; max-width: 50%; text-align: right; font-size: .77rem; color: #fff1ea; }

.browse { padding-top: clamp(2rem, 4.3vw, 4rem); min-height: 23rem; scroll-margin-top: 1rem; }
.browse-heading { display: flex; justify-content: space-between; align-items: end; gap: 1.1rem; }
.browse-heading h2 { margin: 0; font-size: clamp(1.8rem, 4.3vw, 3.4rem); line-height: 1.02; letter-spacing: -.06em; overflow-wrap: anywhere; }
#collection-description { white-space: pre-wrap; color: var(--gallery-muted); max-width: 60ch; margin: .7rem 0 0; }
.search { position: relative; width: min(100%, 21rem); flex: none; }
.search > lyra-icon { position: absolute; inset: 50% auto auto .82rem; transform: translateY(-50%); pointer-events: none; color: var(--gallery-muted); }
.lyra .search input.l-input { width: 100%; min-height: 2.85rem; padding-inline-start: 2.45rem; }
.library-tools { display: flex; justify-content: space-between; gap: .9rem; align-items: start; margin-top: 1.2rem; padding-bottom: .85rem; border-bottom: 1px solid var(--gallery-line); }
.collection-filters { display: flex; flex-wrap: wrap; gap: .45rem; }
.lyra .filter { display: inline-flex; align-items: center; max-width: 100%; overflow-wrap: anywhere; min-height: 2.6rem; padding: .42rem .84rem; border: 1px solid var(--gallery-line); border-radius: 99rem; font-weight: 620; color: var(--gallery-muted); font-size: .83rem; }
.lyra .filter:hover { border-color: var(--lyra-accent); color: var(--gallery-text); }
.lyra .filter[aria-current] { color: var(--lyra-on-accent); background: var(--lyra-accent); border-color: var(--lyra-accent); }
.sort { display: flex; align-items: center; gap: .48rem; white-space: nowrap; font-size: .83rem; color: var(--gallery-muted); }
.sort select { min-height: 2.6rem; }
.status { min-height: 1.15em; margin: 1rem 0 .8rem; font-size: .87rem; color: var(--gallery-muted); }

.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.2rem), 1fr)); gap: clamp(.85rem, 2vw, 1.5rem); }
.image-card { position: relative; min-width: 0; }
.lyra .image-link { display: block; border-radius: .85rem; color: var(--gallery-text); }
.card-media { display: block; overflow: hidden; border-radius: .85rem; background: var(--lyra-surface); aspect-ratio: 4 / 3; }
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.image-link:hover img { transform: scale(1.035); }
.card-copy { display: grid; gap: .21rem; padding: .63rem .12rem .12rem; overflow-wrap: anywhere; }
.card-title { font-size: 1.05rem; letter-spacing: -.017em; }
.card-collection { font-size: .79rem; color: var(--gallery-muted); }
.lyra .card-save.l-button { position: absolute; top: .55rem; right: .55rem; min-width: 2.6rem; min-height: 2.6rem; border: 1px solid #ffffff78; border-radius: 50%; background: #181422e8; color: #fff; }
.lyra .card-save.l-button:hover, .lyra .card-save.l-button[aria-pressed="true"] { background: #fff0eb; color: #a52a58; border-color: #a52a58; }
.card-save[aria-pressed="true"] lyra-icon svg { fill: currentColor; }
.more { margin: 1.65rem auto; display: block; }

.viewer { --lyra-radius: .65rem; width: min(60rem, calc(100% - 1.5rem)); max-height: min(93dvh, 76rem); border: 1px solid var(--gallery-line); border-radius: var(--gallery-radius); background: var(--lyra-bg); color: var(--gallery-text); padding: .9rem; overflow: auto; }
.viewer::backdrop { background: #08070de8; }
.viewer-heading { display: flex; justify-content: space-between; align-items: start; gap: .65rem; padding: .15rem .2rem .8rem; }
.viewer-heading h2 { margin: 0; font-size: clamp(1.35rem, 4vw, 2.75rem); letter-spacing: -.05em; overflow-wrap: anywhere; }
.viewer-heading .overline { color: var(--gallery-muted); margin-bottom: .25rem; }
.viewer-stage { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; background: #111018; border-radius: .75rem; min-height: min(24vh, 9rem); overflow: hidden; }
.viewer-stage img { display: block; width: auto; max-width: 100%; max-height: 57dvh; object-fit: contain; }
.viewer-meta { display: grid; gap: .55rem; padding: 0 .2rem; }
.viewer-meta p { white-space: pre-wrap; margin: .7rem 0 0; color: var(--gallery-muted); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: .25rem 0 0; list-style: none; }
.tags li { padding: .18rem .48rem; border-radius: 1rem; border: 1px solid var(--gallery-line); color: var(--gallery-muted); font-size: .76rem; }
#image-ribbon { margin-top: .7rem; }
.viewer-status { color: var(--gallery-muted); font-size: .82rem; margin: .25rem .2rem 0; min-height: 1em; }
.site-footer { margin-top: 3.5rem; padding-block: 1.25rem 1.8rem; border-top: 1px solid var(--gallery-line); display: flex; justify-content: space-between; gap: 1rem; color: var(--gallery-muted); font-size: .86rem; }
.site-footer a { display: inline-flex; gap: .35rem; align-items: center; }

@media (max-width: 640px) {
  .masthead { min-height: 4.25rem; }
  .hero { align-items: end; min-height: 25rem; }
  .hero-copy { max-width: 100%; }
  .hero::after { background: linear-gradient(0deg, #10111bf5 1%, #10111baa 55%, #10111b21); }
  .hero > img { object-position: 67% 50%; }
  #cover-credit { display: none; }
  .browse-heading { display: grid; justify-content: stretch; }
  .search { width: 100%; }
  .library-tools { display: grid; justify-content: start; }
  .image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lyra .card-save.l-button { top: .35rem; right: .35rem; }
  .card-title { font-size: .95rem; }
}
@media (max-width: 345px) {
  .image-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .card-media img { transition: none; }
}
