*,
.carousel,
.sleep-scroll-box {
    scrollbar-width: none
}

.fs-time-labels,
.sleep-item-snap,
.st-download-size {
    font-variant-numeric: tabular-nums
}

.carousel-title,
.collection-name,
.modern-book-title {
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical
}

.tab-pane,
body {
    overscroll-behavior-y: none
}

.chapter-dl-btn .is-saved,
.fs-header-btn,
.header-icon,
.nav-item.active,
.ptr-spinner,
.st-download-icon-saved,
body {
    color: var(--text)
}

#collections-view,
#folder-view,
.tab-pane {
    overflow-y: auto;
    margin-bottom: var(--sab)
}

#landscape-blocker,
.collection-card,
.custom-confirm-box,
.folder-search-input,
.header-action-btn,
.hero-title-big,
.input-text,
.menu-item,
.tab-pane {
    box-sizing: border-box
}

#player-fullscreen,
.custom-confirm-overlay,
.folder-search-cancel,
.folder-search-icon,
.fs-buffer-bar,
.fs-thumb,
.fs-track,
.network-banner,
.ptr-container {
    pointer-events: none
}

#mini-player,
#pwa-update-banner,
.tab-pane {
    margin-bottom: var(--sab)
}

#car-player-fullscreen,
#player-fullscreen {
    padding-top: env(safe-area-inset-top);
    will-change: transform, visibility
}

.book-title-list,
.dl-title,
.fs-author-top,
.fs-title-top,
.hero-title-big,
.mini-title,
.premium-item-title,
.sheet-book-title {
    white-space: nowrap;
    text-overflow: ellipsis
}

.book-cover-list,
.carousel-cover,
.dl-cover,
.fs-cover,
.hero-cover,
.mini-cover,
.sheet-book-mini-cover {
    -webkit-mask-image: -webkit-radial-gradient(white, black)
}

#car-player-fullscreen,
#god-mode-view,
#player-fullscreen {
    will-change: transform, visibility
}

#collections-view,
#folder-view,
#god-mode-view,
#player-fullscreen {
    visibility: hidden;
    transition: transform .45s cubic-bezier(.32, .72, 0, 1), visibility 0s linear .45s
}

:root {
    --bg: #000000;
    --bg-sec: #1c1c1e;
    --text: #ffffff;
    --hint: #98989e;
    --primary: #E5A900;
    --danger: #ff3b30;
    --grad-1: linear-gradient(135deg, #FF512F, #DD2476);
    --grad-2: linear-gradient(135deg, #FF9A9E, #FECFEF);
    --grad-3: linear-gradient(135deg, #a18cd1, #fbc2eb);
    --sab: env(safe-area-inset-bottom, 0px);
    --mini-player-height: 56px
}

* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -ms-overflow-style: none
}

::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0
}

.ptr-container,
body {
    width: 100%;
    position: fixed
}

input,
textarea {
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto
}

html {
    background-color: #000 !important;
    height: 100%;
    overscroll-behavior: none
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    margin: 0;
    padding: 0;
    overflow: hidden;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    height: var(--tg-viewport-stable-height, 100vh)
}

h1,
h2,
h3,
p {
    margin: 0;
    font-weight: 400
}

.ptr-container {
    top: env(safe-area-inset-top, 0);
    left: 0;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60
}

.ptr-spinner {
    width: 36px;
    height: 36px;
    background: var(--bg-sec);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .3);
    transform: translate3d(0, 0, 0) scale(0);
    backface-visibility: hidden
}

.ptr-spinner svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary);
    transition: transform .1s
}

.ptr-spinner.spinning svg {
    animation: .8s linear infinite ptr-spin
}

@keyframes ptr-spin {
    to {
        transform: rotate(360deg)
    }
}

.tabs-wrapper {
    display: flex;
    width: 300vw;
    height: var(--tg-viewport-stable-height, 100vh);
    will-change: transform;
    transform: translate3d(0, 0, 0);
    transition: transform .45s cubic-bezier(.32, .72, 0, 1)
}

.tab-pane {
    width: 100vw;
    height: 100%;
    flex-shrink: 0;
    overflow-x: hidden;
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: 142px;
    opacity: 1;
    filter: none;
    -webkit-overflow-scrolling: touch;
    contain: content
}

.hero-cover,
.hero-info-block {
    margin-bottom: 20px;
    display: flex
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px
}

.header h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: .5px
}

.header-icon {
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .5))
}

.book-card-list:active,
.carousel-card:active,
.dl-capsule:active,
.header-icon:active {
    opacity: .7
}

.hero-section {
    padding: 10px 20px 30px
}

.hero-book-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%
}

.hero-cover {
    width: 220px;
    height: 220px;
    border-radius: 16px;
    background: var(--grad-1);
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
    overflow: hidden;
    position: relative;
    flex-shrink: 0
}

.carousel-cover img,
.hero-cover img {
    object-fit: cover;
    border-radius: inherit
}

.hero-cover svg {
    width: 80px;
    height: 80px;
    color: rgba(255, 255, 255, .9)
}

.hero-info-block {
    flex-direction: column;
    align-items: center;
    width: 100%
}

.hero-title-big {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
    width: 100%;
    padding: 0 20px;
    overflow: hidden
}

.hero-progress-text {
    font-size: 13px;
    color: var(--hint);
    margin-bottom: 12px
}

.hero-progress-track {
    width: 220px;
    height: 4px;
    background: var(--bg-sec);
    border-radius: 2px;
    overflow: hidden
}

.hero-progress-fill {
    height: 100%;
    background: var(--text);
    width: 0%;
    border-radius: 2px;
    transition: width .2s linear
}

.btn-main-play {
    background-color: var(--text);
    color: var(--bg);
    border: none;
    border-radius: 30px;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: transform .1s
}

.btn-main-play:active,
.custom-confirm-btn:active {
    transform: scale(.96)
}

