@font-face {
  font-family: 'Amiri';
  src: url('/museum/assets/fonts/Amiri-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Quintessential';
  src: url('/museum/assets/fonts/Quintessential-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Bahrain Museum Ruqaa';
  src: url('/museum/assets/fonts/BahrainMuseumRuqaa-Regular.ttf?v=1.008-context1') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'Bahrain Museum Ruqaa';
  src: url('/museum/assets/fonts/BahrainMuseumRuqaa-Bold.ttf?v=1.008-context1') format('truetype');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
/*
 * The book has one textured cloth cover around separate paper layers.
 * Specimen mounts are nine-sliced: corners keep a physical size while the
 * intervening edge strips extend. Independently positioned grain and faded
 * dirt overlays texture the page and card centres.
 */
:root {
  --english-type-scale: .86;
  --table-background-color: #d8d2c7;
  --table-background-image: linear-gradient(#e9e6ddbc, #dfdbcfb0), var(--paper-texture);
}
body { background-color: var(--table-background-color); background-image: var(--table-background-image); font-family: 'Quintessential', Georgia, serif; font-size: calc(16px * var(--english-type-scale)); }
#museum-app { font-family: 'Quintessential', Georgia, serif; }
#museum-app .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
#museum-app .museum-product { --book-reflection: 1; --book-angle: 90deg; }
#museum-app .museum-product[dir='rtl'] { --book-reflection: -1; --book-angle: 270deg; }
#museum-app .bound-volume { border-radius: 3px; padding: 24px 22px 29px 36px; }
#museum-app .bound-volume::before { inset-inline-start: 18px; width: 9px; }
#museum-app .volume-interior { grid-template-columns: minmax(0, 1fr) 45px; z-index: 1; }
#museum-app .catalogue-leaf {
  padding: 16px 23px 17px 27px;
  min-height: 830px;
  background-image:
    linear-gradient(var(--book-angle), #755d383b 0, #b9a17810 15px, #fff8e937 25px, transparent 55px),
    linear-gradient(#faf4e565, #faf4e54d),
    var(--paper-texture);
  background-size: 100% 100%, 100% 100%, 980px 980px;
}
#museum-app .catalogue-leaf::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/museum/assets/paper-grit.svg'), var(--paper-texture);
  background-size: 100% 100%, 710px 1067px;
  background-position: center, 137px -171px;
  opacity: .19;
  mask-image: radial-gradient(ellipse at 46% 48%, transparent 25%, #0008 75%, #000 100%);
  pointer-events: none;
  scale: var(--book-reflection) 1;
}
#museum-app .catalogue-leaf > :not(.sector-index) { position: relative; z-index: 1; }
#museum-app .masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px 0 15px;
  text-align: start;
  border-bottom: 1px solid #80745f83;
}
#museum-app .museum-identity { display: flex; align-items: center; gap: 17px; min-width: 0; }
#museum-app .museum-name { min-width: 0; width: max-content; max-width: 100%; display: flex; flex-direction: column; gap: 0; }
#museum-app h1 {
  font: 700 27px/1.12 'Quintessential', Georgia, serif;
  text-wrap: balance;
  color: #4b2e20;
  text-shadow: 0 1px 0 #fff2d670;
  text-align: match-parent;
}
#museum-app .arabic-title {
  text-align: match-parent;
  font: 700 40px/1.25 'Bahrain Museum Ruqaa', serif;
  color: #4b2e20;
  margin: 0;
  letter-spacing: normal;
  font-synthesis: none;
}
#museum-app .museum-mark {
  position: relative;
  width: 74px;
  height: 82px;
  flex: 0 0 74px;
}
#museum-app .museum-mark span {
  position: absolute;
  width: 44px;
  height: 58px;
  background-color: #943832;
  background-image: linear-gradient(#8f2921cf, #8f2921cf), var(--paper-texture);
  background-size: 100% 100%, 170px 170px;
  background-blend-mode: multiply, normal;
  clip-path: polygon(0 0, 100% 0, 100% 83%, 0 100%);
}
#museum-app .museum-mark span:first-child { top: 3px; left: 2px; }
#museum-app .museum-mark span:nth-child(2) { top: 12px; left: 13px; border: 2px solid #e9dec9; }
#museum-app .museum-mark span:nth-child(3) { top: 25px; left: 29px; transform: rotate(-3deg); }
#museum-app .museum-intro { margin: 0; font: italic 13px/1.45 'Quintessential', Georgia, serif; color: #3f382c; }
#museum-app .masthead-top { border: 0; padding: 0; justify-content: end; gap: 8px; font-size: 12px; flex-wrap: wrap; }
#museum-app .collection-link { color: #783630; font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }
#museum-app .text-control { font-family: 'Quintessential', Georgia, serif; color: #783630; }
#museum-app :is(a, .text-control):lang(ar) { text-underline-offset: .3em; }
#museum-app .primary-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 8px 0;
  gap: 5px 0;
  border-bottom: 1px solid #80745f83;
  font-size: 15px;
}
#museum-app .primary-links a { padding: 0 18px; text-underline-offset: 2px; color: #71322e; }
#museum-app .primary-links a + a { border-inline-start: 1px solid #826e51; }
#museum-app .primary-links a[aria-current='page'] { text-decoration-thickness: 1.5px; }
#museum-app .catalogue-spread { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 22px; }
#museum-app .printed-index { border-inline-end: 1px solid #8170577a; padding: 13px 17px 16px 0; font-size: 14px; }
#museum-app .printed-index a { display: block; padding-block: 2px; color: #70342f; text-underline-offset: 2px; }
#museum-app .index-title { font-size: 16px; font-style: italic; margin: 7px 0 2px; }
#museum-app .index-section { margin-top: 16px; padding-top: 13px; border-top: 1px solid #81705773; }
#museum-app .index-section h2 { font: 700 14px/1.3 'Quintessential', Georgia, serif; margin-bottom: 5px; color: #342d22; }
#museum-app .index-flourish { text-align: center; font-size: 18px; color: #98574d; }
#museum-app .index-note { padding-top: 14px; margin-top: 18px; border-top: 1px solid #81705773; font: italic 13px/1.3 'Quintessential', Georgia, serif; }
#museum-app .collection-content { min-width: 0; padding-top: 14px; }
#museum-app .collection-heading { margin: 0; padding: 0; border: 0; flex-wrap: wrap; gap: 4px; }
#museum-app .collection-heading h2 { font: 700 28px/1.15 'Quintessential', Georgia, serif; color: #28241b; }
#museum-app .collection-subtitle { margin: 3px 0 0; font: 16px/1.3 'Quintessential', Georgia, serif; }
#museum-app .catalogue-controls { margin-top: 0; gap: 15px; grid-template-columns: minmax(0, 1fr) 135px; }
#museum-app .era-field { display: block; }
#museum-app .field-label { font-size: 12px; }
#museum-app .quick-era-links { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 10px 0 15px; font-size: 13px; }
#museum-app .quick-era-links a { color: #71322e; text-underline-offset: 2px; }
#museum-app .specimen-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px 16px; margin-top: 22px; }
#museum-app .specimen-link {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
  background-color: #f1e8d5;
  background-image: linear-gradient(#fff9ed5c, #fff9ed5c), var(--paper-texture);
  background-position: center, var(--paper-offset-x, 0) var(--paper-offset-y, 0);
  background-size: 100% 100%, 620px 930px;
  border: 1px solid #c2af918c;
  box-shadow: 1px 2px 3px #6b554238;
}
#museum-app .specimen-link::after {
  content: '';
  position: absolute;
  inset: -3px;
  pointer-events: none;
  border: 19px solid transparent;
  border-image: url('/api/museum/static/decor-specimen-mount-frame.0c9850e41cdc06b9.webp') 16% / 19px / 0 stretch;
  z-index: 2;
  scale: var(--book-reflection) 1;
}
#museum-app .specimen:nth-child(3n)::after { transform: rotate(.2deg); opacity: .96; }
#museum-app .specimen:nth-child(3n + 1)::after { transform: rotate(-.15deg); }
#museum-app .specimen-mount {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 1.6;
  padding: 5px 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
