/* =========================================================
   SumerLib.app - Design System & Modern Mesopotamian Theme
   ========================================================= */

:root {
    /* Color Palette - Default Sepia / Papyrus */
    --bg-page: #f9f6f0;
    --bg-surface: #ffffff;
    --bg-card: #fdfbf7;
    --bg-hover: #f3ede2;
    --border-color: #e4dbc9;
    --border-hover: #d2c5ae;
    
    --text-primary: #1f1b16;
    --text-secondary: #574d42;
    --text-muted: #8b7d6b;
    
    --accent: #8b5a2b;          /* Royal Cuneiform Clay Brown */
    --accent-hover: #6d421a;
    --accent-light: #f7eee2;
    --accent-gold: #c89528;       /* Sumerian Gold */
    --accent-gold-glow: rgba(200, 149, 40, 0.25);
    
    --cuneiform-matrix-color: rgba(165, 115, 50, 0.16);
    --cuneiform-matrix-head: rgba(195, 135, 50, 0.45);

    --font-heading: 'Cinzel', serif;
    --font-body: 'Lora', Georgia, serif;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: "SF Mono", "Fira Code", monospace;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-pill: 9999px;

    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.11);

    --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* OLED Deep Dark Theme */
body.theme-dark {
    --bg-page: #08090b;
    --bg-surface: #101216;
    --bg-card: #15181f;
    --bg-hover: #1e222b;
    --border-color: #272c38;
    --border-hover: #373e4f;

    --text-primary: #f0f2f5;
    --text-secondary: #b0b8c4;
    --text-muted: #737c8c;

    --accent: #d4a017;
    --accent-hover: #e6b32a;
    --accent-light: #231e12;
    --accent-gold: #f5c542;
    --accent-gold-glow: rgba(245, 197, 66, 0.3);

    --cuneiform-matrix-color: rgba(74, 222, 128, 0.14); /* Subtle matrix green */
    --cuneiform-matrix-head: rgba(134, 239, 172, 0.55);
}

/* Light Paper Theme */
body.theme-light {
    --bg-page: #ffffff;
    --bg-surface: #ffffff;
    --bg-card: #f8fafc;
    --bg-hover: #f1f5f9;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --accent: #0284c7;
    --accent-hover: #0369a1;
    --accent-light: #e0f2fe;
    --accent-gold: #ca8a04;
    --accent-gold-glow: rgba(202, 138, 4, 0.2);

    --cuneiform-matrix-color: rgba(2, 132, 199, 0.10);
    --cuneiform-matrix-head: rgba(2, 132, 199, 0.35);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.68;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
}

/* Canvas Matrix Background */
#cuneiform-matrix {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
    transition: opacity 0.3s ease;
}

body.theme-light #cuneiform-matrix {
    opacity: 0.72;
}

body.theme-parchment #cuneiform-matrix {
    opacity: 0.85;
}

/* Ensure all page content is layered above the matrix canvas */
.site-header, .site-footer, .hero-section, .catalog-section,
.solidarity-section, .support-section, .resume-banner, .reader-main,
.reader-header, .reader-footer, .modal-overlay, .toast {
    position: relative;
    z-index: 1;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Mesopotamian Archives Live Sync Topbar */
.catalog-sync-topbar {
    background: linear-gradient(90deg, var(--bg-card) 0%, var(--bg-hover) 50%, var(--bg-card) 100%);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.76rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 101;
    overflow: hidden;
    transition: var(--transition);
}

.sync-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 1.5rem;
    gap: 0.75rem;
}

.sync-topbar-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.sync-dot-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--accent-gold);
    box-shadow: 0 0 8px var(--accent-gold);
    animation: syncDotGlow 1.8s infinite ease-in-out;
    flex-shrink: 0;
}

@keyframes syncDotGlow {
    0%, 100% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px var(--accent-gold); }
}

.sync-status-prefix {
    font-weight: 500;
    white-space: nowrap;
}

.sync-lang-badge {
    background-color: var(--accent);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.12rem 0.45rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.sync-work-name {
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
}

.sync-topbar-metric {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.sync-bar-track {
    width: 90px;
    height: 5px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

body.theme-dark .sync-bar-track {
    background-color: rgba(255, 255, 255, 0.12);
}

.sync-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-gold));
    border-radius: var(--radius-pill);
    transition: width 0.4s ease;
}

