/* Outfit — latin-ext subset (covers accented Western European chars) */
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('fonts/outfit-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Outfit — latin subset */
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('fonts/outfit-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Playfair Display 600 normal — latin-ext subset */
@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/playfair-display-600-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Playfair Display 600 normal — latin subset */
@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/playfair-display-600-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Playfair Display 600 italic — latin-ext subset */
@font-face {
    font-family: 'Playfair Display';
    font-style: italic;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/playfair-display-600italic-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Playfair Display 600 italic — latin subset */
@font-face {
    font-family: 'Playfair Display';
    font-style: italic;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/playfair-display-600italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* "Blue & Gray" palette — Georgetown navy ground, steel accent, seal-gold
       flourish. Opaque surfaces + hairline borders; no glass, no gradients. */
    --bg-color: #0b1626;            /* deep Georgetown navy */
    --text-main: #e8ebf0;
    --text-muted: #93a0b4;          /* Hoya gray, tuned for navy */

    --card-bg: #101f35;             /* opaque panel */
    --card-border: #223350;         /* hairline */

    --primary: #9fb7d9;             /* steel silver-blue — the single accent */
    --primary-glow: color-mix(in srgb, var(--primary), transparent 60%);
    --primary-contrast: #0b1626;    /* text color on a --primary fill */
    --primary-hover: #c3d4ea;       /* one step brighter, for hovers */
    --secondary: #7e99bd;           /* muted steel for minor accents */
    --accent: #c0a468;              /* seal gold — hairline flourish only */

    --success: #55b57e;
    --success-bg: rgba(85, 181, 126, 0.12);
    --warning: #d3a049;
    --warning-bg: rgba(211, 160, 73, 0.12);
    --danger: #d9756a;
    --danger-bg: rgba(217, 117, 106, 0.12);

    --font-sans: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--secondary), transparent 55%);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--secondary), transparent 30%);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
    line-height: 1.2;
}

/* Section headings live in card headers and render as small-caps steel labels
   (see .card-header h2). Standalone h2s in body copy stay serif at a calmer size. */
h2 {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

.hero-title {
    font-family: var(--font-serif);
    color: #f4f6f9;
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: 0;
}

/* Hero Section — quiet typographic wordmark over the page ground, closed by a
   short seal-gold rule. No banner chrome, no decoration. */
.hero {
    position: relative;
    padding: 3.5rem 1.5rem 1rem;
    text-align: center;
}

.hero-shell {
    max-width: 1000px;
    margin: 0 auto;
}

.hero-banner {
    width: 100%;
    padding: 0.5rem 1rem 2rem;
}

/* The gold rule is the one flourish on the page — keep it alone. */
.hero-content::after {
    content: '';
    display: block;
    width: 64px;
    height: 2px;
    background: var(--accent);
    margin: 1.25rem auto 0;
}

.subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 0.6rem;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* Layout Container */
.container {
    max-width: 1000px;
    width: 100%;
    min-width: 0;
    margin: 0 auto;
    padding: 0 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Card Styles — opaque navy panels with hairline borders. No blur, no lift. */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    min-width: 0;
}

.card-header {
    padding: 1rem 2.5rem;
    border-bottom: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
}

/* Card headers are the section labels: small-caps steel, not display type. */
.card-header h2 {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary);
}

.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.card-body {
    padding: 1.5rem 2.5rem;
}

.badge {
    background: transparent;
    border: 1px solid var(--card-border);
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

a.badge {
    display: inline-block;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

a.badge:hover {
    color: var(--primary-hover);
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary), transparent 92%);
}

/* Meeting Section Specifics */
.announcement {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.meeting-details {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    background: rgba(0,0,0,0.16);
    padding: 1rem 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--card-border);
}

.meeting-details + .meeting-details {
    margin-top: 0.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.meeting-location-row,
.meeting-datetime-row,
.meeting-next-book-row {
    align-items: center;
    justify-content: space-between;
}

.text-group {
    display: flex;
    flex-direction: column;
}

.text-group strong,
.calendar-links-label {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.text-group span,
.text-group > div {
    font-size: 1.25rem;
    font-weight: 500;
}

.meeting-map-btn,
.meeting-calendar-btn,
.meeting-cpl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
}

.meeting-calendar-btn {
    gap: 0.4rem;
}

.meeting-book-links,
.meeting-calendar-links {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    flex-shrink: 0;
}

.meeting-book-links .status-pill {
    text-align: center;
}

.calendar-links-label {
    text-align: center;
}

/* The buttons are hidden by JS until a book is decided; the label (and the
   container's gap) must disappear with them. */
.meeting-calendar-links:not(:has(.meeting-calendar-btn:not(.hidden))) {
    display: none;
}

/* Table Styles */
.table-container {
    margin-top: 2rem;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    width: 100%;
}

.table-container-flush {
    margin-top: 0;
}

.book-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.book-table th, .book-table td {
    padding: 1.2rem 1.5rem;
    text-align: left;
}

.book-table th {
    background: rgba(0,0,0,0.18);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    position: sticky;
    top: 0;
}

.book-table tbody tr {
    border-top: 1px solid var(--card-border);
    transition: background 0.2s ease;
}

.book-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

.archive-panel {
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.35);
    overflow: hidden;
}

