@import url("https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Special+Elite&display=swap");

:root {
    --bok-bg: #7a1606;
    --bok-bg-dark: #4f0f05;
    --bok-text: #d5b27c;
    --bok-paper: #fffdf8;
    --bok-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
    --bok-paper-text: #4f0f05;
    --bok-paper-text-strong: #3a0b03;
    --bok-paper-text-soft: #7a1606;
    --bok-paper-text-muted: rgba(79, 15, 5, 0.76);
    --bok-danger: #8c1a07;
    --bok-danger-dark: #6b1305;
}

html, body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "Libre Baskerville", serif;
    background-color: var(--bok-bg);
    color: var(--bok-text);
    background-image:
        linear-gradient(to right, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0) 20%),
        linear-gradient(to left, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0) 20%);
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: var(--bok-text);
}

.btn-primary {
    color: var(--bok-text);
    background-color: var(--bok-bg-dark);
    border-color: var(--bok-bg-dark);
    box-shadow: var(--bok-shadow);
}

.btn-primary:hover {
    color: var(--bok-text);
    background-color: #8c1a07;
    border-color: #8c1a07;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    padding: 1.5rem 0 1rem;
}

.site-header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.site-brand img {
    width: min(460px, 94vw);
    display: block;
}

.signed-out-view .site-header-inner {
    gap: 1.5rem;
}

.signed-out-view .site-brand {
    display: flex;
    justify-content: center;
    width: 100%;
}

.signed-out-view .site-brand img {
    width: min(560px, 96vw);
}

.site-account {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    font-family: "Libre Baskerville", serif;
}

.site-account form {
    margin: 0;
}

.site-link {
    text-decoration: none;
}

.site-link-button {
    background: none;
    border: none;
    padding: 0;
}

.site-score {
    text-decoration: none;
    font-size: 1.2rem;
    color: var(--bok-text);
    white-space: nowrap;
}

.site-score span {
    font-size: 0.8em;
}

.site-avatar-link {
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    position: relative;
    list-style: none;
}

.site-avatar-link::-webkit-details-marker {
    display: none;
}

.site-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: block;
    object-fit: cover;
    border: 2px solid rgba(213, 178, 124, 0.8);
    box-shadow: var(--bok-shadow);
    overflow: hidden;
}

.site-avatar-fallback {
    background: rgba(79, 15, 5, 0.9);
    color: var(--bok-text);
    font-size: 1.2rem;
}

.site-avatar-alert {
    position: absolute;
    top: 0.1rem;
    right: 0.1rem;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: #c62828;
    border: 2px solid #f7f1e3;
    box-shadow: 0 0 0 1px rgba(79, 15, 5, 0.35);
}

.site-user-menu {
    position: relative;
}

.site-user-menu[open] .site-avatar {
    border-color: #cdcdcd;
}

.site-user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.75rem);
    min-width: 11rem;
    background: rgba(79, 15, 5, 0.96);
    border: 1px solid rgba(213, 178, 124, 0.55);
    box-shadow: var(--bok-shadow);
    padding: 0.35rem 0;
    z-index: 10;
}

.site-user-dropdown form {
    margin: 0;
}

.site-user-dropdown-link,
.site-user-dropdown-button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.6rem 0.9rem;
    color: var(--bok-text);
    text-decoration: none;
    background: none;
    border: none;
    font: inherit;
}

.site-user-dropdown-link:hover,
.site-user-dropdown-button:hover {
    background: rgba(213, 178, 124, 0.12);
}

.site-main {
    flex: 1;
}

.admin-page {
    margin-top: 2.75rem;
    padding-bottom: 5rem;
}

