:root {
  color-scheme: light;
  --paper: #f8f5ec;
  --panel: #efebe0;
  --ink: #302622;
  --brown: #4a2b26;
  --accent: #823f32;
  --muted: #71655b;
  --line: #d2c8b8;
  --serif: "Baskervville","Songti SC","STSong","Noto Serif CJK SC","Source Han Serif SC","SimSun",serif;
  --sans: "Inter",-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft Yahei",sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  display: flex;
  flex-direction: column;
  -webkit-text-size-adjust: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button, a, input, textarea {
  touch-action: manipulation;
}

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid #a95038;
  outline-offset: 3px;
}

button:disabled {
  cursor: wait;
  opacity: .63;
}

button {
  background: none;
  border: 0;
  padding: 0;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, p, figure, dl, dd {
  margin: 0;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(2.15rem,4.25vw,4rem);
  letter-spacing: .055em;
}

h2 {
  font-size: clamp(1.5rem,2.5vw,2.1rem);
}

h3 {
  font-size: 1.3rem;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: min(1192px,calc(100% - clamp(40px,9vw,144px)));
  margin-inline: auto;
}

.mast {
  border-bottom: 1px solid var(--line);
}

.mast-inner {
  min-height: 85px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  min-height: 48px;
}

.brand-type {
  display: grid;
  gap: 3px;
  line-height: 1.25;
}

.brand-type b {
  font-family: var(--serif);
  font-size: clamp(1rem,1.6vw,1.35rem);
  font-weight: 500;
  letter-spacing: .1em;
}

.brand-type small {
  font-family: var(--sans);
  font-size: .53rem;
  letter-spacing: .16em;
  color: var(--muted);
}

.museum-mark {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  object-fit: contain;
}

.nav-link, .foot a, .back, .plain {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 7px;
  color: var(--muted);
  font-size: .9rem;
}

.nav-link[aria-current=page] {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 7px;
}

.nav-link:hover, .foot a:hover, .back:hover, .plain:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.skip {
  position: fixed;
  left: 12px;
  top: -120px;
  z-index: 20;
  padding: 8px 16px;
  background: white;
}

.skip:focus {
  top: 10px;
}

.main {
  flex: 1;
  min-width: 0;
  outline: none;
  padding-bottom: clamp(40px,7vw,92px);
}

.foot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: .8rem;
}

.foot a {
  font-size: inherit;
}

#filings {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 16px;
}

#filings a {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.status {
  padding-block: 60px;
  color: var(--muted);
}

.empty {
  padding: clamp(35px,6vw,80px) 0;
  border-top: 1px solid var(--line);
}

.empty h2 {
  margin-bottom: 12px;
}

.empty p, .quiet {
  color: var(--muted);
}

.empty .button {
  margin-top: 24px;
}

.button, .outline, .soft {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65em;
  padding: 9px 21px;
  text-align: center;
  font-size: .92rem;
  font-weight: 550;
  border: 1px solid var(--brown);
  border-radius: 2px;
  transition: background .18s,transform .18s;
}

.button {
  background: var(--brown);
  color: white;
}

.outline {
  background: transparent;
  color: var(--brown);
}

.soft {
  border-color: transparent;
  background: var(--panel);
  color: var(--brown);
}

.button:hover, .outline:hover, .soft:hover {
  transform: translateY(-1px);
}

.button:hover {
  background: #62382f;
}

.outline:hover, .soft:hover {
  background: #e8dfd0;
}

.button:active, .outline:active, .soft:active {
  transform: translateY(0);
}

.topline {
  margin-top: 24px;
}

.heading-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding: clamp(36px,5vw,68px) 0 clamp(25px,3.5vw,42px);
}

.heading-row .count {
  margin-bottom: 7px;
  white-space: nowrap;
}

.count, .kicker, .metadata {
  font-size: .82rem;
  color: var(--muted);
  letter-spacing: .035em;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
}

.code {
  font-family: ui-monospace,"SFMono-Regular",Menlo,monospace;
  font-size: .81rem;
  letter-spacing: .055em;
  overflow-wrap: anywhere;
}

.classify {
  color: var(--accent);
  font-weight: 550;
}

.eyeline {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: .65;
}

.feature {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  min-height: 390px;
  background: var(--brown);
  color: var(--paper);
  overflow: hidden;
}

.feature-images {
  display: grid;
  min-width: 0;
  min-height: 100%;
  grid-template-columns: 1fr;
  background: #e8e2d9;
  overflow: hidden;
}

.feature-images.multiple {
  grid-template-columns: 1.8fr 1fr;
  gap: 3px;
}

.feature-images a {
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.feature-images img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: contain;
  transition: transform .3s;
}

.feature-images a:hover img, .card:hover img {
  transform: scale(1.02);
}

.feature-images .detail-sheet img {
  object-fit: cover;
}

.feature-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
  padding: clamp(30px,5vw,72px);
}

.feature-text .kicker, .feature-text .metadata {
  color: #e4cdb9;
}

.feature-text h2 {
  margin: 20px 0 12px;
  color: #fff6e8;
  font-size: clamp(2.1rem,3.5vw,3.6rem);
  letter-spacing: .085em;
}

