/* ========================================
   FICTIONDB MEMBER CSS
   Reusable logged-in/member book-list system
   Requires mockup.css
======================================== */

/* ========================================
   ANCHORS / PAGE SCROLL OFFSETS
======================================== */

.page-member #books,
.page-member #about,
.page-member #faq {
    scroll-margin-top: 100px;
}
.account-link {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end; 
    text-decoration: none;
    line-height: 1.1;
}

.account-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--white);
}

.account-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--white-70);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* hover behavior */
.account-link:hover .account-name {
    text-decoration: underline;
}
/* ========================================
   MEMBER HERO CONTENT
======================================== */

.hero-copy--member {
    max-width: 520px;
    min-width: 0;
}

.hero-copy--member > * + * {
    margin-top: 8px;
}

.hero-copy--member h1 {
    margin: 0;
    line-height: 1.15;
}

.hero-byline--member {
    margin-top: 4px;
    font-size: 0.95rem;
    line-height: 1.35;
    color: var(--white-82);
}

.hero-actions--member {
    margin-top: 8px;
}

.hero-utility--member {
    margin-top: 10px;
}

@media (max-width: 480px) {
    .hero-copy--member > * + * {
        margin-top: 6px;
    }
}

/* ========================================
   MEMBER LAYOUT PRIMITIVES
======================================== */

.member-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: var(--s-8);
    margin-bottom: var(--section-gap);
}

.member-section > *:first-child {
    margin-top: 0;
}

.member-section > *:last-child {
    margin-bottom: 0;
}

.member-section-title {
    margin: 0 0 var(--s-5);
    font-size: 1.02rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}

.member-section-intro {
    margin: 0 0 var(--s-5);
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--muted);
}

.member-card {
    background: var(--accent-02);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: var(--s-6);
}

.member-card > *:first-child {
    margin-top: 0;
}

.member-card > *:last-child {
    margin-bottom: 0;
}

.member-card-title {
    margin: 0 0 var(--s-3);
    font-size: 0.94rem;
    line-height: 1.3;
    font-weight: 700;
    color: var(--text);
}

.member-card-copy {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--muted);
}

.member-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-4);
}

.member-actions--compact {
    gap: var(--s-3);
}

.member-sidebar-stack {
    display: grid;
    gap: var(--section-gap);
}

/* ========================================
   MEMBER META / REFERENCE ROWS
======================================== */

.member-meta-list {
    display: grid;
    gap: var(--s-5);
}

.member-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--s-4);
}

.member-meta-label {
    min-width: 0;
    font-size: 0.78rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--muted);
}

.member-meta-value {
    min-width: 0;
    text-align: right;
    font-size: 0.92rem;
    line-height: 1.35;
    font-weight: 600;
    color: var(--text);
}

.member-meta-value a {
    color: inherit;
    text-decoration: none;
}

.member-meta-value a:hover {
    text-decoration: underline;
}

.member-meta-list--stacked .member-meta-row {
    display: grid;
    gap: 2px;
}

.member-meta-list--stacked .member-meta-value {
    text-align: left;
}

.member-ref-list {
    display: grid;
    gap: var(--s-3);
}

.member-ref-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--s-4);
    padding: var(--s-3) 0;
    border-top: 1px solid var(--black-05);
}

.member-ref-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.member-ref-row:last-child {
    padding-bottom: 0;
}

.member-ref-name {
    min-width: 0;
    font-size: 0.92rem;
    line-height: 1.35;
    font-weight: 600;
    color: var(--text);
}

.member-ref-meta {
    flex: 0 0 auto;
    font-size: 0.8rem;
    line-height: 1.3;
    color: var(--muted);
    text-align: right;
}

/* ========================================
   MEMBER UTILITY LINK / BANNER
======================================== */

.member-utility-link {
    display: block;
    max-width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    background: #daecf0;
    border: 1px solid rgba(var(--accent-rgb), 0.14);
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.member-utility-link:hover {
    background: #daecf0;
    border-color: rgba(var(--accent-rgb), 0.20);
    text-decoration: none;
}

.member-utility-link:visited {
    color: var(--text);
}

.member-utility-label {
    display: block;
    margin-bottom: 2px;
    font-size: 0.7rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
}

.member-utility-title {
    display: block;
    font-size: 0.95rem;
    line-height: 1.3;
    font-weight: 600;
    color: var(--text);
}

.member-utility-meta {
    display: block;
    margin-top: 2px;
    font-size: 0.78rem;
    line-height: 1.25;
    color: var(--muted);
}

.member-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    padding: var(--s-5) var(--s-6);
    background: linear-gradient(
        180deg,
        rgba(46, 104, 116, 0.04) 0%,
        rgba(46, 104, 116, 0.08) 100%
    );
    border: 1px solid rgba(46, 104, 116, 0.10);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    color: var(--text);
}

.member-banner-copy {
    min-width: 0;
}

.member-banner-title {
    margin: 0 0 var(--s-1);
    font-size: 0.95rem;
    line-height: 1.35;
    font-weight: 700;
    color: var(--text);
}

.member-banner-text {
    margin: 0;
    font-size: 0.83rem;
    line-height: 1.5;
    color: var(--muted);
}

.member-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3);
}

@media (min-width: 768px) {
    .member-utility-link {
        display: inline-block;
    }

    .member-banner {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }
}

