:root {
  --ink: #dce8f3;
  --ink-strong: #fffdf2;
  --muted: #9fb2c7;
  --ground: #09182a;
  --ground-deep: #050d19;
  --paper: #10283f;
  --paper-raised: #173653;
  --line: #55718c;
  --line-soft: #294762;
  --red: #d9bc70;
  --red-dark: #8f7132;
  --red-wash: #38351f;
  --blue: #82cce8;
  --blue-dark: #174f70;
  --gold: #c9b8ed;
  --paper-rgb: 16, 40, 63;
  --aureole-rgb: 217, 188, 112;
  --azure-rgb: 130, 204, 232;
  --font: "IBM Plex Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", system-ui, sans-serif;
  --serif: "IBM Plex Serif", "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
  --shadow: 0 28px 90px rgba(1, 8, 18, 0.55);
}

:root[data-theme="light"] {
  --ink: #2d4054;
  --ink-strong: #14283d;
  --muted: #667b8f;
  --ground: #dcecf5;
  --ground-deep: #c6dfe9;
  --paper: #fbfaf2;
  --paper-raised: #fffef9;
  --line: #8faabd;
  --line-soft: #c7d9e4;
  --red: #916a18;
  --red-dark: #65480d;
  --red-wash: #f4e9bf;
  --blue: #17698f;
  --blue-dark: #d7eef7;
  --gold: #6c5795;
  --paper-rgb: 251, 250, 242;
  --aureole-rgb: 184, 139, 48;
  --azure-rgb: 75, 158, 198;
  --shadow: 0 26px 72px rgba(33, 77, 105, 0.18);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--ground);
  background-image:
    radial-gradient(ellipse at 50% -8%, rgba(var(--aureole-rgb), 0.22), transparent 32rem),
    radial-gradient(circle at 14% 28%, rgba(var(--azure-rgb), 0.12), transparent 30rem),
    radial-gradient(circle at 86% 48%, rgba(var(--azure-rgb), 0.09), transparent 38rem),
    linear-gradient(90deg, transparent, rgba(var(--azure-rgb), 0.035) 50%, transparent);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: var(--blue); }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: -999px;
  padding: 8px 14px;
  color: var(--paper);
  background-color: var(--ink-strong);
}
.skip-link:focus { left: 8px; }

.site-header {
  border-top: 4px solid var(--red);
  border-bottom: 1px solid var(--line-soft);
  background-color: rgba(var(--paper-rgb), 0.88);
  box-shadow: 0 8px 28px rgba(var(--azure-rgb), 0.08);
  backdrop-filter: blur(16px);
}

