.history-page {
    --hp-surface: var(--bg-secondary);
    --hp-panel: var(--bg-tertiary);
    --hp-hover: color-mix(in srgb, var(--bg-tertiary) 92%, var(--text-primary));
    --hp-line: var(--border-medium);
    --hp-line-soft: var(--border-light);
    --hp-fill: color-mix(in srgb, var(--accent-primary) 65%, var(--text-primary));
    --hp-track: color-mix(in srgb, var(--text-primary) 12%, var(--bg-secondary));
    --hp-tint: color-mix(in srgb, var(--accent-primary) 16%, var(--bg-secondary));
    --hp-done: color-mix(in srgb, var(--success) 55%, var(--text-primary));
    --hp-done-tint: color-mix(in srgb, var(--success) 14%, var(--bg-secondary));
    --hp-partial: color-mix(in srgb, var(--warning) 60%, var(--text-primary));
    --hp-partial-tint: color-mix(in srgb, var(--warning) 12%, var(--bg-secondary));
    --hp-solid: color-mix(in srgb, var(--accent-primary) 75%, var(--text-primary));
    --hp-on-accent: var(--text-inverse);
    --hp-muted: color-mix(in srgb, var(--text-secondary) 65%, var(--text-primary));
    --hp-icon-chip: #F7F4EB;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    color: var(--text-primary);
}

[data-theme="burgundy"] .history-page {
    --hp-solid: var(--accent-primary);
    --hp-on-accent: var(--text-primary);
}

[data-theme="sepia"] .history-page {
    --hp-solid: color-mix(in srgb, var(--accent-primary) 40%, var(--text-primary));
    --hp-muted: color-mix(in srgb, var(--text-secondary) 35%, var(--text-primary));
}

.history-page .testament-container {
    background-color: var(--hp-panel);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px var(--shadow-medium);
    border: 1px solid var(--hp-line);
}

.history-page .testament-title {
    border-bottom: 2px solid var(--hp-fill);
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-family: var(--font-serif);
    text-align: center;
    font-size: 1.5rem;
}

.history-page .collapse {
    display: none;
}

.history-page .collapse.show {
    display: block;
}

.history-page .custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: 1050;
}

.history-page .custom-modal.show {
    display: block;
}

.history-page .modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.history-page .modal-lg {
    max-width: 800px;
}

.history-page .modal-content {
    position: relative;
    background-color: var(--bg-modal);
    color: var(--text-primary);
    border: 1px solid var(--hp-line);
    border-radius: 0.5rem;
    outline: 0;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    height: 100%;
    box-shadow: 0 12px 40px var(--shadow-strong);
}

.history-page .modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--hp-line);
}

.history-page .modal-title {
    margin: 0;
    font-family: var(--font-serif);
}

.history-page .modal-body {
    position: relative;
    padding: 1rem;
    max-height: 70vh;
    overflow-y: auto;
}

.history-page .modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem;
    border-top: 1px solid var(--hp-line);
}

.history-page .btn-close {
    background: var(--hp-icon-chip);
    border: 0;
    border-radius: 50%;
    padding: 4px;
    line-height: 0;
    opacity: 0.8;
    cursor: pointer;
}

.history-page .btn-close:hover {
    opacity: 1;
}

.history-page .journey-stats-card {
    border: 1px solid var(--hp-line);
    border-radius: 8px;
    background-color: var(--hp-panel);
    box-shadow: 0 2px 10px var(--shadow-medium);
}

.history-page .journey-stat {
    background-color: var(--hp-surface);
    box-shadow: 0 2px 5px var(--shadow-light);
}

.history-page .journey-stat:hover {
    background-color: var(--hp-hover);
    box-shadow: 0 3px 10px var(--shadow-medium);
}

.history-page .journey-stat-value {
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-variant-numeric: lining-nums tabular-nums;
}

.history-page .journey-stat-label {
    color: var(--hp-muted);
}

.history-page .verse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 15px;
    width: 100%;
    overflow-x: hidden;
}

.history-page .verse-card {
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 5px var(--shadow-light);
    cursor: pointer;
    font-family: var(--font-sans);
    font-variant-numeric: lining-nums tabular-nums;
}