.admin-card {
    margin-top: 1.5rem;
    padding: 1.35rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 1.15rem;
    background: linear-gradient(180deg, #fffdfa 0%, #fff 100%);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
}

.admin-back-link {
    margin: 0 0 1rem;
}

.admin-back-link a,
.admin-inline-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.admin-card-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.admin-card-header p {
    margin: 0.35rem 0 0;
    color: rgba(15, 23, 42, 0.72);
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: #f3f0e8;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
}

.account-page-intro {
    margin: 0 0 1.5rem;
    color: var(--bok-paper-text);
    text-align: center;
    font-size: 1rem;
    line-height: 1.3;
}

.account-form :is(input, label) {
    color: var(--bok-paper-text);
}

.account-form-submit {
    display: block;
    width: 100%;
    padding: 1rem;
    margin-bottom: 0.5rem;
    line-height: 24px;
    text-align: center;
}

.account-form-submit-secondary {
    background-color: rgba(255, 253, 248, 0.08);
    border-color: rgba(213, 178, 124, 0.55);
    color: var(--bok-text);
}

.account-form-submit-secondary:hover {
    background-color: rgba(255, 253, 248, 0.14);
    border-color: rgba(213, 178, 124, 0.55);
    color: var(--bok-text);
}

.account-form-actions {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.account-form-actions > * {
    margin: 0;
}

.account-form-actions form {
    margin: 0;
}

.account-divider {
    margin: 1rem 0 2rem;
    border: 0;
    border-top: 1px dashed #1a1a1a;
}

.account-external-logins {
    margin-top: 0;
}

.account-support-links {
    margin-top: 1.5rem;
}

.admin-error-list {
    display: grid;
    gap: 1rem;
}

.admin-error-list-handled {
    margin-top: 1rem;
}

.admin-error-item {
    padding: 1rem 1.05rem;
    border-radius: 0.9rem;
    background: #faf8f3;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.admin-error-item-handled {
    opacity: 0.86;
}

.admin-error-item-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.admin-error-item-header h3 {
    margin: 0;
    font-size: 1rem;
}

.admin-error-item-header h3 a {
    color: inherit;
    text-decoration: none;
}

.admin-error-item-header h3 a:hover {
    text-decoration: underline;
}

.admin-error-item-header p {
    margin: 0.35rem 0 0;
    color: rgba(15, 23, 42, 0.72);
    font-size: 0.95rem;
}

.admin-error-text {
    margin: 0.9rem 0 0;
    white-space: pre-wrap;
}

.admin-error-meta {
    margin: 0.75rem 0 0;
    color: #8b5e00;
    font-size: 0.95rem;
}

.admin-error-link-row {
    margin: 0.85rem 0 0;
}

.admin-status {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.admin-status.is-open {
    background: #ffe6d5;
    color: #a54800;
}

.admin-status.is-handled {
    background: #e7f6ea;
    color: #1f6b35;
}

.admin-handled-errors {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.admin-handled-errors summary {
    cursor: pointer;
    font-weight: 600;
}

.admin-book-layout {
    display: grid;
    gap: 1.5rem;
}

.admin-book-hero {
    display: grid;
    gap: 1.25rem;
}

.admin-book-cover {
    position: relative;
    width: min(220px, 100%);
}

.admin-book-cover img {
    width: 100%;
    display: block;
    border-radius: 0.9rem;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.admin-book-cover-label {
    position: absolute;
    left: 0.7rem;
    right: 0.7rem;
    bottom: 0.7rem;
    padding: 0.45rem 0.6rem;
    border-radius: 0.7rem;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-size: 0.8rem;
    line-height: 1.35;
    font-family: Consolas, "Courier New", monospace;
    word-break: break-word;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
}

.admin-book-meta h1 {
    margin: 0;
    font-size: 1.5rem;
}

.admin-book-meta > p {
    margin: 0.4rem 0 0;
    color: rgba(15, 23, 42, 0.72);
}

.admin-book-facts {
    display: grid;
    gap: 0.75rem;
    margin: 1.15rem 0 0;
}

.admin-book-facts div {
    display: grid;
    gap: 0.2rem;
}

.admin-book-facts dt {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(15, 23, 42, 0.58);
}

.admin-book-facts dd {
    margin: 0;
}

.admin-cover-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.6rem;
}

.admin-cover-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 0.18em;
    cursor: pointer;
}

.admin-cover-button:hover,
.admin-cover-button.is-active {
    color: #6c4b1f;
}

.admin-book-fact-clickable dd {
    display: flex;
}

.admin-fact-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 0.18em;
    cursor: pointer;
}

.admin-fact-button:hover {
    color: #6c4b1f;
}

.admin-isbn-editor {
    margin-top: 1.15rem;
    padding: 1rem;
    border-radius: 0.95rem;
    background: #f8f3ea;
    border: 1px solid rgba(108, 75, 31, 0.1);
}

.admin-isbn-textarea {
    min-height: 4.8rem;
    resize: vertical;
}

.admin-field-help {
    margin: 0.45rem 0 0;
    color: rgba(15, 23, 42, 0.72);
    font-size: 0.92rem;
}

.admin-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.8rem;
}

.admin-provider-content {
    width: 100%;
    margin: 0;
    padding: 1rem;
    border-radius: 0.85rem;
    background: #f5f1e8;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.92rem;
    line-height: 1.5;
    font-family: Consolas, "Courier New", monospace;
    color: #2b2722;
    opacity: 1;
    resize: vertical;
}

.admin-provider-content:disabled {
    color: #2b2722;
    -webkit-text-fill-color: #2b2722;
    opacity: 1;
}

.admin-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-end;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.admin-action-button {
    min-width: 11rem;
    border-radius: 999px;
    font-weight: 600;
}

.btn.btn-secondary.admin-action-button {
    background: #efe6d4;
    color: #4f3411;
    border: 1px solid rgba(79, 52, 17, 0.12);
}

.admin-report-actions {
    margin-top: 0.85rem;
}

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.admin-action-panel {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 0.95rem;
    background: #f8f3ea;
    border: 1px solid rgba(108, 75, 31, 0.1);
}

.admin-search-row {
    display: grid;
    gap: 0.75rem;
}

.admin-search-results {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.admin-search-result {
    display: grid;
    gap: 0.15rem;
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.9rem;
    background: #fff;
    text-align: left;
}

.admin-search-result span,
.admin-search-result small {
    color: rgba(15, 23, 42, 0.72);
}

.admin-form-grid {
    display: grid;
    gap: 0.9rem;
}

.admin-books-list {
    display: grid;
    gap: 0.9rem;
}

.admin-book-row {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
    padding: 0.9rem;
    border-radius: 0.95rem;
    background: #faf8f3;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.admin-book-row-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    min-height: 120px;
    border-radius: 0.75rem;
    background: #efe6d4;
    overflow: hidden;
    color: rgba(15, 23, 42, 0.72);
    font-size: 0.85rem;
    text-align: center;
    text-decoration: none;
    padding: 0.5rem;
}

.admin-book-row-cover img {
    width: 100%;
    display: block;
}

.admin-book-row-body h3 {
    margin: 0;
    font-size: 1rem;
}

.admin-book-row-body h3 a {
    color: inherit;
    text-decoration: none;
}

.admin-book-row-body h3 a:hover {
    text-decoration: underline;
}

.admin-book-row-body p {
    margin: 0.35rem 0 0;
    color: rgba(15, 23, 42, 0.72);
}

.admin-book-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.admin-book-flags > span {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #f3f0e8;
    font-size: 0.85rem;
}

.admin-author-list,
.admin-cover-gallery {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.admin-author-row,
.admin-cover-gallery-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.8rem 0.95rem;
    border-radius: 0.9rem;
    background: #faf8f3;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.admin-cover-gallery-item p,
.admin-info-text {
    margin: 0.35rem 0 0;
    color: rgba(15, 23, 42, 0.72);
}

@media (min-width: 720px) {
    .admin-book-hero {
        grid-template-columns: 220px minmax(0, 1fr);
        align-items: start;
    }

    .admin-search-row {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
    }

    .admin-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.container {
    width: min(768px, calc(100vw - 2rem));
    margin: 0 auto;
}

.startpage {
    padding: 1rem 1rem 7rem;
    font-size: 1.15rem;
    line-height: 1.7;
}

.startpage h1 {
    font-family: "Special Elite", cursive;
    text-align: center;
    margin: 1.5rem 0 2rem;
}

.startpage p {
    margin-bottom: 2rem;
}

.quote {
    margin: 4rem 0 3rem;
}

.quote blockquote {
    font-family: "Special Elite", cursive;
    margin: 0;
    text-align: center;
    font-size: 1.5rem;
    line-height: 1.6;
}

.quote p {
    margin-top: 1rem;
    text-align: right;
    font-size: 0.95rem;
}

.startpage-actions {
    margin: 5rem 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-family: "Libre Baskerville", serif;
}

.startpage-auth-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin: 0.75rem 0 2.2rem;
}

.startpage-auth-links-bottom {
    margin: 2.5rem 0 0;
}

.startpage-auth-link,
.app-pill-button {
    min-width: 8.75rem;
    padding: 0.58rem 1rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-align: center;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.2;
    border: 1px solid transparent;
    box-shadow: var(--bok-shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.app-pill-button {
    appearance: none;
    cursor: pointer;
}

.app-pill-button-mini {
    min-width: 0;
    padding: 0.32rem 0.62rem;
    font-size: 0.72rem;
    line-height: 1.1;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
}

.startpage-auth-link:hover,
.app-pill-button:hover {
    transform: translateY(-1px);
}

.app-pill-button:disabled {
    opacity: 0.72;
    cursor: default;
}

.app-pill-button:disabled:hover {
    transform: none;
}

.app-pill-button-primary:focus-visible,
.app-pill-button-secondary:focus-visible,
.app-pill-button-danger:focus-visible {
    outline: 2px solid rgba(213, 178, 124, 0.7);
    outline-offset: 2px;
}

.startpage-auth-link-primary,
.app-pill-button-primary {
    background-color: var(--bok-bg-dark);
    border: 1px solid var(--bok-bg-dark);
    color: var(--bok-text);
}

.startpage-auth-link-primary:hover,
.app-pill-button-primary:hover {
    background-color: #8c1a07;
    border-color: #8c1a07;
    color: var(--bok-text);
}

.startpage-auth-link-secondary,
.app-pill-button-secondary {
    background-color: rgba(255, 253, 248, 0.08);
    border: 1px solid rgba(213, 178, 124, 0.55);
    color: var(--bok-text);
}

.startpage-auth-link-secondary:hover,
.app-pill-button-secondary:hover {
    background-color: rgba(255, 253, 248, 0.14);
    color: var(--bok-text);
}

.app-pill-button-danger {
    background-color: var(--bok-danger);
    border-color: var(--bok-danger);
    color: var(--bok-text);
}

.app-pill-button-danger:hover {
    background-color: var(--bok-danger-dark);
    border-color: var(--bok-danger-dark);
    color: var(--bok-text);
}

.reviews-slider,
.latest-shelves {
    margin: 0 0 3rem;
}

.reviews-slider {
    margin: 2.75rem 0 4rem;
}

.latest-shelves h2 {
    font-family: "Special Elite", cursive;
    margin: 0;
    font-size: 1.15rem;
    color: rgba(213, 178, 124, 0.72);
    letter-spacing: 0.03em;
    margin-bottom: 0.65rem;
}

.review-card {
    position: relative;
    color: var(--bok-text);
    padding: 1.25rem 0 1.75rem;
    animation: review-fade 420ms ease;
}

.review-card-content {
    position: relative;
    z-index: 1;
}

.review-card-body {
    position: relative;
}

.review-card-layout {
    display: grid;
    grid-template-columns: minmax(0, 132px) minmax(0, 1fr);
    grid-template-areas:
        "cover meta"
        "cover review";
    gap: 1.25rem;
    align-items: start;
}

.review-card-cover {
    grid-area: cover;
}

.review-card-cover img {
    width: 100%;
    display: block;
    border-radius: 0.25rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.review-card-review {
    grid-area: review;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.review-card-hitarea {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 50%;
    background: transparent;
    z-index: 2;
    cursor: pointer;
}

.review-card-hitarea-right {
    left: auto;
    right: 0;
}

.review-card-meta,
.review-card-footer {
    font-family: "Libre Baskerville", serif;
    font-size: 0.9rem;
}

.review-card-meta {
    grid-area: meta;
    margin-bottom: 0.9rem;
    color: rgba(213, 178, 124, 0.92);
    min-height: 1.5rem;
}

.review-card blockquote {
    margin: 0 0 1.25rem;
}

.review-card-text {
    display: block;
}

.review-card-short blockquote,
.review-card-medium blockquote {
    font-family: "Special Elite", cursive;
    text-align: center;
}

.review-card-short .review-card-text {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.45;
}

.review-card-short .review-card-text::before,
.review-card-short .review-card-text::after {
    font-family: "Special Elite", cursive;
    color: rgba(213, 178, 124, 0.78);
}

.review-card-short .review-card-text::before {
    content: open-quote;
    margin-right: 0.12em;
}

.review-card-short .review-card-text::after {
    content: close-quote;
    margin-left: 0.12em;
}

.review-card-medium .review-card-text {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    line-height: 1.6;
}

.review-card-long blockquote {
    font-family: "Libre Baskerville", serif;
    text-align: left;
}

.review-card-long .review-card-text {
    font-size: 1.05rem;
    line-height: 1.9;
}

.review-card-footer {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    color: rgba(213, 178, 124, 0.82);
    align-items: flex-end;
    font-size: 0.9rem;
    position: relative;
    z-index: 3;
    pointer-events: auto;
    margin-top: auto;
    text-align: right;
}

.review-card-date {
    display: block;
}

.review-card-footer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: baseline;
    justify-content: flex-end;
}

.review-card-user-meta,
.review-card-book-meta {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: baseline;
}

.review-card-book-meta {
    justify-content: flex-end;
}

.review-card-user-link {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(213, 178, 124, 0.4);
    text-underline-offset: 0.14em;
}

.review-card-user-link:hover {
    text-decoration-color: currentColor;
}

.review-card-book-link {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(213, 178, 124, 0.4);
    text-underline-offset: 0.14em;
}

.review-card-book-link:hover {
    text-decoration-color: currentColor;
}

.review-card-book-author {
    color: inherit;
}

.review-rating {
    display: flex;
    gap: 0.2rem;
    align-items: center;
}

.review-rating .bi {
    font-size: 1rem;
    line-height: 1;
}

@media (max-width: 575.98px) {
    .review-card {
        padding: 1rem 0 1.45rem;
    }

    .review-card-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "cover"
            "meta"
            "review";
        gap: 0.9rem;
    }

    .review-card-cover {
        width: min(8.5rem, 42vw);
        margin: 0 auto;
    }

    .review-card-meta {
        margin-bottom: 0;
        min-height: 0;
        text-align: center;
    }

    .review-rating {
        justify-content: center;
    }

    .review-card-short blockquote,
    .review-card-medium blockquote,
    .review-card-long blockquote {
        text-align: left;
    }

    .review-card-short .review-card-text {
        font-size: clamp(1.25rem, 6vw, 1.6rem);
        line-height: 1.5;
    }

    .review-card-medium .review-card-text {
        font-size: clamp(1.05rem, 4.8vw, 1.3rem);
    }

    .review-card-long .review-card-text {
        font-size: 0.98rem;
        line-height: 1.8;
    }

    .review-card-footer {
        align-items: flex-start;
        text-align: left;
        margin-top: 0;
        gap: 0.45rem;
    }

    .review-card-book-meta {
        justify-content: flex-start;
    }
}

@keyframes review-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.latest-shelf {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    background-image: url("shelf-bg.png");
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: contain;
    padding: 0 0.5rem;
    margin-bottom: 2.5rem;
}

.latest-book {
    width: 33%;
    position: relative;
    min-height: 220px;
}

.latest-book-cover {
    padding: 0 0.6rem;
    position: absolute;
    bottom: 22px;
    width: 100%;
}

.latest-book-cover img {
    width: 100%;
    display: block;
    box-shadow: 0 -4px 4px rgba(0, 0, 0, 0.3);
}

.latest-book-meta {
    display: none;
}

.site-footer {
    margin-top: 5rem;
    padding: 2rem 0 3rem;
    text-align: center;
    font-family: "Libre Baskerville", serif;
}

.site-footer p {
    margin: 0;
}

.site-footer-links {
    margin-top: 0.9rem;
}

.support-links {
    text-align: center;
}

.support-links p {
    margin: 0 0 1rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-family: monospace;
}

.support-links p:last-child {
    margin-bottom: 0;
}

.support-links a {
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.bookshelf-card-paper .support-links a,
.page-card .support-links a,
.admin-card .support-links a {
    color: inherit;
}

.content {
    padding-top: 1.1rem;
}

.profile-shelf-title {
    font-family: "Libre Baskerville", serif;
    text-align: center;
    margin: 0;
    font-size: 1.05rem;
}

.profile-shelf-title-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.profile-shelf-avatar {
    width: 4.75rem;
    height: 4.75rem;
    border-radius: 999px;
    object-fit: cover;
    display: block;
    border: 2px solid rgba(213, 178, 124, 0.35);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    background: rgba(255, 255, 255, 0.08);
}

.profile-shelf-empty p {
    margin: 0;
}

.profile-shelf-empty {
    text-align: center;
    margin: 3rem 0 5rem;
}

.profile-bookshelf {
    padding-bottom: 5rem;
    margin-top: -0.2rem;
}

.profile-shelf-action {
    text-align: center;
    margin: 1.5rem 0 2.8rem;
}

.profile-shelf-action-link {
    border: 0;
    background: transparent;
    color: inherit;
    text-decoration: none;
    font-size: 1.2rem;
    cursor: pointer;
}

.profile-shelf-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.95rem;
    margin-bottom: 1.1rem;
}

.profile-shelf-sort {
    width: 100%;
    color: var(--bok-text);
    text-align: center;
    font-weight: 500;
    font-size: 1.05rem;
    font-family: "Libre Baskerville", serif;
    display: inline-flex;
    justify-content: center;
    flex-wrap: wrap;
}

.profile-shelf-sort span {
    cursor: pointer;
    margin: 0 0.5rem;
}

.profile-shelf-follow {
    display: flex;
    justify-content: center;
}

.profile-shelf-sort span.selected {
    color: #cdcdcd;
}

.profile-shelf-row {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    background-image: url("shelf-bg.png");
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: contain;
    padding: 0 0.5rem;
    margin-bottom: 7rem;
}

.profile-book {
    width: 33%;
    position: relative;
    min-height: 320px;
    cursor: pointer;
}

.profile-book-cover {
    padding: 0 0.6rem;
    position: absolute;
    bottom: 22px;
    width: 100%;
}

.profile-book-cover img {
    width: 100%;
    display: block;
    box-shadow: 0 -4px 4px rgba(0, 0, 0, 0.3);
}

.profile-book-meta {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 0.85rem 0.45rem 0;
    text-align: center;
}

.profile-book-meta h2 {
    font-size: 0.9rem;
    line-height: 1.45;
    margin: 0 0 0.4rem;
    font-family: "Libre Baskerville", serif;
}

.profile-book-title,
.profile-book-author {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

.profile-book-title {
    -webkit-line-clamp: 2;
    line-clamp: 2;
    max-height: calc(1.45em * 2);
}

.profile-book-meta p {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    line-height: 1.5;
    color: rgba(213, 178, 124, 0.84);
}

.profile-book-author {
    -webkit-line-clamp: 2;
    line-clamp: 2;
    max-height: calc(1.5em * 2);
}

.profile-book-signals {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.15rem;
}

.profile-book-signals.has-reactions {
    justify-content: space-between;
    gap: 0.85rem;
}

.profile-book-signals.centered {
    justify-content: center;
}

.profile-book-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.85rem;
}

.profile-book-reactions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin: 0;
    color: rgba(213, 178, 124, 0.84);
}

@media (max-width: 767.98px) {
    .profile-shelf-row:first-child .profile-book {
        min-height: 272px;
    }

    .profile-shelf-title {
        width: 100%;
        text-align: center;
    }

    .profile-shelf-sort {
        width: 100%;
        text-align: center;
        font-size: 0.95rem;
    }

    .profile-shelf-sort span {
        display: inline-flex;
        align-items: center;
        margin: 0 0.35rem;
    }

    .profile-shelf-action {
        margin: 1.25rem 0 1.25rem;
    }

    .profile-bookshelf {
        margin-top: 0;
        padding-bottom: 6.5rem;
    }

    .profile-shelf-row {
        margin-bottom: 5.75rem;
    }
}

.validation-message {
    color: #ffd1d1;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "Ett fel har inträffat.";
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

@media (min-width: 768px) {
    .site-header-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .site-brand img {
        width: 320px;
    }

    .site-account {
        padding-top: 1rem;
        justify-content: flex-end;
    }

    .startpage {
        font-size: 1.25rem;
    }

    .quote blockquote {
        font-size: 1.8rem;
    }

    .review-card {
        padding: 1.5rem 0 2rem;
    }

    .latest-book {
        min-height: 340px;
    }

    .latest-book-cover {
        padding: 0 1.8rem;
        bottom: 42px;
    }

    .profile-book {
        min-height: 430px;
    }

    .profile-shelf-header {
        margin-bottom: 1rem;
    }

    .profile-book-cover {
        padding: 0 1.8rem;
        bottom: 42px;
    }

    .profile-book-meta h2 {
        font-size: 1rem;
    }

    .profile-book-meta p {
        font-size: 0.85rem;
    }
}

/* ============================================================
   Shared page-card pattern (paper look for textual pages)
   ============================================================ */

.page-card {
    margin: 2.5rem 0 5rem;
    padding: 1.75rem 1.5rem;
    background: linear-gradient(180deg, #fffdfa 0%, #fff 100%);
    border-radius: 1.15rem;
    box-shadow: var(--bok-shadow);
    color: #2b2722;
    font-family: "Libre Baskerville", serif;
}

.page-card h1 {
    font-family: "Special Elite", cursive;
    font-size: 1.6rem;
    color: #4f0f05;
    margin: 0 0 1.25rem;
}

.page-card h2 {
    font-family: "Special Elite", cursive;
    font-size: 1.2rem;
    color: #4f0f05;
    margin: 1.5rem 0 0.75rem;
}

.page-card h2:first-child {
    margin-top: 0;
}

.page-card p {
    margin-bottom: 0.75rem;
    line-height: 1.65;
}

.page-card a {
    color: #7a1606;
    text-decoration: underline;
}

.page-card a:hover {
    color: #4f0f05;
}

/* ============================================================
   Profile shelf tabs (multiple shelves)
   ============================================================ */

.profile-shelf-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 0 0 1.5rem;
}

.profile-shelf-tab {
    background: transparent;
    border: 1px solid rgba(213, 178, 124, 0.45);
    border-radius: 0.5rem;
    color: var(--bok-text);
    font-family: "Special Elite", cursive;
    font-size: 0.95rem;
    padding: 0.35rem 1rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    opacity: 0.75;
}

.profile-shelf-tab:hover {
    border-color: var(--bok-text);
    opacity: 1;
}

.profile-shelf-tab.active {
    background: rgba(213, 178, 124, 0.18);
    border-color: var(--bok-text);
    opacity: 1;
    font-weight: bold;
}

/* ============================================================
   Welcome / onboarding
   ============================================================ */

.welcome-form {
    max-width: 480px;
    margin: 3rem auto 5rem;
    padding: 2rem 1.75rem;
    background: linear-gradient(180deg, #fffdfa 0%, #fff 100%);
    border-radius: 1.15rem;
    box-shadow: var(--bok-shadow);
    color: #2b2722;
    font-family: "Libre Baskerville", serif;
}

.welcome-form h1 {
    font-family: "Special Elite", cursive;
    font-size: 1.6rem;
    color: #4f0f05;
    margin: 0 0 0.5rem;
}

.welcome-form p {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.welcome-form .form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #4f0f05;
}

.welcome-form .form-control {
    background: #fffdf8;
    border-color: rgba(122, 22, 6, 0.3);
    color: #2b2722;
    font-family: "Libre Baskerville", serif;
}

.welcome-form .form-control:focus {
    border-color: #7a1606;
    box-shadow: 0 0 0 0.2rem rgba(122, 22, 6, 0.2);
}

.welcome-form .btn-primary {
    background-color: #7a1606;
    border-color: #7a1606;
    font-family: "Special Elite", cursive;
    font-size: 1rem;
    padding: 0.5rem 1.5rem;
    margin-top: 0.5rem;
}

.welcome-form .btn-primary:hover,
.welcome-form .btn-primary:focus {
    background-color: #4f0f05;
    border-color: #4f0f05;
}

/* ============================================================
   Settings / profile edit
   ============================================================ */

.settings-page {
    /* uses .page-card for the paper container */
}

.settings-profile-view {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.settings-profile-row {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 0.5rem;
    align-items: baseline;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(122, 22, 6, 0.12);
}

.settings-profile-row:last-child {
    border-bottom: none;
}

.settings-label {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bok-paper-text-soft);
    opacity: 0.75;
}

.settings-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.settings-avatar-panel {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(122, 22, 6, 0.16);
}

.settings-avatar-preview-wrap {
    margin: 1rem 0 1.25rem;
}

.settings-avatar-preview {
    width: 7rem;
    height: 7rem;
    border-radius: 999px;
    object-fit: cover;
    display: block;
    border: 2px solid rgba(122, 22, 6, 0.18);
    box-shadow: 0 8px 20px rgba(79, 15, 5, 0.08);
    background: #fffdf8;
}

.settings-avatar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.settings-avatar-upload {
    position: relative;
    overflow: hidden;
}

.settings-avatar-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.settings-avatar-upload.disabled {
    opacity: 0.65;
}

.settings-avatar-help {
    margin: 1rem 0 0;
    font-size: 0.85rem;
    color: var(--bok-paper-text-soft);
}

.account-manage-page {
    width: 100%;
}

.account-manage-shell {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.account-manage-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
}

.account-manage-link.active {
    background-color: var(--bok-bg-dark);
    border-color: var(--bok-bg-dark);
    color: var(--bok-text);
}

.account-manage-link.active:hover {
    background-color: #8c1a07;
    border-color: #8c1a07;
    color: var(--bok-text);
}

.account-manage-body h3 {
    font-family: "Special Elite", cursive;
    font-size: 1.25rem;
    color: var(--bok-paper-text);
    margin: 0 0 1rem;
}

.account-manage-body .row {
    --bs-gutter-x: 0;
}

.account-manage-body [class^="col-"],
.account-manage-body [class*=" col-"] {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
    padding-left: 0;
    padding-right: 0;
}

.settings-page .form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--bok-paper-text);
}

.settings-page .form-control {
    background: #fffdf8;
    border-color: rgba(122, 22, 6, 0.3);
    color: var(--bok-paper-text-strong);
    font-family: "Libre Baskerville", serif;
}

.settings-page .form-control:focus {
    border-color: var(--bok-paper-text-soft);
    box-shadow: 0 0 0 0.2rem rgba(122, 22, 6, 0.2);
}

/* ============================================================
   Follow button
   ============================================================ */

.follow-button {
    min-width: 0;
}

.account-form-submit-danger {
    background-color: var(--bok-danger);
    border-color: var(--bok-danger);
    color: var(--bok-text);
}

.account-form-submit-danger:hover {
    background-color: var(--bok-danger-dark);
    border-color: var(--bok-danger-dark);
    color: var(--bok-text);
}

.account-status-page h1,
.account-status-page h2,
.account-status-page h3,
.account-status-page h4 {
    color: var(--bok-paper-text);
    font-family: "Special Elite", cursive;
}

.account-status-page p,
.account-status-page li,
.account-status-page label,
.account-status-page strong,
.account-status-page code,
.account-manage-body p,
.account-manage-body li,
.account-manage-body label,
.account-manage-body strong,
.account-manage-body td,
.account-manage-body th {
    color: var(--bok-paper-text);
}

.account-status-page .text-danger,
.account-manage-body .text-danger {
    color: var(--bok-danger) !important;
}

.account-status-page .text-info,
.account-manage-body .text-info {
    color: var(--bok-paper-text-soft) !important;
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.account-inline-action {
    margin-top: 0.75rem;
}

.account-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.account-manage-body h4 {
    color: var(--bok-paper-text-soft);
    font-family: "Special Elite", cursive;
    font-size: 1.05rem;
    margin: 1.25rem 0 0.75rem;
}

.account-authenticator-setup {
    margin: 1rem 0 0.5rem;
}

.account-authenticator-qr {
    display: inline-flex;
    padding: 0.9rem;
    background: var(--bok-paper);
    border: 1px solid rgba(122, 22, 6, 0.18);
    border-radius: 1rem;
    box-shadow: 0 8px 20px rgba(79, 15, 5, 0.08);
}

.account-authenticator-qr svg {
    display: block;
    width: min(15rem, 60vw);
    height: auto;
}

/* ============================================================
   Followers / following page
   ============================================================ */

.followers-page {
    display: grid;
    gap: 2.5rem;
}

.followers-card {
    margin-bottom: 0;
}

.followers-card.bookshelf-card:first-child {
    margin-bottom: 0;
}

.followers-card.bookshelf-card + .followers-card.bookshelf-card {
    margin-top: 0;
}

.followers-card.bookshelf-card:last-child {
    margin-bottom: 12rem;
}

.followers-card-intro {
    margin: 0 0 1.25rem;
    color: var(--bok-paper-text-muted);
    text-align: center;
    font-size: 0.95rem;
}

.followers-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.followers-list li {
    border-bottom: 1px solid rgba(122, 22, 6, 0.08);
}

.followers-list li:last-child {
    border-bottom: none;
}

.followers-user-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.75rem 0.2rem;
}

.followers-user-link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0;
    flex: 1;
    min-width: 0;
    color: var(--bok-paper-text-soft);
    text-decoration: none;
}

.followers-user-name {
    font-size: 1rem;
    font-family: "Libre Baskerville", serif;
    color: var(--bok-paper-text-soft);
}

.followers-user-meta {
    font-size: 0.8rem;
    color: var(--bok-paper-text-muted);
    font-family: monospace;
}

.followers-user-link:hover .followers-user-name {
    text-decoration: underline;
}

.followers-user-action {
    min-width: auto;
    flex-shrink: 0;
}

.confirm-modal-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(34, 10, 4, 0.56);
    z-index: 1200;
}

.confirm-modal-dialog {
    width: min(100%, 28rem);
}

.confirm-modal-content {
    background: var(--bok-paper);
    color: var(--bok-paper-text);
    border-radius: 1rem;
    padding: 1.4rem 1.25rem 1.2rem;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
}

.confirm-modal-content h2 {
    margin: 0 0 0.75rem;
    font-family: "Special Elite", cursive;
    font-size: 1.2rem;
    color: var(--bok-paper-text);
}

.confirm-modal-content p {
    margin: 0;
    color: var(--bok-paper-text-muted);
    line-height: 1.5;
}

.confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

@media (min-width: 768px) {
    .followers-card.bookshelf-card:first-child {
        margin-top: 10rem;
    }

    .followers-card.bookshelf-card + .followers-card.bookshelf-card {
        margin-top: 0;
    }

    .followers-card.bookshelf-card:last-child {
        margin-bottom: 20rem;
    }

    .followers-page {
        gap: 4rem;
    }
}

/* ============================================================
   Notifications page
   ============================================================ */

.notifications-page {
    display: block;
}

.notifications-card {
    margin-bottom: 0;
}

.notifications-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.notifications-legend {
    margin: 0 0 1rem;
    color: var(--bok-paper-text-muted);
    font-size: 0.92rem;
    text-align: center;
}

.notification {
    padding: 0.9rem 0.2rem 0.8rem;
    border-bottom: 1px solid rgba(122, 22, 6, 0.08);
    cursor: pointer;
    transition: background-color 0.14s ease, box-shadow 0.14s ease;
}

.notification:last-child {
    border-bottom: none;
}

.notification:hover {
    background: rgba(122, 22, 6, 0.04);
    border-radius: 0.5rem;
    box-shadow: 0 8px 20px rgba(79, 15, 5, 0.08);
}

.notification-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.notification-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
    font-size: 1.05rem;
    color: var(--bok-paper-text);
    font-family: "Special Elite", cursive;
}

.notification-new-icon {
    color: #7a1606;
    font-size: 0.75rem;
}

.notification-status-badge {
    flex-shrink: 0;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-family: monospace;
    font-size: 0.72rem;
    line-height: 1.1;
}

.notification-body {
    font-size: 0.9rem;
    color: var(--bok-paper-text-muted);
    margin: 0 0 0.15rem;
    font-family: "Libre Baskerville", serif;
    line-height: 1.4;
}

.notification-date {
    font-size: 0.75rem;
    color: var(--bok-paper-text-muted);
    margin: 0;
    font-family: monospace;
}

.notification-unread {
    background: rgba(122, 22, 6, 0.05);
    border-radius: 0.5rem;
}

.notification-unread .notification-status-badge {
    background: var(--bok-danger-dark);
    color: var(--bok-text);
}

.notification-unread .notification-header {
    font-weight: 700;
}

.notification-unread .notification-body {
    font-weight: 600;
    color: #2b2722;
}

.notification-read {
    opacity: 0.82;
}

.book-details-sheet-reactions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
}