.sync-pct-display {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent-gold);
    font-size: 0.76rem;
    min-width: 38px;
    text-align: right;
}

/* Header / Navbar */
.site-header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background-color: rgba(var(--bg-surface), 0.92);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    object-fit: cover;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border: 1.5px solid var(--accent-gold);
}

.brand-text strong {
    font-family: var(--font-heading);
    font-size: 1.28rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
    line-height: 1.15;
    letter-spacing: 0.03em;
}

.brand-text small {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

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

/* 31-Language Selector Dropdown */
.lang-selector-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.lang-select-dropdown {
    font-family: var(--font-ui);
    font-size: 0.84rem;
    font-weight: 600;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-pill);
    padding: 0.42rem 1.85rem 0.42rem 0.75rem;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b7d6b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
}

.lang-select-dropdown:hover, .lang-select-dropdown:focus {
    border-color: var(--accent);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-ui);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.55rem 1.15rem;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.btn-secondary {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

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

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-donate {
    background: linear-gradient(135deg, var(--accent-gold), #b37e19);
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 3px 12px var(--accent-gold-glow);
}

.btn-donate:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 18px var(--accent-gold-glow);
}

/* User Pill / Login */
.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.75rem 0.25rem 0.35rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-ui);
    font-size: 0.84rem;
}

.user-pill .avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

.btn-logout {
    background: transparent;
    border: none;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    margin-left: 0.3rem;
}

.btn-logout:hover {
    color: #ef4444;
}

/* Resume Banner */
.resume-banner {
    margin-top: 1.25rem;
    background-color: var(--accent-light);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.resume-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.resume-icon {
    font-size: 1.5rem;
}

.resume-text strong {
    display: block;
    font-size: 0.95rem;
    color: var(--accent);
}

.resume-text span {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* Hero Section */
.hero-section {
    padding: 3rem 0 2rem;
    text-align: center;
}

.hero-inner {
    max-width: 980px;
}

.hero-tag {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-gold);
    background-color: var(--accent-light);
    border: 1px solid var(--accent-gold);
    padding: 0.3rem 0.9rem;
    border-radius: var(--radius-pill);
    margin-bottom: 1.25rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 820px;
    margin: 0 auto 2.2rem;
}

/* "Por que os Sumérios?" Narrative Wisdom Card */
.why-sumer-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-gold);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin: 0 auto 2.5rem;
    text-align: left;
    box-shadow: var(--shadow-md);
}

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

.why-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.zntech-badge {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
}

.zntech-badge a {
    color: var(--accent);
    font-weight: 700;
}

.why-text {
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.why-advice {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
    background-color: var(--accent-light);
    padding: 0.65rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* License & AI Philology Badges */
.integrity-meta-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 1rem;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.license-pill, .tech-pill {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    line-height: 1.45;
}

.license-pill strong, .tech-pill strong {
    color: var(--text-secondary);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.stat-card {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Search and Filter Box */
.search-filter-box {
    max-width: 780px;
    margin: 0 auto;
}

.search-input-wrap {
    position: relative;
    margin-bottom: 1rem;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: var(--text-muted);
}

.search-input-wrap input {
    width: 100%;
    padding: 0.95rem 1rem 0.95rem 3.2rem;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    outline: none;
    transition: var(--transition);
}

.search-input-wrap input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    font-family: var(--font-ui);
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-pill);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    border-color: var(--accent);
}

.tab-btn.active {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

/* Catalog Section */
.catalog-section {
    padding: 3rem 0;
}

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.section-header p {
    font-family: var(--font-ui);
    font-size: 0.92rem;
    color: var(--text-muted);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
}

.book-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.book-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.card-badge {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: var(--accent-light);
    color: var(--accent);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
}

.chapter-count {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.book-title {
    font-family: var(--font-heading);
    font-size: 1.22rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.book-title-en {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 0.65rem;
}

.book-author {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.book-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1.25rem;
}

/* Card Reading Progress Bar */
.card-reading-progress {
    margin-bottom: 1.25rem;
    background-color: var(--bg-hover);
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-ui);
    font-size: 0.76rem;
    margin-bottom: 0.35rem;
}

.progress-label {
    font-weight: 700;
    color: var(--accent-gold);
}

.progress-pct-badge {
    color: var(--text-muted);
}

.progress-bar-track {
    width: 100%;
    height: 5px;
    background-color: var(--border-color);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-gold));
    border-radius: var(--radius-pill);
    transition: width 0.3s ease;
}

.book-card-footer {
    display: flex;
    gap: 0.65rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.btn-read {
    flex: 2;
    justify-content: center;
}

.btn-download {
    flex: 1;
    justify-content: center;
}

/* =========================================================
   Solidarity Community Preservation & Donation Section
   ========================================================= */
.solidarity-section {
    padding: 3rem 0;
}

.solidarity-card {
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-card) 60%, var(--bg-hover) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    overflow: hidden;
}

.solidarity-card::before {
    content: "𒀭";
    position: absolute;
    right: -20px;
    bottom: -35px;
    font-size: 13rem;
    font-family: serif;
    color: var(--accent-gold);
    opacity: 0.05;
    pointer-events: none;
    line-height: 1;
}

.solidarity-header {
    max-width: 820px;
}

.pill-badge {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    background-color: var(--accent);
    color: #ffffff;
    padding: 0.25rem 0.8rem;
    border-radius: var(--radius-pill);
    display: inline-block;
    letter-spacing: 0.04em;
}

.pill-gold {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent));
    color: #ffffff;
    box-shadow: 0 2px 8px var(--accent-gold-glow);
}