/* ========================================
   MEMBER BUTTON PRIMITIVES
======================================== */

.member-mini-btn,
.toolbar-btn,
.member-chip-btn,
.organize-btn,
.star,
.book-icon-btn {
    -webkit-tap-highlight-color: var(--tap-highlight);
}

.member-mini-btn {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    border-radius: 999px;
    min-height: 38px;
    padding: 0 var(--s-5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        border-color 0.18s ease,
        background-color 0.18s ease,
        color 0.18s ease;
}

.member-mini-btn:hover {
    border-color: var(--accent-22);
    color: var(--accent);
    background: var(--accent-04);
}

.member-mini-btn--primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

.member-mini-btn--primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--white);
}

.member-chip-btn,
.toolbar-btn {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--muted);
    min-height: 38px;
    padding: 0 var(--s-5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    transition:
        border-color 0.18s ease,
        background-color 0.18s ease,
        color 0.18s ease;
}

.member-chip-btn {
    border-radius: 999px;
    gap: 4px;
}

.toolbar-btn {
    border-radius: 10px;
    min-height: 42px;
}

.member-chip-btn:hover,
.toolbar-btn:hover {
    border-color: var(--accent-22);
    color: var(--accent);
    background: var(--accent-04);
}

.member-chip-btn.is-active {
    background: var(--accent-08);
    border-color: var(--accent-22);
    color: var(--accent);
}

.toolbar-btn--primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

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

.member-control-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 var(--s-4);
    border-radius: var(--radius-sm);
    border: 1px solid var(--black-10);
    background: var(--white);
    color: var(--text);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.member-control-btn:hover {
    background: var(--black-02);
}

.member-control-btn[aria-expanded="true"] {
    background: var(--accent-08);
    border-color: var(--accent);
    color: var(--accent);
}

/* ========================================
   RATING
======================================== */

.member-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 0;
    white-space: nowrap;
}

.member-rating .star {
    position: relative;
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0 -2px 0 0;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 120ms ease;
    color: var(--rating-empty);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
}

.member-rating .star:last-child {
    margin-right: 0;
}

.member-rating .star.is-filled {
    color: var(--rating-gold);
}

.member-rating--user .star.is-filled {
    color: var(--rating-user);
}

.member-rating .star.is-half {
    position: relative;
    color: var(--rating-empty);
}

.member-rating .star.is-half::before {
    content: "★";
    position: absolute;
    inset: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--rating-gold);
    line-height: 1;
    pointer-events: none;
    clip-path: inset(0 50% 0 0);
}

.member-rating:hover .star {
    color: var(--rating-empty);
}

.member-rating:hover .star.is-half::before {
    color: var(--rating-empty);
}

.member-rating .star:hover,
.member-rating .star:hover ~ .star {
    color: var(--rating-user);
}

/* ========================================
   MEMBER LEGEND / HELP
======================================== */
.book-list-header {
    display: grid;
    gap: var(--s-4);
    margin-bottom: var(--s-6);
}

.book-list-legend--member {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-4) var(--s-6);
    margin-top: var(--s-5);
    padding: 0 var(--tight-gap);
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--muted);
}

.member-sidebar-list-summary {
    display: grid;
    gap: var(--s-3);
}

.member-sidebar-list-row {
    display: flex;
    justify-content: space-between;
    gap: var(--s-4);
    padding-top: var(--s-3);
    border-top: 1px solid var(--black-05);
    font-size: 0.9rem;
}

.member-sidebar-list-row:first-child {
    border-top: none;
    padding-top: 0;
}

.book-list-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    flex-wrap: wrap;
}

.book-list-title-row h2 {
    margin: 0;
}

.book-list-help-trigger {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.book-list-help-trigger:hover {
    color: var(--accent);
}

.book-list-help-trigger-icon {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-08);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    flex: 0 0 auto;
}

.book-list-help {
    margin-top: var(--s-3);
}

.book-list-help-inner {
    display: grid;
    gap: var(--s-2);
    padding: var(--s-5) var(--s-6);
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.5;
    box-shadow: var(--shadow);
}

/* ========================================
   BOOK INFO MODAL
======================================== */

.book-info-modal[hidden] {
    display: none;
}

.book-info-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
}

.book-info-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.68);
}

.book-info-dialog {
    position: relative;
    z-index: 1;
    width: min(92vw, 640px);
    max-height: 88vh;
    margin: 6vh auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-strong);
    overflow: hidden;
}

.book-info-header,
.book-info-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-5);
    padding: var(--s-6) var(--s-8);
    border-bottom: 1px solid var(--border);
}

.book-info-header h2 {
    margin: 0;
    font-size: 1.05rem;
}

.book-info-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    color: var(--text);
    font-size: 1.35rem;
    cursor: pointer;
}

.book-info-body {
    padding: var(--s-8);
    overflow: auto;
    max-height: calc(88vh - 130px);
}

.book-info-cover img {
    width: 92px;
    border-radius: var(--cover-radius);
    box-shadow: var(--shadow);
}

.book-info-content h3 {
    margin: 0 0 var(--s-4);
    font-size: 1.15rem;
    line-height: 1.25;
}

.book-info-content p {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text);
}

.book-info-content p + p {
    margin-top: var(--s-4);
}

.book-info-content a {
    color: var(--accent);
    font-weight: 600;
}

