/* Biblioteca UPECU · 1.0.1. Additive theme for the audited Koha 25.05.15 DOM.
   The upecu-premium body class is a kill switch. Secondary pages keep their
   native forms, results, record tables and dialogs; only the shell is themed. */
body.upecu-premium {
  --up-navy: #101c38;
  --up-navy-light: #19294a;
  --up-accent: #4936ad;
  --up-accent-hover: #38258e;
  --up-accent-soft: #efedf8;
  --up-ink: #19243a;
  --up-muted: #5b6576;
  --up-line: #e0e4eb;
  --up-canvas: #f8f9fc;
  --up-surface: #fff;
  --up-focus: #7664d8;
  --up-width: 1200px;
  --up-gutter: clamp(20px, 4vw, 56px);
  --up-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --up-serif: Georgia, "Times New Roman", serif;
  --up-ease: 180ms ease;
  /* Retain legacy colors outside the shell; remove gold from new components. */
  --upecu-content-width: var(--up-width);
  --upecu-gutter: var(--up-gutter);
  color: var(--up-ink);
  background: var(--up-canvas);
  font-family: var(--up-sans);
  -webkit-font-smoothing: antialiased;
}
body.upecu-premium :is(.up-nav, .upecu-hero, .upecu-search, .upecu-featured, .upecu-home-section, .upecu-footer) *,
body.upecu-premium :is(.up-nav, .upecu-hero, .upecu-search, .upecu-featured, .upecu-home-section, .upecu-footer) *::before,
body.upecu-premium :is(.up-nav, .upecu-hero, .upecu-search, .upecu-featured, .upecu-home-section, .upecu-footer) *::after { box-sizing: border-box; }
body.upecu-premium :is(a, button, input, select, [tabindex]):focus-visible {
  outline: 3px solid var(--up-focus) !important;
  outline-offset: 4px;
}
body.upecu-premium ::selection { color: var(--up-ink); background: #ddd8f4; }
body.upecu-premium .up-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
/* The existing Koha navbar and controls retain their IDs and event handlers. */
body.upecu-premium #header-region { background: var(--up-surface); border: 0; }
body.upecu-premium #header-region > .navbar {
  position: relative; z-index: 102;
  max-width: var(--up-width); min-height: 88px; padding: 12px var(--up-gutter);
  margin: 0 auto; gap: 20px; background: var(--up-surface); align-items: center;
}
body.upecu-premium #header-region #logo { margin: 0; flex: 0 0 auto; }
body.upecu-premium #header-region .navbar:has(#cart-list-nav) #logo { flex: 0 0 auto; }
body.upecu-premium #header-region #logo .navbar-brand {
  display: flex; align-items: center; gap: 12px; width: auto; max-width: none;
  padding: 0; margin: 0; overflow: visible; color: var(--up-ink);
  background: none; font: 600 16px/1.3 var(--up-sans); letter-spacing: -.025em;
  text-decoration: none; text-indent: 0; white-space: nowrap;
}
body.upecu-premium #header-region #logo .navbar-brand::before,
body.upecu-premium #header-region #logo .navbar-brand::after { content: none; background: none; }
body.upecu-premium .up-brand-image { width: 54px; height: 54px; object-fit: contain; flex: 0 0 auto; }
body.upecu-premium .up-brand-copy { display: grid; gap: 3px; }
body.upecu-premium .up-brand-copy small { color: var(--up-muted); font-size: 10px; font-weight: 400; letter-spacing: .06em; }
body.upecu-premium .up-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
body.upecu-premium .up-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px;
  color: var(--up-muted); border-radius: 5px; font-size: 13px; font-weight: 500;
  text-decoration: none; transition: color var(--up-ease), background var(--up-ease);
}
body.upecu-premium .up-nav a[aria-current="page"] { color: var(--up-accent); background: var(--up-accent-soft); }
body.upecu-premium .up-nav a:hover { color: var(--up-accent); background: var(--up-accent-soft); }
body.upecu-premium #header-region :is(#cart-list-nav, #members) { margin: 0; gap: 4px; flex: 0 0 auto; min-width: 0; width: auto; }
body.upecu-premium #header-region .navbar:has(#cart-list-nav) #cart-list-nav { flex: 0 0 auto; }
body.upecu-premium #header-region .navbar-nav .nav-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; min-width: 44px; padding: 8px; color: var(--up-muted);
  font-size: 12px; font-weight: 500; border-radius: 5px; white-space: nowrap;
  transition: color var(--up-ease), background var(--up-ease);
}
body.upecu-premium #header-region .navbar-nav .nav-link:hover { background: var(--up-accent-soft); color: var(--up-accent); }
body.upecu-premium #header-region .fa-icon-black { color: inherit; }
body.upecu-premium #header-region .divider-vertical { display: none; }
body.upecu-premium #header-region .login-link { color: var(--up-accent); }
body.upecu-premium #header-region .dropdown-menu { color: var(--up-ink); background: #fff; border-color: var(--up-line); }
body.upecu-premium #header-region .dropdown-item { color: var(--up-ink); }
body.upecu-premium #header-region .dropdown-item:hover { background: var(--up-accent-soft); }
/* Original vector linework, no photograph or generated scenery. */
body.upecu-premium #opacheader { margin: 0; }
body.upecu-premium .upecu-hero__mark { display: none; }
body.upecu-premium .upecu-hero {
  position: relative; isolation: isolate; border: 0; color: #fff;
  background: linear-gradient(112deg, var(--up-navy), var(--up-navy-light));
}
body.upecu-premium .upecu-hero::before {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; content: "";
  background: url("../svg/knowledge-lines.svg") center / cover no-repeat;
}
body.upecu-premium .upecu-hero__inner {
  display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: center;
  max-width: var(--up-width); min-height: 340px; margin: 0 auto;
  gap: 48px; padding: 38px calc(var(--up-gutter) + 16px) 66px;
}
body.upecu-premium .upecu-hero__copy { justify-self: start; text-align: left; min-width: 0; }
body.upecu-premium .upecu-hero .upecu-kicker {
  display: flex; align-items: center; gap: 12px; margin: 0 0 22px;
  color: #c9d1e6; font: 500 10px/1.6 var(--up-sans); letter-spacing: .16em;
}
body.upecu-premium .upecu-hero .upecu-kicker::before { content: ""; width: 28px; height: 1px; background: #a69ddd; flex: 0 0 auto; }
body.upecu-premium .upecu-hero__title {
  margin: 0; color: #fff; font: 400 clamp(36px, 4.6vw, 61px)/1.08 var(--up-serif);
  letter-spacing: -.045em;
}
body.upecu-premium .upecu-hero__description {
  display: block; max-width: none; margin: 18px 0 0; color: #d5dced;
  font: 400 19px/1.5 var(--up-sans); letter-spacing: .01em;
}
body.upecu-premium .upecu-hero__mascot {
  align-self: end; justify-self: center; width: 208px; height: 285px;
  margin: -16px 0 -28px; overflow: visible; border: 0; border-radius: 0;
  background: none; box-shadow: none;
}
body.upecu-premium .upecu-hero__mascot img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
body.upecu-premium:not(#opac-main) #opacheader .upecu-hero { display: none; }
/* Existing idx/q form: presentation only. No submit interception. */
body.upecu-premium #opac-main-search.mastheadsearch {
  position: relative; z-index: 101; max-width: var(--up-width); margin: 0 auto;
  padding: 0 var(--up-gutter); background: transparent;
}
body#opac-main.upecu-premium #opac-main-search.mastheadsearch { margin-top: -42px; }
body.upecu-premium #wrapper > .container-fluid:has(#opac-main-search) {
  max-width: var(--up-width); margin-inline: auto; padding-inline: var(--up-gutter);
}
body.upecu-premium #wrapper > .container-fluid:has(#opac-main-search) > .row { margin-inline: 0; }
body.upecu-premium #wrapper > .container-fluid:has(#opac-main-search) > .row > .col { padding-inline: 0; }
body.upecu-premium #wrapper > .container-fluid #opac-main-search.mastheadsearch { padding-inline: 0; }
body.upecu-premium .upecu-search {
  padding: 24px 28px 14px; border: 1px solid var(--up-line); border-radius: 10px;
  background: var(--up-surface); box-shadow: 0 8px 26px rgb(16 28 56 / 5%);
}
body#opac-main.upecu-premium .upecu-search { padding-bottom: 0; border-bottom: 0; border-radius: 10px 10px 0 0; }
body.upecu-premium .upecu-search__intro { align-items: center; gap: 16px; margin-bottom: 18px; }
body.upecu-premium .upecu-search__intro .upecu-kicker { display: none; }
body.upecu-premium .upecu-search__intro h2 { color: var(--up-ink); font: 400 23px/1.25 var(--up-serif); letter-spacing: -.02em; }
body.upecu-premium .upecu-search__intro > p { color: var(--up-muted); font-size: 12px; }
body.upecu-premium .upecu-search__form {
  display: grid; grid-template-columns: 185px minmax(0, 1fr) 120px; gap: 0;
  overflow: visible; align-items: stretch; min-height: 56px; padding: 0;
  border: 1px solid #bfc6d3; border-radius: 5px; background: #fff;
}
body.upecu-premium .upecu-search__form:focus-within { border-color: var(--up-accent); box-shadow: 0 0 0 3px #efedf8; }
body.upecu-premium .upecu-search__select-wrap { background: #f8f9fc; border-right: 1px solid var(--up-line); border-radius: 5px 0 0 5px; }
body.upecu-premium .upecu-search__select-wrap::after { border-color: var(--up-muted); }
body.upecu-premium :is(.upecu-search__select, .upecu-search__input) {
  width: 100%; height: 100%; min-height: 56px; margin: 0; border: 0; border-radius: 5px;
  color: var(--up-ink); font: 400 14px/1.4 var(--up-sans); box-shadow: none;
}
body.upecu-premium .upecu-search__select { padding: 12px 36px 12px 16px; }
body.upecu-premium .upecu-search__input { padding: 12px 16px 12px 42px; }
body.upecu-premium .upecu-search__input::placeholder { color: #737d8d; font-size: 14px; }
body.upecu-premium .upecu-search__input-icon { color: #747b91; left: 15px; }
body.upecu-premium .upecu-search__button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 0; min-height: 48px; padding: 10px 18px; margin: 4px; border: 0; border-radius: 4px;
  color: #fff; background: var(--up-accent); font: 600 13px/1.3 var(--up-sans);
  transition: background var(--up-ease);
}
body.upecu-premium .upecu-search__button:hover { background: var(--up-accent-hover); }
body.upecu-premium .upecu-search__button svg { width: 16px; height: 16px; }
body.upecu-premium #moresearches {
  max-width: var(--up-width); justify-content: flex-start; gap: 20px;
  margin: 0 auto; padding: 13px var(--up-gutter) 0;
}
body.upecu-premium .upecu-search #moresearches { padding: 12px 0 0; gap: 18px; }
body.upecu-premium #moresearches .nav-item + .nav-item::before { display: none; }
body.upecu-premium #moresearches .nav-item { border: 0; }
body.upecu-premium #moresearches .nav-item a { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 0; color: var(--up-muted); font-size: 11px; }
body.upecu-premium #moresearches .nav-item a:hover { color: var(--up-accent); }
body#opac-main.upecu-premium #moresearches {
  position: relative; z-index: 101; width: calc(100% - var(--up-gutter) - var(--up-gutter));
  max-width: calc(var(--up-width) - var(--up-gutter) - var(--up-gutter));
  padding: 12px 28px 14px; margin: -1px auto 0; gap: 18px;
  border: 1px solid var(--up-line); border-top: 0; border-radius: 0 0 10px 10px;
  background: #fff; box-shadow: 0 12px 20px rgb(16 28 56 / 3%);
}
body.upecu-premium:not(#opac-main) #opac-main-search.mastheadsearch { margin-top: 12px; }
body#opac-main.upecu-premium #wrapper > .container-fluid #moresearches { width: 100%; max-width: none; }
body.upecu-premium:not(#opac-main) .upecu-search { padding: 14px 20px; }
body.upecu-premium:not(#opac-main) .upecu-search__intro { display: none; }
/* The featured cards are the nine existing catalogue records, unchanged. */
body#opac-main.upecu-premium .main { padding-top: 0; margin: 0; border: 0; border-radius: 0; background: var(--up-canvas); box-shadow: none; }
body#opac-main.upecu-premium #breadcrumbs { display: none; }
body#opac-main.upecu-premium .upecu-featured-host { max-width: var(--up-width); padding: 0 var(--up-gutter); margin: 46px auto 0; }
body#opac-main.upecu-premium .upecu-featured { padding: 0; border: 0; background: transparent; box-shadow: none; }
body#opac-main.upecu-premium .upecu-kicker { margin-bottom: 9px; color: var(--up-accent); font-size: 10px; font-weight: 600; line-height: 1.5; letter-spacing: .12em; }
body#opac-main.upecu-premium .upecu-hero .upecu-kicker { color: #c9d1e6; margin-bottom: 22px; font-weight: 500; letter-spacing: .16em; }
body#opac-main.upecu-premium .upecu-section-heading { margin-bottom: 24px; gap: 16px; align-items: flex-end; }
body#opac-main.upecu-premium .upecu-section-heading h2 { color: var(--up-ink); font: 400 30px/1.2 var(--up-serif); letter-spacing: -.025em; }
body#opac-main.upecu-premium .upecu-section-heading > a { color: var(--up-accent); font-size: 12px; font-weight: 500; min-height: 30px; display: flex; align-items: center; gap: 8px; }
body#opac-main.upecu-premium .upecu-section-heading > a::after { content: "↗"; font-size: 16px; }
body#opac-main.upecu-premium .upecu-carousel__track {
  grid-auto-columns: calc((100% - 80px) / 5); gap: 20px;
  padding: 4px 0 12px; margin: -4px 0 0; scroll-padding-inline: 2px;
  scrollbar-width: none; scroll-snap-type: x mandatory;
}
body#opac-main.upecu-premium .upecu-carousel__track::-webkit-scrollbar { display: none; }
body#opac-main.upecu-premium .upecu-book > a {
  overflow: hidden; padding: 0 0 16px; color: var(--up-ink); background: #fff;
  border: 1px solid var(--up-line); border-radius: 6px; box-shadow: none;
  transition: border-color var(--up-ease), box-shadow var(--up-ease);
}
body#opac-main.upecu-premium .upecu-book > a:hover { transform: none; border-color: #a6a0c4; box-shadow: 0 4px 12px rgb(16 28 56 / 5%); }
body#opac-main.upecu-premium .upecu-book__cover {
  grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
  width: 100%; height: 226px; aspect-ratio: auto; margin: 0 0 16px; padding: 20px;
  background: #f0f2f6; border: 0; border-bottom: 1px solid var(--up-line); border-radius: 0;
}
body#opac-main.upecu-premium .upecu-book__cover img { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; background: transparent; }
body#opac-main.upecu-premium .upecu-book__fallback { color: #858ca5; }
body#opac-main.upecu-premium .up-cover-note { position: absolute; bottom: 36px; color: var(--up-muted); font-size: 11px; }
body#opac-main.upecu-premium :is(.upecu-book__title, .upecu-book__author, .upecu-book__action) { margin-inline: 16px; }
body#opac-main.upecu-premium .upecu-book__title { min-height: 2.8em; color: var(--up-ink); font-size: 13px; font-weight: 600; line-height: 1.4; -webkit-line-clamp: 2; }
body#opac-main.upecu-premium .upecu-book__author { min-height: 2.8em; color: var(--up-muted); font-size: 11px; line-height: 1.4; margin-top: 6px; }
body#opac-main.upecu-premium .upecu-book__action { padding-top: 12px; margin-top: 12px; color: var(--up-accent); border-color: var(--up-line); font-size: 11px; font-weight: 500; }
body#opac-main.upecu-premium .upecu-book__action::after { float: right; color: var(--up-accent); }
body#opac-main.upecu-premium .upecu-carousel__controls { padding: 10px 0 0; gap: 8px; border: 0; }
body#opac-main.upecu-premium .upecu-carousel__controls button {
  width: 36px; height: 36px; min-width: 36px; min-height: 36px; padding: 0;
  color: var(--up-ink); background: #fff; border: 1px solid #cbd0dc; border-radius: 50%;
  font-size: 16px; transition: color var(--up-ease), background var(--up-ease);
}
body#opac-main.upecu-premium .upecu-carousel__controls button:hover:enabled { background: var(--up-accent-soft); color: var(--up-accent); }
body#opac-main.upecu-premium .upecu-carousel__controls button:disabled { color: #778093; background: transparent; opacity: .6; }
body#opac-main.upecu-premium .upecu-carousel__status { color: var(--up-muted); font-size: 11px; }
/* Lower homepage: retain all real services, news and the native login. */
body#opac-main.upecu-premium :is(#notloggedin, #loggedin) { padding-top: 38px; padding-bottom: 50px; }
/* Establish the full-width featured layout before any JS executes. The existing
   nodes stay in Koha; display:contents is restricted to presentation-only divs. */