#museum-app .specimen-mount::before, #museum-app .specimen-mount::after { display: none; }
#museum-app .specimen-link:hover .specimen-mount { box-shadow: none; }
#museum-app .specimen-caption { position: relative; z-index: 1; margin-top: 10px; font-family: 'Quintessential', Georgia, serif; overflow-wrap: break-word; text-align: center; }
#museum-app .specimen-name { font-size: 13px; color: #786651; }
#museum-app .specimen-date { font-size: 12px; margin-top: 2px; color: #998771; }
#museum-app .mark-word { font-size: 36px; }
#museum-app .mark-note { font-size: 8px; }
/* Side tabs sit beneath both offset paper layers at their attached edge. */
#museum-app .sector-index { width: 43px; inset-inline-end: -49px; top: 145px; gap: 6px; z-index: -3; }
#museum-app .sector-tab {
  position: relative;
  width: 43px;
  height: 78px;
  min-height: 78px;
  padding: 6px 5px;
  border-radius: 0 5px 6px 0;
  writing-mode: vertical-rl;
  justify-content: center;
  font-size: 14px;
}
#museum-app .sector-tab > span { display: none; }
#museum-app .sector-tab::before { content: attr(data-tab-label); }
#museum-app .catalogue-footer { margin-top: 19px; padding-top: 10px; border-top: 1px solid #80745f83; font-size: 11px; }
#museum-app .about-view { font: 17px/1.6 'Quintessential', Georgia, serif; padding-top: 7px; }
#museum-app .about-view h2 { font-size: 28px; font-weight: 700; color: #30251e; }
#museum-app .record-view { padding-top: 0; }
#museum-app .record-mount { align-self: start; padding: 25px 22px; }
#museum-app .record-mount .specimen-mount { aspect-ratio: 1; }
#museum-app .record-return { margin-bottom: 15px; }
#museum-app [dir='rtl'] .bound-volume { padding: 24px 36px 29px 22px; }
#museum-app [dir='rtl'] .catalogue-leaf { padding: 16px 27px 17px 23px; }
#museum-app [dir='rtl'] .printed-index { padding: 13px 0 16px 17px; }
#museum-app [dir='rtl'] .museum-mark { direction: ltr; }
@media (max-width: 980px) {
  #museum-app .masthead { grid-template-columns: minmax(0, 1fr) auto; }
  #museum-app .museum-intro { display: none; }
  #museum-app h1 { font-size: 25px; }
  #museum-app .arabic-title { font-size: 38px; }
  #museum-app .volume-interior { grid-template-columns: minmax(0, 1fr) 45px; }
  #museum-app .sector-index { inset-inline-end: -49px; width: 43px; }
  #museum-app .catalogue-spread { grid-template-columns: 114px minmax(0, 1fr); gap: 17px; }
  #museum-app .specimen-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 750px) {
  #museum-app .printed-index { display: none; }
  #museum-app .catalogue-spread { grid-template-columns: minmax(0, 1fr); }
  #museum-app .catalogue-controls { grid-template-columns: minmax(0, 1fr) 125px; }
  #museum-app .museum-mark { width: 58px; height: 65px; flex-basis: 58px; transform: scale(.78); transform-origin: left center; margin-inline-end: -12px; }
  #museum-app .museum-identity { gap: 9px; }
  #museum-app h1 { font-size: 24px; }
  #museum-app .arabic-title { font-size: 36px; }
  #museum-app .primary-links a { padding-inline: 11px; }
}
@media (max-width: 650px) {
  #museum-app .bound-volume, #museum-app [dir='rtl'] .bound-volume { padding-block: 21px 25px; padding-inline: 23px 17px; }
  #museum-app .bound-volume::before { inset-inline-start: 11px; }
  #museum-app .volume-interior { display: block; }
  #museum-app .catalogue-leaf, #museum-app [dir='rtl'] .catalogue-leaf { padding-block: 8px 13px; padding-inline: 17px 15px; min-height: 0; }
  #museum-app .masthead { grid-template-columns: minmax(0, 1fr); gap: 7px; padding-block: 18px 13px; }
  #museum-app .museum-intro { display: block; text-align: center; font-size: 13px; }
  #museum-app .masthead-top { justify-content: center; }
  #museum-app .sector-index { position: static; width: 100%; writing-mode: horizontal-tb; margin-top: 11px; gap: 5px; z-index: 2; }
  #museum-app .sector-tab, #museum-app [dir='rtl'] .sector-tab { width: auto; height: auto; min-height: 44px; writing-mode: horizontal-tb; padding: 9px 8px; flex-basis: 26%; font-size: 12px; }
  #museum-app .sector-tab:first-child { flex-basis: 100%; }
  #museum-app .sector-tab > span { display: inline; }
  #museum-app .sector-tab::before { display: none; }
  #museum-app .tab-count { margin-inline-start: 5px; }
  #museum-app .collection-content { padding-top: 19px; }
  #museum-app .specimen-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 13px; }
  #museum-app .collection-heading h2 { font-size: 25px; }
  #museum-app .collection-subtitle { font-size: 14px; }
  #museum-app .primary-links { font-size: 14px; }
  #museum-app .primary-links a { min-height: 34px; padding: 6px 9px; }
}
@media (max-width: 460px) {
  #museum-app .catalogue-controls { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  #museum-app .era-field { grid-template-columns: 42px minmax(0, 1fr); }
  #museum-app .museum-identity { gap: 7px; }
  #museum-app h1 { font-size: 22px; }
  #museum-app .museum-mark { width: 58px; flex-basis: 58px; }
  #museum-app .primary-links a { flex-basis: 50%; text-align: center; }
  #museum-app .primary-links a:nth-child(3) { border-inline-start: 0; }
  #museum-app .sector-tab { flex-basis: 43%; font-size: 12px; }
  #museum-app .specimen-link { padding: 22px 20px; }
  #museum-app .specimen-mount { aspect-ratio: 1.35; padding: 4px 1px; }
  #museum-app .mark-word { font-size: 30px; }
  #museum-app .seal .mark-word { width: 58px; height: 58px; font-size: 23px; }
  #museum-app .specimen-date { font-size: 11px; }
  #museum-app .specimen-name { font-size: 12px; }
  #museum-app .quick-era-links { justify-content: space-between; gap: 6px; padding-bottom: 13px; }
  #museum-app .record-layout { grid-template-columns: minmax(0, 1fr); }
}
/* Phone browsing: a single row of actual sector tabs leaves room for specimens. */
@media (max-width: 650px) {
  #museum-app .sector-index {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: #a68a66 #d6c5a6;
    gap: 5px;
    margin-top: 11px;
    padding: 3px 2px 6px;
  }
  #museum-app .sector-tab, #museum-app .sector-tab:first-child {
    flex: 0 0 auto;
    width: auto;
    min-width: 105px;
    max-width: 190px;
    min-height: 44px;
    padding-inline: 12px;
    white-space: nowrap;
  }
  #museum-app .sector-tab .tab-count { display: none; }
  #museum-app .primary-links { flex-wrap: nowrap; padding-block: 2px; }
  #museum-app .primary-links a {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    padding: 6px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 13px;
  }
  #museum-app .primary-links a:nth-child(3) { border-inline-start: 1px solid #826e51; }
  #museum-app .primary-links a[data-view='az'] { font-size: 0; }
  #museum-app .primary-links a[data-view='az']::before { content: 'A–Z'; font-size: 13px; text-decoration: underline; }
  #museum-app [dir='rtl'] .primary-links a[data-view='az']::before { content: 'أ–ي'; }
  #museum-app .quick-era-links { display: none; }
  #museum-app .specimen-grid { margin-top: 18px; }
  #museum-app .masthead-top { min-height: 28px; }
  #museum-app .masthead-top .text-control { min-height: 44px; }
}

#museum-app [lang='ar'] {
  font-family: 'Bahrain Museum Ruqaa', 'Quintessential', Georgia, serif;
}
#museum-app [lang='ar'] :is(.museum-intro, .text-control, .index-section h2, .index-note, .collection-heading h2, .collection-subtitle, .specimen-caption, .about-view) {
  font-family: 'Bahrain Museum Ruqaa', 'Quintessential', Georgia, serif;
}
#museum-app [lang='ar'] :is(.museum-intro, .collection-subtitle, .index-note, .specimen-caption) { line-height: 1.7; }
#museum-app [lang='ar'] .collection-heading h2 { line-height: 1.5; }
#museum-app [lang='ar'] :is(.field-label, .sector-tab) { font-size: 14px; line-height: 1.6; }
#museum-app [lang='ar'] :is(.museum-intro, .index-note, .specimen-date) { font-style: normal; }
#museum-app [lang='ar'] .primary-links a:not([data-view='az']) { font-size: 15px; line-height: 1.7; }
#museum-app [lang='ar'] .primary-links a[data-view='az']::before { font-size: 15px; }
#museum-app [dir='rtl'] .primary-links a[data-view='az']::before { white-space: nowrap; }

/* Ruqaa needs a larger body and breathing room for its rising strokes. */
#museum-app [lang='ar'] .museum-intro { font-size: 17px; line-height: 1.75; }
#museum-app .masthead-top .text-control[lang='ar'] { font-size: 18px; line-height: 1.65; }
#museum-app [lang='ar'] .collection-subtitle { font-size: 18px; line-height: 1.75; }
#museum-app [lang='ar'] .collection-heading h2 { font-size: 32px; line-height: 1.6; }
#museum-app [lang='ar'] :is(.field-label, .sector-tab, .record-return) { font-size: 17px; line-height: 1.65; }
#museum-app [lang='ar'] :is(input, select, .search-button) { font-size: 20px; line-height: 1.65; min-height: 49px; height: auto; }
#museum-app [lang='ar'] .specimen-name { font-size: 14px; line-height: 1.65; }
#museum-app [lang='ar'] .specimen-date { font-size: 12px; line-height: 1.6; }
#museum-app [lang='ar'] .about-view { font-size: 20px; line-height: 1.8; }
#museum-app [lang='ar'] .empty-state { font-size: 18px; line-height: 1.7; font-style: normal; }
#museum-app [lang='ar'] .primary-links a:not([data-view='az']) { font-size: 18px; line-height: 1.75; }
#museum-app [lang='ar'] .primary-links a[data-view='az']::before { font-size: 18px; }