.history-page .verse-card.completed {
    background-color: var(--hp-done-tint);
    border: 1px solid var(--hp-done);
    color: var(--text-primary);
}

.history-page .verse-card.not-completed {
    background-color: var(--hp-panel);
    border: 1px solid var(--hp-line-soft);
    color: var(--hp-muted);
}

.history-page .verse-card.not-required {
    background-color: var(--hp-panel);
    border: 1px dashed var(--hp-line);
    color: var(--hp-muted);
}

.history-page .verse-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px var(--shadow-medium);
}

.history-page .verse-number {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.history-page .verse-stats {
    font-size: 0.75rem;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}

.history-page .verse-not-completed,
.history-page .verse-not-required {
    font-size: 0.75rem;
}

.history-page .placeholder-message {
    text-align: center;
    padding: 20px;
    color: var(--hp-muted);
}

.history-page .journey-title {
    text-align: center;
    margin-bottom: 20px;
    font-family: var(--font-serif);
}

.history-page .journey-progress-visualization {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.history-page .progress-circle-container {
    margin: 0 auto 20px;
    width: 200px;
}

.history-page .progress-circle {
    position: relative;
    text-align: center;
}

.history-page .circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 200px;
}

.history-page .circle-bg {
    fill: none;
    stroke: var(--hp-track);
    stroke-width: 2.8;
}

.history-page .circle {
    fill: none;
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke: var(--hp-done);
    animation: hp-progress 1s ease-out forwards;
}

.history-page .percentage {
    fill: var(--text-primary);
    font-family: var(--font-sans);
    font-variant-numeric: lining-nums tabular-nums;
    font-size: 0.55em;
    text-anchor: middle;
    font-weight: bold;
}

.history-page .progress-label {
    font-size: 0.9rem;
    color: var(--hp-muted);
    margin-top: 10px;
}

@keyframes hp-progress {
    0% {
        stroke-dasharray: 0 100;
    }
}

.history-page .loading-spinner {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.history-page .loading-spinner div {
    width: 15px;
    height: 15px;
    margin: 0 5px;
    background-color: var(--hp-fill);
    border-radius: 50%;
    display: inline-block;
    animation: hp-bounce 1.5s infinite ease-in-out both;
}

.history-page .loading-spinner div:nth-child(1) {
    animation-delay: -0.30s;
}

.history-page .loading-spinner div:nth-child(2) {
    animation-delay: -0.15s;
}

@keyframes hp-bounce {
    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}

.history-page .skeleton {
    background: linear-gradient(90deg, var(--hp-panel) 25%, var(--hp-hover) 50%, var(--hp-panel) 75%);
    background-size: 200% 100%;
    animation: hp-loading 1.5s infinite;
    border-radius: 4px;
}

.history-page .skeleton-book {
    height: 70px;
    margin-bottom: 15px;
}

.history-page .skeleton-stat {
    height: 60px;
    width: 100px;
    display: inline-block;
    margin: 0 10px;
}

@keyframes hp-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.history-page .empty-state {
    text-align: center;
    padding: 30px 20px;
    color: var(--hp-muted);
}

.history-page .empty-state svg {
    margin-bottom: 15px;
}

.history-page .empty-state p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.history-page .start-verse-btn,
.history-page .start-chapter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    transition: filter 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px var(--shadow-medium);
    border: 1px solid transparent;
    cursor: pointer;
}

.history-page .start-verse-btn {
    background-color: var(--hp-solid);
    color: var(--hp-on-accent);
}

.history-page .start-chapter-btn {
    background-color: var(--hp-surface);
    color: var(--text-primary);
    border-color: var(--hp-fill);
}

.history-page .start-verse-btn:hover,
.history-page .start-chapter-btn:hover {
    filter: brightness(0.95);
    transform: translateY(-2px);
    text-decoration: none;
}

.history-page .start-verse-btn:hover {
    color: var(--hp-on-accent);
}

.history-page .start-chapter-btn:hover {
    color: var(--text-primary);
}

.history-page .chapter-action-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin: 16px 0;
    flex-wrap: wrap;
}