.carousel-section {
    padding: 0 0 10px 20px
}

.carousel,
.section-header {
    padding-right: 20px;
    display: flex
}

.section-header {
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px
}

.section-header h2 {
    font-size: 20px;
    font-weight: 700
}

.section-header .see-all {
    font-size: 15px;
    color: var(--hint);
    cursor: pointer
}

.carousel {
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    transform: translateZ(0);
    contain: content
}

.carousel::-webkit-scrollbar {
    display: none
}

.carousel-card {
    width: 140px;
    flex-shrink: 0;
    cursor: pointer
}

.carousel-cover,
.premium-list-item {
    align-items: center;
    position: relative
}

.carousel-cover {
    width: 140px;
    height: 140px;
    border-radius: 12px;
    background: var(--grad-2);
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0
}

.carousel-cover svg {
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, .8)
}

.carousel-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.2
}

.carousel-meta {
    font-size: 12px;
    color: var(--hint);
    display: flex;
    justify-content: space-between;
    align-items: center
}

.shelves-section-title {
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 8px;
    color: var(--hint);
    text-transform: uppercase;
    letter-spacing: .5px
}

.premium-list-group {
    background: #1c1c1e !important;
    border-radius: 16px;
    margin: 0 16px 24px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .1)
}

.premium-list-item {
    display: flex;
    padding: 12px 16px;
    cursor: pointer;
    transition: background .15s
}

.action-circle-btn,
.book-card-list,
.carousel-card,
.menu-item,
.premium-list-item,
button {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent
}

.modern-menu-item:active,
.premium-list-item:active {
    background: rgba(255, 255, 255, .05)
}

.premium-list-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 58px;
    right: 0;
    height: 1px;
    background: rgba(150, 150, 150, .15)
}

.premium-icon-box {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 14px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2)
}

.premium-item-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 0
}

.premium-item-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    overflow: hidden
}

.premium-item-right {
    display: flex;
    align-items: center;
    gap: 8px
}

.premium-item-count {
    font-size: 15px;
    color: var(--hint)
}

.premium-chevron {
    font-size: 18px;
    color: rgba(150, 150, 150, .4);
    font-weight: 600;
    margin-top: -2px
}

.featured-collection-btn {
    margin: 0 16px 24px;
    background: linear-gradient(135deg, #ff2d55 0, #ff375f 100%);
    border-radius: 18px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(255, 45, 85, .35);
    transition: transform .2s cubic-bezier(.32, .72, 0, 1), filter .2s;
    color: #fff
}

.featured-collection-btn:active {
    transform: scale(.95);
    filter: brightness(.9)
}

.fcb-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, .2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: inset 0 2px 10px rgba(255, 255, 255, .25)
}

.fcb-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center
}

.fcb-title {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 2px;
    letter-spacing: .3px
}

.fcb-subtitle {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, .85)
}

.fcb-chevron {
    font-size: 26px;
    font-weight: 500;
    color: rgba(255, 255, 255, .6);
    margin-top: -4px
}

.shelves-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 0 20px 20px
}

.collection-card {
    background: #262629;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 4px 16px 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 105px;
    cursor: pointer;
    transition: transform .2s cubic-bezier(.2, .8, .2, 1), background .2s;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
    position: relative;
    margin-top: 14px;
    overflow: visible
}

.collection-card::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -1px;
    width: 45%;
    height: 16px;
    background: #262629;
    border: 1px solid rgba(255, 255, 255, .06);
    border-bottom: none;
    border-radius: 10px 14px 0 0;
    z-index: 2
}

.collection-card:active::before {
    background: #2c2c30
}

.collection-card:active {
    transform: scale(.94);
    background: #2c2c30
}

.collection-card::after {
    content: '';
    position: absolute;
    top: -1px;
    left: calc(45% - 1px);
    right: 16px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0));
    z-index: 2
}

.collection-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
    line-height: 1.25;
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 12px;
    word-break: break-word;
    position: relative;
    z-index: 2
}

.collection-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--hint);
    background: rgba(0, 0, 0, .3);
    padding: 5px 12px;
    border-radius: 12px;
    width: fit-content;
    letter-spacing: .3px;
    position: relative;
    z-index: 2
}

#collections-view,
#folder-view {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 75;
    padding: 20px 20px 142px;
    padding-top: env(safe-area-inset-top);
    overflow-x: hidden;
    overscroll-behavior: none;
    touch-action: pan-y !important;
    transform: translate3d(100%, 0, 0);
    pointer-events: none;
    will-change: transform
}

#mini-player,
.book-cover-list,
.book-title-list,
.fs-author-top,
.fs-cover,
.fs-header-info,
.fs-title-top,
.mini-cover,
.mini-title {
    overflow: hidden
}

#folder-view {
    z-index: 80
}

#collections-view.active,
#folder-view.active,
#god-mode-view.active,
#player-fullscreen.active {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
    transition: transform .45s cubic-bezier(.32, .72, 0, 1), visibility linear
}

.folder-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-top: 10px
}

.shelf-group-header {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    padding: 16px 20px 8px;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 1px solid var(--bg-sec);
    margin-bottom: 12px
}

.header-icon.active-group {
    color: var(--primary);
    background: rgba(51, 144, 236, .15);
    border-radius: 8px
}

.folder-search-wrap {
    padding: 0 20px 12px;
    position: relative
}

.folder-search-input {
    width: 100%;
    background: var(--bg-sec);
    border: none;
    border-radius: 12px;
    padding: 12px 40px;
    color: var(--text);
    font-size: 16px;
    outline: 0
}

.back-btn,
.folder-search-cancel,
.folder-search-clear {
    border: none;
    padding: 0;
    cursor: pointer;
    background: 0 0
}

.folder-search-clear,
.folder-search-icon {
    top: 50%;
    transform: translateY(-50%);
    color: var(--hint);
    position: absolute
}