@media (max-width: 650px) {
  #museum-app .museum-identity { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
  #museum-app .museum-name { display: flex; margin-inline: auto; }
  #museum-app .arabic-title { grid-column: 1 / -1; grid-row: 1; text-align: center; font-size: clamp(30px, 9.3cqw, 36px); line-height: 1.25; }
  #museum-app .museum-mark { grid-column: 1; grid-row: 2; margin: 0; transform: scale(.7); transform-origin: center; }
  #museum-app h1 { grid-column: 1; grid-row: 2; font-size: 21px; line-height: 1.15; text-align: center; }
  #museum-app [lang='ar'] .primary-links a:not([data-view='az']) { font-size: 17px; }
  #museum-app [lang='ar'] .primary-links a[data-view='az']::before { font-size: 17px; }
}

#museum-app .catalogue-spread { grid-template-columns: minmax(0, 1fr); gap: 0; }

/* Separate the shaded recess, darker inner outline and light-catching outer rim. */
#museum-app .catalogue-controls { grid-template-columns: minmax(0, 1fr) 180px; align-items: start; }
#museum-app .recessed-field {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  padding: 6px;
  border: 1px solid transparent;
  border-bottom-width: 2px;
  border-radius: 9px;
  background-color: #d0c2a8;
  /* One gradient paints the whole rounded rim, avoiding per-side border joins. */
  background-image:
    linear-gradient(#d3c7afb8, #ddcfb5d1),
    var(--paper-texture),
    linear-gradient(180deg, #b4a58d 0%, #b4a58d 45%, #d7cbb1 72%, #fff7de 92%);
  background-size: 100% 100%, 640px 960px, 100% 100%;
  background-position: center, -81px -149px, center;
  background-origin: padding-box, padding-box, border-box;
  background-clip: padding-box, padding-box, border-box;
  box-shadow: inset 0 2px 3px #66553c7f, inset 0 -2px 2px #77633f26;
}
#museum-app .recessed-field::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 0;
  border-radius: 6px;
  background-color: #f4efdf;
  background-image: linear-gradient(#f9f4e7d4, #f4efdfd9), var(--paper-texture);
  background-size: 100% 100%, 570px 855px;
  background-position: center, 143px -217px;
  /* A painted hairline stays half a pixel wide without CSS border rounding. */
  box-shadow: inset 0 0 0 .5px #958a75, inset 0 2px 4px #65563d55, inset 0 -1px 1px #fff9e9b8;
  pointer-events: none;
}
#museum-app .recessed-field:focus-within { outline: 2px solid #8a5649; outline-offset: 3px; }
#museum-app .recessed-field :is(input, select, .search-button, .search-clear, .era-trigger) {
  position: relative;
  z-index: 1;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding-block: 8px;
  border: 0;
  border-radius: 6px;
  color: #50493c;
  background: none;
  box-shadow: none;
  outline: none;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
}
#museum-app .recessed-field input { flex: 1 1 0; width: 0; padding-inline: 4px 6px; }
#museum-app .recessed-field input::placeholder { color: #898374; opacity: .8; font-style: normal; }
#museum-app .recessed-field .search-button {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  min-width: 34px;
  padding: 6px;
  cursor: pointer;
}
#museum-app .recessed-field .search-button:hover { color: #4b2e20; }
#museum-app .recessed-field .search-button:active { translate: 0 1px; }
#museum-app .filter-row { background-position: center, 217px -53px, center; }
#museum-app .filter-row::before { background-position: center, -67px 191px; }
#museum-app .filter-row .era-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  padding-inline: 14px 42px;
  text-align: start;
  cursor: pointer;
}
#museum-app .recessed-field #museum-era {
  color: #79543a;
  -webkit-text-fill-color: #79543a;
}
#museum-app .era-field { position: relative; min-width: 0; }
#museum-app .filter-row:focus-within:not(:has(:focus-visible)) { outline: none; }
#museum-app .era-menu {
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  width: max(100%, 220px);
  max-height: min(440px, var(--era-menu-space, 50vh));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid #b9a485;
  border-radius: 5px;
  color: #79543a;
  background-color: #f1e8d5;
  background-image: linear-gradient(#fff9edb3, #f3e8d4c7), var(--paper-texture);
  background-size: 100% 100%, 530px 795px;
  background-position: center, 109px -237px;
  box-shadow: inset 0 1px 0 #fff7de, inset 0 -1px 0 #c7b28c88, 0 5px 10px #5b43293d;
  scrollbar-width: thin;
  scrollbar-color: #a68a66 #f1e8d5;
}
#museum-app .era-menu[data-side='above'] { top: auto; bottom: calc(100% + 8px); }
#museum-app .era-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 4px 14px 7px;
  border-radius: 2px;
  cursor: pointer;
  font: calc(18px * var(--english-type-scale))/1.45 'Quintessential', Georgia, serif;
}
#museum-app .era-option[data-era='all'] { border-bottom: 1px solid #b3a07c66; margin-bottom: 5px; }
#museum-app .era-option[data-era='unknown'] { border-top: 1px solid #b3a07c66; margin-top: 5px; }
#museum-app .era-option:hover, #museum-app .era-option[data-active='true'] { background: #b49b6c26; }
#museum-app .era-option:focus-visible { outline: 1px solid #8a5649; outline-offset: -1px; }
#museum-app .era-check {
  flex: 0 0 15px;
  visibility: hidden;
  fill: none;
  stroke: #8d4c3c;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#museum-app .era-option[aria-selected='true'] .era-check { visibility: visible; }
#museum-app [lang='ar'] .era-option { font: 19px/1.45 'Bahrain Museum Ruqaa', serif; padding-block: 3px 7px; }
#museum-app .filter-chevron {
  position: absolute;
  z-index: 1;
  inset-inline-end: 20px;
  top: 50%;
  translate: 0 -50%;
  color: #79543a;
  pointer-events: none;
}
#museum-app .era-trigger[aria-expanded='true'] + .filter-chevron { rotate: 180deg; }
#museum-app .recessed-field :is(input, select, .era-trigger):lang(ar) { font-size: 20px; line-height: 1.5; }
/* Fit the Arabic line box inside the field with balanced vertical padding. */
#museum-app .recessed-field #museum-search:lang(ar) { padding-block: 8px; line-height: 1.4; }
#museum-app :is(h1, .arabic-title) { font-weight: 700; -webkit-text-stroke: .25px currentColor; }

/* The phone sector buttons keep the compact paper treatment. */
#museum-app .sector-entry { display: contents; }
#museum-app .section-leaf { display: none; pointer-events: none; }
@media (max-width: 650px) {
  #museum-app .sector-index { gap: 6px; padding-block: 4px 8px; }
  #museum-app .sector-index {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--sector-fade-left, 0px), #000 calc(100% - var(--sector-fade-right, 0px)), transparent);
    mask-image: linear-gradient(to right, transparent, #000 var(--sector-fade-left, 0px), #000 calc(100% - var(--sector-fade-right, 0px)), transparent);
  }
  #museum-app .sector-tab, #museum-app [dir='rtl'] .sector-tab {
    border-radius: 12px 12px 5px 5px;
    border: 1px solid #b49d7799;
    background-color: #e2d2b3;
    background-image: linear-gradient(180deg, #80653d24, #fff4d938 40%, #876b3521), var(--paper-texture);
    background-size: 100% 100%, 510px 765px;
    background-position: center, calc(var(--tab-depth) * 47px) calc(var(--tab-depth) * -83px);
    box-shadow:
      inset 0 1px 0 #fff2ce9c,
      inset 0 -.75px 0 #80654238,
      0 .75px 1px #402b196b,
      calc(.75px * var(--book-reflection)) 3px 4px -1px #4a341d4d;
    justify-content: center;
    text-align: center;
  }
  #museum-app .sector-tab::after { content: none; }
  #museum-app .sector-tab[aria-pressed='true'] {
    background-color: #f1e5cf;
    background-image: linear-gradient(#fff8e966, #fff3da26), var(--paper-texture);
    box-shadow:
      inset 0 1px 0 #fff7dcb0,
      inset 0 -.75px 0 #80654230,
      0 .75px 1px #402b196b,
      calc(.75px * var(--book-reflection)) 3px 4px -1px #4a341d4d;
  }
}

/* Original scans sit in clipped viewports; white paper blends into the album. */
#museum-app .specimen-mount > .specimen-artwork {
  position: absolute;
  inset: 4px 2px;
  display: block;
  width: calc(100% - 4px);
  height: calc(100% - 8px);
  object-fit: contain;
  overflow: hidden;
  z-index: 1;
  mix-blend-mode: multiply;
}
/* Every museum logo shares the same default paper blending. */
#museum-app :is(.specimen-artwork, .modern-logo-preview, .sample-mark) { mix-blend-mode: multiply; }
#museum-app .specimen-mount > .black-artwork { filter: brightness(0); }
#museum-app .specimen-mount > .pale-scan { filter: brightness(1.06); }
#museum-app .specimen-name:lang(en) { hyphens: auto; }