.book-info-series,
.book-info-awards {
    margin-top: var(--s-6);
    padding-top: var(--s-5);
    border-top: 1px solid var(--border);
}

.book-info-awards ul {
    margin: var(--s-3) 0 0;
    padding-left: 1.1rem;
    display: grid;
    gap: var(--s-3);
}

.book-info-awards li {
    font-size: 0.88rem;
    line-height: 1.45;
}

.book-info-footer {
    border-top: 1px solid var(--border);
    border-bottom: 0;
}

.book-info-btn,
.book-info-link {
    min-height: 38px;
    padding: 0 var(--s-5);
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
}

.book-info-btn {
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    cursor: pointer;
}

.book-info-link {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    color: var(--white);
    text-decoration: none;
}

.book-info-link:hover {
    background: var(--accent-hover);
    text-decoration: none;
}

@media (min-width: 640px) {

    .book-info-cover img {
        width: 112px;
    }
}
.book-info-loaded {
    display: grid;
    gap: var(--s-6);
}

@media (min-width: 640px) {
    .book-info-loaded {
        grid-template-columns: 112px minmax(0, 1fr);
        align-items: start;
    }
}
/* ========================================
   BOOK INFO MODAL CONTENT
======================================== */

/* AJAX-loaded content controls the layout */
.book-info-loaded {
    display: grid;
    gap: var(--s-6);
    width: 100%;
}

@media (min-width: 640px) {
    .book-info-loaded {
        grid-template-columns: 96px minmax(0, 1fr);
        align-items: start;
    }
}

.book-info-cover img {
    width: 96px;
    border-radius: var(--cover-radius);
    box-shadow: var(--shadow);
}

.book-info-content {
    min-width: 0;
}

.book-info-content h3 {
    margin: 0 0 var(--s-3);
    font-size: 1.15rem;
    line-height: 1.25;
    font-weight: 700;
    color: var(--text);
}

.book-info-content p {
    margin: 0;
    max-width: 56ch;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text);
}

/* More link */
.book-info-content a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.book-info-content a:hover {
    text-decoration: underline;
}

/* Section label (SERIES, AWARDS, etc) */
.meta-label {
    display: block;
    margin-bottom: var(--s-2);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

/* Series block */
.book-info-series {
    margin-top: var(--s-6);
    padding-top: var(--s-5);
    border-top: 1px solid var(--border);
}

.book-info-series a {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Awards */
.book-info-awards {
    margin-top: var(--s-6);
    padding-top: var(--s-5);
    border-top: 1px solid var(--border);
}

.book-info-awards ul {
    margin: var(--s-3) 0 0;
    padding-left: 1rem;
    display: grid;
    gap: var(--s-3);
}

.book-info-awards li {
    font-size: 0.85rem;
    line-height: 1.45;
}

/* ========================================
   MEMBER MODALS
======================================== */

.member-action-modal[hidden],
.member-edit-modal[hidden],
.book-info-modal[hidden] {
    display: none;
}

.member-action-modal,
.member-edit-modal,
.book-info-modal {
    position: fixed;
    inset: 0;
    z-index: 2100;
}

.member-edit-modal {
    z-index: 2200;
}

.member-action-backdrop,
.member-edit-backdrop,
.book-info-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(2px);
}

.member-edit-backdrop {
    background: rgba(15, 23, 42, 0.62);
}

.member-action-dialog,
.book-info-dialog,
.member-edit-dialog {
    position: relative;
    z-index: 1;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-strong);
    overflow: hidden;
}

.member-action-dialog {
    width: min(92vw, 380px);
    margin: 12vh auto;
}

.book-info-dialog {
    width: min(92vw, 560px);
    margin: 10vh auto;
}

.member-edit-dialog {
    width: min(94vw, 760px);
    max-height: 90vh;
    margin: 5vh auto;
}

.member-action-header,
.book-info-header,
.member-edit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-5);
    padding: var(--s-6) var(--s-7);
    border-bottom: 1px solid var(--border);
}

.member-edit-header {
    align-items: flex-start;
    gap: var(--s-6);
    padding: var(--s-7) var(--s-8);
}

.member-action-header h2,
.book-info-header h2,
.member-edit-header h2 {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.25;
    color: var(--text);
}

.member-edit-header h2 {
    font-size: 1.25rem;
    line-height: 1.2;
}

.member-edit-header p {
    margin: var(--s-2) 0 0;
    font-size: 0.9rem;
    line-height: 1.35;
    color: var(--muted);
}

.member-action-close,
.book-info-close,
.member-edit-close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    color: var(--muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.member-edit-close {
    width: 36px;
    height: 36px;
    font-size: 1.35rem;
}

.member-action-close:hover,
.book-info-close:hover,
.member-edit-close:hover {
    color: var(--text);
}

.member-status-options,
.book-info-body {
    display: grid;
    gap: var(--s-3);
    padding: var(--s-6) var(--s-7);
}

.member-status-options label {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    min-height: 30px;
    font-size: 0.95rem;
    color: var(--text);
    cursor: pointer;
}

.member-status-options input {
    accent-color: var(--accent);
}

.member-action-footer,
.book-info-footer,
.member-edit-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--s-4);
    padding: var(--s-5) var(--s-7);
    border-top: 1px solid var(--border);
    background: var(--surface-subtle);
}

.member-status-message,
.member-edit-message {
    margin-right: auto;
    min-height: 1.2em;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
}

