/* ═══════════════════════════════════════════════════════════════
   THE READING ROOM — youxi--1--97 index stylesheet
   A midnight rare-book room: burgundy lacquer, gilded tooling,
   cream laid paper, walnut catalog cabinets, banker's lamplight.
   Structure classes are site-exclusive (s97-*).
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #241019;
  --panel: #33161F;
  --panel-2: #402028;
  --accent: #C8A24B;
  --accent2: #8E2F41;
  --text: #F2E8D5;
  --soft: #B8A08E;
  --line: rgba(200, 162, 75, .28);
  --wood: #5C3A28;
  --wood-deep: #3E241A;
  --paper: #F2E8D5;
  --paper-deep: #E8DCC2;
  --ink: #2E1A12;
  --wine: #6B1F30;
  --fh: Georgia, 'Times New Roman', serif;
  --fb: Georgia, serif;
  --fm: 'Courier New', monospace;
  --sec-gap: 30px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }

body {
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.16) 0 1px, transparent 1px 44px),
    radial-gradient(ellipse at 50% -6%, rgba(200, 162, 75,.12), transparent 58%),
    radial-gradient(ellipse at 12% 110%, rgba(142, 47, 65,.10), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--fb);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}

[v-cloak] { display: none; }
a { color: inherit; text-decoration: none; display: block; }
img { display: block; max-width: 100%; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
::selection { background: var(--accent); color: var(--ink); }

.wrap { max-width: 620px; margin: 0 auto; padding: 0 18px; }
.sec { margin-top: var(--sec-gap); min-width: 0; }

/* ══════════════════════════════════════════════════════════════
   SECTION PANEL — walnut end-panel behind every shelf section
   ══════════════════════════════════════════════════════════════ */
.sec {
  position: relative;
  background: linear-gradient(180deg, rgba(64,32,40,.62), rgba(51,22,31,.5) 58%, rgba(36,16,25,.42));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 16px 18px;
  box-shadow: 0 12px 26px -16px rgba(0,0,0,.7), inset 0 1px 0 rgba(242,232,213,.05);
}
.sec::after {
  content: '';
  position: absolute; left: -7px; right: -7px; bottom: -8px; height: 10px;
  background: linear-gradient(180deg, #6B442E, #4A2E1E 55%, #33200F);
  border-radius: 3px;
  box-shadow: 0 5px 9px -4px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,235,200,.14), inset 0 -2px 0 rgba(0,0,0,.4);
}
.sec:nth-of-type(even) {
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(200,162,75,.07), transparent 70%),
    linear-gradient(180deg, rgba(64,32,40,.55), rgba(36,16,25,.4));
}

/* ══════════════════════════════════════════════════════════════
   CALLOUT — brass knob + cream catalog label
   ══════════════════════════════════════════════════════════════ */
.callout { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; position: relative; min-height: 24px; padding-left: 20px; }
.callout::before {
  content: '';
  position: absolute; left: 0; top: 50%; width: 11px; height: 11px; margin-top: -5.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #EBD08A, #8A6430 74%);
  box-shadow: 0 1px 3px rgba(0,0,0,.55), inset 0 -1px 1px rgba(0,0,0,.35);
}
.callout b {
  flex: none;
  font-family: Georgia, serif;
  font-variant: small-caps;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--ink);
  background: var(--paper);
  padding: 3px 13px;
  border-radius: 2px;
  box-shadow: 0 3px 6px -2px rgba(0,0,0,.6), inset 0 0 0 1px rgba(74,51,32,.3);
}
.callout span {
  flex: 1; min-width: 0;
  font-family: var(--fm);
  font-style: italic;
  font-size: 10.5px;
  color: var(--soft);
  letter-spacing: .06em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.callout::after { content: ''; flex: 1; border-top: 2px dotted rgba(200, 162, 75,.4); }
.callout .co-tab {
  flex: none; width: 13px; height: 13px; margin-left: -3px;
  background: var(--accent2);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 62%, 0 100%);
  opacity: .9;
}

/* ══════════════════════════════════════════════════════════════
   s97 HEADER — CARD-CATALOG CABINET
   brass plate + row of little catalogue drawers
   ══════════════════════════════════════════════════════════════ */