.folder-search-icon {
    left: 12px
}

.folder-search-clear {
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center
}

.folder-search-cancel {
    color: var(--primary);
    font-size: 16px;
    white-space: nowrap;
    max-width: 0;
    margin-left: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-width .3s cubic-bezier(.32, .72, 0, 1), margin-left .3s cubic-bezier(.32, .72, 0, 1), opacity .2s
}

.folder-search-cancel.active {
    max-width: 80px;
    margin-left: 12px;
    opacity: 1;
    pointer-events: auto
}

.back-btn {
    font-size: 28px;
    color: var(--text)
}

.book-card-list {
    background-color: transparent;
    padding: 8px 0;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer
}

.is-completed-style {
    opacity: .55;
    transition: opacity .2s
}

.is-completed-style:active {
    opacity: .3
}

.cover-completed-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .95);
    z-index: 5;
    border-radius: inherit
}

.cover-completed-overlay svg {
    width: 26px;
    height: 26px
}

.book-cover-list {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: var(--grad-3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0
}

.book-cover-list img,
.sheet-book-mini-cover img {
    object-fit: cover
}

.book-cover-list svg {
    width: 24px;
    height: 24px;
    color: rgba(255, 255, 255, .9)
}

.book-info-list {
    flex: 1;
    min-width: 0;
    border-bottom: 1px solid var(--bg-sec);
    padding-bottom: 12px
}

.book-title-list {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px
}

.book-meta-list,
.mini-chapter,
.sheet-book-status {
    font-size: 13px;
    color: var(--hint)
}

.ogg-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-top: 4px;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(255, 59, 48, .15);
    color: #ff3b30;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .2px
}

.book-more-btn,
.header-action-btn {
    background: rgba(150, 150, 150, .12);
    display: flex;
    cursor: pointer
}

#ogg-warning-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 16px 0;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 59, 48, .12);
    border: 1px solid rgba(255, 59, 48, .25);
    font-size: 13px;
    color: #ff3b30;
    line-height: 1.4
}

#ogg-warning-banner .ogg-banner-close {
    margin-left: auto;
    flex-shrink: 0;
    background: 0 0;
    border: none;
    color: #ff3b30;
    font-size: 18px;
    cursor: pointer;
    padding: 0 2px;
    opacity: .7
}

.book-more-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: var(--text);
    border: none;
    flex-shrink: 0;
    margin-left: 12px;
    transition: background .2s, transform .1s
}

.book-more-btn:active,
.header-action-btn:active {
    background: rgba(150, 150, 150, .25);
    transform: scale(.92)
}

.header-action-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: var(--text);
    border: none;
    flex-shrink: 0;
    padding: 0 !important;
    margin: 0 !important;
    transition: background .2s, transform .1s, color .2s
}

.header-action-btn.active-group {
    color: var(--primary);
    background: rgba(51, 144, 236, .15)
}

.header-action-btn svg {
    width: 24px !important;
    height: 24px !important
}

.network-banner {
    position: fixed;
    top: env(safe-area-inset-top, 20px);
    left: 0;
    right: 0;
    margin: 0 auto;
    transform: translate3d(0, -150%, 0);
    background: rgba(30, 30, 32, .95);
    border: 1px solid rgba(255, 59, 48, .4);
    border-radius: 30px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 9999;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .4), 0 0 15px rgba(255, 59, 48, .15);
    transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), opacity .4s, border-color .4s, box-shadow .4s;
    opacity: 0;
    width: max-content;
    max-width: 90vw;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden
}

#mini-player,
#player-fullscreen,
#pwa-update-banner,
.bottom-sheet {
    backface-visibility: hidden
}

#mini-player,
.fs-time-group,
.network-icon {
    display: flex;
    align-items: center
}

.network-banner.active {
    transform: translate3d(0, 15px, 0);
    opacity: 1
}

.network-banner.success {
    border-color: rgba(52, 199, 89, .5);
    box-shadow: 0 15px 35px rgba(0, 0, 0, .4), 0 0 15px rgba(52, 199, 89, .2)
}

.network-icon {
    justify-content: center
}

.network-banner.offline .network-icon {
    color: var(--danger);
    animation: 2s infinite pulse-offline
}

.network-banner.success .network-icon {
    color: #34c759;
    animation: none
}

.network-text {
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .2px
}

@keyframes pulse-offline {

    0%,
    100% {
        opacity: 1;
        transform: scale(1)
    }

    50% {
        opacity: .5;
        transform: scale(.95)
    }
}

#mini-player {
    position: fixed;
    bottom: 68px;
    left: 12px;
    right: 12px;
    height: var(--mini-player-height);
    background: var(--bg-sec);
    border-radius: 16px;
    z-index: 85;
    padding: 0 12px 0 16px;
    gap: 12px;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
    will-change: transform;
    transform: translateY(150%) translateZ(0)
}

.mini-controls,
.mini-cover {
    align-items: center;
    display: flex
}

#mini-player.active {
    transform: translateY(0) translateZ(0)
}

.mini-cover {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: var(--grad-1);
    justify-content: center;
    flex-shrink: 0
}

.mini-cover svg {
    width: 20px;
    height: 20px;
    color: #fff
}

.mini-info,
.sheet-book-info-header {
    flex: 1;
    min-width: 0
}

.mini-title {
    font-size: 15px;
    font-weight: 600
}

.mini-controls {
    gap: 12px
}

.mini-btn {
    background: 0 0;
    border: none;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer
}

.mini-btn svg {
    width: 28px;
    height: 28px
}

.mini-progress-track {
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(150, 150, 150, .2)
}

#player-fullscreen,
.bottom-nav {
    position: fixed;
    right: 0;
    left: 0;
    bottom: 0
}

.mini-progress-fill {
    display: block;
    height: 100%;
    background: var(--text);
    width: 0%;
    will-change: width
}