/* Optical sizes for the English calligraphic face. */
#museum-app h1:lang(en) { font-size: calc(34px * var(--english-type-scale)); line-height: 1.15; }
#museum-app .text-control:lang(en) { font-size: calc(20px * var(--english-type-scale)); line-height: 1.4; }
#museum-app .sector-tab:lang(en) { font-size: calc(18px * var(--english-type-scale)); line-height: 1.4; }
#museum-app .recessed-field :is(input, select, .era-trigger):lang(en) { font-size: clamp(16px, calc(6cqw * var(--english-type-scale)), calc(22px * var(--english-type-scale))); line-height: 1.25; }
#museum-app .specimen-name:lang(en) { font-size: calc(16px * var(--english-type-scale)); line-height: 1.4; }
#museum-app .specimen-date:lang(en) { font-size: calc(14px * var(--english-type-scale)); line-height: 1.4; }
@media (max-width: 650px) {
  #museum-app { --mobile-filter-gap: 12px; }
  #museum-app .catalogue-controls { grid-template-columns: minmax(0, 1fr); gap: var(--mobile-filter-gap); }
  #museum-app .museum-product:not(.showing-record):not(.showing-contact) .collection-content { padding-top: calc(var(--mobile-filter-gap) - 4px); }
  #museum-app .era-menu { width: 100%; }
  #museum-app h1:lang(en) { font-size: clamp(calc(20px * var(--english-type-scale)), calc(7cqw * var(--english-type-scale)), calc(27px * var(--english-type-scale))); }
}

/* A logo record is another leaf in the same album. */
#museum-app .specimen-caption { display: block; padding-inline: 1px; }
#museum-app .museum-product[lang='ar'] :is(.specimen-caption, .specimen-name, .specimen-date) { font-family: 'Amiri', serif; }
#museum-app a.specimen-link { cursor: pointer; }
#museum-app a.specimen-link:focus-visible { outline: 2px solid #79543a; outline-offset: 6px; }
/* A mounted print catches warmer light; its size and position stay fixed. */
@media (hover: hover) and (pointer: fine) {
  #museum-app a.specimen-link {
    transition: box-shadow 380ms ease, border-color 380ms ease;
  }
  #museum-app a.specimen-link::before {
    content: '';
    position: absolute;
    inset: 9px;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(var(--book-angle), #fffaf052, #fff6e91c 42%, transparent 68%, #98744412);
    opacity: 0;
    transition: opacity 420ms ease;
  }
  #museum-app a.specimen-link :is(.specimen-name, .specimen-date) { transition: color 320ms ease; }
  #museum-app a.specimen-link:is(:hover, :focus-visible) {
    border-color: #ad9476a6;
    box-shadow: 1px 3px 6px #624c3d4d, inset 0 0 0 1px #9d7f5129;
  }
  #museum-app a.specimen-link:is(:hover, :focus-visible)::before { opacity: 1; }
  #museum-app a.specimen-link:is(:hover, :focus-visible) .specimen-name { color: #5c3d2c; }
  #museum-app a.specimen-link:is(:hover, :focus-visible) .specimen-date { color: #857158; }
}
@media (prefers-reduced-motion: reduce) {
  #museum-app a.specimen-link,
  #museum-app a.specimen-link::before,
  #museum-app a.specimen-link :is(.specimen-name, .specimen-date) { transition: none; }
}
#museum-app .showing-record .volume-interior { grid-template-columns: minmax(0, 1fr); }
#museum-app .showing-record .catalogue-leaf { display: flex; flex-direction: column; }
#museum-app .showing-record .masthead { grid-template-columns: minmax(0, 1fr); }
#museum-app .showing-record :is(.catalogue-spread, .collection-content, .record-view) {
  display: flex;
  flex-direction: column;
  flex: 1;
}
#museum-app .album-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 13px;
  border: 1px solid #34151c;
  border-top-color: #b2857499;
  border-bottom-color: #210b11;
  border-radius: 7px;
  color: #efd9b5;
  background-color: #622c34;
  background-image:
    linear-gradient(180deg, #ffebc614, transparent 45%, #25091050),
    var(--cloth-texture);
  background-size: 100% 100%, 190px 190px;
  box-shadow: inset 0 1px 1px #f0cca440, inset 0 -2px 3px #18090c8c, 0 2px 3px #30131855;
  text-shadow: 0 -1px 1px #19070ded, 0 1px 0 #edcfa238;
  font: calc(18px * var(--english-type-scale))/1.5 'Quintessential', Georgia, serif;
  text-decoration: none;
}
#museum-app .album-action:hover { color: #ffe7bf; background-image: linear-gradient(180deg, #ffebc626, transparent 45%, #2509103b), var(--cloth-texture); text-decoration: none; }
#museum-app .album-action:active { box-shadow: inset 0 2px 4px #19070db3, inset 0 -1px 0 #eacf9133, 0 1px 1px #30131824; }
#museum-app .album-action svg { flex: 0 0 20px; filter: drop-shadow(0 -1px .5px #19070d) drop-shadow(0 1px 0 #e8c79642); }
#museum-app .record-footer { display: flex; justify-content: center; margin-top: auto; padding-top: 28px; }
#museum-app .record-return { margin: 0; }
#museum-app .return-arrow { display: inline-block; }
#museum-app [dir='rtl'] .return-arrow { transform: scaleX(-1); }
#museum-app .record-layout { grid-template-columns: minmax(0, 1fr) minmax(220px, 1fr); gap: 34px; align-items: start; }
/* Raster whites can blend with the page beneath the faded highlight. */
#museum-app .catalogue-leaf > .catalogue-spread { z-index: auto; }
#museum-app .record-artwork { min-width: 0; width: 100%; max-width: 420px; margin-inline: auto; align-self: start; }
#museum-app .record-mount {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 26px;
  border: 0;
  background: none;
  box-shadow: none;
}
/* Only the lighter paper fades; the original artwork stays crisp. */
#museum-app .record-mount::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #fbf7eb;
  background-image: linear-gradient(#fffdf2ab, #fffdf28a), var(--paper-texture);
  background-position: center, -91px -187px;
  background-size: 100% 100%, 790px 1185px;
  -webkit-mask-image:
    linear-gradient(90deg, transparent, #0007 6%, #000 18%, #000 82%, #0007 94%, transparent),
    linear-gradient(180deg, transparent, #0007 6%, #000 18%, #000 82%, #0007 94%, transparent);
  mask-image:
    linear-gradient(90deg, transparent, #0007 6%, #000 18%, #000 82%, #0007 94%, transparent),
    linear-gradient(180deg, transparent, #0007 6%, #000 18%, #000 82%, #0007 94%, transparent);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
#museum-app .record-mount .specimen-mount { aspect-ratio: 1; max-height: 460px; }
#museum-app .record-downloads { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 17px; }
#museum-app .record-download { cursor: pointer; gap: 5px; padding-inline: 8px; font-size: calc(17px * var(--english-type-scale)); }
#museum-app .record-download svg { width: 18px; height: 18px; flex-basis: 18px; }
#museum-app .record-download[aria-busy='true'] { cursor: progress; }
#museum-app .download-format { font: calc(16px * var(--english-type-scale))/1.4 'Quintessential', Georgia, serif; color: #dbc19a; }
#museum-app .download-status { margin: 12px 0 0; color: #79543a; text-align: center; font-size: calc(16px * var(--english-type-scale)); }
#museum-app .record-details { min-width: 0; padding-top: 4px; text-align: start; overflow-wrap: break-word; }
#museum-app .record-title {
  margin: 0;
  color: #4b2e20;
  font: 700 calc(30px * var(--english-type-scale))/1.4 'Quintessential', Georgia, serif;
  overflow-wrap: break-word;
}
#museum-app .record-title:focus { outline: none; }
#museum-app .record-secondary { margin: 2px 0 20px; color: #786651; text-align: left; }
#museum-app .museum-product[dir='rtl'] .record-secondary { text-align: right; }
#museum-app .record-secondary:lang(ar) { font: 22px/1.7 'Amiri', serif; }
#museum-app .record-secondary:lang(en) { font: calc(20px * var(--english-type-scale))/1.5 'Quintessential', Georgia, serif; }
#museum-app .record-description { margin: 0 0 22px; color: #786651; font: calc(17px * var(--english-type-scale))/1.8 'Quintessential', Georgia, serif; }
#museum-app .record-meta dt { color: #998771; font: calc(14px * var(--english-type-scale))/1.5 'Quintessential', Georgia, serif; }
#museum-app .record-meta dd { color: #79543a; font: calc(18px * var(--english-type-scale))/1.7 'Quintessential', Georgia, serif; }
#museum-app [lang='ar'] :is(.record-return, .record-download) { font: 18px/1.8 'Bahrain Museum Ruqaa', serif; }
#museum-app [lang='ar'] .download-status { font: 17px/1.8 'Amiri', serif; }
#museum-app [lang='ar'] .record-title { font: 700 30px/1.7 'Bahrain Museum Ruqaa', serif; }
#museum-app [lang='ar'] .record-description { font: 18px/1.9 'Amiri', serif; }
#museum-app [lang='ar'] .record-meta dt { font: 16px/1.7 'Amiri', serif; }
#museum-app [lang='ar'] .record-meta dd { font: 19px/1.7 'Amiri', serif; }
@media (max-width: 750px) {
  #museum-app .record-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  #museum-app .record-artwork { max-width: 364px; }
  #museum-app .record-details { padding: 0 14px; }
  #museum-app .record-secondary { margin-bottom: 16px; }
  #museum-app .record-description { font-size: 16px; line-height: 1.8; margin-bottom: 20px; }
  #museum-app [lang='ar'] .record-description { font-size: 18px; line-height: 1.85; }
  #museum-app .record-meta dd { font-size: 16px; }
  #museum-app [lang='ar'] .record-meta dd { font-size: 19px; }
}
@media (max-width: 460px) {
  #museum-app .record-title { font-size: calc(26px * var(--english-type-scale)); }
  #museum-app [lang='ar'] .record-title { font-size: 24px; line-height: 1.55; }
}

/* Handmade Arabic calligraphy follows the English title's width and alignment. */
#museum-app .arabic-title {
  position: relative;
  width: 100%;
  aspect-ratio: 1881.15 / 378.83;
  margin: 0 0 5px;
  line-height: 0;
}
#museum-app .arabic-title img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (width > 650px) {
  #museum-app .masthead { padding-top: 8px; }
  #museum-app .masthead-top { align-self: start; }
  #museum-app .masthead-top .text-control { padding-inline: 0; }
}

/* Desktop index dividers overlap a separate stack of ordinary leaves. */
@media (width > 650px) {
  #museum-app .museum-product:not(.showing-record) .volume-interior { grid-template-columns: minmax(0, 1fr) 74px; }
  #museum-app .museum-product:not(.showing-record) .catalogue-leaf { min-height: var(--index-page-min-height, 1460px); }
  #museum-app .section-leaf { display: none; }
  #museum-app .sector-index {
    --index-tab-overlap: 8px;
    top: 145px;
    inset-inline-end: -66px;
    width: 50px;
    gap: 0;
    z-index: auto;
    pointer-events: none;
  }
  #museum-app .sector-entry {
    display: block;
    position: relative;
    width: 50px;
    height: var(--tab-height, 170px);
    z-index: calc(-1 * (var(--tab-depth) * 2 + 2));
    translate: 0 0;
  }
  /* Faces are 20px shorter than entries. Leave room for their irregular
     shoulders instead of letting the front page cut into the next face. */
  #museum-app .sector-entry + .sector-entry { margin-top: calc(-1 * var(--index-tab-overlap)); }
  #museum-app .sector-entry:has(> .sector-tab[aria-pressed='true']) { z-index: 3; translate: 0; }
  #museum-app .sector-entry::before, #museum-app .sector-entry::after { content: none; }
  /* Cover the worn page rim, clipping the shadow away from the joined edge. */
  #museum-app .sector-entry .sector-tab,
  #museum-app [dir='rtl'] .sector-entry .sector-tab {
    position: absolute;
    display: block;
    left: calc(var(--tab-face-tip, 84px) - 74px);
    right: auto;
    top: calc(10px + var(--tab-scatter-y, 0px));
    width: 50px;
    height: calc(var(--tab-height, 170px) - 20px);
    min-height: calc(var(--tab-height, 170px) - 20px);
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    filter: none;
    translate: 0 0;
    z-index: 1;
    pointer-events: auto;
    transition: translate 340ms cubic-bezier(.22, .61, .36, 1);
  }
  #museum-app [dir='rtl'] .sector-entry .sector-tab {
    left: auto;
    right: calc(var(--tab-face-tip, 84px) - 74px);
  }
  #museum-app .sector-entry .sector-tab::after { content: none; }
  #museum-app .sector-entry .sector-tab > span { display: none; }
  #museum-app .sector-entry .sector-tab::before {
    content: attr(data-tab-label);
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    translate: 0 -2px;
    white-space: nowrap;
  }
  #museum-app [dir='rtl'] .sector-entry .sector-tab::before { inset: 0; }
  #museum-app .sector-entry .sector-tab[aria-pressed='true'] { color: #642b32; }
  #museum-app .sector-entry .sector-tab:focus-visible { outline: 1px solid #7e5037; outline-offset: -3px; }
}
@media (width > 650px) and (hover: hover) and (pointer: fine) {
  #museum-app .sector-entry .sector-tab:not([aria-pressed='true']):is(:hover, :focus-visible) { translate: calc(4px * var(--book-reflection)) 0; }
  #museum-app .sector-entry .sector-tab[aria-pressed='true']:hover { translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  #museum-app .sector-entry .sector-tab { transition: none; }
}

