[x-cloak] {
    display: none !important;
}

html.is-translating {
    visibility: hidden !important;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: #f3f4f6;
    color: #1f2937;
    transition: background-color .25s, color .25s;
}

.dark body {
    background: #0a0a0a;
    color: #d1d5db;
}

.manga-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

.force-hidden {
    display: none !important;
}

.reader-tool-btn {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(229, 231, 235, .95);
    background: rgba(255, 255, 255, .92);
    color: #374151;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .12);
    backdrop-filter: blur(12px);
    white-space: nowrap;
}

.reader-top-tools {
    max-width: min(760px, calc(100vw - 3rem));
    align-items: flex-end;
}

.reader-top-tools-main,
.reader-top-actions,
.reader-translate-row {
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

.reader-translate-status {
    max-width: min(320px, calc(100vw - 3rem));
    overflow: hidden;
    text-overflow: ellipsis;
}

.reader-tool-btn:hover {
    border-color: #60a5fa;
    background: #dbeafe;
    color: #1d4ed8;
}

.dark .reader-tool-btn {
    border-color: rgba(255, 255, 255, .08);
    background: rgba(30, 30, 30, .92);
    color: #d1d5db;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

.dark .reader-tool-btn:hover {
    background: rgba(45, 45, 45, .98);
    color: #fff;
}

.reader-tool-icon-btn {
    width: 38px;
    padding: 8px !important;
}

.reader-profile-select {
    min-height: 38px;
    gap: 6px;
    padding: 6px 8px 6px 10px;
}

.reader-profile-combo {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
    width: var(--reader-profile-select-width, 40px);
    min-width: var(--reader-profile-select-width, 40px);
    height: 26px;
    border: 1px solid rgba(156, 163, 175, .65);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, .9);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%236b7280' d='M2 3.5h6L5 6.8z'/%3E%3C/svg%3E");
    background-position: right 2px center;
    background-repeat: no-repeat;
    background-size: 8px 8px;
    color: inherit;
    font: inherit;
    padding: 2px 8px 2px 4px;
}

.reader-thread-combo {
    width: 32px;
    min-width: 32px;
    padding-left: 4px;
    padding-right: 8px;
}

.dark .reader-profile-combo {
    border-color: rgba(255, 255, 255, .14);
    background-color: rgba(17, 24, 39, .8);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23d1d5db' d='M2 3.5h6L5 6.8z'/%3E%3C/svg%3E");
}

.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

.dark .sun-icon {
    display: block;
}

.dark .moon-icon {
    display: none;
}

.cursor-left {
    cursor: url("../cursor/reader-arrow-left.cur") 24 24, w-resize;
}

.cursor-right {
    cursor: url("../cursor/reader-arrow-right.cur") 24 24, e-resize;
}

.reader-modal-card {
    max-height: min(86vh, 820px);
    overflow: auto;
}

.reader-choice {
    min-width: 88px;
}

.reader-range {
    accent-color: #fff;
}

.reader-chapter-panel {
    direction: ltr;
    min-height: 148px;
}

html.dark .reader-chapter-panel {
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

::-webkit-scrollbar {
    width: 15px;
    height: 15px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b8b8b8;
}

.dark ::-webkit-scrollbar-thumb {
    background: #3d3d3d;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #495060;
}

@media (max-width: 768px) {
    .reader-breadcrumb {
        max-width: calc(100vw - 1rem) !important;
        font-size: 1rem !important;
        padding-right: 8rem;
    }

    .reader-top-tools {
        top: .75rem !important;
        right: .75rem !important;
        gap: .5rem !important;
        max-width: calc(100vw - 1.5rem) !important;
    }

    .reader-top-tools .reader-tool-btn span {
        font-size: 0;
    }

    .reader-top-tools .reader-tool-btn span::after {
        content: attr(data-short);
        font-size: .75rem;
    }

    .reader-top-tools .reader-profile-select span {
        font-size: .75rem !important;
    }

    .reader-top-tools .reader-profile-select span::after {
        content: none !important;
    }

    .reader-top-tools .reader-translate-status span {
        font-size: .75rem !important;
    }

    .reader-top-tools .reader-translate-status span::after {
        content: none !important;
    }

    .reader-bottom-nav {
        bottom: 1rem !important;
        width: calc(100vw - 1rem) !important;
    }

    .reader-bottom-nav nav button {
        padding-left: .75rem !important;
        padding-right: .75rem !important;
    }
}
