
:root {
  --paper: #f7f7f4;
  --panel: #ffffff;
  --ink: #141414;
  --muted: #666761;
  --line: #d9d9d2;
  --red: #c7352b;
  --blue: #245fd4;
  --gold: #a67a12;
  --green: #2f7b46;
  --shadow: 0 8px 28px rgba(20, 20, 20, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 247, 244, 0.94);
  backdrop-filter: blur(16px);
}

.brand {
  font-weight: 760;
  letter-spacing: 0;
}

.top-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-nav a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
}

.top-nav a:hover {
  background: #ebebe6;
  color: var(--ink);
}

main {
  width: min(1480px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.control-band,
.page-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 28px;
  align-items: end;
  margin-bottom: 20px;
}

.page-heading { display: block; max-width: 860px; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 760;
}

h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.1;
}

h3 {
  margin: 18px 0 8px;
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.lede {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.search-panel {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
}

.search-panel label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

input[type="search"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 12px;
  font: inherit;
  background: #fff;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 22px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.art-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.art-card.is-hidden { display: none; }

.art-thumb {
  display: block;
  aspect-ratio: 1 / 1;
  background: #e9e9e4;
  border-bottom: 1px solid var(--line);
}

.art-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.art-card-body {
  padding: 12px;
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.art-card h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.18;
}

.meta-line,
.song-line,
.muted {
  color: var(--muted);
}

.meta-line,
.song-line {
  margin: 6px 0;
  font-size: 13px;
  line-height: 1.35;
}

.badge {
  flex: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.chip-row,
.chip-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.chip-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.1;
}

.chip:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.chip-color { border-color: rgba(199, 53, 43, 0.35); }
.chip-subject { border-color: rgba(36, 95, 212, 0.35); }
.chip-hidden { color: var(--muted); background: #f3f3ef; }
.chip-count { color: var(--muted); }

.artwork-hero {
  display: grid;
  grid-template-columns: minmax(280px, 720px) minmax(260px, 1fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 28px;
}

.artwork-image-wrap {
  background: #e9e9e4;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.artwork-image-wrap img {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  display: block;
}

.artwork-meta {
  position: sticky;
  top: 84px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.artwork-meta h1 {
  font-size: clamp(32px, 4vw, 60px);
  margin-bottom: 10px;
}

.detail-grid,
.ranking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.detail-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  margin-bottom: 16px;
}

.detail-section p {
  line-height: 1.55;
}

.plain-list,
.related-list,
.ranking-list,
.pair-list {
  margin: 0;
  padding-left: 20px;
}

.related-list li,
.ranking-list li,
.pair-list li {
  margin: 10px 0;
  line-height: 1.4;
}

.related-list span,
.ranking-list span,
.pair-list span,
.pair-list small {
  color: var(--muted);
  margin-left: 8px;
}

.pair-list small {
  display: block;
  margin: 4px 0 0;
}

.transcript {
  white-space: pre-wrap;
  overflow-x: auto;
  padding: 14px;
  border-radius: 6px;
  background: #f0f0eb;
  border: 1px solid var(--line);
  line-height: 1.45;
}

.year-block {
  margin-top: 34px;
}

.year-block > h2 {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .control-band,
  .artwork-hero {
    grid-template-columns: 1fr;
  }

  .artwork-meta {
    position: static;
  }

  h1 {
    font-size: 42px;
  }

  main {
    width: min(100vw - 20px, 1480px);
    padding-top: 18px;
  }
}
