:root {
    --bg: #fafaf7;
    --fg: #1a1a1a;
    --accent: #2a6496;
    --muted: #777;
    --border: #ddd;
    --card-bg: #fff;
    --highlight: #fff3cd;
}

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

body {
    font-family: Cambria, Georgia, 'Times New Roman', serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
    transition: border-color 0.15s, color 0.15s;
}

a:hover {
    color: #1a4a6e;
    border-bottom-color: var(--accent);
}

/* Header links should not have underline */
header a,
.article-nav a {
    border-bottom: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
header {
    border-bottom: 2px solid var(--border);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}
body.zone-member header,
body.zone-admin header {
    margin-bottom: 0;
}
body.zone-member main,
body.zone-admin main {
    margin-top: 2rem;
}

header h1 {
    font-size: 1.8rem;
    font-weight: normal;
}

header h1 a {
    color: var(--fg);
    text-decoration: none;
}

header .subtitle {
    color: var(--muted);
    font-size: 0.95rem;
    font-style: italic;
}

/* Search */
#search-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

#search-input {
    flex: 1;
    padding: 0.6rem 0.8rem;
    font-size: 1.1rem;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--card-bg);
}

#search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(42, 100, 150, 0.15);
}

button[type="submit"] {
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    font-family: inherit;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

button[type="submit"]:hover {
    background: #1d4e79;
}

/* Stats */
#stats-section {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Results */
.result-group {
    margin-bottom: 1.5rem;
}

.result-group-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.3rem;
    margin-bottom: 0.3rem;
}

.result-item {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.result-item:hover {
    background: var(--highlight);
    margin: 0 -1rem;
    padding: 0.8rem 1rem;
}

.result-word {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent);
    letter-spacing: 0;
}

.result-general {
    margin-top: 0.3rem;
    color: var(--fg);
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-origin {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.85rem;
    font-style: italic;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.pagination button {
    padding: 0.4rem 0.8rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    cursor: pointer;
    font-family: inherit;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Article view */
#article-section {
    margin-top: 1.5rem;
}

.article-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.article-main {
    flex: 1;
    min-width: 0;
    position: relative;
}

.article-parallels {
    width: 240px;
    flex: none;
    border-left: 1px solid var(--border);
    padding-left: 1rem;
}

.parallels-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 0.6rem;
}

.parallel-group-title {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--fg);
    margin: 0.8rem 0 0.35rem;
}

.parallel-group-title:first-of-type {
    margin-top: 0;
}

.parallel {
    margin-bottom: 0.7rem;
    font-size: 0.92rem;
    line-height: 1.5;
}

.parallel-langs {
    color: var(--muted);
    font-style: italic;
}

.parallel-lang {
    cursor: help;
}

.parallel-word {
    font-weight: bold;
    color: var(--accent);
    letter-spacing: 0;
}

a.parallel-word:hover {
    text-decoration: underline;
}

.parallel-meaning {
    color: var(--fg);
}

@media (max-width: 700px) {
    .article-layout {
        flex-direction: column;
    }
    .article-parallels {
        width: auto;
        border-left: none;
        border-top: 1px solid var(--border);
        padding-left: 0;
        padding-top: 1rem;
    }
}

.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.article-nav a {
    color: var(--accent);
    text-decoration: none;
}

.article-nav a:hover {
    text-decoration: underline;
}

.article-nav .nav-next {
    margin-left: auto;
    text-align: right;
}

.article-back {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.95rem;
}

.article-back:hover {
    text-decoration: underline;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 10px;
    font-size: 0.88rem;
    color: var(--muted);
}

.breadcrumbs a {
    color: var(--accent);
    border-bottom: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    color: var(--muted);
}

.article-word {
    font-size: 2rem;
    font-weight: normal;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    letter-spacing: 0;
}

.article-section-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin: 1rem 0 0.3rem;
}

.article-body {
    margin-bottom: 1rem;
    line-height: 1.7;
    letter-spacing: 0;
}

.article-body i {
    color: var(--accent);
}

.article-meta {
    margin-top: 1.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--muted);
}