.archive-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.archive-summary::-webkit-details-marker {
    display: none;
}

.archive-summary:hover {
    background: rgba(255,255,255,0.04);
}

.archive-summary-title {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 700;
    color: white;
}

.archive-summary-title::before {
    content: '▸';
    color: var(--primary);
    transition: transform 0.2s ease;
}

.archive-panel[open] .archive-summary-title::before {
    transform: rotate(90deg);
}

.archive-summary-copy {
    margin-top: 0.2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.archive-table-container {
    margin: 0;
    border: 0;
    border-top: 1px solid var(--card-border);
    border-radius: 0;
}

.center-col {
    text-align: center !important;
}

.col-rank {
    width: 2.5rem;
}

.book-cell {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.book-cover {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    background-color: rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.book-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--card-border), rgba(255,255,255,0.05));
}

.book-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.book-title {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1.1rem;
    color: white;
}

.book-author {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.book-author-static {
    margin-top: 0;
}

.number-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* Merged "N of M" library-copies badge: available count pops, total recedes. */
.copies-badge {
    color: var(--text-muted);
    white-space: nowrap;
}

.copies-badge strong {
    color: white;
    font-weight: 800;
}

/* Status chips — outlined, transparent fill, colored text. Quiet but scannable. */
.status-pill {
    display: inline-block;
    padding: 0.28rem 0.7rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid;
    background: transparent;
}

.status-high {
    color: var(--success);
    border-color: color-mix(in srgb, var(--success), transparent 60%);
}

.status-med {
    color: var(--warning);
    border-color: color-mix(in srgb, var(--warning), transparent 60%);
}

.status-low {
    color: var(--danger);
    border-color: color-mix(in srgb, var(--danger), transparent 60%);
}

.status-neutral {
    color: var(--text-muted);
    border-color: var(--card-border);
}

a.status-link {
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
}

a.status-link:hover {
    border-color: currentColor;
    background: color-mix(in srgb, currentColor, transparent 92%);
}

/* Next Book row on the homepage — mirrors a queue-table row layout. */
.next-book-row {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-top: 0.4rem;
}

.next-book-row .book-cell {
    flex: 1 1 auto;
    min-width: 0;
}

/* Stacked Links cell — Past Books table */
.links-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
}

.links-stack .status-pill {
    text-align: center;
}

.amazon-link {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent), transparent 50%);
}

.amazon-label {
    letter-spacing: 0.5px;
}

/* Amazon Associates disclosure marker — required to be clear & conspicuous next to each affiliate link. */
.amazon-ad-marker {
    margin-left: 0.35rem;
    font-size: 0.7em;
    font-weight: 600;
    letter-spacing: 0.3px;
    opacity: 0.75;
    text-transform: lowercase;
}

.link-arrow {
    font-size: 0.9em;
    margin-left: 0.3rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 1rem;
    margin-top: 3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-shell {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.affiliate-disclosure {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.footer-year {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.heart {
    color: var(--accent);
    display: inline-block;
}

/* Forms & Buttons — solid steel fill, navy text. Hover brightens one step;
   nothing moves, nothing glows. */
.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: var(--primary-contrast);
    padding: 0.7rem 1.8rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
    transition: background 0.15s ease, border-color 0.15s ease;
    border: 1px solid var(--primary);
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Action Row */
.action-row {
    text-align: center;
    margin: -0.25rem 0 0.25rem 0;
}

.action-row .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    font-size: 1.15rem;
}

.action-row .btn-primary span {
    font-size: 1.3rem;
}

.btn-submit:hover:not(:disabled) {
    background: var(--primary-hover);
}

.suggestion-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: #0d1a2e;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 1rem;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color 0.15s ease;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    flex: 1;
    padding-right: 3.2rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.35rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease;
}

.password-toggle:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
}

.eye-icon {
    width: 20px;
    height: 20px;
}

.btn-submit {
    background: var(--primary);
    color: var(--primary-contrast);
    padding: 1rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.05rem;
    border: none;
    cursor: pointer;
    margin-top: 1rem;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.honeypot-group {
    display: none;
}

.form-message {
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin-top: 0.5rem;
    opacity: 1;
    transition: opacity 0.3s ease;
    position: relative;
}

.form-message.hidden {
    display: none;
    opacity: 0;
}

.form-message-close {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.form-message-close:hover {
    opacity: 1;
}

.form-message.success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid color-mix(in srgb, var(--success), transparent 65%);
}

.form-message.error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid color-mix(in srgb, var(--danger), transparent 65%);
}

.hidden {
    display: none !important;
}

.meeting-vote-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.25rem;
}

/* Full-width explainer band above the ballot form (was a right-rail aside). */
.vote-intro {
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vote-intro h2 {
    margin-bottom: 0.6rem;
}

.vote-intro-summary {
    margin-bottom: 1.1rem;
}

.vote-ballot-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.vote-book-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 130px;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.16);
}

/* Vote Page — Expandable Blurb */
.vote-blurb-panel {
    margin-top: 0.45rem;
}

.vote-blurb-summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: color 0.2s ease;
}

.vote-blurb-summary::-webkit-details-marker {
    display: none;
}