.member-edit-message {
    font-size: 0.84rem;
    font-weight: 700;
}

.member-status-message.is-success,
.member-edit-message.is-success {
    color: var(--accent);
}

.member-status-message.is-error,
.member-edit-message.is-error {
    color: #9f2f3f;
}

.member-action-btn,
.book-info-btn {
    min-height: 38px;
    padding: 0 var(--s-5);
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.member-action-btn--danger {
    border-color: #b94a5a;
    background: #b94a5a;
    color: var(--white);
}

.member-action-btn--danger:hover {
    background: #9f2f3f;
    border-color: #9f2f3f;
}

.member-edit-body {
    max-height: calc(90vh - 150px);
    overflow: auto;
    padding: var(--s-8);
    display: grid;
    gap: var(--s-8);
}

.member-edit-section {
    display: grid;
    gap: var(--s-5);
}

.member-edit-section + .member-edit-section {
    padding-top: var(--s-7);
    border-top: 1px solid var(--border);
}

.member-edit-section h3 {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
}

.member-edit-grid {
    display: grid;
    gap: var(--s-5);
}

.member-edit-field {
    display: grid;
    gap: var(--s-2);
    min-width: 0;
}

.member-edit-field label,
.member-edit-label-row label {
    font-size: 0.86rem;
    line-height: 1.3;
    font-weight: 700;
    color: var(--text);
}

.member-edit-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s-5);
}

.member-edit-label-row span {
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--muted);
    text-align: right;
}

.member-edit-field input,
.member-edit-field select,
.member-edit-field textarea,
.member-date-grid select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    color: var(--text);
    font: inherit;
    font-size: 0.92rem;
}

.member-edit-field input,
.member-edit-field select,
.member-date-grid select {
    min-height: 40px;
    padding: 0 var(--s-5);
}

.member-edit-field textarea {
    min-height: 96px;
    padding: var(--s-4) var(--s-5);
    resize: vertical;
    line-height: 1.55;
}

.member-edit-field input:focus,
.member-edit-field select:focus,
.member-edit-field textarea:focus,
.member-date-grid select:focus {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.member-date-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s-3);
}

.member-edit-actions {
    display: flex;
    gap: var(--s-3);
    margin-left: auto;
}

.member-edit-btn {
    min-height: 40px;
    padding: 0 var(--s-5);
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
}

.member-edit-btn--primary {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: var(--white);
}

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

.member-edit-btn--secondary {
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
}

.member-date-quick {
    display: flex;
    gap: var(--s-3);
    margin-top: var(--s-2);
}

.member-date-quick-btn {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.member-date-quick-btn:hover {
    text-decoration: underline;
}

.book-info-loading,
.book-info-error,
.member-edit-loading,
.member-edit-error {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--muted);
}

.member-edit-error,
.book-info-error {
    color: #9f2f3f;
}

@media (min-width: 700px) {
    .member-edit-grid {
        grid-template-columns: 1.2fr 0.8fr;
    }

    .member-edit-field--wide {
        grid-column: 1 / -1;
    }

    .member-edit-field--date,
    .member-edit-field--rating {
        align-self: start;
    }
}

@media (max-width: 560px) {
    .member-edit-dialog {
        width: min(96vw, 760px);
        margin: 3vh auto;
        max-height: 94vh;
    }

    .member-edit-body {
        max-height: calc(94vh - 160px);
        padding: var(--s-6);
    }

    .member-edit-header,
    .member-edit-footer {
        padding-left: var(--s-6);
        padding-right: var(--s-6);
    }

    .member-edit-label-row {
        display: grid;
        gap: var(--s-1);
    }

    .member-edit-label-row span {
        text-align: left;
    }

    .member-edit-footer {
        display: grid;
    }

    .member-edit-actions {
        width: 100%;
        margin-left: 0;
        display: grid;
        grid-template-columns: 1fr;
    }

    .member-edit-btn {
        width: 100%;
    }
}

/* ========================================
   MEMBER BOOK LIST MODULE
   Filter + sort + view switching
======================================== */

.list-module--member {
    display: grid;
    gap: var(--s-5);
}

.list-header--member {
    display: grid;
    gap: var(--s-2);
    margin-bottom: var(--s-6);
}

.list-headline--member h2 {
    margin-bottom: var(--s-2);
}

.list-headline--member h2 span,
.list-title-row--member h2 span {
    color: var(--accent);
}

.list-intro--member {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--muted);
    padding: 0 var(--tight-gap);
}

.list-toolbar--member {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    flex-wrap: wrap;
    margin-bottom: var(--s-4);
}

.list-count--member {
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 700;
    color: var(--text);
}

.list-count--member span {
    color: var(--accent);
}

.list-controls {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    flex-wrap: wrap;
    margin-left: auto;
}

.view-switch {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    box-shadow: var(--shadow);
}

.view-switch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        background-color 0.18s ease,
        color 0.18s ease,
        transform 0.08s ease;
}

.view-switch-btn:hover,
.view-switch-btn.is-active {
    background: var(--accent-08);
    color: var(--accent);
}

.view-switch-btn:active {
    transform: scale(0.98);
}

.view-switch-btn svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.view-switch-label {
    display: inline;
    line-height: 1;
}

.sort-menu {
    position: relative;
}

.sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    color: var(--text);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition:
        border-color 0.18s ease,
        background-color 0.18s ease,
        color 0.18s ease;
}

