.gallery-cover {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    width: 100%;
    background-color: var(--bs-secondary-bg);
}

.gallery-cover.is-watch-later-cover {
    box-shadow: inset 0 0 0 3px #0dcaf0;
}

.thumb-strip {
    overflow-x: auto;
    white-space: nowrap;
}

.thumb-strip img {
    height: 90px;
    width: auto;
    margin-right: 6px;
    opacity: 0.6;
    border-radius: 4px;
}

.thumb-strip a.active img {
    opacity: 1;
    outline: 2px solid var(--bs-primary);
}

.reader-page {
    max-width: 100%;
    max-height: 82vh;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    background-color: var(--bs-secondary-bg);
    cursor: pointer;
}

.reader-page-wrap.full-height .reader-page {
    max-height: 100vh;
}

#fitHeightBtn.active {
    background-color: var(--bs-secondary-bg);
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.reader-page-wrap {
    min-height: 60vh;
    position: relative;
}

.reader-loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    pointer-events: none;
}

.reader-page-wrap.is-loading .reader-loading {
    display: block;
}

.reader-page-wrap.is-loading .reader-page {
    opacity: 0.3;
}

.reader-page {
    transition: opacity 0.15s ease;
}

/* Mobile tap-to-navigate zones: left half = next page, right half = previous page */
.reader-tap-zones {
    display: none;
}

.reader-page-wrap.mobile-taps .reader-tap-zones {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 2;
}

.reader-page-wrap.mobile-taps .reader-page {
    cursor: default;
}

.reader-tap-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    opacity: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.25s ease;
}

.reader-tap-zone.reader-tap-next {
    left: 0;
}

.reader-tap-zone.reader-tap-prev {
    right: 0;
}

.reader-tap-zone:active {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.08);
}

.reader-tap-zone.is-disabled {
    pointer-events: none;
}

.reader-tap-zones.show-hint .reader-tap-zone:not(.is-disabled) {
    opacity: 1;
}

.reader-tap-label {
    background-color: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    line-height: 1;
    white-space: nowrap;
    user-select: none;
}

#mobileModeBadge {
    display: none;
}

#mobileModeBadge.is-visible {
    display: inline-flex;
}

.tags-modal-icon {
    font-size: 1.25rem;
    line-height: 1;
    margin-top: 2px;
}

.tags-panel {
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
}

.tag-pill-include {
    background-color: rgba(255, 159, 28, 0.18);
    color: #ff9f1c;
}

.tag-pill-block {
    background-color: rgba(220, 53, 69, 0.18);
    color: #ff6b7a;
}

.tag-decision-buttons .btn {
    min-width: 4.5rem;
}

.tag-decision-buttons .tag-include-btn.active {
    background-color: #ff9f1c;
    border-color: #ff9f1c;
    color: #1a1a1a;
}

.tag-decision-buttons .tag-block-btn.active {
    background-color: var(--bs-danger);
    border-color: var(--bs-danger);
    color: #fff;
}

#broadMatchSwitch {
    width: 2.5rem;
    height: 1.4rem;
}

#broadMatchSwitch:checked {
    background-color: #ff9f1c;
    border-color: #ff9f1c;
}

.gallery-card {
    isolation: isolate;
}

.favorite-star,
.btn-playlist-add,
.btn-move,
.watch-later-btn {
    background: rgba(0, 0, 0, 0.55);
    border: none;
    color: #adb5bd;
    line-height: 1;
    border-radius: 0.35rem;
}

.watch-later-btn {
    font-size: 1.05rem;
    padding: 0.15rem 0.4rem;
}

.watch-later-btn.is-watch-later {
    color: #0dcaf0;
}

.favorite-star {
    font-size: 1.1rem;
    padding: 0.15rem 0.4rem;
}

.favorite-star.is-favorited {
    color: #ffc107;
}

.btn-playlist-add {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    padding: 0.1rem 0.45rem;
}

.btn-move {
    font-size: 0.85rem;
    color: #fff;
    padding: 0.1rem 0.4rem;
}

.btn-move:disabled {
    opacity: 0.3;
}

.reading-progress {
    height: 4px;
    margin-top: 4px;
    background-color: var(--bs-secondary-bg);
}

.reading-progress .progress-bar {
    background-color: #ffc107;
}

.novel-card {
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    transition: border-color 0.15s ease;
}

.novel-card:hover {
    border-color: var(--bs-primary);
}

.selector-card {
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.selector-card:hover {
    border-color: var(--bs-primary);
    transform: translateY(-2px);
}

.webtoon-strip {
    max-width: 56rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.webtoon-page {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    background-color: var(--bs-secondary-bg);
}

.novel-content {
    max-width: 46rem;
    font-size: 1.08rem;
    line-height: 1.75;
}

.novel-content p {
    margin-bottom: 1.1em;
}

.novel-content img {
    max-width: 100%;
}
