/* B266 - Modern forum category rail and fullscreen story reader */
.forum-modern-board {
    display: grid;
    grid-template-columns: minmax(220px, 282px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.forum-category-rail {
    position: sticky;
    top: 5.75rem;
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.forum-category-panel,
.forum-hot-panel,
.forum-filter-card,
.forum-thread-card,
.forum-empty-state {
    border: 1px solid var(--zh-border);
    background: linear-gradient(155deg, color-mix(in srgb, var(--zh-card) 96%, transparent), color-mix(in srgb, var(--zh-card-2) 92%, transparent));
    box-shadow: var(--zh-shadow-sm);
}

.forum-category-panel,
.forum-hot-panel {
    border-radius: 1.35rem;
    overflow: hidden;
}

.forum-category-panel-head,
.forum-hot-panel-head,
.forum-thread-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
}

.forum-category-panel-head {
    padding: 1rem 1rem .8rem;
    border-bottom: 1px solid var(--zh-border);
}

.forum-category-panel-head h2,
.forum-thread-heading h2,
.forum-hot-panel-head h3 {
    margin: 0;
    color: var(--zh-heading);
    font-weight: 900;
    letter-spacing: -.025em;
}

.forum-category-panel-head h2,
.forum-thread-heading h2 { font-size: 1.08rem; }
.forum-hot-panel-head h3 { font-size: .98rem; }

.forum-panel-eyebrow {
    display: block;
    margin-bottom: .13rem;
    color: var(--zh-primary);
    font-size: .67rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.forum-category-total {
    display: inline-grid;
    place-items: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 .55rem;
    border-radius: 999px;
    background: var(--zh-primary-3);
    color: var(--zh-primary);
    font-weight: 900;
}

.forum-category-list {
    display: grid;
    gap: .35rem;
    max-height: min(57vh, 610px);
    padding: .65rem;
    overflow: auto;
}

.forum-category-item {
    display: grid;
    grid-template-columns: 2.2rem minmax(0, 1fr) auto;
    gap: .65rem;
    align-items: center;
    min-width: 0;
    padding: .72rem .68rem;
    border: 1px solid color-mix(in srgb, var(--zh-border) 44%, transparent);
    border-radius: 1rem;
    background: color-mix(in srgb, var(--zh-card) 92%, transparent);
    color: var(--zh-text);
    box-shadow: none;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.forum-category-item:hover {
    transform: translateX(2px);
    border-color: color-mix(in srgb, var(--zh-primary) 35%, var(--zh-border));
    background: color-mix(in srgb, var(--zh-primary-3) 55%, var(--zh-card));
    color: var(--zh-text);
}

.forum-category-item.is-selected,
.forum-category-item.active {
    border-color: color-mix(in srgb, var(--zh-primary) 45%, transparent);
    background: linear-gradient(135deg, color-mix(in srgb, var(--zh-primary) 18%, var(--zh-card)), color-mix(in srgb, var(--zh-primary-2) 12%, var(--zh-card)));
    box-shadow: 0 10px 24px color-mix(in srgb, var(--zh-primary) 14%, transparent);
}

.forum-category-item.is-child { margin-left: .7rem; }

.forum-category-icon {
    display: inline-grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: .8rem;
    background: color-mix(in srgb, var(--zh-primary-3) 78%, var(--zh-card));
    color: var(--zh-primary);
}

.forum-category-item.is-selected .forum-category-icon,
.forum-category-item.active .forum-category-icon {
    background: linear-gradient(135deg, var(--zh-primary), var(--zh-primary-2));
    color: #fff;
}

.forum-category-item.is-selected .forum-category-count,
.forum-category-item.active .forum-category-count {
    background: color-mix(in srgb, #fff 72%, var(--zh-primary-3));
    color: var(--zh-primary);
}

.forum-category-copy {
    display: block;
    min-width: 0;
}

.forum-category-copy strong,
.forum-category-copy small {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.forum-category-copy strong {
    -webkit-line-clamp: 2;
    line-clamp: 2;
    color: var(--zh-heading);
    font-size: .84rem;
    line-height: 1.28;
}

.forum-category-copy small {
    margin-top: .16rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    color: var(--zh-muted) !important;
    font-size: .68rem;
    line-height: 1.3;
}

.forum-category-count {
    min-width: 1.75rem;
    padding: .2rem .43rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--zh-border) 58%, transparent);
    color: var(--zh-muted);
    font-size: .69rem;
    font-weight: 900;
    text-align: center;
}

.forum-category-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--zh-border);
    background: color-mix(in srgb, var(--zh-card-2) 72%, transparent);
}

.forum-category-stats div {
    display: grid;
    gap: .02rem;
    padding: .75rem;
    text-align: center;
}
.forum-category-stats div + div { border-left: 1px solid var(--zh-border); }
.forum-category-stats strong { font-size: .94rem; }
.forum-category-stats span { color: var(--zh-muted); font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; }

.forum-hot-panel { padding: .9rem; }
.forum-hot-panel-head { margin-bottom: .55rem; }
.forum-hot-panel-head span { color: var(--zh-muted); font-size: .69rem; font-weight: 800; }
.forum-hot-list { display: grid; gap: .25rem; }
.forum-hot-list a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .5rem;
    align-items: center;
    padding: .48rem .52rem;
    border-radius: .72rem;
    color: var(--zh-text);
}
.forum-hot-list a:hover { background: var(--zh-primary-3); }
.forum-hot-list a > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .77rem; font-weight: 750; }
.forum-hot-list a small { font-size: .65rem; }