.vote-blurb-summary::before {
    content: '▸';
    transition: transform 0.2s ease;
}

.vote-blurb-panel[open] .vote-blurb-summary::before {
    transform: rotate(90deg);
}

.vote-blurb-summary:hover {
    color: white;
}

.vote-blurb-text {
    margin-top: 0.4rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.vote-rank-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.vote-rank-group label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.vote-rank-group select {
    background: rgba(0, 0, 0, 0.26);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 0.9rem 1rem;
    color: white;
    font-family: var(--font-sans);
    font-size: 1rem;
}

.vote-rank-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary), transparent 75%);
}

.vote-side-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.85rem;
    list-style: none;
}

.vote-side-list li {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.vote-side-list strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.vote-options-group {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1rem 1.15rem 1.1rem;
    background: rgba(255, 255, 255, 0.03);
    margin: 0;
}

.vote-options-group legend {
    padding: 0 0.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.vote-options-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.vote-option-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.7rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

.vote-option-row:hover {
    background: rgba(255, 255, 255, 0.07);
}

.vote-option-label {
    color: var(--text-main);
}

.vote-option-hint {
    margin: 0.4rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* Location ranking row: name on the left, compact rank <select> on the right.
   Reuses .vote-option-row but spreads the two ends and drops the pointer cursor
   (it's not a single clickable choice like the date/time checkboxes). */
.vote-location-rank-row {
    justify-content: space-between;
    cursor: default;
}

.vote-rank-select {
    background: rgba(0, 0, 0, 0.26);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 0.5rem 0.6rem;
    color: white;
    font-family: var(--font-sans);
    font-size: 0.95rem;
}

.vote-rank-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary), transparent 75%);
}

/* Map link beside a location name — a subtle violet pill with a pin icon,
   replacing the default browser-blue anchor that was unreadable on dark. */
.vote-map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.4rem;
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary), transparent 88%);
    border: 1px solid color-mix(in srgb, var(--primary), transparent 70%);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.vote-map-link:hover {
    color: #fff;
    background: color-mix(in srgb, var(--primary), transparent 76%);
    border-color: color-mix(in srgb, var(--primary), transparent 55%);
}

.vote-map-link svg {
    width: 13px;
    height: 13px;
    stroke-width: 2.2;
}

/* Stands in for the Submit button while it is hidden (ballot incomplete), so the
   call-to-action area is never blank. Toggled inverse to #vote-submit-btn. */
