:root {
  color-scheme: light;
  --bg: #ece0c9;
  --panel: #f5ead6;
  --ink: #27271d;
  --muted: #65523e;
  --bronze: #784d2b;
  --line: #a99572;
  --accent: #783b2c;
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: radial-gradient(ellipse at 50% 10%, #f8eedb, transparent 58%), var(--bg); font: 1rem/1.55 var(--sans); }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, p { margin: 0; }
h1, h2, .brand { font-family: var(--serif); font-weight: 500; }
.eyebrow { color: var(--bronze); font: 700 .875rem/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.quiet, .primary { border: 1px solid var(--line); border-radius: 5px; padding: .58rem .9rem; }
.quiet { color: var(--ink); background: var(--panel); }
.quiet:hover:not(:disabled) { border-color: var(--accent); }
.primary { color: #fff3dc; background: var(--accent); font-weight: 700; border-color: var(--accent); }
.primary:hover { background: #612b21; }
input, select {
  min-width: 0; width: 100%; min-height: 2.85rem; background: #fff7e7;
  border: 1px solid var(--line); border-radius: 5px; color: var(--ink); padding: .55rem .72rem;
}
input::placeholder { color: #76674f; }
select {
  appearance: none; padding-right: 2rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--bronze) 50%), linear-gradient(135deg, var(--bronze) 50%, transparent 50%);
  background-size: 5px 5px, 5px 5px; background-position: calc(100% - 15px) 54%, calc(100% - 10px) 54%;
  background-repeat: no-repeat;
}

.entry {
  display: grid; min-height: 100svh; place-items: center; padding: 2rem 1rem;
  background: radial-gradient(ellipse at 50% 36%, #947254 0, #4e3b2d 47%, #24261b 88%);
}
.entry-frame {
  position: relative; width: min(100%, 34rem); padding: clamp(2.75rem, 9vw, 5rem) clamp(1.65rem, 7vw, 4rem);
  background: radial-gradient(ellipse at 50% 30%, #f9efd9 25%, #e3cc9f 100%); border: 1px solid #826748;
  text-align: center; box-shadow: 0 1.5rem 5rem #0009;
}
.entry-frame::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--line); pointer-events: none; }
.seal {
  display: grid; place-items: center; width: 3.2rem; height: 3.2rem; margin: 0 auto 1.25rem;
  border: 1px solid var(--line); border-radius: 50%; color: var(--bronze); font-size: 1.5rem;
}
.entry h1 { font-size: clamp(3.25rem, 10vw, 5.2rem); line-height: .86; letter-spacing: -.065em; margin: 1rem 0; }
.entry-intro { color: var(--muted); margin: 1.25rem 0 1.6rem; }
.entry-form { max-width: 19rem; margin: auto; display: grid; gap: .6rem; text-align: left; }
.entry-form label { color: var(--muted); font-weight: 600; }
.entry-form input { letter-spacing: .3em; }
.entry-form [role="alert"] { color: #8b2c22; }

.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: 4rem; padding: .5rem max(1rem, calc((100vw - 82rem) / 2)); border-bottom: 1px solid var(--line);
}
.brand { text-decoration: none; font-size: 1.5rem; white-space: nowrap; }
.brand span { margin-right: .25rem; color: var(--bronze); }
.archive { width: min(100% - 2rem, 82rem); margin: 1.5rem auto 4rem; }
.intro {
  isolation: isolate; position: relative; min-height: clamp(12rem, 27vw, 19rem); display: grid; align-items: end;
  overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--panel);
}
.intro-copy { padding: clamp(1.2rem, 4vw, 3rem); z-index: 1; }
.intro h1 { font-size: clamp(2.75rem, 7vw, 6rem); line-height: .95; letter-spacing: -.055em; }
.intro p { max-width: 37ch; margin: .8rem 0 0; color: var(--ink); }
.cover { position: absolute; inset: 0; }
.cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(95deg, #f5e8ce 5%, #f5e8ceee 35%, #f5e8ce65 72%, #f5e8ce18), linear-gradient(0deg, #f5e8ce90, transparent 72%); }
.browser { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 1.65rem; margin-top: 1.65rem; }
aside { align-self: start; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); padding: .95rem .7rem; }
aside h2 { padding: 0 .6rem .65rem; }
#folders a { display: block; padding: .34rem .6rem; border-radius: 4px; text-decoration: none; }
#folders a:hover { background: #eadbbd; }
#folders a[aria-current] { background: #e5d1b1; color: #631f18; }
.folder-group { margin-top: .45rem; }
.folder-group > a { font-weight: 650; }
.folder-list { list-style: none; max-height: 55svh; overflow: auto; padding: 0 0 0 .55rem; margin: .55rem 0 0 .55rem; border-left: 1px solid var(--line); }
.folder-list li a { color: var(--muted); font-size: .9375rem; overflow-wrap: anywhere; }
.filters { display: grid; grid-template-columns: minmax(10rem, 2fr) repeat(2, minmax(8rem, 1fr)); gap: .75rem; }
.filters label { display: grid; gap: .28rem; color: var(--muted); font-weight: 600; font-size: .9rem; }
.filters input, .filters select { font-size: 1rem; font-weight: 400; }
.results-heading { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; margin: 1.15rem 0 .7rem; }
.results-heading h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); line-height: 1.15; }
.results-heading p, #status { color: var(--muted); }
.results-heading p { white-space: nowrap; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.card {
  display: flex; flex-direction: column; overflow: hidden; min-width: 0; padding: 0;
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); text-align: left;
}
.card:hover { border-color: var(--accent); }
.card-media { display: grid; grid-template-rows: minmax(0, 1fr); place-items: center; width: 100%; aspect-ratio: 5 / 4; background: #dbcbac; color: var(--muted); overflow: hidden; }
.card-media img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.card-caption { display: grid; gap: .15rem; padding: .6rem .75rem .75rem; width: 100%; overflow-wrap: anywhere; }
.card-caption strong { font: 600 1.13rem/1.2 var(--serif); }
.card-caption span { color: var(--muted); font-size: .875rem; }
#more { display: block; margin: 1.1rem auto 0; }
dialog {
  width: min(95vw, 80rem); max-height: 94svh; padding: 0; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
}
dialog::backdrop { background: #000d; }
.viewer-bar, .viewer-controls { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .7rem 1rem; }
.viewer-bar h2 { font-size: 1.45rem; line-height: 1.15; overflow-wrap: anywhere; }
.viewer-bar p { color: var(--muted); }
#art-image { display: block; width: 100%; height: min(72svh, 60rem); object-fit: contain; background: #0c0d09; }
#art-error { padding: 1rem; }

@media (max-width: 62rem) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 47rem) {
  .browser { grid-template-columns: 1fr; gap: 1rem; margin-top: 1rem; }
  #folders { display: flex; flex-wrap: wrap; gap: .25rem; }
  .folder-group { margin: 0; }
  .folder-list { display: flex; flex-basis: 100%; flex-wrap: wrap; gap: .2rem; max-height: 9rem; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters .search { grid-column: 1 / -1; }
}
@media (max-width: 26rem) { .grid { gap: .55rem; } .card-caption { padding-inline: .5rem; } }