.forum-thread-column { min-width: 0; }
.forum-filter-card {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, .48fr) auto;
    gap: .7rem;
    padding: .78rem;
    border-radius: 1.15rem;
}

.forum-filter-search {
    display: flex;
    align-items: center;
    gap: .62rem;
    min-width: 0;
    padding: 0 .8rem;
    border: 1px solid var(--zh-border);
    border-radius: .8rem;
    background: var(--zh-card);
}
.forum-filter-search i { color: var(--zh-primary); }
.forum-filter-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--zh-text); }

.forum-thread-heading { margin: 1.3rem .1rem .75rem; }
.forum-thread-summary { display: flex; gap: .75rem; color: var(--zh-muted); font-size: .76rem; font-weight: 700; }
.forum-thread-list { display: grid; gap: .8rem; }

.forum-thread-card {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr);
    min-width: 0;
    overflow: hidden;
    border-radius: 1.22rem;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.forum-thread-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--zh-primary) 35%, var(--zh-border));
    box-shadow: var(--zh-shadow);
}

.forum-thread-thumb {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 142px;
    overflow: hidden;
    background: linear-gradient(145deg, var(--zh-primary-3), color-mix(in srgb, var(--zh-primary-2) 20%, var(--zh-card)));
}
.forum-thread-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease; }
.forum-thread-card:hover .forum-thread-thumb img { transform: scale(1.045); }
.forum-thread-thumb > span { color: var(--zh-primary); font-size: 2rem; }

