/* =========================
   СБРОС + БАЗА
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.4;
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.shell {
    width: min(1600px, calc(100% - 28px));
    margin: 0 auto;
    padding: 0;
}

#main {
    padding: 0;
}

/* User-generated text (titles, descriptions, parameters) can contain long
   unbreakable strings. Force wrapping for everything inside the content area
   so such input can never blow out the layout. `anywhere` is inherited and
   also shrinks min-content, which prevents grid/flex track blowout; the
   `word-break` fallback covers older Safari (< 15.4). The header/footer live
   outside #main, so their labels are unaffected. */
#main {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* =========================
   ПАГИНАЦИЯ
========================= */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 24px 0 8px;
    flex-wrap: wrap;
}

.pagination-btn,
.pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--border);
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
}

.pagination-btn:hover,
.pagination-page:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.pagination-page.is-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    cursor: default;
    pointer-events: none;
}

.pagination-btn.is-disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 36px;
    color: var(--muted);
    font-size: 14px;
}