.history-page .page-title {
    font-family: var(--font-serif);
    text-align: center;
    margin-bottom: 10px;
    font-size: 2rem;
}

.history-page .page-subtitle {
    text-align: center;
    color: var(--hp-muted);
    margin-bottom: 25px;
    font-size: 1.1rem;
}

body.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: color-mix(in srgb, var(--bg-primary) 78%, transparent);
    z-index: 1040;
}

.history-page .btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease-in-out;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
}

.history-page .btn-secondary {
    background-color: var(--hp-panel);
    color: var(--text-primary);
    border-color: var(--hp-line);
}

.history-page .btn-secondary:hover {
    background-color: var(--hp-hover);
}

.history-page .row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.history-page .col-md-6,
.history-page .col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    box-sizing: border-box;
}

.history-page .card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: var(--hp-panel);
    background-clip: border-box;
    border-radius: 0.25rem;
}

.history-page .card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

.history-page .mt-3 {
    margin-top: 1rem;
}

.history-page.mt-4,
.history-page .mt-4 {
    margin-top: 1.5rem;
}

.history-page .mt-5 {
    margin-top: 3rem;
}

.history-page .mb-4 {
    margin-bottom: 1.5rem;
}

.history-page .d-flex {
    display: flex;
}

.history-page .justify-content-around {
    justify-content: space-around;
}

.history-page .flex-wrap {
    flex-wrap: wrap;
}

.history-page .alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    color: var(--text-primary);
}

.history-page .alert-warning {
    background-color: color-mix(in srgb, var(--warning) 14%, var(--bg-secondary));
    border-color: color-mix(in srgb, var(--warning) 45%, var(--bg-secondary));
}

.history-page .alert-warning a {
    color: var(--text-primary);
    font-weight: 600;
}

.history-page .alert-danger {
    background-color: color-mix(in srgb, var(--error) 14%, var(--bg-secondary));
    border-color: color-mix(in srgb, var(--error) 45%, var(--bg-secondary));
}

@media (min-width: 768px) {
    .history-page .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

.history-page #auth-loading {
    transition: opacity 0.3s ease;
}

.history-page #journey-content {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.history-page .scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--hp-solid);
    color: var(--hp-on-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px var(--shadow-strong);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
}

.history-page .scroll-top-btn:hover {
    transform: translateY(-5px);
}

.history-page .scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .history-page .modal-dialog {
        margin: 1rem auto;
        max-width: 95%;
        max-height: 85vh;
    }

    .history-page .modal-body {
        padding: 0.75rem;
        max-height: 65vh;
    }

    .history-page .verse-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
}

.history-page #chapter-verses-container {
    width: 100%;
    overflow-x: hidden;
}

.history-page .verse-assist-badge {
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 600;
    background: var(--hp-tint);
    color: var(--text-primary);
    border: 1px solid var(--hp-fill);
}

.history-page .chapter-stats-summary {
    padding: 10px 0;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-around;
    border-bottom: 1px solid var(--hp-line-soft);
}

.history-page .chapter-stats-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.history-page .stats-label {
    font-size: 0.85rem;
    color: var(--hp-muted);
}

.history-page .stats-value {
    font-weight: bold;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-family: var(--font-sans);
    font-variant-numeric: lining-nums tabular-nums;
}

.history-page .chapter-complete-note {
    text-align: center;
    color: var(--hp-muted);
    font-size: 0.9rem;
    margin: 0 0 8px;
}

.history-page .page-header {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
}

.history-page .bible-progress-alternatives {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.history-page .achievements-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--hp-solid);
    color: var(--hp-on-accent);
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: filter 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px var(--shadow-medium);
}

.history-page .achievements-btn:hover {
    filter: brightness(0.9);
    transform: translateY(-2px);
    color: var(--hp-on-accent);
    text-decoration: none;
}

.history-page .achievements-btn svg {
    flex-shrink: 0;
}

.history-page .view-summary-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--hp-surface);
    color: var(--text-primary);
    border: 1px solid var(--hp-fill);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-left: auto;
    margin-right: 8px;
}