/* Utility */
.hidden { display: none; }
.muted { color: var(--muted); }

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--muted);
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: var(--muted);
    font-style: italic;
}

/* Article header row — word + share button */
.article-header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.article-header-row .article-word {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Cite button — pale */
.cite-btn {
    padding: 4px 12px;
    font-size: 0.85rem;
    font-family: inherit;
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.cite-btn:hover {
    background: #f1f3f5;
    color: var(--fg);
}

/* Language switch in cite panel */
.cite-lang-switch {
    display: flex;
    gap: 4px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.lang-switch-btn {
    padding: 3px 10px;
    font-size: 0.75rem;
    font-family: inherit;
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.12s;
}

.lang-switch-btn:hover {
    background: #f1f3f5;
    color: var(--fg);
}

.lang-switch-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Cite dropdown panel */
.cite-panel {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    padding: 16px;
    min-width: 440px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 100;
}

.cite-item {
    margin-bottom: 14px;
}

.cite-item:last-child {
    margin-bottom: 0;
}

.cite-item-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 6px;
}

.cite-item-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.cite-item-textarea {
    flex: 1;
    min-width: 0;
    resize: none;
    font-family: monospace;
    font-size: 12px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg);
    line-height: 1.4;
}

.cite-copy-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    align-self: center;
    font-size: 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.12s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.cite-copy-btn:hover {
    background: #e9ecef;
}

/* Search result tabs */
.results-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    flex-wrap: wrap;
}

.results-tab-btn {
    padding: 6px 14px;
    font-size: 0.85rem;
    font-family: inherit;
    background: transparent;
    color: var(--muted);
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color 0.12s, border-color 0.12s;
    white-space: nowrap;
}

.results-tab-btn:hover {
    color: var(--fg);
}

.results-tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Footer */
footer {
    margin-top: 3rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    text-align: center;
}

/* Feedback modal */
#feedback-overlay {
    position: fixed; top: 0; left: 0; z-index: 100000;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,.5);
    display: flex; align-items: center; justify-content: center;
}
#feedback-modal {
    background: #fff; border-radius: 8px; width: 460px; max-width: 95vw;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
#feedback-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 18px; border-bottom: 1px solid #eee;
    font-size: 16px; font-weight: bold;
}
#feedback-modal-header button {
    background: none; border: none; font-size: 20px; cursor: pointer; color: #999;
}
#feedback-modal-header button:hover { color: #333; }
#feedback-modal-body { padding: 18px; }
#feedback-text {
    width: 100%; border: 1px solid #ddd; border-radius: 4px;
    padding: 10px; font-family: inherit; font-size: 14px;
    resize: vertical; margin-bottom: 12px;
}
#feedback-submit {
    background: #4285f4; color: #fff; border: none; border-radius: 4px;
    padding: 10px 24px; font-size: 14px; cursor: pointer;
}
#feedback-submit:hover { background: #3367d6; }
#feedback-submit:disabled { opacity: .6; cursor: not-allowed; }

/* ── Shared feedback/ideas UI (toggle bar, status badges, tag pills, tag cloud) ── */

/* ---- Toggle bar (status filter) ---- */
.feedback-toggle-bar {
    display: flex; flex-wrap: wrap; gap: 0;
    border: 1px solid #adb5bd; border-radius: 4px;
    overflow: hidden; width: fit-content;
    margin-bottom: 12px;
}
.fb-toggle-item {
    padding: 6px 14px;
    border: none; background: transparent; cursor: pointer;
    font-size: 13px; white-space: nowrap;
    transition: filter .15s; color: inherit;
    border-right: 1px solid #adb5bd;
}
.fb-toggle-item:last-child { border-right: none; }
.fb-toggle-item:hover:not(.active) { filter: brightness(0.92); }
.fb-toggle-item.active { font-weight: 600; }