.bottom-nav {
    height: 56px;
    padding-bottom: var(--sab);
    box-sizing: content-box;
    background: #000;
    border-top: 1px solid var(--bg-sec);
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding-top: 10px;
    z-index: 90
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--hint);
    text-decoration: none;
    flex: 1;
    cursor: pointer
}

.nav-icon {
    margin-bottom: 4px;
    display: flex;
    justify-content: center
}

.nav-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2
}

.nav-item.active .nav-icon svg {
    fill: currentColor
}

.nav-text {
    font-size: 10px;
    font-weight: 500
}

#player-fullscreen {
    top: 0;
    background: var(--bg);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transform: translate3d(0, 100%, 0)
}

.fs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    min-height: 44px
}

.fs-header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: background .2s
}

.fs-header-btn:active {
    background: rgba(255, 255, 255, .15)
}

.fs-header-info {
    text-align: center;
    flex: 1;
    margin: 0 15px;
    cursor: pointer
}

.fs-title-top {
    font-size: 16px;
    font-weight: 700
}

.fs-author-top {
    font-size: 13px;
    color: var(--hint);
    margin-top: 2px
}

.fs-cover-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    margin-bottom: 20px
}

.fs-cover {
    width: min(75vw, 320px);
    height: min(75vw, 320px);
    border-radius: 12px;
    background: var(--grad-1);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .5);
    transition: transform .3s
}

.fs-cover.playing {
    transform: scale(1.02)
}

.fs-cover svg {
    width: 100px;
    height: 100px;
    color: #fff
}

.fs-ctrl-seek svg,
.fs-ctrl-side {
    width: 44px;
    height: 44px
}

.fs-time-left-text {
    margin-top: 30px;
    font-size: 14px;
    color: var(--hint);
    font-weight: 500
}

.fs-ctrl-seek,
.fs-ctrl-side {
    background: 0 0;
    border: none;
    color: var(--text);
    display: flex
}

.fs-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    margin-bottom: 25px
}

.fs-ctrl-side {
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    opacity: .9
}

.fs-ctrl-seek {
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    width: 56px;
    height: 56px
}

.fs-chapter-btn,
.fs-play-btn {
    align-items: center;
    display: flex;
    cursor: pointer
}

.fs-ctrl-seek span {
    position: absolute;
    font-size: 13px;
    font-weight: 800;
    margin-top: 2px
}

.fs-play-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--text);
    color: var(--bg);
    justify-content: center;
    border: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
    transition: transform .1s
}

.fs-play-btn:active {
    transform: scale(.92)
}

.fs-play-btn svg {
    width: 32px;
    height: 32px;
    margin-top: 0
}

.fs-play-btn.is-paused svg {
    transform: translateX(1px)
}

.car-icon-pause,
.fs-play-btn:not(.is-paused) svg {
    transform: translateX(0)
}

.fs-chapter-btn {
    justify-content: center;
    gap: 10px;
    background: 0 0;
    border: none;
    color: var(--text);
    font-size: 17px;
    font-weight: 600;
    margin: 0 auto 30px;
    opacity: .9
}

.fs-buffer-bar,
.fs-fill,
.fs-track {
    border-radius: 2px
}

.fs-timeline-wrap {
    padding: 0 20px;
    margin-bottom: calc(45px + env(safe-area-inset-bottom))
}

.fs-timeline {
    position: relative;
    height: 24px;
    display: flex;
    align-items: center;
    margin-bottom: 8px
}

.fs-timeline input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 5;
    cursor: pointer
}

.fs-track {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, .15)
}

.fs-buffer-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    background: rgba(255, 255, 255, .3);
    z-index: 1
}

.fs-fill,
.fs-thumb {
    background: var(--text)
}

.fs-fill {
    height: 100%;
    position: relative;
    z-index: 2;
    width: 0%;
    will-change: width
}

.fs-thumb {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translate3d(0, -50%, 0);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .3)
}

.celebration-card,
.custom-confirm-box {
    width: 100%;
    max-width: 320px;
    display: flex;
    backface-visibility: hidden
}

.fs-timeline input:active+.fs-track .fs-thumb,
.fs-timeline input:focus+.fs-track .fs-thumb {
    transform: translate3d(0, -50%, 0) scale(1.5)
}

.fs-time-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--hint)
}

.custom-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .75);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s ease-out;
    padding: 20px;
    will-change: opacity
}

.celebration-overlay.active,
.custom-confirm-overlay.active,
.overlay.active {
    opacity: 1;
    pointer-events: auto
}

.custom-confirm-box {
    background: var(--bg-sec);
    border-radius: 24px;
    flex-direction: column;
    transform: translateY(20px) scale(.95) translateZ(0);
    transition: transform .35s cubic-bezier(.32, .72, 0, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, .05);
    will-change: transform
}

.custom-confirm-overlay.active .custom-confirm-box {
    transform: translateY(0) scale(1) translateZ(0)
}

.celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .85);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease-out;
    padding: 20px;
    will-change: opacity
}

.celebration-card {
    background: linear-gradient(180deg, rgba(40, 40, 45, .95) 0, var(--bg-sec) 100%);
    border: 1px solid rgba(255, 215, 0, .2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .1);
    border-radius: 32px;
    padding: 32px 24px 24px;
    text-align: center;
    transform: translate3d(0, 30px, 0) scale(.9);
    transition: transform .5s cubic-bezier(.34, 1.56, .64, 1);
    flex-direction: column;
    align-items: center;
    will-change: transform
}

.celebration-overlay.active .celebration-card {
    transform: translate3d(0, 0, 0) scale(1)
}

.custom-confirm-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 59, 48, .15);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px
}

.custom-confirm-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
    text-align: center;
    letter-spacing: .3px
}

.custom-confirm-text,
.empty-state,
.loader {
    color: var(--hint);
    text-align: center
}

.custom-confirm-text {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 24px;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal
}