.history-page .view-summary-btn:hover {
    background-color: var(--hp-tint);
}

.history-page .book-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    background-color: var(--hp-panel);
}

.history-page .book-header:hover {
    background-color: var(--hp-hover);
}

.history-page .book-header h5 {
    flex: 0 0 auto;
}

.history-page .book-stats {
    flex: 1 1 auto;
    color: var(--hp-muted);
    font-family: var(--font-sans);
    font-variant-numeric: lining-nums tabular-nums;
}

.history-page .book-stats span,
.history-page .book-stats span:hover {
    background-color: var(--hp-surface);
}

.history-page .book-progress {
    flex: 0 0 auto;
    width: 100px;
    background-color: var(--hp-track);
}

.history-page .book-progress-bar {
    background-color: var(--hp-done);
}

.history-page .collapse-indicator {
    flex: 0 0 auto;
    color: var(--hp-muted);
}

.history-page .book-card {
    background-color: var(--hp-surface);
    border: 1px solid var(--hp-line);
    box-shadow: 0 3px 10px var(--shadow-light);
}

.history-page .book-card:hover {
    box-shadow: 0 6px 15px var(--shadow-medium);
}

.history-page .book-card.completed {
    border: 2px solid var(--hp-done);
    box-shadow: 0 4px 15px var(--shadow-medium);
}

.history-page .book-card.completed::before {
    background-color: var(--hp-done-tint);
    color: var(--text-primary);
    border: 1px solid var(--hp-done);
    box-shadow: none;
    font-family: var(--font-sans);
}

.history-page .chapter-list {
    background-color: var(--hp-surface);
}

.history-page .chapter-item {
    background-color: var(--hp-panel);
    border: 1px solid var(--hp-line-soft);
    color: var(--text-primary);
}

.history-page .chapter-item:hover {
    background-color: var(--hp-hover);
    box-shadow: 0 3px 10px var(--shadow-medium);
}

.history-page .chapter-item.completed,
.history-page .chapter-item.completed:hover {
    background: var(--hp-done-tint);
    border: 2px solid var(--hp-done);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.history-page .chapter-item.completed::after {
    color: var(--hp-done);
    background: var(--hp-surface);
    box-shadow: 0 1px 3px var(--shadow-medium);
}

.history-page .chapter-item.partial {
    background: var(--hp-partial-tint);
    border: 1px solid var(--hp-partial);
}

.history-page .chapter-item.partial::after {
    color: var(--hp-partial);
    background: var(--hp-surface);
    box-shadow: 0 1px 3px var(--shadow-medium);
}

.history-page .chapter-header {
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-variant-numeric: lining-nums tabular-nums;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-page .status-indicator {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-primary);
}

.history-page .chapter-stats {
    color: var(--hp-muted);
    font-family: var(--font-sans);
    font-variant-numeric: lining-nums tabular-nums;
}

.history-page .loading-chapters {
    color: var(--hp-muted);
}

.history-page .book-search-input,
.history-page .chapter-search-input {
    border: 1px solid var(--hp-line);
    background-color: var(--bg-input);
    color: var(--text-primary);
    box-shadow: 0 2px 5px var(--shadow-light);
}

.history-page .book-search-input:focus,
.history-page .chapter-search-input:focus {
    border-color: var(--hp-fill);
    box-shadow: 0 2px 10px var(--shadow-medium);
}

.history-page .book-search-input::placeholder,
.history-page .chapter-search-input::placeholder {
    color: var(--hp-muted);
}

.history-page .search-icon {
    color: var(--hp-muted);
}

.history-page .clear-search-btn,
.history-page .clear-chapter-search-btn {
    background: var(--hp-icon-chip);
}

.history-page .clear-search-btn:hover,
.history-page .clear-chapter-search-btn:hover {
    background-color: var(--hp-icon-chip);
    filter: brightness(0.95);
}

.history-page .book-card.highlight {
    animation: hp-highlight 2s 1;
}

@keyframes hp-highlight {
    0% { box-shadow: 0 0 0 0 var(--hp-fill); }
    70% { box-shadow: 0 0 0 10px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

.hp-view-switch {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: 0 auto 20px;
    padding: 4px;
    width: fit-content;
    max-width: 100%;
    border-radius: 999px;
    border: 1px solid var(--hp-line);
    background: var(--hp-panel);
}

.hp-view-btn {
    border: 1px solid transparent;
    background: none;
    color: var(--hp-muted);
    padding: 8px 18px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
}

.hp-view-btn:hover {
    color: var(--text-primary);
}

.hp-view-btn[aria-pressed="true"] {
    background: var(--hp-tint);
    border-color: var(--hp-fill);
    color: var(--text-primary);
}

.hp-view-btn:focus-visible {
    outline: 2px solid var(--hp-fill);
    outline-offset: 2px;
}

.hp-divisions[hidden],
.hp-books[hidden] {
    display: none;
}

.hp-division-intro {
    max-width: 760px;
    margin: 0 auto 20px;
    text-align: center;
    color: var(--hp-muted);
    line-height: 1.55;
}

.hp-testament-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.hp-division-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.hp-division {
    background: var(--hp-surface);
    border: 1px solid var(--hp-line);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 3px 10px var(--shadow-light);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hp-division.is-complete {
    border: 2px solid var(--hp-done);
}

.hp-division.is-compact {
    padding: 14px 16px;
    gap: 8px;
}

.hp-division-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hp-division-head img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    background: var(--hp-icon-chip);
    border-radius: 50%;
    padding: 4px;
    box-sizing: content-box;
    flex-shrink: 0;
}

.hp-division-name {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 600;
}

.hp-division-sub {
    margin: 0;
    font-family: var(--font-sans);
    font-variant-numeric: lining-nums tabular-nums;
    font-size: 0.88rem;
    color: var(--hp-muted);
}

.hp-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--hp-track);
    overflow: hidden;
}

.hp-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--hp-fill);
}