.site-header__inner,
main,
.site-footer {
  width: min(1220px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header__inner {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.identity {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-strong);
  text-decoration: none;
}
.identity img { width: 48px; height: 48px; }
.identity b {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.08em;
}
.identity small {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.theme-switch {
  display: inline-flex;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background-color: var(--ground-deep);
}
.theme-switch__option { position: relative; }
.theme-switch__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.theme-switch__option span {
  display: block;
  min-width: 54px;
  padding: 5px 9px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  border-radius: 999px;
}
.theme-switch__option input:checked + span {
  color: var(--ink-strong);
  background-color: var(--paper-raised);
  box-shadow: 0 0 18px rgba(var(--aureole-rgb), 0.14);
}
.theme-switch__option input:focus-visible + span { outline: 2px solid var(--red); }

main { padding-bottom: 80px; }

.hero {
  position: relative;
  isolation: isolate;
  min-height: 510px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  align-items: center;
  gap: 60px;
  padding: 86px 6% 108px;
  border-inline: 1px solid var(--line-soft);
  background-color: #07111f;
  box-shadow: inset 0 1px rgba(var(--aureole-rgb), 0.2), 0 28px 90px rgba(var(--azure-rgb), 0.07);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 14px;
  border: 1px solid rgba(231, 205, 135, .22);
  box-shadow: inset 0 0 70px rgba(2, 8, 17, .28);
  pointer-events: none;
}

.hero__art {
  position: absolute;
  z-index: 0;
  inset: 0;
  margin: 0;
  overflow: hidden;
}
.hero__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: transparent;
  background-image:
    linear-gradient(90deg, rgba(4, 11, 21, .98) 0%, rgba(5, 14, 26, .92) 35%, rgba(5, 14, 26, .48) 60%, rgba(5, 14, 26, .18) 78%, rgba(5, 14, 26, .52) 100%),
    linear-gradient(0deg, rgba(4, 11, 21, .92) 0%, transparent 30%, rgba(4, 11, 21, .24) 100%);
}
.hero__art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 48%;
  filter: saturate(.88) contrast(1.04);
  transform: scale(1.015);
}
.hero__copy,
.hero__seal,
.stats {
  position: relative;
  z-index: 2;
}

.kicker {
  margin: 0 0 12px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
}

.hero h1 {
  max-width: 700px;
  margin: 0;
  color: #fffdf2;
  font-family: var(--serif);
  font-size: clamp(42px, 5.8vw, 74px);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: .035em;
  text-shadow: 0 3px 28px rgba(0, 0, 0, .58);
}
.hero h1 em {
  color: #e8cc83;
  font-style: normal;
}
.hero__lead {
  max-width: 650px;
  margin: 28px 0 0;
  color: #c2d0de;
  font-size: 17px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .72);
}
.hero .kicker { color: #e8cc83; text-shadow: 0 2px 16px rgba(0, 0, 0, .76); }

.hero__seal {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(232, 204, 131, .78);
  border-radius: 50%;
  color: #e8cc83;
  background-color: rgba(6, 17, 30, .54);
  box-shadow: inset 0 0 0 12px rgba(5, 14, 26, .76), inset 0 0 0 13px rgba(210, 226, 238, .34), 0 0 0 9px rgba(5, 14, 26, .58), 0 0 0 10px rgba(232, 204, 131, .46), 0 0 56px rgba(224, 194, 118, .28);
  backdrop-filter: blur(5px);
}
.hero__seal strong { font-size: 68px; line-height: 1; }
.hero__seal span { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; }
.hero__seal-ring { color: #b8cad9; }

.stats {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 26px;
  display: flex;
  gap: 0;
  margin: 0;
  border-top: 1px solid rgba(205, 224, 238, .24);
}
.stats div {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 15px 28px 0 0;
  margin-right: 28px;
  border-right: 1px solid rgba(205, 224, 238, .24);
}
.stats dt { color: #a9bccd; font-size: 11px; letter-spacing: .08em; }
.stats dd { order: -1; margin: 0; color: #fffdf2; font-family: var(--mono); font-size: 24px; }

.principle {
  margin: 0;
  border: 1px solid var(--line-soft);
  border-top: 0;
  background-color: var(--ground-deep);
  background-image: linear-gradient(90deg, rgba(var(--azure-rgb), 0.07), transparent 65%);
}
.principle p { margin: 0; padding: 18px 6%; color: var(--muted); font-size: 13px; }
.principle span { margin-right: 14px; color: var(--gold); font-family: var(--mono); letter-spacing: .12em; }

.collections,
.catalog,
.sources { padding: 100px 0 0; }

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  margin-bottom: 32px;
}
.section-heading h2,
.sources h2 {
  margin: 0;
  color: var(--ink-strong);
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 600;
}
.section-heading > p { max-width: 440px; margin: 0; color: var(--muted); }

.collection-frieze {
  position: relative;
  height: clamp(170px, 20vw, 238px);
  margin: 0 0 52px;
  border: 1px solid var(--line);
  background-color: var(--ground-deep);
  box-shadow: 0 24px 70px rgba(2, 10, 20, .22);
  overflow: hidden;
}
.collection-frieze::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background-color: transparent;
  background-image:
    linear-gradient(90deg, rgba(4, 12, 23, .7), transparent 26%, transparent 74%, rgba(4, 12, 23, .7)),
    linear-gradient(0deg, rgba(4, 12, 23, .78), transparent 58%);
  pointer-events: none;
}
.collection-frieze::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 12px;
  border: 1px solid rgba(232, 204, 131, .25);
  pointer-events: none;
}
.collection-frieze img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 52%;
  filter: saturate(.82) contrast(1.06);
}
.collection-frieze figcaption {
  position: absolute;
  z-index: 3;
  left: clamp(24px, 5vw, 62px);
  bottom: clamp(24px, 4vw, 42px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #fffdf2;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .72);
}
.collection-frieze figcaption span {
  color: #e8cc83;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .2em;
}
.collection-frieze figcaption strong {
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: .06em;
}

.collection-grid {
  display: grid;
  gap: 52px;
}
.direct-collection {
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.tradition-shelf__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}
.tradition-shelf__heading h3 {
  margin: 0;
  color: var(--ink-strong);
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
}
.tradition-shelf__heading span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
}
.tradition-shelf__groups {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.collection-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  padding: 24px 22px 20px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(180deg, rgba(var(--aureole-rgb), 0.055), transparent 38%);
  text-align: left;
  transition: background-color .18s, transform .18s;
}
.collection-card:hover,
.collection-card.is-active { background-color: var(--paper-raised); }
.collection-card:hover { transform: translateY(-4px); }
.collection-card.is-active { box-shadow: inset 0 4px 0 var(--red), 0 12px 34px rgba(var(--azure-rgb), 0.1); }
.collection-card__number { color: var(--red); font-family: var(--mono); font-size: 12px; }
.collection-card h3 {
  margin: 38px 0 10px;
  color: var(--ink-strong);
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
}
.collection-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.collection-card__count {
  margin-top: auto;
  padding-top: 22px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
}
.collection-card--direct {
  min-height: 156px;
  display: grid;
  grid-template-columns: minmax(190px, .65fr) minmax(190px, .75fr) minmax(280px, 1.6fr) auto;
  align-items: center;
  gap: 28px;
}
.collection-card--direct h3 { margin: 0; }
.collection-card--direct .collection-card__count {
  margin-top: 0;
  padding-top: 0;
  white-space: nowrap;
}