.custom-confirm-actions {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.custom-confirm-btn {
    width: 100%;
    padding: 14px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform .1s, opacity .1s;
    display: flex;
    justify-content: center;
    align-items: center
}

.custom-confirm-btn.danger {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 59, 48, .3)
}

.custom-confirm-btn.primary {
    background: var(--text);
    color: var(--bg);
    box-shadow: 0 4px 15px rgba(255, 255, 255, .2)
}

.custom-confirm-btn.cancel {
    background: rgba(150, 150, 150, .15);
    color: var(--text)
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: .3s
}

.bottom-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-sec);
    border-radius: 24px 24px 0 0;
    padding: 24px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    z-index: 910;
    transform: translate3d(0, 100%, 0);
    transition: transform .35s cubic-bezier(.32, .72, 0, 1);
    max-height: calc(var(--tg-viewport-stable-height, 100vh) * .85);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-backface-visibility: hidden
}

.bottom-sheet.active {
    transform: translate3d(0, 0, 0)
}

.sheet-handle {
    width: 40px;
    height: 5px;
    background: var(--hint);
    border-radius: 3px;
    margin: 0 auto 20px;
    opacity: .5
}

.sheet-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center
}

.sheet-content {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    transition: padding-bottom .3s ease-out
}

.sheet-content textarea {
    transition: border-color .2s, background-color .2s
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(150, 150, 150, .1);
    font-size: 16px;
    font-weight: 500;
    gap: 16px;
    cursor: pointer;
    max-width: 100%
}

.menu-item:last-child,
.modern-menu-item:last-child {
    border-bottom: none
}

.menu-item.danger,
.modern-menu-item.danger,
.modern-menu-item.danger .item-icon {
    color: var(--danger)
}

.menu-item.primary {
    color: var(--primary)
}

.menu-item-icon {
    font-size: 20px;
    width: 24px;
    text-align: center
}

.empty-state {
    padding: 40px 20px;
    font-size: 15px;
    grid-column: 1/-1
}

.loader {
    padding: 20px
}

.input-text {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(150, 150, 150, .2);
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    margin-bottom: 16px;
    outline: 0
}

.input-text:focus {
    border-color: var(--primary)
}

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

.dl-capsule {
    max-width: 85vw;
    overflow: hidden
}

.dl-cover,
.dl-cover img {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important
}

.dl-cover {
    flex: 0 0 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0)
}

.dl-cover img {
    object-fit: cover !important;
    display: block !important;
    position: static !important;
    border-radius: inherit;
    top: 0;
    left: 0;
    object-fit: cover
}

.sheet-book-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 0 8px
}

.sheet-book-mini-cover {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: var(--grad-1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .2)
}

.greeting-tile,
.profile-user-card {
    box-shadow: 0 8px 20px rgba(0, 0, 0, .15)
}

.sheet-book-title {
    font-size: 18px;
    font-weight: 700;
    overflow: hidden;
    margin-bottom: 4px
}

.sheet-actions-grid {
    display: flex;
    justify-content: space-around;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(150, 150, 150, .1)
}

.action-circle-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: 0 0;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 0;
    transition: opacity .1s
}

.action-circle-btn:active {
    opacity: .6
}

.action-circle-btn.disabled {
    opacity: .3;
    cursor: not-allowed
}

.action-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px
}

.action-label {
    font-size: 12px;
    font-weight: 500
}

.ambient-glow {
    position: fixed;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 60vh;
    background: radial-gradient(circle at 50% 30%, var(--glow-color) 0, transparent 50%);
    z-index: 0;
    pointer-events: none;
    opacity: .35;
    transform: translate3d(0, 0, 0);
    transition: background .8s
}

.carousel-section,
.header,
.hero-section,
.tab-pane h1 {
    position: relative;
    z-index: 5
}

.greeting-tile {
    background: rgba(20, 20, 22, .82);
    border-radius: 18px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, .08)
}

.greeting-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .5)
}

.greeting-sub {
    font-size: 13px;
    color: var(--hint);
    margin-top: 2px;
    font-weight: 500
}

.tab-pane h1 {
    text-shadow: 0 2px 10px rgba(0, 0, 0, .5)
}

.profile-user-card {
    background: rgba(30, 30, 32, .88);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 18px;
    margin: 0 16px 24px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transform: translateZ(0)
}

.profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--grad-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2)
}

.modern-menu-item span,
.profile-info {
    flex: 1
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px
}

.profile-sub {
    font-size: 13px;
    font-weight: 500;
    color: var(--hint)
}

.st-toggle {
    width: 46px;
    height: 26px;
    border-radius: 13px;
    background: rgba(150, 150, 150, .25);
    position: relative;
    transition: background .3s
}

.st-toggle.active {
    background: var(--primary)
}

.st-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, .2)
}

.st-toggle.active::after {
    transform: translateX(20px)
}

.st-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #020408;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity .8s ease-out, visibility .8s ease-out
}

.st-preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none
}

.st-preloader-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: 4s ease-in-out infinite stLevitate
}

.st-logo-3d {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px
}

.st-headphones-3d {
    width: 120px;
    height: 100px;
    border: 10px solid #f0f0f0;
    border-bottom: none;
    border-radius: 60px 60px 0 0;
    position: relative;
    padding: 15px;
    box-shadow: inset 0 0 15px rgba(255, 255, 255, .1), 0 5px 15px rgba(0, 0, 0, .5)
}

.st-bars-3d {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 100%
}

.st-bar-3d {
    width: 15px;
    border-radius: 5px;
    box-shadow: 0 0 10px currentColor, inset 0 0 5px rgba(255, 255, 255, .2);
    animation: 1.5s ease-in-out infinite stBarPulse
}

.bar-blue {
    color: #4a90e2;
    background-color: #4a90e2;
    height: 60%;
    animation-delay: .1s
}

.bar-purple {
    color: #9b59b6;
    background-color: #9b59b6;
    height: 80%;
    animation-delay: .3s
}