.book-details-sheet-reaction-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--bok-paper-text-soft);
    font-weight: 600;
}

.book-details-sheet-like-button {
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--bok-paper-text-soft);
    text-decoration: none;
}

.book-details-sheet-like-button.summary-mode {
    gap: 0;
}

.book-details-sheet-like-button:hover,
.book-details-sheet-like-button:focus-visible,
.book-details-sheet-like-button.active {
    color: var(--bok-bg-dark);
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.book-details-sheet-reaction-error {
    margin: 0;
}

.notifications-support-links {
    margin-top: 1.5rem;
}

/* ============================================================
   Highscores page
   ============================================================ */

.highscores-page {
    display: block;
}

.highscores-card {
    margin-bottom: 0;
}

.highscores-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    font-family: "Libre Baskerville", serif;
}

.highscores-table thead tr {
    background: rgba(122, 22, 6, 0.08);
}

.highscores-table thead th {
    padding: 0.6rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7a1606;
    border-bottom: 2px solid rgba(122, 22, 6, 0.2);
    text-align: left;
}

.highscores-table thead th:last-child {
    text-align: right;
}

.highscores-row {
    border-bottom: 1px solid rgba(122, 22, 6, 0.1);
}

.highscores-row:nth-child(even) {
    background: rgba(122, 22, 6, 0.04);
}