.feature-text .excerpt {
  color: #eadad0;
  margin-top: 20px;
  max-width: 37em;
  font-size: .98rem;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.read {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  min-height: 44px;
  margin-top: 25px;
  border-bottom: 1px solid #bda18a;
  color: #fff2dc;
  font-size: .9rem;
}

.feature a:focus-visible {
  outline-color: #fff0c6;
  outline-offset: -3px;
}

.read span {
  transform: translateX(0);
  transition: transform .2s;
}

.read:hover span {
  transform: translateX(4px);
}

.feature.no-image {
  grid-template-columns: 1fr;
  min-height: 240px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 32px 22px;
  margin-top: 30px;
}

.card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  transition: transform .2s;
}

.card:hover {
  transform: translateY(-2px);
}

.card-photo {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--panel);
  margin-bottom: 16px;
}

.card-photo img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  transition: transform .2s;
}

.card h2 {
  font-size: 1.55rem;
  margin: .4em 0;
}

.card .metadata {
  overflow-wrap: anywhere;
}

.card.no-image {
  padding: 24px;
  background: var(--panel);
  justify-content: center;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0,1.13fr) minmax(0,.87fr);
  gap: 0 clamp(30px,6vw,88px);
  grid-template-areas: "photo title" "photo note";
  grid-template-rows: auto 1fr;
  margin-top: 22px;
}

.detail-layout.no-image {
  grid-template-columns: minmax(0,760px);
  grid-template-areas: "title" "note";
}

.detail-title {
  grid-area: title;
  padding: 18px 0 28px;
  border-bottom: 1px solid var(--line);
}

.detail-title h1 {
  margin-top: 20px;
}

.detail-photo {
  grid-area: photo;
  min-width: 0;
}

.large-photo {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: clamp(320px,45vw,590px);
  background: var(--panel);
  cursor: zoom-in;
}

