/*
 * Öffentlicher Katalog der neuen Bibliothek - Entwurf "Витрина" (2a) aus Claude
 * Design, Designsystem "Classical" (Cormorant Garamond über Lora, Haarlinien,
 * Farbe als Strich statt Fläche). Eigene Seite: nur dieses Stylesheet wird
 * geladen (resources/views/public/lib-catalog/index.php).
 *
 * Schriften selbst gehostet (SIL OFL, public/assets/fonts/catalog/) - keine
 * Anfrage an Google.
 */

/* ── Schriften ────────────────────────────────────────────────────────────── */
@font-face { font-family: "Cat Cormorant"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/catalog/cormorant-garamond-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cat Cormorant"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/catalog/cormorant-garamond-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cat Cormorant"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/catalog/cormorant-garamond-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cat Cormorant"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/catalog/cormorant-garamond-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cat Cormorant"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/catalog/cormorant-garamond-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cat Cormorant"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/catalog/cormorant-garamond-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cat Cormorant"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/catalog/cormorant-garamond-cyrillic-400-italic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cat Cormorant"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/catalog/cormorant-garamond-latin-ext-400-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cat Cormorant"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/catalog/cormorant-garamond-latin-400-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cat Lora"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/catalog/lora-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cat Lora"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/catalog/lora-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cat Lora"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/catalog/lora-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cat Lora"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/catalog/lora-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cat Lora"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/catalog/lora-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cat Lora"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/catalog/lora-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ── Tokens (Classical) ───────────────────────────────────────────────────── */
:root {
    --color-bg: #f3f2f2;
    --color-surface: #eae9e9;
    --color-text: #201f1d;
    --color-accent: #b68235;
    --color-divider: color-mix(in srgb, #201f1d 16%, transparent);

    --color-neutral-100: #f8f4f4;
    --color-neutral-200: #eae7e7;
    --color-neutral-300: #d7d3d3;
    --color-neutral-400: #bab6b6;
    --color-neutral-500: #9b9797;
    --color-neutral-600: #7d7979;
    --color-neutral-700: #605d5d;
    --color-neutral-800: #444141;
    --color-neutral-900: #2d2b2b;

    --color-accent-100: #fff3e4;
    --color-accent-200: #ffe3bf;
    --color-accent-300: #facb8d;
    --color-accent-400: #e1ad66;
    --color-accent-500: #c28d41;
    --color-accent-600: #a06f24;
    --color-accent-700: #7d5411;
    --color-accent-800: #5a3b0a;
    --color-accent-900: #3a270d;

    --font-heading: "Cat Cormorant", Georgia, "Times New Roman", serif;
    --font-body: "Cat Lora", Georgia, "Times New Roman", serif;

    --radius-md: 4px;
    --shadow-sm: 0 1px 2px color-mix(in srgb, #2d2b2b 14%, transparent);
    --shadow-md: 0 3px 10px color-mix(in srgb, #2d2b2b 16%, transparent);
    --shadow-lg: 0 12px 32px color-mix(in srgb, #2d2b2b 22%, transparent);

    /* Seitenränder: 120px bei 1280px Breite (Entwurf), schmaler darunter. */
    --cat-gutter: clamp(24px, 9.375vw, 120px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.cat {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
.cat-locked { overflow: hidden; }
.cat [hidden] { display: none !important; }
.cat a { color: var(--color-accent-700); text-underline-offset: 3px; }
.cat a:hover { color: var(--color-accent-600); }
.cat :focus { outline: none; }
.cat :focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.cat ::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }
.cat h1, .cat h2 { margin: 0; font-family: var(--font-heading); }
.cat p { margin: 0; }
.cat-num { font-variant-numeric: tabular-nums; }

/* ── Kopfzeile: Marke · RU/DE · Вход ──────────────────────────────────────── */
.cat-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px var(--cat-gutter);
    gap: 16px;
    border-bottom: 1px solid var(--color-divider);
    font-size: 15px;
    color: var(--color-neutral-900);
}
.cat .cat-brand {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 20px;
    color: var(--color-text);
    text-decoration: none;
    white-space: nowrap;
}
.cat-topbar-right { display: flex; align-items: center; gap: 24px; }
.cat-topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cat-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-left: -8px;
    padding: 0;
    border: 1px solid var(--color-divider);
    border-radius: 12px;
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
}
.cat-menu-btn:hover { background: var(--color-neutral-100, rgba(0, 0, 0, 0.04)); }
.cat .cat-dash-btn { width: auto; gap: 6px; padding: 0 14px 0 10px; text-decoration: none; font-weight: 500; white-space: nowrap; }
.cat-locales { display: flex; gap: 14px; letter-spacing: 0.06em; font-weight: 500; }
.cat-locales > * { padding: 4px 2px; }
.cat-locales .is-current { color: var(--color-accent-700); border-bottom: 2px solid var(--color-accent); }
.cat .cat-locales a { color: var(--color-neutral-800); text-decoration: none; }
.cat .cat-locales a:hover { color: var(--color-accent-700); }
.cat .cat-login {
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 0;
    white-space: nowrap;
}
.cat-login-icon { display: none; }
.cat .cat-login:hover { color: var(--color-accent-700); }

/* ── Wortmarke + Suche (Suche mittig unter der Unterzeile, auf allen Breiten -
   daneben wurde sie auf Tablets und schmalen Fenstern zusammengequetscht) ── */
.cat-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    row-gap: 22px;
    padding: 44px var(--cat-gutter) 32px;
}
.cat-head > span { display: none; }
.cat-head-title { text-align: center; }
.cat .cat-wordmark {
    font-weight: 400;
    font-size: 72px;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.cat-tagline { margin-top: 10px; font-size: 13px; color: var(--color-neutral-800); }
.cat-search { position: relative; display: block; justify-self: center; width: min(440px, 100%); }
.cat-search svg {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-neutral-700);
    pointer-events: none;
}
.cat-input {
    width: 100%;
    min-height: 42px;
    padding: 8px 38px 8px 14px;
    font: inherit;
    font-size: 15px;
    color: var(--color-text);
    caret-color: var(--color-accent);
    background: transparent;
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-md);
    -webkit-appearance: none;
    appearance: none;
}
.cat-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.cat-input::placeholder { color: var(--color-neutral-600); }
.cat-input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.cat .cat-input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }

/* ── Abteilungen als Leiste ───────────────────────────────────────────────── */
.cat-sections {
    margin: 0 var(--cat-gutter);
    border-top: 1px solid var(--color-divider);
    border-bottom: 1px solid var(--color-divider);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px 26px;
}
.cat .cat-section {
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 15px 0 13px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--color-text);
    text-decoration: none;
}
.cat .cat-section:hover { color: var(--color-accent-700); }
.cat .cat-section.is-active { color: var(--color-accent-700); border-bottom-color: var(--color-accent); }

/* ── Anzahl + Sprache ─────────────────────────────────────────────────────── */
.cat-meta {
    margin: 0 var(--cat-gutter);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    font-size: 15px;
    color: var(--color-neutral-800);
}
.cat-count { font-variant-numeric: tabular-nums; }
.cat-langs { display: flex; gap: 16px; align-items: center; }
.cat .cat-lang {
    border-bottom: 2px solid transparent;
    padding: 3px 0;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--color-text);
    text-decoration: none;
}
.cat .cat-lang:hover { color: var(--color-accent-700); }
.cat .cat-lang.is-active { color: var(--color-accent-700); border-bottom-color: var(--color-accent); }