.solidarity-title {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    color: var(--text-primary);
    margin: 0.75rem 0 0.5rem 0;
    line-height: 1.25;
}

.solidarity-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* Dynamic Community Funding Goal Tracker Widget */
.goal-widget {
    background-color: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

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

.goal-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.goal-pulse-dot {
    width: 10px;
    height: 10px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.goal-title {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.goal-title strong {
    color: var(--text-primary);
}

.goal-pct-wrap {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.goal-pct-highlight {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent-gold);
    line-height: 1;
}

.goal-pct-sub {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Progress Track and Shimmer Fill */
.goal-track {
    width: 100%;
    height: 14px;
    background-color: var(--bg-hover);
    border-radius: var(--radius-pill);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
}

.goal-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-gold) 60%, #ffd166 100%);
    border-radius: var(--radius-pill);
    position: relative;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.goal-fill-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    animation: shimmerGoal 2.5s infinite;
}

@keyframes shimmerGoal {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.goal-metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-color);
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.metric-label {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.metric-val {
    font-family: var(--font-ui);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Suggested Solidarity Chips */
.solidarity-chips-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chips-label {
    font-family: var(--font-ui);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.solidarity-chips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.85rem;
}

.solidarity-chip {
    background-color: var(--bg-surface);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.solidarity-chip:hover, .solidarity-chip.active-chip {
    border-color: var(--accent-gold);
    background-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-gold-glow);
}

.chip-val {
    font-family: var(--font-ui);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.chip-role {
    font-family: var(--font-ui);
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Solidarity Action Buttons */
.solidarity-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.btn-donate-pix, .btn-donate-stripe, .btn-donate-crypto {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 1.35rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.btn-donate-pix {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
}

.btn-donate-pix:hover {
    background: linear-gradient(135deg, #0369a1, #075985);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35);
}

.btn-donate-stripe {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}

.btn-donate-stripe:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.btn-donate-crypto {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.25);
}

.btn-donate-crypto:hover {
    background: linear-gradient(135deg, #b45309, #92400e);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.35);
}

.btn-text-wrap {
    display: flex;
    flex-direction: column;
}

.btn-text-wrap strong {
    font-family: var(--font-ui);
    font-size: 0.98rem;
    line-height: 1.2;
}

.btn-text-wrap small {
    font-family: var(--font-ui);
    font-size: 0.74rem;
    opacity: 0.9;
}

.solidarity-guarantee {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
    background-color: var(--bg-hover);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent-gold);
}

/* Modal Wide for Book Chapters */
.modal-card-wide {
    max-width: 680px;
    width: 92%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.chapter-preview-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-top: 1rem;
}

.chapter-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.chapter-item-row:hover {
    border-color: var(--accent);
    background-color: var(--bg-hover);
}

.chapter-title-info strong {
    display: block;
    font-size: 0.92rem;
    color: var(--text-primary);
}

.chapter-title-info small {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Multi-Provider Payment / Support Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 92%;
    max-width: 520px;
    padding: 1.75rem;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-muted);
}

/* Payment Method Tabs */
.pay-tabs-nav {
    display: flex;
    background-color: var(--bg-hover);
    border-radius: var(--radius-pill);
    padding: 3px;
    gap: 3px;
    margin-bottom: 1.5rem;
}

.pay-tab-btn {
    flex: 1;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.55rem 0.25rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.pay-tab-btn.active {
    background-color: var(--bg-surface);
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}

/* Preset Donation Value Chips */
.donation-values-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.val-chip {
    flex: 1;
    font-family: var(--font-ui);
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.5rem 0;
    text-align: center;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.val-chip:hover, .val-chip.active {
    border-color: var(--accent-gold);
    background-color: var(--accent-light);
    color: var(--accent-gold);
}

/* QR Code & Copy Box */
.qr-container {
    text-align: center;
    padding: 1rem;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-container img {
    width: 170px;
    height: 170px;
    object-fit: contain;
}

.copy-input-group {
    display: flex;
    gap: 0.4rem;
    width: 100%;
    margin-top: 0.85rem;
}

.copy-input-group input {
    flex: 1;
    padding: 0.55rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background-color: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
}

/* Crypto Selectors */
.crypto-selector-group {
    margin-bottom: 1.25rem;
}

.crypto-selector-group label {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.crypto-select {
    width: 100%;
    padding: 0.65rem;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 600;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0;
    text-align: center;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--text-muted);
    background-color: var(--bg-surface);
}

.site-footer p {
    margin-bottom: 0.4rem;
}

.footer-zntech {
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 0.75rem;
}

.footer-zntech a {
    color: var(--accent);
    text-decoration: underline;
}

/* Reader Specific Styles */
.reader-header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.reader-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
}

.reader-nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Botão Voltar Proeminente (com Círculo Estilizado e Animação) */
.reader-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    cursor: pointer;
}

.reader-back-btn:hover {
    background-color: var(--bg-hover);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 4px 14px var(--accent-gold-glow, rgba(139, 90, 43, 0.22));
    transform: translateX(-3px);
}

.reader-back-btn:hover .back-arrow-icon {
    transform: translateX(-2px);
}

.reader-back-btn:active {
    transform: scale(0.92) translateX(-1px);
}

.back-arrow-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    transition: transform 0.2s ease;
}

.reader-titles .book-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    display: block;
    line-height: 1.2;
}

.reader-titles select {
    font-family: var(--font-ui);
    font-size: 0.84rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.5rem;
    outline: none;
    cursor: pointer;
}

.reader-controls {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.lang-switch-group, .theme-switch-group, .font-controls {
    display: flex;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: 2px;
}

.lang-btn, .theme-btn {
    border: none;
    background: transparent;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.lang-btn.active, .theme-btn.active {
    background-color: var(--accent);
    color: #ffffff;
}

.btn-icon {
    background: transparent;
    border: none;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.35rem 0.65rem;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
}

.reader-main {
    max-width: 820px;
    margin: 2.5rem auto 5rem;
    padding: 0 1.5rem;
}

.reader-article {
    font-size: 1.15rem;
    line-height: 1.85;
}

/* Chapter Header */
.chapter-header {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.chapter-code-badge {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-gold);
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}

.chapter-title {
    font-family: var(--font-heading);
    font-size: clamp(1.45rem, 4.2vw, 2.35rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    margin: 0.25rem 0 0.5rem 0;
    word-break: break-word;
}

.chapter-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1.05rem, 2.8vw, 1.4rem);
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.35;
    margin-bottom: 0.65rem;
}

.chapter-author {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.nav-text-full {
    display: inline;
}

.nav-text-short {
    display: none;
}

.bilingual-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.bilingual-col {
    position: relative;
}

.bilingual-col.col-en {
    color: var(--text-secondary);
    font-style: italic;
    border-right: 1px dashed var(--border-color);
    padding-right: 1.25rem;
}

.lang-tag {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--accent);
    background-color: var(--accent-light);
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.45rem;
}

.reader-p {
    margin-bottom: 1.25rem;
    text-align: justify;
    text-indent: 1.5rem;
}

.line-ref {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8em;
    font-weight: 700;
    color: var(--accent);
    margin-right: 0.5em;
    opacity: 0.9;
    user-select: none;
    text-indent: 0;
}

.reader-footer {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    bottom: 0;
    z-index: 100;
}

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

.reading-sync-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.2rem;
    user-select: none;
}

.reading-page-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-ui);
    font-size: 0.92rem;
    font-weight: 700;
}

.reading-page-num {
    color: var(--text-primary);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    letter-spacing: 0.02em;
}

.reading-pct-val {
    color: var(--accent-gold);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

.sync-status-sub {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.progress-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 1001;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--accent-gold);
    transition: width 0.1s linear;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: #212529;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-ui);
    font-size: 0.88rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   SISTEMA DE MECENATO DE URUK, GUARDIÃO E PATROCÍNIO
   ========================================================= */

/* Selo Dourado de Guardião no Avatar */
.user-avatar-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.guardian-gold-seal {
    position: absolute;
    bottom: -4px;
    right: -4px;
    font-size: 0.95rem;
    filter: drop-shadow(0 0 4px #eab308);
    animation: pulseGold 2.5s infinite ease-in-out;
}

@keyframes pulseGold {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 3px rgba(234, 179, 8, 0.6)); }
    50% { transform: scale(1.18); filter: drop-shadow(0 0 7px rgba(234, 179, 8, 0.9)); }
}

.user-meta-wrap {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}

.user-guardian-tag {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Showcase: Patrocine uma Tabuleta Sagrada */
.sponsor-tablets-section {
    padding: 3.5rem 0 2rem 0;
}

.spotlight-tablet-card {
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-card) 60%, var(--bg-hover) 100%);
    border: 2px solid var(--accent-gold);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    margin-bottom: 2.25rem;
    box-shadow: 0 12px 36px rgba(200, 149, 40, 0.15);
    position: relative;
    overflow: hidden;
}

.spotlight-badge {
    display: inline-block;
    background: linear-gradient(135deg, #c89528, #92400e);
    color: #ffffff;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-pill);
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(200, 149, 40, 0.3);
}

.spotlight-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2.5rem;
    align-items: center;
}

.spotlight-cuneiform-seal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2.5rem 1.5rem;
    text-align: center;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.03);
}