.vote-submit-hint {
    margin: 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.vote-closed-box {
    padding: 1.15rem 1.25rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.vote-closed-box h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.vote-closed-box .announcement {
    margin-bottom: 0;
}

/* Join the Club Callout — same panel language as .card, distinguished by a
   seal-gold left rule instead of animated chrome. */
.join-callout {
    position: relative;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    border-left: 3px solid var(--accent);
    background: var(--card-bg);
}

.join-callout-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.75rem 2.25rem;
}

.join-callout-text {
    flex: 1;
    min-width: 0;
}

.join-callout-title {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

.join-callout-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.join-callout-btn {
    flex-shrink: 0;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    font-size: 0.95rem;
}

/* Vote Admin Page */
.admin-ballot-info {
    margin-bottom: 2rem;
}

.admin-stat-row {
    display: grid;
    /* auto-fit so each tab's card count (2–4) fills the row evenly. */
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.admin-stat-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    text-align: center;
}

.admin-stat-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.admin-stat-value {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    word-break: break-word;
}

.admin-stat-highlight {
    font-size: 2rem;
    color: var(--primary);
}

.admin-status-open {
    color: var(--success) !important;
}

.admin-status-closed {
    color: var(--text-muted) !important;
}

/* Status banner: the single "what state / what's next" indicator at the top of
   the Meeting & Ballot tab (replaces the old stat boxes). The modifier class
   colour-codes the left border + tint by state (open/decided/tbd). */
.admin-status-banner {
    margin-bottom: 1.5rem;
    padding: 1.1rem 1.35rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left-width: 4px;
    background: rgba(0, 0, 0, 0.2);
}

.admin-status-banner-main {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.admin-status-banner-icon {
    flex-shrink: 0;
    font-size: 1.3rem;
    line-height: 1;
}

.admin-status-banner-text {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
}

.admin-status-banner-detail {
    margin: 0.65rem 0 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.admin-status-banner--open {
    border-left-color: var(--success);
    background: var(--success-bg);
}

.admin-status-banner--decided {
    border-left-color: var(--primary);
    background: color-mix(in srgb, var(--primary), transparent 90%);
}

.admin-status-banner--tbd {
    border-left-color: var(--warning);
    background: var(--warning-bg);
}

.new-votes-toast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 4px solid var(--primary);
    background: color-mix(in srgb, var(--primary), transparent 85%);
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.new-votes-toast:hover {
    background: color-mix(in srgb, var(--primary), transparent 75%);
}

.admin-section-title {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-main);
}

.admin-subsection-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.admin-section-block {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1.5rem 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
}

/* Genre filter pills above the catalog list. Mirrors the admin tab pills:
   muted by default, primary when active. The "All" pill resets the filter. */
.catalog-genre-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.25rem 0 0;
}

.catalog-genre-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.catalog-genre-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.catalog-genre-pill.is-active {
    background: var(--primary);
    color: var(--primary-contrast);
    border-color: var(--primary);
}

/* Count badge inside each pill — inherits color so it stays legible on both
   the muted and active (primary) pill backgrounds. */
.catalog-genre-pill-count {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.05rem 0.4rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
}

.catalog-genre-pill.is-active .catalog-genre-pill-count {
    background: rgba(255, 255, 255, 0.25);
}

/* Filter box over the catalog list — full-width search input above the list. */
.catalog-filter-group {
    margin: 1.25rem 0;
}

.admin-section-block + .admin-section-block {
    margin-top: 0;
}

/* Primary-action card: visually promotes the status-aware ballot action
   (End This Ballot / Open the Next Ballot) above the muted review sections. */
.admin-action-card {
    background: color-mix(in srgb, var(--primary), transparent 94%);
    border: 1px solid color-mix(in srgb, var(--primary), transparent 45%);
}

/* Live "what's current" summary at the top of the Meeting & Ballot tab:
   read-only next-meeting line + compact "Now reading" current book. */
.admin-live-summary {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-live-summary-item {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.admin-live-summary-item-current {
    align-items: center;
}

.admin-live-summary-label {
    flex-shrink: 0;
    min-width: 8.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-live-summary-value {
    color: var(--text-main);
    font-weight: 600;
}

.admin-live-summary-item-current > div {
    flex: 1 1 240px;
    min-width: 0;
}

/* Compact current-book row: reuses .admin-blurb-entry for edit-panel wiring but
   drops its card chrome and two-column grid. */
/* Two-class selector so these override the later base .admin-blurb-entry rule. */
.admin-blurb-entry.admin-blurb-entry-compact {
    display: block;
    padding: 0;
    border: none;
    background: transparent;
}

.admin-blurb-entry.admin-blurb-entry-compact:hover {
    border-color: transparent;
}

.admin-current-compact {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.admin-current-cover {
    width: 36px;
    height: 54px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.admin-current-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    font-size: 1.1rem;
}

.admin-current-info {
    flex: 1 1 220px;
    min-width: 0;
}

.admin-current-title {
    font-weight: 600;
    color: var(--text-main);
}

.admin-current-author {
    color: var(--text-muted);
    font-weight: 400;
}

.admin-current-compact .admin-book-meta {
    margin-top: 0.35rem;
}

/* One-line gist on a collapsed Ballot Results summary; hidden once expanded. */
.admin-summary-gist {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.admin-section-collapsible[open] > summary .admin-summary-gist {
    display: none;
}

/* Pair the last-scraped timestamp with the Run Scraper button. */
.admin-scraper-actions {
    align-items: center;
}

.admin-scraper-status {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.admin-scraper-status span {
    color: var(--text-main);
    font-weight: 600;
}

.admin-section-collapsible > summary {
    cursor: pointer;
    list-style: none;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* The section title carries a bottom margin for normal headings; inside a flex
   summary that margin shifts the title up off-center from the gist + chevron.
   Zero it here so the title aligns vertically with the rest of the summary. */
.admin-section-collapsible > summary .admin-section-title {
    margin-bottom: 0;
}

.admin-section-collapsible > summary::-webkit-details-marker {
    display: none;
}

/* Disclosure chevron pinned to the far right of the summary bar. */
.admin-section-collapsible > summary::after {
    content: '';
    width: 0.55rem;
    height: 0.55rem;
    margin-left: auto;
    margin-right: 0.15rem;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.admin-section-collapsible[open] > summary::after {
    transform: rotate(225deg);
}

.admin-section-collapsible[open] > summary {
    margin-bottom: 1rem;
}

.admin-section-collapsible > summary > .badge {
    margin-left: auto;
}

.admin-add-disclosure {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    padding: 0.4rem 1rem;
    margin-bottom: 1.25rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.admin-add-disclosure[open] {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.18);
    border-style: solid;
    padding: 0.6rem 1rem 1rem;
}

.admin-add-disclosure > summary {
    cursor: pointer;
    list-style: none;
    padding: 0.55rem 0.25rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    user-select: none;
}

.admin-add-disclosure > summary::-webkit-details-marker {
    display: none;
}

.admin-add-disclosure > summary:hover {
    color: var(--primary);
}

.admin-add-disclosure[open] > summary {
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-note {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

#catalog-list {
    gap: 0.4rem;
}

.catalog-entry {
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.16);
    transition: border-color 0.2s ease;
    overflow: hidden;
}

.catalog-entry:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.catalog-entry-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem 0.85rem;
    padding: 0.5rem 0.85rem;
}

.catalog-row-thumb {
    width: 36px;
    height: 54px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.catalog-row-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--card-border), rgba(255, 255, 255, 0.05));
}

.catalog-row-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    flex: 1;
}

.catalog-row-title {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.catalog-row-author {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ISBN/ASIN line sits under the title on the card face. */
.catalog-row-meta {
    margin-top: 0.35rem;
}

/* Blurb / Edit / Remove live on the card face, pushed to the right. */
.catalog-row-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Neutral toggle pill, sized to line up with the Edit/Remove buttons. */
.catalog-blurb-btn {
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    padding: 0.45rem 1.1rem;
    white-space: nowrap;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.catalog-blurb-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.catalog-blurb-panel {
    padding: 0 0.85rem 0.75rem;
}

.catalog-blurb-text {
    margin-top: 0;
    margin-bottom: 0;
}

/* The edit panel is now a direct child of the card; inset it to match the row. */
.catalog-entry > .catalog-edit-panel {
    margin: 0 0.85rem 0.85rem;
}

/* Candidate Books header: title on the left, queue-count pill right-aligned. */
.ballot-candidate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

/* Native date/time picker icon is near-invisible on the dark theme; brighten it. */
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.85;
    cursor: pointer;
}

.admin-inline-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.admin-inline-actions-centered {
    justify-content: center;
}

.admin-secondary-btn {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.8rem 1.15rem;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.admin-secondary-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.admin-secondary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ballot-builder-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.ballot-builder-wide {
    grid-column: 1 / -1;
}

.ballot-candidate-builder {
    margin-top: 1.5rem;
}

.ballot-candidate-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: end;
    margin-top: 0.9rem;
}

/* Pin the builder fields to a fixed height so the ✕ square (same value) lines up
   exactly, top and bottom. Border-box, so this is the full box incl. padding. */
.ballot-candidate-row input,
.ballot-candidate-row select {
    height: 3.4rem;
}

.ballot-candidate-select-wrap {
    margin-bottom: 0;
}

/* Location builder row: stack the name + optional map URL inputs in the first
   grid column so the Remove button stays aligned to the right. */
.ballot-location-fields {
    display: grid;
    gap: 0.6rem;
    min-width: 0;
}

/* Red square ✕ that removes a date/time, location, or candidate row. Its side
   matches the pinned field height (3.4rem) and it bottom-aligns to the field, so
   it squares up exactly beside one input — not the whole section. The controller
   adds .hidden while a section is at its minimum row count. */
.ballot-row-remove {
    width: 3.4rem;
    height: 3.4rem;
    align-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 6px;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ballot-row-remove:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
}

/* "copy" button on each date/time row — same size as ✕, secondary (blue) color. */
.ballot-row-duplicate {
    width: 3.4rem;
    height: 3.4rem;
    align-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.12);
    color: var(--secondary);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: var(--font-sans);
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ballot-row-duplicate:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
}

/* Date/time rows get a third auto column for the copy button. */
.ballot-datetime-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

/* Full-width "＋ Add another …" button below each builder section's rows. */
.ballot-add-row-btn {
    display: block;
    width: 100%;
    margin-top: 0.9rem;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    border: 1px dashed rgba(255, 255, 255, 0.18);
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.ballot-add-row-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

.ballot-add-row-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* "Ballot Results" is one outer collapsible; its body holds three plain result
   sub-sections (no inner collapse), hairline-separated so the group reads as a
   single panel. */
.admin-results-subsection + .admin-results-subsection {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-empty-state {
    padding: 1rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.16);
    border: 1px dashed rgba(255, 255, 255, 0.14);
    color: var(--text-muted);
}

/* Warning banner shown when the public site has moved past the meeting but a
   stale 'current' book is still stored — see shouldShowStaleCurrentNotice. */
.admin-stale-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    background: var(--warning-bg);
    border: 1px solid var(--warning);
    color: var(--text-main);
}

.admin-stale-notice .admin-stale-notice-icon {
    flex-shrink: 0;
    line-height: 1.4;
}

.admin-stale-notice p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.admin-submissions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-submission-card {
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    transition: border-color 0.2s ease;
}

.admin-submission-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.admin-submission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.admin-submission-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.admin-submission-number {
    background: color-mix(in srgb, var(--primary), transparent 80%);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.25rem 0.65rem;
    border-radius: 8px;
}

.admin-submission-email {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1rem;
}

.admin-submission-time {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.admin-remove-btn {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
    padding: 0.45rem 1.1rem;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.admin-remove-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
}

.admin-remove-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.admin-submission-rankings {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-rank-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.admin-rank-chip strong {
    color: var(--primary);
    margin-right: 0.25rem;
}

/* Admin — Blurb Editor */
.admin-blurb-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-blurb-entry {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding: 0.8rem 1.1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.16);
    transition: border-color 0.2s ease;
}

.admin-blurb-entry:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.admin-blurb-entry.sortable-ghost {
    opacity: 0.4;
    background: color-mix(in srgb, var(--primary), transparent 90%);
    border: 1px dashed var(--primary);
}

/* Condensed Books-tab cards: smaller cover + tighter type/spacing than the
   public-site book rows that share .book-cover/.book-title/.book-author. */
.admin-blurb-entry .book-cover {
    width: 44px;
    height: 66px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.admin-blurb-entry .book-cover-placeholder {
    font-size: 1.4rem;
}

.admin-blurb-entry .book-title {
    font-size: 1rem;
}

.admin-blurb-entry .book-author {
    font-size: 0.85rem;
}

.admin-blurb-entry .admin-book-meta {
    margin-top: 0.3rem;
}

.admin-blurb-entry .admin-list-actions {
    margin-top: 0;
}

.admin-drag-handle {
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    padding-right: 0.5rem;
}

.admin-drag-handle:active {
    cursor: grabbing;
}

.admin-drag-handle svg {
    width: 20px;
    height: 20px;
}

.admin-list-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: flex-end;
}

.admin-blurb-book-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-blurb-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    justify-content: center;
}

.admin-blurb-field label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-blurb-field textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: white;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    resize: vertical;
    min-height: 70px;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.admin-blurb-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary), transparent 75%);
}

.admin-blurb-field textarea::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* Admin — Books Catalog */
.admin-toolbar-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-secondary-btn-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}

.admin-secondary-btn-success:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.22);
    border-color: rgba(16, 185, 129, 0.5);
}

.admin-add-form {
    margin-top: 2rem;
}

/* ----- Add-book catalog autocomplete ----- */
.catalog-combobox {
    position: relative;  /* anchor for the absolutely-positioned results dropdown */
}

.catalog-combobox-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 30;
    margin: 0;
    padding: 0.3rem;
    list-style: none;
    max-height: 340px;
    overflow-y: auto;
    background: #1e293b;  /* opaque so list rows never bleed through */
    border: 1px solid var(--card-border);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.catalog-combobox-option {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    cursor: pointer;
}

.catalog-combobox-option:hover,
.catalog-combobox-option.is-active {
    background: color-mix(in srgb, var(--primary), transparent 82%);
}

.catalog-combobox-option-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.catalog-combobox-option-title {
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
}

.catalog-combobox-option-author {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.catalog-combobox-option-isbn {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}


.admin-book-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.admin-book-meta .status-pill {
    padding: 0.2rem 0.65rem;
    font-size: 0.7rem;
}

.admin-book-availability strong {
    color: var(--text-main);
    font-weight: 700;
}

.admin-book-cpl-link {
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.25);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.admin-book-cpl-link:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.admin-book-asin {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.3px;
}

.admin-book-asin code {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    font-size: 0.92em;
    margin-left: 0.25rem;
}

.admin-book-asin-missing {
    color: var(--warning);
}

.admin-book-genre {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.3px;
}

.admin-book-genre code {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    font-size: 0.92em;
    margin-left: 0.25rem;
}

.admin-book-genre-missing {
    font-style: italic;
    opacity: 0.7;
}

/* Catalog mood-tag checkbox grid (admin Add + Edit forms) */
.catalog-mood-tags { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 12px; }
.catalog-mood-tag { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; cursor: pointer; }

.admin-ineligible-flag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-blurb-entry-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-remove-btn-move {
    color: var(--primary);
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary), transparent 90%);
}