.sort-btn:hover {
    border-color: var(--accent-22);
    background: var(--accent-04);
    color: var(--accent);
}

.sort-btn svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.sort-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    min-width: 190px;
    display: none;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    box-shadow: var(--shadow);
}

.sort-menu-dropdown.is-open {
    display: grid;
    gap: 2px;
}

.sort-menu-item {
    width: 100%;
    min-height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

.sort-menu-item:hover,
.sort-menu-item.is-active {
    background: var(--accent-08);
    color: var(--accent);
}

.filter-panel--member {
    margin: 0 0 var(--s-5);
    margin-top: 0;
    margin-bottom: var(--s-6);
    padding: var(--s-5);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-subtle);
    box-shadow: none;
}

.filter-fields--member {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--s-4);
}

.filter-field--member {
    display: grid;
    gap: var(--s-2);
}

.filter-field--member label {
    font-size: 0.76rem;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.filter-field--member select {
    width: 100%;
    min-height: 38px;
    padding: 0 var(--s-5);
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card);
    color: var(--text);
    font: inherit;
    font-size: 0.86rem;
}

.filter-field--member select:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.filter-footer--member {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--s-4);
    margin-top: var(--s-3);
    padding-top: 0;
    border-top: 0;
}

.filter-clear--member {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-size: 0.78rem;
    line-height: 1.2;
    font-weight: 700;
    padding: 0;
    cursor: pointer;
}

.filter-clear--member:hover {
    text-decoration: underline;
}

.filter-count--member {
    font-size: 0.78rem;
    line-height: 1.2;
    color: var(--muted);
    white-space: nowrap;
}

.filter-count--member strong {
    color: var(--text);
}

.disclosure-toggle--member {
    display: none;
}

.disclosure-icon--member {
    color: var(--muted);
    transition: transform 0.18s ease;
}

.disclosure--member.is-open .disclosure-icon--member,
.filter-panel--member.is-open .disclosure-icon--member {
    transform: rotate(180deg);
}

.disclosure-body--member > h2,
.disclosure-body--member > .library-panel-intro {
    display: none;
}

.view-panel {
    display: none;
    margin-top: 0;
}

.view-panel.is-active {
    display: block;
}

.js-book-item-member.is-filter-hidden {
    display: none !important;
}

@media (max-width: 767px) {
    .list-toolbar--member {
        flex-direction: column;
        align-items: stretch;
        gap: var(--s-3);
        margin-bottom: var(--s-4);
    }

    .list-count--member {
        width: 100%;
        font-size: 0.86rem;
    }

    .list-controls {
        width: 100%;
        display: flex;
        justify-content: space-between;
        gap: var(--s-3);
        margin-left: 0;
    }
    .view-switch {
        flex: 1 1 auto;
    }

    .view-switch-btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .sort-menu {
        flex: 0 0 auto;
    }

    .sort-btn {
        min-height: 44px;
    }

    .filter-panel--member {
        margin-bottom: var(--s-5);
    }    
}

/* ========================================
   MEMBER HYBRID VIEW
======================================== */

.list-hybrid--members {
    display: grid;
    gap: var(--s-5);
}

.member-book {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: var(--s-5);
    padding: var(--s-5);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    transition: background-color 0.15s ease;
}

.member-book:hover {
    background: var(--accent-04);
}

.member-book:active {
    background: var(--card);
    transform: none;
}

.member-book-cover img {
    display: block;
    width: 64px;
    border-radius: var(--cover-radius);
    box-shadow: var(--cover-shadow);
}

.member-book-body {
    min-width: 0;
    display: grid;
    gap: var(--s-3);
}

.member-book-title {
    display: inline-block;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 700;
    text-decoration: none;
}

.member-book-title:hover {
    text-decoration: underline;
}

.member-book-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2) var(--s-4);
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--muted);
}

.member-book-author {
    color: inherit;
    text-decoration: none;
}

.member-book-author:hover {
    text-decoration: underline;
}

.member-book-sep {
    color: var(--text-subtle);
}

.member-book-genre,
.member-book-date {
    white-space: nowrap;
}

.member-book-desc {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--muted);
    max-width: 62ch;
}

.member-book-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    flex-wrap: wrap;
    padding-top: var(--s-2);
}

.member-book-organize {
    min-width: 0;
}

.member-book-organize .organize-rail {
    flex-wrap: wrap;
    row-gap: var(--s-3);
}

/* ========================================
   MEMBER COVER VIEW
======================================== */

.list-covers--member {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-6) var(--s-5);
}

.book-card--member {
    display: grid;
    align-content: start;
    justify-items: center;
    text-align: center;
    gap: var(--s-3);
    min-width: 0;
}

.book-card-cover--member {
    width: 100%;
    min-height: 212px;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper);
    border: 1px solid var(--black-05);
    border-radius: var(--cover-radius);
}

.book-card-cover--member img {
    display: block;
    height: 200px;
    width: auto;
    max-width: 100%;
    border-radius: 6px;
    box-shadow: var(--cover-shadow);
}

.book-card-body--member {
    width: 100%;
    display: grid;
    justify-items: center;
    gap: 2px;
    min-width: 0;
}

.book-card-title--member {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 18ch;
    min-height: calc(1.3em * 2);
    color: var(--text);
    font-size: 0.88rem;
    line-height: 1.3;
    font-weight: 700;
    text-decoration: none;
}