.cuneiform-glyph-large {
    font-size: 3.5rem;
    line-height: 1;
    color: var(--accent-gold);
    text-shadow: 0 0 12px var(--accent-gold-glow);
    margin-bottom: 0.75rem;
    user-select: none;
}

.seal-caption {
    font-family: var(--font-ui);
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.spotlight-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.spotlight-title-row h3 {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    color: var(--text-primary);
    margin: 0;
}

.tablet-price-tag {
    background-color: var(--accent-light);
    color: var(--accent);
    font-family: var(--font-ui);
    font-size: 1.15rem;
    font-weight: 800;
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--accent);
}

.spotlight-desc {
    font-size: 0.98rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.spotlight-perks {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
}

.perk-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.88rem;
    color: var(--text-primary);
    font-weight: 500;
}

.spotlight-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-gold {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #ffffff !important;
    border: 1px solid #78350f;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
    transition: var(--transition);
}

.btn-gold:hover {
    background: linear-gradient(135deg, #b45309, #92400e);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.45);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 0.85rem 1.6rem;
    font-size: 1rem;
}

/* Grade de Outras Tabuletas */
.other-tablets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.mini-tablet-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.mini-tablet-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.mini-tablet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
}

.mini-tab-code {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-transform: uppercase;
}

.mini-tab-price {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text-muted);
}