.admin-remove-btn-move:hover:not(:disabled) {
    background: color-mix(in srgb, var(--primary), transparent 80%);
}

.admin-book-rank {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.9rem;
    margin-right: 0.4rem;
    letter-spacing: 0.3px;
}

/* Admin — Edit Book Inline Panel */
.admin-edit-btn {
    background: color-mix(in srgb, var(--primary), transparent 88%);
    color: var(--primary);
    border: 1px solid color-mix(in srgb, var(--primary), transparent 70%);
    padding: 0.45rem 1.1rem;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.admin-edit-btn:hover:not(:disabled) {
    background: color-mix(in srgb, var(--primary), transparent 78%);
    border-color: color-mix(in srgb, var(--primary), transparent 45%);
}

.admin-edit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.admin-edit-panel {
    grid-column: 1 / -1;
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid color-mix(in srgb, var(--primary), transparent 75%);
}

.admin-edit-panel-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.85rem;
}

.admin-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.admin-edit-grid .form-group {
    gap: 0.3rem;
}

.admin-edit-grid label {
    font-size: 0.78rem;
}

.admin-edit-grid input {
    padding: 0.7rem 0.85rem;
    font-size: 0.95rem;
}

.admin-edit-current-asin {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.admin-edit-current-asin code {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    font-size: 0.85em;
}

/* Admin — Consolidated console tabs */
.admin-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.admin-tab {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.55rem 1.1rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.admin-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.admin-tab.active {
    background: var(--primary);
    color: var(--primary-contrast);
    border-color: var(--primary);
}

.admin-tab-panel {
    /* Each panel just controls its own visibility via .hidden. */
}

/* Responsive */
@media (max-width: 768px) {
    .card-header, .card-body { padding: 1.5rem; }
    .meeting-details { flex-direction: column; gap: 1rem; }
    .meeting-location-row,
    .meeting-datetime-row { align-items: stretch; }
    .container { gap: 1.5rem; }
    .hero { padding: 2.5rem 1rem 0.5rem; }
    .hero-banner { padding: 0.5rem 1rem 1.5rem; }
    .hero-title { font-size: 2.1rem; }
    .subtitle { font-size: 1rem; letter-spacing: 1.5px; }
    footer { padding: 2.25rem 1rem; margin-top: 2rem; }
    .vote-book-card { grid-template-columns: 1fr; }
    .meeting-vote-actions { flex-direction: column; }
    .join-callout-inner {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        gap: 1rem;
    }
    .join-callout-btn {
        width: 100%;
        justify-content: center;
    }
    .admin-stat-row { grid-template-columns: 1fr; }
    .admin-submission-header { flex-direction: column; align-items: flex-start; }
    .admin-toolbar { flex-direction: column; align-items: flex-start; }
    .ballot-builder-grid { grid-template-columns: 1fr; }
    .ballot-candidate-row { grid-template-columns: 1fr; }
    .admin-blurb-entry { grid-template-columns: 1fr; }
    .admin-edit-grid { grid-template-columns: 1fr; }
    .archive-summary {
        align-items: flex-start;
        flex-direction: column;
    }
    .meeting-map-btn,
    .meeting-calendar-btn,
    .meeting-cpl-btn {
        width: 100%;
        text-align: center;
    }
    /* Recommendation result cards: tighten the vertical list for narrow screens. */
    .rec-results { gap: 0.6rem; }
    .rec-card {
        gap: 0.75rem;
        padding: 0.5rem;
    }
    .rec-card-cover {
        width: 64px;
        /* The desktop fore-edge "thickness" extends ~10px right; trim it so it
           doesn't eat into the (already narrow) details column. */
        box-shadow:
            3px 0 0 rgba(0, 0, 0, 0.18),
            0 6px 16px rgba(0, 0, 0, 0.45);
    }
    .rec-card-title { font-size: 0.9rem; }
    .rec-card-author { font-size: 0.75rem; }
    .rec-card-copies { font-size: 0.72rem; }
    /* Slim the link pills so CPL + Amazon fit side by side next to the cover. */
    .rec-card-links .status-pill {
        padding: 0.3rem 0.55rem;
        font-size: 0.68rem;
        letter-spacing: 0.3px;
    }
}

/* ---------- Confirmation modal (shared async confirm() replacement) ---------- */
.confirm-modal {
    /* Re-center: the global `* { margin: 0 }` reset cancels the UA dialog centering. */
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(90vw, 440px);
    padding: 1.75rem;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-main);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.confirm-modal::backdrop {
    background: rgba(4, 10, 20, 0.65);
}

.confirm-modal-title {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.confirm-modal-message {
    margin: 0 0 1.5rem;
    color: var(--text-muted);
    line-height: 1.5;
    white-space: pre-line; /* preserve \n\n breaks carried over from the old confirm() text */
}

.confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.confirm-modal-actions button {
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--card-border);
    transition: background 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
}

.confirm-modal-cancel {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
}

.confirm-modal-cancel:hover {
    background: rgba(255, 255, 255, 0.12);
}

.confirm-modal-confirm {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--primary-contrast);
}

.confirm-modal-confirm:hover {
    filter: brightness(1.1);
}

/* Honor the OS "reduce motion" setting (vestibular/migraine accessibility,
   WCAG 2.3.3): neutralize the decorative animations — floating hero circles,
   the join-callout shimmer, the suggest-button pump — and shorten transitions
   for users who have opted out of motion. No effect for everyone else. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ── Rec wizard modal (triggered from the homepage) ──────────────────────── */

/* "Get book recommendations" button row at the bottom of the Potential Next
   Books card body on the homepage */
.rec-public-row {
    margin: 1.5rem 0 0;
}

/* Full-viewport overlay — sits above everything, blurs the background */
.rec-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 10, 20, 0.72);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.rec-modal-overlay.hidden {
    display: none;
}