.book-card-title--member:hover {
    text-decoration: underline;
}

.book-card-author--member,
.book-card-date--member,
.book-card-meta--member {
    max-width: 20ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--muted);
}

.book-card-rating--member {
    padding-top: 4px;
}

.book-card-organize--member {
    padding-top: var(--s-2);
}

.book-card-organize--member .organize-rail {
    justify-content: center;
    flex-wrap: wrap;
    row-gap: var(--s-2);
    padding: 0;
    background: transparent;
}

.organize-rail--compact {
    --segment-gap: 4px;
}

/* ========================================
   MEMBER RESPONSIVE TABLE / LISTS
======================================== */

@media (min-width: 768px) {
    .list-header--member {
        gap: var(--s-6);
    }

    .toolbar--member {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .book-main {
        align-items: center;
    }

    .list-covers--member {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: var(--s-8) var(--s-6);
    }

    .book-card-cover--member {
        min-height: 214px;
    }

    .book-card-title--member {
        max-width: 20ch;
    }
}

@media (min-width: 992px) {
    .member-list--covers {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .filter-fields--member {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .book-mobile-meta {
        display: flex;
    }

    .book-title {
        font-size: 1.02rem;
        line-height: 1.35;
        font-weight: 650;
    }

    .book-main {
        gap: 6px;
        width: 100%;
    }

    .book-flags {
        gap: 4px;
    }

    .member-rating {
        display: inline-flex;
        align-items: center;
        gap: 2px;
        white-space: nowrap;
        flex-shrink: 1;
    }

    .member-rating .star {
        width: 22px;
        height: 22px;
        font-size: 20px;
        margin-right: 0;
    }

    .organize-rail {
        display: inline-flex;
        max-width: 100%;
        flex-wrap: nowrap;
        padding: 0;
        gap: 5px;
        background: transparent;
        border-radius: 0;
    }

    .organize-group {
        gap: 4px;
    }

    .organize-group--lists {
        gap: 5px;
    }

    .organize-btn {
        width: 24px;
        height: 24px;
        font-size: 18px;
        font-weight: 800;
        line-height: 1;
        border-radius: 12px;
        touch-action: manipulation;
    }

    .organize-btn.organize-btn--status {
        font-size: 16px;
        font-weight: 700;
    }

    .organize-segment + .organize-segment::before {
        height: 14px;
        opacity: 0.6;
    }

    .list-toolbar--member {
        align-items: flex-start;
    }

    .list-count--member {
        width: 100%;
    }

    .list-controls {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
    }

    .view-switch-label {
        display: none;
    }

    .view-switch-btn {
        min-width: 40px;
        padding: 0 10px;
    }

    .sort-btn {
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
    }

    .filter-panel--member {
        padding: 0;
        overflow: hidden;
    }

    .filter-panel--member .disclosure-toggle--member {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--s-3);
        padding: 10px 12px;
        border: 0;
        background: var(--card);
        color: var(--text);
        font: inherit;
        text-align: left;
        cursor: pointer;
    }

    .disclosure-toggle--member strong {
        display: block;
        font-size: 0.92rem;
        line-height: 1.3;
        font-weight: 700;
    }

    .disclosure-toggle--member span span {
        display: block;
        margin-top: 2px;
        font-size: 0.72rem;
        line-height: 1.3;
        color: var(--muted);
    }

    .filter-panel--member .disclosure-body--member {
        display: none;
        padding: 0 var(--s-5) var(--s-5);
    }

    .filter-panel--member.is-open .disclosure-body--member {
        display: block;
    }

    .filter-fields--member {
        grid-template-columns: 1fr;
    }

    .filter-footer--member {
        align-items: center;
    }

    .book--member {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: var(--s-4);
    }

    .book-cover--member img {
        width: 56px;
    }

    .book-bottom--member {
        display: grid;
        justify-content: stretch;
        gap: var(--s-3);
    }
}

@media (max-width: 640px) {
    .list-title-row--member {
        align-items: flex-start;
    }

    .book-list-help-trigger {
        font-size: 0.8rem;
    }
}

/* ========================================
   MEMBER DASHBOARD
   /members/account.htm
   Scoped to unique body class
======================================== */

.page-member-dashboard #next,
.page-member-dashboard #stats,
.page-member-dashboard #library,
.page-member-dashboard #account {
    scroll-margin-top: 100px;
}

/* ========================================
   HERO
======================================== */

.page-member-dashboard .member-dashboard-hero .hero-content {
    max-width: 760px;
}

.page-member-dashboard .member-dashboard-kicker {
    display: inline-block;
    margin-bottom: var(--s-3);
    font-size: 0.72rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--white-72);
}

.page-member-dashboard .member-dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-4);
    margin-top: var(--s-6);
}

/* ========================================
   BUTTONS
======================================== */

.page-member-dashboard .member-dashboard-btn {
    min-height: 38px;
    padding: 0 var(--s-5);
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.84rem;
    line-height: 1;
    font-weight: 700;
    text-decoration: none;
}

.page-member-dashboard .member-dashboard-btn:hover {
    border-color: var(--accent-22);
    background: var(--accent-04);
    color: var(--accent);
    text-decoration: none;
}

.page-member-dashboard .member-dashboard-btn--primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

