/* Public electronic catalog — isolated page styles */
.ecatalog {
  --ec-ink: #243247;
  --ec-muted: #64748b;
  --ec-blue: #1a3c6c;
  --ec-blue-2: #486daa;
  --ec-line: #e3eaf2;
  --ec-soft: #f4f7fb;
  --ec-paper: #ffffff;
  --ec-radius: 22px;
  color: var(--ec-ink);
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 0 64px;
  font-family: inherit;
  line-height: 1.5;
}
.ecatalog, .ecatalog * { box-sizing: border-box; }
.ecatalog button, .ecatalog input, .ecatalog select { font: inherit; }
.ecatalog button { cursor: pointer; }
.ecatalog button:focus-visible, .ecatalog input:focus-visible, .ecatalog select:focus-visible, .ecatalog a:focus-visible {
  outline: 3px solid rgba(72,109,170,.45);
  outline-offset: 3px;
}
.ecatalog-intro {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 276px;
  padding: 38px 48px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(118deg, #162f55 0%, #1a3c6c 55%, #486daa 100%);
  box-shadow: 0 16px 36px rgba(26,60,108,.14);
}
.ecatalog-intro::after {
  content: "";
  position: absolute;
  width: 440px;
  height: 440px;
  right: 2%;
  top: -240px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  box-shadow: 0 0 0 36px rgba(255,255,255,.035), 0 0 0 76px rgba(255,255,255,.025);
}
.ecatalog-intro-copy { position: relative; z-index: 2; max-width: 700px; }
.ecatalog-eyebrow, .ecatalog-section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.ecatalog-eyebrow { color: rgba(255,255,255,.76); }
.ecatalog-eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: #a8c7f0; box-shadow: 0 0 0 5px rgba(168,199,240,.13); }
.ecatalog-intro h1 { margin: 13px 0 10px; color: #fff; font-size: clamp(32px,4vw,48px); line-height: 1.08; font-weight: 750; letter-spacing: -.035em; }
.ecatalog-lead { max-width: 620px; margin: 0; color: rgba(255,255,255,.84); font-size: 16px; line-height: 1.65; }
.ecatalog-intro-meta { display: flex; align-items: center; gap: 10px; margin-top: 22px; color: rgba(255,255,255,.7); font-size: 12px; }
.ecatalog-meta-mark { display: inline-block; width: 18px; height: 1px; margin-right: 7px; vertical-align: middle; background: #9ebbe3; }
.ecatalog-intro-art { position: relative; z-index: 1; flex: 0 0 290px; height: 220px; margin-right: 22px; }
.ecatalog-art-orbit { position: absolute; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; }
.ecatalog-art-orbit-one { width: 230px; height: 230px; right: 15px; top: -5px; }
.ecatalog-art-orbit-two { width: 176px; height: 176px; right: 42px; top: 22px; border-style: dashed; opacity: .55; }
.ecatalog-art-book { position: absolute; bottom: 16px; width: 102px; height: 148px; border-radius: 5px 9px 9px 5px; box-shadow: 12px 14px 26px rgba(5,18,38,.22); transform-origin: bottom center; }
.ecatalog-art-book-back { right: 146px; background: linear-gradient(90deg,#c8d8eb 0 8px,#e6edf5 8px 100%); transform: rotate(-15deg); }
.ecatalog-art-book-mid { right: 90px; bottom: 10px; background: linear-gradient(90deg,#c59b68 0 8px,#e6cba7 8px 100%); transform: rotate(10deg); }
.ecatalog-art-book-front { right: 42px; bottom: 18px; display: flex; flex-direction: column; justify-content: space-between; padding: 18px 13px 12px 18px; color: #f8fbff; background: linear-gradient(145deg,#5c80b5,#294d7d); transform: rotate(2deg); }
.ecatalog-art-line { display: block; width: 26px; height: 2px; background: #c3d6ee; }
.ecatalog-art-title { font-family: Georgia,serif; font-size: 16px; line-height: 1.15; letter-spacing: -.02em; }
.ecatalog-art-small { font-size: 5px; letter-spacing: .12em; color: rgba(255,255,255,.7); }
.ecatalog-art-spark { position: absolute; width: 7px; height: 7px; border: 1px solid #d3e2f4; border-radius: 50%; }
.ecatalog-art-spark-one { right: 22px; top: 36px; }
.ecatalog-art-spark-two { right: 220px; top: 62px; width: 4px; height: 4px; background: #d3e2f4; }

.ecatalog-search-panel {
  position: relative;
  z-index: 3;
  margin: 14px 28px 0;
  padding: 27px 30px 22px;
  border: 1px solid rgba(226,234,244,.95);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(31,54,84,.09);
}
.ecatalog-search-heading, .ecatalog-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.ecatalog-section-kicker { color: #6f88a9; font-size: 10px; }
.ecatalog-search-heading h2, .ecatalog-section-heading h2 { margin: 4px 0 0; color: var(--ec-ink); font-size: 23px; line-height: 1.25; font-weight: 750; letter-spacing: -.025em; }
.ecatalog-search-hint { padding-bottom: 4px; color: #8a98aa; font-size: 12px; }
.ecatalog-search-form { display: grid; grid-template-columns: minmax(200px,1fr) 205px 132px; gap: 10px; margin-top: 18px; }
.ecatalog-search-input-wrap { display: flex; align-items: center; min-width: 0; height: 54px; padding: 0 14px; border: 1px solid #dbe4ef; border-radius: 12px; background: #fbfcfe; transition: border-color .18s, box-shadow .18s, background .18s; }
.ecatalog-search-input-wrap:focus-within { border-color: #7e9bc4; background: #fff; box-shadow: 0 0 0 4px rgba(72,109,170,.09); }
.ecatalog-search-input-wrap svg, .ecatalog-search-button svg, .ecatalog-text-button svg { flex: 0 0 auto; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ecatalog-search-input-wrap svg { color: #7187a4; margin-right: 11px; }
.ecatalog-search-input-wrap input { width: 100%; min-width: 0; height: 100%; border: 0; outline: 0; color: var(--ec-ink); background: transparent; font-size: 14px; box-shadow: none !important; }
.ecatalog-search-input-wrap input::placeholder { color: #9aa7b7; }
.ecatalog-clear-input { flex: 0 0 auto; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; color: #7b8797; background: transparent; font-size: 22px; line-height: 1; }
.ecatalog-clear-input:hover { color: var(--ec-blue); background: #edf3fa; }
.ecatalog-field-select select, .ecatalog-sort select { width: 100%; height: 54px; padding: 0 36px 0 14px; border: 1px solid #dbe4ef; border-radius: 12px; color: #34445b; background: #fbfcfe; font-size: 13px; cursor: pointer; }
.ecatalog-search-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 54px; padding: 0 18px; border: 1px solid #1a3c6c; border-radius: 12px; color: #fff; background: #1a3c6c; font-size: 14px; font-weight: 700; box-shadow: 0 7px 16px rgba(26,60,108,.16); transition: background .18s, transform .18s, box-shadow .18s; }
.ecatalog-search-button:hover { background: #254f86; box-shadow: 0 9px 20px rgba(26,60,108,.2); transform: translateY(-1px); }
.ecatalog-collections { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; margin-top: 17px; }
.ecatalog-collections-label { color: #78879a; font-size: 12px; font-weight: 600; }
.ecatalog-collection-options { display: flex; flex-wrap: wrap; gap: 7px; }
.ecatalog-collection-chip { min-height: 31px; padding: 5px 12px; border: 1px solid #e1e8f0; border-radius: 999px; color: #64748b; background: #fff; font-size: 11px; font-weight: 650; transition: all .16s; }
.ecatalog-collection-chip:hover { border-color: #9eb4d0; color: var(--ec-blue); }
.ecatalog-collection-chip.is-active { border-color: #d1deee; color: #1a3c6c; background: #eef4fb; }
.ecatalog-search-footnote { margin: 13px 0 0; color: #9aa6b5; font-size: 11px; }

.ecatalog-latest, .ecatalog-results { margin-top: 43px; }
.ecatalog-section-heading { margin: 0 0 19px; }
.ecatalog-section-heading h2 { font-size: 25px; }
.ecatalog-section-heading p { margin: 6px 0 0; color: #7c8a9d; font-size: 13px; }
.ecatalog-text-button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 2px; border: 0; color: #5b7598; background: transparent; font-size: 12px; font-weight: 700; }
.ecatalog-text-button:hover { color: #1a3c6c; }
.ecatalog-text-button svg { width: 16px; height: 16px; }
.ecatalog-record-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.ecatalog-book-card { min-width: 0; overflow: hidden; display: flex; flex-direction: column; padding: 13px; border: 1px solid #e5ebf2; border-radius: 16px; background: #fff; box-shadow: 0 5px 18px rgba(33,52,76,.035); transition: transform .2s, box-shadow .2s, border-color .2s; }
.ecatalog-book-card:hover { transform: translateY(-3px); border-color: #d2deeb; box-shadow: 0 12px 24px rgba(33,52,76,.08); }
.ecatalog-book-cover { position: relative; overflow: hidden; display: flex; align-items: flex-end; width: 100%; aspect-ratio: 1.52 / 1; margin-bottom: 12px; padding: 12px; border-radius: 10px; color: rgba(255,255,255,.94); background: linear-gradient(135deg,#45668e,#203d62); }
.ecatalog-book-cover::before { content: ""; position: absolute; width: 120px; height: 120px; right: -26px; top: -40px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; box-shadow: 0 0 0 16px rgba(255,255,255,.06),0 0 0 32px rgba(255,255,255,.04); }
.ecatalog-book-cover::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: rgba(255,255,255,.16); }
.ecatalog-book-cover span { position: relative; z-index: 1; max-width: 85%; font-family: Georgia,serif; font-size: 15px; line-height: 1.2; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,.16); }
.ecatalog-book-cover.cover-1 { background: linear-gradient(135deg,#7c6a55,#403a35); }
.ecatalog-book-cover.cover-2 { background: linear-gradient(135deg,#547b78,#254d53); }
.ecatalog-book-cover.cover-3 { background: linear-gradient(135deg,#947b9f,#51405e); }
.ecatalog-book-cover.cover-4 { background: linear-gradient(135deg,#9a6d65,#573d47); }
.ecatalog-book-cover.cover-5 { background: linear-gradient(135deg,#73839a,#34475f); }
.ecatalog-book-cover.cover-6 { background: linear-gradient(135deg,#9a865d,#5a4d35); }
.ecatalog-book-cover.cover-7 { background: linear-gradient(135deg,#5c7b9e,#2c4b70); }
.ecatalog-book-cover.cover-8 { background: linear-gradient(135deg,#65806c,#334e3c); }
.ecatalog-book-meta { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 7px; }
.ecatalog-collection-label { overflow: hidden; max-width: 80%; padding: 4px 7px; border-radius: 6px; color: #526b8a; background: #eff4fa; font-size: 9px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.ecatalog-year { flex: 0 0 auto; color: #8997a8; font-size: 10px; font-weight: 650; }
.ecatalog-book-title { display: -webkit-box; overflow: hidden; min-height: 42px; margin: 0; color: #25364c; font-size: 13px; line-height: 1.45; font-weight: 750; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ecatalog-book-author { display: -webkit-box; overflow: hidden; min-height: 18px; margin: 6px 0 0; color: #718096; font-size: 11px; line-height: 1.4; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.ecatalog-book-publisher { overflow: hidden; margin: 8px 0 0; color: #9aa5b3; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.ecatalog-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: auto; padding-top: 12px; }
.ecatalog-availability { display: inline-flex; align-items: center; gap: 6px; color: #78879a; font-size: 10px; font-weight: 650; }
.ecatalog-availability::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #aab5c3; }
.ecatalog-availability.is-available { color: #35785c; }
.ecatalog-availability.is-available::before { background: #46a37a; box-shadow: 0 0 0 3px rgba(70,163,122,.12); }
.ecatalog-card-open { flex: 0 0 auto; padding: 5px 0 5px 6px; border: 0; color: #456b9d; background: transparent; font-size: 10px; font-weight: 750; }
.ecatalog-card-open:hover { color: #1a3c6c; }

.ecatalog-results-list { display: flex; flex-direction: column; gap: 12px; }
.ecatalog-result-card { display: grid; grid-template-columns: 82px minmax(0,1fr) auto; align-items: center; gap: 17px; padding: 15px 17px; border: 1px solid #e4ebf3; border-radius: 15px; background: #fff; box-shadow: 0 4px 14px rgba(33,52,76,.025); transition: border-color .18s, box-shadow .18s; }
.ecatalog-result-card:hover { border-color: #cad8e8; box-shadow: 0 8px 20px rgba(33,52,76,.055); }
.ecatalog-result-cover { display: flex; align-items: flex-end; width: 82px; height: 104px; padding: 9px; border-radius: 7px; color: #fff; background: linear-gradient(145deg,#45668e,#203d62); box-shadow: inset 5px 0 rgba(255,255,255,.14); }
.ecatalog-result-cover span { overflow: hidden; display: -webkit-box; font-family: Georgia,serif; font-size: 10px; line-height: 1.15; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.ecatalog-result-cover.cover-1 { background: linear-gradient(145deg,#7c6a55,#403a35); }
.ecatalog-result-cover.cover-2 { background: linear-gradient(145deg,#547b78,#254d53); }
.ecatalog-result-cover.cover-3 { background: linear-gradient(145deg,#947b9f,#51405e); }
.ecatalog-result-cover.cover-4 { background: linear-gradient(145deg,#9a6d65,#573d47); }
.ecatalog-result-cover.cover-5 { background: linear-gradient(145deg,#73839a,#34475f); }
.ecatalog-result-cover.cover-6 { background: linear-gradient(145deg,#9a865d,#5a4d35); }
.ecatalog-result-cover.cover-7 { background: linear-gradient(145deg,#5c7b9e,#2c4b70); }
.ecatalog-result-cover.cover-8 { background: linear-gradient(145deg,#65806c,#334e3c); }
.ecatalog-result-main { min-width: 0; }
.ecatalog-result-kicker { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 5px; }
.ecatalog-result-title { display: inline; margin: 0; padding: 0; border: 0; color: #26374d; background: transparent; text-align: left; font-size: 15px; line-height: 1.4; font-weight: 750; }
.ecatalog-result-title:hover { color: #315e91; text-decoration: underline; text-underline-offset: 3px; }
.ecatalog-result-author { margin: 4px 0 0; color: #66778c; font-size: 12px; }
.ecatalog-result-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; color: #8996a7; font-size: 11px; }
.ecatalog-result-subjects { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.ecatalog-subject-chip { padding: 3px 7px; border-radius: 5px; color: #718096; background: #f4f6f9; font-size: 9px; }
.ecatalog-result-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; min-width: 130px; }
.ecatalog-result-side .ecatalog-availability { font-size: 10px; }
.ecatalog-result-open { padding: 8px 11px; border: 1px solid #d9e3ef; border-radius: 8px; color: #456b9d; background: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.ecatalog-result-open:hover { border-color: #a9bfd9; background: #f6f9fd; }

.ecatalog-state { display: flex; align-items: center; justify-content: center; gap: 11px; min-height: 120px; color: #7a8a9f; font-size: 13px; }
.ecatalog-spinner { display: inline-block; width: 19px; height: 19px; border: 2px solid #dbe5f0; border-top-color: #486daa; border-radius: 50%; animation: ecatalog-spin .75s linear infinite; }
@keyframes ecatalog-spin { to { transform: rotate(360deg); } }
.ecatalog-error { margin: 12px 0; padding: 14px 16px; border: 1px solid #f1d6d3; border-radius: 12px; color: #8a4c47; background: #fff8f7; font-size: 13px; }
.ecatalog-empty { padding: 42px 18px; border: 1px dashed #d9e3ed; border-radius: 16px; color: #78879a; background: #fafbfd; text-align: center; }
.ecatalog-empty strong { display: block; margin-bottom: 5px; color: #40536b; font-size: 15px; }
.ecatalog-empty span { font-size: 12px; }
.ecatalog-more-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 22px; }
.ecatalog-more-button { min-width: 190px; padding: 11px 20px; border: 1px solid #d8e3ef; border-radius: 10px; color: #355b89; background: #fff; font-size: 12px; font-weight: 750; transition: all .18s; }
.ecatalog-more-button:hover { border-color: #a7bdd7; background: #f5f8fc; }
.ecatalog-more-button:disabled { opacity: .55; cursor: wait; }
.ecatalog-more-caption { color: #9aa6b5; font-size: 10px; }
.ecatalog-sort { display: flex; align-items: center; gap: 9px; color: #8794a5; font-size: 11px; }
.ecatalog-sort select { width: auto; min-width: 170px; height: 38px; padding: 0 28px 0 10px; border-radius: 8px; font-size: 11px; }
.ecatalog-back-link { margin-top: 23px; padding: 6px 0; border: 0; color: #55749a; background: transparent; font-size: 12px; font-weight: 700; }
.ecatalog-back-link:hover { color: #1a3c6c; }

.ecatalog-bottom-note { display: flex; align-items: center; gap: 14px; margin-top: 46px; padding: 18px 21px; border: 1px solid #e3eaf2; border-radius: 15px; background: #f8fafc; }
.ecatalog-bottom-icon { display: grid; flex: 0 0 42px; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #54749d; background: #eaf1f9; }
.ecatalog-bottom-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ecatalog-bottom-note strong { display: block; color: #3a4d64; font-size: 12px; }
.ecatalog-bottom-note span { display: block; margin-top: 2px; color: #8190a2; font-size: 11px; }
.ecatalog-bottom-link { flex: 0 0 auto; margin-left: auto; color: #456b9d; font-size: 11px; font-weight: 750; text-decoration: none; }
.ecatalog-bottom-link:hover { color: #1a3c6c; text-decoration: underline; }

.ecatalog-modal[hidden], .ecatalog-results[hidden], .ecatalog-state[hidden], .ecatalog-error[hidden], .ecatalog-more-wrap[hidden] { display: none !important; }
.ecatalog-modal { position: fixed; z-index: 100000; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; }
.ecatalog-modal-backdrop { position: absolute; inset: 0; border: 0; background: rgba(16,30,48,.58); backdrop-filter: blur(4px); }
.ecatalog-modal-panel { position: relative; z-index: 1; overflow: hidden; display: flex; flex-direction: column; width: min(860px,100%); max-height: min(88vh,900px); border-radius: 20px; background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.24); }
.ecatalog-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 24px; border-bottom: 1px solid #e8edf3; background: #fbfcfe; }
.ecatalog-modal-header > div { display: flex; flex-direction: column; gap: 3px; }
.ecatalog-modal-collection { color: #7286a0; font-size: 11px; font-weight: 650; }
.ecatalog-modal-close { flex: 0 0 auto; width: 36px; height: 36px; padding: 0; border: 1px solid #e1e8f0; border-radius: 50%; color: #61738a; background: #fff; font-size: 25px; line-height: 1; }
.ecatalog-modal-close:hover { color: #1a3c6c; background: #f1f5fa; }
.ecatalog-modal-content { overflow: auto; padding: 26px 30px 30px; }
.ecatalog-detail-title { margin: 0 0 9px; color: #26374d; font-size: 25px; line-height: 1.25; font-weight: 780; letter-spacing: -.025em; }
.ecatalog-detail-author { margin: 0 0 19px; color: #64778e; font-size: 14px; }
.ecatalog-detail-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 0 0 23px; }
.ecatalog-detail-fact { padding: 12px 14px; border: 1px solid #e8edf3; border-radius: 10px; background: #fafbfd; }
.ecatalog-detail-fact span { display: block; color: #8a98a9; font-size: 10px; }
.ecatalog-detail-fact strong { display: block; margin-top: 4px; color: #3b4f68; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.ecatalog-detail-section { margin-top: 22px; }
.ecatalog-detail-section h3 { margin: 0 0 10px; color: #3b506a; font-size: 14px; font-weight: 750; }
.ecatalog-detail-section p { margin: 0; color: #65768b; font-size: 12px; line-height: 1.7; white-space: pre-line; }
.ecatalog-detail-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ecatalog-detail-list li { padding: 6px 9px; border-radius: 7px; color: #65768b; background: #f1f5f9; font-size: 11px; }
.ecatalog-holdings { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.ecatalog-holding { padding: 12px 13px; border: 1px solid #e5ebf2; border-radius: 11px; background: #fff; }
.ecatalog-holding-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ecatalog-holding-place { color: #40546c; font-size: 12px; font-weight: 750; }
.ecatalog-holding-status { padding: 3px 7px; border-radius: 999px; color: #6d7d90; background: #f1f4f7; font-size: 9px; font-weight: 750; white-space: nowrap; }
.ecatalog-holding-status.is-free { color: #2e7959; background: #eaf6ef; }
.ecatalog-holding-shelf { margin-top: 7px; color: #7c8b9e; font-size: 11px; }
.ecatalog-holding-empty { padding: 14px; border-radius: 10px; color: #7b899b; background: #f6f8fa; font-size: 11px; }
.ecatalog-noscript { margin-top: 20px; padding: 15px; border-radius: 10px; color: #744b36; background: #fff5e9; }
.visually-hidden { position: absolute !important; overflow: hidden !important; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; margin: -1px !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; }

@media (max-width: 1100px) {
  .ecatalog { padding-top: 18px; }
  .ecatalog-intro { padding: 32px 36px; }
  .ecatalog-intro-art { margin-right: -5px; transform: scale(.88); transform-origin: right center; }
  .ecatalog-record-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .ecatalog-intro { min-height: 245px; padding: 30px 28px; }
  .ecatalog-intro-art { flex-basis: 220px; margin-right: -28px; transform: scale(.72); }
  .ecatalog-search-panel { margin-right: 14px; margin-left: 14px; padding: 22px; }
  .ecatalog-search-form { grid-template-columns: minmax(0,1fr) 180px; }
  .ecatalog-search-button { grid-column: 1 / -1; }
  .ecatalog-search-button { height: 48px; }
  .ecatalog-search-input-wrap, .ecatalog-field-select select { height: 49px; }
  .ecatalog-record-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ecatalog-result-card { grid-template-columns: 68px minmax(0,1fr); gap: 13px; }
  .ecatalog-result-cover { width: 68px; height: 90px; }
  .ecatalog-result-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; min-width: 0; }
}
@media (max-width: 600px) {
  .ecatalog { padding: 12px 0 38px; }
  .ecatalog-intro { min-height: 0; padding: 27px 22px 30px; border-radius: 19px; }
  .ecatalog-intro h1 { max-width: 340px; font-size: 34px; }
  .ecatalog-lead { max-width: 420px; font-size: 14px; }
  .ecatalog-intro-meta { max-width: 300px; font-size: 10px; line-height: 1.5; }
  .ecatalog-intro-art { position: absolute; right: -75px; bottom: -55px; width: 220px; height: 190px; opacity: .38; transform: scale(.8); }
  .ecatalog-search-panel { margin: 10px 8px 0; padding: 19px 15px 16px; border-radius: 16px; }
  .ecatalog-search-heading { align-items: flex-start; }
  .ecatalog-search-heading h2 { font-size: 20px; }
  .ecatalog-search-hint { display: none; }
  .ecatalog-search-form { grid-template-columns: 1fr; gap: 8px; margin-top: 14px; }
  .ecatalog-search-input-wrap { height: 50px; }
  .ecatalog-field-select select { height: 46px; }
  .ecatalog-search-button { grid-column: auto; height: 48px; }
  .ecatalog-collections { align-items: flex-start; flex-direction: column; gap: 7px; }
  .ecatalog-collection-options { gap: 6px; }
  .ecatalog-collection-chip { min-height: 30px; padding: 5px 9px; font-size: 10px; }
  .ecatalog-search-footnote { font-size: 10px; }
  .ecatalog-latest, .ecatalog-results { margin-top: 32px; }
  .ecatalog-section-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .ecatalog-section-heading h2 { font-size: 22px; }
  .ecatalog-section-heading p { font-size: 11px; }
  .ecatalog-record-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .ecatalog-book-card { padding: 9px; border-radius: 12px; }
  .ecatalog-book-cover { margin-bottom: 9px; padding: 8px; border-radius: 8px; }
  .ecatalog-book-cover span { font-size: 12px; }
  .ecatalog-book-title { min-height: 39px; font-size: 11px; }
  .ecatalog-book-author { font-size: 10px; }
  .ecatalog-book-publisher { font-size: 9px; }
  .ecatalog-card-footer { align-items: flex-start; flex-direction: column; gap: 3px; padding-top: 8px; }
  .ecatalog-availability { font-size: 9px; }
  .ecatalog-card-open { padding: 3px 0; font-size: 10px; }
  .ecatalog-results-heading { gap: 12px; }
  .ecatalog-sort { width: 100%; justify-content: space-between; }
  .ecatalog-sort select { min-width: 0; max-width: 65%; }
  .ecatalog-result-card { grid-template-columns: 56px minmax(0,1fr); gap: 10px; padding: 11px; border-radius: 12px; }
  .ecatalog-result-cover { width: 56px; height: 78px; padding: 6px; }
  .ecatalog-result-cover span { font-size: 8px; }
  .ecatalog-result-title { font-size: 12px; }
  .ecatalog-result-author { font-size: 10px; }
  .ecatalog-result-meta { gap: 4px 9px; margin-top: 6px; font-size: 9px; }
  .ecatalog-result-side { grid-column: 2; gap: 6px; }
  .ecatalog-result-open { padding: 6px 8px; font-size: 9px; }
  .ecatalog-bottom-note { align-items: flex-start; flex-wrap: wrap; gap: 10px; margin-top: 32px; padding: 14px; }
  .ecatalog-bottom-icon { flex-basis: 36px; width: 36px; height: 36px; }
  .ecatalog-bottom-note > div:nth-child(2) { flex: 1; min-width: 180px; }
  .ecatalog-bottom-link { margin-left: 46px; }
  .ecatalog-modal { align-items: flex-end; padding: 0; }
  .ecatalog-modal-panel { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .ecatalog-modal-header { padding: 15px 17px; }
  .ecatalog-modal-content { padding: 21px 17px 26px; }
  .ecatalog-detail-title { font-size: 21px; }
  .ecatalog-detail-author { font-size: 12px; }
  .ecatalog-detail-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ecatalog-holdings { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .ecatalog-record-grid { grid-template-columns: 1fr; }
  .ecatalog-book-card { display: grid; grid-template-columns: 82px minmax(0,1fr); gap: 0 11px; }
  .ecatalog-book-cover { grid-row: span 4; width: 82px; height: 108px; aspect-ratio: auto; margin: 0; }
  .ecatalog-book-meta { align-self: end; }
  .ecatalog-book-title { min-height: 0; }
  .ecatalog-book-author { min-height: 0; }
  .ecatalog-card-footer { grid-column: 2; flex-direction: row; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  .ecatalog *, .ecatalog *::before, .ecatalog *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body.ecatalog-modal-open { overflow: hidden; }
.ecatalog-search-button:disabled, .ecatalog-text-button:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.ecatalog-collection-chip:disabled { opacity: .55; cursor: not-allowed; }
.ecatalog-holdings-note { margin: 9px 0 0; color: #8a98a9; font-size: 10px; line-height: 1.5; }


/* Narrow link to the regional kraevedenie catalog. */
.ecatalog-kray-banner {
  display: flex; align-items: center; gap: 14px; min-height: 88px; max-height: 104px;
  margin: 14px 0 0; padding: 13px 22px; overflow: hidden;
  border: 1px solid #dce6f1; border-radius: 16px; color: #2b4565;
  background: linear-gradient(100deg,#f4f8fd 0%,#edf3fa 62%,#e7eff8 100%);
  text-decoration: none; transition: border-color .18s, transform .18s, box-shadow .18s;
}
.ecatalog-kray-banner:hover { border-color: #b8cbe1; color: #1a3c6c; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(33,60,94,.07); }
.ecatalog-kray-icon { display: grid; flex: 0 0 46px; place-items: center; width: 46px; height: 46px; border-radius: 13px; color: #476b96; background: #dfe9f5; }
.ecatalog-kray-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ecatalog-kray-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 3px; }
.ecatalog-kray-copy strong { color: #294563; font-size: 13px; line-height: 1.3; }
.ecatalog-kray-copy small { color: #73869d; font-size: 11px; line-height: 1.35; }
.ecatalog-kray-action { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid #d2deeb; border-radius: 9px; color: #365d8b; background: rgba(255,255,255,.72); font-size: 11px; font-weight: 750; }

/* Multiple search criteria. */
.ecatalog-search-form { display: block; }
.ecatalog-criteria-list { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.ecatalog-criteria-row { display: grid; grid-template-columns: minmax(200px,1fr) 205px 36px; gap: 9px; align-items: center; animation: ecatalog-criterion-in .22s ease-out both; }
.ecatalog-criteria-row .ecatalog-search-input-wrap, .ecatalog-criteria-row .ecatalog-field-select select { height: 50px; }
.ecatalog-criterion-remove { width: 36px; height: 36px; padding: 0; border: 1px solid #e2e8f0; border-radius: 10px; color: #8492a4; background: #fff; font-size: 21px; line-height: 1; }
.ecatalog-criterion-remove:hover:not(:disabled) { border-color: #e3c7c4; color: #a45650; background: #fff8f7; }
.ecatalog-criterion-remove:disabled { opacity: .25; cursor: default; }
.ecatalog-criteria-toolbar { display: flex; align-items: center; gap: 14px; margin-top: 11px; }
.ecatalog-add-criterion { padding: 7px 0; border: 0; color: #486b95; background: transparent; font-size: 11px; font-weight: 750; }
.ecatalog-add-criterion:hover:not(:disabled) { color: #1a3c6c; }
.ecatalog-add-criterion:disabled { opacity: .45; cursor: not-allowed; }
.ecatalog-criteria-hint { color: #97a3b2; font-size: 10px; }
.ecatalog-criteria-toolbar .ecatalog-search-button { margin-left: auto; min-width: 132px; height: 48px; }
@keyframes ecatalog-criterion-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

/* Tabs and sorting for the initial feed. */
.ecatalog-latest-actions { display: flex; align-items: center; gap: 17px; }
.ecatalog-latest-sort select { height: 36px; min-width: 165px; }
.ecatalog-latest-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 17px; padding-bottom: 12px; border-bottom: 1px solid #e8edf3; }
.ecatalog-latest-tab { min-height: 34px; padding: 7px 13px; border: 1px solid #e0e7ef; border-radius: 999px; color: #687b91; background: #fff; font-size: 11px; font-weight: 700; transition: all .16s; }
.ecatalog-latest-tab:hover:not(:disabled) { border-color: #b9cbe0; color: #315d8f; }
.ecatalog-latest-tab.is-active { border-color: #cbd9e9; color: #1a3c6c; background: #edf3fa; }
.ecatalog-latest-tab:disabled { opacity: .55; cursor: wait; }

/* Animated search loader with changing editorial messages. */
.ecatalog-search-loader { position: relative; display: flex; align-items: center; gap: 15px; min-height: 118px; margin: 8px 0 15px; padding: 22px 24px; overflow: hidden; border: 1px solid #e1eaf4; border-radius: 16px; background: linear-gradient(110deg,#f8fbff,#f1f6fc); }
.ecatalog-search-loader[hidden] { display: none !important; }
.ecatalog-search-loader .ecatalog-spinner { width: 30px; height: 30px; border-width: 3px; }
.ecatalog-search-loader-copy { display: flex; flex-direction: column; gap: 3px; }
.ecatalog-search-loader-copy strong { color: #3d5879; font-size: 12px; }
.ecatalog-search-loader-copy span { color: #254a75; font-size: 15px; font-weight: 750; transition: opacity .18s, transform .18s; }
.ecatalog-search-loader-copy span.is-changing { animation: ecatalog-message-change .3s ease both; }
.ecatalog-search-loader-copy small { color: #94a2b3; font-size: 10px; }
.ecatalog-loader-track { position: absolute; right: 22px; bottom: 0; left: 22px; height: 3px; overflow: hidden; border-radius: 5px 5px 0 0; background: #e1eaf4; }
.ecatalog-loader-track span { display: block; width: 34%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#7798c0,#315f96); animation: ecatalog-loader-progress 1.7s ease-in-out infinite; }
@keyframes ecatalog-message-change { from { opacity: .15; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ecatalog-loader-progress { 0% { transform: translateX(-110%); } 100% { transform: translateX(330%); } }

@media (max-width: 820px) {
  .ecatalog-criteria-row { grid-template-columns: minmax(0,1fr) 180px 34px; gap: 7px; }
  .ecatalog-criteria-row .ecatalog-search-input-wrap, .ecatalog-criteria-row .ecatalog-field-select select { height: 47px; }
  .ecatalog-criterion-remove { width: 34px; height: 34px; }
  .ecatalog-latest-actions { flex-wrap: wrap; justify-content: flex-start; }
}
@media (max-width: 600px) {
  .ecatalog-kray-banner { min-height: 76px; max-height: 88px; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 13px; }
  .ecatalog-kray-icon { flex-basis: 38px; width: 38px; height: 38px; border-radius: 10px; }
  .ecatalog-kray-icon svg { width: 20px; height: 20px; }
  .ecatalog-kray-copy strong { font-size: 11px; }
  .ecatalog-kray-copy small { font-size: 9px; }
  .ecatalog-kray-action { gap: 4px; padding: 7px 8px; font-size: 9px; }
  .ecatalog-criteria-list { gap: 8px; margin-top: 13px; }
  .ecatalog-criteria-row { grid-template-columns: minmax(0,1fr) 32px; gap: 6px; }
  .ecatalog-criteria-row .ecatalog-search-input-wrap { grid-column: 1; height: 48px; }
  .ecatalog-criteria-row .ecatalog-field-select { grid-column: 1; grid-row: 2; }
  .ecatalog-criteria-row .ecatalog-field-select select { height: 43px; }
  .ecatalog-criterion-remove { grid-column: 2; grid-row: 1 / span 2; width: 32px; height: 32px; }
  .ecatalog-criteria-toolbar { flex-wrap: wrap; gap: 7px 12px; }
  .ecatalog-criteria-toolbar .ecatalog-search-button { flex: 1 0 100%; width: 100%; margin-left: 0; }
  .ecatalog-criteria-hint { margin-left: auto; font-size: 9px; }
  .ecatalog-latest-actions { width: 100%; justify-content: space-between; gap: 8px; }
  .ecatalog-latest-sort { flex: 1; gap: 5px; }
  .ecatalog-latest-sort select { width: 100%; min-width: 0; max-width: 175px; }
  .ecatalog-latest-tabs { gap: 6px; margin-bottom: 12px; }
  .ecatalog-latest-tab { min-height: 31px; padding: 6px 9px; font-size: 9px; }
  .ecatalog-search-loader { min-height: 105px; padding: 18px 15px; gap: 11px; }
  .ecatalog-search-loader-copy span { font-size: 13px; }
  .ecatalog-loader-track { right: 15px; left: 15px; }
}


/* Mobile readability and reliable search-loader animation overrides. */
.ecatalog-search-loader { min-width: 0; }
.ecatalog-search-loader > .ecatalog-spinner { flex: 0 0 30px; animation: ecatalog-spin .85s linear infinite !important; will-change: transform; }
.ecatalog-search-loader-copy { flex: 1 1 auto; min-width: 0; }
.ecatalog-search-loader-copy span { display: block; min-width: 0; line-height: 1.4; overflow-wrap: anywhere; }
.ecatalog-search-loader-copy strong, .ecatalog-search-loader-copy small { line-height: 1.4; }
@media (max-width: 600px) {
  .ecatalog-record-grid { align-items: stretch; }
  .ecatalog-book-card { min-width: 0; min-height: 0; height: 100%; padding: 10px; }
  .ecatalog-book-cover { flex: 0 0 auto; min-width: 0; }
  .ecatalog-book-cover span { max-width: 100%; font-size: clamp(12px, 3.2vw, 14px); line-height: 1.18; overflow-wrap: anywhere; }
  .ecatalog-book-meta { min-width: 0; }
  .ecatalog-collection-label { max-width: calc(100% - 42px); font-size: 10px; }
  .ecatalog-year { font-size: 11px; }
  .ecatalog-book-title { min-height: 0; height: auto; font-size: clamp(12px, 3.25vw, 14px); line-height: 1.38; overflow-wrap: anywhere; -webkit-line-clamp: 3; }
  .ecatalog-book-author { min-height: 0; height: auto; font-size: clamp(11px, 2.9vw, 12px); line-height: 1.4; overflow-wrap: anywhere; -webkit-line-clamp: 2; }
  .ecatalog-book-publisher { font-size: 10px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .ecatalog-card-footer { align-items: flex-start; flex-direction: column; gap: 5px; padding-top: 10px; }
  .ecatalog-availability { max-width: 100%; font-size: 10px; line-height: 1.35; white-space: normal; }
  .ecatalog-card-open { font-size: 12px; line-height: 1.35; white-space: normal; }
  .ecatalog-result-card { min-width: 0; }
  .ecatalog-result-main { min-width: 0; overflow-wrap: anywhere; }
  .ecatalog-result-title { font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
  .ecatalog-result-author { font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
  .ecatalog-result-meta { font-size: 10px; line-height: 1.4; }
  .ecatalog-search-loader { min-height: 112px; padding: 17px 14px 20px; gap: 11px; }
  .ecatalog-search-loader > .ecatalog-spinner { flex-basis: 26px; width: 26px; height: 26px; }
  .ecatalog-search-loader-copy strong { font-size: 11px; }
  .ecatalog-search-loader-copy span { font-size: clamp(13px, 3.6vw, 15px); }
  .ecatalog-search-loader-copy small { font-size: 10px; }
}
@media (max-width: 380px) {
  .ecatalog-book-card { height: auto; }
  .ecatalog-book-title { font-size: 14px; }
  .ecatalog-book-author { font-size: 12px; }
  .ecatalog-book-publisher { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .ecatalog-search-loader > .ecatalog-spinner { animation: ecatalog-spin 1.4s linear infinite !important; }
}


/* The latest-records panel uses the same animated loader as search. */
.ecatalog-latest-loader { width: 100%; margin: 14px 0 18px; }