/* ---- Status cell & dropdown ---- */
.fb-status-cell { position: relative; display: inline-block; }
.fb-status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 11px;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.1s;
}
.fb-status-badge:hover { opacity: 0.8; }
.fb-status-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 2px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    z-index: 100;
    min-width: 150px;
}
.fb-status-option {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.1s;
}
.fb-status-option:hover { background: #f1f3f5; }
.fb-status-option.current { background: #e9ecef; }

/* ---- Tags cell & pills ---- */
.fb-tags-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.fb-tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    border: 1px solid;
    white-space: nowrap;
}
.fb-tag-remove {
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.12s;
}
.fb-tag-remove:hover { opacity: 1; }
.fb-tag-add {
    cursor: pointer;
    color: var(--muted);
    border-style: dashed;
    background: transparent;
    opacity: 0.7;
}
.fb-tag-add:hover { opacity: 1; border-color: var(--accent); color: var(--accent); }
.fb-tag-input {
    width: 80px;
    padding: 2px 6px;
    font-size: 11px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
}
.fb-tag-input:focus { border-color: var(--accent); }

/* ---- Tag cloud ---- */
.fb-tag-cloud {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    padding: 6px;
    background: #f8f9fa;
    border-radius: 4px;
    align-items: center;
}
.fb-cloud-chip {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    border: 1px solid var(--border);
    cursor: pointer;
    user-select: none;
    transition: background 0.12s, border-color 0.12s;
    background: #fff;
    color: var(--muted);
}
.fb-cloud-chip:hover { background: #f1f3f5; }
.fb-cloud-chip.active { background: #e9ecef; border-color: var(--accent); font-weight: 600; }

/* ---- Alphabet browse page ---- */
.alphabet-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 28px;
}

.letter-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 54px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    background: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--fg);
    transition: background 0.12s, border-color 0.12s, transform 0.12s;
    gap: 2px;
}

.letter-chip:hover {
    background: #eef4fa;
    border-color: var(--accent);
    transform: scale(1.06);
}

.letter-chip.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.letter-chip.empty {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.letter-chip .cnt {
    font-size: 0.58rem;
    color: var(--muted);
    font-weight: 600;
    line-height: 1;
}

.letter-chip.active .cnt {
    color: rgba(255,255,255,0.7);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 640px) {
    .article-grid {
        grid-template-columns: 1fr;
    }
}

.article-grid-item {
    display: block;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: border-color 0.12s, box-shadow 0.12s;
}

.article-grid-item:hover {
    border-color: var(--accent);
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.grid-word {
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent);
    margin-bottom: 4px;
}

.grid-snippet {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

#letter-results .initial-hint {
    text-align: center;
    color: var(--muted);
    font-size: 1rem;
    padding: 40px 0;
}

/* ---- View toggle (cards/list) ---- */
.letter-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

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

.view-toggle {
    display: flex;
    gap: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    font-size: 0.78rem;
}

.view-toggle button {
    padding: 4px 14px;
    border: none;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    font-weight: 500;
    transition: background 0.12s, color 0.12s;
    border-right: 1px solid #dee2e6;
}

.view-toggle button:last-child {
    border-right: none;
}

.view-toggle button:hover {
    background: #e9ecef;
    color: #495057;
}

.view-toggle button.active {
    background: #fff;
    color: #212529;
    font-weight: 600;
}

/* ---- Article list (compact, 3 columns grid) ---- */
.article-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px 24px;
    grid-auto-flow: row;
}

.article-list.hidden {
    display: none;
}

.article-grid.hidden {
    display: none;
}

@media (max-width: 640px) {
    .article-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 2px 16px;
    }
}

@media (max-width: 420px) {
    .article-list {
        grid-template-columns: 1fr;
    }
}

.article-list a {
    display: block;
    padding: 4px 0;
    font-size: 0.92rem;
    color: var(--accent);
    border-bottom: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-list a:hover {
    color: #1a4a6e;
    text-decoration: underline;
}

/* ---- Static pages ---- */

.static-page h2 {
    font-size: 1.65rem;
    font-weight: 600;
    color: #222;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--accent, #2c5f2d);
}

.static-page h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 1.5rem 0 0.75rem 0;
}

.static-page p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #444;
    margin: 0 0 1.25rem 0;
    text-indent: 1.5em;
}