.page-member-dashboard .member-dashboard-btn--primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--white);
}

/* ========================================
   LAYOUT
======================================== */

.page-member-dashboard .member-dashboard-main {
    min-width: 0;
}

.page-member-dashboard .member-dashboard-sidebar {
    margin-top: var(--s-6);
}

@media (min-width: 992px) {

    .page-member-dashboard .member-dashboard-sidebar {
        margin-top: 0;
        position: sticky;
        top: 90px;
    }
}

/* ========================================
   SECTIONS
======================================== */

.page-member-dashboard .member-dashboard-section,
.page-member-dashboard .member-dashboard-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: var(--s-8);
    margin-bottom: var(--section-gap-lg);
}

.page-member-dashboard .member-dashboard-section > *:first-child,
.page-member-dashboard .member-dashboard-panel > *:first-child {
    margin-top: 0;
}

.page-member-dashboard .member-dashboard-section > *:last-child,
.page-member-dashboard .member-dashboard-panel > *:last-child {
    margin-bottom: 0;
}

.page-member-dashboard .member-dashboard-section-head {
    margin-bottom: var(--s-6);
}

.page-member-dashboard .member-dashboard-section-head h2 {
    margin: 0 0 var(--s-3);
    font-size: 1.12rem;
    line-height: 1.25;
    font-weight: 750;
    letter-spacing: -0.01em;
    color: var(--text);
}

.page-member-dashboard .member-dashboard-section-head p {
    max-width: 64ch;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--muted);
}

/* ========================================
   WHAT'S NEXT CALLOUT
======================================== */

.page-member-dashboard .member-dashboard-callout {
    display: grid;
    gap: var(--s-5);
    padding: var(--s-6);
    border: 1px solid rgba(var(--accent-rgb), 0.14);
    border-radius: 12px;
    background: linear-gradient(
        180deg,
        rgba(46, 104, 116, 0.04) 0%,
        rgba(46, 104, 116, 0.08) 100%
    );
}

.page-member-dashboard .member-dashboard-label {
    margin-bottom: var(--s-2);
    font-size: 0.72rem;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
}

.page-member-dashboard .member-dashboard-callout h3 {
    margin: 0 0 var(--s-2);
    font-size: 1rem;
    line-height: 1.3;
    color: var(--text);
}

.page-member-dashboard .member-dashboard-callout p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--muted);
}

@media (min-width: 768px) {
    .page-member-dashboard .member-dashboard-callout {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }
}

.page-member-dashboard .member-dashboard-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-4);
    margin-top: var(--s-5);
}

.page-member-dashboard .member-dashboard-action-row a {
    min-height: 36px;
    padding: 0 var(--s-5);
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
}

.page-member-dashboard .member-dashboard-action-row a:hover {
    border-color: var(--accent-22);
    background: var(--accent-04);
    color: var(--accent);
    text-decoration: none;
}

/* ========================================
   STAT CARDS
======================================== */

.page-member-dashboard .member-dashboard-stat-grid {
    display: grid;
    gap: var(--s-5);
}

.page-member-dashboard .member-dashboard-stat-card {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: var(--s-3);
    padding: var(--s-6);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--accent-02);
    text-decoration: none;
}

.page-member-dashboard .member-dashboard-stat-card:hover {
    border-color: var(--accent-22);
    background: var(--accent-04);
    text-decoration: none;
}

.page-member-dashboard .member-dashboard-stat-card strong {
    width: 76px;
    height: 76px;
    border-radius: 999px;
    background: var(--surface-subtle);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--s-3);
    font-size: 0.9rem;
    line-height: 1.15;
    font-weight: 800;
}

.page-member-dashboard .member-dashboard-stat-card span {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--muted);
}

@media (min-width: 768px) {
    .page-member-dashboard .member-dashboard-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .page-member-dashboard .member-dashboard-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* ========================================
   TOOL CARDS
======================================== */

.page-member-dashboard .member-dashboard-tool-grid {
    display: grid;
    gap: var(--s-5);
}

.page-member-dashboard .member-dashboard-tool-card {
    display: grid;
    gap: var(--s-3);
    align-content: start;
    padding: var(--s-6);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    text-decoration: none;
}

.page-member-dashboard .member-dashboard-tool-card:hover {
    border-color: var(--accent-22);
    background: var(--accent-04);
    text-decoration: none;
}

.page-member-dashboard .member-dashboard-tool-icon {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: var(--surface-subtle);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    font-weight: 800;
}

.page-member-dashboard .member-dashboard-tool-card strong {
    font-size: 0.98rem;
    line-height: 1.3;
    font-weight: 750;
    color: var(--text);
}

.page-member-dashboard .member-dashboard-tool-card span:last-child {
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--muted);
}

@media (min-width: 768px) {
    .page-member-dashboard .member-dashboard-tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .page-member-dashboard .member-dashboard-tool-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ========================================
   SIDEBAR
======================================== */

.page-member-dashboard .member-dashboard-panel {
    display: grid;
    gap: var(--s-6);
}

.page-member-dashboard .member-dashboard-profile {
    display: flex;
    align-items: center;
    gap: var(--s-5);
}

.page-member-dashboard .member-dashboard-avatar {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-subtle);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
    font-weight: 800;
    flex: 0 0 auto;
}

.page-member-dashboard .member-dashboard-name {
    font-size: 1.02rem;
    line-height: 1.3;
    font-weight: 750;
    color: var(--text);
}