.hp-division.is-complete .hp-bar-fill {
    background: var(--hp-done);
}

.hp-division-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--hp-muted);
}

.hp-num,
.hp-book-row-name,
.hp-division-meta,
.hp-book-row-count,
.hp-book-row-left {
    font-family: var(--font-sans);
    font-variant-numeric: lining-nums tabular-nums;
}

.hp-division-state {
    font-weight: 600;
    color: var(--text-primary);
}

.hp-continue {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--hp-solid);
    color: var(--hp-on-accent);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    transition: filter 0.2s ease;
}

.hp-continue:hover,
.hp-continue:focus-visible {
    filter: brightness(0.92);
    color: var(--hp-on-accent);
    text-decoration: none;
}

.hp-continue-ref {
    font-family: var(--font-sans);
    font-variant-numeric: lining-nums tabular-nums;
    font-weight: 500;
}

.hp-books-list {
    border-top: 1px solid var(--hp-line-soft);
    padding-top: 8px;
}

.hp-books-list summary {
    cursor: pointer;
    font-family: var(--font-sans);
    font-variant-numeric: lining-nums tabular-nums;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-primary);
}

.hp-books-list summary:focus-visible {
    outline: 2px solid var(--hp-fill);
    outline-offset: 2px;
    border-radius: 4px;
}

.hp-book-rows {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: grid;
    gap: 4px;
}

.hp-book-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: baseline;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.hp-book-row:nth-child(odd) {
    background: var(--hp-panel);
}

.hp-book-row-count {
    color: var(--hp-muted);
    font-size: 0.85rem;
}

.hp-book-row-left {
    font-size: 0.85rem;
    color: var(--text-primary);
    min-width: 5.5em;
    text-align: right;
}

.hp-book-row.is-complete .hp-book-row-left {
    font-weight: 600;
}

@media (max-width: 480px) {
    .hp-division-grid {
        grid-template-columns: 1fr;
    }

    .hp-book-row {
        grid-template-columns: 1fr auto;
    }

    .hp-book-row-count {
        grid-column: 1 / -1;
        order: 3;
    }
}

@media (prefers-reduced-motion: reduce) {
    .history-page .circle,
    .history-page .skeleton {
        animation: none;
    }
}