.section-heading--catalog {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.result-count { font-family: var(--mono); font-size: 13px; }

.controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, 180px) auto;
  gap: 16px;
  align-items: end;
  padding: 22px;
  border: 1px solid var(--line);
  background-color: var(--paper);
  background-image: linear-gradient(135deg, rgba(var(--azure-rgb), 0.055), transparent 48%);
}
.search-field label,
.select-field label,
.tradition-filter legend {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.search-field__input { position: relative; display: flex; align-items: center; }
.search-field__input > span {
  position: absolute;
  left: 13px;
  color: var(--red);
  font-size: 22px;
  pointer-events: none;
}
.search-field input,
.select-field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink-strong);
  background-color: var(--ground-deep);
}
.search-field input { min-width: 0; padding: 10px 82px 10px 43px; }
.search-field input::placeholder { color: var(--muted); opacity: .8; }
.search-field kbd {
  position: absolute;
  right: 42px;
  padding: 0 7px;
  border: 1px solid var(--line);
  color: var(--muted);
  background-color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
}
#search-clear {
  position: absolute;
  right: 6px;
  width: 32px;
  height: 32px;
  border: 0;
  color: var(--muted);
  background-color: transparent;
  font-size: 20px;
}
.select-field select { padding: 9px 36px 9px 12px; }
.reset-button,
.empty button {
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--red);
  color: var(--red);
  background-color: transparent;
}

.tradition-filter { margin: 18px 0 28px; padding: 0; border: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 13px;
  border: 1px solid var(--line);
  color: var(--muted);
  background-color: transparent;
  font-size: 12px;
}
.chip:hover { color: var(--ink-strong); border-color: var(--muted); }
.chip.is-active { color: var(--ground-deep); border-color: var(--red); background-color: var(--red); box-shadow: 0 0 22px rgba(var(--aureole-rgb), 0.14); }

.result-groups {
  display: grid;
  gap: 56px;
}
.result-group__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}
.result-group__heading p { margin: 0; color: var(--muted); font-size: 12px; }
.result-group__heading h3 { margin: 0; color: var(--ink-strong); font-family: var(--serif); font-size: 27px; font-weight: 600; }
.result-group__heading span { color: var(--red); font-family: var(--mono); font-size: 10px; letter-spacing: .1em; }
.result-group__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.entry-card {
  position: relative;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(155deg, rgba(var(--azure-rgb), 0.045), transparent 44%);
  overflow: hidden;
}
.entry-card::before {
  content: attr(data-index);
  position: absolute;
  right: 8px;
  top: -18px;
  color: var(--line-soft);
  font-family: var(--serif);
  font-size: 72px;
  line-height: 1;
}
.entry-card:hover { background-color: var(--paper-raised); }
.entry-card__eyebrow {
  position: relative;
  margin: 0 0 28px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
}
.entry-card h3 { position: relative; margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 600; }
.entry-card h3 a { color: var(--ink-strong); text-decoration: none; }
.entry-card h3 a::after { content: ""; position: absolute; inset: 0; }
.entry-card__name-en { margin: 2px 0 15px; color: var(--muted); font-family: var(--mono); font-size: 11px; }
.entry-card__summary {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.entry-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 18px; }
.entry-card__kind { color: var(--blue); font-size: 11px; }
.entry-card__arrow { color: var(--red); font-family: var(--mono); }