.page-member-dashboard .member-dashboard-plan {
    margin-top: 2px;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--muted);
}

.page-member-dashboard .member-dashboard-side-group {
    padding-top: var(--s-5);
    border-top: 1px solid var(--black-05);
}

.page-member-dashboard .member-dashboard-side-title {
    margin-bottom: var(--s-3);
    font-size: 0.76rem;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.page-member-dashboard .member-dashboard-side-links {
    display: grid;
    gap: var(--s-2);
}

.page-member-dashboard .member-dashboard-side-links a {
    display: block;
    padding: 2px 0;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.45;
    font-weight: 600;
    text-decoration: none;
}

.page-member-dashboard .member-dashboard-side-links a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.page-member-dashboard .member-dashboard-meta {
    display: grid;
    gap: var(--s-4);
}

.page-member-dashboard .member-dashboard-meta div {
    display: grid;
    gap: 2px;
}

.page-member-dashboard .member-dashboard-meta span {
    font-size: 0.74rem;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.page-member-dashboard .member-dashboard-meta strong {
    font-size: 0.9rem;
    line-height: 1.35;
    font-weight: 650;
    color: var(--text);
}

.page-member-dashboard .member-dashboard-signout {
    padding-top: var(--s-5);
    border-top: 1px solid var(--black-05);
}

.page-member-dashboard .member-dashboard-signout a {
    display: inline-flex;
    align-items: center;
    color: #7a3142;
    font-size: 0.9rem;
    line-height: 1.3;
    font-weight: 750;
    text-decoration: none;
}

.page-member-dashboard .member-dashboard-signout a:hover {
    text-decoration: underline;
}

/* ========================================
   MOBILE
======================================== */

@media (max-width: 767px) {
    .page-member-dashboard .member-dashboard-section,
    .page-member-dashboard .member-dashboard-panel {
        padding: var(--s-6);
        margin-bottom: var(--section-gap);
    }

    .page-member-dashboard .member-dashboard-stat-grid,
    .page-member-dashboard .member-dashboard-tool-grid {
        grid-template-columns: 1fr;
    }

    .page-member-dashboard .member-dashboard-hero-actions,
    .page-member-dashboard .member-dashboard-action-row {
        gap: var(--s-3);
    }

    .page-member-dashboard .member-dashboard-btn,
    .page-member-dashboard .member-dashboard-action-row a {
        width: 100%;
    }
}


.page-member-dashboard .member-dashboard-hero-actions .member-dashboard-btn:hover {
    background: var(--white-12);
    border-color: var(--white-22);
    color: var(--white);
}

.page-member-dashboard .member-dashboard-hero-actions .member-dashboard-btn--primary:hover {
    background: var(--white);
    border-color: var(--white);
    color: var(--accent);
}

/* ========================================
   MEMBER ACCOUNT SIDEBAR
   Reusable across logged-in member pages
======================================== */

.member-account-panel {
    display: grid;
    gap: var(--s-6);

    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);

    padding: var(--s-8);
    margin-bottom: var(--section-gap-lg);
}

.member-account-panel > *:first-child {
    margin-top: 0;
}

.member-account-panel > *:last-child {
    margin-bottom: 0;
}

.member-account-profile {
    display: flex;
    align-items: center;
    gap: var(--s-5);
}

.member-account-avatar {
    width: 64px;
    height: 64px;

    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-subtle);

    color: var(--accent);

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 1.2rem;
    line-height: 1;
    font-weight: 800;

    flex: 0 0 auto;
}

.member-account-name {
    font-size: 1.02rem;
    line-height: 1.3;
    font-weight: 750;

    color: var(--text);
}

.member-account-plan {
    margin-top: 2px;

    font-size: 0.82rem;
    line-height: 1.45;

    color: var(--muted);
}

.member-account-group {
    padding-top: var(--s-5);
    border-top: 1px solid var(--black-05);
}

.member-account-group-title {
    margin-bottom: var(--s-3);

    font-size: 0.76rem;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;

    color: var(--muted);
}

.member-account-links {
    display: grid;
    gap: var(--s-2);
}

.member-account-links a {
    display: block;

    padding: 2px 0;

    color: var(--text);

    font-size: 0.9rem;
    line-height: 1.45;
    font-weight: 600;

    text-decoration: none;
}

.member-account-links a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.member-account-meta {
    display: grid;
    gap: var(--s-4);
}

.member-account-meta div {
    display: grid;
    gap: 2px;
}

.member-account-meta span {
    font-size: 0.74rem;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;

    color: var(--muted);
}

.member-account-meta strong {
    font-size: 0.9rem;
    line-height: 1.35;
    font-weight: 650;

    color: var(--text);
}

.member-account-signout {
    padding-top: var(--s-5);
    border-top: 1px solid var(--black-05);
}

.member-account-signout a {
    display: inline-flex;
    align-items: center;

    color: #7a3142;

    font-size: 0.9rem;
    line-height: 1.3;
    font-weight: 750;

    text-decoration: none;
}

.member-account-signout a:hover {
    text-decoration: underline;
}

@media (max-width: 767px) {
    .member-account-panel {
        padding: var(--s-6);
        margin-bottom: var(--section-gap);
    }

    .member-account-avatar {
        width: 56px;
        height: 56px;
        font-size: 1.05rem;
    }
}