.highscores-row:last-child {
    border-bottom: none;
}

.highscores-row-self {
    background: #7a1606 !important;
}

.highscores-row-self .highscores-nickname a,
.highscores-row-self .highscores-position,
.highscores-row-self .highscores-score {
    color: #d5b27c !important;
}

.highscores-position {
    padding: 0.7rem 0.8rem;
    color: #888;
    font-size: 0.85rem;
    width: 2.5rem;
    font-family: monospace;
}

.highscores-nickname {
    padding: 0.7rem 0.8rem;
}

.highscores-nickname a {
    color: #7a1606;
    text-decoration: none;
    font-size: 1rem;
}

.highscores-nickname a:hover {
    color: #4f0f05;
    text-decoration: underline;
}

.highscores-score {
    padding: 0.7rem 0.8rem;
    text-align: right;
    font-weight: 700;
    color: #4f0f05;
    font-size: 1rem;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .highscores-table,
    .highscores-table tbody {
        display: block;
        width: 100%;
    }

    .highscores-row {
        display: grid;
        grid-template-columns: 3.65rem minmax(0, 1fr);
        gap: 0 0.35rem;
        align-items: center;
    }

    .highscores-position,
    .highscores-nickname,
    .highscores-score {
        display: block;
    }

    .highscores-position {
        grid-row: 1 / span 2;
        width: auto;
        align-self: center;
        text-align: center;
        padding: 0.8rem 0.95rem 0.8rem 0.35rem;
    }

    .highscores-nickname {
        padding: 0.8rem 0.2rem 0.1rem 0;
        min-width: 0;
    }

    .highscores-nickname a {
        display: block;
        overflow-wrap: anywhere;
    }

    .highscores-score {
        grid-column: 2;
        text-align: left;
        white-space: normal;
        padding: 0 0.2rem 0.8rem 0;
        font-size: 0.95rem;
    }
}

