/* Approved Album + Glossary surface. All selectors stay inside this module. */
@font-face {
  font-family: "MdC Display";
  src: url("./assets/fonts/BebasNeue-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "MdC Heavy";
  src: url("./assets/fonts/Anton-Regular.ttf") format("truetype");
  font-display: swap;
}

.library-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 12px;
}

.library-entry__link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid rgba(219, 230, 239, .3);
  color: #dbe6ef;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.library-entry__link:hover,
.library-entry__link:focus-visible {
  border-color: #ff293a;
  background: rgba(255, 41, 58, .12);
  color: #fff;
}

.library-surface {
  --library-ink: #f1f1ed;
  --library-soft: #c9d2dc;
  --library-muted: #93a3b5;
  --library-line: #324253;
  --library-line-strong: #596d81;
  --library-panel: #0b1521;
  --library-panel-raised: #101e2c;
  --library-red: #ff293a;
  --library-yellow: #ffe529;
  --library-blue: #71c8ff;
  --library-green: #48de73;
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: flex;
  min-width: 320px;
  min-height: 100dvh;
  flex-direction: column;
  overflow: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(90deg, rgba(6, 14, 23, .87), rgba(7, 16, 26, .76)),
    url("./assets/library-volcanic-background-v1.png") center / cover fixed;
  color: var(--library-ink);
  font-family: "Avenir Next", "Segoe UI", ui-sans-serif, sans-serif;
  isolation: isolate;
  scrollbar-color: #52677b #07111c;
  scrollbar-width: thin;
}

.library-surface *,
.library-surface *::before,
.library-surface *::after { box-sizing: border-box; }
.library-surface [hidden] { display: none !important; }
.library-surface a { color: inherit; }
.library-surface button,
.library-surface input,
.library-surface select { font-family: inherit; }
.library-surface button:focus-visible,
.library-surface a:focus-visible,
.library-surface input:focus-visible,
.library-surface select:focus-visible { outline: 3px solid var(--library-yellow); outline-offset: 3px; }
.library-surface ::selection { background: var(--library-yellow); color: #0a1420; }

.library-header {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  min-height: 70px;
  align-items: center;
  gap: 38px;
  padding: 0 max(28px, calc((100vw - 1520px) / 2));
  border-bottom: 1px solid #334253;
  background: rgba(9, 18, 28, .94);
}

.library-brand {
  display: inline-flex;
  width: auto;
  flex: 0 0 auto;
  align-items: center;
  color: var(--library-ink);
  font-family: "MdC Heavy", Impact, sans-serif;
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.library-navigation { display: flex; min-width: 0; align-items: center; gap: 22px; }
.library-navigation__link {
  position: relative;
  display: inline-flex;
  min-height: 69px;
  align-items: center;
  padding: 0 8px;
  color: #9aa9b9 !important;
  font-size: .9rem;
  font-weight: 800;
  text-decoration: none;
  transition: color .18s ease;
}
.library-navigation__link:hover,
.library-navigation__link.is-active { color: var(--library-ink) !important; }
.library-navigation__link.is-active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--library-red);
  content: "";
}

.library-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.library-view { width: min(1520px, calc(100% - 56px)); margin-inline: auto; padding: 28px 0 50px; }
.library-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(20px, 2.4vw, 36px); }
.library-page-heading h1 { max-width: 900px; margin: 0; color: var(--library-ink); font-family: "MdC Heavy", Impact, sans-serif; font-size: clamp(2.5rem, 5.7vw, 5.8rem); font-weight: 400; letter-spacing: -.025em; line-height: .91; text-transform: uppercase; }
.library-page-heading p { max-width: 330px; margin: 0 0 4px; color: var(--library-muted); font-size: .93rem; line-height: 1.45; }
.library-page-heading--compact { display: block; margin-bottom: 20px; }
.library-page-heading--compact h1 { font-size: clamp(2rem, 4.2vw, 3.6rem); }
.library-page-heading--compact p { max-width: none; margin-top: 8px; }