.forum-thread-content { display: grid; align-content: center; min-width: 0; padding: .9rem 1rem; }
.forum-thread-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .65rem; margin-bottom: .34rem; color: var(--zh-muted); font-size: .69rem; }
.forum-featured-badge,
.forum-category-badge {
    display: inline-flex;
    align-items: center;
    max-width: 190px;
    padding: .22rem .52rem;
    overflow: hidden;
    border-radius: 999px;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: .65rem;
    font-weight: 850;
}
.forum-featured-badge { background: color-mix(in srgb, var(--zh-yellow) 38%, transparent); color: color-mix(in srgb, var(--zh-orange) 75%, var(--zh-heading)); }
.forum-category-badge { background: var(--zh-primary-3); color: var(--zh-primary); }
.forum-thread-title-link { color: inherit; }
.forum-thread-title { margin: 0; font-size: 1.05rem; line-height: 1.35; font-weight: 900; }
.forum-thread-excerpt { margin: .38rem 0 .65rem; color: var(--zh-muted); font-size: .79rem; line-height: 1.48; }
.forum-thread-footer { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.forum-thread-metrics,
.forum-thread-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.forum-thread-metrics span { color: var(--zh-muted); font-size: .7rem; }
.forum-thread-metrics i { margin-right: .22rem; color: var(--zh-primary); }

.forum-empty-state {
    display: grid;
    place-items: center;
    gap: .35rem;
    min-height: 220px;
    padding: 2rem;
    border-radius: 1.2rem;
    color: var(--zh-muted);
    text-align: center;
}
.forum-empty-state i { color: var(--zh-primary); font-size: 2.2rem; }
.forum-empty-state strong { font-size: 1rem; }

/* Clickable category breadcrumbs and sidebar chips */
.story-breadcrumb a,
.zhub-forum-global-sidebar a,
.forum-category-breadcrumb-link { cursor: pointer; }
.zhub-forum-global-sidebar .zhub-sidebar-chip {
    background: color-mix(in srgb, var(--zh-card) 92%, transparent) !important;
    border-color: color-mix(in srgb, var(--zh-border) 72%, transparent) !important;
    color: var(--zh-text) !important;
    box-shadow: none !important;
    cursor: pointer;
    pointer-events: auto;
}

.zhub-forum-global-sidebar .zhub-sidebar-chip:hover {
    background: color-mix(in srgb, var(--zh-primary-3) 52%, var(--zh-card)) !important;
    border-color: color-mix(in srgb, var(--zh-primary) 34%, var(--zh-border)) !important;
    color: var(--zh-primary) !important;
}

.zhub-forum-global-sidebar .zhub-sidebar-chip.is-selected,
.zhub-forum-global-sidebar .zhub-sidebar-chip.active {
    border-color: var(--zh-primary) !important;
    background: linear-gradient(135deg, color-mix(in srgb, var(--zh-primary) 20%, var(--zh-card)), color-mix(in srgb, var(--zh-primary-2) 14%, var(--zh-card))) !important;
    color: var(--zh-primary) !important;
    box-shadow: 0 10px 22px color-mix(in srgb, var(--zh-primary) 14%, transparent) !important;
}

.zhub-forum-global-sidebar .zhub-sidebar-chip.is-selected *,
.zhub-forum-global-sidebar .zhub-sidebar-chip.active * {
    color: var(--zh-primary) !important;
}


/* Story reader: image click hint */
.story-reader-fullscreen-trigger { position: relative; cursor: zoom-in; }
.story-reader-fullscreen-trigger img { transition: filter .18s ease, transform .18s ease; }
.story-reader-fullscreen-trigger:hover img { filter: brightness(.94); }
.story-reader-fullscreen-hint {
    position: absolute;
    z-index: 5;
    top: .75rem;
    right: .75rem;
    display: inline-flex;
    align-items: center;
    padding: .42rem .68rem;
    border: 1px solid rgba(255,255,255,.42);
    border-radius: 999px;
    background: rgba(8, 15, 28, .72);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.24);
    font-size: .72rem;
    font-weight: 850;
    pointer-events: none;
    backdrop-filter: blur(10px);
}