/* ---- Nav bars (member / admin zone) ---- */
.nav-zone {
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.nav-zone .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
}
.nav-zone .nav-item {
    display: inline-block;
    padding: 10px 16px;
    font-size: 14px;
    color: #555;
    border-bottom: none;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color .15s, background .15s;
}
.nav-zone .nav-item:hover {
    color: #222;
    background: #f0f0f0;
}
.nav-zone .nav-item.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    margin-bottom: -1px;
    font-weight: 600;
}
.nav-admin {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}
.nav-admin .nav-item {
    color: #666;
}
.nav-zone .nav-zone-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-right: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}
.nav-admin .nav-zone-label {
    color: #aaa;
}

/* ---- User profile page ---- */
.user-profile {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
    padding: 20px 0;
}
.user-avatar {
    border-radius: 8px;
    border: 1px solid var(--border);
}
.user-info h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 4px 0;
}
.user-role {
    color: var(--muted);
    font-size: 15px;
    margin: 0 0 8px 0;
}
.user-meta {
    color: #999;
    font-size: 13px;
    margin: 0;
}
.user-stats {
    width: 100%;
    display: flex;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.user-stats .stat {
    color: #555;
    font-size: 14px;
}

/* ---- Zone-specific theming (member / admin) ---- */

/* ---- Form helpers ---- */
.profile-form h2 { font-size: 22px; margin-bottom: 16px; }
.profile-stats { display: flex; gap: 20px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 160px 1fr; gap: 8px 12px; align-items: center; margin-bottom: 12px; }
.form-grid label { font-size: 14px; color: #555; text-align: right; }
.form-grid input, .form-grid textarea, .form-grid select { padding: 6px 8px; border: 1px solid #ccc; border-radius: 4px; font-family: inherit; font-size: 14px; }
.form-grid textarea { resize: vertical; }
.form-actions { display: flex; gap: 8px; }
.btn { padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; font-family: inherit; }
.btn-green { background: #51cf66; color: #fff; }
.btn-green:hover { background: #40c057; }
.btn-gray { background: #adb5bd; color: #fff; }
.btn-gray:hover { background: #868e96; }
.btn-red { background: #ff6b6b; color: #fff; }
.btn-red:hover { background: #e03131; }
.btn-small { padding: 4px 10px; font-size: 12px; }
.edits-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.edits-table th { text-align: left; padding: 8px 6px; border-bottom: 2px solid #ddd; font-size: 13px; color: #666; }
.edits-table td { padding: 8px 6px; border-bottom: 1px solid #eee; font-size: 13px; }
.alphabet { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 16px; }
.letter-btn { display: inline-flex; flex-direction: column; align-items: center; padding: 6px 8px; border: 1px solid #ddd; border-radius: 4px; background: #fff; cursor: pointer; font-size: 14px; min-width: 36px; }
.letter-btn:hover { background: #f0f0f0; }
.letter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.letter-btn .cnt { font-size: 10px; color: #888; margin-top: 2px; }
.letter-btn.active .cnt { color: #fff; }
.error { color: #c0392b; }
.muted { color: #999; }

@keyframes fadeOut { 0% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }

/* Member: warm cream */
body.zone-member header { background: #fdf5e6; border-bottom-color: #e8d5b7; }
body.zone-member .nav-member { background: #fef9f0; border-bottom-color: #e8d5b7; }
body.zone-member .nav-member .nav-item.active { border-bottom-color: #b8860b; color: #8b6914; }

/* Admin: cool grey-blue */
body.zone-admin header { background: #eef2f7; border-bottom-color: #c8d0dc; }
body.zone-admin .nav-member { background: #f4f6f9; border-bottom-color: #c8d0dc; }
body.zone-admin .nav-member .nav-item.active { border-bottom-color: #4a6fa5; color: #3b5998; }
body.zone-admin .nav-admin { background: #e8ecf2; border-bottom-color: #bcc5d4; }
body.zone-admin .nav-admin .nav-item.active { border-bottom-color: #c0392b; color: #a93226; }