/* ── Wand aus Umschlägen ──────────────────────────────────────────────────── */
.cat-wall {
    margin: 0 var(--cat-gutter);
    padding: 28px 0 72px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 20px 30px;
}
.cat .cat-book {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    color: inherit;
    text-decoration: none;
}
.cat-lift { display: block; transition: transform 0.2s ease; }
.cat-cover-shadow {
    display: block;
    height: 12px;
    margin: 0 6%;
    background: radial-gradient(ellipse at top, color-mix(in srgb, var(--color-neutral-900) 22%, transparent), transparent 70%);
}
/* Titel erst beim Zeigen - nur bei Maus/Stift; auf Touch gibt es keinen Hover. */
.cat-caption {
    display: block;
    opacity: 0;
    transition: opacity 0.15s ease;
    text-align: center;
    min-height: 34px;
    font-size: 11px;
    line-height: 1.35;
    color: var(--color-accent-700);
}
.cat-caption span { color: var(--color-neutral-700); }
@media (hover: hover) {
    .cat-book:hover .cat-lift { transform: translateY(-4px); }
    .cat-book:hover .cat-caption { opacity: 1; }
}
.cat-book:focus-visible .cat-lift { transform: translateY(-4px); }
.cat-book:focus-visible .cat-caption { opacity: 1; }
.cat-empty {
    padding: 40px 0 120px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 24px;
    color: var(--color-neutral-700);
}
.cat-wall + .cat-empty:not([hidden]) { margin-top: -72px; }