.empty {
  padding: 70px 20px;
  border: 1px solid var(--line);
  text-align: center;
  background-color: var(--paper);
}
.empty > span { color: var(--red); font-size: 52px; }
.empty h3 { margin: 8px 0; color: var(--ink-strong); font-family: var(--serif); font-size: 24px; }
.empty p { color: var(--muted); }

.sources {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 28px 70px;
  align-items: end;
}
.sources > p { margin: 0; color: var(--muted); }
.source-links {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.source-links a {
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  background-color: var(--paper);
  background-image: linear-gradient(145deg, rgba(var(--aureole-rgb), 0.045), transparent 62%);
}
.source-links a:hover { background-color: var(--paper-raised); }
.source-links small { color: var(--red); font-family: var(--mono); font-size: 9px; letter-spacing: .12em; }
.source-links span { color: var(--ink-strong); font-family: var(--serif); }

.site-footer {
  display: grid;
  grid-template-columns: auto 1fr minmax(240px, 420px);
  align-items: center;
  gap: 18px;
  padding: 30px 0 48px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
}
.site-footer strong { color: var(--ink-strong); font-family: var(--serif); }
.site-footer p { margin: 0; font-size: 11px; }
.site-footer__note { text-align: right; }

.record-dialog {
  width: min(680px, calc(100% - 28px));
  max-height: calc(100dvh - 36px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(circle at 50% 0, rgba(var(--aureole-rgb), 0.1), transparent 42%);
  box-shadow: var(--shadow);
}
.record-dialog::backdrop { background-color: rgba(3, 12, 25, .8); backdrop-filter: blur(4px); }
.record { position: relative; padding: 46px 48px; }
.record::before { content: ""; position: absolute; inset: 12px; border: 1px solid var(--line-soft); pointer-events: none; }
.record__close {
  position: absolute;
  z-index: 1;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  color: var(--muted);
  background-color: var(--paper-raised);
  font-size: 22px;
}
.record__eyebrow { margin: 0 50px 22px 0; color: var(--red); font-family: var(--mono); font-size: 10px; letter-spacing: .15em; }
.record h2 { margin: 0; color: var(--ink-strong); font-family: var(--serif); font-size: clamp(32px, 7vw, 48px); line-height: 1.2; }
.record__name-en { margin: 5px 0 24px; color: var(--muted); font-family: var(--mono); }
.record__meta { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0; border-block: 1px solid var(--line-soft); }
.record__meta span,
.record__keywords span { padding: 3px 9px; border: 1px solid var(--line); color: var(--blue); font-size: 11px; }
.record__section-label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 28px 0 8px;
  color: var(--ink-strong);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
}
.record__section-label span {
  color: var(--red);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .16em;
}
.record__summary { margin: 0 0 28px; color: var(--ink); font-size: 16px; line-height: 1.95; }
.record__keywords { display: flex; flex-wrap: wrap; gap: 6px; }
.record__source { margin-top: 30px; padding: 18px; border-left: 3px solid var(--red); background-color: var(--ground-deep); }
.record__source > span { display: block; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .14em; }
.record__source a { display: inline-block; margin-top: 5px; color: var(--red); font-family: var(--serif); font-size: 17px; }
.record__source p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }

.noscript { padding: 16px; color: var(--ink); background-color: var(--red-wash); text-align: center; }