.s97-cab {
  position: relative; z-index: 50;
  background:
    linear-gradient(180deg, rgba(255,235,200,.05), transparent 30%),
    linear-gradient(180deg, #3A1C26, #241019);
  border-bottom: 3px solid var(--wood);
}
.s97-cab-plate {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 18px 2px;
  font-family: var(--fm);
  font-size: 9px;
  letter-spacing: .3em;
  color: var(--accent);
  opacity: .85;
}
.s97-cab-plate i {
  flex: none; width: 44px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .5;
}
.s97-cab-in { display: flex; align-items: center; gap: 10px; padding: 4px 0 12px; }
.s97-brand {
  flex: 1; min-width: 0;
  font-family: var(--fh);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--paper);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(0,0,0,.6);
}
.s97-brand::before { content: '📖 '; font-size: 16px; }
.s97-brand-mark {
  display: block;
  font-family: var(--fm);
  font-size: 8px;
  letter-spacing: .34em;
  color: var(--accent);
  opacity: .8;
  line-height: 1;
  margin-bottom: 4px;
}
.hdr-search {
  flex: none;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  border: 1.5px solid rgba(200, 162, 75,.45);
  border-radius: 3px;
  background: rgba(0,0,0,.28);
}
/* the drawer band: a row of tiny catalog drawers with brass pulls */
.s97-drawerband {
  display: flex; gap: 3px;
  padding: 0 0 10px;
  background: rgba(0,0,0,.3);
}
.s97-drawerband i {
  flex: 1; height: 24px;
  background: linear-gradient(180deg, #63412D 0 4px, #4A2E1E 4px 100%);
  border-radius: 2px;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,235,200,.16), inset 0 -2px 3px rgba(0,0,0,.5);
}
.s97-drawerband i::before {
  content: '';
  position: absolute; left: 50%; top: 4px; bottom: 4px;
  width: 14px; transform: translateX(-50%);
  background: linear-gradient(180deg, #5B3A26, #3E241A);
  border: 1px solid rgba(0,0,0,.4);
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255,235,200,.1);
}
.s97-drawerband i::after {
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: 8px; height: 3px;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, #EBD08A, #9D7B3C);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.s97-drawerband i:nth-child(3) { filter: brightness(1.12); }
.s97-drawerband i:nth-child(5) { filter: brightness(1.06); }

/* ══════════════════════════════════════════════════════════════
   NAV — book-spine chips + retrieval slip search
   ══════════════════════════════════════════════════════════════ */
.nav-chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 2px 4px; scrollbar-width: none; position: relative; }
.nav-chips::-webkit-scrollbar { display: none; }
.nchip {
  flex: none;
  font-size: 12.5px; font-weight: 700;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,0) 40%), var(--panel);
  border: 1px solid var(--line);
  border-bottom: 3px solid rgba(0,0,0,.45);
  border-radius: 3px 8px 3px 3px;
  padding: 7px 14px;
  font-family: Georgia, serif;
  transition: transform .16s ease, box-shadow .16s ease;
}
.nchip:nth-child(4n+1) { background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,0) 40%), #4A1622; }
.nchip:nth-child(4n+2) { background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,0) 40%), #6B1F30; }
.nchip:nth-child(4n+3) { background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,0) 40%), #402028; }
.nchip:nth-child(4n)   { background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,0) 40%), #57341F; }
.nchip.on {
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0) 40%), var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}
.nchip:active { transform: translateY(1px); }

.srch-bar { display: flex; gap: 8px; margin-top: 12px; }
.srch-input {
  flex: 1; min-width: 0;
  background: var(--paper);
  border: 1.5px solid #9D8352;
  border-radius: 2px;
  padding: 10px 13px;
  font-family: var(--fm);
  font-size: 13px;
  color: var(--ink);
  outline: none;
  box-shadow: 0 3px 8px -3px rgba(0,0,0,.6);
}
.srch-input::placeholder { color: rgba(46,26,18,.55); }
.srch-input:focus { border-color: var(--accent); }
.srch-go {
  flex: none;
  font-family: var(--fm);
  font-size: 12.5px; font-weight: 800; letter-spacing: .06em;
  color: var(--paper);
  background: linear-gradient(180deg, #A9832F, #7C6123);
  border: 1px solid rgba(0,0,0,.35);
  border-radius: 3px;
  padding: 0 16px;
  box-shadow: 0 3px 0 #4A3A16, 0 6px 12px -4px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,235,200,.35);
  transition: transform .16s ease, box-shadow .16s ease;
}
.srch-go:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #4A3A16, inset 0 2px 5px rgba(0,0,0,.3);
}

/* ══════════════════════════════════════════════════════════════
   LOADING — date stamp wheel
   ══════════════════════════════════════════════════════════════ */