.bar-cyan {
    color: #50e3c2;
    background-color: #50e3c2;
    height: 70%;
    animation-delay: .2s
}

.bar-peach {
    color: #ff8a80;
    background-color: #ff8a80;
    height: 90%;
    animation-delay: .4s
}

.st-text-3d {
    font-size: 32px;
    font-weight: 700;
    color: #f0f0f0;
    margin-top: 15px;
    letter-spacing: 4px;
    text-shadow: 0 3px 6px rgba(0, 0, 0, .5)
}

.st-preloader-shadow {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 15px;
    background: rgba(0, 0, 0, .6);
    border-radius: 50%;
    filter: blur(8px);
    animation: 4s ease-in-out infinite stShadowScale;
    z-index: -1
}

.st-update-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 35px;
    width: 160px;
    animation: .5s forwards stUpdateFadeIn
}

.st-update-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, .1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px
}

.st-update-fill {
    width: 0%;
    height: 100%;
    background: var(--primary);
    transition: width 2.5s cubic-bezier(.2, .8, .2, 1)
}

.st-update-text {
    font-size: 12px;
    color: var(--hint);
    font-weight: 500;
    letter-spacing: .3px
}

@keyframes stUpdateFadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes stLevitate {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-20px)
    }
}

@keyframes stShadowScale {

    0%,
    100% {
        transform: translateX(-50%) scale(1);
        opacity: .6;
        filter: blur(8px)
    }

    50% {
        transform: translateX(-50%) scale(1.3);
        opacity: .3;
        filter: blur(12px)
    }
}

@keyframes stBarPulse {

    0%,
    100% {
        transform: scaleY(1)
    }

    50% {
        transform: scaleY(.7)
    }
}

.premium-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 10px;
    margin-bottom: 20px;
    position: relative;
    z-index: 10
}

.header-brand-wrap {
    display: flex;
    align-items: center;
    gap: 14px
}

.header-mini-logo {
    width: 42px;
    height: 32px;
    position: relative;
    display: flex;
    align-items: center
}

.header-stats-wrap,
.stat-badge {
    align-items: center;
    display: flex
}

.st-logo-3d.mini {
    transform: scale(.26);
    transform-origin: left center;
    margin: 0;
    position: absolute;
    left: 0;
    animation: none
}

.st-logo-3d.mini .st-text-3d {
    display: none
}

.header-brand-name {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: .3px;
    background: linear-gradient(90deg, #fff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 2px
}

.header-stats-wrap {
    gap: 10px
}

.stat-badge {
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15)
}

.stat-icon {
    font-size: 15px;
    line-height: 1
}

.stat-value {
    line-height: 1;
    margin-top: 1px
}

.badge-streak {
    background: linear-gradient(135deg, rgba(255, 149, 0, .2), rgba(255, 69, 0, .1)), rgba(20, 20, 22, .75);
    border: 1px solid rgba(255, 149, 0, .35);
    color: #ff9d0a;
    position: relative
}

.badge-streak::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    box-shadow: 0 0 15px rgba(255, 149, 0, .5);
    opacity: 0;
    animation: 2.5s ease-in-out infinite alternate streakGlow;
    pointer-events: none
}

@keyframes streakGlow {
    from {
        opacity: .2
    }

    to {
        opacity: 1
    }
}

.badge-chapters {
    background: linear-gradient(135deg, rgba(80, 227, 194, .2), rgba(43, 168, 223, .1)), rgba(20, 20, 22, .75);
    border: 1px solid rgba(80, 227, 194, .3);
    color: #50e3c2
}

.carousel-nav-btn,
.sheet-close-btn {
    position: absolute;
    color: var(--text);
    align-items: center;
    display: flex;
    z-index: 10;
    cursor: pointer
}

body.desktop-mode {
    user-select: auto
}

body.desktop-mode .carousel::-webkit-scrollbar {
    display: none
}

.carousel-nav-btn {
    top: calc(140px / 2);
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(20, 20, 22, .7);
    border: 1px solid rgba(255, 255, 255, .15);
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background .2s, transform .2s;
    padding: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .3)
}

.carousel-nav-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-50%) scale(1.1)
}

.carousel-nav-btn.left {
    left: 4px
}

.carousel-nav-btn.right {
    right: 4px
}

body.desktop-mode .book-card-list:hover,
body.desktop-mode .carousel-card:hover,
body.desktop-mode .folder-card:hover,
body.desktop-mode .ios-row:hover,
body.desktop-mode .menu-item:hover {
    background: rgba(150, 150, 150, .15) !important
}

body.desktop-mode .btn-main-play:hover,
body.desktop-mode .fs-play-btn:hover {
    transform: scale(1.05);
    opacity: .9
}

body.desktop-mode .action-circle-btn:hover {
    opacity: .8
}

.sheet-close-btn {
    top: 20px;
    right: 20px;
    background: rgba(150, 150, 150, .15);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    justify-content: center;
    transition: background .2s
}

.sheet-close-btn:hover {
    background: rgba(150, 150, 150, .3)
}

@media all and (display-mode:standalone) {
    @supports (-webkit-touch-callout:none) {

        .bottom-nav,
        body,
        html {
            bottom: 0 !important;
            background-color: #000 !important
        }

        body,
        html {
            position: fixed !important;
            top: 0 !important;
            left: 0 !important;
            right: 0 !important;
            height: 100vh !important;
            width: 100vw !important
        }

        .bottom-nav {
            position: absolute !important;
            height: 56px !important;
            padding-bottom: env(safe-area-inset-bottom) !important;
            box-sizing: content-box !important
        }
    }
}