.error-page { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.error-card { width: min(640px, 100%); padding: 70px 40px; border: 1px solid var(--line); background-color: var(--paper); text-align: center; }
.error-card h1 { margin: 8px 0; color: var(--ink-strong); font-family: var(--serif); font-size: clamp(34px, 8vw, 58px); }
.error-card > p:not(.kicker) { color: var(--muted); }
.error-card__link { display: inline-block; margin-top: 24px; padding: 10px 18px; border: 1px solid var(--red); color: var(--red); text-decoration: none; }

.entity-main { max-width: 900px; padding-top: 40px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; color: var(--muted); font-size: 12px; }
.breadcrumb a { color: var(--muted); }
.entity-record { position: relative; padding: clamp(34px, 7vw, 72px); border: 1px solid var(--line); background-color: var(--paper); background-image: radial-gradient(circle at 50% 0, rgba(var(--aureole-rgb), 0.08), transparent 38%); }
.entity-record::before { content: ""; position: absolute; inset: 14px; border: 1px solid var(--line-soft); pointer-events: none; }
.entity-record h1 { margin: 0; color: var(--ink-strong); font-family: var(--serif); font-size: clamp(42px, 9vw, 72px); line-height: 1.2; }
.entity-record .record__section-label { margin-top: 36px; }
.entity-record__summary { margin: 0 0 36px; color: var(--ink); font-size: 18px; line-height: 2; }
.entity-back { margin-top: 26px; }
.entity-back a { color: var(--red); }

@media (max-width: 980px) {
  .tradition-shelf__groups { grid-template-columns: repeat(2, 1fr); }
  .result-group__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-field { grid-column: 1 / -1; }
  .source-links { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: minmax(0, 1fr) 180px; gap: 30px; }
  .collection-card--direct { grid-template-columns: minmax(180px, .8fr) minmax(180px, .9fr) 1.4fr; }
  .collection-card--direct .collection-card__count { grid-column: 3; }
  .hero__seal strong { font-size: 48px; }
}

@media (max-width: 720px) {
  .site-header__inner, main, .site-footer { width: min(100% - 24px, 1220px); }
  .site-header__inner { min-height: 74px; }
  .identity img { width: 40px; height: 40px; }
  .identity b { font-size: 16px; }
  .identity small { display: none; }
  .theme-switch__option span { min-width: 42px; padding-inline: 6px; }
  .hero { min-height: 620px; grid-template-columns: 1fr; align-content: start; padding: 68px 24px 118px; }
  .hero__art img { object-position: 64% center; }
  .hero__art::after {
    background-image:
      linear-gradient(90deg, rgba(4, 11, 21, .96), rgba(4, 11, 21, .64) 76%, rgba(4, 11, 21, .38)),
      linear-gradient(0deg, rgba(4, 11, 21, .96) 0%, rgba(4, 11, 21, .48) 42%, rgba(4, 11, 21, .3) 100%);
  }
  .hero__seal { position: absolute; right: 35px; bottom: 105px; width: 120px; opacity: .55; }
  .hero__seal strong { font-size: 32px; }
  .hero__seal span { font-size: 7px; }
  .stats { left: 24px; right: 24px; overflow-x: auto; }
  .stats div { flex: 0 0 auto; }
  .principle p { padding-inline: 24px; }
  .collections, .catalog, .sources { padding-top: 72px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 12px; }
  .collection-frieze { height: 210px; margin-bottom: 40px; }
  .controls { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .reset-button { width: 100%; }
  .result-group__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-group__heading { display: block; }
  .result-group__heading p { margin-top: 10px; }
  .sources { grid-template-columns: 1fr; }
  .source-links { grid-column: 1; }
  .site-footer { grid-template-columns: auto 1fr; }
  .site-footer__note { grid-column: 1 / -1; text-align: left; }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  .identity { gap: 8px; }
  .identity b { font-size: 14px; letter-spacing: .02em; }
  .theme-switch__option span { min-width: 36px; font-size: 10px; }
  .hero { min-height: 650px; }
  .hero h1 { font-size: 39px; }
  .hero__lead { font-size: 15px; }
  .collection-frieze { height: 190px; }
  .stats { justify-content: space-between; overflow-x: visible; }
  .stats div { gap: 5px; margin-right: 0; padding-right: 10px; }
  .stats div:last-child { padding-right: 0; border-right: 0; }
  .stats dd { font-size: 19px; }
  .stats dt { font-size: 9px; letter-spacing: 0; }
  .tradition-shelf__groups, .result-group__grid, .source-links { grid-template-columns: 1fr; }
  .collection-card { grid-column: auto; min-height: 220px; }
  .collection-card--direct { display: flex; min-height: 220px; }
  .collection-card--direct h3 { margin: 38px 0 10px; }
  .collection-card--direct .collection-card__count { margin-top: auto; padding-top: 22px; }
  .entry-card { min-height: 230px; }
  .record { padding: 42px 30px 34px; }
  .record::before { inset: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
