.share-book-button,
.reader-tools button,
.share-dialog button {
    border: 1px solid rgba(217, 181, 109, 0.28);
    border-radius: 999px;
    background: rgba(14, 10, 10, 0.72);
    color: #e6d8c1;
    font: 500 0.68rem/1 "Cinzel", serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.share-book-button {
    min-height: 42px;
    padding: 0 17px;
}

.share-book-button:hover,
.reader-tools button:hover,
.share-dialog button:hover,
.share-book-button:focus-visible,
.reader-tools button:focus-visible,
.share-dialog button:focus-visible {
    border-color: rgba(217, 181, 109, 0.68);
    background: rgba(185, 100, 63, 0.2);
    outline: none;
    transform: translateY(-1px);
}

.chapter-paragraph[data-paragraph-id] {
    position: relative;
    padding: 0.35rem 0.55rem;
    margin-right: -0.55rem;
    margin-left: -0.55rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.chapter-paragraph[data-paragraph-id]:hover,
.chapter-paragraph[data-paragraph-id]:focus-visible,
.chapter-paragraph.paragraph-selected {
    background: rgba(217, 181, 109, 0.075);
    outline: none;
}

.chapter-paragraph.paragraph-marked {
    background: linear-gradient(90deg, rgba(185, 100, 63, 0.2), rgba(217, 181, 109, 0.08));
    box-shadow: inset 3px 0 0 rgba(217, 181, 109, 0.72);
}

.reader-tools[hidden],
.share-dialog[hidden] {
    display: none;
}

.reader-tools {
    position: fixed;
    z-index: 160;
    right: 50%;
    bottom: 82px;
    width: min(680px, calc(100vw - 32px));
    padding: 14px 16px;
    border: 1px solid rgba(217, 181, 109, 0.3);
    border-radius: 18px;
    background: rgba(10, 7, 7, 0.96);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(18px);
    transform: translateX(50%);
}

.reader-tools-label,
.reader-tools-feedback,
.share-dialog-feedback {
    color: rgba(230, 216, 193, 0.7);
    font-size: 0.78rem;
}

.reader-tools-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.reader-tools button {
    min-height: 36px;
    padding: 0 13px;
}

.reader-tools-feedback,
.share-dialog-feedback {
    min-height: 1em;
    margin-top: 8px;
}

.share-dialog {
    position: fixed;
    inset: 0;
    z-index: 220;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(3, 2, 2, 0.78);
    backdrop-filter: blur(12px);
}

.share-dialog-card {
    position: relative;
    width: min(510px, 100%);
    padding: 36px;
    border: 1px solid rgba(217, 181, 109, 0.3);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(25, 16, 15, 0.99), rgba(7, 5, 5, 0.99));
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.72);
}

.share-dialog-kicker {
    color: #d9b56d;
    font: 500 0.68rem/1.2 "Cinzel", serif;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

.share-dialog h2 {
    margin-top: 10px;
    color: #f1e7d6;
    font: 500 clamp(1.6rem, 4vw, 2.2rem)/1.2 "Cinzel", serif;
}

.share-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 26px;
}

.share-dialog-actions button {
    min-height: 46px;
    padding: 0 14px;
}

.share-dialog .share-dialog-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    padding: 0;
    font-size: 1rem;
}

@media (max-width: 640px) {
    .share-book-button {
        position: fixed;
        top: 20px;
        right: 112px;
        min-height: 40px;
        padding: 0 12px;
        font-size: 0.58rem;
    }

    .reader-tools {
        bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    }

    .reader-tools-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .reader-tools button {
        line-height: 1.35;
    }

    .share-dialog-card {
        padding: 32px 22px 24px;
    }

    .share-dialog-actions {
        grid-template-columns: 1fr;
    }
}
