:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #111;
  --muted: #555;
  --rule: #bbb;
  --surface: #f7f7f7;
  --focus: #2866e3;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
header, main, footer {
  max-width: 1420px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 58px);
}
header, footer, .mast, .pages, header nav, .result-bar {
  display: flex;
  align-items: center;
  gap: 12px 22px;
  flex-wrap: wrap;
}
header { min-height: 72px; justify-content: space-between; border-bottom: 1px solid var(--rule); }
header img { display: block; width: clamp(146px, 20vw, 205px); }
header a, footer a, .pages a, #clear-search, .crumbs a {
  display: inline-flex; align-items: center; min-height: 44px;
}
a { color: inherit; text-underline-offset: 4px; }
a:hover { color: #234bbc; }
:where(a, input, select, button, iframe, video, section[tabindex], .search-status):focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -10rem; background: var(--paper); padding: 12px; z-index: 2; }
.skip:focus { top: 0; }
main { min-height: 68vh; padding-block: clamp(24px, 3.7vw, 52px); }
h1, h2, p { margin: 0 0 .55em; overflow-wrap: anywhere; }
h1, h2 { letter-spacing: -.035em; line-height: 1.05; }
h1 { font-size: clamp(39px, 6vw, 78px); margin-bottom: .27em; }
h2 { font-size: clamp(24px, 3vw, 38px); }
.intro { color: #444; font-size: clamp(17px, 1.45vw, 21px); }
.mast { justify-content: space-between; }
.album-link { display: inline-flex; align-items: center; gap: .5em; min-height: 44px; font-weight: 650; }
form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  column-gap: 12px;
  row-gap: 10px;
  border-top: 1px solid var(--rule);
  padding-top: 18px;
  margin-top: 20px;
}
label { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; min-width: 0; font-weight: 650; }
.search-field { flex: 1 1 260px; }
:where(input, select, button) {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid #777;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  border-radius: 0;
  padding: 7px 11px;
}
button { width: auto; background: var(--ink); color: var(--paper); border-color: var(--ink); cursor: pointer; }
button:hover { background: #333; }
form input, form select { font-weight: 400; }
.filter-note, .search-status, .tile small, .meta, .crumbs, footer { color: var(--muted); font-size: .88rem; }
.filter-note { margin-top: .45rem; }
.result-bar { margin-block: .5rem; min-height: 44px; justify-content: space-between; font-size: .88rem; }
.search-status { margin: 0; }
.tiles {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(210px,100%), 1fr));
  gap: 25px 18px;
  margin: 0;
}
.tiles li, .tile { min-width: 0; }
.tile { display: block; text-decoration: none; }
.tile strong, .tile small { display: block; overflow-wrap: anywhere; line-height: 1.3; }
.tile:hover strong { text-decoration: underline; }
.tile small { margin-top: 5px; }
.picture {
  display: grid;
  place-items: center;
  position: relative;
  aspect-ratio: 4 / 3;
  margin-bottom: 9px;
  background: var(--surface);
}
.picture img { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.media-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: .78rem;
  padding: 3px 8px;
}
.media-label span { color: #154bb0; }
.placeholder { color: var(--muted); font-size: .85rem; }
.album-grid { margin-top: 24px; }
.pages { margin-top: 22px; }
.empty { border-top: 1px solid var(--rule); padding-top: 18px; }
.item-title { max-width: 30ch; font-size: clamp(31px, 4.6vw, 61px); }
.detail-image, .player {
  display: block;
  margin-block: 14px;
  width: min(100%, 880px);
  border: 0;
  background: var(--surface);
}
.detail-image img { display: block; width: 100%; max-height: 72vh; object-fit: contain; }
.player { aspect-ratio: 16 / 9; }
.caption { white-space: pre-wrap; max-width: 73ch; margin-block: 20px; }
.metadata { margin-top: 24px; padding-top: 15px; border-top: 1px solid var(--rule); }
.metadata h2 { font-size: 18px; letter-spacing: 0; }
.metadata ul { margin: 0; padding-left: 20px; }
.metadata li { margin: 6px 0; }
footer { align-items: start; padding-block: 15px 23px; border-top: 1px solid var(--rule); }
footer p { max-width: 52ch; margin: .65em 0 0; }
footer p a { min-height: 24px; }
@media (max-width: 680px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px 12px; }
  .tile strong { font-size: .94rem; }
  .search-field { flex-basis: 100%; }
  .mast { row-gap: 0; }
  header nav { gap: 8px 13px; font-size: .92rem; }
}
