/* =========================================================
   COMPONENTS — hero, stats, sections, forum cards, topics
   Извлечено из reference.html (раздел 10/11).
   ========================================================= */


/* =========================
   MODAL (общее окно поверх страницы)
   =========================

   Правила ПЕРЕНЕСЕНЫ из views/profile.js в глобальный стиль 2026-10-03.
   Причина: модалкой пользуются несколько вьюх (смена пароля, жалоба на
   SteamID, «Подробнее» о тёмных душах, редактор товара магазина), а стиль,
   объявленный внутри вьюхи, попадал в страницу только после её открытия.
   При прямом входе в магазин окно было бы без оформления — ровно тот случай,
   на который ругается scripts/check-frontend.mjs («класс взят у соседней
   вьюхи»). Общие элементы окна обязаны быть глобальными. */
.gs-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 1300;
    padding: 16px;
}

.gs-modal {
    width: min(520px, 100%);
    max-height: 88vh;
    overflow: auto;

    padding: 20px;

    background: var(--surface, #0F1014);
    border: 1px solid var(--border, #222328);
    border-radius: 12px;

    box-shadow: 0 12px 34px rgba(0, 0, 0, .6);
}

.gs-modal-title {
    margin: 0 0 6px;

    color: var(--text, #fff);
    font: 600 15px Inter, sans-serif;
}

.gs-modal-text {
    margin: 0 0 14px;

    color: var(--text-secondary, #C6C7CB);
    font: 400 13px/1.5 Inter, sans-serif;
}

.gs-modal-label {
    display: block;
    margin-bottom: 5px;

    color: var(--text-muted, #8A8F98);
    font: 500 11px Inter, sans-serif;
}

.gs-modal-actions {
    display: flex;
    gap: 10px;

    margin-top: 16px;
}

.gs-modal-actions .gs-btn {
    flex: 1;
    padding: 10px;
}


/* =========================
   AUTH FORMS — кнопка входа и ошибки
   ПЕРЕНЕСЕНО из web/js/auth.js (2026-10-06): классы .auth-submit / .auth-error
   переиспользуются вьюхами announcements, bans, profile, topic, support.
   Были объявлены только в STYLE auth.js и инъектировались через ensureStyle()
   при openModal() — из-за чего после F5 на чужой странице кнопки и ошибки
   формы оставались незадокументированными. Теперь глобальные.
   ========================= */
.auth-submit {
    background: var(--accent-fill, #A5201C);
    color: #fff;
    border: 0;
    padding: 10px;
    border-radius: 7px;
    font: 700 13px Inter, sans-serif;
    cursor: pointer;
}
.auth-error {
    color: #ff6b6b;
    font: 500 12px Inter, sans-serif;
    min-height: 14px;
}
/* ПЕРЕНЕСЕНО из web/js/views/audit.js: .audit-empty используется в support.js. */
.audit-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-muted, #8A8F98);
    font: 500 13px Inter, sans-serif;
}

/* =========================
   HERO
   ========================= */

.hero {
    position: relative;

    min-height: 224px;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    /* 11.4 п.12: hero-артворк подключён (banner: web/img/hero-banner.png).
       Поверх — затемняющий градиент для читаемости белого текста + лёгкий
       акцентный glow; background-size:cover, по центру. */
    background-color: var(--surface);
    background-image:
        linear-gradient(180deg, rgba(5, 6, 10, .55), rgba(5, 6, 10, .35)),
        radial-gradient(ellipse at 75% 40%, rgba(214, 51, 46, .18), transparent 60%),
        url("/web/img/hero-banner.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    box-shadow: var(--shadow);
}

.hero-placeholder-tag {
    position: absolute;
    top: 12px;
    right: 14px;

    padding: 3px 9px;

    border: 1px dashed var(--border-light);
    border-radius: 20px;

    color: var(--text-muted);

    font-size: 9px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.hero-content {
    position: relative;
    z-index: 2;

    max-width: 640px;
    padding: 32px;

    text-align: center;
}

.hero-kicker {
    margin-bottom: 10px;

    color: var(--accent);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-title {
    margin-bottom: 12px;

    font-family: "Rajdhani", sans-serif;

    font-size: clamp(38px, 4.5vw, 58px);
    line-height: .95;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--text);
}

.hero-description {
    color: var(--text-secondary);

    font-size: 14px;
    line-height: 1.6;
}

/* карусель-точки под hero — только мобильная версия (10.5) */
.hero-dots {
    display: none;
    justify-content: center;
    gap: 6px;

    margin-top: 12px;
}

.hero-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-light);
}

.hero-dots span.active {
    background: var(--accent);
}


/* =========================
   STATS GRID (три чипа)
   ========================= */

.stats-grid {
    margin-top: 10px;

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;

    min-height: 52px;
    padding: 9px 14px;

    border: 1px solid var(--border-light);
    border-radius: var(--radius);

    background: var(--chip);

    box-shadow: var(--shadow-small);
}

.stat-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 8px;

    background: var(--accent-soft);
    color: var(--accent);
}

.stat-icon svg {
    width: 19px;
    height: 19px;
}

.stat-content {
    min-width: 0;
}

.stat-title {
    margin-bottom: 3px;

    color: var(--text-secondary);

    font-size: 11px;
    font-weight: 600;
}

.stat-value {
    color: var(--text);

    font-size: 13px;
    font-weight: 700;
}


/* =========================
   SECTION HEADER
   ========================= */

.section-header {
    margin-top: 14px;

    padding: 12px 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border: 1px solid var(--border);
    border-bottom: 0;
    border-radius: var(--radius) var(--radius) 0 0;

    background: var(--surface);
}

.section-title {
    font-family: "Rajdhani", sans-serif;

    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.section-link {
    color: var(--text-secondary);

    font-size: 11px;
    font-weight: 600;

    transition: color .18s ease;
}

.section-link:hover {
    color: var(--accent);
}

/* bans.js — единая карточка «Табло банов» (паттерн как .forum-grid под .section-header) */
.section-sub {
    font: 500 11px Inter, sans-serif;
    color: var(--text-muted);
    margin-top: 3px;
}
.ban-grid,
.faq-grid {
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    background: var(--card);
    padding: 14px 16px;
}
.ban-empty {
    color: var(--text-muted);
    font: 500 13px Inter, sans-serif;
}
/* админ-панель — внутри карточки, без собственной рамки */
.ban-admin {
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 14px;
    margin-bottom: 14px;
}
.ban-admin-title {
    font: 700 15px Inter, sans-serif;
    color: var(--text);
    margin-bottom: 10px;
}
/* блок выбора участника для бана (пикер вместо ручного ввода имени) */
.ban-pick-wrap {
    flex: 1 1 100%;
    margin: 4px 0 2px;
}
.ban-pick-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    font: 600 12px Inter, sans-serif;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.ban-members {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--surface);
    padding: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.ban-members::-webkit-scrollbar { width: 8px; }
.ban-members::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 8px;
}
.ban-members:hover::-webkit-scrollbar-thumb {
    background: var(--border, #222328);
}
.ban-member {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 7px;
    transition: background .15s ease;
}
.ban-member:hover { background: var(--card-hover, rgba(255, 255, 255, .045)); }
.ban-member.selected { background: var(--accent-soft, rgba(214, 51, 46, .14)); }
.ban-member-name {
    color: var(--text);
    font: 500 13px Inter, sans-serif;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ban-member-empty {
    color: var(--text-muted);
    font: 500 13px Inter, sans-serif;
    padding: 8px 2px;
}
.ban-pick {
    flex: 0 0 auto;
    background: transparent;
    border: 1px solid var(--accent, #D6332E);
    color: var(--accent, #D6332E);
    padding: 4px 12px;
    border-radius: 7px;
    cursor: pointer;
    font: 600 12px Inter, sans-serif;
    transition: background .15s ease, color .15s ease;
}
.ban-pick:hover {
    background: var(--accent-fill, #A5201C);
    border-color: var(--accent-fill, #A5201C);
    color: #fff;
}
.ban-member.selected .ban-pick {
    background: var(--accent-fill, #A5201C);
    border-color: var(--accent-fill, #A5201C);
    color: #fff;
}

/* =========================
   UI SELECT (кастомные выпадающие списки)
   ========================= */
.ui-select {
    position: relative;
    z-index: 0;
}
.ui-select.is-open {
    z-index: 100;
}
.ui-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.ui-select-trigger {
    width: 100%;
    min-width: 160px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--card, #15161B);
    border: 1px solid var(--border, #222328);
    color: var(--text, #C6C7CB);
    border-radius: 7px;
    padding: 8px 10px;
    font: 400 13px Inter, sans-serif;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.ui-select-trigger:hover {
    border-color: var(--accent, #D6332E);
}
.ui-select-trigger:focus-visible {
    outline: 2px solid var(--accent, #D6332E);
    outline-offset: 1px;
}
.ui-select.is-open .ui-select-trigger {
    border-color: var(--accent, #D6332E);
}
.ui-select-caret {
    width: 16px;
    height: 16px;
    color: var(--text-muted, #8A8F98);
    flex: 0 0 auto;
    transition: transform .18s ease;
}
.ui-select.is-open .ui-select-caret {
    transform: rotate(180deg);
}
.ui-select-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ui-select-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 6px;
    list-style: none;
    background: rgba(17, 18, 23, .92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border, #222328);
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
    max-height: 280px;
    overflow: auto;
    animation: ui-select-pop .14s ease;
}
.ui-select-list::-webkit-scrollbar { width: 8px; }
.ui-select-list::-webkit-scrollbar-thumb { background: var(--border, #222328); border-radius: 8px; }
@keyframes ui-select-pop {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}
.ui-select-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary, #C6C7CB);
    font: 400 13px Inter, sans-serif;
    transition: background .12s ease, color .12s ease;
}
.ui-select-item:hover,
.ui-select-item.is-active {
    background: var(--accent-soft, rgba(214, 51, 46, .14));
    color: #fff;
}
.ui-select-item.is-selected {
    color: var(--accent, #D6332E);
}
.ui-select-check {
    color: var(--accent, #D6332E);
    font: 600 13px Inter, sans-serif;
}

/* =========================
   UI NUMBER (кастомный числовой степпер)
   ========================= */
.ui-number {
    position: relative;
    display: flex;
    align-items: center;
}
.ui-number-input {
    width: 100%;
    background: #15161B;
    border: 1px solid var(--border, #222328);
    color: #fff;
    padding: 8px 34px 8px 10px;
    border-radius: 7px;
    font: 400 13px Inter, sans-serif;
    box-sizing: border-box;
    transition: border-color .15s ease;
}
.ui-number-input:hover { border-color: var(--accent, #D6332E); }
.ui-number-input:focus-visible { outline: 2px solid var(--accent, #D6332E); outline-offset: 1px; }
.ui-number-btns {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ui-number-step {
    width: 24px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface, #0F1014);
    border: 1px solid var(--border, #222328);
    border-radius: 5px;
    color: var(--text-muted, #8A8F98);
    cursor: pointer;
    font-size: 8px;
    line-height: 1;
    padding: 0;
}
.ui-number-step:hover { border-color: var(--accent, #D6332E); color: var(--accent, #D6332E); }
.ui-number-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* =========================
   UI DATE (кастомный календарь)
   ========================= */
.ui-date { position: relative; z-index: 0; display: inline-block; }
.ui-date.is-open { z-index: 20; }
.ui-date-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card, #15161B);
    border: 1px solid var(--border, #222328);
    color: var(--text, #C6C7CB);
    border-radius: 7px;
    padding: 8px 10px;
    font: 400 13px Inter, sans-serif;
    cursor: pointer;
    min-width: 170px;
    transition: border-color .15s ease;
}
.ui-date-trigger:hover { border-color: var(--accent, #D6332E); }
.ui-date-trigger:focus-visible { outline: 2px solid var(--accent, #D6332E); outline-offset: 1px; }
.ui-date.is-open .ui-date-trigger { border-color: var(--accent, #D6332E); }
.ui-date-ico { width: 16px; height: 16px; color: var(--text-muted, #8A8F98); flex: 0 0 auto; }
.ui-date-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-date-pop {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 21;
    width: 264px;
    background: var(--surface, #0F1014);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border, #222328);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
    animation: ui-select-pop .14s ease;
    isolation: isolate;
}
.ui-date-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ui-date-title { font: 600 13px Inter, sans-serif; color: var(--text, #C6C7CB); }
.ui-date-selects { display: flex; justify-content: center; gap: 5px; min-width: 0; }
.ui-date-picker-select { position: relative; min-width: 0; }
.ui-date-picker-select:first-child { flex: 1 1 auto; }
.ui-date-picker-select.is-year { flex: 0 0 74px; }
.ui-date-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    width: 100%;
    border: 1px solid var(--border, #222328);
    border-radius: 6px;
    padding: 6px 8px;
    background: var(--input-bg, #15161B);
    color: var(--text, #C6C7CB);
    font: 500 12px/1.2 Inter, sans-serif;
    cursor: pointer;
    text-align: left;
}
.ui-date-select:hover,.ui-date-select[aria-expanded="true"] { border-color: var(--accent, #D6332E); }
.ui-date-select:focus-visible { outline: 2px solid var(--accent-fill, #A5201C); outline-offset: 1px; }
.ui-date-select-chevron { color: var(--text-muted, #8A8F98); font-size: 14px; line-height: 1; }
.ui-date-options {
    position: absolute;
    z-index: 22;
    top: calc(100% + 5px);
    left: 0;
    width: max(100%, 120px);
    max-height: 190px;
    overflow: auto;
    padding: 5px;
    border: 1px solid var(--border, #222328);
    border-radius: 8px;
    background: var(--surface, #0F1014);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .55);
    scrollbar-color: var(--text-muted, #666) var(--surface, #0F1014);
    scrollbar-width: thin;
}
.ui-date-picker-select.is-year .ui-date-options { right: 0; left: auto; width: 88px; }
.ui-date-option {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 5px;
    padding: 7px 9px;
    background: transparent;
    color: var(--text-secondary, #C6C7CB);
    font: 500 12px/1.2 Inter, sans-serif;
    text-align: left;
    cursor: pointer;
}
.ui-date-option:hover,.ui-date-option:focus-visible { outline: none; background: var(--card-hover, rgba(255,255,255,.06)); color: var(--text, #fff); }
.ui-date-option.is-selected { background: var(--accent-soft, rgba(214, 51, 46, .14)); color: var(--accent, #D6332E); }
.ui-date-nav {
    width: 28px; height: 28px;
    border: 1px solid var(--border, #222328);
    background: var(--surface, #0F1014);
    color: var(--text, #C6C7CB);
    border-radius: 7px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
}
.ui-date-nav:hover { border-color: var(--accent, #D6332E); color: var(--accent, #D6332E); }
.ui-date-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.ui-date-weekdays span { text-align: center; font: 600 11px Inter, sans-serif; color: var(--text-muted, #8A8F98); padding: 4px 0; }
.ui-date-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ui-date-day {
    aspect-ratio: 1 / 1;
    border: none;
    background: transparent;
    color: var(--text-secondary, #C6C7CB);
    border-radius: 7px;
    cursor: pointer;
    font: 400 12px Inter, sans-serif;
    padding: 0;
    transition: background .12s ease, color .12s ease;
}
.ui-date-day:hover { background: var(--accent-soft, rgba(214, 51, 46, .14)); color: #fff; }
.ui-date-day:disabled { cursor: not-allowed; opacity: .25; }
.ui-date-day:disabled:hover { background: transparent; color: var(--text-secondary, #C6C7CB); }
.ui-date-day.is-other { color: var(--text-muted, #8A8F98); opacity: .45; }
.ui-date-day.is-today { box-shadow: inset 0 0 0 1px var(--border, #222328); }
.ui-date-day.is-selected { background: var(--accent, #D6332E); color: #fff; }


/* =========================
   FORUM CARDS (разделы форума)
   11.5: пять зон в один ряд, а не 2 колонки
   ========================= */

.forum-grid {
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);

    background: var(--card);

    box-shadow: var(--shadow-small);
}

.forum-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 74px 96px 200px;
    align-items: center;
    gap: 16px;

    min-height: 77px;

    padding: 14px 16px;

    border-bottom: 1px solid var(--border);

    color: inherit;
    cursor: pointer;

    transition: background .18s ease;
}

.forum-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.forum-grid .forum-card:last-child {
    border-bottom: 0;
}

.forum-card:hover {
    background: var(--card-hover);
}

.forum-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 9px;

    background: var(--accent-soft);
    color: var(--accent);
}

.forum-icon svg {
    width: 21px;
    height: 21px;
}

.forum-info {
    min-width: 0;
}

.forum-name {
    margin-bottom: 3px;

    color: var(--text);

    font-size: 14px;
    font-weight: 700;
}

.forum-description {
    color: var(--text-secondary);

    font-size: 11px;
    line-height: 1.45;
}

/* мобильная строка-саммари ("248 тем · 1 842 сообщения"), скрыта на десктопе — 11.8 */
.forum-mobile-meta {
    display: none;
    color: var(--text-muted);
    font-size: 11px;
}

/* 11.5 п.15: счётчик — крупное число сверху, подпись снизу */
.forum-count {
    text-align: center;
}

.forum-count-value {
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
}

.forum-count-label {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 10px;
}

/* 11.5 п.16: блок последней темы — с разделителем слева + аватарка автора */
/* 11.5 p.16: last topic block and formatted avatar */
.forum-last {
    padding-left: 18px;
    border-left: 1px solid var(--border-light);

    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.forum-last-label {
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.forum-last-topic {
    margin: 0;
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: var(--accent);

    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
}

.forum-last-topic a {
    color: inherit;
}



.forum-last-author {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    color: var(--text-muted);
    font-size: 10px;
    line-height: 1;
}

.forum-last-author-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.forum-last-avatar {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;

    display: inline-grid;
    place-items: center;

    border-radius: 50%;

    background: var(--accent-soft);
    color: var(--accent);

    font-size: 8.5px;
    font-weight: 800;
    line-height: 1;
}

.forum-last-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.forum-last-author-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-last-separator {
    color: var(--border-light, var(--border));
}

.forum-last-time {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* шеврон-«>» справа — только мобильная карточка (10.5) */
.forum-chevron {
    display: none;
}


/* =========================
   TOPICS TABLE (последние темы)
   11.6: таблица с колонками, без буквенных аватарок
   ========================= */

.topic-table {
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);

    background: var(--card);

    box-shadow: var(--shadow-small);
}

.topic-row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 150px 110px 64px 74px 74px;
    align-items: center;
    gap: 14px;

    min-height: 46px;

    padding: 9px 16px;

    border-bottom: 1px solid var(--border);

    color: inherit;

    transition: background .18s ease;
}

.topic-table > a:last-of-type {
    border-bottom: 0;
}

.topic-row:hover {
    background: var(--card-hover);
}

.topic-icon {
    width: 20px;
    height: 20px;

    display: grid;
    place-items: center;

    color: var(--text-muted);
}

.topic-icon svg {
    width: 16px;
    height: 16px;
}

.topic-row-title {
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

/* мобильная строка под названием (раздел/автор/время слитно) — 11.8 */
.topic-row-sub {
    display: none;
    color: var(--text-muted);
    font-size: 10px;
}

.topic-section-col {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: var(--text-secondary);
    font-size: 11px;
}

.topic-author-col {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
}

.topic-num-col {
    text-align: right;
    color: var(--text-muted);
    font-size: 11px;
}

.topic-time-col {
    text-align: right;
    color: var(--text-muted);
    font-size: 10px;
    white-space: nowrap;
}

/* красный бейдж-счётчик ответов — показывается только на мобильном (10.5) */
.topic-badge {
    display: none;
    margin-left: auto;

    padding: 2px 8px;

    border-radius: 10px;

    background: var(--accent-fill);
    color: #fff;

    font-size: 10px;
    font-weight: 700;
}

/* Premium — строка таблицы (amber), а не отдельный баннер — 11.6 п.20 */
.topic-row.is-premium .topic-icon,
.topic-row.is-premium .topic-row-title,
.topic-row.is-premium .topic-section-col {
    color: var(--premium);
}

.topic-row.is-premium .topic-icon svg {
    fill: var(--premium);
    stroke: var(--premium);
}

/* строка-кнопка "Показать больше тем" — 11.6 п.19 */
.show-more-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    width: 100%;

    padding: 12px;

    color: var(--text-secondary);

    font-size: 12px;
    font-weight: 600;

    transition: color .18s ease, background .18s ease;
}

.show-more-row:hover {
    color: var(--text);
    background: var(--card-hover);
}

.show-more-row svg {
    width: 14px;
    height: 14px;
}

/* компактная акцентная кнопка справа в шапке секции (Новый раздел / Новая тема).
   НЕ на всю ширину: auto-width, flex space-between в .section-header ставит её справа. */
.section-action {
    width: auto;
    padding: 6px 12px;
    border: 0;
    border-radius: 7px;
    background: var(--accent-fill, #A5201C);
    color: #fff;
    font: 700 12px Inter, sans-serif;
    letter-spacing: .2px;
    cursor: pointer;
    transition: background .18s ease;
}

.section-action:hover {
    background: var(--accent-fill-hov, #BC2621);
}

/* =========================
   SELECT — стилизация нативного выпадающего списка
   (закрытый контрол + кастомная стрелка; сам «вылетающий» список
   option стилизуется насколько позволяет браузер)
   ========================= */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: var(--card, #15161B) !important;
    color: var(--text, #C6C7CB) !important;
    border: 1px solid var(--border, #222328) !important;
    border-radius: 7px;
    padding: 8px 30px 8px 10px !important;
    font: 400 13px Inter, sans-serif;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23C6C7CB' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 12px !important;
}

select:focus {
    outline: none;
    border-color: var(--accent, #D6332E) !important;
}

select option {
    background: var(--card, #15161B);
    color: var(--text, #C6C7CB);
}

select::-ms-expand {
    display: none;
}

/* =========================
   ОБЪЯВЛЕНИЯ (раздел «Объявления»)
   ========================= */
.ann-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.ann-card {
    border: 1px solid var(--border-light, #17181C);
    border-radius: var(--radius, 10px);
    background: var(--card, #15161B);
    padding: 14px 16px;
}
.ann-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ann-pin { font-size: 14px; }
.ann-card-title {
    color: var(--text, #fff);
    font: 700 16px Inter, sans-serif;
    text-decoration: none;
}
a.ann-card-title:hover { color: var(--accent, #D6332E); }
.ann-card-body {
    color: var(--text, #fff);
    font: 400 13px/1.6 Inter, sans-serif;
    white-space: pre-wrap;
    word-break: break-word;
}
.ann-card-body p { margin: 0 0 8px; }
.ann-attachments-view { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ann-att {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border-light, #17181C);
    overflow: hidden;
    display: block;
}
.ann-att img { max-width: 320px; max-height: 320px; display: block; }
.ann-att video { max-width: 320px; max-height: 320px; display: block; background: #000; }
.ann-att-file {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 12px; border-radius: 8px;
    border: 1px solid var(--border, #222328);
    background: var(--surface, #0F1014);
    color: var(--text-secondary, #C6C7CB);
    text-decoration: none; font-size: 13px;
}
.ann-att-file:hover { color: var(--accent, #D6332E); border-color: var(--accent, #D6332E); }
.ann-card-foot {
    display: flex; align-items: center; gap: 8px;
    margin-top: 12px; padding-top: 10px;
    border-top: 1px solid var(--border-light, #17181C);
    color: var(--text-muted, #8A8F98);
    font-size: 12px;
}
.ann-comments-link {
    color: var(--text-secondary, #C6C7CB);
    text-decoration: none; font-weight: 600; font-size: 12px;
}
.ann-comments-link:hover { color: var(--accent, #D6332E); }
.ann-admin-row { display: flex; gap: 8px; margin-top: 10px; }
.ann-admin-row button {
    background: transparent; border: 1px solid var(--border, #222328);
    color: var(--text-secondary, #C6C7CB);
    padding: 5px 12px; border-radius: 7px; cursor: pointer; font: 600 12px Inter, sans-serif;
}
.ann-admin-row .ann-del { color: var(--danger, #D6332E); border-color: var(--danger, #D6332E); }
.ann-admin-row button:hover { background: var(--card-hover, rgba(255,255,255,.045)); }

/* композер (admin) */
.ann-composer {
    border: 1px solid var(--border-light, #17181C);
    border-radius: var(--radius, 10px);
    background: var(--surface, #0F1014);
    padding: 14px 16px;
    margin-bottom: 4px;
}
.ann-dropzone {
    border: 1px dashed var(--border, #222328);
    border-radius: 8px;
    padding: 14px; text-align: center;
    color: var(--text-muted, #8A8F98);
    font-size: 12px;
    transition: border-color .15s ease, background .15s ease;
}
.ann-dropzone.drag-over { border-color: var(--accent, #D6332E); background: var(--accent-soft, rgba(214,51,46,.12)); }
.ann-attach-btn {
    margin-top: 8px; background: transparent; border: 1px solid var(--accent, #D6332E);
    color: var(--accent, #D6332E); padding: 5px 12px; border-radius: 7px; cursor: pointer;
    font: 600 12px Inter, sans-serif;
}
.ann-attach-btn:hover { background: var(--accent-fill, #A5201C); color: #fff; border-color: var(--accent-fill, #A5201C); }
.ann-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ann-chip {
    display: flex; align-items: center; gap: 8px;
    border: 1px solid var(--border, #222328); border-radius: 8px;
    background: var(--card, #15161B); padding: 6px 8px; max-width: 240px;
}
.ann-chip-img { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; }
.ann-chip-icon { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.ann-chip-meta { min-width: 0; }
.ann-chip-name { color: var(--text, #fff); font: 500 12px Inter, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ann-chip-size { color: var(--text-muted, #8A8F98); font-size: 11px; }
.ann-chip-remove {
    margin-left: auto; background: transparent; border: none; color: var(--text-muted, #8A8F98);
    cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: 6px;
}
.ann-chip-remove:hover { color: var(--danger, #D6332E); background: var(--card-hover, rgba(255,255,255,.045)); }

/* деталь + комментарии */
.ann-detail { margin-top: 4px; }
.ann-comments-title { margin: 18px 0 8px; color: var(--text-secondary, #C6C7CB); font: 700 13px Inter, sans-serif; text-transform: uppercase; letter-spacing: .4px; }
.ann-login-hint { color: var(--text-muted, #8A8F98); font-size: 12px; margin: 14px 0; }
.ann-comments { display: flex; flex-direction: column; gap: 10px; }
.ann-comment { display: flex; gap: 10px; align-items: flex-start; }
.forum-last-avatar {
    width: 34px; height: 34px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    font: 700 12px Inter, sans-serif; color: #fff; background: var(--accent-soft, rgba(214,51,46,.14));
}
.forum-last-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ann-comment-body { flex: 1; min-width: 0; }
.ann-comment-head { display: flex; align-items: baseline; gap: 8px; }
.ann-comment-head b { color: var(--text, #fff); font: 600 13px Inter, sans-serif; }
.ann-comment-text { color: var(--text, #fff); font: 400 13px/1.6 Inter, sans-serif; margin: 2px 0 4px; white-space: pre-wrap; word-break: break-word; }
.ann-comment-actions { display: flex; align-items: center; gap: 10px; }
.ann-comment-del {
    background: transparent; border: none; color: var(--text-muted, #8A8F98);
    cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: 6px;
}
.ann-comment-del:hover { color: var(--danger, #D6332E); }

/* лайк (как в темах) */
.ann-like.react-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: transparent; border: 1px solid var(--border, #222328);
    color: var(--text-secondary, #C6C7CB);
    padding: 4px 10px; border-radius: 7px; cursor: pointer;
    font: 600 12px Inter, sans-serif; transition: color .15s, border-color .15s, background .15s;
}
.ann-like.react-btn:hover { border-color: var(--accent, #D6332E); color: var(--accent, #D6332E); }
.ann-like.react-btn.reacted { color: var(--accent, #D6332E); border-color: var(--accent, #D6332E); background: var(--accent-soft, rgba(214,51,46,.14)); }
.ann-like.react-btn svg { width: 15px; height: 15px; }

/* --- Привязка объявления к разделу/теме (2026-10-03) --- */
.ann-link{display:flex;flex-direction:column;gap:8px;padding:12px;
  border:1px solid var(--border);border-radius:8px;background:rgba(255,255,255,.02);}
.ann-link-title{font:600 12px Inter,sans-serif;color:var(--text-secondary);}
.ann-link-hint{font:400 11px/1.45 Inter,sans-serif;color:var(--text-muted);}
.ann-chips{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 2px;}
.ann-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 9px;border-radius:999px;
  background:rgba(255,255,255,.05);border:1px solid var(--border);
  color:var(--text-secondary);font:500 11px Inter,sans-serif;text-decoration:none;}
.ann-chip:hover{border-color:var(--accent);color:var(--text);}
.ann-chip svg{width:13px;height:13px;color:var(--accent);}

/* Game selector */
.game-wrap { position: relative; display: inline-flex; align-items: center; }
.game-toggle svg { width: 18px; height: 18px; flex: 0 0 18px; }

.game-wrap { position: relative; display: inline-flex; }
.game-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); color: var(--text); cursor: pointer; }
.game-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-small); z-index: 20; }
.game-list { display: grid; gap: 6px; }
.game-option { text-align: left; padding: 9px 11px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; }
.game-option:hover, .game-option.active { background: var(--accent-soft); color: var(--text); border-color: var(--accent); }
.game-add { width: 100%; margin-top: 8px; padding: 9px 11px; border: 1px dashed var(--border); border-radius: 8px; background: transparent; color: var(--text-secondary); cursor: pointer; }
.game-modal { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .45); z-index: 100; }
.game-modal[hidden] { display: none; }
.game-modal-card { width: min(440px, calc(100vw - 32px)); padding: 20px; border-radius: var(--radius-lg, var(--radius)); background: var(--card); box-shadow: var(--shadow-small); }
.game-field { display:grid; gap:6px; margin:12px 0; }
.game-field span { font-size:12px; color:var(--text-secondary); font-weight:600; }
.game-field input { width:100%; box-sizing:border-box; padding:9px 11px; border:1px solid var(--border); border-radius:8px; background:var(--bg); color:var(--text); font:500 14px/1.4 Inter, sans-serif; }
.game-manage-open { width: 100%; margin-top: 8px; padding: 9px 11px; border: 1px dashed var(--border); border-radius: 8px; background: transparent; color: var(--text-secondary); cursor: pointer; }
.game-manage-select { flex: 1; min-width:0; text-align: left; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text); cursor: pointer; font-weight: 600; }
.game-manage-row .game-manage-actions { display: flex; gap: 6px; flex-wrap: wrap; max-width: 100%; }
.game-form-actions, .game-manage-actions { display:flex; gap:8px; justify-content:flex-end; margin-top:12px; }
.game-manage-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:12px; }
.game-manage-head h2 { margin:0; }
.game-manage-list { display:grid; gap:8px; margin-bottom:12px; }
.game-manage-row { display:flex; align-items:center; gap:8px; padding:8px; border:1px solid var(--border); border-radius:8px; background:var(--card); flex-wrap:wrap; }
.game-manage-row .game-row-title { flex:1; color:var(--text); font-weight:600; }
.game-manage-row input { flex:1; min-width:0; padding:7px 9px; border:1px solid var(--border); border-radius:6px; background:var(--bg); color:var(--text); font:500 14px/1.3 Inter, sans-serif; }
.game-icon-btn { border:1px solid var(--border); background:transparent; color:var(--text-secondary); border-radius:6px; padding:6px 8px; cursor:pointer; font-size:16px; line-height:1; }
.game-icon-btn:hover { border-color:var(--accent, #D6332E); color:var(--accent, #D6332E); }
.game-icon-btn.is-danger:hover { border-color:#D6332E; color:#D6332E; }
.is-muted { background:transparent; color:var(--text-secondary); }
.game-manage-actions button, .game-form-actions button { border:1px solid var(--border); background:var(--card); color:var(--text); border-radius:8px; padding:8px 12px; cursor:pointer; }
.game-form-actions button:last-child { background:var(--accent, #D6332E); color:#fff; border-color:var(--accent, #D6332E); }


.novel-layout{display:grid;grid-template-columns:260px 1fr;gap:16px;padding:16px;min-height:60vh}
.novel-side{background:var(--card,#181920);border:1px solid var(--border,#262833);border-radius:10px;padding:12px}
.novel-main{background:var(--card,#181920);border:1px solid var(--border,#262833);border-radius:10px;padding:20px}
.novel-heading{margin:0 0 8px;font-size:18px}
.novel-admin{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.novel-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:38px;box-sizing:border-box;background:var(--card-hover,rgba(255,255,255,.045));border:1px solid var(--border,rgba(255,255,255,.075));color:var(--text-secondary,#C6C7CB);border-radius:8px;padding:8px 12px;cursor:pointer;font:600 13px/1.2 Inter,sans-serif;transition:background .15s ease,border-color .15s ease,color .15s ease,transform .15s ease}
.novel-btn svg{display:block;width:17px;height:17px;flex:0 0 17px}
.novel-btn:hover{background:var(--card,#15161B);border-color:var(--border,rgba(255,255,255,.12));color:var(--text);transform:translateY(-1px)}
.novel-btn:focus-visible{outline:2px solid var(--accent,#D6332E);outline-offset:2px}
.novel-btn-primary{background:var(--accent-fill,#A5201C);border-color:var(--accent-fill,#A5201C);color:#fff}
.novel-btn-primary:hover{background:var(--accent-fill-hov,#BC2621);border-color:var(--accent-fill-hov,#BC2621);color:#fff}
.novel-btn-danger{background:#dc2626;border-color:#dc2626}
.novel-toc{max-height:70vh;overflow:auto}
.novel-vol{margin-bottom:10px}
.novel-vol-title{font-weight:700;margin-bottom:4px}
.novel-ch-list{list-style:none;padding:0;margin:0}
.novel-ch-btn{background:transparent;border:none;color:var(--text,#d6d6de);padding:4px 6px;cursor:pointer;text-align:left;width:100%;border-radius:4px}
.novel-ch-btn.active{background:#2b2e3a;color:#fff}
.novel-article{max-width:720px;margin:0 auto}
.novel-title{margin:0 0 6px}
.novel-meta{opacity:.6;font-size:12px;margin-bottom:16px}
.novel-content{line-height:1.6}
.novel-content img{max-width:100%;height:auto;border-radius:6px;margin:8px 0}
.novel-content h1,.novel-content h2,.novel-content h3{margin:1em 0 .4em}
.novel-content blockquote{border-left:3px solid var(--accent,#3b82f6);padding-left:12px;opacity:.9}
.novel-empty{opacity:.6;padding:20px;text-align:center}
.novel-modal{position:fixed;inset:0;background:rgba(0,0,0,.6);display:flex;align-items:center;justify-content:center;z-index:1000;padding:16px}
.novel-modal-card{background:#161821;border:1px solid var(--border,#262833);border-radius:12px;width:min(900px,100%);max-height:90vh;overflow:auto;padding:16px}
.novel-modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.novel-x{background:transparent;border:none;color:#fff;font-size:22px;cursor:pointer}
.novel-editor-form{display:flex;flex-direction:column;gap:8px}
.novel-editor-form label{font-size:12px;opacity:.8}
.novel-editor-form input,.novel-editor-form select{background:#232532;border:1px solid var(--border,#303341);color:#fff;border-radius:6px;padding:8px}
.novel-toolbar{display:flex;flex-wrap:wrap;gap:4px;padding:6px;border:1px solid var(--border,#303341);border-radius:6px;background:#1f2130}
.novel-toolbar button{background:#2b2e3a;border:1px solid #3a3d4a;color:#fff;border-radius:4px;padding:4px 8px;cursor:pointer;font-size:12px}
.novel-editor{min-height:260px;border:1px solid var(--border,#303341);border-radius:6px;padding:12px;background:#0f1118;outline:none}
.novel-modal-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.novel-preview-body{max-height:70vh;overflow:auto}
.ne-shell{display:flex;flex-direction:column;gap:12px}
.ne-head{display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid var(--border,#303341);padding-bottom:10px;position:sticky;top:0;background:#161821;z-index:2}
.ne-head-left{display:flex;align-items:center;gap:12px}
.ne-head-icon{font-size:24px}
.ne-head h3{margin:0;font-size:18px}
.ne-head p{margin:0;opacity:.6;font-size:12px}
.ne-body{display:grid;grid-template-columns:320px 1fr;gap:16px}
.ne-left,.ne-right{min-height:200px}
.ne-card{background:#1f2130;border:1px solid var(--border,#303341);border-radius:10px;padding:10px;margin-bottom:10px}
.ne-card-title{font-weight:700;margin-bottom:8px}
.ne-volumes,.ne-chapter-list{list-style:none;margin:0;padding:0}
.ne-volume{border:1px solid var(--border,#303341);border-radius:8px;margin-bottom:8px;padding:8px}
.ne-volume-summary{display:flex;justify-content:space-between;align-items:center;cursor:pointer;font-weight:600}
.ne-volume-actions{display:flex;gap:4px}
.ne-chapter-list{margin-top:6px}
.ne-chapter-item{display:flex;align-items:center;gap:6px;padding:4px 0}
.ne-chapter-item.active{background:#2b2e3a;border-radius:6px}
.ne-chapter-link{background:transparent;border:none;color:#fff;flex:1;text-align:left;cursor:pointer;padding:6px 8px;border-radius:6px}
.ne-top{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}
.ne-field{display:flex;flex-direction:column;gap:4px;flex:1;min-width:220px}
.ne-field label{font-size:12px;opacity:.8}
.ne-field input{background:#232532;border:1px solid var(--border,#303341);color:#fff;border-radius:6px;padding:8px}
.ne-volume-game,.ne-new-volume-game{margin:10px 0;min-width:0}
.ne-volume-game>span,.ne-new-volume-game>span{font-size:12px;opacity:.8}
.ne-volume-game select,.ne-new-volume-game select{background:#232532;border:1px solid var(--border,#303341);color:#fff;border-radius:6px;padding:8px;min-height:38px}
.ne-blocks{display:flex;flex-direction:column;gap:12px}
.ne-block{display:flex;gap:12px;align-items:stretch}
.ne-block-num{display:flex;flex-direction:column;align-items:center;min-width:28px}
.ne-block-num span{width:24px;height:24px;border-radius:50%;background:#2b2e3a;display:flex;align-items:center;justify-content:center;font-size:12px}
.ne-block-line{flex:1;width:1px;background:var(--border,#303341)}
.ne-block-card{flex:1;background:#1f2130;border:1px solid var(--border,#303341);border-radius:10px;padding:10px}
.ne-block-head{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.ne-block-icon{font-size:16px}
.ne-block-body .ne-textarea{width:100%;min-height:80px;background:#0f1118;border:1px solid var(--border,#303341);color:#fff;border-radius:6px;padding:8px;resize:vertical}
.ne-input{width:100%;background:#0f1118;border:1px solid var(--border,#303341);color:#fff;border-radius:6px;padding:8px;margin-bottom:8px}
.ne-image-block{display:flex;gap:10px;align-items:center}
.ne-image-block img{width:72px;height:72px;object-fit:cover;border-radius:6px}
.ne-image-meta{font-size:12px;opacity:.7}
.ne-choice-block{display:flex;flex-direction:column;gap:6px}
.ne-choice-options{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.ne-choice-options li{display:flex;align-items:center;gap:6px}
.ne-choice-marker{color:#f5c61a}
.ne-choice-option{background:#0f1118;border:1px solid var(--border,#303341);color:#fff;border-radius:6px;padding:6px 8px;flex:1}
.ne-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}
.ne-action{display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px;border:1px solid var(--border,#303341);background:#2b2e3a;border-radius:8px;cursor:pointer;color:#fff}
.ne-action span{font-size:18px}
.ne-btn-block{width:100%;margin-top:6px}
.ne-toc-volume{margin-bottom:8px}
.ne-toc-volume-title{font-weight:700;margin-bottom:4px}
.ne-toc-list{list-style:none;margin:0;padding:0 0 0 8px}
.ne-read-text{margin:0 0 10px}
.ne-read-image{margin:8px 0}
.ne-read-image img{max-width:100%;height:auto;border-radius:6px}
.ne-read-image figcaption{font-size:12px;opacity:.6}
.ne-read-choice{margin:8px 0;padding:8px;border-left:3px solid var(--accent,#3b82f6)}
.ne-read-choice-options{list-style:none;padding-left:12px;margin:6px 0 0}
@media (max-width:900px){.ne-body{grid-template-columns:1fr}.ne-left{order:2}.ne-right{order:1}}
.ne-chapter-item{position:relative;border-left:3px solid transparent;padding-left:4px;transition:background .15s,border-color .15s}
.ne-chapter-item.active{border-left-color:#dc2626;background:rgba(220,38,38,.12)}
.ne-empty-state{padding:24px;text-align:center;opacity:.7;border:1px dashed var(--border,#303341);border-radius:10px}
.ne-dirty-dot{width:8px;height:8px;border-radius:50%;background:#dc2626;display:none;vertical-align:middle;margin-left:6px}
.ne-icon-btn{background:transparent;border:1px solid transparent;color:inherit;border-radius:6px;padding:4px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.ne-icon-btn svg{width:16px;height:16px}
.ne-btn{display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border-radius:8px;border:1px solid var(--border,#303341);background:#2b2e3a;color:#fff;cursor:pointer;transition:background .15s,border-color .15s,transform .05s}
.ne-btn:hover{background:#343746}
.ne-btn:active{transform:translateY(1px)}
.ne-btn:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}
.ne-btn:disabled{opacity:.5;cursor:not-allowed}
.ne-btn-secondary{background:#232532}
.ne-btn-primary{background:#dc2626;border-color:#dc2626}
.ne-btn-primary:hover{background:#b91c1c}
.ne-btn-danger{background:#991b1b;border-color:#991b1b}
.ne-btn-danger:hover{background:#7f1d1d}
.ne-btn-sm{padding:4px 8px;font-size:12px}
.ne-btn-separated{margin-top:12px}
.ne-btn-block{width:100%;justify-content:center}
.ne-action{transition:background .15s,border-color .15s}
.ne-action:hover{background:#343746;border-color:#50535e}
.ne-action:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}
.novel-modal-card{max-height:90vh;display:flex;flex-direction:column;overflow:hidden}
.ne-shell{max-height:calc(90vh - 32px);display:flex;flex-direction:column;gap:12px}
.ne-body{flex:1;min-height:0;overflow:hidden}
.ne-left,.ne-right{overflow:auto;min-height:0;padding-right:4px}
.ne-menu{position:relative;display:inline-block}
.ne-menu summary{list-style:none;cursor:pointer}
.ne-menu summary::-webkit-details-marker{display:none}
.ne-menu-panel{position:absolute;right:0;top:100%;background:#161821;border:1px solid var(--border,#303341);border-radius:8px;padding:6px;display:flex;flex-direction:column;gap:4px;min-width:140px;z-index:5;box-shadow:0 8px 24px rgba(0,0,0,.4)}
.ne-menu-panel button{background:transparent;border:none;color:#fff;text-align:left;padding:6px 8px;border-radius:6px;cursor:pointer;display:flex;align-items:center;gap:6px}
.ne-menu-panel button:hover{background:#2b2e3a}
.ne-menu-panel button.danger{color:#f87171}
.ne-option-delete{background:transparent;border:none;color:#f87171;cursor:pointer;padding:2px 6px}
.ne-option-delete:hover{color:#ef4444}
.ne-block-num{min-width:32px}
.ne-block-line{min-height:12px}
.ne-textarea,.ne-input,.ne-choice-option{font-family:inherit}
.novel-modal-card .novel-x{border-radius:6px}
.ne-btn svg,.ne-action svg,.ne-icon-btn svg{width:18px;height:18px;flex:0 0 auto}
.ne-head-icon svg{width:24px;height:24px}
.ne-modal-card svg{max-width:100%}
.ne-block-icon svg{width:16px;height:16px}
.ne-dialog-card{max-width:420px;width:min(420px,calc(100vw - 32px))}
.ne-dialog-card p{margin:0 0 12px;line-height:1.5}
.ne-dialog-actions{display:flex;justify-content:flex-end;gap:8px}
.ne-dialog-card input{width:100%;background:#232532;border:1px solid var(--border,#303341);color:#fff;border-radius:6px;padding:8px;margin-bottom:12px}

/* Novel editor dialog */
#novelEditorModal {
    padding: 24px;
    background: rgba(3, 5, 9, .76);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
#novelEditorModal .novel-modal-card {
    width: min(1460px, 100%);
    height: min(90vh, 920px);
    max-height: 90vh;
    padding: 0;
    overflow: hidden;
    border-radius: 14px;
    color: var(--text);
    background: var(--surface, #0F1014);
    border-color: var(--border, rgba(255, 255, 255, .075));
    box-shadow: 0 28px 90px rgba(0, 0, 0, .62);
}
#novelEditorModal .ne-shell {
    height: 100%;
    max-height: none;
    gap: 0;
    color: var(--text);
    background: linear-gradient(145deg, rgba(255,255,255,.018), transparent 46%);
}
#novelEditorModal .ne-head {
    flex: 0 0 auto;
    padding: 18px 22px;
    background: var(--surface, #0F1014);
    border-bottom: 1px solid var(--border, rgba(255, 255, 255, .075));
}
#novelEditorModal .ne-head-left { gap: 14px; }
#novelEditorModal .ne-head-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--border, rgba(255,255,255,.075));
    border-radius: 12px;
    color: var(--text);
    background: var(--card-hover, rgba(255,255,255,.045));
}
#novelEditorModal .ne-head-icon svg { width: 26px; height: 26px; }
#novelEditorModal .ne-head h3 { font-size: 19px; letter-spacing: -.02em; }
#novelEditorModal .ne-head p {
    margin-top: 3px;
    color: var(--text-muted, #8A8F98);
    font-size: 12px;
}
#novelEditorModal .ne-head > .ne-icon-btn {
    width: 38px;
    height: 38px;
    color: var(--text-muted, #8A8F98);
}
#novelEditorModal .ne-head > .ne-icon-btn:hover {
    color: var(--text);
    background: var(--card-hover, rgba(255,255,255,.045));
}
#novelEditorModal .ne-body {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 14px;
    padding: 12px 14px 14px;
    overflow: hidden;
}
#novelEditorModal .ne-left,
#novelEditorModal .ne-right {
    min-width: 0;
    padding: 0 2px 0 0;
    scrollbar-color: rgba(138,143,152,.35) transparent;
    scrollbar-width: thin;
}
#novelEditorModal .ne-left { padding-left: 2px; }
#novelEditorModal .ne-card {
    padding: 16px;
    margin: 0 0 12px;
    border-color: var(--border-light, rgba(255,255,255,.035));
    border-radius: 11px;
    background: var(--card, #15161B);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
#novelEditorModal .ne-card-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 13px;
    font-size: 14px;
    font-weight: 700;
}
#novelEditorModal .ne-card-title svg {
    width: 17px;
    height: 17px;
    color: var(--text-muted, #8A8F98);
}
#novelEditorModal .ne-volume {
    position: relative;
    margin-bottom: 9px;
    padding: 0;
    overflow: visible;
    border-color: var(--border, rgba(255,255,255,.075));
    border-radius: 9px;
    background: transparent;
}
#novelEditorModal .ne-volume-summary {
    min-height: 42px;
    padding: 8px 70px 8px 12px;
    color: var(--text);
    font-size: 13px;
    list-style: none;
}
#novelEditorModal .ne-volume-summary::-webkit-details-marker { display: none; }
#novelEditorModal .ne-volume-summary::before {
    content: "";
    width: 7px;
    height: 7px;
    margin-right: 9px;
    border-right: 1.5px solid var(--text-muted, #8A8F98);
    border-bottom: 1.5px solid var(--text-muted, #8A8F98);
    transform: rotate(-45deg);
    transition: transform .16s ease;
}
#novelEditorModal .ne-volume[open] > .ne-volume-summary::before { transform: rotate(45deg); }
#novelEditorModal .ne-volume-actions {
    position: absolute;
    z-index: 1;
    top: 4px;
    right: 5px;
    display: flex;
    gap: 2px;
}
#novelEditorModal .ne-volume-actions .ne-icon-btn,
#novelEditorModal .ne-chapter-item .ne-icon-btn {
    width: 30px;
    height: 30px;
    color: var(--text-muted, #8A8F98);
}
#novelEditorModal .ne-volume-actions .ne-icon-btn:hover,
#novelEditorModal .ne-chapter-item .ne-icon-btn:hover,
#novelEditorModal .ne-menu[open] > summary {
    color: var(--text);
    background: var(--card-hover, rgba(255,255,255,.045));
}
#novelEditorModal .ne-chapter-list {
    display: grid;
    gap: 5px;
    margin: 0 7px 7px;
    padding: 0;
}
#novelEditorModal .ne-chapter-item {
    min-height: 40px;
    gap: 5px;
    padding: 3px 5px 3px 7px;
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    border-radius: 7px;
    transition: background .16s ease, border-color .16s ease;
}
#novelEditorModal .ne-chapter-item:hover { background: var(--card-hover, rgba(255,255,255,.045)); }
#novelEditorModal .ne-chapter-item.active {
    border-color: rgba(214, 51, 46, .15);
    border-left-color: var(--accent, #D6332E);
    background: var(--accent-soft, rgba(214,51,46,.12));
}
#novelEditorModal .ne-chapter-link {
    min-width: 0;
    padding: 7px 8px;
    overflow: hidden;
    color: var(--text-secondary, #C6C7CB);
    font: 600 13px/1.35 Inter, sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#novelEditorModal .ne-chapter-item.active .ne-chapter-link { color: var(--text); }
#novelEditorModal .ne-chapter-menu { flex: 0 0 auto; }
#novelEditorModal .ne-menu-panel {
    top: calc(100% + 4px);
    min-width: 172px;
    padding: 5px;
    border-color: var(--border, rgba(255,255,255,.075));
    background: var(--surface, #0F1014);
}
#novelEditorModal .ne-menu-panel button {
    min-height: 34px;
    color: var(--text-secondary, #C6C7CB);
    font: 500 12px/1.35 Inter, sans-serif;
}
#novelEditorModal .ne-menu-panel button:hover { color: var(--text); }
#novelEditorModal .ne-menu-panel button svg { width: 15px; height: 15px; }
#novelEditorModal .ne-btn {
    min-height: 40px;
    padding: 9px 13px;
    border-radius: 8px;
    font: 600 13px/1.2 Inter, sans-serif;
}
#novelEditorModal .ne-btn-secondary {
    border-color: var(--border, rgba(255,255,255,.075));
    background: var(--card-hover, rgba(255,255,255,.045));
    color: var(--text-secondary, #C6C7CB);
}
#novelEditorModal .ne-btn-secondary:hover {
    border-color: var(--border, rgba(255,255,255,.12));
    background: var(--card, #15161B);
    color: var(--text);
}
#novelEditorModal .ne-btn-primary {
    border-color: var(--accent-fill, #A5201C);
    background: var(--accent-fill, #A5201C);
    color: #fff;
}
#novelEditorModal .ne-btn-primary:hover { background: var(--accent-fill-hov, #BC2621); }
#novelEditorModal .ne-btn-danger {
    border-color: var(--accent-fill, #A5201C);
    background: var(--accent-fill, #A5201C);
    color: #fff;
}
#novelEditorModal .ne-btn-danger:hover { background: var(--accent-fill-hov, #BC2621); }
#novelEditorModal .ne-btn-block { margin-top: 7px; }
#novelEditorModal .ne-btn-separated { margin-top: 12px; }
#novelEditorModal .ne-actions { gap: 9px; margin: 13px 0 8px; }
#novelEditorModal .ne-action {
    min-height: 88px;
    gap: 8px;
    padding: 12px 8px;
    border-color: var(--border-light, rgba(255,255,255,.035));
    border-radius: 9px;
    background: var(--card-hover, rgba(255,255,255,.045));
    color: var(--text-secondary, #C6C7CB);
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
#novelEditorModal .ne-action:hover {
    transform: translateY(-1px);
    border-color: rgba(214,51,46,.32);
    background: var(--accent-soft, rgba(214,51,46,.12));
    color: var(--text);
}
#novelEditorModal .ne-action svg { width: 20px; height: 20px; color: var(--text-muted, #8A8F98); }
#novelEditorModal .ne-action:hover svg { color: var(--accent, #D6332E); }
#novelEditorModal .ne-action span {
    max-width: 130px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
}
#novelEditorModal .ne-right {
    padding: 12px;
    border: 1px solid var(--border, rgba(255,255,255,.075));
    border-radius: 11px;
    background: linear-gradient(155deg, var(--card, #15161B), var(--surface, #0F1014));
    box-shadow: inset 0 1px rgba(255,255,255,.02), 0 10px 26px rgba(0,0,0,.12);
}
#novelEditorModal .ne-top { gap: 9px; margin: 0 0 16px; }
#novelEditorModal .ne-field { gap: 6px; min-width: 180px; }
#novelEditorModal .ne-field label {
    color: var(--text-muted, #8A8F98);
    font-size: 12px;
    font-weight: 600;
}
#novelEditorModal .ne-field input,
#novelEditorModal .ne-textarea,
#novelEditorModal .ne-input,
#novelEditorModal .ne-choice-option {
    box-sizing: border-box;
    border: 1px solid var(--border, rgba(255,255,255,.075));
    border-radius: 8px;
    background: var(--bg, #0B0C10);
    color: var(--text);
    font: 500 13px/1.5 Inter, sans-serif;
    transition: border-color .15s ease, box-shadow .15s ease;
}
#novelEditorModal .ne-field input { min-height: 40px; padding: 9px 12px; }
#novelEditorModal .ne-textarea {
    min-height: 100px;
    padding: 12px;
    resize: vertical;
}
#novelEditorModal .ne-input { min-height: 40px; padding: 9px 11px; margin: 0; }
#novelEditorModal .ne-choice-option { min-width: 0; min-height: 38px; padding: 8px 10px; }
#novelEditorModal .ne-field input:focus,
#novelEditorModal .ne-textarea:focus,
#novelEditorModal .ne-input:focus,
#novelEditorModal .ne-choice-option:focus {
    outline: none;
    border-color: var(--accent, #D6332E);
    box-shadow: 0 0 0 3px var(--accent-soft, rgba(214,51,46,.12));
}
#novelEditorModal .ne-blocks { gap: 11px; }
#novelEditorModal .ne-block { gap: 10px; }
#novelEditorModal .ne-block-num { min-width: 28px; }
#novelEditorModal .ne-block-num span {
    width: 25px;
    height: 25px;
    border: 1px solid var(--border, rgba(255,255,255,.075));
    background: var(--card, #15161B);
    color: var(--text-secondary, #C6C7CB);
    font-size: 11px;
    font-weight: 700;
}
#novelEditorModal .ne-block-line { min-height: 14px; background: var(--border, rgba(255,255,255,.075)); }
#novelEditorModal .ne-block-card {
    min-width: 0;
    padding: 12px;
    border-color: var(--border-light, rgba(255,255,255,.035));
    border-radius: 9px;
    background: var(--card, #15161B);
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
}
#novelEditorModal .ne-block-head {
    min-height: 30px;
    gap: 9px;
    margin-bottom: 9px;
    color: var(--text-secondary, #C6C7CB);
    font-size: 13px;
}
#novelEditorModal .ne-block-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-light, rgba(255,255,255,.035));
    border-radius: 8px;
    background: var(--surface, #0F1014);
    color: var(--text-muted, #8A8F98);
}
#novelEditorModal .ne-block-icon svg { width: 18px; height: 18px; }
#novelEditorModal .ne-menu { margin-left: auto; }
#novelEditorModal .ne-image-block { gap: 14px; min-height: 104px; }
#novelEditorModal .ne-image-block img {
    width: min(208px, 38%);
    height: 104px;
    border: 1px solid var(--border, rgba(255,255,255,.075));
    border-radius: 8px;
    background: var(--surface, #0F1014);
}
#novelEditorModal .ne-image-meta {
    color: var(--text-secondary, #C6C7CB);
    font-size: 12px;
    line-height: 1.6;
}
#novelEditorModal .ne-choice-block { gap: 9px; }
#novelEditorModal .ne-choice-options { gap: 7px; }
#novelEditorModal .ne-choice-options li { gap: 8px; }
#novelEditorModal .ne-choice-marker { color: var(--premium, #EBAA30); }
#novelEditorModal .ne-empty-state {
    display: grid;
    min-height: 240px;
    place-items: center;
    border-color: var(--border, rgba(255,255,255,.075));
    color: var(--text-muted, #8A8F98);
    background: var(--card, #15161B);
}
#novelEditorModal .novel-empty { color: var(--text-muted, #8A8F98); }
#novelEditorModal button:focus-visible,
#novelEditorModal summary:focus-visible {
    outline: 2px solid var(--accent, #D6332E);
    outline-offset: 2px;
}
@media (max-width: 900px) {
    #novelEditorModal { padding: 0; }
    #novelEditorModal .novel-modal-card {
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border: 0;
        border-radius: 0;
    }
    #novelEditorModal .ne-head { padding: 13px 16px; }
    #novelEditorModal .ne-head-icon { width: 40px; height: 40px; }
    #novelEditorModal .ne-head p { max-width: 60vw; }
    #novelEditorModal .ne-body {
        display: flex;
        flex-direction: column;
        gap: 10px;
        overflow: auto;
        padding: 10px;
    }
    #novelEditorModal .ne-left,
    #novelEditorModal .ne-right {
        flex: 0 0 auto;
        overflow: visible;
        padding: 0;
    }
    #novelEditorModal .ne-right { order: 1; }
    #novelEditorModal .ne-left { order: 2; }
    #novelEditorModal .ne-right { padding: 10px; }
    #novelEditorModal .ne-top { align-items: stretch; }
    #novelEditorModal .ne-field { flex-basis: 100%; }
}
@media (max-width: 560px) {
    #novelEditorModal .ne-head { gap: 8px; padding: 10px 12px; }
    #novelEditorModal .ne-head-left { gap: 9px; }
    #novelEditorModal .ne-head h3 { font-size: 16px; }
    #novelEditorModal .ne-head p { font-size: 11px; }
    #novelEditorModal .ne-head-icon { width: 36px; height: 36px; }
    #novelEditorModal .ne-card { padding: 12px; }
    #novelEditorModal .ne-block-num { min-width: 24px; }
    #novelEditorModal .ne-block-num span { width: 22px; height: 22px; }
    #novelEditorModal .ne-block-card { padding: 9px; }
    #novelEditorModal .ne-actions { gap: 7px; }
    #novelEditorModal .ne-action { min-height: 76px; }
    #novelEditorModal .ne-action span { font-size: 12px; }
    #novelEditorModal .ne-top .ne-btn { flex: 1; justify-content: center; }
}

/* Novel chapter reading page */
#novelRoot.novel-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 276px;
    align-items: start;
    gap: 22px;
    width: min(100%, 1320px);
    min-height: 0;
    margin: 0 auto;
    padding: 0 8px 32px;
    color: var(--text);
}
.novel-reader-column { min-width: 0; }
.novel-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 30px;
    margin: 0 0 18px;
    color: var(--text-muted, #8A8F98);
    font-size: 12px;
}
.novel-breadcrumb a { color: var(--text-muted, #8A8F98); }
.novel-breadcrumb a:hover { color: var(--accent, #D6332E); }
.novel-breadcrumb > span:last-child { color: var(--text-secondary, #C6C7CB); }
.novel-article {
    max-width: none;
    margin: 0;
    padding: 0;
}
.novel-kicker {
    margin-bottom: 6px;
    color: var(--accent, #D6332E);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
    line-height: 1.4;
    text-transform: uppercase;
}
.novel-title {
    margin: 0;
    color: var(--text);
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 750;
    letter-spacing: -.035em;
    line-height: 1.15;
}
.novel-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 12px 0 20px;
    color: var(--text-muted, #8A8F98);
    font-size: 11px;
    opacity: 1;
}
.novel-meta-volume { color: var(--text-secondary, #C6C7CB); }
.novel-meta-volume::after {
    content: "";
    display: inline-block;
    width: 3px;
    height: 3px;
    margin: 0 0 2px 10px;
    border-radius: 50%;
    background: var(--accent, #D6332E);
}
.novel-content {
    color: var(--text-secondary, #C6C7CB);
    font-size: 14px;
    line-height: 1.8;
}
.novel-content > p {
    margin: 0 0 15px;
    white-space: normal;
}
.novel-content .ne-read-text { margin: 0 0 16px; }
.novel-content .ne-read-image {
    margin: 18px 0;
    overflow: hidden;
    border: 1px solid var(--border, rgba(255,255,255,.075));
    border-radius: 9px;
    background: var(--card, #15161B);
}
.novel-content .ne-read-image img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    margin: 0;
    border-radius: 0;
}
.novel-content .ne-read-image figcaption {
    padding: 8px 11px;
    color: var(--text-muted, #8A8F98);
    font-size: 11px;
}
.novel-content .ne-read-choice {
    margin: 18px 0;
    padding: 16px 18px;
    border: 1px solid var(--border, rgba(255,255,255,.075));
    border-left: 2px solid var(--accent, #D6332E);
    border-radius: 8px;
    background: linear-gradient(110deg, var(--card, #15161B), transparent);
}
.novel-content .ne-read-choice-prompt {
    color: var(--text);
    font-weight: 700;
}
.novel-content .ne-read-choice-options { padding: 0; margin: 10px 0 0; }
.novel-content .ne-read-choice-options li {
    padding: 7px 10px;
    border-radius: 6px;
    color: var(--text-secondary, #C6C7CB);
}
.novel-content .ne-read-choice-options li + li { margin-top: 4px; }
.novel-content .ne-arrow { color: var(--premium, #EBAA30); }
.novel-article-empty {
    min-height: 260px;
    padding-top: 15px;
}
.novel-article-empty > p {
    margin-top: 14px;
    color: var(--text-muted, #8A8F98);
}
.novel-reader-admin {
    display: flex;
    justify-content: flex-end;
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--border, rgba(255,255,255,.075));
}
.novel-reader-admin .novel-btn { min-height: 36px; font-size: 12px; }
.novel-reader-admin .novel-btn svg { width: 15px; height: 15px; }
.novel-sidebar { position: sticky; top: calc(var(--header-height, 82px) + 18px); min-width: 0; }
.novel-sidebar-card {
    padding: 14px 12px 12px;
    border: 1px solid var(--border, rgba(255,255,255,.075));
    border-radius: 10px;
    background: linear-gradient(145deg, var(--card, #15161B), var(--surface, #0F1014));
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.novel-sidebar-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 12px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}
.novel-sidebar-title svg { width: 17px; height: 17px; color: var(--text-muted, #8A8F98); }
.novel-toc { max-height: min(64vh, 560px); overflow: auto; scrollbar-width: thin; }
.novel-toc-volume + .novel-toc-volume { margin-top: 12px; }
.novel-toc-volume h3 {
    margin: 0 0 7px;
    padding: 0 9px;
    color: var(--text-muted, #8A8F98);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.novel-toc-volume ol { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.novel-toc-volume li { min-width: 0; }
.novel-toc-link {
    display: flex;
    align-items: baseline;
    gap: 8px;
    width: 100%;
    min-height: 34px;
    box-sizing: border-box;
    padding: 7px 9px;
    border-left: 2px solid transparent;
    border-radius: 5px;
    color: var(--text-secondary, #C6C7CB);
    cursor: pointer;
    text-align: left;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.novel-toc-link:hover { background: var(--card-hover, rgba(255,255,255,.045)); color: var(--text); }
.novel-toc-link.active {
    border-left-color: var(--accent, #D6332E);
    background: var(--accent-soft, rgba(214,51,46,.12));
    color: var(--text);
}
.novel-toc-number {
    flex: 0 0 15px;
    color: var(--text-muted, #8A8F98);
    font-size: 10px;
    text-align: right;
}
.novel-toc-link.active .novel-toc-number { color: var(--accent, #D6332E); }
.novel-toc-name {
    min-width: 0;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.novel-toc .novel-empty { padding: 10px 4px; text-align: left; }
.novel-sidebar-note {
    display: grid;
    justify-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 18px 12px;
    border: 1px solid var(--border-light, rgba(255,255,255,.035));
    border-radius: 9px;
    background: radial-gradient(ellipse at 50% 0, var(--accent-soft, rgba(214,51,46,.12)), transparent 70%), var(--card, #15161B);
    text-align: center;
}
.novel-sidebar-note-icon { color: var(--accent, #D6332E); }
.novel-sidebar-note-icon svg { display: block; width: 23px; height: 23px; }
.novel-sidebar-note p {
    margin: 0;
    color: var(--text-muted, #8A8F98);
    font-size: 11px;
    font-style: italic;
}
.novel-breadcrumb a:focus-visible,
.novel-toc-link:focus-visible {
    outline: 2px solid var(--accent, #D6332E);
    outline-offset: 2px;
}
@media (max-width: 1050px) {
    #novelRoot.novel-layout { grid-template-columns: minmax(0, 1fr) 240px; gap: 16px; }
}
@media (max-width: 780px) {
    #novelRoot.novel-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
        padding: 0 0 28px;
    }
    .novel-sidebar { position: static; }
    .novel-sidebar-note { display: none; }
    .novel-toc { max-height: none; }
}
@media (max-width: 480px) {
    .novel-breadcrumb { margin-bottom: 14px; }
    .novel-title { font-size: 29px; }
    .novel-meta { margin: 10px 0 16px; }
    .novel-content { font-size: 13px; line-height: 1.75; }
    .novel-reader-admin { justify-content: stretch; }
    .novel-reader-admin .novel-btn { width: 100%; }
}

/* FAQ */
.faq-page { width: min(100%, 920px); margin: 0 auto; padding: 8px 0 48px; color: var(--text); }
.faq-back { display: inline-block; margin: 4px 0 20px; }
.faq-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.faq-header h1 { margin: 6px 0 8px; font-size: clamp(28px, 4vw, 38px); letter-spacing: -.035em; }
.faq-header p { margin: 0; color: var(--text-secondary); font-size: 14px; }
.faq-eyebrow { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.faq-filter-wrap { display: flex; gap: 8px; overflow-x: auto; padding: 3px 1px 14px; scrollbar-width: thin; }
.faq-filter { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 9px; min-height: 38px; padding: 0 13px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-secondary); font: inherit; font-size: 12px; cursor: pointer; transition: border-color .16s, background .16s, color .16s; }
.faq-filter:hover { border-color: var(--accent); color: var(--text); }
.faq-filter.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.faq-filter span { display: inline-grid; min-width: 19px; height: 19px; place-items: center; border-radius: 999px; background: var(--card); color: var(--text-muted); font-size: 10px; }
.faq-list { display: grid; gap: 10px; }
.faq-item { overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); transition: border-color .16s, background .16s; }
.faq-item:hover, .faq-item[open] { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 18px; list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-question { font-size: 14px; font-weight: 650; line-height: 1.45; }
.faq-item-meta { display: flex; align-items: center; gap: 13px; flex: 0 0 auto; }
.faq-category-label { border-radius: 999px; background: var(--card); color: var(--text-muted); padding: 5px 9px; font-size: 10px; white-space: nowrap; }
.faq-chevron { width: 9px; height: 9px; border-right: 1.5px solid var(--text-muted); border-bottom: 1.5px solid var(--text-muted); transform: rotate(45deg) translateY(-2px); transition: transform .18s; }
.faq-item[open] .faq-chevron { transform: rotate(225deg) translate(-2px, -1px); }
.faq-answer { padding: 0 54px 18px 18px; color: var(--text-secondary); font-size: 13px; line-height: 1.75; }
.faq-item-actions { display: flex; gap: 15px; border-top: 1px solid var(--border); padding: 10px 18px; }
.faq-text-button { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; }
.faq-text-button.danger { color: #d34843; }
.faq-button { min-height: 38px; padding: 0 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.faq-button:hover { border-color: var(--accent); }
.faq-button-primary { border-color: var(--accent-fill); background: var(--accent-fill); color: #fff; }
.faq-button-primary:hover { border-color: var(--accent-fill-hov); background: var(--accent-fill-hov); }
.faq-editor-slot:not(:empty) { margin: 4px 0 18px; }
.faq-editor-form { display: grid; gap: 13px; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.faq-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.faq-editor-heading h3 { margin: 0; font-size: 15px; }
.faq-icon-button { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text-secondary); font-size: 20px; cursor: pointer; }
.faq-editor-form label { display: grid; gap: 6px; color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.faq-editor-form input, .faq-editor-form textarea { width: 100%; padding: 10px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--input-bg); color: var(--input-text); font: inherit; font-size: 13px; }
.faq-editor-form textarea { resize: vertical; line-height: 1.6; }
.faq-editor-form input:focus, .faq-editor-form textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.faq-editor-actions { display: flex; gap: 8px; }
.faq-status { min-height: 0; color: var(--text-secondary); font-size: 12px; }
.faq-status:not(:empty) { padding: 0 0 12px; }
.faq-empty, .faq-error { padding: 22px; border: 1px dashed var(--border); border-radius: 12px; color: var(--text-secondary); text-align: center; font-size: 13px; }
.faq-error { border-color: #d34843; color: #d34843; }
@media (max-width: 600px) {
    .faq-header { align-items: flex-start; flex-direction: column; gap: 16px; }
    .faq-header > .faq-button { width: 100%; }
    .faq-item summary { align-items: flex-start; padding: 15px; }
    .faq-item-meta { gap: 9px; }
    .faq-category-label { display: none; }
    .faq-answer { padding: 0 15px 16px; }
}