/* ── Gezeichneter Umschlag ────────────────────────────────────────────────────
   Maße des Entwurfs bei 123px Breite, in cqw umgerechnet, damit derselbe
   Umschlag in jeder Spaltenbreite und groß in der Karte gleich aussieht. */
.cat-cover {
    container-type: inline-size;
    display: block;
    aspect-ratio: 2 / 3;
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 1px;
    box-shadow: var(--shadow-md);
    background: var(--cover-bg);
    color: var(--cover-ink);
    text-align: left;
}
.cat-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-palette-0 { --cover-bg: var(--color-accent-100); --cover-ink: var(--color-accent-900); --cover-rule: var(--color-accent-400); }
.cat-palette-1 { --cover-bg: var(--color-neutral-200); --cover-ink: var(--color-neutral-900); --cover-rule: var(--color-neutral-500); }
.cat-palette-2 { --cover-bg: var(--color-accent-200); --cover-ink: var(--color-accent-900); --cover-rule: var(--color-accent-500); }
.cat-palette-3 { --cover-bg: var(--color-neutral-100); --cover-ink: var(--color-accent-800); --cover-rule: var(--color-accent-400); }
.cat-palette-4 { --cover-bg: var(--color-neutral-300); --cover-ink: var(--color-neutral-900); --cover-rule: var(--color-neutral-600); }
.cat-palette-5 { --cover-bg: var(--color-accent-300); --cover-ink: var(--color-accent-900); --cover-rule: var(--color-accent-600); }

.cat-cover-frame { position: absolute; inset: 4cqw; border: 1px solid var(--cover-rule); }
.cat-cover-body { position: absolute; inset: 0; display: flex; flex-direction: column; }
.cat-cover-kicker, .cat-cover-author {
    font-size: 5.7cqw;
    line-height: 1.3;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}
.cat-cover-kicker { letter-spacing: 0.14em; }
.cat-cover-author { letter-spacing: 0.1em; }
/* Trennen nur lange Wörter (ab 8 Buchstaben, je mind. 4 pro Teil) - sonst "Пись-ма". */
.cat-cover-title { font-family: var(--font-heading); overflow-wrap: break-word; hyphens: auto; hyphenate-limit-chars: 8 4 4; }

/* Variante 1: Rahmen, Abteilung oben, Titel mittig, Autor unten */
.cat-v1 .cat-cover-body, .cat-cover-lg .cat-cover-body {
    padding: 13cqw 9.75cqw;
    justify-content: space-between;
    text-align: center;
}
.cat-v1 .cat-cover-title, .cat-cover-lg .cat-cover-title { font-size: 13cqw; line-height: 1.06; text-wrap: balance; }

/* Variante 2: großer Anfangsbuchstabe, Titel unter einer Linie */
.cat-v2 .cat-cover-body { padding: 9.75cqw; }
.cat-v2 .cat-cover-initial {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 55cqw;
    line-height: 0.85;
    color: var(--cover-rule);
}
.cat-v2 .cat-cover-title {
    margin-top: auto;
    border-top: 1px solid var(--cover-ink);
    padding-top: 4.9cqw;
    font-weight: 600;
    font-size: 11.4cqw;
    line-height: 1.08;
}
.cat-v2 .cat-cover-author { margin-top: 3.25cqw; }