/* Full-height, individually textured plain leaves; these do not carry tabs. */
#museum-app .paper-edge-stack { display: none; }
@media (width > 650px) {
  #museum-app .paper-edge-stack {
    display: block;
    position: absolute;
    left: var(--edge-stack-x);
    top: var(--edge-stack-y);
    width: var(--edge-stack-width);
    height: var(--edge-stack-height);
    z-index: auto;
    pointer-events: none;
  }
  #museum-app .paper-edge-leaf {
    position: absolute;
    inset: 0;
    filter: drop-shadow(calc(.65px * var(--book-reflection)) .7px .8px #49381c80);
  }
  #museum-app .paper-edge-material {
    position: absolute;
    inset: 0;
    clip-path: var(--plain-leaf-outline);
    background-color: #e6d7b7;
    background-image:
      linear-gradient(var(--book-angle), transparent 65%, #7e633326),
      linear-gradient(rgb(142 104 46 / var(--edge-age)), rgb(142 104 46 / var(--edge-age))),
      var(--paper-texture);
    background-size: 100% 100%, 100% 100%, 710px 1067px;
    background-position: center, center, var(--edge-photo-x) var(--edge-photo-y);
  }
  #museum-app .paper-edge-leaf svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
  #museum-app .paper-edge-leaf path { fill: none; stroke-width: .45px; }
  #museum-app .edge-rim { stroke: #79623f; opacity: .64; }
  #museum-app .edge-light { stroke: #fff3d2; opacity: .72; }
}

/* Sub-pixel, stable paper imperfections affect the exposed tag and its label. */
@media (width > 650px) {
  #museum-app .sector-entry .sector-tab::before {
    translate: calc(var(--tab-nudge-x) * var(--book-reflection)) calc(var(--tab-nudge-y) - 2px);
    rotate: calc(var(--tab-label-turn, 0deg) + var(--tab-angle) * var(--book-reflection));
    transform-origin: center;
  }
  #museum-app .sector-entry .sector-tab:lang(ar)::before { --tab-label-turn: 180deg; }
  #museum-app .sector-entry .sector-tab { font-weight: 700; }
}

/* The active collection has a heading, directly on the album paper. */
#museum-app .filter-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
#museum-app .filter-summary {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #4b2e20;
  font: 700 calc(24px * var(--english-type-scale))/1.4 'Quintessential', Georgia, serif;
}
#museum-app .filter-summary:lang(ar) { font: 700 25px/1.6 'Amiri', serif; }
#museum-app .filter-clear {
  position: relative;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 5px;
}
#museum-app .filter-clear::before { content: ''; position: absolute; inset: -8px; }
#museum-app .filter-clear svg {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}
@media (max-width: 650px) {
  #museum-app .filter-callout { gap: 12px; }
  #museum-app .filter-summary:lang(ar) { font-size: 23px; }
  #museum-app .sector-tab, #museum-app .sector-tab:first-child {
    max-width: min(240px, 76vw);
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* Photographed edges interleave with the index sheets in the same paint stack. */
#museum-app .paper-raster-stack { display: none; }
@media (width > 650px) {
  #museum-app .paper-raster-stack { display: contents; }
  #museum-app .paper-raster-leaf {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    scale: var(--book-reflection) 1;
    /* Cast from the clipped sheet, without clipping its shadow at the seam.
       Deeper leaves need a broader penumbra over the tabs beneath them. */
    filter:
      drop-shadow(calc(.65px + var(--raster-depth-fraction, 0) * 1px) calc(.8px + var(--raster-depth-fraction, 0) * 1.5px) calc(.8px + var(--raster-depth-fraction, 0) * 1.2px) rgb(64 43 25 / .32))
      drop-shadow(calc(1px + var(--raster-depth-fraction, 0) * 1.5px) calc(1.5px + var(--raster-depth-fraction, 0) * 2px) calc(1.5px + var(--raster-depth-fraction, 0) * 2px) rgb(64 43 25 / .14));
  }
  #museum-app .paper-raster-material {
    display: block; position: absolute; inset: 0;
    clip-path: inset(0 calc(100% - var(--raster-edge-end)) 0 var(--raster-edge-start));
  }
  #museum-app .paper-raster-material > svg { position: absolute; left: -6px; width: 52px; overflow: hidden; }
  #museum-app .paper-raster-top {
    top: 0;
    height: var(--raster-top-height);
    z-index: 1;
  }
  #museum-app .paper-raster-body { top: var(--raster-top-height); bottom: var(--raster-bottom-height); height: calc(100% - var(--raster-top-height) - var(--raster-bottom-height)); }
  #museum-app .paper-raster-bottom {
    bottom: 0;
    height: var(--raster-bottom-height);
    z-index: 1;
  }
  #museum-app .has-raster-paper .paper-edge-leaf { opacity: .2; }
  #museum-app .has-raster-paper .paper-edge-leaf svg { opacity: .1; }
  /* The raster fan already ends each rear leaf at the front-page baseline. */
  #museum-app .has-raster-paper:not(.showing-record) .paper-stack::before,
  #museum-app .has-raster-paper:not(.showing-record) .paper-stack::after { content: none; }
}