/* ============================================================
   Score page
   ============================================================ */

.score-page {
    display: block;
}

.score-card {
    margin-bottom: 0;
}

.score-total {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin-bottom: 1.5rem;
}

.score-total .score-points {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--bok-paper-text-soft);
    font-family: "Special Elite", cursive;
    line-height: 1;
    text-align: center;
}

.score-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.score-entry {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.8rem 0.2rem;
    border-bottom: 1px solid rgba(122, 22, 6, 0.08);
}

.score-entry:last-child {
    border-bottom: none;
}

.score-text {
    font-size: 0.95rem;
    color: var(--bok-paper-text);
    font-family: "Libre Baskerville", serif;
}

.score-points {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--bok-paper-text-soft);
    white-space: nowrap;
    font-family: "Special Elite", cursive;
}

.score-date {
    font-size: 0.75rem;
    color: var(--bok-paper-text-muted);
    font-family: monospace;
    grid-column: 1 / -1;
    margin-top: -0.25rem;
}

/* ============================================================
   Legal / privacy page
   ============================================================ */

.legal-page {
    /* uses .page-card */
}

.legal-content {
    font-size: 0.95rem;
    line-height: 1.7;
}

.legal-content h2 {
    margin-top: 1.75rem;
}

.legal-content ul,
.legal-content ol {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-content li {
    margin-bottom: 0.35rem;
}