body#opac-main.upecu-premium :is(#notloggedin, #loggedin) {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 22px; row-gap: 22px;
  max-width: var(--up-width); margin-inline: auto; padding: 44px var(--up-gutter) 50px;
}
body#opac-main.upecu-premium :is(#notloggedin, #loggedin) > .row,
body#opac-main.upecu-premium :is(#notloggedin, #loggedin) > .row > .maincontent,
body#opac-main.upecu-premium #OpacMainUserBlock,
body#opac-main.upecu-premium #OpacMainUserBlock > .default_item,
body#opac-main.upecu-premium #OpacMainUserBlock > .default_item > .default_body { display: contents; }
body#opac-main.upecu-premium #upecu-featured { grid-column: 1 / -1; grid-row: 1; margin-bottom: 14px; }
body#opac-main.upecu-premium .upecu-home-section { grid-column: 1; grid-row: 2; margin-bottom: 0; }
body#opac-main.upecu-premium .upecu-home-section--areas { grid-row: 3; }
body#opac-main.upecu-premium :is(#notloggedin, #loggedin) > .row > .col-lg-3 { grid-column: 2; grid-row: 2 / 4; padding: 0; width: auto; }
body#opac-main.upecu-premium :is(#notloggedin, #loggedin) > .row > .col-lg-2 { grid-column: 1 / -1; grid-row: 4; padding: 0; width: auto; }
body#opac-main.upecu-premium #news { grid-column: 1 / -1; grid-row: 5; margin: 0; }
body#opac-main.upecu-premium :is(#notloggedin, #loggedin) > .row > #news.upecu-news-wide { grid-column: 1 / -1; grid-row: 5; margin: 0; }
body#opac-main.upecu-premium .upecu-home-section { padding: 26px; margin-bottom: 22px; border: 1px solid var(--up-line); border-radius: 6px; box-shadow: none; }
body#opac-main.upecu-premium #OpacMainUserBlock .upecu-home-section { margin-bottom: 0; }
body#opac-main.upecu-premium .upecu-home-section .upecu-section-heading h2 { font-size: 25px; }
body#opac-main.upecu-premium .upecu-service-list { gap: 0 24px; }
body#opac-main.upecu-premium .upecu-service-list > a { min-height: 94px; padding: 18px 0; border-left: 0; gap: 14px; }
body#opac-main.upecu-premium .upecu-list-icon { color: var(--up-accent); background: var(--up-accent-soft); border-radius: 6px; }
body#opac-main.upecu-premium .upecu-service-list strong { color: var(--up-ink); font-size: 13px; }
body#opac-main.upecu-premium .upecu-service-list small { color: var(--up-muted); font-size: 11px; line-height: 1.6; }
body#opac-main.upecu-premium .upecu-list-arrow { color: var(--up-accent); }
body#opac-main.upecu-premium .upecu-area-list a { min-height: 76px; }
body#opac-main.upecu-premium .upecu-area-list a > span { color: var(--up-accent); }
body#opac-main.upecu-premium :is(#login, .upecu-side-section, #news) { border-color: var(--up-line); border-radius: 6px; box-shadow: none; }
body#opac-main.upecu-premium #login { border-top: 1px solid var(--up-line); padding: 26px; }
body#opac-main.upecu-premium #auth legend { font: 400 23px/1.25 var(--up-serif); }
body#opac-main.upecu-premium #auth input.btn-primary { min-height: 44px; background: var(--up-accent); border-color: var(--up-accent); }
body#opac-main.upecu-premium #auth input.btn-primary:hover { background: var(--up-accent-hover); }
body.upecu-premium :is(#auth, #modalAuth) [id^="show-password-toggle-checkbox"] { width: 24px; height: 24px; margin: 8px 8px 8px 0; vertical-align: middle; accent-color: var(--up-accent); }
body.upecu-premium :is(#auth, #modalAuth) [id^="show-password-toggle-checkbox"] + label { display: inline-block; font-size: 11px; margin: 8px 0; }
body#opac-main.upecu-premium #news { border-left: 1px solid var(--up-line); padding: 26px; }
body#opac-main.upecu-premium .upecu-side-section { border-top: 1px solid var(--up-line); }
body#opac-main.upecu-premium .upecu-side-links > a > span { color: var(--up-accent); }
body#opac-main.upecu-premium .upecu-contact-item__icon { color: var(--up-accent); }
body.upecu-premium .upecu-footer { color: #ccd3e3; background: var(--up-navy); border-top: 0; }
body.upecu-premium .upecu-footer__grid { padding-block: 38px; gap: 48px; }
body.upecu-premium .upecu-footer__identity > img { width: 64px; height: 64px; padding: 0; border: 0; border-radius: 50%; }
body.upecu-premium .upecu-footer :is(h2, strong) { color: #fff; }
body.upecu-premium .upecu-footer :is(a, p, span) { color: #ccd3e3; }
body.upecu-premium .upecu-footer a:hover { color: #fff; }
body.upecu-premium .upecu-footer__bottom { padding-block: 18px; border-color: #2e3b55; color: #ccd3e3; }
body.upecu-premium .upecu-footer__bottom a { text-decoration: underline; text-underline-offset: 3px; }
/* Correct contrast on the audited native secondary controls, without relayout. */
body#results.upecu-premium :is(#addtocart, .btn-xs.dropdown-toggle, .hold) { color: var(--up-muted); opacity: 1; }
body#advsearch.upecu-premium :is(.main legend, .main label, .main .hint) { color: var(--up-muted); }
body#opac-detail.upecu-premium #holdingst_wrapper { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
body#opac-detail.upecu-premium #bibliodescriptions .nav-tabs { max-width: 100%; overflow-x: auto; overflow-y: hidden; }
/* Tablet: keep search and navigation usable without a hamburger dependency. */
@media (max-width: 1100px) {
  body.upecu-premium #header-region > .navbar { gap: 12px; }
  body.upecu-premium .up-nav { gap: 2px; }
  body.upecu-premium .up-nav a { padding-inline: 10px; }
  body.upecu-premium #header-region :is(.cartlabel, .listslabel, .search_history_label) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  body#opac-main.upecu-premium .upecu-carousel__track { grid-auto-columns: calc((100% - 60px) / 4); }
}
@media (max-width: 800px) {
  body.upecu-premium #header-region > .navbar { flex-wrap: wrap; gap: 6px; min-height: 120px; align-content: space-between; padding-block: 12px 4px; }
  /* The installed Koha logo margin is !important; match it only in this shell. */
  body.upecu-premium #header-region .navbar:has(#cart-list-nav) #logo { margin-right: auto !important; }
  body.upecu-premium .up-nav { order: 4; width: 100%; margin-left: 0; gap: 12px; border-top: 1px solid var(--up-line); padding-top: 3px; }
  body.upecu-premium .up-nav a { min-height: 40px; padding: 7px 12px; font-size: 12px; }
  body.upecu-premium #header-region #members { margin-left: 2px; }
  body.upecu-premium .upecu-hero__inner { grid-template-columns: minmax(0, 1fr) 175px; gap: 24px; padding-inline: var(--up-gutter); min-height: 280px; }
  body.upecu-premium .upecu-hero__mascot { width: 164px; height: 240px; margin-top: 0; }
  body.upecu-premium .upecu-hero .upecu-kicker { font-size: 9px; letter-spacing: .1em; }
  body.upecu-premium .upecu-hero__description { font-size: 16px; }
  body.upecu-premium .upecu-search { padding: 22px 22px 12px; }
  body#opac-main.upecu-premium #moresearches { padding-inline: 22px; }
  body.upecu-premium .upecu-search__intro { display: block; }
  body.upecu-premium .upecu-search__intro > p { max-width: none; margin: 8px 0 0; text-align: left; }
  body.upecu-premium .upecu-search__form { grid-template-columns: 155px minmax(0, 1fr) 100px; }
  body.upecu-premium .upecu-search__select { font-size: 12px; padding-left: 12px; }
  body#opac-main.upecu-premium .upecu-carousel__track { grid-auto-columns: calc((100% - 40px) / 3); }
  body#opac-main.upecu-premium :is(#notloggedin, #loggedin) > .row { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  body#opac-main.upecu-premium :is(#notloggedin, #loggedin) { grid-template-columns: minmax(0, 1fr); }
  body#opac-main.upecu-premium :is(#notloggedin, #loggedin) > .row > :is(.maincontent, .col-lg-3, .col-lg-2, #news.upecu-news-wide) { grid-column: 1; grid-row: auto; }
  body#opac-main.upecu-premium :is(#notloggedin, #loggedin) > .row > .col-lg-3 { grid-row: 4; grid-column: 1; }
  body#opac-main.upecu-premium :is(#notloggedin, #loggedin) > .row > .col-lg-2 { grid-row: 5; }
  body#opac-main.upecu-premium :is(#notloggedin, #loggedin) > .row > #news.upecu-news-wide { grid-row: 6; }
  body#opac-main.upecu-premium .upecu-book__cover { height: 218px; padding: 18px; }
  body.upecu-premium .upecu-footer__grid { gap: 24px; }
}
@media (max-width: 540px) {
  /* Koha's history toolbar also has to fit when the session contains searches. */
  body#opac-search-history.upecu-premium #searchhistory .selections-toolbar { display: flex; flex-direction: column; align-items: stretch; }
  body#opac-search-history.upecu-premium #searchhistory .selections-toolbar :is(.check_control, .links) { display: flex; flex-wrap: wrap; min-width: 0; max-width: 100%; white-space: normal; }
  body#opac-search-history.upecu-premium #searchhistory .selections-toolbar .links::before { display: none; }
  body#opac-search-history.upecu-premium #searchhistory .selections { white-space: normal; }
  body.upecu-premium #header-region > .navbar { min-height: 110px; padding-inline: 16px; }
  body.upecu-premium #header-region #logo { flex: 0 0 auto; min-width: 0; }
  body.upecu-premium .up-brand-image { width: 40px; height: 40px; }
  body.upecu-premium #header-region #logo .navbar-brand { gap: 8px; font-size: 13px; }
  body.upecu-premium .up-brand-copy small { font-size: 8px; letter-spacing: .02em; }
  body.upecu-premium .up-brand-copy { max-width: 110px; }
  body.upecu-premium .up-brand-copy > span { font-size: 12px; }
  body.upecu-premium .up-brand-copy small { font-size: 7px; letter-spacing: 0; }
  body.upecu-premium #header-region :is(#cart-list-nav, #members) { gap: 0; }
  body.upecu-premium #header-region #members { margin-left: 0; }
  body.upecu-premium #header-region .navbar-nav .nav-link { min-width: 32px; padding: 7px; }
  body.upecu-premium #header-region .userlabel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  body.upecu-premium .up-nav { gap: 16px; }
  body.upecu-premium .up-nav a { min-height: 38px; padding-inline: 10px; }
  body.upecu-premium .upecu-hero__inner { grid-template-columns: minmax(0, 1fr) 88px; gap: 12px; min-height: 246px; padding: 32px 20px 64px; }
  body.upecu-premium .upecu-hero .upecu-kicker { display: block; max-width: 230px; font-size: 8px; line-height: 1.7; letter-spacing: .09em; }
  body.upecu-premium .upecu-hero .upecu-kicker::before { display: none; }
  body.upecu-premium .upecu-hero__title { font-size: clamp(30px, 8.6vw, 44px); line-height: 1.08; }
  body.upecu-premium .upecu-hero__description { display: block; margin-top: 14px; font-size: 12px; white-space: nowrap; letter-spacing: 0; }
  body.upecu-premium .upecu-hero__mascot { align-self: center; width: 88px; height: 154px; margin: 0; }
  body#opac-main.upecu-premium #opac-main-search.mastheadsearch { margin-top: -38px; }
  body.upecu-premium .upecu-search { padding: 20px 18px 12px; border-radius: 8px; }
  body#opac-main.upecu-premium #moresearches { padding: 12px 18px; gap: 0 14px; }
  body.upecu-premium .upecu-search__intro { margin-bottom: 16px; }
  body.upecu-premium .upecu-search__intro h2 { font-size: 22px; }
  body.upecu-premium .upecu-search__intro > p { font-size: 11px; line-height: 1.6; }
  body.upecu-premium .upecu-search__form { grid-template-columns: minmax(0, 1fr); gap: 10px; border: 0; background: transparent; }
  body.upecu-premium .upecu-search__form:focus-within { box-shadow: none; }
  body.upecu-premium :is(.upecu-search__select-wrap, .upecu-search__input-wrap) { border: 1px solid #bfc6d3; border-radius: 4px; }
  body.upecu-premium :is(.upecu-search__select, .upecu-search__input) { min-height: 48px; font-size: 16px; }
  body.upecu-premium .upecu-search__button { min-height: 48px; width: 100%; margin: 0; font-size: 14px; }
  body.upecu-premium .upecu-search #moresearches { gap: 0 14px; padding-top: 12px; }
  body.upecu-premium #moresearches .nav-item a { font-size: 10px; min-height: 28px; }
  body#opac-main.upecu-premium .upecu-featured-host { margin-top: 34px; }
  body#opac-main.upecu-premium :is(#notloggedin, #loggedin) { padding-top: 34px; }
  body#opac-main.upecu-premium .upecu-section-heading { flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
  body#opac-main.upecu-premium .upecu-section-heading h2 { font-size: 27px; }
  body#opac-main.upecu-premium .upecu-section-heading > a { font-size: 11px; }
  body#opac-main.upecu-premium .upecu-carousel__track { grid-auto-columns: calc((100% - 14px) / 2); gap: 14px; }
  body#opac-main.upecu-premium .upecu-book__cover { height: 186px; padding: 18px 12px; }
  body#opac-main.upecu-premium :is(.upecu-book__title, .upecu-book__author, .upecu-book__action) { margin-inline: 12px; }
  body#opac-main.upecu-premium .upecu-book__title { font-size: 12px; min-height: 4.2em; -webkit-line-clamp: 3; }
  body#opac-main.upecu-premium .upecu-book__author { font-size: 10px; }
  body#opac-main.upecu-premium .upecu-home-section { padding: 22px 18px; }
  body#opac-main.upecu-premium .upecu-service-list { grid-template-columns: minmax(0, 1fr); }
  body#opac-main.upecu-premium .upecu-service-list > a { min-height: 84px; }
  body.upecu-premium .upecu-footer__grid { padding-block: 30px; }
  body.upecu-premium .upecu-footer__identity > img { width: 48px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  body.upecu-premium .upecu-carousel__track { scroll-behavior: auto; }
  body.upecu-premium :is(.up-nav a, .nav-link, .upecu-search__button, .upecu-book > a, .upecu-carousel__controls button) { transition: none; }
}
@media print {
  body.upecu-premium { background: white; color: black; }
  body.upecu-premium .upecu-featured-host { display: none; }
}