.library-filters {
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) repeat(3, minmax(135px, .72fr));
  gap: 10px;
  margin-bottom: 28px;
  padding: 12px;
  border: 1px solid var(--library-line-strong);
  background: rgba(9, 21, 33, .84);
}
.library-search { display: flex; min-width: 0; align-items: center; }
.library-search input,
.library-filter select {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--library-line-strong);
  border-radius: 0;
  background: #091522;
  color: var(--library-ink);
  font-size: .88rem;
}
.library-search input::placeholder { color: #8494a6; }
.library-filter { display: grid; min-width: 0; gap: 4px; color: #8597a9; font-size: .61rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.library-filter select { font-size: .76rem; letter-spacing: 0; text-transform: none; }

.library-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; border-bottom: 1px solid var(--library-line-strong); }
.library-section-heading h2 { margin: 0 0 8px; color: var(--library-soft); font-size: .78rem; font-weight: 800; letter-spacing: .2em; line-height: 1.2; text-transform: uppercase; }
.library-section-heading__note { color: var(--library-muted); font-size: .72rem; font-variant-numeric: tabular-nums; }
.library-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.library-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 7px;
  border: 1px solid var(--library-line-strong);
  background: #0a1724;
  text-decoration: none;
  animation: library-card-in .32s cubic-bezier(.16, 1, .3, 1) both;
  animation-delay: min(calc(var(--card-order, 0) * 18ms), 180ms);
  transition: border-color .16s ease, transform .16s ease, background .16s ease;
}
.library-card::before,
.library-detail__image-frame::before,
.library-related-card__art::before {
  position: absolute;
  z-index: 1;
  top: -1px;
  left: -1px;
  width: 28%;
  height: 3px;
  background: var(--library-red);
  content: "";
}
.library-card:hover,
.library-card:focus-visible { border-color: var(--library-red); background: #101e2d; transform: translateY(-3px); }
.library-card__art { position: relative; display: grid; aspect-ratio: 2 / 3; overflow: hidden; place-items: center; background: #111b24; }
.library-card__art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.library-card__label { display: grid; min-height: 53px; align-content: center; gap: 4px; padding: 7px 5px 2px; color: var(--library-ink); }
.library-card__label strong { overflow: hidden; font-size: .82rem; font-weight: 800; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.library-card__label small { color: var(--library-muted); font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; }
.library-card__missing-art { display: grid; width: 100%; height: 100%; min-height: 75px; place-items: center; padding: 12px; color: var(--library-muted); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-align: center; }
.library-empty { margin: 20px 0; color: var(--library-muted); font-size: .88rem; line-height: 1.5; }
.library-message { max-width: 660px; margin: clamp(48px, 10vh, 120px) auto; padding: clamp(24px, 4vw, 46px); border: 1px solid var(--library-line-strong); background: var(--library-panel); }
.library-message h1 { margin: 0 0 12px; font-family: "MdC Heavy", Impact, sans-serif; font-size: clamp(1.7rem, 3.2vw, 2.6rem); font-weight: 400; text-transform: uppercase; }
.library-message p { color: var(--library-muted); line-height: 1.5; }

.library-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(370px, .95fr);
  gap: clamp(20px, 2.4vw, 42px);
  align-items: start;
}
.library-view:has(.library-detail) { padding-top: 8px; padding-bottom: 10px; }
.library-detail--album {
  --library-card-frame: url("./assets/library-card-frame-v1.svg");
  position: relative;
  isolation: isolate;
  width: min(100%, 1520px);
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  margin-inline: auto;
  padding: clamp(4px, .7vw, 12px);
  animation: library-detail-in .36s cubic-bezier(.16, 1, .3, 1) both;
}
.library-detail__art-panel { position: sticky; top: 96px; min-width: 0; }
.library-detail__image-frame { position: relative; display: grid; width: auto; height: min(82vh, 820px); max-width: 100%; justify-self: center; aspect-ratio: 840 / 1163; overflow: visible; background: transparent; isolation: isolate; }
.library-detail__art-window { position: absolute; z-index: 1; inset: 0; overflow: hidden; clip-path: polygon(10.4% 5%, 89.6% 5%, 92.9% 7.36%, 92.9% 90.57%, 88.9% 94.07%, 11.1% 94.07%, 7.1% 90.57%, 7.1% 7.36%); }
.library-detail__art-window img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-height: none; aspect-ratio: auto; object-fit: contain; transform: translate(var(--library-art-x, 0%), var(--library-art-y, 0%)) scale(var(--library-art-scale, 1)); transform-origin: center; }
.library-detail__frame-overlay { position: absolute; z-index: 3; inset: 0; background-image: var(--library-card-frame); background-size: 100% 100%; pointer-events: none; }
.library-detail__foreground { position: absolute; z-index: 4; inset: 0; display: block; width: 100%; height: 100%; max-height: none; object-fit: contain; transform: translate(var(--library-art-x, 0%), var(--library-art-y, 0%)) scale(var(--library-art-scale, 1)); transform-origin: center; pointer-events: none; }
.library-detail__foreground[hidden] { display: none; }
.library-detail__caption { position: absolute; z-index: 5; right: 6%; bottom: 2.5%; left: 6%; padding: 9px 18px; border: 1px solid #677583; background: linear-gradient(180deg, #20272e, #090f17 74%); color: var(--library-ink); font-family: "MdC Heavy", "Arial Narrow", sans-serif; font-size: clamp(1rem, 1.5vw, 1.35rem); font-weight: 400; letter-spacing: .12em; text-align: center; text-transform: uppercase; clip-path: polygon(0 0, 94% 0, 100% 28%, 100% 100%, 6% 100%, 0 72%); }
.library-detail__caption::before { position: absolute; top: -1px; left: 16%; width: 68%; height: 3px; background: var(--library-red); content: ""; }
.library-detail__content { display: grid; min-width: 0; gap: 11px; }
.library-detail__controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.library-button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; padding: 9px 16px; border: 1px solid var(--library-yellow); background: rgba(255, 229, 41, .07); color: var(--library-yellow) !important; cursor: pointer; font-size: .79rem; font-weight: 850; letter-spacing: .075em; line-height: 1.15; text-align: center; text-decoration: none; text-transform: uppercase; transition: background .16s ease, color .16s ease, border-color .16s ease; }
.library-button:hover { background: var(--library-yellow); color: #0a1420 !important; }
.library-button--quiet { border-color: var(--library-line-strong); background: transparent; color: var(--library-soft) !important; }
.library-button--quiet:hover { border-color: var(--library-red); background: rgba(255, 41, 58, .1); color: var(--library-ink) !important; }
.library-arrows { display: flex; gap: 7px; }
.library-arrow { display: grid; width: 45px; height: 42px; place-items: center; border: 1px solid #687788; background: linear-gradient(145deg, #1b2631, #0a121d); color: var(--library-ink); cursor: pointer; clip-path: polygon(0 0, 84% 0, 100% 24%, 100% 100%, 16% 100%, 0 76%); transition: border-color .16s ease, color .16s ease, background .16s ease; }
.library-arrow svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: square; stroke-linejoin: bevel; stroke-width: 2; }
.library-arrow--next { clip-path: polygon(16% 0, 100% 0, 100% 76%, 84% 100%, 0 100%, 0 24%); }
.library-arrow:hover:not(:disabled) { background: #351823; color: var(--library-red); }
.library-arrow:disabled { cursor: default; opacity: .35; }
.library-detail__identity h1 { margin: 0; font-family: "MdC Heavy", "Arial Narrow", sans-serif; font-size: clamp(3.3rem, 6.1vw, 6rem); font-weight: 400; letter-spacing: .015em; line-height: .86; text-transform: uppercase; }
.library-detail__slogan { margin: 9px 0 0; color: var(--library-red); font-size: clamp(1rem, 1.6vw, 1.35rem); font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.library-detail__kind { margin: 9px 0 0; color: var(--library-soft); font-size: .78rem; font-weight: 750; letter-spacing: .085em; text-transform: uppercase; }
.library-detail__attributes { margin: 4px 0 0; color: var(--library-yellow); font-family: "MdC Display", sans-serif; font-size: .83rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.library-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; border: 1px solid #617285; background: rgba(8, 18, 29, .9); box-shadow: inset 0 0 22px rgba(75, 95, 117, .12); }
.library-stat { display: grid; min-height: 60px; align-content: center; justify-items: center; gap: 2px; border-right: 1px solid #526274; }
.library-stat:nth-child(3n) { border-right: 0; }
.library-stat > span { color: #aab7c4; font-family: "MdC Heavy", sans-serif; font-size: .86rem; font-weight: 400; letter-spacing: .12em; }
.library-stat strong { color: var(--library-yellow); font-family: "MdC Heavy", "Arial Narrow", sans-serif; font-size: 2rem; font-weight: 400; line-height: .94; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
.library-fact { display: grid; min-height: 46px; grid-column: 1 / -1; grid-template-columns: minmax(88px, .26fr) 1fr; align-items: center; gap: 12px; padding: 7px 12px; border-top: 1px solid #526274; }
.library-fact > span { color: #aab7c4; font-family: "MdC Heavy", sans-serif; font-size: .83rem; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; }
.library-fact > strong { min-width: 0; color: var(--library-ink); font-size: .95rem; line-height: 1.35; }
.library-detail__columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: clamp(14px, 1.5vw, 26px); }
.library-detail__columns--solo-keywords { grid-template-columns: minmax(0, 1fr); }
.library-detail__columns--solo-keywords .library-keyword-list { display: grid; grid-template-columns: minmax(0, 1fr); }
.library-detail__columns--solo-keywords .library-keyword { width: 100%; min-height: 48px; font-size: 1rem; }
.library-detail__section { min-width: 0; }
.library-detail__section > p { margin: 10px 0 0; color: var(--library-soft); font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; }
.library-detail__section .library-section-heading { margin-bottom: 10px; }
.library-keyword-list { display: flex; flex-wrap: wrap; gap: 7px; }
.library-detail__section-label { margin: 0 0 7px; color: var(--library-muted); font-family: "MdC Display", sans-serif; font-size: .7rem; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.library-keyword { display: inline-flex; min-width: 0; max-width: 100%; min-height: 40px; align-items: center; gap: 9px; padding: 6px 11px; border: 1px solid #43556a; background: rgba(9, 22, 35, .88); color: var(--library-soft) !important; font-size: .88rem; font-weight: 800; line-height: 1.2; text-decoration: none; transition: border-color .16s ease, background .16s ease; }
.library-keyword:hover { border-color: var(--library-yellow); background: rgba(255, 229, 41, .1); }
.library-keyword.is-inherited { border-color: rgba(255, 229, 41, .72); border-style: dashed; background: rgba(57, 50, 8, .3); }
.library-keyword__name { overflow-wrap: anywhere; }
.library-keyword .card-detail__keyword-icon { display: inline-grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; color: var(--library-yellow); }
.library-keyword .card-detail__keyword-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.1; }
.library-keyword--gloria .card-detail__keyword-icon { color: #f6f1eb; }
.library-keyword--alerta .card-detail__keyword-icon { color: var(--library-red); }
.library-keyword--masivo .card-detail__keyword-icon { color: #ff783c; }
.library-keyword--coraza .card-detail__keyword-icon { color: #56aaff; }
.library-keyword--guardian .card-detail__keyword-icon { color: var(--library-green); }
.library-keyword--vuela .card-detail__keyword-icon { color: var(--library-blue); }
.library-keyword--salvaguarda .card-detail__keyword-icon,
.library-keyword--perfora .card-detail__keyword-icon { color: var(--library-yellow); }
.library-effect { grid-column: 1 / -1; }
.library-inheritance { padding: 10px 12px 12px; border: 1px solid rgba(255, 229, 41, .42); background: rgba(7, 18, 28, .76); box-shadow: inset 0 0 18px rgba(255, 229, 41, .035); }
.library-inheritance > .library-section-heading { border-color: rgba(255, 229, 41, .32); }
.library-inheritance .library-section-heading h2 { color: var(--library-yellow); }
.library-detail__champion-abilities { grid-column: 1 / -1; display: grid; gap: 7px; padding: 10px 12px; border: 1px solid rgba(255, 229, 41, .38); background: rgba(7, 18, 28, .76); }
.library-detail__champion-abilities .library-section-heading { margin-bottom: 1px; }
.library-champion-abilities__summary { display: flex; flex-wrap: wrap; gap: 7px; }
.library-champion-abilities__group { display: grid; flex: 1 1 180px; gap: 3px; padding: 7px 9px; border: 1px solid #43556a; background: rgba(9, 22, 35, .88); }
.library-champion-abilities__kind { color: var(--library-yellow); font-family: "MdC Heavy", sans-serif; font-size: .8rem; font-weight: 400; text-transform: uppercase; }
.library-champion-abilities__availability { color: var(--library-soft); font-size: .69rem; line-height: 1.25; }
.library-champion-abilities__list { display: grid; gap: 10px; margin: 8px 0 0; padding-left: 22px; }
.library-champion-abilities__item { padding-left: 4px; }
.library-champion-abilities__item-label { color: var(--library-yellow); font-size: .79rem; text-transform: uppercase; }
.library-champion-abilities__text { margin: 3px 0 0; }
.library-champion-abilities__dialog-availability { margin: 3px 0 9px; color: var(--library-soft); font-size: .8rem; }
.library-inheritance__groups { display: grid; gap: 7px; }
.library-inheritance__group { display: grid; grid-template-columns: minmax(82px, .42fr) minmax(0, 1fr); align-items: center; gap: 8px; }
.library-inheritance__group-label { color: var(--library-muted); font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.library-inheritance__chips { display: flex; flex-wrap: wrap; gap: 4px; }
.library-inheritance__chip { display: inline-flex; min-height: 26px; align-items: center; padding: 3px 7px; border: 1px solid #596b7d; background: #111e2b; color: var(--library-soft); font-size: .7rem; font-weight: 800; line-height: 1.15; }
.library-inheritance__chip--stat { border-color: rgba(255, 229, 41, .55); color: var(--library-yellow); }
.library-inheritance__chip--counterattack { border-color: rgba(255, 117, 64, .58); color: #ffb17d; }
.library-inheritance__chip--affinity { border-color: rgba(113, 200, 255, .5); color: var(--library-blue); }
.library-inheritance__label { margin: 9px 0 5px !important; color: var(--library-yellow) !important; }
.library-detail__disclosure { min-width: 0; border-top: 1px solid rgba(137, 154, 171, .26); }
.library-detail__disclosure summary { position: relative; min-height: 30px; padding: 7px 22px 5px 0; color: var(--library-yellow); cursor: pointer; font-size: .72rem; font-weight: 800; list-style: none; }
.library-detail__disclosure summary::-webkit-details-marker { display: none; }
.library-detail__disclosure summary::after { position: absolute; top: 5px; right: 1px; color: var(--library-red); content: "+"; font-size: 1.15rem; line-height: 1; }
.library-detail__disclosure[open] summary::after { content: "−"; }
.library-detail__disclosure > p { max-height: min(38vh, 320px); overflow: auto; margin: 2px 0 8px; padding-right: 6px; color: var(--library-soft); font-size: .82rem; line-height: 1.45; white-space: pre-line; }
.library-detail__dialog-trigger { min-height: 25px; padding: 3px 8px; border: 1px solid var(--library-line-strong); background: rgba(10, 22, 34, .92); color: var(--library-yellow); cursor: pointer; font-size: .67rem; font-weight: 750; line-height: 1.2; }
.library-copy-dialog { width: min(620px, calc(100vw - 28px)); max-width: none; max-height: min(78dvh, 620px); overflow: auto; padding: clamp(17px, 3vw, 28px); border: 1px solid var(--library-line-strong); background: #071522; color: var(--library-ink); box-shadow: 0 20px 70px rgba(0, 0, 0, .65); }
.library-copy-dialog::backdrop { background: rgba(1, 5, 9, .78); }
.library-copy-dialog > h2 { margin: 0 36px 16px 0; color: var(--library-ink); font-family: "MdC Heavy", "Arial Narrow", sans-serif; font-size: clamp(1.35rem, 5vw, 2rem); font-weight: 400; line-height: 1; text-transform: uppercase; }
.library-copy-dialog__subheading { margin: 17px 0 5px; color: var(--library-yellow); font-family: "MdC Heavy", sans-serif; font-size: 1rem; font-weight: 400; text-transform: uppercase; }
.library-copy-dialog__text { color: var(--library-soft); font-size: .94rem; line-height: 1.55; white-space: pre-line; }
.library-copy-dialog__keywords { max-height: 50dvh; overflow: auto; padding: 2px; }
.library-copy-dialog__close { position: sticky; bottom: 0; display: block; min-height: 38px; margin: 18px 0 0 auto; padding: 7px 14px; border: 1px solid var(--library-red); background: #111b26; color: var(--library-ink); cursor: pointer; }
.library-detail__dialog-control { margin-top: 4px; }
.library-detail__effect-text { margin: 0; color: var(--library-soft); font-size: .82rem; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.library-inheritance__group-label { font-family: "MdC Heavy", sans-serif; font-weight: 400; }
.library-inheritance__full { display: grid; gap: 8px; }
.library-inheritance__subheading { margin: 8px 0 0; color: var(--library-yellow); font-family: "MdC Heavy", Impact, sans-serif; font-size: .9rem; font-weight: 400; text-transform: uppercase; }
.library-inheritance__text { margin: 0; color: var(--library-soft); font-size: .83rem; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }

.library-glossary-layout { display: grid; min-height: min(68vh, 780px); grid-template-columns: minmax(230px, .85fr) minmax(0, 1.8fr) minmax(240px, .82fr); gap: clamp(14px, 1.8vw, 26px); }
.library-glossary-index,
.library-glossary-article,
.library-related-card { min-width: 0; border: 1px solid var(--library-line-strong); background: rgba(7, 18, 29, .94); }
.library-glossary-index { display: flex; max-height: min(74vh, 850px); flex-direction: column; padding: 16px; }
.library-search--keyword input { height: 42px; }
.library-glossary-count { flex: 0 0 auto; margin: 14px 0 9px; padding-bottom: 9px; border-bottom: 1px solid var(--library-line); color: var(--library-muted); font-size: .76rem; }
.library-glossary-list { display: grid; min-height: 0; align-content: start; gap: 6px; overflow: auto; padding: 2px 4px 4px 0; scrollbar-color: #536b82 #0a1724; scrollbar-width: thin; }
.library-glossary-entry { display: grid; min-height: 49px; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; padding: 6px 10px; border: 1px solid #253548; background: #0c1927; color: var(--library-soft) !important; font-size: .84rem; font-weight: 750; text-decoration: none; transition: border-color .15s ease, background .15s ease; }
.library-glossary-entry:hover { border-color: var(--library-line-strong); background: #122236; }
.library-glossary-entry.is-selected { border-color: var(--library-yellow); background: rgba(255, 229, 41, .08); color: var(--library-ink) !important; }
.library-glossary-entry .card-detail__keyword-icon { display: grid; width: 35px; height: 35px; place-items: center; color: var(--library-yellow); }
.library-glossary-entry .card-detail__keyword-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.library-glossary-entry .card-detail__keyword-icon--gloria { color: #e9e8e4; }
.library-glossary-entry .card-detail__keyword-icon--alerta { color: var(--library-red); }
.library-glossary-entry .card-detail__keyword-icon--masivo { color: #ff783c; }
.library-glossary-entry .card-detail__keyword-icon--coraza { color: #4eafff; }
.library-glossary-entry .card-detail__keyword-icon--guardian { color: var(--library-green); }
.library-glossary-entry .card-detail__keyword-icon--vuela { color: var(--library-blue); }
.library-glossary-article { position: relative; display: flex; flex-direction: column; justify-content: flex-start; padding: clamp(20px, 3vw, 44px); }
.library-glossary-article::before { position: absolute; top: -1px; left: 24px; width: 110px; height: 3px; background: var(--library-red); content: ""; }
.library-glossary-article__intro { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 34px); margin-bottom: clamp(24px, 4.4vw, 66px); }
.library-glossary-article__icon { display: grid; width: clamp(92px, 11vw, 164px); aspect-ratio: 1; flex: 0 0 auto; place-items: center; border: 1px solid var(--library-line-strong); background: #0b1826; }
.library-glossary-article__icon .card-detail__keyword-icon { display: grid; width: 66%; height: 66%; place-items: center; color: var(--library-yellow); }
.library-glossary-article__icon .card-detail__keyword-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.library-glossary-article__name h2 { margin: 0; color: var(--library-ink); font-family: "MdC Heavy", Impact, sans-serif; font-size: clamp(2.3rem, 4.4vw, 4.7rem); font-weight: 400; letter-spacing: -.025em; line-height: .93; overflow-wrap: anywhere; text-transform: uppercase; }
.library-glossary-article__name span { display: inline-flex; margin-top: 12px; padding: 6px 10px; border: 1px solid var(--library-yellow); color: var(--library-yellow); font-size: .74rem; font-weight: 750; letter-spacing: .05em; }
.library-glossary-rule > p { max-width: 70ch; margin: 18px 0 0; color: var(--library-soft); font-size: clamp(.96rem, 1.3vw, 1.15rem); line-height: 1.62; }
.library-related-card { display: flex; flex-direction: column; padding: 16px; }
.library-related-card > .library-section-heading { flex: 0 0 auto; }
.library-related-card__link { display: flex; min-height: 0; flex: 1; flex-direction: column; align-items: stretch; text-decoration: none; }
.library-related-card__art { position: relative; display: grid; width: min(100%, 325px); aspect-ratio: 840 / 1163; flex: 0 0 auto; align-self: center; place-items: center; overflow: visible; border: 1px solid var(--library-line-strong); background: #111b24; }
.library-related-card__window { position: absolute; z-index: 1; inset: 0; overflow: hidden; clip-path: polygon(10.4% 5%, 89.6% 5%, 92.9% 7.36%, 92.9% 90.57%, 88.9% 94.07%, 11.1% 94.07%, 7.1% 90.57%, 7.1% 7.36%); }
.library-related-card__art img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; transform: translate(var(--library-art-x, 0%), var(--library-art-y, 0%)) scale(var(--library-art-scale, 1)); transform-origin: center; }
.library-related-card__art::after { position: absolute; z-index: 2; inset: 0; background: url('./assets/library-card-frame-v1.svg') center / 100% 100% no-repeat; content: ''; pointer-events: none; }
.library-related-card__foreground { z-index: 3; pointer-events: none; }
.library-related-card__name { margin: 13px 0 9px; color: var(--library-soft); font-size: .96rem; font-weight: 750; }
.library-button--related { width: 100%; min-height: 42px; }

@keyframes library-card-in { from { opacity: .3; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes library-detail-in { from { opacity: .45; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1100px) {
  .library-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .library-glossary-layout { grid-template-columns: minmax(210px, .8fr) minmax(0, 1.5fr); }
  .library-related-card { grid-column: 2; display: grid; grid-template-columns: minmax(120px, .45fr) 1fr; align-items: center; column-gap: 16px; }
  .library-related-card > .library-section-heading { grid-column: 1 / -1; }
  .library-related-card__link { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(110px, .36fr) 1fr; align-items: center; gap: 8px 18px; }
  .library-related-card__art { width: min(100%, 170px); grid-row: span 2; }
  .library-related-card__name { margin: 0; }
  .library-button--related { width: max-content; }
}

@media (max-width: 760px) and (orientation: portrait) {
  .library-header { min-height: 59px; gap: 8px; padding-inline: 15px; }
  .library-brand { width: auto; max-width: 115px; font-size: .9rem; }
  .library-navigation { flex: 1; justify-content: space-between; gap: 5px; }
  .library-navigation__link { min-height: 58px; padding-inline: 4px; font-size: .72rem; }
  .library-view { width: calc(100% - 30px); padding: 23px 0 38px; }
  .library-page-heading { display: block; }
  .library-page-heading h1 { font-size: clamp(2.7rem, 12vw, 4.3rem); }
  .library-page-heading p { margin-top: 10px; }
  .library-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px; }
  .library-search { grid-column: 1 / -1; }
  .library-filter select { font-size: .7rem; }
  .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .library-card { padding: 5px; }
  .library-card__label strong { font-size: .74rem; }
  .library-card__label small { font-size: .55rem; }
  .library-detail { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .library-detail__art-panel { position: relative; top: auto; }
  .library-detail__image-frame { min-height: 0; max-height: 66dvh; }
  .library-detail__image-frame img { width: min(100%, 520px); max-height: 66dvh; }
  .library-detail__content { gap: 16px; }
  .library-detail__identity h1 { font-size: clamp(2.8rem, 14vw, 5rem); }
  .library-detail__columns { grid-template-columns: minmax(0, 1fr); }
  .library-glossary-layout { grid-template-columns: minmax(0, 1fr); }
  .library-glossary-index { max-height: 34vh; }
  .library-glossary-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-glossary-entry { min-height: 43px; grid-template-columns: 29px minmax(0, 1fr); gap: 7px; padding: 5px 7px; font-size: .74rem; }
  .library-glossary-entry .card-detail__keyword-icon { width: 28px; height: 28px; }
  .library-glossary-article { min-height: 310px; padding: 21px; }
  .library-glossary-article__intro { margin-bottom: 30px; }
  .library-related-card { grid-column: auto; }
}

/* Phones held in landscape use the approved two-panel reading composition. */
@media (max-height: 560px) and (min-width: 680px) {
  .library-header { min-height: 56px; gap: 24px; padding: 5px max(28px, calc((100vw - 1520px) / 2)); }
  .library-brand { font-size: 1rem; }
  .library-navigation { gap: 10px; }
  .library-navigation__link { min-height: 40px; font-size: .82rem; }
  .library-navigation__link.is-active::after { bottom: -6px; }
  .library-view { padding: 15px 0 24px; }
  .library-page-heading { margin-bottom: 14px; }
  .library-page-heading h1 { font-size: clamp(2rem, 5vw, 3rem); }
  .library-page-heading p { max-width: 275px; font-size: .75rem; }
  .library-page-heading--compact h1 { font-size: 2.15rem; }
  .library-page-heading--compact p { margin-top: 4px; font-size: .72rem; }
  .library-filters { grid-template-columns: minmax(150px, 1.35fr) repeat(3, minmax(100px, .75fr)); gap: 6px; margin-bottom: 12px; padding: 7px; }
  .library-search input { height: 35px; padding: 5px 8px; font-size: .72rem; }
  .library-filter { font-size: .53rem; }
  .library-filter select { height: 35px; padding: 3px 6px; font-size: .64rem; }
  .library-section-heading { margin-bottom: 8px; }
  .library-section-heading h2 { margin-bottom: 5px; font-size: .64rem; }
  .library-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
  .library-card { padding: 4px; }
  .library-card__label { min-height: 39px; padding: 5px 3px 1px; }
  .library-card__label strong { font-size: .68rem; }
  .library-card__label small { font-size: .5rem; }
  .library-detail { min-height: calc(100dvh - 88px); grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr); align-items: stretch; gap: 17px; }
  .library-detail__art-panel { position: relative; top: auto; display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; }
  .library-detail__image-frame { min-height: 0; height: min(64dvh, 380px); }
  .library-detail__image-frame img { width: 100%; height: 100%; max-height: 64dvh; }
  .library-detail__caption { margin-top: 5px; padding: 6px; font-size: .84rem; }
  .library-detail__content { align-content: start; gap: 9px; }
  .library-detail__controls { min-height: 34px; }
  .library-button { min-height: 33px; padding: 6px 10px; font-size: .65rem; }
  .library-arrow { width: 34px; height: 34px; font-size: 1.2rem; }
  .library-detail__identity h1 { font-size: clamp(2rem, 5.5vw, 3.1rem); }
  .library-detail__slogan { margin-top: 5px; font-size: .82rem; }
  .library-detail__kind { margin-top: 5px; font-size: .63rem; }
  .library-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .library-stat { min-height: 43px; }
  .library-stat strong { font-size: 1.2rem; }
  .library-stat > span { font-size: .57rem; }
  .library-fact { min-height: 38px; padding: 5px 8px; }
  .library-fact > span { font-size: .58rem; }
  .library-fact > strong { font-size: .72rem; }
  .library-detail__section .library-section-heading { margin-bottom: 5px; }
  .library-detail__section > p { margin-top: 5px; font-size: .72rem; line-height: 1.35; }
  .library-keyword-list { gap: 4px; }
  .library-keyword { min-height: 28px; gap: 5px; padding: 3px 6px; font-size: .65rem; }
  .library-keyword .card-detail__keyword-icon { width: 18px; height: 18px; flex-basis: 18px; }
  .library-glossary-layout { min-height: calc(100dvh - 142px); grid-template-columns: minmax(150px, .82fr) minmax(0, 1.8fr) minmax(145px, .8fr); gap: 10px; }
  .library-related-card { grid-column: 3; grid-row: 1; display: flex; }
  .library-related-card__link { display: flex; grid-column: auto; grid-template-columns: none; }
  .library-related-card__art { width: min(100%, calc(72.23dvh - 180.57px)); }
  .library-glossary-index { max-height: calc(100dvh - 142px); padding: 8px; }
  .library-search--keyword input { height: 31px; font-size: .7rem; }
  .library-glossary-count { margin: 7px 0 5px; padding-bottom: 5px; font-size: .63rem; }
  .library-glossary-list { gap: 3px; }
  .library-glossary-entry { min-height: 34px; grid-template-columns: 27px minmax(0, 1fr); gap: 5px; padding: 3px 5px; font-size: .68rem; }
  .library-glossary-entry .card-detail__keyword-icon { width: 25px; height: 25px; }
  .library-glossary-article { padding: 15px; }
  .library-glossary-article__intro { gap: 12px; margin-bottom: 24px; }
  .library-glossary-article__icon { width: clamp(62px, 10vw, 90px); }
  .library-glossary-article__name h2 { font-size: clamp(1.8rem, 4.3vw, 2.65rem); }
  .library-glossary-article__name span { margin-top: 6px; padding: 4px 7px; font-size: .63rem; }
  .library-glossary-rule > p { margin-top: 10px; font-size: .79rem; line-height: 1.45; }
  .library-related-card { padding: 8px; }
  .library-related-card__art { max-height: none; }
  .library-related-card__name { margin: 6px 0; font-size: .76rem; }
  .library-button--related { min-height: 31px; }
}

@media (max-height: 560px) and (min-width: 560px) and (max-width: 679px) {
  .library-header { min-height: 52px; gap: 14px; padding: 4px 15px; }
  .library-brand { font-size: .9rem; }
  .library-navigation { flex: 1; justify-content: space-between; gap: 2px; }
  .library-navigation__link { min-height: 38px; padding-inline: 5px; font-size: .75rem; }
  .library-navigation__link.is-active::after { bottom: -5px; }
  .library-view { width: calc(100% - 30px); padding: 12px 0 20px; }
  .library-page-heading { margin-bottom: 12px; }
  .library-page-heading h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
  .library-page-heading p { max-width: 220px; font-size: .68rem; }
  .library-page-heading--compact h1 { font-size: 1.9rem; }
  .library-page-heading--compact p { margin-top: 3px; font-size: .66rem; }
  .library-filters { grid-template-columns: minmax(120px, 1.25fr) repeat(3, minmax(82px, .75fr)); gap: 4px; margin-bottom: 10px; padding: 5px; }
  .library-search input { height: 31px; padding: 4px 7px; font-size: .66rem; }
  .library-filter { gap: 2px; font-size: .48rem; }
  .library-filter select { height: 31px; padding: 2px 4px; font-size: .58rem; }
  .library-section-heading { margin-bottom: 6px; }
  .library-section-heading h2 { margin-bottom: 4px; font-size: .59rem; }
  .library-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .library-card { padding: 3px; }
  .library-card__label { min-height: 34px; gap: 2px; padding: 4px 2px 1px; }
  .library-card__label strong { font-size: .6rem; }
  .library-card__label small { font-size: .45rem; }
  .library-detail { min-height: calc(100dvh - 78px); grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); align-items: stretch; gap: 11px; }
  .library-detail__art-panel { position: relative; top: auto; display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; }
  .library-detail__image-frame { min-height: 0; height: min(64dvh, 230px); }
  .library-detail__image-frame img { width: 100%; height: 100%; max-height: 64dvh; }
  .library-detail__caption { margin-top: 4px; padding: 5px; font-size: .72rem; }
  .library-detail__content { align-content: start; gap: 7px; }
  .library-detail__controls { min-height: 31px; }
  .library-button { min-height: 30px; padding: 5px 7px; font-size: .57rem; }
  .library-arrow { width: 31px; height: 31px; font-size: 1.12rem; }
  .library-detail__identity h1 { font-size: clamp(1.7rem, 5vw, 2.5rem); }
  .library-detail__slogan { margin-top: 4px; font-size: .72rem; }
  .library-detail__kind { margin-top: 4px; font-size: .55rem; }
  .library-stat { min-height: 38px; }
  .library-stat strong { font-size: 1.02rem; }
  .library-stat > span { font-size: .5rem; }
  .library-fact { min-height: 34px; grid-template-columns: 55px 1fr; gap: 6px; padding: 4px 6px; }
  .library-fact > span { font-size: .5rem; }
  .library-fact > strong { font-size: .62rem; }
  .library-detail__section .library-section-heading { margin-bottom: 4px; }
  .library-detail__section > p { margin-top: 4px; font-size: .63rem; line-height: 1.3; }
  .library-keyword-list { gap: 3px; }
  .library-keyword { min-height: 25px; gap: 3px; padding: 2px 4px; font-size: .56rem; }
  .library-keyword .card-detail__keyword-icon { width: 15px; height: 15px; flex-basis: 15px; }
  .library-glossary-layout { min-height: calc(100dvh - 112px); grid-template-columns: minmax(120px, .82fr) minmax(0, 1.8fr) minmax(120px, .8fr); gap: 8px; }
  .library-related-card { grid-column: 3; grid-row: 1; display: flex; }
  .library-related-card__link { display: flex; grid-column: auto; grid-template-columns: none; }
  .library-related-card__art { width: min(100%, calc(72.23dvh - 158.9px)); }
  .library-glossary-index { max-height: calc(100dvh - 112px); padding: 6px; }
  .library-search--keyword input { height: 28px; font-size: .62rem; }
  .library-glossary-count { margin: 6px 0 4px; padding-bottom: 4px; font-size: .57rem; }
  .library-glossary-list { gap: 2px; }
  .library-glossary-entry { min-height: 30px; grid-template-columns: 21px minmax(0, 1fr); gap: 3px; padding: 2px 3px; font-size: .59rem; }
  .library-glossary-entry .card-detail__keyword-icon { width: 20px; height: 20px; }
  .library-glossary-article { padding: 10px; }
  .library-glossary-article__intro { gap: 7px; margin-bottom: 14px; }
  .library-glossary-article__icon { width: clamp(48px, 9vw, 68px); }
  .library-glossary-article__name h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
  .library-glossary-article__name span { margin-top: 4px; padding: 3px 5px; font-size: .54rem; }
  .library-glossary-rule > p { margin-top: 7px; font-size: .68rem; line-height: 1.38; }
  .library-related-card { padding: 6px; }
  .library-related-card__art { max-height: none; }
  .library-related-card__name { margin: 4px 0; font-size: .65rem; }
  .library-button--related { min-height: 27px; padding-inline: 4px; font-size: .5rem; }
}

@media (min-width: 1101px) and (min-height: 700px) {
  .library-detail__art-panel { height: min(80vh, 790px); }
}
@media (min-width: 1101px) {
  .library-view:has(.library-detail) { padding-top: 16px; padding-bottom: 8px; }
}

/* Landscape card details keep the full card and its data inside the device viewport. */
@media (max-height: 560px) and (min-width: 560px) {
  .library-surface:has(.library-detail) { overflow: hidden; }
  .library-surface:has(.library-detail) .library-header { position: relative; flex: 0 0 auto; }
  .library-surface:has(.library-detail) .library-view { width: 100%; min-height: 0; flex: 1 1 0; overflow: hidden; padding: 8px clamp(12px, 2.2vw, 28px); }
  .library-detail { height: 100%; min-height: 0; grid-template-columns: minmax(0, .76fr) minmax(0, 1.24fr); align-items: stretch; gap: clamp(9px, 1.5vw, 18px); padding: 8px; }
  .library-detail__art-panel { position: relative; top: auto; display: block; min-height: 0; }
  .library-detail__image-frame { width: auto; height: 100%; max-width: 100%; min-height: 0; justify-self: center; aspect-ratio: 840 / 1163; }
  .library-detail__image-frame img { width: 100%; height: 100%; max-height: none; object-fit: contain; }
  .library-detail__caption { right: 7%; bottom: 2.2%; left: 7%; padding: 4px 8px; font-size: clamp(.7rem, 1.6vw, .94rem); }
  .library-detail__caption::before { height: 2px; }
  .library-detail__content { min-height: 0; grid-template-rows: none; align-content: start; gap: 3px; overflow-x: hidden; overflow-y: auto; }
  .library-detail__controls { min-height: 30px; }
  .library-button { min-height: 28px; padding: 5px 8px; font-size: .61rem; }
  .library-arrows { gap: 5px; }
  .library-arrow { width: 31px; height: 29px; }
  .library-arrow svg { width: 17px; height: 17px; }
  .library-detail__identity h1 { font-size: clamp(1.85rem, 4.8vw, 3.45rem); line-height: .82; }
  .library-detail__kind,
  .library-detail__attributes { display: inline-block; vertical-align: baseline; }
  .library-detail__attributes { margin-left: 6px; }
  .library-detail__slogan { margin-top: 3px; font-size: clamp(.65rem, 1.4vw, .86rem); letter-spacing: .13em; }
  .library-detail__kind { margin-top: 3px; font-size: clamp(.52rem, 1.04vw, .65rem); }
  .library-detail__attributes { margin-top: 2px; font-size: clamp(.54rem, 1vw, .67rem); }
  .library-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .library-stat { min-height: 35px; gap: 0; }
  .library-stat > span { font-size: .58rem; }
  .library-stat strong { font-size: 1.22rem; }
  .library-fact { min-height: 28px; grid-template-columns: 55px minmax(0, 1fr); gap: 7px; padding: 4px 7px; }
  .library-fact > span { font-size: .6rem; }
  .library-fact > strong { font-size: .68rem; line-height: 1.15; }
  .library-detail__columns { min-height: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-content: start; gap: 8px; overflow: visible; }  .library-detail__champion-abilities { gap: 2px; padding: 3px 5px; }
  .library-detail__champion-abilities .library-section-heading { margin-bottom: 0; }
  .library-champion-abilities__summary { flex-wrap: nowrap; gap: 3px; }
  .library-champion-abilities__group { min-width: 0; flex-basis: 0; gap: 0; padding: 2px 4px; }
  .library-champion-abilities__kind { font-size: .51rem; }
  .library-champion-abilities__availability { font-size: .46rem; line-height: 1.1; }
  .library-detail__dialog-control--abilities { margin-top: 0; }
  .library-detail__columns--solo-keywords { grid-template-columns: minmax(0, 1fr); }
  .library-detail__columns--solo-keywords .library-keyword-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-detail__columns--solo-keywords .library-keyword { min-height: 27px; font-size: .63rem; }
  .library-detail__section .library-section-heading { margin-bottom: 4px; }
  .library-detail__section .library-section-heading h2 { margin-bottom: 3px; font-size: .61rem; letter-spacing: .14em; }
  .library-detail__section-label { margin-bottom: 4px; font-size: .57rem; }
  .library-keyword-list { gap: 3px; }
  .library-keyword { min-height: 27px; gap: 4px; padding: 3px 6px; font-size: .63rem; }
  .library-keyword .card-detail__keyword-icon { width: 17px; height: 17px; flex-basis: 17px; }
  .library-inheritance { padding: 5px 6px 6px; }
  .library-inheritance__groups { gap: 3px; }
  .library-inheritance__group { grid-template-columns: minmax(58px, .42fr) minmax(0, 1fr); gap: 4px; }
  .library-inheritance__group-label { font-size: .49rem; }
  .library-inheritance__chips { gap: 2px; }
  .library-inheritance__chip { min-height: 20px; padding: 2px 4px; font-size: .55rem; }
  .library-inheritance__label { margin: 5px 0 3px !important; }
  .library-detail__dialog-control { margin-top: 2px; }
  .library-detail__dialog-trigger { min-height: 21px; padding: 2px 5px; font-size: .52rem; }
  .library-detail__disclosure { margin-top: 2px; }
  .library-detail__disclosure summary { min-height: 23px; padding: 4px 17px 3px 0; font-size: .59rem; }
  .library-detail__disclosure summary::after { top: 2px; }
  .library-detail__disclosure > p { max-height: 31dvh; margin: 2px 0 4px; font-size: .66rem; line-height: 1.32; }
  .library-effect { grid-column: 1 / -1; }
  .library-effect .library-section-heading { display: none; }
}

@media (max-height: 560px) and (min-width: 560px) and (max-width: 679px) {
  .library-detail { grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: 7px; padding: 6px; }
  .library-detail__content { gap: 2px; }
  .library-detail__identity h1 { font-size: clamp(1.72rem, 4.5vw, 2.55rem); }
  .library-detail__kind,
  .library-detail__attributes { display: inline-block; vertical-align: baseline; }
  .library-detail__attributes { margin-left: 4px; }
  .library-detail__slogan { font-size: .63rem; }
  .library-detail__kind { font-size: .49rem; }
  .library-detail__attributes { font-size: .51rem; }
  .library-stat { min-height: 31px; }
  .library-stat > span { font-size: .51rem; }
  .library-stat strong { font-size: 1.02rem; }
  .library-fact { min-height: 26px; grid-template-columns: 46px minmax(0, 1fr); gap: 4px; padding: 3px 5px; }
  .library-fact > span { font-size: .52rem; }
  .library-fact > strong { font-size: .59rem; }
  .library-detail__columns { gap: 5px; }
  .library-champion-abilities__availability { display: none; }  .library-detail__champion-abilities { gap: 1px; padding: 2px 5px 0; }
  .library-champion-abilities__group { padding: 1px 4px; }
  .library-champion-abilities__kind { font-size: .57rem; }
  .library-detail__dialog-control--abilities .library-detail__dialog-trigger { font-size: .63rem; min-height: 19px; padding: 1px 4px; }
  .library-keyword { min-height: 24px; gap: 3px; padding: 2px 4px; font-size: .56rem; }
  .library-keyword .card-detail__keyword-icon { width: 15px; height: 15px; flex-basis: 15px; }
  .library-inheritance { padding: 4px; }
  .library-inheritance__group { grid-template-columns: minmax(46px, .38fr) minmax(0, 1fr); gap: 3px; }
  .library-inheritance__group-label { font-size: .44rem; }
  .library-inheritance__chip { min-height: 18px; padding: 1px 3px; font-size: .49rem; }
  .library-detail__dialog-trigger { min-height: 19px; padding: 1px 4px; font-size: .47rem; }
}

@media (min-width: 761px) and (max-width: 1100px) and (orientation: portrait) {
  .library-detail--album { max-width: 760px; grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .library-detail__art-panel { position: relative; top: auto; }
  .library-detail__image-frame { height: min(68dvh, 620px); }
}

@media (min-width: 701px) and (max-width: 760px) and (orientation: portrait) {
  .library-header { min-height: 70px; gap: 38px; padding-inline: 28px; }
  .library-brand { max-width: none; font-size: 1.35rem; }
  .library-navigation { flex: 0 1 auto; justify-content: flex-start; gap: 22px; }
  .library-navigation__link { min-height: 69px; padding-inline: 8px; font-size: .9rem; }
  .library-view { width: calc(100% - 56px); }
}

@media (max-width: 700px) {
  .library-header { padding-inline: 15px; }
  .library-view { width: calc(100% - 30px); }
}

@media (prefers-reduced-motion: reduce) {
  .library-surface *,
  .library-surface *::before,
  .library-surface *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