/* Variante 3: farbiges Band oben, Titel kursiv darunter */
.cat-cover-band { position: absolute; left: 0; right: 0; top: 0; height: 40%; background: var(--cover-rule); }
.cat-v3 .cat-cover-body { padding: 9.75cqw; gap: 4.9cqw; }
.cat-v3 .cat-cover-author { letter-spacing: 0.14em; color: var(--color-bg); }
.cat-v3 .cat-cover-title { margin-top: 42%; font-style: italic; font-size: 13cqw; line-height: 1.06; }

.cat-cover-loan {
    position: absolute;
    right: 0;
    bottom: 0;
    padding: 3px 6px;
    background: var(--color-bg);
    color: var(--color-neutral-800);
    font-size: 9px;
    line-height: 1.3;
    letter-spacing: 0.06em;
    border-top-left-radius: 2px;
}

/* ── Fußzeile ─────────────────────────────────────────────────────────────── */
.cat-footer {
    border-top: 1px solid var(--color-divider);
    background: color-mix(in srgb, var(--color-surface) 60%, transparent);
}
.cat-footer-inner {
    margin: 0 var(--cat-gutter);
    padding: 28px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--color-neutral-700);
}
.cat-footer-mark {
    font-family: var(--font-heading);
    font-size: 18px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text);
}
.cat-footer-links { display: flex; flex-wrap: wrap; gap: 10px; }
.cat .cat-footer-links a { color: inherit; }

/* ── Karte des Buchs (Seitenleiste rechts) ────────────────────────────────── */
.cat-sheet { position: fixed; inset: 0; z-index: 50; }
.cat-sheet-backdrop { position: absolute; inset: 0; background: color-mix(in srgb, var(--color-neutral-900) 35%, transparent); }
.cat-sheet-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(460px, 100%);
    background: var(--color-bg);
    border-left: 1px solid var(--color-divider);
    box-shadow: var(--shadow-lg);
    overflow: auto;
    overscroll-behavior: contain;
    animation: cat-slide-in 0.2s ease;
}
@keyframes cat-slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.cat-sheet-grip { display: none; }
.cat-sheet-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-divider);
}
.cat-sheet-kicker {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent-700);
    font-variant-numeric: tabular-nums;
}
.cat-sheet-kicker-inline { display: none; }
.cat .cat-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-divider);
    border-radius: var(--radius-md);
    color: var(--color-text);
}
.cat .cat-icon-btn:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-text); }
.cat .cat-icon-btn:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.cat-sheet-body { padding: 32px 40px; display: flex; flex-direction: column; gap: 24px; }
.cat-cover-lg-wrap { align-self: center; }
.cat-cover-lg { width: 180px; }
.cat-sheet-titles { text-align: center; }
.cat .cat-sheet-titles h2 { font-size: 34px; font-weight: 400; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 6px; }
.cat-sheet-author { font-size: 15px; color: var(--color-neutral-800); }
.cat-sheet-status {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--color-divider);
    border-bottom: 1px solid var(--color-divider);
}
.cat-tag {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    letter-spacing: 0.02em;
    padding: 3px 10px;
    border-radius: 3px;
}
.cat-tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
.cat-tag-neutral { background: var(--color-neutral-100); color: var(--color-neutral-800); }
.cat-sheet-copies { font-size: 13px; color: var(--color-neutral-800); }
.cat-sheet-desc { font-size: 15px; line-height: 1.6; text-align: justify; hyphens: auto; }
.cat-sheet-facts {
    margin: 0;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 10px 16px;
    font-size: 14px;
}
.cat-sheet-facts:empty { display: none; }
.cat-sheet-facts dt { color: var(--color-neutral-700); }
.cat-sheet-facts dd { margin: 0; overflow-wrap: anywhere; }