/* Bounded modal card — large, centered, mostly fills the viewport */
.rec-modal {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    width: min(95vw, 760px);
    height: min(92vh, 900px);
    overflow: hidden;
    padding: 1.25rem;
    position: relative;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
}

.rec-modal-close {
    position: absolute;
    top: 0.7rem;
    right: 0.8rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: color 0.15s;
    z-index: 1;
}

.rec-modal-close:hover {
    color: var(--text-main);
}

/* Back control — mirrors .rec-modal-close at the top-left. Shown only on question
   steps after the first (the controller omits it when there's no prior step). */
.rec-modal-back {
    position: absolute;
    top: 0.7rem;
    left: 0.8rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: color 0.15s;
    z-index: 1;
}

.rec-modal-back:hover {
    color: var(--text-main);
}

.rec-modal-heading {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-main);
}

/* Modal body: prompt pinned at top, grid fills remaining space */
.rec-modal-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Direction text centered at the top, compact */
.rec-prompt {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    text-align: center;
    margin: 0 2rem 0.6rem;
    flex-shrink: 0;
}

/* 2×2 grid — fills the full modal width and whatever vertical space is left
   after the prompt; bounded height (not a square) keeps the modal from
   overflowing the viewport while the cells span edge to edge */
.rec-grid,
.rec-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0.6rem;
    flex: 1;
    min-height: 0;
    width: 100%;
}