#pwa-update-banner {
    position: fixed;
    bottom: 135px;
    left: 50%;
    transform: translate3d(-50%, 100px, 0);
    background: rgba(30, 30, 32, .97);
    border: 1px solid var(--primary);
    border-radius: 20px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: max-content;
    max-width: 90vw;
    z-index: 10000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5), 0 0 15px rgba(51, 144, 236, .2);
    opacity: 0;
    pointer-events: none;
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), opacity .4s;
    -webkit-backface-visibility: hidden
}

#pwa-update-banner.active {
    transform: translate3d(-50%, 0, 0);
    opacity: 1;
    pointer-events: auto
}

@supports (-webkit-touch-callout:none) {

    #tab-home,
    #tab-profile,
    .tab-pane {
        padding-bottom: 192px !important
    }

    .tabs-wrapper {
        touch-action: pan-y !important
    }

    body.is-swiping .tabs-wrapper {
        pointer-events: none !important;
        -webkit-user-select: none !important
    }

    body.is-swiping .greeting-tile,
    body.is-swiping .profile-card,
    body.is-swiping .st-download-btn,
    body.is-swiping .stat-badge {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: none !important
    }
}

#car-player-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    color: #fff;
    z-index: 905;
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom);
    transform: translate3d(0, 100%, 0);
    visibility: hidden;
    pointer-events: none;
    transition: transform .4s cubic-bezier(.32, .72, 0, 1), visibility 0s linear .4s;
    backface-visibility: hidden
}

#car-player-fullscreen.active {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
    transition: transform .4s cubic-bezier(.32, .72, 0, 1), visibility linear
}

.car-top-bar {
    padding: 20px 20px 0;
    display: flex;
    position: relative;
    z-index: 10;
    flex-shrink: 0
}

.car-controls-split,
.car-main {
    flex: 1;
    display: flex
}

.car-btn-close {
    background: 0 0;
    border: none;
    color: #b3b3b3;
    padding: 5px;
    cursor: pointer;
    margin-left: -5px
}

.car-btn-close svg {
    width: 44px;
    height: 44px;
    stroke-width: 1.5
}

.car-main {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 40px;
    min-height: 0
}

.car-cover-wrap {
    position: relative;
    width: 55vw;
    max-width: 260px;
    height: 55vw;
    max-height: 260px;
    border-radius: 12px;
    background: var(--bg-sec);
    flex-shrink: 0
}

.car-cover-wrap img {
    border-radius: 12px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.car-placeholder-cover {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .5)
}

.car-placeholder-cover svg {
    width: 80px;
    height: 80px
}

.car-play-fab {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #d9d9d9;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #1c1c1e;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .4);
    cursor: pointer;
    transition: transform .1s
}

.car-play-fab:active {
    transform: translate(-50%, 50%) scale(.94)
}

.car-play-fab svg {
    width: 44px;
    height: 44px;
    display: block
}

.car-icon-play {
    transform: translate(3px, 20px)
}

.car-play-fab svg:first-of-type {
    margin-left: 0 !important;
    margin-top: 6px !important
}

.car-play-fab svg:nth-of-type(2) {
    margin: 0 !important
}

.car-split-icon svg,
.st-download-icon-wrap svg {
    width: 100%;
    height: 100%
}

.car-time {
    margin-top: 75px;
    font-size: 38px;
    font-weight: 500;
    letter-spacing: 1px;
    color: #fff
}

.car-bottom-section {
    height: calc(var(--tg-viewport-stable-height, 100svh) * .38);
    min-height: 250px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0
}

.car-progress-container {
    position: relative;
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center
}

.car-progress-fill,
.car-progress-track {
    height: 4px;
    position: absolute;
    pointer-events: none
}

.car-progress-container input[type=range] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 5;
    margin: 0;
    cursor: pointer
}

.car-progress-track {
    width: 100%;
    background: #333
}

.car-progress-fill {
    background: #fff;
    left: 0;
    width: 0%;
    will-change: width
}

.car-progress-thumb {
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%
}

.car-split-btn {
    flex: 1;
    background: 0 0;
    border: none;
    color: #a3a3a3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background .15s, color .15s
}

.car-split-btn:active {
    background: rgba(255, 255, 255, .06);
    color: #fff
}

.car-split-btn:first-child {
    border-right: 2px solid #1c1c1e
}

.car-split-icon {
    width: 54px;
    height: 54px
}

.chapter-dl-btn svg,
.cta-icon svg,
.dl-cover svg,
.st-download-icon-wrap {
    width: 24px;
    height: 24px
}

.car-split-icon svg {
    stroke-width: 1.5
}

.car-split-text {
    font-size: 26px;
    font-weight: 500
}

body.desktop-mode .car-main {
    margin-top: 0
}

body.keyboard-open #mini-player,
body.keyboard-open #pwa-update-banner,
body.keyboard-open .bottom-nav {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(100px) translateZ(0) !important;
    transition: opacity .15s, transform .15s !important
}

.bottom-nav {
    transition: opacity .25s, transform .25s cubic-bezier(.32, .72, 0, 1)
}

.st-download-btn {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: 20px;
    padding: 4px 6px 4px 12px;
    cursor: pointer;
    gap: 8px;
    transition: background .2s, transform .1s;
    color: var(--text)
}

.st-download-btn:active {
    transform: scale(.95);
    background: rgba(255, 255, 255, .15)
}

.st-download-size {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, .9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
    white-space: nowrap
}

.st-download-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center
}

.chapter-dl-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    cursor: pointer;
    transition: color .2s, transform .1s
}

.chapter-dl-btn:active {
    transform: scale(.9)
}

.progress-ring {
    transform: rotate(-90deg)
}

.progress-ring-bg {
    stroke: rgba(255, 255, 255, 0.15)
}

.progress-ring-fill {
    stroke: var(--text);
    stroke-linecap: round;
    transition: stroke-dashoffset .2s linear
}

#tab-home {
    display: flex;
    flex-direction: column;
    min-height: 100%
}

.hero-section {
    transition: .3s cubic-bezier(.32, .72, 0, 1)
}