/* ── Schmalere Bildschirme ────────────────────────────────────────────────── */
@media (max-width: 1099px) { .cat-wall { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px 24px; } }
@media (max-width: 899px) {
    .cat-wall { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .cat .cat-wordmark { font-size: 60px; }
}

/* Tablet und Telefon: Abteilungen als eine Zeile zum Wischen statt drei, vier
   Zeilen. Nur waagerecht scrollbar - die 1px-Überlappung der aktiven Linie
   mit der Randlinie (margin-bottom: -1px) ließ die Leiste sonst senkrecht
   wackeln. */
@media (max-width: 1099px) {
    .cat-sections {
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 26px;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }
    .cat-sections::-webkit-scrollbar { display: none; }
    .cat .cat-section { flex: none; white-space: nowrap; margin-bottom: 0; }
}

/* ── Telefon (Entwurf "2a Mobile", 390px) ─────────────────────────────────── */
@media (max-width: 719px) {
    /* Telefon: Marke links, rechts DE/RU und ein runder Knopf mit Symbol statt
       „Панель управления“/„Вход“ (Text bleibt als aria-label/title). */
    .cat-topbar { padding: 12px 20px; font-size: 16px; }
    .cat .cat-brand { font-size: 19px; }
    .cat-topbar-right { gap: 16px; }
    .cat-locales { gap: 14px; letter-spacing: 0.04em; }
    .cat-locales > * { padding: 8px 2px; }
    .cat .cat-login {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        padding: 0;
        border: 1px solid var(--color-divider);
        border-radius: 50%;
        background: var(--color-neutral-100);
    }
    .cat .cat-login:hover, .cat .cat-login:focus-visible { border-color: var(--color-accent); }
    .cat-login-text { display: none; }
    .cat-login-icon { display: block; }

    .cat-head { display: block; padding: 20px 20px 18px; }
    .cat-head > span { display: none; }
    .cat .cat-wordmark { font-size: 44px; }
    .cat-tagline { margin-top: 8px; font-size: 12px; }
    .cat-search { width: auto; margin: 18px 0 0; justify-self: stretch; }
    .cat-search svg { right: 12px; width: 18px; height: 18px; }
    .cat-input { min-height: 44px; font-size: 16px; padding-right: 38px; }

    .cat-sections {
        margin: 0;
        padding: 0 20px;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 24px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
    }
    .cat-sections::-webkit-scrollbar { display: none; }
    .cat .cat-section {
        flex: none;
        display: flex;
        align-items: center;
        min-height: 50px;
        padding: 0;
        font-size: 18px;
        letter-spacing: 0;
        white-space: nowrap;
    }

    .cat-meta { margin: 0; padding: 6px 20px; font-size: 15px; }
    .cat-langs { gap: 4px; }
    .cat .cat-lang {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
        padding: 0 6px;
        border-bottom: 0;
        letter-spacing: 0;
    }
    .cat .cat-lang.is-active { text-decoration: underline; text-underline-offset: 4px; }

    .cat-wall { margin: 0; padding: 12px 20px 32px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 16px; }
    .cat-caption { display: none; }
    .cat-cover-shadow { height: 9px; }
    .cat-wall .cat-cover-kicker, .cat-wall .cat-cover-author { display: none; }
    .cat-wall .cat-v1 .cat-cover-frame { inset: 3.8cqw; }
    .cat-wall .cat-v1 .cat-cover-body { padding: 11.3cqw 7.5cqw; justify-content: center; }
    .cat-wall .cat-v1 .cat-cover-title { font-size: 12.3cqw; }
    .cat-wall .cat-v2 .cat-cover-initial { font-size: 51cqw; }
    .cat-wall .cat-v2 .cat-cover-title { font-size: 11.3cqw; }
    .cat-wall .cat-v3 .cat-cover-title { position: absolute; left: 8.5cqw; right: 8.5cqw; top: 46%; margin-top: 0; font-size: 12.3cqw; }
    .cat-cover-loan { padding: 2px 5px; font-size: 10px; border-radius: 0; }
    .cat-empty { padding: 24px 20px 64px; }
    .cat-wall + .cat-empty:not([hidden]) { margin-top: -32px; }

    .cat-footer { background: none; }
    .cat-footer-inner { margin: 0; padding: 18px 20px 28px; justify-content: center; font-size: 11px; }
    .cat-footer-mark { display: none; }
    .cat-footer-links { justify-content: center; gap: 8px; }

    /* Karte als Blatt von unten */
    .cat-sheet-backdrop { background: color-mix(in srgb, var(--color-neutral-900) 40%, transparent); }
    .cat-sheet-panel {
        top: auto;
        left: 0;
        width: auto;
        max-height: 82%;
        border-left: 0;
        border-radius: 14px 14px 0 0;
        animation-name: cat-sheet-up;
    }
    @keyframes cat-sheet-up { from { transform: translateY(32px); opacity: 0; } to { transform: none; opacity: 1; } }
    .cat-sheet-grip { display: flex; justify-content: center; padding: 10px 0 0; }
    .cat-sheet-grip::before { content: ""; width: 40px; height: 4px; border-radius: 2px; background: var(--color-neutral-400); }
    .cat-sheet-head { justify-content: flex-end; padding: 0 8px; border-bottom: 0; }
    .cat-sheet-head .cat-sheet-kicker { display: none; }
    .cat .cat-icon-btn { width: 44px; height: 44px; border: 0; }
    .cat-sheet-body { padding: 0 24px 32px; align-items: center; gap: 14px; text-align: center; }
    .cat-cover-lg { width: 120px; }
    .cat-cover-lg .cat-cover-kicker, .cat-cover-lg .cat-cover-author { display: none; }
    .cat-cover-lg .cat-cover-body { justify-content: center; padding: 10cqw 6.7cqw; }
    .cat-cover-lg .cat-cover-title { font-size: 12.5cqw; line-height: 1.08; }
    .cat-sheet-kicker-inline { display: block; font-size: 10px; }
    .cat .cat-sheet-titles h2 { font-size: 28px; margin: 0 0 14px; }
    .cat-sheet-author { font-size: 14px; }
    .cat-sheet-status { gap: 10px; padding: 0; border: 0; }
    .cat-sheet-copies { font-size: 12px; }
    .cat-sheet-desc { text-align: left; hyphens: manual; }
    .cat-sheet-facts {
        align-self: stretch;
        text-align: left;
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 8px 12px;
        padding-top: 12px;
        border-top: 1px solid var(--color-divider);
    }
    .cat-isbn { display: none; }
}

/* ── Menü der Plattform als Seitenleiste (Knopf oben rechts) ─────────────── */
/* Linie unten: Liste endet sichtbar, Abstand zum Rand (iPhone: Home-Leiste). */

@media (prefers-reduced-motion: reduce) {
    .cat-lift, .cat-caption { transition: none; }
    .cat-sheet-panel { animation: none; }
}

/* Telefon: Menü als Karte unter dem Knopf statt Leiste über die ganze Höhe.
   Safari auf dem iPhone zeichnet die Seite unter seiner unteren Leiste weiter,
   schneidet feste Elemente aber am sichtbaren Bereich ab - eine Leiste bis zum
   Rand sah dort abgebrochen aus. Die Karte berührt keinen Rand; abgedunkelt
   wird die Seite selbst (body::after), damit es auch unter der Safari-Leiste
   dunkel ist. */
@media (max-width: 719px) {
    body.cat { position: relative; }
    body.cat-menu-open { min-height: 100lvh; }
    body.cat-menu-open::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 55;
        background: color-mix(in srgb, var(--color-neutral-900) 30%, transparent);
        pointer-events: none;
    }
}

/* Sehr schmale Telefone (≤ 380px). */
@media (max-width: 380px) {
    .cat-topbar { padding-left: 16px; padding-right: 16px; }
    .cat .cat-brand { font-size: 17px; }
    .cat-topbar-right { gap: 12px; }
    .cat .cat-wordmark { font-size: 38px; }
}