/* Shared site credit follows the album, matching the main directory's footer. */
#museum-app .museum-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 600px;
  margin: 22px auto 0;
  padding: 22px 20px 28px;
  color: #786651;
  text-align: center;
  font: 14px/1.7 'Quintessential', Georgia, serif;
}
#museum-app .museum-footer p { margin: 0; }
#museum-app .museum-footer:lang(ar) { font: 16px/1.7 'Amiri', serif; }
#museum-app .museum-contribute {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-bottom: 8px;
  padding: 4px 8px;
  color: #642b32;
  font-size: 16px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
#museum-app .museum-contribute:lang(ar) { font-size: 18px; }
#museum-app .museum-footer-credit {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 10px;
  padding: 5px;
}
#museum-app .museum-footer-credit img { display: block; width: 112px; height: auto; }
#museum-app .museum-footer a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
@media (max-width: 650px) {
  #museum-app .museum-stage { display: flex; flex-direction: column; min-height: 100svh; }
  #museum-app .museum-product { flex: 0 0 auto; }
  #museum-app .museum-footer {
    flex: 1;
    margin-top: 0;
    padding-top: 44px;
    padding-inline: 22px;
    background-color: var(--table-background-color);
    background-image: var(--table-background-image);
    background-size: auto, auto;
    background-blend-mode: normal, multiply;
  }
}

/* Other logos of the same entity, within the details page. */
#museum-app .entity-related { margin-top: 34px; padding-top: 24px; border-top: 1px solid #99877155; }
#museum-app .entity-related-title { margin: 0 0 18px; color: #4b2e20; font: 700 22px/1.5 'Quintessential', serif; }
#museum-app [lang='ar'] .entity-related-title { font: 700 25px/1.7 'Bahrain Museum Ruqaa', serif; }
#museum-app .entity-thumbnails { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
#museum-app .entity-thumbnails li { min-width: 0; }
#museum-app a.entity-thumbnail { display: flex; flex-direction: column; align-items: center; height: 100%; min-height: 0; padding: 14px 10px; }
#museum-app .entity-thumbnail .specimen-mount { width: 100%; max-width: 115px; aspect-ratio: 1; flex: 0 0 auto; }
#museum-app .entity-thumbnail .specimen-caption { width: 100%; padding: 10px 0 0; text-align: center; }
#museum-app .entity-thumbnail .specimen-name { font-size: 14px; }
#museum-app .entity-thumbnail .specimen-date { margin-top: 4px; font-size: 12px; line-height: 1.6; }
#museum-app [lang='ar'] .entity-thumbnail .specimen-name { font-size: 16px; }
#museum-app [lang='ar'] .entity-thumbnail .specimen-date { font-size: 14px; }
@media (max-width: 750px) { #museum-app .entity-thumbnails { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 460px) {
  #museum-app .entity-thumbnails { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #museum-app .entity-thumbnail .specimen-mount { max-width: 95px; }
  #museum-app .entity-related-title { font-size: 20px; }
  #museum-app [lang='ar'] .entity-related-title { font-size: 23px; }
}


#museum-app .museum-home { color: inherit; text-decoration: none; }
#museum-app .museum-home:focus-visible { outline: 2px solid #783630; outline-offset: 5px; border-radius: 2px; }
#museum-app .masthead-top .bahrain-logos-link { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; }
#museum-app .masthead-separator { color: #998771; }


#museum-app .search-clear { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 3px; background: none; box-shadow: none; color: #786651; cursor: pointer; }
#museum-app .search-clear[hidden] { display: none; }
#museum-app .search-clear:hover { color: #4b2e20; }
#museum-app .search-clear:focus-visible { outline: 2px solid #783630; outline-offset: -4px; }
#museum-app #museum-search::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }


/* A quiet, compact link to the entity's selected contemporary logo. */
#museum-app .modern-logo-section { margin-top: 28px; border-top: 1px solid #99877145; }
#museum-app .modern-logo-row { display: flex; align-items: center; gap: 14px; min-height: 78px; padding: 14px 6px; color: #4b2e20; text-decoration: none; }
#museum-app .modern-logo-preview { display: block; width: 82px; height: 48px; flex: 0 0 82px; object-fit: contain; }
#museum-app .modern-logo-copy { flex: 1; min-width: 0; }
#museum-app .modern-logo-copy h3 { margin: 0; font: 700 16px/1.5 'Quintessential', serif; }
#museum-app .modern-logo-copy > span { display: block; color: #786651; font: 13px/1.7 'Quintessential', serif; }
#museum-app [lang='ar'] .modern-logo-copy h3 { font: 700 19px/1.6 'Amiri', serif; }
#museum-app [lang='ar'] .modern-logo-copy > span { font: 16px/1.6 'Amiri', serif; }
#museum-app .modern-logo-arrow { font: 22px/1 sans-serif; color: #783630; }
#museum-app .modern-logo-row:hover .modern-logo-copy > span { color: #783630; text-decoration: underline; text-underline-offset: 4px; }
#museum-app .modern-logo-row:focus-visible { outline: 2px solid #783630; outline-offset: 3px; }
@media (max-width: 460px) { #museum-app .modern-logo-row { gap: 12px; } #museum-app .modern-logo-preview { width: 68px; flex-basis: 68px; height: 42px; } }


/* Compact facts on phones; longer periods have more room than the sector. */
@media (max-width: 650px) {
  #museum-app .record-meta { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, .85fr); gap: 10px 18px; align-items: start; }
  #museum-app .record-meta > div { min-width: 0; padding: 0; border: 0; }
  #museum-app .record-meta > div:only-child { grid-column: 1 / -1; }
  #museum-app .record-meta dt { margin-bottom: 3px; font-size: 13px; line-height: 1.4; }
  #museum-app .record-meta dd { font-size: 15px; line-height: 1.55; }
  #museum-app [lang='ar'] .record-meta dt { font-size: 15px; line-height: 1.45; }
  #museum-app [lang='ar'] .record-meta dd { font-size: 18px; line-height: 1.55; }
}


#museum-app .record-filter-link { color: inherit; text-decoration: underline; text-decoration-color: #79543a66; text-underline-offset: 4px; }
#museum-app .record-filter-link:hover { color: #783630; text-decoration-color: currentColor; }
#museum-app .record-filter-link:focus-visible { outline: 2px solid #783630; outline-offset: 3px; }
@media (min-width: 751px) {
  #museum-app .modern-logo-section { width: 100%; max-width: 420px; margin-inline-start: auto; }
}


#museum-app .modern-logo-section { border-top: 0; }
#museum-app .modern-logo-row.recessed-field { min-height: 78px; padding: 14px 20px; }
#museum-app .modern-logo-row.recessed-field::before { background-color: #fffdf7; background-image: linear-gradient(#fffdf7ed, #fcfaf2ed), var(--paper-texture); }
#museum-app .modern-logo-row > * { position: relative; z-index: 1; }
#museum-app .modern-logo-arrow { width: 18px; height: 18px; flex: 0 0 18px; }
#museum-app .modern-logo-row:hover { color: #783630; }


@font-face { font-family: 'Bahrain Logos Geomanist'; src: url('/museum/assets/fonts/BahrainLogos-Geomanist-500.woff') format('woff'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Bahrain Logos Tajawal'; src: url('/museum/assets/fonts/BahrainLogos-Tajawal-500.ttf') format('truetype'); font-weight: 500; font-display: swap; }
#museum-app .record-details .modern-logo-section { width: 100%; max-width: none; margin-inline: 0; margin-top: 24px; }
#museum-app .modern-logo-row.recessed-field { gap: 14px; padding: 14px 18px; }
#museum-app .modern-logo-copy { display: flex; align-items: center; min-height: 40px; }
#museum-app .modern-logo-preview + .modern-logo-copy { border-inline-start: 1px solid #99877155; padding-inline-start: 14px; }
#museum-app .modern-logo-copy h3 { font: 500 16px/1.45 'Bahrain Logos Geomanist', Arial, sans-serif; }
#museum-app [lang='ar'] .modern-logo-copy h3 { font: 500 18px/1.5 'Bahrain Logos Tajawal', Arial, sans-serif; }
@media (max-width: 460px) { #museum-app .modern-logo-row.recessed-field { gap: 10px; padding-inline: 16px; } #museum-app .modern-logo-preview + .modern-logo-copy { padding-inline-start: 10px; } }


@font-face { font-family: 'Bahrain Logos Geomanist'; src: url('/museum/assets/fonts/BahrainLogos-Geomanist-400.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Bahrain Logos Tajawal'; src: url('/museum/assets/fonts/BahrainLogos-Tajawal-400.ttf') format('truetype'); font-weight: 400; font-display: swap; }
#museum-app .modern-logo-row.recessed-field { display: grid; grid-template-columns: 104px minmax(0, 1fr); direction: ltr; gap: 0; transition: box-shadow 380ms ease, color 380ms ease; }
#museum-app .modern-logo-preview { justify-self: center; }
#museum-app .modern-logo-copy { justify-content: center; text-align: center; min-height: 40px; width: 100%; }
#museum-app .modern-logo-preview + .modern-logo-copy { border-inline-start: 0; padding-inline-start: 0; border-left: 1px solid #99877145; padding-left: 16px; padding-right: 16px; }
#museum-app .modern-logo-copy h3 { font: 400 14px/1.4 'Bahrain Logos Geomanist', Arial, sans-serif; }
#museum-app [lang='ar'] .modern-logo-copy h3 { font: 400 16px/1.4 'Bahrain Logos Tajawal', Arial, sans-serif; position: relative; top: 2px; }
#museum-app .modern-logo-row.recessed-field::after { content: ''; position: absolute; inset: 7px; border-radius: 6px; background: linear-gradient(110deg, #c5a06408, #d9bb7930, #fff8dc0a); pointer-events: none; opacity: 0; transition: opacity 380ms ease; }
#museum-app .modern-logo-row.recessed-field:hover::after { opacity: 1; }
#museum-app .modern-logo-row.recessed-field:hover { box-shadow: inset 0 2px 4px #66553c8c, inset 0 -2px 2px #77633f26, 0 1px 2px #fffaf0a6; }
@media (max-width: 460px) { #museum-app .modern-logo-row.recessed-field { grid-template-columns: 80px minmax(0, 1fr); } #museum-app .modern-logo-preview + .modern-logo-copy { padding-left: 12px; padding-right: 12px; } }
@media (prefers-reduced-motion: reduce) { #museum-app .modern-logo-row.recessed-field, #museum-app .modern-logo-row.recessed-field::after { transition: none; } }


#museum-app .modern-logo-row.recessed-field { min-height: 60px; padding-block: 9px; }
#museum-app .modern-logo-preview { width: 64px; height: 36px; }
#museum-app .modern-logo-copy { min-height: 30px; }
@media (max-width: 460px) { #museum-app .modern-logo-preview { width: 60px; height: 34px; } }


/* Equal compartments keep the modern-logo row balanced at every width. */
#museum-app .modern-logo-row.recessed-field { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 14px; }
#museum-app .modern-logo-preview { justify-self: center; }
#museum-app .modern-logo-preview + .modern-logo-copy { padding-inline: 10px; }


/* Lighter underline ink throughout the museum, without adding new underlines. */
#museum-app :is(a, .text-control):is(:lang(ar), :lang(en)) { text-decoration-thickness: .7px; text-decoration-color: #79543a66; text-underline-offset: 3px; }
#museum-app :is(a, .text-control):is(:lang(ar), :lang(en)):hover { text-decoration-color: #79543a99; }

@media (max-width: 750px) {
  #museum-app .record-layout { gap: 16px; }
  #museum-app .record-heading { padding-inline: 14px; text-align: center; }
  #museum-app .record-heading .record-title { text-align: center; }
  #museum-app .record-heading .record-secondary { margin: 4px 0 0; text-align: center; font-size: 15px; line-height: 1.5; }
  #museum-app .record-heading .record-secondary:lang(ar) { font-size: 18px; line-height: 1.6; }
  #museum-app .record-mount { max-width: 320px; padding: 14px; margin-inline: auto; }
  #museum-app .record-meta { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, .85fr); gap: 10px 18px; align-items: start; }
  #museum-app .record-meta > div { padding: 0; border: 0; }
  #museum-app .record-details .record-downloads { margin-top: 18px; gap: 8px; }
  #museum-app .record-details .modern-logo-section { margin-top: 22px; }
}
@media (max-width: 460px) {
  #museum-app .record-mount { max-width: 280px; padding: 12px; }
  #museum-app .record-heading .record-secondary:lang(en) { font-size: 14px; }
}

#museum-app .masthead-top .bahrain-logos-link { font-family: 'Quintessential', Georgia, serif; }
#museum-app .masthead-top .bahrain-logos-link:lang(ar) { font-family: 'Bahrain Museum Ruqaa', serif; }


/* Keep thumbnail dates close to the artwork, with balanced card padding. */
#museum-app a.entity-thumbnail { padding-block: 12px; justify-content: flex-start; }
#museum-app .entity-thumbnail .specimen-mount { aspect-ratio: 1.3; }
#museum-app .entity-thumbnail .specimen-caption { margin-top: 0; padding-top: 6px; }
#museum-app .entity-thumbnail .specimen-date { display: block; margin-top: 0; }

@media (max-width: 750px) {
  #museum-app .museum-product .record-heading .record-secondary:lang(en) { text-align: center; }
}

@media (min-width: 751px) {
  #museum-app .showing-record .masthead { grid-template-columns: minmax(0, 1fr) auto; }
}


/* One consistent frame proportion for collection and related-logo cards. */
#museum-app a.specimen-link { display: grid; grid-template-rows: minmax(0, 1fr) auto; aspect-ratio: 1; width: 100%; height: auto; min-height: 0; min-width: 0; padding: 16px; align-items: stretch; justify-content: normal; }
#museum-app a.specimen-link > .specimen-mount { width: 100%; height: 100%; max-width: none; min-height: 0; aspect-ratio: auto; padding: 0; }
#museum-app a.specimen-link > .specimen-caption { width: 100%; margin-top: 0; padding: 8px 0 0; }
#museum-app a.entity-thumbnail { padding: 12px; }
#museum-app a.entity-thumbnail > .specimen-caption { padding-top: 6px; }
@media (max-width: 650px) {
  #museum-app a.specimen-link { padding: 12px; }
  #museum-app a.specimen-link > .specimen-caption { padding-top: 6px; }
  #museum-app a.entity-thumbnail { padding: 10px; }
}


/* Stable frame wear; no outer card border or drop shadow. */
#museum-app a.specimen-link.specimen::after { border-image-source: var(--specimen-frame, url('/api/museum/static/decor-specimen-mount-frame.0c9850e41cdc06b9.webp')); border-image-width: var(--frame-width, 19px); transform: rotate(var(--frame-rotation, 0deg)); opacity: var(--frame-opacity, 1); }
#museum-app a.specimen-link, #museum-app a.specimen-link:is(:hover, :focus-visible) { border: 0; box-shadow: none; }
#museum-app a.specimen-link { padding: 18px 16px 22px; }
#museum-app a.entity-thumbnail { padding: 14px 14px 20px; }
#museum-app a.specimen-link > .specimen-mount > .specimen-artwork { inset: 8px 10px; width: calc(100% - 20px); height: calc(100% - 16px); }
#museum-app a.specimen-link > .specimen-caption { padding-top: 8px; }
#museum-app a.specimen-link::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(135deg, #fffdf3b3, #fff9e866); opacity: 0; transition: opacity 420ms ease; }
@media (hover: hover) and (pointer: fine) { #museum-app a.specimen-link:hover::before { opacity: 1; } }
#museum-app a.specimen-link:focus-visible::before { opacity: 1; }
@media (max-width: 650px) {
  #museum-app a.specimen-link { padding: 14px 12px 20px; }
  #museum-app a.entity-thumbnail { padding: 12px 10px 18px; }
  #museum-app a.specimen-link > .specimen-mount > .specimen-artwork { inset: 6px 8px; width: calc(100% - 16px); height: calc(100% - 12px); }
}
@media (prefers-reduced-motion: reduce) { #museum-app a.specimen-link::before { transition: none; } }


/* More air around collection artwork without changing the square frames. */
#museum-app .specimen-grid a.specimen-link > .specimen-mount > .specimen-artwork { inset: 12px 18px; width: calc(100% - 36px); height: calc(100% - 24px); }
@media (max-width: 650px) {
  #museum-app .specimen-grid a.specimen-link > .specimen-mount > .specimen-artwork { inset: 10px 14px; width: calc(100% - 28px); height: calc(100% - 20px); }
}


/* One shared raster request plus eight tiny vector wear overlays. */
#museum-app a.specimen-link.specimen::after { border-image-source: url('/api/museum/static/decor-specimen-mount-frame.0c9850e41cdc06b9.webp'); transform: rotate(calc(var(--frame-orientation, 0deg) + var(--frame-rotation, 0deg))); scale: calc(var(--book-reflection) * var(--frame-mirror, 1)) 1; }


/* Related logos get the same artwork inset as the main collection. */
#museum-app .entity-thumbnails a.specimen-link > .specimen-mount > .specimen-artwork { inset: 12px 18px; width: calc(100% - 36px); height: calc(100% - 24px); }
@media (max-width: 650px) {
  #museum-app .entity-thumbnails a.specimen-link > .specimen-mount > .specimen-artwork { inset: 10px 14px; width: calc(100% - 28px); height: calc(100% - 20px); }
}


/* Feathered light spot, with no visible rectangular edge. */
#museum-app a.specimen-link::before { background: radial-gradient(ellipse at 48% 43%, #fffdf3b3 0%, #fffbee78 24%, #fff9e833 47%, #fff9e80a 65%, transparent 80%); }


/* Compact current-logo link, aligned with the details rather than stretched. */
#museum-app .record-details .modern-logo-section { width: fit-content; max-width: 100%; margin-inline-start: 0; margin-inline-end: auto; }
#museum-app .modern-logo-row.recessed-field { grid-template-columns: 80px max-content; padding-inline: 14px; }
#museum-app .modern-logo-copy { width: auto; }
#museum-app .modern-logo-preview + .modern-logo-copy { padding-inline: 16px; }


/* Equal 16px content spacing inside the 6px recessed rim. */
#museum-app .modern-logo-row.recessed-field { grid-template-columns: max-content max-content; padding-inline: 22px; }
#museum-app .modern-logo-preview { justify-self: start; margin-right: 16px; }
#museum-app .modern-logo-preview + .modern-logo-copy { padding-left: 16px; padding-right: 0; padding-inline-start: 0; padding-inline-end: 16px; }
#museum-app .modern-logo-preview + .modern-logo-copy[dir='ltr'] { padding-left: 16px; padding-right: 0; }

#museum-app .modern-logo-preview { padding: 4px; box-sizing: border-box; }


/* A single compact metadata row on desktop and mobile. */
#museum-app .record-meta { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, .85fr); gap: 10px 18px; align-items: start; }
#museum-app .record-meta > div { min-width: 0; padding: 0; border: 0; }
#museum-app .record-meta > div:only-child { grid-column: 1 / -1; }

@media (max-width: 750px) {
  #museum-app .record-meta > .record-sector,
  #museum-app .record-meta:has(> .record-sector:only-child) { display: none; }
  #museum-app .record-period > dt { display: none; }
  #museum-app .record-meta > .record-period {
    grid-column: 1 / -1;
    text-align: center;
  }
  #museum-app .entity-related-title { text-align: center; font-size: 18px; }
  #museum-app [lang='ar'] .entity-related-title { font-size: 21px; }
}


@media (max-width: 750px) {
  #museum-app .record-details .modern-logo-section { margin-inline: auto; margin-top: 34px; }
}


/* Downloads and the selected current logo form one coherent action group. */
#museum-app .record-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; margin-top: 24px; }
#museum-app .record-actions > div { min-width: 0; max-width: 100%; }
#museum-app .record-actions .record-downloads { margin-top: 0; justify-content: flex-start; }
#museum-app .record-details .record-actions .modern-logo-section { margin: 0; }
@media (max-width: 750px) {
  #museum-app .record-actions { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 16px; margin-top: 28px; }
  #museum-app .record-actions .record-downloads { justify-content: center; }
}

#museum-app .masthead { border-bottom: 0; }


@media (max-width: 650px) {
  #museum-app .museum-product { position: relative; z-index: 1; }
  #museum-app .museum-footer { position: relative; z-index: 0; }
}

body { box-sizing: border-box; }
#museum-app .museum-footer { padding-bottom: 12px; }

@media (max-width: 750px) {
  #museum-app .masthead { border-bottom: 1px solid #80745f83; }
}

#museum-app .museum-footer-credit img { width: 84px; height: auto; }


/* Proportional whitespace keeps larger mobile cards from overfilling with artwork. */
#museum-app .specimen-grid a.specimen-link > .specimen-mount > .specimen-artwork { inset: auto; left: 50%; top: 50%; width: 76%; height: 80%; transform: translate(-50%, -50%); }
@media (max-width: 650px) {
  #museum-app .specimen-grid a.specimen-link > .specimen-mount > .specimen-artwork { width: 72%; height: 76%; }
}


@media (max-width: 390px) {
  #museum-app .specimen-grid .specimen-date { display: none; }
}

#museum-app .masthead { border-bottom: 1px solid #80745f83; }

#museum-app .museum-product:not(.showing-record) .masthead { border-bottom: 0; }

@media (min-width: 751px) {
  #museum-app .record-details { padding-top: 34px; }
}


@media (min-width: 651px) and (max-width: 750px) {
  #museum-app .masthead { grid-template-columns: minmax(0, 1fr) auto; }
  #museum-app .masthead-top { grid-row: 1; grid-column: 2; }
  #museum-app .museum-identity { grid-row: 1; grid-column: 1; }
}


@media (max-width: 750px) {
  #museum-app .record-actions .record-download { min-height: 44px; height: auto; }
}


@media (min-width: 751px) {
  #museum-app .record-heading:not(:has(.record-secondary)) { margin-bottom: 18px; }
}

/* A shared paper tray holds the complete chronological logo history. */
#museum-app .entity-related { border-top: 0; padding-top: 0; }
#museum-app .entity-timeline {
  display: flex; gap: 12px; list-style: none; margin: 0; padding: 20px 16px;
  border: 1px solid #ae9874; border-radius: 16px;
  background-color: #fff9ec;
  background-image: linear-gradient(#fffdf2cc, #fff9ecc4), var(--paper-texture);
  box-shadow: inset 0 0 0 3px #fffdf280, inset 0 1px 5px #9b805322;
  overflow-x: auto;
}
#museum-app .entity-timeline li { flex: 1 0 98px; min-width: 0; }
#museum-app .entity-timeline-link {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: #6b5137; text-decoration: none; border: 0; padding: 4px;
  border-radius: 8px;
}
#museum-app .entity-timeline-link:hover { background: #fffdf480; }
#museum-app .entity-timeline-link:focus-visible { outline: 2px solid #79502f; outline-offset: 2px; }
#museum-app .entity-timeline-link .specimen-mount {
  position: relative; width: 100%; height: 84px; aspect-ratio: auto;
  padding: 0; background: none; border: 0; box-shadow: none;
}
#museum-app .entity-timeline-link .specimen-mount::before,
#museum-app .entity-timeline-link .specimen-mount::after { display: none; }
#museum-app .entity-timeline-link .specimen-artwork {
  position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px);
  max-width: none; max-height: none; object-fit: contain; transform: none;
}
#museum-app .entity-timeline-date { font-size: 13px; line-height: 1.6; white-space: nowrap; text-align: center; }
#museum-app [lang='ar'] .entity-timeline-date { font-size: 14px; }
@media (max-width: 750px) {
  #museum-app .entity-timeline { padding: 16px 12px; gap: 10px; }
  #museum-app .entity-timeline li { flex: 0 0 98px; }
  #museum-app .entity-timeline-link .specimen-mount { height: 72px; }
}

/* English reads from the label to the current artwork. */
#museum-app [lang='en'] .modern-logo-row.recessed-field .modern-logo-copy {
  grid-column: 1; grid-row: 1;
  border-left: 0; border-right: 1px solid #99877145;
  padding-left: 0; padding-right: 16px;
}
#museum-app [lang='en'] .modern-logo-row.recessed-field .modern-logo-preview {
  grid-column: 2; grid-row: 1; margin-right: 0; margin-left: 16px;
}

/* A mounted archival paper insert with a softly aged double ink rule. */
#museum-app .entity-timeline {
  border: 3px double #aa8b626b;
  border-radius: 8px;
  padding: 24px 18px 18px;
  background-color: #fff7e5;
  background-image:
    radial-gradient(ellipse at 0 0, #b7853830, transparent 45%),
    radial-gradient(ellipse at 100% 100%, #b7853824, transparent 42%),
    linear-gradient(#fffbea99, #fff7e580), var(--paper-texture);
  background-clip: padding-box;
  box-shadow: inset 0 0 14px #ad854821, 0 1px 1px #fffdf3c9,
    0 3px 5px #59402a22;
}
#museum-app .entity-timeline-link:hover { background: transparent; }
#museum-app .entity-timeline-date {
  border-top: 1px solid #aa8b6238;
  padding-top: 7px;
  width: 100%;
  color: #735739;
}
@media (max-width: 750px) {
  #museum-app .entity-timeline { padding: 20px 12px 16px; }
}

/* The ink perimeter is irregular and worn into the paper, rather than a CSS stroke. */
#museum-app .entity-timeline {
  border: 3px solid transparent;
  border-radius: 8px;
  background-image: url('/museum/assets/timeline-aged-rule.svg'),
    radial-gradient(ellipse at 0 0, #b7853826, transparent 45%),
    radial-gradient(ellipse at 100% 100%, #b785381c, transparent 42%),
    linear-gradient(#fffbea99, #fff7e580), var(--paper-texture);
  background-size: 100% 100%, auto, auto, auto, auto;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat;
  background-origin: border-box;
  background-clip: border-box;
  box-shadow: inset 0 0 18px #ad854818, 0 2px 4px #59402a1c;
}
#museum-app .entity-timeline-date { border-top: 0; }