/* Chapter button is available on desktop as well as mobile. */
.reader-global-chapter-fab {
    position: fixed !important;
    z-index: 1075 !important;
    top: 48vh !important;
    right: .8rem !important;
    left: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .35rem !important;
    width: auto !important;
    min-width: 3rem !important;
    height: 2.8rem !important;
    padding: 0 .85rem !important;
    border: 1px solid color-mix(in srgb, var(--zh-primary) 38%, #fff) !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, color-mix(in srgb, var(--zh-primary) 90%, #111827), color-mix(in srgb, var(--zh-primary-2) 88%, #111827)) !important;
    color: #fff !important;
    box-shadow: 0 14px 34px color-mix(in srgb, var(--zh-primary) 28%, transparent) !important;
    cursor: pointer;
    opacity: .93;
}
.reader-global-chapter-fab:hover,
.reader-global-chapter-fab:focus-visible,
.reader-global-chapter-fab[aria-expanded="true"] { transform: translateY(-1px); opacity: 1; }
.reader-global-chapter-fab span { position: static !important; width: auto !important; height: auto !important; clip: auto !important; overflow: visible !important; white-space: nowrap !important; font-size: .72rem !important; font-weight: 850; }

body.zhub-reader-fullscreen-open { overflow: hidden !important; }
.story-reader-fullscreen {
    position: fixed;
    z-index: 12050;
    inset: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    color: #f8fafc;
    background: radial-gradient(circle at 50% 10%, rgba(30, 64, 175, .22), transparent 42%), #050914;
    isolation: isolate;
}

.story-reader-fullscreen-header {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 72px;
    padding: .7rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, .22);
    background: rgba(5, 9, 20, .88);
    box-shadow: 0 10px 30px rgba(0,0,0,.24);
    backdrop-filter: blur(18px);
}
.story-reader-fullscreen-title { min-width: 0; }
.story-reader-fullscreen-title span,
.story-reader-fullscreen-title small { display: block; color: #a9bad3 !important; font-size: .69rem; }
.story-reader-fullscreen-title strong { display: block; max-width: min(50vw, 720px); overflow: hidden; color: #fff; white-space: nowrap; text-overflow: ellipsis; font-size: 1rem; }
.story-reader-fullscreen-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: .55rem; }
.story-reader-fullscreen-header-actions .btn { white-space: nowrap; }
.story-reader-fullscreen-zoom { display: inline-flex; align-items: center; overflow: hidden; border: 1px solid rgba(148, 163, 184, .35); border-radius: 999px; background: rgba(15, 23, 42, .74); }
.story-reader-fullscreen-zoom button,
.story-reader-fullscreen-close,
.story-reader-fullscreen-chapter-head button {
    display: inline-grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: #fff;
}
.story-reader-fullscreen-zoom button { min-width: 2.35rem; height: 2.35rem; padding: 0 .48rem; }
.story-reader-fullscreen-zoom button:nth-child(2) { min-width: 3.6rem; border-inline: 1px solid rgba(148, 163, 184, .25); font-size: .72rem; font-weight: 850; }
.story-reader-fullscreen-zoom button:hover,
.story-reader-fullscreen-close:hover,
.story-reader-fullscreen-chapter-head button:hover { background: rgba(255,255,255,.1); }
.story-reader-fullscreen-close { width: 2.6rem; height: 2.6rem; border-radius: 999px; background: rgba(239, 68, 68, .2); font-size: 1.2rem; }

.story-reader-fullscreen-body { position: relative; display: grid; grid-template-columns: 0 minmax(0, 1fr); min-height: 0; overflow: hidden; transition: grid-template-columns .2s ease; }
.story-reader-fullscreen-body.with-chapters { grid-template-columns: minmax(260px, 330px) minmax(0, 1fr); }
.story-reader-fullscreen-chapters {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    min-width: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-right: 1px solid rgba(148, 163, 184, .22);
    background: rgba(10, 17, 32, .96);
    transform: translateX(-100%);
    opacity: 0;
    transition: transform .2s ease, opacity .2s ease;
}
.story-reader-fullscreen-chapters.open { transform: translateX(0); opacity: 1; }
.story-reader-fullscreen-chapter-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .8rem .85rem; border-bottom: 1px solid rgba(148, 163, 184, .2); }
.story-reader-fullscreen-chapter-head div { display: grid; }
.story-reader-fullscreen-chapter-head strong { color: #fff; font-size: .88rem; }
.story-reader-fullscreen-chapter-head span { color: #94a3b8; font-size: .66rem; }
.story-reader-fullscreen-chapter-head button { width: 2rem; height: 2rem; border-radius: .65rem; }
.story-reader-fullscreen-chapters .reader-chapter-tools { padding: .65rem .75rem; }
.story-reader-fullscreen-chapters .form-control { border-color: rgba(148, 163, 184, .28); background: rgba(15, 23, 42, .8); color: #fff; }
.story-reader-fullscreen-chapter-list { display: grid; align-content: start; gap: .42rem; min-height: 0; padding: .25rem .65rem .7rem; overflow: auto; }
.story-reader-fullscreen-chapter-list a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .55rem; align-items: center; min-width: 0; padding: .58rem .62rem; border: 1px solid rgba(148, 163, 184, .16); border-radius: .8rem; background: rgba(30, 41, 59, .62); color: #e2e8f0; }
.story-reader-fullscreen-chapter-list a:hover { border-color: rgba(96, 165, 250, .55); background: rgba(30, 64, 175, .25); }
.story-reader-fullscreen-chapter-list a.active { border-color: rgba(45, 212, 191, .55); background: linear-gradient(135deg, rgba(13,148,136,.45), rgba(37,99,235,.36)); color: #fff; }
.story-reader-fullscreen-chapter-list a > span:last-child { display: grid; min-width: 0; }
.story-reader-fullscreen-chapter-list a strong { overflow: hidden; color: inherit; white-space: nowrap; text-overflow: ellipsis; font-size: .74rem; }
.story-reader-fullscreen-chapter-list a small { color: #a9bad3 !important; font-size: .62rem; }
.story-reader-fullscreen-pager { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .65rem .75rem; border-top: 1px solid rgba(148, 163, 184, .2); }
.story-reader-fullscreen-pager span { color: #cbd5e1; font-size: .7rem; }

.story-reader-fullscreen-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.story-reader-fullscreen-scroll { width: 100%; height: 100%; overflow: auto; text-align: center; scroll-behavior: smooth; }
.story-reader-fullscreen-scroll img { display: block; min-width: min(100%, 760px); margin: 1.2rem auto 6rem; object-fit: contain; box-shadow: 0 26px 80px rgba(0,0,0,.42); user-select: none; }
.story-reader-fullscreen-empty { display: grid; place-items: center; align-content: center; gap: .6rem; min-height: 100%; color: #94a3b8; }
.story-reader-fullscreen-empty i { font-size: 2.4rem; }
.story-reader-fullscreen-nav { position: absolute; z-index: 2; top: 50%; display: grid; place-items: center; width: 3rem; height: 4.2rem; border: 1px solid rgba(255,255,255,.22); border-radius: .9rem; background: rgba(5,9,20,.58); color: #fff; transform: translateY(-50%); backdrop-filter: blur(10px); }
.story-reader-fullscreen-nav.prev { left: .85rem; }
.story-reader-fullscreen-nav.next { right: .85rem; }
.story-reader-fullscreen-nav:hover:not(:disabled) { background: rgba(37,99,235,.72); }
.story-reader-fullscreen-nav:disabled { opacity: .25; }
.story-reader-fullscreen-footer { position: absolute; z-index: 2; right: 50%; bottom: .85rem; display: flex; align-items: center; gap: .8rem; padding: .45rem; border: 1px solid rgba(148,163,184,.24); border-radius: 999px; background: rgba(5,9,20,.76); transform: translateX(50%); backdrop-filter: blur(14px); }
.story-reader-fullscreen-footer > span { min-width: 4.7rem; color: #fff; font-size: .76rem; font-weight: 850; text-align: center; }

@media (max-width: 991.98px) {
    .forum-modern-board { grid-template-columns: 220px minmax(0, 1fr); gap: .8rem; }
    .forum-thread-card { grid-template-columns: 112px minmax(0, 1fr); }
    .forum-thread-thumb { min-height: 132px; }
    .forum-filter-card { grid-template-columns: 1fr 180px; }
    .forum-filter-card > .btn { grid-column: 1 / -1; }
    .story-reader-fullscreen-header { align-items: flex-start; }
    .story-reader-fullscreen-header-actions { flex-wrap: wrap; }
    .story-reader-fullscreen-body.with-chapters { grid-template-columns: minmax(235px, 285px) minmax(0, 1fr); }
}

@media (max-width: 767.98px) {
    .forum-modern-board { grid-template-columns: minmax(0, 1fr); }
    .forum-category-rail { position: static; order: 0; }
    .forum-category-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 330px; }
    .forum-category-item { grid-template-columns: 1.9rem minmax(0, 1fr) auto; padding: .58rem; }
    .forum-category-item.is-child { margin-left: 0; }
    .forum-category-icon { width: 1.9rem; height: 1.9rem; }
    .forum-hot-panel { display: none; }
    .forum-filter-card { grid-template-columns: minmax(0, 1fr); }
    .forum-filter-card > .btn { grid-column: auto; }
    .forum-thread-heading { align-items: flex-start; }
    .forum-thread-summary { display: grid; gap: .18rem; text-align: right; }
    .forum-thread-card { grid-template-columns: 92px minmax(0, 1fr); }
    .forum-thread-thumb { min-height: 126px; }
    .forum-thread-content { padding: .72rem; }
    .forum-thread-footer { align-items: flex-end; }
    .forum-thread-actions .btn { font-size: .66rem; }

    .reader-global-chapter-fab {
        right: auto !important;
        left: .38rem !important;
        width: 2.55rem !important;
        min-width: 2.55rem !important;
        height: 2.55rem !important;
        padding: 0 !important;
        touch-action: none;
    }
    .reader-global-chapter-fab span { display: none !important; }
    .story-reader-fullscreen-hint { top: .45rem; right: .45rem; padding: .32rem .5rem; font-size: .63rem; }
    .story-reader-fullscreen-header { min-height: 0; padding: .55rem .62rem; }
    .story-reader-fullscreen-title strong { max-width: 48vw; font-size: .82rem; }
    .story-reader-fullscreen-title span { display: none; }
    .story-reader-fullscreen-header-actions { gap: .3rem; }
    .story-reader-fullscreen-header-actions > .btn { width: 2.4rem; height: 2.4rem; padding: 0; overflow: hidden; font-size: 0; }
    .story-reader-fullscreen-header-actions > .btn i { margin: 0 !important; font-size: .92rem; }
    .story-reader-fullscreen-zoom button { min-width: 2rem; height: 2.3rem; }
    .story-reader-fullscreen-zoom button:nth-child(2) { min-width: 3.15rem; }
    .story-reader-fullscreen-close { width: 2.35rem; height: 2.35rem; }
    .story-reader-fullscreen-body,
    .story-reader-fullscreen-body.with-chapters { grid-template-columns: minmax(0, 1fr); }
    .story-reader-fullscreen-chapters {
        position: absolute;
        inset: 0 auto 0 0;
        width: min(84vw, 330px);
        box-shadow: 20px 0 48px rgba(0,0,0,.46);
    }
    .story-reader-fullscreen-stage { grid-column: 1; }
    .story-reader-fullscreen-scroll img { min-width: min(100%, 620px); margin-top: .7rem; }
    .story-reader-fullscreen-nav { top: auto; bottom: 4.65rem; width: 2.65rem; height: 2.65rem; border-radius: 999px; transform: none; }
    .story-reader-fullscreen-nav.prev { left: .6rem; }
    .story-reader-fullscreen-nav.next { right: .6rem; }
    .story-reader-fullscreen-footer { bottom: .55rem; gap: .35rem; width: calc(100% - 1rem); justify-content: center; }
    .story-reader-fullscreen-footer .btn { padding-inline: .6rem; font-size: .7rem; }
}

@media (max-width: 480px) {
    .forum-category-list { grid-template-columns: minmax(0, 1fr); max-height: 300px; }
    .forum-thread-card { grid-template-columns: minmax(0, 1fr); }
    .forum-thread-thumb { min-height: 158px; max-height: 210px; }
    .forum-thread-title { font-size: .96rem; }
    .forum-thread-footer { align-items: flex-start; flex-direction: column; }
    .story-reader-fullscreen-title small { max-width: 42vw; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
}

@media (prefers-reduced-motion: reduce) {
    .forum-category-item,
    .forum-thread-card,
    .forum-thread-thumb img,
    .story-reader-fullscreen-body,
    .story-reader-fullscreen-chapters { transition: none !important; }
}
