:where(.mh-reader-root) {
    --mh-reader-bg: #fff;
    --mh-reader-fg: #222;
    --mh-reader-accent: #1aad19;
    --mh-reader-muted: #f2f2f2;
    --mh-reader-line: #eee;
}
.mh-reader-bar {
    position: sticky;
    top: 0;
    z-index: 10020;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 8px 10px;
    padding-top: calc(8px + env(safe-area-inset-top, 0px));
    background: var(--mh-reader-bg);
    color: var(--mh-reader-fg);
    border-bottom: 1px solid var(--mh-reader-line);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}
.mh-reader-bar a,
.mh-reader-bar button {
    color: inherit;
    background: transparent;
    border: 0;
    appearance: none;
    font: inherit;
}
.mh-reader-catalog {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 18px;
    background: var(--mh-reader-muted);
    font-size: 13px;
    line-height: 36px;
    text-decoration: none !important;
}
.mh-reader-pick {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    background: var(--mh-reader-muted);
    cursor: pointer;
    text-align: left;
}
.mh-reader-pick strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
}
.mh-reader-pick span {
    flex: 0 0 auto;
    opacity: .7;
    font-size: 11px;
}
.mh-reader-modes {
    flex: 0 0 auto;
    display: flex;
    padding: 3px;
    border-radius: 18px;
    background: var(--mh-reader-muted);
}
.mh-reader-modes button {
    min-width: 44px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 15px;
    font-size: 12px;
    opacity: .78;
    cursor: pointer;
}
.mh-reader-modes button.is-on {
    background: var(--mh-reader-accent);
    color: #fff;
    opacity: 1;
    font-weight: 600;
}
dialog.mh-reader-sheet {
    position: fixed;
    top: auto;
    right: auto;
    bottom: 0;
    left: 50%;
    width: min(520px, 100vw);
    max-height: min(78vh, 680px);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 16px 16px 0 0;
    background: #161618;
    color: #fff;
    transform: translateX(-50%);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, .35);
}
.mh-reader-sheet::backdrop {
    background: rgba(0, 0, 0, .55);
}
.mh-reader-sheet-panel {
    display: flex;
    flex-direction: column;
    max-height: min(78vh, 680px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mh-reader-sheet-hd {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px 8px;
}
.mh-reader-sheet-hd input {
    flex: 1;
    min-height: 40px;
    border: 0;
    border-radius: 10px;
    padding: 0 12px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-size: 14px;
}
.mh-reader-sheet-hd button {
    min-width: 52px;
    min-height: 40px;
    color: #fff;
    background: transparent;
    border: 0;
    font-size: 14px;
    cursor: pointer;
}
.mh-reader-sheet-list {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 8px 16px;
}
.mh-reader-sheet-list a {
    display: block;
    padding: 12px 10px;
    color: #eee;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    font-size: 14px;
    line-height: 1.35;
}
.mh-reader-sheet-list a.is-current {
    color: var(--mh-reader-accent);
    font-weight: 700;
}
.mh-reader-split {
    margin: 18px 12px 10px;
    padding: 10px 12px;
    text-align: center;
    color: #fff;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .55), transparent);
    font-size: 14px;
    font-weight: 600;
}
.mh-reader-status {
    padding: 16px 12px 28px;
    text-align: center;
    font-size: 13px;
    color: #888;
}
.mh-reader-status button {
    display: inline-block;
    margin-top: 8px;
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 20px;
    background: var(--mh-reader-accent);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}
.mh-reader-toast {
    position: fixed;
    left: 50%;
    bottom: 88px;
    z-index: 10050;
    transform: translateX(-50%);
    max-width: 86%;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(20, 20, 20, .92);
    color: #fff;
    font-size: 13px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s;
}
.mh-reader-toast.is-on {
    opacity: 1;
}
@media (max-width: 767px) {
    .mh-reader-catalog {
        padding: 0 10px;
    }
    .mh-reader-modes button {
        min-width: 40px;
        padding: 0 8px;
    }
}