/* Cover tile — cover image fills the entire square, title overlaid */
.rec-tile {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    border: 2px solid var(--card-border);
    cursor: pointer;
    background: rgba(0, 0, 0, 0.3);
    padding: 0;
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s, transform 0.1s;
}

.rec-tile:hover {
    border-color: var(--primary);
}

/* Whole cover shown (not cropped), centered within the tile */
.rec-tile-cover {
    width: 100%;
    flex: 1;
    min-height: 0;
    object-fit: contain;
    display: block;
}

.rec-tile-cover.book-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, var(--card-border), rgba(255, 255, 255, 0.05));
}

/* Title overlaid at the bottom of the cover tile */
.rec-tile-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem 0.5rem 0.4rem;
    font-size: 0.78rem;
    color: #f0f0f0;
    text-align: center;
    line-height: 1.3;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
}

/* Text option buttons (genre / mood) — text centered in square */
.rec-option-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid var(--card-border);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    padding: 0.5rem;
}

.rec-option-btn:hover {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary), transparent 90%);
}

/* Result payoff block — fills the space between the top of the modal body and
   the bottom-pinned progress dots, and centers the heading + cards + CTA so the
   result no longer clings to the top with a void beneath it. */
.rec-result-main {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    /* Vertical cards can outgrow a short viewport: scroll instead of clipping.
       Centering comes from the auto margins below (not justify-content: center,
       which would clip the top of overflowing content in a scroll container). */
    overflow-y: auto;
}