.large-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.thumb {
  width: 60px;
  height: 60px;
  padding: 3px;
  border: 1px solid transparent;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb[aria-pressed=true] {
  border-color: var(--accent);
}

.detail-info {
  grid-area: note;
}

.facts {
  margin: 22px 0;
}

.facts div {
  display: grid;
  grid-template-columns: 3.5em 1fr;
  gap: 15px;
  padding: 7px 0;
}

.facts dt {
  color: var(--muted);
  font-size: .9rem;
}

.facts dd, .description {
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.story {
  margin-top: 30px;
}

.story h2 {
  font-size: 1.35rem;
  margin-bottom: 14px;
}

.description {
  font-family: var(--serif);
  font-size: 1.13rem;
  line-height: 1.95;
}

.modal {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  width: min(480px,calc(100% - 28px));
  max-height: 90vh;
  max-height: 90dvh;
  padding: clamp(18px,4vw,30px);
  box-shadow: 0 15px 60px #21191433;
}

.modal::backdrop {
  background: #211914a8;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-head h2 {
  font-size: 1.4rem;
}

.close {
  width: 44px;
  height: 44px;
  min-width: 44px;
  font-size: 1.55rem;
}

.photo-modal {
  width: min(1024px,calc(100% - 20px));
  padding: 12px;
}

.photo-modal .modal-head {
  padding-inline: 8px;
}

.photo-modal .modal-head b {
  font-family: var(--serif);
  overflow-wrap: anywhere;
}

.full-photo {
  width: 100%;
  height: min(73vh,850px);
  object-fit: contain;
  background: var(--panel);
}

.admin-view {
  max-width: 950px;
  margin: 0 auto;
}

.login-view {
  max-width: 445px;
  margin: clamp(48px,8vh,100px) auto;
}

.login-view h1 {
  font-size: 2.4rem;
}

.login-view form {
  margin-top: 30px;
}

.login-form {
  display: grid;
  gap: 12px;
}

.modal .login-form {
  margin-top: 18px;
}

.login-form .button {
  width: 100%;
}

.login-view label, .field {
  display: grid;
  gap: 6px;
  font-size: .95rem;
}

.field small, .helper {
  font-size: .84rem;
  color: var(--muted);
  font-weight: 400;
}

.input, textarea {
  width: 100%;
  background: #fffdf7;
  border: 1px solid #bcb09f;
  border-radius: 2px;
  min-height: 46px;
  padding: 9px 12px;
  font-size: 1rem;
}

.input:focus, textarea:focus {
  border-color: var(--accent);
}

textarea {
  resize: vertical;
}

.form-notice {
  margin: .7em 0;
  min-height: 0;
  color: var(--accent);
  overflow-wrap: anywhere;
}

.form-notice:empty {
  display: none;
}

.success {
  color: #365641;
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.manage-list {
  border-top: 1px solid var(--line);
}

.manage-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.manage-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.manage-name img {
  width: 68px;
  height: 72px;
  object-fit: cover;
  background: var(--panel);
  flex-shrink: 0;
}

.manage-name h2 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.manage-row .actions {
  flex-shrink: 0;
}

.editor {
  max-width: 790px;
  margin: 0 auto;
}

.editor .heading-row {
  padding-top: 10px;
}

.editor .heading-row h1 {
  font-size: 2.35rem;
}

.editor form {
  display: grid;
  gap: 24px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field input, .field textarea {
  font-weight: 400;
}

.image-group {
  display: grid;
  gap: 12px;
  padding-block: 16px;
  border-block: 1px solid var(--line);
}

.image-group h2 {
  font-size: 1.2rem;
}

.form-photo-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(135px,1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
}

.form-photo-list:empty {
  display: none;
}

.form-photo-list li {
  padding: 7px;
  background: var(--panel);
}

.form-photo-list img {
  width: 100%;
  height: 115px;
  object-fit: cover;
}

.photo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
}

.photo-toolbar button, .photo-toolbar span {
  font-size: .77rem;
  padding: 0 5px;
}

.photo-toolbar button {
  min-height: 44px;
  color: var(--accent);
}

.file-label {
  display: block;
  font-size: .9rem;
}

.file-label input {
  display: block;
  margin-top: 6px;
  width: 100%;
  min-width: 0;
}

.file-label input::file-selector-button {
  font: inherit;
  min-height: 42px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 5px 10px;
  margin-right: 10px;
}

.editor-actions {
  padding-bottom: 16px;
}

.editor-actions p {
  margin-bottom: 12px;
}

.qr-image {
  width: min(245px,85%);
  height: auto;
  margin: 16px auto;
  background: #fff;
  image-rendering: pixelated;
}

.qr-url {
  font-family: ui-monospace,monospace;
  overflow-wrap: anywhere;
  font-size: .85rem;
  margin: 12px 0;
}

.qr-hint {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: .92rem;
}

.page-enter {
  animation: arrive .35s ease-out both;
}

@keyframes arrive {
  from {
    opacity: .65;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width:850px) {
  .catalog-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .feature {
    grid-template-columns: 1.05fr 1fr;
    min-height: 330px;
  }

  .feature-images.multiple {
    grid-template-columns: 1fr;
  }

  .feature-images .detail-sheet {
    display: none;
  }

  .feature-text {
    padding: 30px;
  }

  .detail-layout {
    gap: 0 32px;
  }

  .large-photo {
    height: 420px;
  }
}

@media (max-width:640px) {
  .wrap {
    width: calc(100% - 40px);
  }

  .mast-inner {
    min-height: 70px;
  }

  .brand {
    gap: 10px;
  }

  .museum-mark {
    width: 38px;
    height: 38px;
  }

  .brand-type small {
    font-size: .44rem;
    letter-spacing: .11em;
  }

  .nav-link {
    font-size: .8rem;
  }

  .heading-row {
    align-items: center;
    padding: 30px 0 22px;
    gap: 10px;
  }

  .heading-row .count {
    margin: 0;
    font-size: .75rem;
  }

  .feature {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .feature-images {
    height: clamp(220px,70vw,370px);
    min-height: 0;
  }

  .feature-images.multiple {
    grid-template-columns: 1.8fr 1fr;
  }

  .feature-images .detail-sheet {
    display: grid;
  }

  .feature-images img {
    height: 100%;
    max-height: clamp(220px,70vw,370px);
  }

  .feature-text {
    padding: 23px 23px 26px;
  }

  .feature-text h2 {
    font-size: 2rem;
    margin: 10px 0 5px;
  }

  .feature-text .excerpt {
    margin-top: 12px;
    font-size: .94rem;
  }

  .read {
    margin-top: 12px;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .topline {
    margin-top: 9px;
  }

  .detail-layout, .detail-layout.no-image {
    grid-template-columns: 1fr;
    grid-template-areas: "title" "photo" "note";
    grid-template-rows: auto auto auto;
    gap: 0;
    margin-top: 0;
  }

  .detail-layout.no-image {
    grid-template-areas: "title" "note";
  }

  .detail-title {
    padding: 8px 0 19px;
    border: 0;
  }

  .detail-title h1 {
    margin-top: 7px;
  }

  .large-photo {
    height: clamp(280px,94vw,490px);
  }

  .thumbs {
    gap: 5px;
    margin-top: 8px;
  }

  .thumb {
    width: 49px;
    height: 49px;
  }

  .facts {
    border-block: 1px solid var(--line);
    padding-block: 12px;
  }

  .story {
    margin-top: 20px;
  }

  .foot {
    min-height: 68px;
    flex-wrap: wrap;
    row-gap: 0;
  }

  #filings {
    order: 1;
    flex-basis: 100%;
    justify-content: flex-start;
  }

  .manage-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .manage-row .actions {
    gap: 8px;
  }

  .manage-row .actions>* {
    padding: 5px 13px;
    min-height: 44px;
  }

  .admin-view .heading-row {
    flex-wrap: wrap;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .editor-actions .actions {
    align-items: stretch;
  }

  .form-photo-list {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .form-photo-list img {
    height: 96px;
  }

  .editor .heading-row h1 {
    font-size: 1.85rem;
  }

  .login-view {
    margin-top: 40px;
  }

  .foot a {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