.loading-full {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
.loading-bar {
  width: 120px; height: 4px;
  border-radius: 2px;
  background: var(--panel-2);
  overflow: hidden;
  margin: 0 auto 12px;
}
.loading-bar::after {
  content: '';
  display: block; width: 40%; height: 100%;
  background: var(--accent);
  border-radius: 2px;
  animation: ldslide 1s infinite;
}
@keyframes ldslide { 0% { transform: translateX(-100%);} 100% { transform: translateX(350%);} }
.loading-txt {
  font-family: var(--fm);
  font-size: 11px; letter-spacing: .18em;
  color: var(--soft);
}

/* ══════════════════════════════════════════════════════════════
   s97 HERO — the open book on a lectern
   ══════════════════════════════════════════════════════════════ */
.open-book {
  display: flex; flex-wrap: wrap; position: relative;
  background: var(--paper);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(200,162,75,.16), transparent 55%),
    repeating-linear-gradient(180deg, transparent 0 26px, rgba(142, 47, 65,.08) 26px 27px);
  border-radius: 4px;
  box-shadow: 0 10px 26px rgba(0,0,0,.5), inset 0 0 0 1px rgba(46,26,18,.28);
  overflow: hidden;
  padding-bottom: 4px;
}
.open-book::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 0; height: 7px;
  background: linear-gradient(90deg, #6B1F30 0 12%, var(--wood) 12% 88%, #6B1F30 88% 100%);
  box-shadow: 0 2px 4px rgba(0,0,0,.35);
  z-index: 2;
}
.ob-spine {
  position: absolute; left: 55%; top: 7px; bottom: 0;
  width: 3px;
  background: linear-gradient(90deg, rgba(0,0,0,.26), rgba(0,0,0,.06));
}
.ob-left { flex: 1 1 55%; min-width: 0; padding: 22px 16px 12px 18px; text-align: left; }
.ob-k {
  display: block;
  font-family: var(--fm);
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent2);
}
.ob-title {
  display: block;
  font-family: Georgia, serif;
  font-size: 23px; font-weight: 700;
  color: var(--ink);
  margin-top: 6px;
  line-height: 1.18;
  overflow-wrap: break-word;
}
.ob-desc {
  display: block;
  font-size: 12.5px;
  color: #6B4A38;
  margin-top: 7px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.ob-meta { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.ob-meta em {
  font-style: normal;
  font-family: var(--fm);
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--paper);
  background: var(--accent2);
  padding: 3px 9px;
  border-radius: 2px;
}
.ob-stars { color: #A9812F; font-size: 13px; letter-spacing: 2px; }
.ob-stars i.off { opacity: .25; }
.ob-stars i { font-style: normal; }
.ob-right { flex: 0 0 40%; display: flex; align-items: center; justify-content: center; padding: 24px 16px 6px; position: relative; }
.ob-frame {
  display: block; width: 118px; height: 118px;
  border-radius: 3px;
  border: 4px solid #FBF6EA;
  box-shadow: 0 4px 12px rgba(46,26,18,.35), 0 0 0 1px rgba(46,26,18,.2);
  transform: rotate(2deg);
  overflow: hidden;
  background: var(--paper-deep);
}
.ob-frame img { width: 100%; height: 100%; object-fit: cover; }
.ob-tape {
  position: absolute; top: 16px; right: 8%;
  width: 44px; height: 14px;
  background: rgba(200, 162, 75,.55);
  transform: rotate(-4deg);
}
.ob-card {
  flex: 1 1 100%;
  margin: 4px 14px 12px;
  border: 1.5px dashed #9D8352;
  background: var(--paper-deep);
  font-family: var(--fm);
  font-size: 9.5px; letter-spacing: .14em;
  color: #6B4A38;
  text-align: center;
  padding: 6px;
  border-radius: 2px;
}
.ob-card b { color: var(--accent2); }

/* tk-div: the hanging borrower cards (kept, re-tinted) */
.tk-div { display: flex; gap: 16px; justify-content: center; padding: 4px 0 14px; }
.tk-div i {
  width: 46px; height: 30px;
  background: var(--paper);
  border-radius: 2px;
  position: relative;
  box-shadow: 0 4px 7px rgba(0,0,0,.45);
  transform: rotate(-2deg);
}
.tk-div i:nth-child(2n) { transform: rotate(2.4deg); background: var(--paper-deep); }
.tk-div i:nth-child(3) { transform: rotate(-1deg); }
.tk-div i::before {
  content: '';
  position: absolute; top: -5px; left: 50%;
  width: 5px; height: 5px; margin-left: -2.5px;
  border-radius: 50%;
  background: #8A6430;
  box-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.tk-div i::after {
  content: '';
  position: absolute; left: 5px; right: 5px; top: 7px; height: 1.4px;
  background: rgba(74,51,32,.4);
  box-shadow: 0 4.5px 0 rgba(74,51,32,.3);
}

/* ══════════════════════════════════════════════════════════════
   1) s97 BORROW DESK — counter rows, brass call numbers
   ══════════════════════════════════════════════════════════════ */
.s97-desk { display: flex; flex-direction: column; gap: 10px; position: relative; padding-bottom: 8px; }
.s97-desk::after {
  content: '';
  position: absolute; left: -4px; right: -4px; bottom: 0;
  height: 9px;
  background: linear-gradient(180deg, #6B442E, #3A2113);
  border-radius: 3px;
  box-shadow: 0 4px 8px -3px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,235,200,.14);
}
.s97-desk-row {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0) 22px), var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px 10px 10px 3px;
  padding: 10px 12px 10px 8px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.s97-desk-row:active { transform: scale(.985); }
.s97-desk-no {
  flex: none;
  width: 34px; text-align: center;
  font-family: var(--fm);
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  color: var(--ink);
  background: linear-gradient(180deg, #EBD08A, #BC9848);
  border: 1px solid rgba(0,0,0,.35);
  border-radius: 2px;
  padding: 4px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.5);
}
.s97-desk-row img {
  width: 52px; height: 52px;
  border-radius: 3px;
  flex: none;
  border: 1px solid rgba(200,162,75,.35);
  box-shadow: 2px 3px 6px rgba(0,0,0,.35);
}
.s97-desk-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.s97-desk-nm {
  font-weight: 700; font-size: 14.5px; color: var(--paper);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.s97-desk-ds { font-size: 12px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s97-desk-stamp {
  flex: none;
  font-family: var(--fm);
  font-size: 7.5px; font-weight: 700; letter-spacing: .18em;
  color: var(--accent);
  border: 1px solid rgba(200,162,75,.6);
  border-radius: 2px;
  padding: 2px 5px;
  transform: rotate(-4deg);
  opacity: .85;
}

/* ══════════════════════════════════════════════════════════════
   2) s97 INDEX DRAWERS — cabinet grid, pull opens the drawer
   ══════════════════════════════════════════════════════════════ */
.s97-drawers { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.s97-drawer {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 5px 12px -6px rgba(0,0,0,.55);
}
.s97-dr-face {
  display: flex; align-items: center; justify-content: space-between;
  height: 26px;
  padding: 0 9px;
  background: linear-gradient(180deg, #63412D 0 4px, #4A2E1E 4px 100%);
  border-bottom: 1px solid rgba(0,0,0,.45);
  box-shadow: inset 0 1px 0 rgba(255,235,200,.16);
}
.s97-dr-label {
  font-family: var(--fm);
  font-size: 9px; font-weight: 700; letter-spacing: .14em;
  color: #EBD08A;
}
.s97-dr-pull {
  width: 16px; height: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, #EBD08A, #9D7B3C);
  box-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.s97-dr-slot {
  display: block;
  padding: 9px 9px 0;
  background: #1C0B12;
  transition: padding .18s ease;
}
.s97-drawer:active .s97-dr-slot { padding-top: 18px; }
.s97-dr-slot img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(200,162,75,.2);
}
.s97-dr-nm {
  display: block;
  font-size: 11.5px; font-weight: 700;
  color: var(--paper);
  padding: 7px 8px 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ══════════════════════════════════════════════════════════════
   3) s97 RETURNS CART — rolling shelf bins on wire wheels
   ══════════════════════════════════════════════════════════════ */
.s97-cart {
  position: relative;
  display: flex; gap: 11px;
  overflow-x: auto;
  padding: 2px 2px 18px;
  scrollbar-width: none;
}
.s97-cart::-webkit-scrollbar { display: none; }
.s97-cart::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 7px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(200,162,75,.5) 6%, rgba(200,162,75,.5) 94%, transparent);
}
.s97-cart-wheel { position: absolute; right: 8px; bottom: 1px; display: flex; gap: 4px; }
.s97-cart-wheel i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #EBD08A, #6B4E22 75%);
  box-shadow: 0 1px 2px rgba(0,0,0,.7);
}
.s97-cart-slot { flex: none; width: 86px; text-align: center; }
.s97-cart-bin {
  display: block;
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1.5px solid var(--line);
  border-radius: 3px 3px 8px 8px;
  padding: 7px 6px 9px;
  box-shadow: inset 0 -6px 8px -6px rgba(0,0,0,.6);
}
.s97-cart-bin img {
  width: 70px; height: 70px;
  border-radius: 2px;
  margin: 0 auto;
  box-shadow: 0 0 0 1px rgba(242,232,213,.14);
}
.s97-cart-hit {
  position: absolute; top: 5px; right: 5px;
  font-family: var(--fm);
  font-size: 7.5px; font-weight: 700; letter-spacing: .12em;
  color: var(--paper);
  background: var(--accent2);
  border-radius: 2px;
  padding: 1px 4px;
}
.s97-cart-nm {
  display: block;
  font-size: 11.5px; font-weight: 700;
  color: var(--paper);
  margin-top: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ══════════════════════════════════════════════════════════════
   4) s97 OVERDUE SLIPS — date tags + renewal stamp
   ══════════════════════════════════════════════════════════════ */
.s97-overdue {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--paper);
  background-image: repeating-linear-gradient(180deg, transparent 0 25px, rgba(142, 47, 65,.1) 25px 26px);
  border-radius: 3px;
  padding: 8px;
  box-shadow: 0 8px 18px -8px rgba(0,0,0,.6), inset 0 0 0 1px rgba(46,26,18,.25);
  position: relative;
}
.s97-overdue::before {
  content: '';
  position: absolute; top: -4px; left: 50%;
  width: 64px; height: 9px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #6B442E, #3A2113);
  border-radius: 0 0 3px 3px;
  box-shadow: inset 0 -2px 3px rgba(0,0,0,.5);
  z-index: 2;
}
.s97-ov-row {
  display: flex; align-items: center; gap: 11px;
  background: rgba(255,255,255,.35);
  border: 1px solid rgba(46,26,18,.22);
  border-left: 4px solid var(--accent2);
  border-radius: 2px;
  padding: 8px 10px;
}
.s97-ov-due {
  flex: none;
  font-family: var(--fm);
  font-size: 9px; font-weight: 700; letter-spacing: .08em;
  color: var(--paper);
  background: var(--accent2);
  border-radius: 2px;
  padding: 3px 6px;
}
.s97-ov-row img { width: 48px; height: 48px; border-radius: 2px; flex: none; box-shadow: 1px 2px 4px rgba(46,26,18,.3); }
.s97-ov-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.s97-ov-nm {
  font-weight: 700; font-size: 13.5px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.s97-ov-ds { font-size: 11px; color: #7A5A44; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s97-ov-stamp {
  flex: none;
  font-family: var(--fm);
  font-size: 9px; font-weight: 800; letter-spacing: .22em;
  color: var(--accent2);
  border: 2px solid var(--accent2);
  border-radius: 3px;
  padding: 2px 7px;
  transform: rotate(-7deg);
  opacity: .8;
}

/* ══════════════════════════════════════════════════════════════
   5) s97 RARE VITRINE — glass case, velvet rest, brass plate
   ══════════════════════════════════════════════════════════════ */
.s97-rare {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0 16px;
  background:
    linear-gradient(180deg, rgba(107, 31, 48,.5), rgba(64, 32, 40,.65)),
    var(--panel);
  border: 3px solid transparent;
  border-image: linear-gradient(180deg, #D9BC72, #7C6123) 1;
  border-radius: 6px;
  padding: 16px 16px 30px;
  overflow: hidden;
  box-shadow: 0 14px 28px -12px rgba(0,0,0,.75);
}
.s97-rare-velvet {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 26px;
  background: linear-gradient(180deg, #5A1826, #772636 40%, #4A1420);
  box-shadow: inset 0 4px 8px -3px rgba(0,0,0,.55);
}
.s97-rare-pedestal {
  position: absolute; left: 26px; bottom: 24px;
  width: 92px; height: 8px;
  background: linear-gradient(180deg, #6B442E, #3A2113);
  border-radius: 2px;
  box-shadow: 0 4px 8px -2px rgba(0,0,0,.6);
}
.s97-rare-glass {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 0 34%, rgba(242,232,213,.14) 34% 38%, rgba(242,232,213,.05) 38% 52%, transparent 52%);
  pointer-events: none;
  z-index: 3;
}
.s97-rare-img {
  flex: 0 0 100px;
  width: 100px; height: 128px;
  object-fit: cover;
  border-radius: 3px;
  border: 3px solid #FBF6EA;
  box-shadow: 0 8px 16px -4px rgba(0,0,0,.65), 0 0 0 1px rgba(46,26,18,.35);
  margin-left: 12px;
  z-index: 2;
}
.s97-rare-txt { flex: 1; min-width: 0; padding: 2px 4px 10px 0; z-index: 2; }
.s97-rare-mark {
  display: block;
  font-family: var(--fh);
  font-size: 46px; line-height: .6;
  color: var(--accent);
  opacity: .5;
}
.s97-rare-quote {
  display: block;
  font-family: var(--fh);
  font-style: italic;
  font-size: 14.5px; line-height: 1.55;
  color: var(--paper);
  padding-left: 18px;
  margin-top: 6px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.s97-rare-by {
  display: flex; align-items: center; gap: 9px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1.5px dashed rgba(200,162,75,.4);
  padding-left: 18px;
}
.s97-rare-by b { font-size: 13px; color: var(--paper); }
.s97-rare-by i {
  font-style: normal;
  font-family: var(--fm);
  font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink);
  background: var(--accent);
  border-radius: 2px;
  padding: 2px 7px;
  margin-left: auto;
}
.s97-rare-plate {
  flex: 1 1 100%;
  position: absolute; left: 50%; bottom: 8px;
  transform: translateX(-50%);
  font-family: var(--fm);
  font-size: 8px; font-weight: 700; letter-spacing: .24em;
  color: #EBD08A;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(200,162,75,.4);
  border-radius: 2px;
  padding: 2px 10px;
  white-space: nowrap;
  z-index: 2;
}

/* ══════════════════════════════════════════════════════════════
   6) s97 BOOKMARK STRING — paper bookmarks hung on a cord
   ══════════════════════════════════════════════════════════════ */
.s97-marks {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px 8px;
  padding: 16px 4px 6px;
}
.s97-marks-cord {
  position: absolute; left: -6px; right: -6px; top: 4px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0 2%, rgba(235,208,138,.75) 2% 98%, transparent 98%);
  box-shadow: 0 1px 0 rgba(0,0,0,.4);
}
.s97-marks-cord::after {
  content: '';
  position: absolute; left: 0; right: 0; top: 0;
  height: 30px;
  background: radial-gradient(60% 100% at 50% 0, rgba(200,162,75,.1), transparent 75%);
}
.s97-mark {
  position: relative;
  text-align: center;
  clip-path: polygon(0 0, 100% 0, 100% 88%, 50% 100%, 0 88%);
  padding: 10px 5px 16px;
  animation: s97sway 3.2s ease-in-out infinite alternate;
  transform-origin: 50% -6px;
}
.s97-mark:nth-child(odd) { animation-delay: .4s; }
@keyframes s97sway { from { transform: rotate(-1.4deg);} to { transform: rotate(1.4deg);} }
.s97-mark-hole {
  position: absolute; top: 3px; left: 50%;
  width: 7px; height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.8);
  z-index: 2;
}
.s97-mark.s97-mk-0 { background: var(--paper); }
.s97-mark.s97-mk-1 { background: var(--paper-deep); }
.s97-mark.s97-mk-2 { background: #EAD9B8; }
.s97-mark-face { display: block; padding: 8px 6px 0; }
.s97-mark-face img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 3px 6px rgba(0,0,0,.35);
}
.s97-mark-nm {
  display: block;
  font-family: var(--fm);
  font-size: 9.5px; font-weight: 700;
  color: var(--ink);
  padding: 5px 2px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ══════════════════════════════════════════════════════════════
   7) s97 READING DUEL — two volumes face off across the table
   ══════════════════════════════════════════════════════════════ */
.s97-duel {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  padding-top: 6px;
}
.s97-duel-book {
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 10px 12px;
  overflow: hidden;
  transition: transform .18s ease;
}
.s97-duel-l { transform: rotate(-1deg); border-right: 4px solid var(--accent2); }
.s97-duel-r { transform: rotate(1deg); border-left: 4px solid var(--accent); }
.s97-db-shelf {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 8px;
  background: linear-gradient(180deg, #6B442E, #3A2113);
}
.s97-db-face { display: block; padding: 0 4px; }
.s97-db-face img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 3px;
  border: 3px solid #FBF6EA;
  box-shadow: 0 5px 12px -3px rgba(0,0,0,.55);
}
.s97-db-b { display: block; padding: 10px 4px 14px; }
.s97-db-b b {
  display: block;
  font-size: 13.5px; color: var(--paper);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.s97-db-b span {
  display: block;
  font-size: 11px; color: var(--soft);
  margin-top: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.s97-db-b em {
  display: inline-block;
  font-style: normal;
  font-size: 9.5px;
  color: var(--accent);
  border: 1px solid rgba(200,162,75,.5);
  border-radius: 2px;
  padding: 1px 7px;
  margin-top: 7px;
}
.s97-duel-vs {
  position: absolute; left: 50%; top: 42%;
  transform: translate(-50%, -50%) rotate(-8deg);
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fh);
  font-size: 15px; font-weight: 800;
  color: var(--paper);
  background: radial-gradient(circle at 32% 28%, #A9832F, #5E4718 78%);
  border: 2px solid rgba(242,232,213,.6);
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,.6);
  z-index: 2;
}

/* ══════════════════════════════════════════════════════════════
   8) s97 SUBJECT SHELF TAGS — call-number shelf guides
   ══════════════════════════════════════════════════════════════ */
.s97-tags { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.s97-tag {
  display: flex; align-items: center; gap: 10px;
  background: var(--paper);
  border-radius: 2px 2px 6px 6px;
  padding: 11px 12px 11px 10px;
  box-shadow: 0 5px 12px -5px rgba(0,0,0,.65), inset 0 0 0 1px rgba(46,26,18,.22);
  border-top: 4px solid var(--wood);
  position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
}
.s97-tag::before {
  content: '';
  position: absolute; left: 8px; right: 8px; top: -9px;
  height: 6px;
  background: linear-gradient(180deg, #6B442E, #3A2113);
  border-radius: 2px;
  box-shadow: 0 2px 3px rgba(0,0,0,.5);
}
.s97-tag-call {
  flex: none;
  font-family: var(--fm);
  font-size: 11px; font-weight: 800;
  color: var(--paper);
  background: var(--accent2);
  border-radius: 2px;
  padding: 4px 7px;
  letter-spacing: .06em;
}
.s97-tag-b { min-width: 0; }
.s97-tag-b b { display: block; font-size: 13.5px; color: var(--ink); font-family: Georgia, serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s97-tag-b i { font-style: normal; font-family: var(--fm); font-size: 10px; color: #7A5A44; }
.s97-tag:active { transform: translateY(1px); }

/* ══════════════════════════════════════════════════════════════
   9) s97 CARD CATALOG BOX — the archive cabinet
   ══════════════════════════════════════════════════════════════ */
.s97-box {
  position: relative;
  background: linear-gradient(180deg, rgba(36,16,25,.5), rgba(36,16,25,.35));
  border: 1.5px solid var(--line);
  border-radius: 6px;
  padding: 0 10px 12px;
}
.s97-box-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 -10px 14px;
  padding: 8px 14px 9px;
  background: linear-gradient(180deg, #63412D 0 4px, #4A2E1E 4px 100%);
  border-bottom: 2px solid rgba(0,0,0,.5);
  border-radius: 5px 5px 0 0;
  box-shadow: inset 0 1px 0 rgba(255,235,200,.16), 0 3px 8px -3px rgba(0,0,0,.6);
}
.s97-box-top b {
  font-family: var(--fm);
  font-size: 10px; font-weight: 700; letter-spacing: .24em;
  color: #EBD08A;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.s97-box-n {
  font-family: var(--fm);
  font-size: 9px; letter-spacing: .12em;
  color: rgba(235,208,138,.8);
  white-space: nowrap;
}
.s97-box-pull {
  flex: none;
  width: 22px; height: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, #EBD08A, #9D7B3C);
  box-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.arc-list { display: flex; flex-direction: column; gap: 9px; }
.arc.s97-card {
  display: flex; align-items: center; gap: 11px;
  background: var(--paper);
  background-image: repeating-linear-gradient(90deg, transparent 0 42px, rgba(142, 47, 65,.06) 42px 43px);
  border-radius: 2px;
  padding: 9px 12px 9px 10px;
  box-shadow: inset 0 0 0 1px rgba(46,26,18,.22), 0 3px 7px -3px rgba(0,0,0,.5);
  position: relative;
}
.arc.s97-card::before {
  content: '';
  position: absolute; left: 8px; top: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.75);
  opacity: .55;
}
.arc.s97-card .arc-code {
  font-family: var(--fm);
  font-size: 10.5px; font-weight: 700;
  color: var(--accent2);
  width: 32px; flex: none;
  padding-left: 10px;
}
.arc.s97-card img { width: 44px; height: 44px; border-radius: 2px; flex: none; box-shadow: 1px 2px 4px rgba(46,26,18,.3); }
.arc.s97-card .arc-b { flex: 1; min-width: 0; }
.arc.s97-card .arc-nm { display: block; font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arc.s97-card .arc-ds { display: block; font-size: 11px; color: #7A5A44; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arc.s97-card .arc-tag {
  flex: none;
  font-style: normal;
  font-size: 9px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent2);
  border: 1px solid rgba(142,47,65,.55);
  border-radius: 2px;
  padding: 2px 6px;
}

/* ══════════════════════════════════════════════════════════════
   FILTER VIEW + EMPTY
   ══════════════════════════════════════════════════════════════ */
.filter-hd { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.filter-back {
  flex: none;
  font-family: var(--fm);
  font-size: 12.5px; font-weight: 700;
  color: var(--paper);
  background: linear-gradient(180deg, #A9832F, #7C6123);
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,.35);
  padding: 7px 12px;
  box-shadow: 0 3px 0 #4A3A16, inset 0 1px 0 rgba(255,235,200,.3);
}
.filter-back:active { transform: translateY(2px); box-shadow: 0 1px 0 #4A3A16; }
.filter-title {
  flex: 1; min-width: 0;
  font-family: var(--fh);
  font-style: italic;
  font-size: 17px; font-weight: 700;
  color: var(--paper);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.filter-cnt {
  flex: none;
  font-family: var(--fm);
  font-size: 11px;
  color: var(--ink);
  background: var(--accent);
  border-radius: 2px;
  padding: 3px 8px;
}
.empty-space { text-align: center; padding: 40px 0 26px; }
.s97-empty-shelf { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.s97-empty-shelf i {
  width: 120px; height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #6B442E, #4A2E1E);
  box-shadow: 0 3px 4px -2px rgba(0,0,0,.6);
}
.s97-empty-shelf i:nth-child(2) { width: 100px; }
.s97-empty-shelf i:nth-child(3) { width: 70px; }
.empty-space span { display: block; margin-top: 16px; font-family: var(--fm); font-size: 11px; letter-spacing: .14em; color: var(--soft); }
.more-wrap { text-align: center; margin-top: 15px; }
.more-btn {
  font-family: var(--fm);
  font-size: 12.5px; font-weight: 700;
  color: var(--paper);
  background: linear-gradient(180deg, #A9832F, #7C6123);
  border: 1px solid rgba(0,0,0,.35);
  border-radius: 3px;
  padding: 10px 22px;
  box-shadow: 0 3px 0 #4A3A16, 0 7px 14px -4px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,235,200,.3);
  transition: transform .16s ease;
}
.more-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #4A3A16; }

/* ══════════════════════════════════════════════════════════════
   s97 FOOTER — date-due stamp band
   ══════════════════════════════════════════════════════════════ */
.foot {
  margin-top: 44px;
  padding: 22px 0 30px;
  text-align: center;
  border-top: 3px double rgba(200, 162, 75,.4);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.2));
}
.s97-dueband {
  display: flex; gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 18px 20px;
}
.s97-dueband i {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-family: var(--fm);
  border: 1.5px solid rgba(142, 47, 65,.7);
  border-radius: 3px;
  padding: 5px 9px;
  transform: rotate(-3deg);
  color: var(--accent2);
  opacity: .75;
}
.s97-dueband i:nth-child(2n) { transform: rotate(2.5deg); color: rgba(200,162,75,.8); border-color: rgba(200,162,75,.6); }
.s97-dueband i b { font-size: 7.5px; letter-spacing: .2em; }
.s97-dueband i span { font-size: 10px; font-weight: 700; }
.foot-name {
  font-family: var(--fh);
  font-size: 16px; font-weight: 700; letter-spacing: .08em;
  color: var(--accent);
}
.foot-links { display: flex; justify-content: center; gap: 22px; margin-top: 12px; }
.foot-links a { display: inline; font-size: 12.5px; color: var(--soft); text-decoration: underline; }
.foot-fine { margin-top: 12px; font-family: var(--fm); font-size: 10px; letter-spacing: .14em; color: var(--soft); opacity: .75; }

/* totop — brass bookend button */
.totop-btn {
  position: fixed;
  right: 16px; bottom: 24px;
  z-index: 60;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700;
  color: var(--paper);
  background: linear-gradient(180deg, #A9832F, #7C6123);
  border: 1px solid rgba(0,0,0,.4);
  border-radius: 3px;
  box-shadow: 0 3px 0 #4A3A16, 0 8px 16px -4px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,235,200,.35);
}
.totop-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #4A3A16; }

/* ══════════════════════════════════════════════════════════════
   narrow screens — keep decorative overhangs inside the viewport
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 660px) {
  .sec::after { left: 0; right: 0; }
  .s97-marks { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px 6px; }
  .s97-rare-img { flex: 0 0 84px; width: 84px; height: 108px; margin-left: 6px; }
  .s97-rare-quote { font-size: 13px; }
  .s97-duel-vs { top: 38%; }
  .s97-dueband i:nth-child(n+5) { display: none; }
  .s97-cab-plate { letter-spacing: .18em; }
}
