.book-info-section {
    margin-bottom: 12px;
}

.book-description {
    display: block;
    background-color: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    padding: 14px 16px;
    border-radius: 6px 6px 0 0;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text-primary);
    transition: background-color 0.2s;
    line-height: 1.5;
    text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
    .book-description:hover {
        background-color: var(--color-border);
        text-decoration: none;
    }
}

.book-description-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.book-description-text {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.book-description-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.book-action-buttons {
    display: flex;
    gap: 0;
    border-top: 1px solid var(--color-border-control);
}

.book-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    background-color: var(--color-bg-elevated-strong);
    border: 1px solid var(--color-border-control);
    border-top: none;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--color-text-primary);
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s;
    cursor: pointer;
}

.book-action-btn:first-child {
    border-radius: 0 0 0 6px;
    border-right: none;
}

.book-action-btn:not(:first-child):not(:last-child) {
    border-radius: 0;
    border-right: none;
}

.book-action-btn:not(:last-child) {
    box-shadow: inset -1px 0 0 var(--color-border-control);
}

.book-action-btn:last-child {
    border-radius: 0 0 6px 0;
}

button.book-action-btn {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

.book-action-btn-active {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

html[data-theme="dark"] .book-action-btn-active {
    background-color: rgba(25, 135, 84, 0.18);
    border-color: rgba(25, 135, 84, 0.45);
    color: #75b798;
}

/* 책 메모 — native <dialog> */
.book-memo-panel {
    background: var(--color-bg-elevated-bright);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    width: 90%;
    max-width: 500px;
    padding: 0;
    box-shadow: 0 0.5rem 1.5rem var(--color-shadow);
}

html[data-theme="dark"] .book-memo-panel {
    background: var(--color-bg-elevated);
}

.book-memo-panel::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.book-memo-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.book-memo-panel-body {
    padding: 1rem;
}

.book-memo-panel-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--color-border);
}

.book-action-btn-icon {
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.book-action-btn-label {
    font-size: 0.85rem;
}

@media (hover: hover) and (pointer: fine) {
    .book-action-btn:hover {
        background-color: var(--color-bg-elevated-strong-hover);
        text-decoration: none;
    }
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 5px;
}

.chapter-tile {
    background-color: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    padding: 16px 0;
    text-align: center;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 1rem;
}

.chapter-tile.chapter-read {
    position: relative;
}

.chapter-tile.chapter-read::after {
    content: '\2713';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 0.7rem;
    color: #198754;
    font-weight: bold;
}

html[data-theme="dark"] .chapter-tile.chapter-read::after {
    color: #75b798;
}

@media (hover: hover) and (pointer: fine) {
    .chapter-tile:hover {
        background-color: var(--color-border);
    }
}