.mini-tablet-card h4 {
    font-family: var(--font-heading);
    font-size: 1.08rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.mini-tablet-card p {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.15rem;
    flex-grow: 1;
}

.mini-tablet-footer {
    display: flex;
    gap: 0.65rem;
}

/* Banner VIP para Guardiões (Zero lembretes de doação) */
.guardian-vip-banner {
    background: linear-gradient(135deg, rgba(200, 149, 40, 0.12), rgba(139, 90, 43, 0.08));
    border: 1.5px solid var(--accent-gold);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    display: flex;
    align-items: center;
    gap: 1.75rem;
    box-shadow: 0 6px 20px rgba(200, 149, 40, 0.1);
}

.guardian-vip-icon {
    font-size: 3rem;
    line-height: 1;
}

.guardian-vip-info h4 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--accent-gold);
    margin-bottom: 0.35rem;
}

.guardian-vip-info p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.badge-active-patron {
    display: inline-block;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-pill);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
    white-space: nowrap;
}

/* Compartilhamento Social Comunitário */
.community-share-block {
    margin-top: 0.75rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 1rem;
}

.share-prompt {
    display: block;
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin-bottom: 0.65rem;
    font-weight: 600;
}

.share-buttons-row {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-share-whatsapp:hover {
    background-color: #25d366;
    color: #ffffff;
    border-color: #25d366;
}

.btn-share-x:hover {
    background-color: #000000;
    color: #ffffff;
    border-color: #000000;
}

.btn-share-telegram:hover {
    background-color: #229ed9;
    color: #ffffff;
    border-color: #229ed9;
}

.btn-share-copy:hover {
    background-color: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

/* Mural de Mecenas de Uruk */
.mural-section {
    padding: 3.5rem 0;
}

.mural-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2.5rem;
}

.mural-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
}

