/* Cabinet materials and finish. The original walnut, velvet and corner fittings remain. */
:root {
 --study-walnut: linear-gradient(90deg,#160e0966,#160e0910,#160e0955),url("theme/walnut-v2.webp");
 --study-velvet: linear-gradient(#140a0b96,#100809b8),url("theme/velvet-v2.webp");
 --aged-brass: linear-gradient(135deg,#4b3521,#b99a60 23%,#e0ca92 39%,#8e6d3b 57%,#c4a571 76%,#534026);
 --brass-face: repeating-linear-gradient(0deg,#fff4c504 0 1px,#50350d04 1px 2px),linear-gradient(115deg,#ab854e,#dbc18b 32%,#c4a16a 61%,#b18b51);
 --brass-face-lit: repeating-linear-gradient(0deg,#fff4c504 0 1px,#50350d04 1px 2px),linear-gradient(115deg,#b9945b,#e5cc97 32%,#ceb078 61%,#bb965c);
 --brass-ink: #261a0e;
 --brass-rim: #c7a56b;
 --brass-inlay: inset 0 0 0 1px #4c341ec9,inset 0 0 0 2px #f0d89a70,inset 0 3px 4px #fff2c11c;
}

/* Owner-supplied damask tile; the cabinet surfaces retain their walnut and velvet. */
body {background:#080808 url("theme/damask.png") repeat;background-size:100px 121px;}

/* Satin brass is reserved for primary actions and small selected-state plates. */
.ui-icon {display:inline-block;flex:none;width:18px;height:18px;vertical-align:middle;}
.brass-button,.search-field button,.view-switch button[aria-pressed=true],.image-tabs button[aria-pressed=true],.count-plaque {
 color:var(--brass-ink);
 background:var(--brass-face);
 border:1px solid var(--brass-rim);
 box-shadow:var(--brass-inlay),0 2px 5px #0004;
 text-shadow:0 1px #f6dfac50;
}
.brass-button {
 position:relative;
 min-height:46px;
 padding:12px 27px;
 border-radius:2px;
 gap:22px;
 line-height:1.4;
 transition:background .16s,box-shadow .16s,transform .16s;
}
.brass-button::before,.brass-button::after {
 content:"";position:absolute;top:calc(50% - 1.5px);width:3px;height:3px;border-radius:50%;
 background:#5d4126;box-shadow:0 1px #f0d79785;pointer-events:none;
}
.brass-button::before {left:9px;}
.brass-button::after {right:9px;}
.brass-button:hover,.search-field button:hover,.view-switch button[aria-pressed=true]:hover,.image-tabs button[aria-pressed=true]:hover {
 color:var(--brass-ink);background:var(--brass-face-lit);
}
.brass-button:active {transform:translateY(1px);box-shadow:var(--brass-inlay);}
.brass-button:disabled {opacity:.5;cursor:not-allowed;transform:none;}
:where(a,button,input,select,textarea,summary):focus-visible {outline:2px solid #e5c58a;outline-offset:4px;}
.site-frame {display:flex;flex-direction:column;}
#main {flex:1;min-width:0;}

/* The same walnut joinery carries through the masthead and footer. */
.masthead {
 position:relative;flex-wrap:wrap;
 background:linear-gradient(#100b099e,#100b0970),var(--study-walnut);
 background-size:auto,auto,768px;
 border-bottom-color:#a5824e;
 box-shadow:inset 0 -3px #160e0b,inset 0 -4px #b9945938;
}
.brand-lockup {display:inline-flex;align-items:center;gap:12px;text-decoration:none;font-family:Arial,Helvetica,sans-serif;letter-spacing:0;}
.wordmark.brand-lockup {font-family:Arial,Helvetica,sans-serif;letter-spacing:0;gap:12px;}
.brand-lockup .brand-emblem {width:40px;height:40px;object-fit:contain;flex:none;}
.brand-type {display:flex;flex-direction:column;gap:3px;}
.brand-name {color:#f7f7f5;font-size:24px;font-weight:800;line-height:1;letter-spacing:.005em;text-shadow:0 2px 1px #000c;}
.brand-tagline {color:#c7c5c1;font:10px/1.5 Consolas,"Courier New",monospace;letter-spacing:.12em;white-space:nowrap;}
.brand-lockup:hover .brand-name {color:#fff;}
.masthead .studio-nav-link {gap:5px;}
.studio-nav-link .ui-icon,.footer-nav .ui-icon {width:14px;height:14px;}
.masthead nav {flex-wrap:wrap;gap:6px 26px;margin-left:auto;}
.masthead nav>a {display:inline-flex;align-items:center;gap:6px;min-height:44px;position:relative;border-bottom:1px solid transparent;transition:color .16s,border-color .16s;}
.masthead nav>a:hover {color:#f0dfbf;border-bottom-color:#a4835266;}
.masthead nav>a[aria-current] {color:#f3e3c6;border-bottom-color:#bd985d;}
.masthead nav>a[aria-current]::after {content:"";position:absolute;width:4px;height:4px;bottom:-2.5px;left:calc(50% - 2px);background:#bd985d;transform:rotate(45deg);}
.masthead nav>.owner-link {justify-content:center;gap:8px;padding:8px 15px;border:1px solid #977445;border-radius:2px;background:#1b140e99;color:#dcc399;font-size:.8rem;line-height:1.4;white-space:nowrap;box-shadow:inset 0 0 0 2px #100b0866;}
.masthead nav>.owner-link:hover {background:#3c2c1d;border-color:#c2a16b;color:#f4dfb9;}
.masthead nav>.owner-link[aria-current] {background:var(--brass-face);border-color:var(--brass-rim);color:var(--brass-ink);box-shadow:var(--brass-inlay);text-shadow:0 1px #f6dfac50;}
.masthead nav>.owner-link[aria-current]:hover {background:var(--brass-face-lit);}
.masthead nav>a.owner-link::after {content:none;}
.masthead .owner-link .ui-icon {width:17px;height:17px;}

/* Existing composition and still life, with a little breathing room at the action. */
.hero {
 grid-template-columns: 1.15fr 1fr;
 min-height: 470px;
 padding: 58px 6% 42px;
 gap: 20px;
 background: radial-gradient(ellipse at 80% 38%,#b8834130,transparent 48%),linear-gradient(90deg,#140f0de6,#1b1011a1),url("theme/velvet-v2.webp");
 background-size: auto,auto,460px;
 border: 0;
 box-shadow: inset 0 12px 30px #0008;
}
.hero::after {
 content: "";
 position: absolute;
 inset: auto 0 0;
 height: 18px;
 background: linear-gradient(#be92532b,transparent 35%,#0006),url("theme/walnut-v2.webp") center / 768px;
 border-top: 1px solid #99713b;
 box-shadow: 0 -2px 8px #0005;
}
.hero h1 {font-size:clamp(2.8rem,4.1vw,4.35rem);text-wrap:balance;}
.hero .intro {color:#d4c5b5;}
.hero .brass-button {margin-top:16px;}
.drapery {width:105px;opacity:.7;background-image:repeating-linear-gradient(90deg,#10060cbb,#661b2c25 12px,#10040bc9 27px,#44111c77 38px),url("theme/velvet-v2.webp");background-size:auto,320px;}
.study-vignette {position:relative;align-self:end;isolation:isolate;height:340px;margin:0 -32px -7px -12px;}
.study-vignette::before {content:"";position:absolute;inset:auto -5% 20px -8%;height:30%;background:var(--study-walnut);background-size:auto,650px;transform:perspective(300px) rotateX(40deg);box-shadow:0 12px 20px #0009;z-index:-1;}
.study-curios {position:absolute;width:100%;max-width:none;right:-2%;bottom:26px;pointer-events:none;}
.study-caption {position:absolute;bottom:0;left:12%;right:0;text-align:center;font:8px Georgia,serif;letter-spacing:.27em;color:#c2a77b;}

/* Compact native controls with explicit state, no frontend dependency. */
.browse-controls {padding:17px;background:linear-gradient(#211b18,#211b18) padding-box,var(--aged-brass) border-box;border:1px solid transparent;border-radius:8px;box-shadow:inset 0 0 0 3px #17120f,inset 0 0 0 4px #8d6b3533;}
.search-field {border-color:#675047;border-radius:7px;background:#151211;margin-bottom:12px;}
.search-field:focus-within {outline:2px solid #bb9565;outline-offset:2px;}
.search-field input:focus-visible {outline:none;}
.search-field button {border-radius:2px;min-height:38px;padding:7px 17px;font-weight:600;}
.search-field>.ui-icon {color:#baa078;width:20px;height:20px;}
.control-row {gap:12px;}
.inline-label select {min-height:42px;border-radius:6px;background-color:#191514;border-color:#675047;}
.filter-popover>summary {min-height:44px;display:flex;align-items:center;gap:10px;border-radius:6px;background:#352624;border-color:#795149;}
.filter-popover[open]>summary {background:#3e2d24;border-color:#b9955f;color:#f4e4c9;box-shadow:inset 0 0 0 2px #17120f;}
.filter-popover>summary::-webkit-details-marker {display:none;}
.filter-popover>summary>span:last-child {margin-left:auto;transition:transform .15s;}
.filter-popover[open]>summary>span:last-child {transform:rotate(180deg);}
.filter-count {display:inline-grid;place-items:center;min-width:20px;height:20px;border-radius:20px;background:#c4a16a;color:#261a0e;font-weight:600;}
.filter-chevron {display:flex;align-items:center;}
.filter-chevron .ui-icon {width:14px;height:14px;}
.filter-fields {top:54px;width:min(430px,calc(100vw - 84px));max-height:min(570px,70dvh);overflow-y:auto;border:1px solid #947443;border-radius:6px;padding:20px;grid-template-columns:1fr 1fr;gap:14px;background:#251c1b;box-shadow:inset 0 0 0 3px #17120f,0 18px 45px #000b;z-index:10;}
.filter-fields select {min-height:44px;border-radius:5px;background:#171313;}
.filter-panel-heading {grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:12px;color:#e9d8c6;}
.filter-panel-heading strong {font:1.1rem Georgia,serif;}
.filter-panel-heading button {display:inline-grid;place-items:center;padding:0;width:44px;height:44px;flex:none;border-color:#775d3b;border-radius:50%;}
.filter-policy {grid-column:1/-1;font-size:.75rem;color:#bba79a;margin:-6px 0 0;}
.filter-policy[hidden] {display:none;}
.filter-fields noscript {grid-column:1/-1;}
.view-switch {border-color:#685046;padding:3px;background:#141111;border-radius:7px;gap:3px;}
.view-switch[hidden] {display:none;}
.view-switch button {display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid transparent;border-radius:2px;min-height:40px;padding:7px 11px;color:#c4b2a3;}
.view-switch button:hover {color:#f1dfc0;background:#342821;}
.view-switch button[aria-pressed=true] {background:var(--brass-face);color:var(--brass-ink);border-color:var(--brass-rim);box-shadow:var(--brass-inlay);font-weight:600;}
.view-switch button[aria-pressed=true]:hover {background:var(--brass-face-lit);}
.view-switch button:focus-visible {outline-offset:-3px;outline-color:#f5e0b6;}
.view-switch button[aria-pressed=true]:focus-visible {outline-color:#382412;}
.view-switch .ui-icon {width:16px;height:16px;}
.active-filters {display:flex;flex-wrap:wrap;gap:8px;margin-top:14px;font-size:.77rem;}
.active-filters a {display:flex;align-items:center;gap:12px;min-height:40px;padding:5px 11px;border:1px solid #80653e;border-radius:3px;background:#30231d;text-decoration:none;max-width:100%;overflow-wrap:anywhere;}
.active-filters a:hover {background:#443127;}
.active-filters .clear-filters {background:none;border-color:transparent;text-decoration:underline;color:#d5b79b;}
.browse-meta {margin:22px 0 16px;}

/* A single continuous rail for each measured row, beneath the art, never across it. */
#deck-cabinet {
 position:relative;
 isolation:isolate;
 border:16px solid transparent;
 border-image:none;
 background:var(--study-velvet) padding-box,var(--study-walnut) border-box;
 background-size:auto,400px,auto,768px;
 box-shadow:inset 0 8px 20px #000a,inset 2px 0 5px #0009,inset -2px 0 5px #0009,0 0 0 1px #8d663a66;
 padding:32px 27px 24px;
 gap:32px 24px;
}
#deck-cabinet::before {content:"";position:absolute;inset:-12px;pointer-events:none;z-index:4;background:linear-gradient(#c3a16b,#78603b) left top / 30px 3px,linear-gradient(90deg,#c3a16b,#78603b) left top / 3px 30px,linear-gradient(#c3a16b,#78603b) right top / 30px 3px,linear-gradient(90deg,#78603b,#c3a16b) right top / 3px 30px,linear-gradient(#78603b,#c3a16b) left bottom / 30px 3px,linear-gradient(90deg,#c3a16b,#78603b) left bottom / 3px 30px,linear-gradient(#78603b,#c3a16b) right bottom / 30px 3px,linear-gradient(90deg,#78603b,#c3a16b) right bottom / 3px 30px;background-repeat:no-repeat;}
#deck-cabinet::after {content:"";position:absolute;inset:0;border:1px solid #ba98543d;pointer-events:none;}
#deck-cabinet .deck-card {padding-bottom:0;z-index:1;}
#deck-cabinet .deck-card::after {content:none;}
#deck-cabinet .deck-card:hover,#deck-cabinet .deck-card:focus-within {z-index:3;}
#deck-cabinet .cover-wrap {height:clamp(170px,18vw,255px);aspect-ratio:auto;max-height:none;}
#deck-cabinet .deck-label {padding-top:24px;}
#deck-cabinet .deck-label h3 {color:#f0e1cf;}
#deck-cabinet .accession {color:#c2a787;}
#deck-cabinet .deck-year {color:#c7b19c;}
.cabinet-rails {position:absolute;inset:0;pointer-events:none;z-index:0;}
.cabinet-rail {position:absolute;left:0;right:0;height:13px;border-top:1px solid #bd955a;border-bottom:2px solid #24150e;background:linear-gradient(#a97f4540,transparent 40%,#0006),url("theme/walnut-v2.webp") center / 650px;box-shadow:0 3px 7px #0005;}
/* Grid shares the cabinet's materials and row edges; covers are spaced, not overlapped. */
#deck-cabinet[data-view=grid] {--columns:5;}
#deck-cabinet[data-view=grid] .deck-link {display:flex;flex-direction:column;height:100%;}
#deck-cabinet[data-view=grid] .cover-wrap {flex:none;}
#deck-cabinet[data-view=grid] .deck-label {margin-top:24px;padding:10px 11px;border:2px solid transparent;border-radius:2px;background:linear-gradient(#211716f5,#181110f5) padding-box,var(--aged-brass) border-box;box-shadow:inset 0 0 0 2px #140e0b;min-height:98px;}
#deck-cabinet[data-view=grid] .deck-label {flex:1;}
#deck-cabinet[data-view=grid] .deck-link:focus-visible {outline-offset:7px;}
.card-list-facts,.card-open-hint {display:none;}
.count-plaque {padding:4px 11px;white-space:nowrap;}

/* A public catalogue list, not the owner's inventory or editing surface. */
#deck-cabinet[data-view=list] {display:block;padding:12px 22px;background:linear-gradient(#170e10d9,#170e10e8) padding-box,url("theme/velvet-v2.webp") padding-box,var(--study-walnut) border-box;background-size:auto,400px,auto,768px;}
#deck-cabinet[data-view=list] .cabinet-rails {display:none;}
#deck-cabinet[data-view=list] .deck-card {border-bottom:1px solid #a07e4547;}
#deck-cabinet[data-view=list] .deck-card:last-of-type {border-bottom:0;}
#deck-cabinet[data-view=list] .deck-link {display:grid;grid-template-columns:60px minmax(0,1.2fr) minmax(0,1.65fr) 54px;gap:22px;align-items:center;padding:17px 8px;min-height:116px;border-radius:3px;}
#deck-cabinet[data-view=list] .deck-link:hover {background:#bd986c0b;}
#deck-cabinet[data-view=list] .cover-wrap {height:84px;width:60px;max-width:none;aspect-ratio:auto;}
#deck-cabinet[data-view=list] .cover-wrap img {transform:none;filter:drop-shadow(2px 3px 3px #0007);}
#deck-cabinet[data-view=list] .missing-cover {height:84px;font-size:8px;gap:0;}
#deck-cabinet[data-view=list] .missing-cover>span:first-child {font-size:20px;}
#deck-cabinet[data-view=list] .deck-label {padding:0;margin:0;}
#deck-cabinet[data-view=list] .deck-label h3 {font-size:1.15rem;line-height:1.4;margin:0;}
#deck-cabinet[data-view=list] .accession,#deck-cabinet[data-view=list] .deck-year {display:none;}
#deck-cabinet[data-view=list] .card-list-facts {display:grid;grid-template-columns:1fr 1fr .55fr;gap:18px;margin:0;min-width:0;}
.card-list-facts dt {font-size:.61rem;letter-spacing:.12em;text-transform:uppercase;color:#baa074;}
.card-list-facts dd {margin:4px 0 0;font-size:.82rem;color:#ded0bd;overflow-wrap:anywhere;}
#deck-cabinet[data-view=list] .card-open-hint {display:flex;gap:8px;align-items:center;color:#c4a678;font-size:.75rem;}

/* Quiet footer book nook. No tooltip, glow, hover cue or page-turn spectacle. */
.footer {position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:40px;min-height:170px;padding:26px 5%;background:linear-gradient(#15100ef2,#15100edb),url("theme/walnut-v2.webp") center / 768px;border-top:1px solid #aa854e;box-shadow:inset 0 3px #312216,inset 0 4px #96754444;}
.footer-brand {display:flex;flex-direction:column;align-items:start;gap:3px;}
.footer-brand>a:first-child {display:inline-flex;align-items:center;min-height:38px;font:1rem Georgia,serif;letter-spacing:.2em;color:#ddc8a4;}
.footer-brand>a.brand-lockup {font-family:Arial,Helvetica,sans-serif;letter-spacing:0;gap:13px;margin-bottom:12px;}
.footer-brand .brand-name {font-size:22px;}
.brand-lockup .brand-monogram {width:30px;height:54px;}
.footer a.brand-lockup:hover {text-decoration:none;}
.footer-brand>span {font-size:.77rem;color:#c0af96;}
.footer-nav {display:flex;flex-direction:column;align-items:start;grid-column:2;grid-row:1;}
.footer-nav a {display:inline-flex;align-items:center;gap:8px;min-height:36px;font-size:.78rem;color:#c8b79b;}
.footer a:not(.tome-entrance):hover {color:#f2dbb0;text-decoration:underline;}
.footer-nav .back-to-top {color:#bba17b;}
.back-to-top .ui-icon {width:14px;height:14px;}
.footer-nook {position:relative;isolation:isolate;width:114px;height:102px;display:flex;align-items:end;justify-content:center;gap:0;padding:0 9px 10px;perspective:600px;grid-column:3;grid-row:1;}
.footer-nook::before {content:"";position:absolute;inset:3px -7px 8px;background:#0d0907;box-shadow:inset 0 8px 14px #0009;z-index:-1;border:1px solid #60452655;}
.footer-nook::after {content:"";position:absolute;bottom:3px;left:-12px;right:-12px;height:7px;background:var(--study-walnut);background-size:auto,400px;border-top:1px solid #87613d;pointer-events:none;}
.footer-nook .nook-book,.footer-nook .tome-entrance {position:relative;display:block;flex:0 0 21px;height:83px;transform-origin:center bottom;filter:brightness(.62) saturate(.68);}
.footer .footer-nook .nook-book {margin-left:0;}
.footer-nook img {position:absolute;max-width:none;height:112%;width:auto;left:50%;bottom:-6%;transform:translateX(-50%);pointer-events:none;}
.footer-nook .nook-book-one {height:89px;transform:rotate(-2deg);}
.footer-nook .nook-book-two {height:78px;filter:brightness(.5) saturate(.45);}
.footer-nook .nook-book-three {height:86px;transform:rotate(2deg);filter:brightness(.56) saturate(.3);}
.footer-nook .tome-entrance {transform:rotate(-3deg);transition:transform .28s ease-out,filter .28s ease-out;cursor:default;z-index:1;}
.footer-nook .tome-entrance::before {content:"";position:absolute;inset:0 -12px;}
.footer-nook .tome-entrance:focus-visible {outline:2px solid #b59869;outline-offset:5px;}
.footer-nook .tome-entrance.is-pulled {transform:translateZ(58px) translateY(2px) rotate(-3deg);filter:brightness(.72) saturate(.68);}
@media(min-width:901px) {
 #deck-cabinet[data-view=shelves],#deck-cabinet[data-view=auto] {padding-right:80px;column-gap:0;}
 #deck-cabinet[data-view=shelves] .cover-wrap,#deck-cabinet[data-view=auto] .cover-wrap {width:140%;max-width:none;}
}

/* The open shadowbox is part of the proof; retain all existing detail behavior. */
.shadowbox-dialog {border:13px solid transparent;border-image:none;background:linear-gradient(#1f1714,#1b1512) padding-box,var(--study-walnut) border-box;background-size:auto,auto,768px;box-shadow:0 20px 100px #000c,0 0 0 1px #ac89564d;}
.wood-frame {border-image:none;border-color:transparent;background:linear-gradient(#1f1714,#1b1512) padding-box,var(--study-walnut) border-box;background-size:auto,auto,768px;box-shadow:inset 0 0 0 1px #a780493d,inset 0 0 25px #0007,0 12px 40px #0006;}
.shadowbox-dialog .detail-art,.detail-page .detail-art {padding:24px 18px;background:radial-gradient(ellipse at 50% 0,#daae5722,transparent 75%) padding-box,linear-gradient(#190c0ea6,#12090ac7) padding-box,url("theme/velvet-v2.webp") padding-box,var(--aged-brass) border-box;background-size:auto,auto,400px,auto;border:3px solid transparent;box-shadow:inset 0 0 0 2px #1c110e,inset 0 4px 20px #0008;}
.shadowbox-dialog .detail-main-image,.detail-page .detail-main-image {max-width:280px;}
.shadowbox-dialog .inspection-hint,.detail-page .inspection-hint {color:#d2bba0;}
.dialog-close {display:inline-grid;place-items:center;width:44px;height:44px;border-color:#957449;}
.image-tabs button {min-height:42px;border-radius:2px;}
.image-tabs button[aria-pressed=true] {color:var(--brass-ink);border-color:var(--brass-rim);background:var(--brass-face);box-shadow:var(--brass-inlay);}
.reading-page .brass-button {margin-top:15px;}
.story-page .story-lede {font:clamp(1.08rem,1.6vw,1.28rem)/1.8 Georgia,serif;color:#e8d9c4;border-left:2px solid #b89258;padding-left:24px;margin:28px 0 0;}
.story-page .story-section {margin-top:42px;}
.story-page .story-section .eyebrow {margin-bottom:10px;}
.story-page .story-section h2 {margin-top:0;}
.story-page .story-attribution {border-top:1px solid #604831;padding-top:34px;}
.story-page .story-disclosure {font-style:italic;color:#d5bea1;}
.ornamental-rule {display:flex;align-items:center;gap:18px;border:0;}
.ornamental-rule::before,.ornamental-rule::after {content:"";flex:1;height:1px;background:linear-gradient(90deg,transparent,#a17b43);}
.ornamental-rule::after {transform:rotate(180deg);}

@media(max-width:1100px) {
 .hero {padding-inline:5%;grid-template-columns:1.2fr 1fr;}
 .study-vignette {height:290px;margin-right:-10px;}
 #deck-cabinet[data-view=grid] {--columns:4;}
 .control-row {gap:10px;}
}
@media(max-width:900px) {
 .masthead nav {gap:4px 18px;}
 .hero {grid-template-columns:1.25fr 1fr;min-height:420px;}
 .hero h1 {font-size:3rem;}
 .study-vignette {height:225px;margin-left:-10px;}
 #deck-cabinet[data-view=grid] {--columns:3;}
 #deck-cabinet::before {inset:-9px;}
 #deck-cabinet[data-view=list] .deck-link {grid-template-columns:54px minmax(0,1.1fr) minmax(0,1.5fr);gap:15px;}
 #deck-cabinet[data-view=list] .cover-wrap {width:54px;height:76px;}
 #deck-cabinet[data-view=list] .card-open-hint {display:none;}
 #deck-cabinet {border-width:12px;}
 #deck-cabinet[data-view=shelves] {column-gap:8px;}
 #deck-cabinet[data-view=shelves] .cover-wrap {width:110%;max-width:none;}
 #deck-cabinet[data-view=shelves] .deck-card:nth-child(3n) .cover-wrap {width:100%;}
}
@media(max-width:600px) {
 .masthead {padding:13px 18px;gap:3px 12px;}
 .wordmark {font-size:1.05rem;letter-spacing:.16em;}
 .wordmark img {width:30px;height:30px;}
 .wordmark .brand-emblem {width:34px;height:34px;}
 .wordmark .brand-name {font-size:21px;}
 .wordmark .brand-tagline {font-size:9px;}
 .masthead nav {gap:4px 14px;font-size:.78rem;}
 .masthead nav a:nth-child(n+3) {display:inline-flex;}
 .masthead:has(nav>a:nth-child(3)) nav {flex-basis:100%;justify-content:center;margin-top:7px;}
 .masthead .owner-link {font-size:.78rem;}
 .hero {display:block;padding:32px 24px 18px;min-height:0;}
 .hero-copy {max-width:none;}
 .hero h1 {font-size:2.75rem;max-width:none;}
 .hero .intro {max-width:none;font-size:.92rem;line-height:1.7;}
 .study-vignette {height:160px;max-width:340px;margin:6px auto 0;}
 .study-vignette::before {bottom:12px;height:40px;}
 .study-curios {width:100%;right:0;bottom:18px;}
 .study-caption {font-size:6px;bottom:3px;}
 .drapery {right:-50px;opacity:.35;}
 .collection-section {padding:30px 14px;}
 .browse-controls {padding:11px;border-radius:8px;}
 .search-field input {padding:13px 0;}
 .search-field button {min-height:40px;padding:7px 12px;}
 .search-field>.ui-icon {width:18px;height:18px;}
 .control-row {gap:10px 8px;}
 .control-row>.inline-label:first-of-type {gap:7px;font-size:.72rem;}
 .inline-label select {padding-left:8px;padding-right:20px;font-size:.77rem;}
 .filter-popover>summary {padding:8px 11px;font-size:.8rem;}
 .filter-popover>summary>.ui-icon {width:16px;height:16px;}
 .filter-fields {width:calc(100vw - 74px);grid-template-columns:1fr;padding:16px;}
 .filter-fields label {font-size:.85rem;}
 .view-switch button {padding:7px 8px;min-height:42px;gap:5px;}
 .view-switch .ui-icon {width:14px;height:14px;}
 #deck-cabinet {border-width:9px;padding:23px 14px 20px;gap:27px 16px;}
 #deck-cabinet .cover-wrap {height:clamp(145px,43vw,235px);}
 #deck-cabinet[data-view=shelves] {column-gap:6px;}
 #deck-cabinet[data-view=shelves] .cover-wrap {width:108%;max-width:none;}
 #deck-cabinet[data-view=shelves] .deck-card:nth-child(3n) .cover-wrap {width:108%;}
 #deck-cabinet[data-view=shelves] .deck-card:nth-child(2n) .cover-wrap {width:100%;}
 #deck-cabinet .deck-label h3 {font-size:1.05rem;}
 #deck-cabinet .accession {letter-spacing:.07em;font-size:8px;}
 #deck-cabinet::before {inset:-7px;background-size:20px 2px,2px 20px,20px 2px,2px 20px,20px 2px,2px 20px,20px 2px,2px 20px;}
 #deck-cabinet[data-view=grid] {--columns:2;}
 #deck-cabinet[data-view=grid] .deck-label {padding:9px 7px;min-height:110px;}
 #deck-cabinet[data-view=list] {padding:3px 9px;}
 #deck-cabinet[data-view=list] .deck-link {grid-template-columns:48px minmax(0,1fr);gap:8px 13px;padding:15px 3px;min-height:105px;}
 #deck-cabinet[data-view=list] .cover-wrap {width:48px;height:68px;grid-row:1/3;align-self:start;}
 #deck-cabinet[data-view=list] .deck-label h3 {font-size:1.05rem;}
 #deck-cabinet[data-view=list] .card-list-facts {grid-column:2;grid-template-columns:1fr .65fr;gap:9px;}
 #deck-cabinet[data-view=list] .card-list-facts>div:nth-child(2) {display:none;}
 .card-list-facts dt {font-size:.57rem;}
 .card-list-facts dd {font-size:.8rem;margin-top:2px;}
 .footer {grid-template-columns:minmax(0,1fr) 90px;gap:14px 12px;padding:25px 22px;}
 .footer-brand {grid-column:1/-1;}
 .footer-brand>span {font-size:.8rem;}
 .footer-nav {grid-column:1;grid-row:2;}
 .footer-nav a {min-height:40px;font-size:.8rem;}
 .footer-nook {grid-column:2;grid-row:2;transform:scale(.85);transform-origin:right center;justify-self:end;margin-left:0;}
 .shadowbox-dialog {border-width:8px;}
 .shadowbox-dialog .detail-art,.detail-page .detail-art {padding:20px 14px;}
 .shadowbox-dialog .detail-main-image,.detail-page .detail-main-image {max-width:190px;}
}
@media(max-width:350px) {
 .masthead {justify-content:center;}
 .masthead nav {flex-basis:100%;justify-content:center;margin-left:0;}
 .control-row {display:grid;grid-template-columns:1fr 1fr;}
 .control-row>.inline-label:first-of-type {order:3;grid-column:1/-1;justify-content:start;}
 .control-row>.inline-label:first-of-type select {flex:1;}
 .control-row>.inline-label:nth-of-type(2) {order:2;justify-content:end;}
 .control-row>.view-switch {order:4;grid-column:1/-1;margin-left:0;}
 .control-row>.view-switch button {flex:1;}
 .control-row>noscript {grid-column:1/-1;}
 .hero h1 {font-size:2.4rem;}
 .study-vignette {height:140px;}
 .footer-nook {transform:scale(.7);margin-left:-35px;}
}
@media(prefers-reduced-motion:reduce) {
 .tome-entrance {transition:none;}
}
@media(max-width:300px) {
 #deck-cabinet[data-view=grid] {--columns:1;}
 .view-switch {margin-left:0;}
}