.rec-result-main > .rec-modal-heading { margin-top: auto; }
.rec-result-main > .rec-again-row { margin-bottom: auto; }

.rec-empty-state {
    max-width: 460px;
    margin: 0 auto;
    text-align: center;
}

.rec-empty-message {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Result cards — vertical list: cover on the left, details on the right, so
   each rec gets full-width room for its title, copy count, and link pills. */
.rec-results {
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.rec-card {
    display: flex;
    align-items: stretch;
    text-align: left;
    gap: 1rem;
    padding: 0.75rem;
    border: 2px solid var(--card-border);
    border-radius: 8px;
}

.rec-card-cover {
    width: 84px;
    flex-shrink: 0;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 8px;
    /* Stacked offset edges on the right fake a book's page block (fore-edge),
       giving each cover a bit of "thickness"; last layer is the drop shadow. */
    box-shadow:
        2px 0 0 rgba(255, 255, 255, 0.10),
        4px 0 0 rgba(0, 0, 0, 0.18),
        6px 0 0 rgba(255, 255, 255, 0.08),
        8px 0 0 rgba(0, 0, 0, 0.22),
        10px 0 0 rgba(255, 255, 255, 0.06),
        0 6px 16px rgba(0, 0, 0, 0.45);
    display: block;
}

.rec-card-cover.book-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--card-border), rgba(255, 255, 255, 0.05));
}

/* Right-hand details column; min-width: 0 lets long titles wrap, not overflow. */
.rec-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.rec-card-title {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
    line-height: 1.3;
}

.rec-card-author {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* The club-viability line — why this book is recommendable right now. */
.rec-card-copies {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.rec-card-links {
    margin-top: auto;
    padding-top: 0.45rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rec-again-row {
    text-align: center;
}

/* FTC affiliate disclosure pinned below the result cards. Reuses .affiliate-disclosure
   sizing; centered and de-margined for the modal footer slot above the progress dots. */
.rec-disclosure {
    text-align: center;
    margin: 0;
}

/* Prominent primary CTA anchoring the bottom of the result block */
.rec-again-btn {
    background: var(--primary);
    color: var(--primary-contrast);
    border: none;
    padding: 0.85rem 1.6rem;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.rec-again-btn:hover {
    background: var(--primary-hover);
}

/* Progress dots — pinned to the bottom of the modal body. In the choice screens
   the grid (flex: 1) already fills the space; margin-top: auto pushes the dots
   down on the result screen, where content is top-aligned. */
.rec-progress {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 0.9rem;
}

.rec-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--card-border);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rec-dot-done {
    background: color-mix(in srgb, var(--primary), transparent 55%); /* --primary, dimmed */
}

.rec-dot-active {
    background: var(--primary);
    transform: scale(1.4);
}

/* Reveal build-up beat — pulsing "Finding your next reads…" before the cards */
.rec-buildup {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rec-buildup-text {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--text-main);
    animation: rec-buildup-pulse 1.2s ease-in-out infinite;
}

@keyframes rec-buildup-pulse {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 1; }
}

/* Result cards fade/slide in, staggered ~120ms apart */
.rec-results .rec-card {
    animation: rec-card-in 0.35s ease both;
}

.rec-results .rec-card:nth-child(2) { animation-delay: 0.12s; }
.rec-results .rec-card:nth-child(3) { animation-delay: 0.24s; }

@keyframes rec-card-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Site config tab — theme swatches ───────────────────────────────────── */

.siteconfig-group {
    margin-bottom: 1.75rem;
}

.siteconfig-subhead {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 0.25rem;
}

.siteconfig-swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.6rem;
    margin-top: 0.6rem;
}

.siteconfig-swatch {
    position: relative;
    height: 60px;
    border: 2px solid var(--card-border);
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    transition: border-color 0.15s, transform 0.1s;
}

.siteconfig-swatch:hover {
    border-color: var(--primary);
}

.siteconfig-swatch.selected {
    border-color: var(--text-main);
    box-shadow: 0 0 0 2px var(--primary);
}

.siteconfig-swatch-label {
    width: 100%;
    padding: 0.2rem 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #f8fafc;
    text-align: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
}

.siteconfig-accent-dot {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.siteconfig-custom-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.85rem;
}

.siteconfig-custom-row label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.siteconfig-custom-row input[type="color"] {
    width: 48px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    background: none;
    cursor: pointer;
}