.mural-card:hover {
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.mural-card-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.mural-avatar-wrap {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, var(--accent-gold), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px var(--accent-gold-glow);
}

.mural-glyph {
    color: #ffffff;
    font-size: 1.35rem;
    line-height: 1;
}

.mural-patron-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.mural-patron-name {
    font-size: 0.98rem;
    color: var(--text-primary);
    font-weight: 700;
}

.mural-tier-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-escriba { color: var(--text-muted); }
.badge-guardiao-tab { color: #d97706; font-weight: 800; }
.badge-patrono-real { color: #8b5cf6; font-weight: 800; }
.badge-guardiao-sab { color: #2563eb; font-weight: 800; }

.mural-tablet-tag {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    color: var(--accent);
    background-color: var(--accent-light);
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
}

.mural-patron-quote {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    flex-grow: 1;
}

.mural-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px dashed var(--border-color);
    padding-top: 0.65rem;
}

.mural-amount {
    font-weight: 700;
    color: var(--accent-gold);
}

.mural-cta-box {
    background-color: var(--bg-surface);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Banner de Patrocínio no Leitor (reader.html) */
.tablet-patron-hero {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-hover) 100%);
    border: 2px solid var(--accent-gold);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.65rem;
    margin: 1.5rem 0 2rem 0;
    box-shadow: 0 4px 16px rgba(200, 149, 40, 0.15);
}

.patron-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.patron-hero-badge {
    font-family: var(--font-ui);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #ffffff;
    background: linear-gradient(135deg, #d97706, #92400e);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
}

.patron-hero-seal {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.patron-hero-intro {
    display: block;
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.patron-hero-name {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.patron-hero-quote {
    font-style: italic;
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-top: 0.4rem;
    padding-left: 0.75rem;
    border-left: 2.5px solid var(--accent-gold);
}

/* Convite de Patrocínio no Leitor */
.tablet-patron-invite {
    background-color: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.25rem;
    margin: 1.25rem 0 1.75rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.invite-msg {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.invite-icon {
    font-size: 1.2rem;
}

/* Novos campos do Modal de Doação / Patrocínio */
.sponsor-selected-banner {
    background-color: var(--accent-light);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.sponsor-banner-icon {
    font-size: 1.5rem;
}

.sponsor-banner-text {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.banner-sub {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.btn-clear-tab {
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--text-muted);
    cursor: pointer;
}

.sponsorship-selector-box {
    margin-bottom: 1.15rem;
}

.form-label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.form-select, .form-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-surface);
    color: var(--text-primary);
    font-family: var(--font-ui);
    transition: var(--transition);
}

.form-select:focus, .form-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px var(--accent-gold-glow);
}

.patron-form-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.form-checkbox-row {
    margin-top: 0.25rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    cursor: pointer;
}

/* =========================================================
   RESPONSIVIDADE ROBUSTA: TABLETS E MOBILES
   ========================================================= */

/* Tablets (iPad, Galaxy Tab, 769px a 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.25rem;
    }

    .spotlight-grid {
        grid-template-columns: 200px 1fr;
        gap: 1.75rem;
    }

    .other-tablets-grid {
        grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
        gap: 1.25rem;
    }

    .mural-grid {
        grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    }

    .reader-main {
        max-width: 760px;
        padding: 0 1.25rem;
    }

    /* Em tablets estreitos, modo bilíngue vertical para leitura confortável */
    .bilingual-card {
        gap: 1.25rem;
    }
}

/* Tablets em modo retrato e celulares em geral (<= 860px) */
@media (max-width: 860px) {
    .bilingual-card {
        grid-template-columns: 1fr !important;
        gap: 1.15rem;
        padding: 1.25rem;
    }

    .bilingual-col.col-en {
        border-right: none !important;
        border-bottom: 1px dashed var(--border-color);
        padding-right: 0;
        padding-bottom: 1.15rem;
    }
}

/* Celulares e Smartphones (<= 768px) */
@media (max-width: 768px) {
    /* Header do Site (Home) - Logo Centralizada e Demais Infos Abaixo */
    .header-inner {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 0.85rem !important;
        padding: 0.85rem 0.5rem !important;
    }

    .brand {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 auto !important;
        text-align: center !important;
        gap: 0.65rem !important;
    }

    .brand-logo {
        width: 44px !important;
        height: 44px !important;
    }

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

    .brand-text strong {
        font-size: 1.35rem !important;
        display: block !important;
    }

    .brand-text small {
        display: block !important;
        font-size: 0.76rem !important;
        opacity: 0.8 !important;
        margin-top: 1px !important;
    }

    .header-actions {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0.55rem !important;
        width: 100% !important;
    }

    .lang-selector-wrap {
        max-width: 155px !important;
    }

    .btn-donate {
        padding: 0.45rem 0.85rem !important;
        font-size: 0.82rem !important;
    }

    /* Hero */
    .hero-section {
        padding: 2rem 0 1.5rem;
    }

    .hero-title {
        font-size: clamp(1.75rem, 5.5vw, 2.35rem);
        margin-bottom: 0.85rem;
    }

    .hero-subtitle {
        font-size: 0.98rem;
        line-height: 1.55;
    }

    /* Showcase: Tabuletas Sagradas */
    .sponsor-tablets-section {
        padding: 2rem 0 1.5rem;
    }

    .spotlight-tablet-card {
        padding: 1.4rem 1.15rem;
        margin-bottom: 1.5rem;
    }

    .spotlight-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .spotlight-cuneiform-seal {
        padding: 1.5rem 1rem;
    }

    .cuneiform-glyph-large {
        font-size: 2.75rem;
    }

    .spotlight-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.45rem;
    }

    .spotlight-title-row h3 {
        font-size: 1.35rem;
    }

    .tablet-price-tag {
        font-size: 0.95rem;
        padding: 0.2rem 0.65rem;
    }

    .spotlight-desc {
        font-size: 0.9rem;
        line-height: 1.55;
        margin-bottom: 1rem;
    }

    .spotlight-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.65rem;
    }

    .spotlight-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .other-tablets-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Campanha e Desbloqueio Comunitário */
    .solidarity-card {
        padding: 1.5rem 1.15rem;
        gap: 1.5rem;
    }

    .solidarity-title {
        font-size: 1.45rem;
    }

    .goal-widget {
        padding: 1.25rem 1rem;
        gap: 1rem;
    }

    .goal-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .goal-pct-wrap {
        align-self: flex-start;
    }

    .goal-metrics-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .metric-item {
        text-align: left !important;
    }

    .share-buttons-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .share-buttons-row .btn-share {
        justify-content: center;
        width: 100%;
        font-size: 0.78rem;
    }

    .solidarity-chips-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .solidarity-actions-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .guardian-vip-banner {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
        gap: 1rem;
    }

    /* Mural de Mecenas */
    .mural-section {
        padding: 2rem 0;
    }

    .mural-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Modais */
    .modal-card, .modal-card-wide {
        width: 95vw;
        max-width: 95vw;
        padding: 1.25rem 1rem;
        max-height: 90vh;
        margin: 1rem auto;
    }

    .donation-values-row {
        gap: 0.35rem;
    }

    .donation-values-row .val-chip {
        padding: 0.45rem 0.55rem;
        font-size: 0.8rem;
    }

    .pay-tabs-nav {
        gap: 0.35rem;
    }

    .pay-tab-btn {
        padding: 0.45rem 0.65rem;
        font-size: 0.78rem;
    }

    /* =========================================================
       LEITOR MOBILE (reader.html)
       ========================================================= */

    /* Navbar do Leitor em Duas Linhas Perfeitas */
    .reader-header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        padding: 0.65rem 1rem;
    }

    .reader-nav-left {
        width: 100%;
        justify-content: flex-start;
        align-items: center;
        gap: 0.75rem;
    }

    .reader-back-btn {
        width: 38px;
        height: 38px;
        min-width: 38px;
        min-height: 38px;
    }

    .back-arrow-icon {
        width: 18px;
        height: 18px;
    }

    .reader-titles {
        flex: 1;
        min-width: 0;
    }

    .reader-titles .book-name {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100vw - 90px);
        margin-bottom: 0.2rem;
    }

    .reader-titles select {
        width: 100%;
        max-width: 100%;
        font-size: 0.82rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Controles do Leitor em Linha Completa */
    .reader-controls {
        width: 100%;
        justify-content: space-between;
        align-items: center;
        gap: 0.4rem;
        padding-top: 0.15rem;
    }

    .lang-switch-group, .theme-switch-group, .font-controls {
        padding: 1px;
    }

    .lang-btn {
        padding: 0.25rem 0.55rem;
        font-size: 0.72rem;
    }

    .theme-btn {
        padding: 0.25rem 0.45rem;
        font-size: 0.78rem;
    }

    .btn-icon {
        padding: 0.25rem 0.45rem;
        font-size: 0.78rem;
    }

    /* Corpo de Leitura Mobile */
    .reader-main {
        margin: 1.25rem auto 4.5rem;
        padding: 0 1rem;
    }

    .chapter-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .chapter-title {
        font-size: clamp(1.35rem, 5vw, 1.85rem);
        line-height: 1.22;
        margin: 0.25rem 0 0.4rem 0;
    }

    .chapter-subtitle {
        font-size: clamp(0.95rem, 3.5vw, 1.2rem);
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }

    .reader-p {
        font-size: 1.05rem;
        line-height: 1.72;
        text-indent: 1.15rem;
        margin-bottom: 1.15rem;
    }

    /* Banners de Patrocínio no Leitor Mobile */
    .tablet-patron-hero {
        padding: 1rem 1.15rem;
        margin: 1.15rem 0 1.5rem 0;
    }

    .patron-hero-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .patron-hero-name {
        font-size: 1.15rem;
    }

    .tablet-patron-invite {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 0.75rem;
        padding: 0.85rem 1rem;
    }

    .tablet-patron-invite .btn {
        width: 100%;
        justify-content: center;
    }

    /* Rodapé do Leitor Mobile */
    .footer-nav-flex {
        gap: 0.4rem;
        padding: 0 0.5rem;
    }

    .nav-text-full {
        display: none !important;
    }

    .nav-text-short {
        display: inline !important;
    }

    .footer-nav-flex .btn-secondary,
    .footer-nav-flex .btn-primary {
        padding: 0.45rem 0.65rem;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .reading-page-counter {
        font-size: 0.82rem;
        gap: 0.25rem;
    }

    .reading-page-num {
        padding: 0.12rem 0.35rem;
        font-size: 0.78rem;
    }

    .reading-pct-val {
        font-size: 0.74rem;
    }

    .sync-status-sub {
        font-size: 0.68rem;
    }
}

/* Celulares Muito Estreitos (<= 400px) */
@media (max-width: 400px) {
    .reader-controls {
        gap: 0.25rem;
    }

    .lang-btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.68rem;
    }

    .theme-btn {
        padding: 0.2rem 0.35rem;
        font-size: 0.74rem;
    }

    .reading-pct-val {
        display: none;
    }

    .footer-nav-flex .btn-secondary,
    .footer-nav-flex .btn-primary {
        padding: 0.4rem 0.5rem;
        font-size: 0.74rem;
    }
}