.hero-section.is-single {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 4vh;
    padding-bottom: 4vh
}

.hero-section.is-single .hero-cover {
    width: 260px;
    height: 260px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6) !important
}

.hero-section.is-single .hero-title-big {
    font-size: 24px
}

.empty-library-cta {
    margin: auto 20px 20px;
    padding: 20px;
    background: rgba(150, 150, 150, .08);
    border: 1px dashed rgba(255, 255, 255, .1);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: .5s fadeIn
}

.cta-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    margin-bottom: 12px
}

.cta-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text)
}

.cta-desc {
    font-size: 13px;
    color: var(--hint);
    line-height: 1.4;
    margin-bottom: 16px;
    max-width: 250px
}

.cta-btn,
.dl-title {
    font-size: 14px;
    font-weight: 700
}

.cta-btn {
    background: var(--text);
    color: var(--bg);
    border: none;
    border-radius: 16px;
    padding: 10px 24px;
    cursor: pointer;
    transition: transform .1s
}

.cta-btn:active {
    transform: scale(.95)
}

.offline-status-on {
    color: #4cd964;
    font-weight: 700
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.dl-capsule {
    width: 240px;
    flex-shrink: 0;
    transform: translateZ(0);
    display: flex;
    align-items: center;
    background: rgba(150, 150, 150, .1);
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: 16px;
    padding: 10px;
    gap: 12px;
    cursor: pointer;
    transition: opacity .2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1)
}

.dl-cover {
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--grad-1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative
}

.dl-cover svg {
    color: rgba(255, 255, 255, .8)
}

.dl-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center
}

.dl-title {
    color: var(--text);
    overflow: hidden;
    margin-bottom: 2px
}

.dl-status {
    font-size: 12px;
    font-weight: 500;
    color: var(--hint);
    margin-bottom: 6px;
    transition: color .3s
}

.dl-status.active {
    color: #34c759
}

.dl-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, .1);
    border-radius: 2px;
    overflow: hidden
}

.dl-progress-fill {
    height: 100%;
    background: var(--text);
    border-radius: 2px;
    transition: width .2s linear
}

.book-cover-list img,
.carousel-cover img,
.fs-cover img,
.hero-cover img,
.mini-cover img,
.sheet-book-mini-cover img {
    position: static !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: inherit !important
}

.book-cover-list svg,
.carousel-cover svg,
.fs-cover svg,
.hero-cover svg,
.mini-cover svg,
.sheet-book-mini-cover svg {
    position: relative;
    z-index: 2
}

#god-mode-view {
    transform: translate3d(100%, 0, 0);
    pointer-events: none
}

#landscape-blocker {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #000 !important;
    color: #fff !important;
    z-index: 9999999 !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 20px
}

.landscape-icon {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    flex-shrink: 0 !important;
    margin-bottom: 24px !important;
    animation: 2s ease-in-out infinite rotatePhone !important
}

@keyframes rotatePhone {

    0%,
    100% {
        transform: rotate(-90deg)
    }

    50% {
        transform: rotate(0)
    }
}

.bottom-sheet:has(.sleep-picker-wrapper) {
    overflow-x: visible
}

.sleep-picker-wrapper {
    position: relative;
    width: 100vw;
    height: 140px;
    margin-left: -24px;
    overflow: hidden;
    touch-action: pan-x;
    mask-image: linear-gradient(to right, transparent 0%, black 35%, black 65%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 35%, black 65%, transparent 100%)
}

.sleep-scroll-box {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch
}

.sleep-scroll-box::-webkit-scrollbar {
    display: none
}

.sleep-spacer {
    flex: 0 0 calc(50vw - 75px);
    height: 10px
}

.sleep-item-snap {
    scroll-snap-align: center;
    width: 150px;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    color: var(--hint);
    opacity: .35;
    transform: scale(.85);
    transition: transform .2s cubic-bezier(.2, .8, .2, 1), opacity .2s, color .2s
}

.sleep-item-snap.is-active {
    opacity: 1;
    transform: scale(1.3);
    color: #fff
}

.sleep-indicator {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 9px solid var(--hint);
    pointer-events: none;
    z-index: 10
}

.sheet-content.top-app-style {
    padding: 0 16px 20px
}

.modern-book-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
    padding-top: 10px
}

.modern-book-cover {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    background: var(--grad-1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .35);
    margin-bottom: 16px;
    overflow: hidden
}

.modern-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.modern-book-cover svg {
    color: rgba(255, 255, 255, .9)
}

.modern-book-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.2
}

.modern-book-status {
    font-size: 14px;
    font-weight: 500;
    color: var(--hint)
}

.modern-actions-grid {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px
}

.modern-circle-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: 0 0;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--text);
    transition: transform .1s, opacity .1s;
    width: 76px
}

.modern-circle-btn .icon-wrap,
.modern-menu-item {
    align-items: center;
    display: flex;
    color: var(--text)
}

.modern-circle-btn:active {
    transform: scale(.92);
    opacity: .8
}

.modern-circle-btn.disabled {
    opacity: .3;
    pointer-events: none
}

.modern-circle-btn .icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(150, 150, 150, .12);
    justify-content: center;
    margin-bottom: 8px
}

.modern-circle-btn span {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2
}

.modern-menu-group {
    background: rgba(150, 150, 150, .08);
    border-radius: 16px;
    margin-bottom: 16px;
    overflow: hidden
}

.modern-menu-item {
    padding: 16px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
    border-bottom: 1px solid rgba(255, 255, 255, .06)
}

.modern-menu-item .item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 14px;
    color: var(--text);
    opacity: .9
}

.modern-menu-item .item-chevron {
    color: rgba(150, 150, 150, .4);
    font-size: 20px;
    font-weight: 600;
    margin-left: 8px;
    margin-top: -2px
}

.modern-menu-item.warning,
.modern-menu-item.warning .item-icon {
    color: #ff9f0a
}