/* === Rota Viva — Design System v0.3.0 (Light Mode) === */

/* ── Tema neutro (pré-login) — identidade MIDR ── */
:root {
    /* Cores app (tema neutro = MIDR azul) */
    --color-primary: #FF9600;
    --color-primary-dark: #CC7A00;
    --color-primary-light: #FFB84D;
    --color-accent: #FFD700;
    --color-bg: #2A2A2A;
    --color-bg-gradient: none;
    --color-surface: #1E1E1E;
    --color-card: #353535;
    --color-nav-bg: var(--color-primary);
    --color-nav-text: #FFFFFF;
    --color-card-border: rgba(255, 150, 0, 0.12);
    --color-input-bg: rgba(255, 255, 255, 0.06);
    --color-input-text: #FFFFFF;
    --color-text: #FFFFFF;
    --color-text-muted: rgba(255, 255, 255, 0.6);
    --color-text-faint: rgba(255, 255, 255, 0.3);
    --color-text-on-primary: #FFFFFF;
    --color-success: #4CAF50;
    --color-error: #FF4B4B;
    --color-warning: #FFB800;

    /* Paleta MIDR (landing page) */
    --midr-white: #FFFFFF;
    --midr-blue: #005CAB;
    --midr-green: #009B3A;
    --midr-yellow: #F5C200;
    --midr-red: #D02020;
    --midr-text: #1A1A1A;
    --midr-text-light: #555555;

    /* Tipografia */
    --font-display: 'Baloo 2', -apple-system, sans-serif;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Escala tipográfica */
    --font-hero: 800 32px/1.1 var(--font-display);
    --font-h1: 700 24px/1.2 var(--font-display);
    --font-h2: 700 20px/1.25 var(--font-display);
    --font-h3: 700 17px/1.3 var(--font-display);
    --font-body: 400 15px/1.5 var(--font-ui);
    --font-strong: 600 15px/1.5 var(--font-ui);
    --font-label: 500 13px/1.4 var(--font-ui);
    --font-caption: 400 11px/1.4 var(--font-ui);

    /* Espaçamento */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Bordas */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 50%;

    /* Imagens */
    --img-background: none;
}

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

body {
    font: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

body.theme-transitioning {
    opacity: 0;
    transition: opacity 0.2s ease;
}
body.theme-ready {
    opacity: 1;
    transition: opacity 0.3s ease;
}

h1, h2, h3, h4 { font-family: var(--font-display); }

/* === Loading === */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: var(--spacing-md);
    color: var(--color-text-muted);
    font: var(--font-label);
}

.loading-spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--color-card-border);
    border-top-color: var(--color-primary);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* === Layout === */
.view-container {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.page {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg) 20px;
    padding-top: env(safe-area-inset-top, 24px);
    background: var(--color-bg);
}

.page-scroll {
    justify-content: flex-start;
    padding-top: 40px;
}

/* === Brand === */
.brand {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.brand-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

.brand h1 {
    font: var(--font-h1);
    color: var(--color-text);
}

.brand p {
    font: var(--font-label);
    color: var(--color-text-muted);
    margin-top: var(--spacing-xs);
}

/* === Card === */
.card {
    background: var(--color-card);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card-title {
    font: var(--font-h2);
    margin-bottom: 20px;
    text-align: center;
    color: var(--color-text);
}

/* === Form === */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    font: var(--font-label);
    color: var(--color-text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group label .optional {
    font-weight: 400;
    text-transform: none;
    font-size: 11px;
    color: var(--color-text-faint);
}

.form-input {
    width: 100%;
    padding: 14px var(--spacing-md);
    background: var(--color-input-bg);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-sm);
    color: var(--color-input-text);
    font: var(--font-body);
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}

.form-input:focus {
    border-color: var(--color-primary);
}

.form-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.form-select {
    width: 100%;
    padding: 14px var(--spacing-md);
    background: var(--color-input-bg);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-sm);
    color: var(--color-input-text);
    font: var(--font-body);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='rgba(0,0,0,0.35)' d='M1.4 0L6 4.6 10.6 0 12 1.4l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--spacing-md) center;
}

.form-select option {
    background: #fff;
    color: #1A1A1A;
}

.form-hint {
    font: var(--font-caption);
    color: var(--color-text-faint);
    margin-top: var(--spacing-xs);
}

.form-divider {
    border: none;
    border-top: 1px solid var(--color-card-border);
    margin: 20px 0 var(--spacing-md);
}

.form-divider-label {
    text-align: center;
    font: var(--font-caption);
    color: var(--color-text-faint);
    margin: -8px 0 var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === Buttons === */
.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-sm);
    font: var(--font-strong);
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    text-align: center;
    display: block;
    text-decoration: none;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
    background: var(--color-primary);
    color: var(--color-text-on-primary);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-card-border);
    color: var(--color-text-muted);
}

.btn + .btn { margin-top: var(--spacing-md); }

/* === Messages === */
.msg {
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    font: var(--font-label);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.msg-error {
    background: rgba(198, 40, 40, 0.08);
    border: 1px solid rgba(198, 40, 40, 0.2);
    color: var(--color-error);
}

.msg-success {
    background: rgba(46, 125, 50, 0.08);
    border: 1px solid rgba(46, 125, 50, 0.2);
    color: var(--color-success);
}

/* === Links === */
.link {
    color: var(--color-primary);
    text-decoration: none;
    font: var(--font-label);
    text-align: center;
    display: block;
    margin-top: var(--spacing-md);
}

.link:hover { text-decoration: underline; }

/* === Dashboard === */
.dashboard-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--color-card-border);
    background: var(--color-surface);
}

.dashboard-header h2 {
    font: var(--font-h2);
    color: var(--color-text);
}

.dashboard-header p {
    color: var(--color-text-muted);
    font: var(--font-label);
    margin-top: var(--spacing-xs);
}

.dashboard-body {
    padding: var(--spacing-lg) 20px calc(80px + env(safe-area-inset-bottom, 0px));
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

.dashboard-card {
    background: var(--color-card);
    border: 1px solid var(--color-card-border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: var(--spacing-md);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dashboard-card h3 {
    font: var(--font-h3);
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

.dashboard-card p {
    color: var(--color-text-muted);
    font: var(--font-label);
}

/* Progress card */
.dashboard-card-progress { padding-bottom: 16px; }

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-level {
    display: flex;
    align-items: center;
    gap: 8px;
    font: var(--font-h3);
    color: var(--color-text);
}

.progress-level-name { font: var(--font-h3); }

.progress-points {
    text-align: right;
}

.progress-points-value {
    font: var(--font-h2);
    color: var(--color-primary);
}

.progress-points-unit {
    font: var(--font-caption);
    color: var(--color-text-muted);
    margin-left: 4px;
}

.progress-bar-wrap { margin-top: 4px; }

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255,255,255,0.08);
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: 5px;
    transition: width 0.6s ease-out;
    min-width: 2px;
}

.progress-bar-label {
    display: flex;
    justify-content: space-between;
    font: var(--font-caption);
    color: var(--color-text-faint);
    margin-top: 6px;
}

/* Streak card */
.dashboard-card-streak { padding: 16px 20px; }

.streak-display {
    display: flex;
    align-items: center;
    gap: 12px;
}

.streak-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--color-text-faint);
    transition: all 0.3s;
}

.streak-icon.streak-active {
    background: rgba(255,100,0,0.15);
    color: #FF6400;
}

.streak-count {
    font: var(--font-h2);
    color: var(--color-text);
}

.streak-label {
    font: var(--font-label);
    color: var(--color-text-muted);
    margin-left: 4px;
}

.btn-logout {
    margin-top: var(--spacing-xl);
    background: transparent;
    border: 1px solid rgba(198, 40, 40, 0.3);
    color: var(--color-error);
}

/* ================================================= */
/* === LANDING PAGE — Identidade MIDR / Gov Federal  */
/* ================================================= */

.landing {
    background: var(--midr-white);
    color: var(--midr-text);
    min-height: 100vh;
}

/* Navbar */
.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) 20px;
    background: var(--midr-white);
    border-bottom: 3px solid var(--midr-blue);
    position: sticky;
    top: 0;
    z-index: 100;
}

.landing-nav-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.landing-nav-brand i {
    color: var(--midr-green);
    font-size: 24px;
}

.landing-nav-brand span {
    font: var(--font-h3);
    color: var(--midr-text);
}

.landing-nav a {
    font: var(--font-label);
    color: var(--midr-blue);
    text-decoration: none;
}

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

/* Hero — Full bleed with video/image background */
.landing-hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0a1929;
}

.landing-hero-media {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
}

.landing-hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 100%);
    z-index: 2;
}

/* Geometric MIDR elements */
.landing-hero .geo-circle {
    position: absolute;
    width: 180px; height: 180px;
    border-radius: var(--radius-full);
    background: var(--midr-blue);
    top: -60px; left: -60px;
    z-index: 3;
    opacity: 0.8;
}

.landing-hero .geo-rect {
    position: absolute;
    width: 120px; height: 120px;
    background: var(--midr-yellow);
    top: -30px; right: -30px;
    z-index: 3;
    opacity: 0.8;
}

.landing-hero .geo-semi {
    position: absolute;
    width: 160px; height: 80px;
    border-radius: 0 0 80px 80px;
    background: var(--midr-green);
    bottom: 0; right: 40px;
    z-index: 3;
    opacity: 0.8;
}

.landing-hero-content {
    position: relative;
    z-index: 4;
    text-align: center;
    padding: 60px 20px;
    max-width: 680px;
}

.landing-hero-content h1 {
    font: var(--font-hero);
    color: #FFFFFF;
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    font-size: 36px;
}

.landing-hero-content p {
    font: var(--font-body);
    color: rgba(255,255,255,0.9);
    margin-bottom: var(--spacing-lg);
    font-size: 16px;
    line-height: 1.6;
}

.btn-hero {
    display: inline-block;
    width: auto;
    padding: 16px 36px;
    background: var(--midr-yellow);
    color: var(--midr-text);
    font: 700 17px/1.3 var(--font-display);
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-hero:hover { opacity: 0.9; }

.landing-hero-proof {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    padding: 8px 16px;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    color: #fff;
    font: var(--font-label);
}

.landing-hero-proof i {
    color: var(--midr-green);
}

.landing-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    opacity: 0.7;
    font: var(--font-caption);
    color: rgba(255,255,255,0.7);
}

/* Section: Espelho de Dores */
.landing-mirror {
    padding: 48px 20px;
    background: #F8F8F8;
    text-align: center;
}

.landing-mirror h2 {
    font: var(--font-h1);
    color: var(--midr-text);
    margin-bottom: var(--spacing-sm);
}

.landing-mirror .subtitle {
    font: var(--font-body);
    color: var(--midr-text-light);
    margin-bottom: var(--spacing-xl);
}

.landing-mirror-grid {
    display: flex;
    gap: var(--spacing-lg);
    max-width: 800px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.landing-mirror-block {
    flex: 1;
    min-width: 280px;
    max-width: 380px;
    text-align: left;
    padding: var(--spacing-lg);
    background: var(--midr-white);
    border-radius: var(--radius-md);
    border-left: 4px solid;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.landing-mirror-block.mel { border-color: var(--midr-yellow); }
.landing-mirror-block.pesca { border-color: var(--midr-blue); }

.landing-mirror-block h3 {
    font: var(--font-h3);
    color: var(--midr-text);
    margin-bottom: var(--spacing-sm);
}

.landing-mirror-block p {
    font: var(--font-body);
    color: var(--midr-text-light);
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
}

.landing-transition {
    text-align: center;
    padding: var(--spacing-lg) 20px;
    font: var(--font-strong);
    color: var(--midr-text);
    background: #F8F8F8;
}

/* Section: Personalizada por Rota */
.landing-route-section {
    padding: 48px 20px;
    position: relative;
    overflow: hidden;
}

.landing-route-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: var(--spacing-xl);
    align-items: center;
    flex-wrap: wrap;
}

.landing-route-visual {
    flex: 1;
    min-width: 240px;
    text-align: center;
}

.landing-route-visual .photo-placeholder {
    width: 200px;
    height: 200px;
    border-radius: var(--radius-lg);
    background: rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 64px;
}

.landing-route-content {
    flex: 1.3;
    min-width: 280px;
}

.landing-route-content h2 {
    font: var(--font-h1);
    color: var(--midr-text);
    margin-bottom: var(--spacing-sm);
}

.landing-route-content .hook {
    font: var(--font-body);
    color: var(--midr-text-light);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.landing-route-desires {
    list-style: none;
    padding: 0;
    margin-bottom: var(--spacing-lg);
}

.landing-route-desires li {
    font: var(--font-body);
    color: var(--midr-text);
    padding: var(--spacing-sm) 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.landing-route-desires li i {
    font-size: 14px;
}

.btn-route {
    display: inline-block;
    width: auto;
    padding: 14px 28px;
    color: #fff;
    font: var(--font-strong);
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-route:hover { opacity: 0.9; }

/* Section: Features */
.landing-features {
    padding: 48px 20px;
    background: var(--midr-white);
    text-align: center;
}

.landing-features h2 {
    font: var(--font-h1);
    color: var(--midr-text);
    margin-bottom: var(--spacing-xl);
}

.landing-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-lg);
    max-width: 800px;
    margin: 0 auto;
}

.landing-feature-item {
    text-align: center;
    padding: var(--spacing-lg);
}

.landing-feature-item i {
    font-size: 32px;
    color: var(--midr-blue);
    margin-bottom: var(--spacing-sm);
}

.landing-feature-item h3 {
    font: var(--font-h3);
    color: var(--midr-text);
    margin-bottom: var(--spacing-xs);
}

.landing-feature-item p {
    font: var(--font-label);
    color: var(--midr-text-light);
    line-height: 1.5;
}

/* Section: FAQ */
.landing-faq {
    padding: 48px 20px;
    background: #F8F8F8;
}

.landing-faq h2 {
    font: var(--font-h1);
    color: var(--midr-text);
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.landing-faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.landing-faq-item {
    background: var(--midr-white);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    cursor: pointer;
}

.landing-faq-item h3 {
    font: var(--font-strong);
    color: var(--midr-text);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.landing-faq-item h3 i {
    color: var(--midr-blue);
    font-size: 14px;
    transition: transform 0.2s;
}

.landing-faq-item.open h3 i {
    transform: rotate(90deg);
}

.landing-faq-item p {
    font: var(--font-body);
    color: var(--midr-text-light);
    margin-top: var(--spacing-sm);
    line-height: 1.6;
    display: none;
}

.landing-faq-item.open p {
    display: block;
}

/* Proof section */
.landing-proof {
    padding: 48px 20px;
    background: var(--midr-white);
    text-align: center;
}

.landing-proof h2 {
    font: var(--font-h1);
    color: var(--midr-text);
    margin-bottom: var(--spacing-xl);
}

.landing-proof-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-xl);
}

.landing-proof-stat {
    text-align: center;
}

.landing-proof-stat .number {
    font: var(--font-hero);
    color: var(--midr-blue);
}

.landing-proof-stat .label {
    font: var(--font-label);
    color: var(--midr-text-light);
}

.landing-proof-logos {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    align-items: center;
    opacity: 0.6;
    font: var(--font-label);
    color: var(--midr-text-light);
}

/* Founder CTA */
.landing-founder {
    padding: 48px 20px;
    background: var(--midr-blue);
    color: #fff;
    text-align: center;
}

.landing-founder h2 {
    font: var(--font-h1);
    color: #fff;
    margin-bottom: var(--spacing-sm);
}

.landing-founder p {
    font: var(--font-body);
    color: rgba(255,255,255,0.8);
    max-width: 500px;
    margin: 0 auto var(--spacing-lg);
}

.landing-founder .btn-founder {
    display: inline-block;
    width: auto;
    padding: 16px 36px;
    background: var(--midr-yellow);
    color: var(--midr-text);
    font: 700 17px/1.3 var(--font-display);
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
}

.landing-founder .btn-founder:hover { opacity: 0.9; }

.landing-founder-trust {
    margin-top: var(--spacing-md);
    font: var(--font-caption);
    color: rgba(255,255,255,0.6);
}

/* Footer */
.landing-footer {
    padding: var(--spacing-lg) 20px;
    background: var(--midr-text);
    color: rgba(255,255,255,0.5);
    text-align: center;
    font: var(--font-caption);
}

.landing-footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

/* ================================================= */
/* === TRAIL — Duolingo S-Curve                      */
/* ================================================= */

/* ══════════════════════════════════════════════════
   TRAIL VIEW — 3D coin style (Duolingo)
   Colors from theme via CSS variables (dark/light)
   ══════════════════════════════════════════════════ */
.trail-view {
    background: var(--color-bg);
    min-height: 100vh;
}

.trail-header {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    background: var(--color-surface);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-card-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.trail-header h2 {
    flex: 1;
    font-size: 20px;
    font-weight: 800;
    color: var(--color-primary);
    text-align: left;
    margin: 0;
}

.trail-header-stats {
    display: flex;
    align-items: center;
    gap: 16px;
}

.trail-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
}

.trail-stat i { font-size: 16px; }
.trail-stat-points i { color: #FFB800; }
.trail-stat-streak i { color: #FF9600; }

.trail-back {
    width: 40px; height: 40px;
    background: none;
    border: 1px solid var(--color-card-border);
    border-radius: 8px;
    color: var(--color-text);
    font-size: 16px;
    cursor: pointer;
    margin-right: 12px;
}

.trail-header-right { width: 40px; }

/* Subject Grid */
.trail-subjects {
    padding: 20px;
    max-width: 480px;
    margin: 0 auto;
}

.subject-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--color-card);
    border: 1px solid var(--color-card-border);
    border-left: 4px solid;
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    transition: transform 0.1s;
}

.subject-card:active { transform: scale(0.98); }

.subject-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    flex-shrink: 0;
}

.subject-info { flex: 1; }
.subject-info h3 { font-size: 16px; font-weight: 700; color: var(--color-text); margin: 0; }
.subject-info p { font-size: 13px; color: var(--color-text-muted); margin-top: 2px; }

/* ═══ DUOLINGO S-CURVE TRAIL ═══ */
.duo-trail-container {
    padding: 0 10px 100px;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    overflow: visible;
}

.duo-trail {
    position: relative;
    padding-top: 8px;
}

.duo-trail-item { margin-bottom: 18px; }

/* Module Header — wide but with rounded corners */
.duo-module-header {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    margin: 8px -6px 20px;
    width: calc(100% + 12px);
    border-radius: 14px;
    color: #fff;
    position: relative;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
    border-bottom: 3px solid rgba(255,200,50,0.4);
}

.duo-module-info { flex: 1; }

.duo-module-section {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 2px;
}

.duo-module-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.duo-module-icon {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    margin-left: 12px;
}

.duo-module-progress { font-size: 12px; opacity: 0.8; }

/* ═══ 3D COIN LESSON BUBBLE ═══ */
.duo-bubble-wrap {
    position: relative;
    width: 72px;
    transition: margin-left 0.3s ease;
    margin-bottom: 18px;
    overflow: visible;
}

/* Connecting cord between lessons */
.duo-bubble-wrap::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 22px;
    background: linear-gradient(to bottom, rgba(255,180,0,0.3), rgba(255,180,0,0.15));
    border-radius: 3px;
    z-index: -1;
}

.duo-bubble-wrap:first-child::before,
.duo-trail-item:first-child .duo-bubble-wrap::before {
    display: none; /* no cord above first bubble */
}

.duo-bubble {
    width: 72px; height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 28px;
    transition: transform 0.15s;
    position: relative;
    /* 3D coin effect */
    background: linear-gradient(145deg, #FFB800 0%, #E8960D 50%, #CC7A00 100%);
    border: 3px solid rgba(255,200,50,0.4);
    border-bottom: 6px solid #8B5E00;
    box-shadow:
        0 6px 0 #7A5200,
        0 8px 20px rgba(0,0,0,0.4),
        inset 0 2px 4px rgba(255,255,255,0.3),
        inset 0 -2px 4px rgba(0,0,0,0.2);
}

/*
.duo-bubble::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 10px;
    width: 20px;
    height: 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: rotate(-30deg);
}
*/

.duo-bubble i {
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3));
    position: relative;
    z-index: 1;
}

.duo-bubble:active { transform: scale(0.92) translateY(3px); box-shadow: 0 3px 0 #7A5200, 0 4px 12px rgba(0,0,0,0.4); }

.duo-active {
    background: linear-gradient(145deg, #FFB800 0%, #E8960D 50%, #CC7A00 100%);
}

.duo-done {
    background: linear-gradient(145deg, #4CAF50 0%, #388E3C 50%, #2E7D32 100%);
    border-color: rgba(100,200,100,0.4);
}

.duo-locked {
    background: linear-gradient(145deg, #555566 0%, #3D3D4E 50%, #2A2A3A 100%);
    border-color: rgba(100,100,120,0.3);
    border-bottom-color: #1A1A28;
    color: rgba(255,255,255,0.35);
    cursor: not-allowed;
    box-shadow: 0 6px 0 #1A1A28, 0 8px 20px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.05);
}

.duo-locked::after { display: none; }

/* Lesson Popup */
.duo-popup {
    position: absolute;
    left: -54px;
    top: 78px;
    width: 180px;
    background: var(--color-card);
    border: 1px solid var(--color-card-border);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
    z-index: 10;
    text-align: center;
}

.duo-popup::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px; height: 12px;
    background: var(--color-card);
    border-top: 1px solid var(--color-card-border);
    border-left: 1px solid var(--color-card-border);
}

.duo-popup-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 10px;
}

.duo-popup-btn {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #fff !important;
    border: none;
    cursor: pointer;
    border-bottom: 3px solid rgba(0,0,0,0.2);
}

/* Character floating alongside lesson bubble */
.duo-character-float {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 1;
}

.duo-character-img {
    width: 220px;
    height: 220px;
    object-fit: contain;
    animation: char-float 3s ease-in-out infinite;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.4));
}

.duo-character-shadow {
    width: 100px;
    height: 16px;
    background: radial-gradient(ellipse, rgba(0,0,0,0.3) 0%, transparent 70%);
    border-radius: 50%;
    margin-top: -4px;
    animation: shadow-pulse 3s ease-in-out infinite;
}

.duo-character-stars {
    display: flex;
    gap: 2px;
    margin-top: 4px;
}

.duo-character-stars i {
    font-size: 18px;
    color: #FFB800;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

@keyframes char-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes shadow-pulse {
    0%, 100% { transform: scaleX(1); opacity: 1; }
    50% { transform: scaleX(0.8); opacity: 0.6; }
}

/* Chest (timed quiz reward) */
.duo-chest {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s;
}

.duo-chest-img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    display: block;
    transition: opacity 0.2s;
}

.duo-chest:active { transform: scale(0.92) translateY(3px); }

.duo-chest-done .duo-chest-img {
    opacity: 0.5;
    filter: grayscale(1);
}

.duo-chest-locked {
    cursor: not-allowed;
}

.duo-chest-locked .duo-chest-img {
    opacity: 0.35;
    filter: grayscale(1);
}

/* Trail Empty State */
.trail-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-muted);
}

.trail-empty h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--color-text); }
.trail-empty p { font-size: 14px; color: var(--color-text-faint); }

/* Video View */
.video-view {
    background: var(--color-bg);
    min-height: 100vh;
}

.video-container {
    padding: 0;
    width: 100%;
}

.video-responsive {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-info {
    padding: 20px 20px 40px;
}

.video-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 20px;
}

.video-done-btn {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #fff !important;
    border: none;
    cursor: pointer;
    border-bottom: 3px solid rgba(0,0,0,0.2);
}

.video-completed {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-success);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0; right: 0;
    display: flex;
    background: var(--color-nav-bg);
    padding: 8px 0 env(safe-area-inset-bottom, 8px);
    z-index: 100;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 0;
    color: var(--color-nav-text);
    opacity: 0.7;
    font: var(--font-caption);
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
}

.bottom-nav-item i { font-size: 18px; }
.bottom-nav-item.active { color: var(--color-nav-text); opacity: 1; }

/* === Login Page — floating inputs, no card === */
.login-page {
    background: var(--color-bg);
}

.brand-character {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: var(--spacing-sm);
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}

.login-title {
    color: var(--color-primary) !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.login-form-container {
    width: 100%;
    max-width: 340px;
    padding: 0 20px;
}

.login-input-group {
    position: relative;
    margin-bottom: var(--spacing-md);
}

.login-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-primary);
    font-size: 16px;
    z-index: 1;
}

.login-input {
    width: 100%;
    padding: 16px 16px 16px 44px;
    background: var(--color-primary-light);
    border: none;
    border-radius: 28px;
    color: #333;
    font: var(--font-body);
    font-size: 16px;
    outline: none;
    -webkit-appearance: none;
}

.login-input::placeholder {
    color: rgba(0,0,0,0.4);
}

.login-input:focus {
    box-shadow: 0 0 0 2px var(--color-primary);
}

.login-btn {
    border-radius: 28px;
    margin-top: var(--spacing-sm);
    font-size: 16px;
    padding: 16px;
}

.login-link {
    color: var(--color-primary-light);
    text-decoration: none;
    font: var(--font-label);
    text-align: center;
    display: block;
    margin-top: var(--spacing-md);
}



/* ================================================= */
/* === QUIZ                                          */
/* ================================================= */

.quiz-view { background: var(--color-bg); }

.quiz-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) 20px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-card-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.quiz-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--color-input-bg);
    border-radius: 4px;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.quiz-score {
    font: var(--font-label);
    color: var(--color-text-muted);
    white-space: nowrap;
}

.quiz-body {
    padding: var(--spacing-lg) 20px;
    max-width: 480px;
    margin: 0 auto;
}

.quiz-question {
    margin-bottom: var(--spacing-xl);
}

.quiz-question-text {
    font: var(--font-h2);
    color: var(--color-text);
    line-height: 1.4;
}

.quiz-options { display: flex; flex-direction: column; gap: var(--spacing-sm); }

.quiz-option {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: 14px var(--spacing-md);
    background: var(--color-card);
    border: 2px solid var(--color-card-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: left;
    font: var(--font-body);
    color: var(--color-text);
    transition: border-color 0.2s;
}

.quiz-option:hover { border-color: var(--color-primary); }
.quiz-option.selected { border-color: var(--color-primary); background: var(--color-primary-light); }
.quiz-option.correct { border-color: var(--color-success); background: rgba(46,125,50,0.08); }
.quiz-option.wrong { border-color: var(--color-error); background: rgba(198,40,40,0.08); }

.quiz-option-letter {
    width: 28px; height: 28px;
    border-radius: var(--radius-full);
    background: var(--color-input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font: var(--font-strong);
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.quiz-option.selected .quiz-option-letter { background: var(--color-primary); color: var(--color-text-on-primary); }
.quiz-option.correct .quiz-option-letter { background: var(--color-success); color: #fff; }
.quiz-option.wrong .quiz-option-letter { background: var(--color-error); color: #fff; }

.quiz-option-text { flex: 1; }

.quiz-actions {
    margin-top: var(--spacing-xl);
}

.quiz-feedback {
    text-align: center;
}

.quiz-feedback-icon {
    font: var(--font-h2);
    margin-bottom: var(--spacing-md);
}

.quiz-feedback-icon.correct { color: var(--color-success); }
.quiz-feedback-icon.wrong { color: var(--color-error); }

.quiz-finish {
    text-align: center;
    padding: 60px 20px;
}

.quiz-finish-icon { font-size: 64px; margin-bottom: var(--spacing-md); }
.quiz-finish h2 { font: var(--font-h1); color: var(--color-text); }
.quiz-finish-score { font: var(--font-h2); color: var(--color-primary); margin: var(--spacing-sm) 0; }

.quiz-finish-bar {
    width: 200px;
    height: 12px;
    background: var(--color-input-bg);
    border-radius: 6px;
    margin: var(--spacing-md) auto;
    overflow: hidden;
}

.quiz-finish-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
}

.quiz-finish-msg {
    font: var(--font-body);
    color: var(--color-text-muted);
}

.quiz-empty { text-align: center; padding: 60px 20px; }
.quiz-empty h3 { font: var(--font-h2); color: var(--color-text); }
.quiz-empty p { font: var(--font-body); color: var(--color-text-muted); }

/* === Responsive === */
@media (min-width: 480px) {
    .card { padding: var(--spacing-xl); }
}

@media (max-width: 600px) {
    .landing-route-inner { flex-direction: column; text-align: center; }
    .landing-route-desires { text-align: left; }
    .landing-hero { min-height: 420px; }
    .landing-hero-content h1 { font-size: 28px; }
}

/* === App Version Footer === */
.app-version {
    position: fixed;
    bottom: 64px; /* above bottom nav */
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: rgba(0,0,0,0.15);
    pointer-events: none;
    z-index: 9999;
}

/* === TRUE_FALSE Buttons === */
.quiz-tf {
    display: flex;
    gap: 12px;
    padding: 0 20px;
    margin-bottom: 24px;
}
.quiz-tf-btn {
    flex: 1;
    padding: 18px 16px;
    border-radius: 14px;
    border: 2px solid var(--color-card-border, rgba(0,0,0,0.1));
    background: var(--color-card, #fff);
    color: var(--color-text, #1a1208);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.quiz-tf-btn:active { transform: scale(0.97); }
.quiz-tf-btn.selected {
    border-color: var(--color-primary, #FF9600);
    background: var(--color-primary-light, #FFF3B0);
}
.quiz-tf-btn.correct {
    border-color: var(--color-success, #2E7D32);
    background: #E8F5E9;
    color: var(--color-success, #2E7D32);
}
.quiz-tf-btn.wrong {
    border-color: var(--color-error, #C62828);
    background: #FFEBEE;
    color: var(--color-error, #C62828);
}

/* === ESSAY / SHORT_ANSWER === */
.quiz-essay {
    padding: 0 20px;
    margin-bottom: 24px;
}
.quiz-essay-input {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    border: 2px solid var(--color-card-border, rgba(0,0,0,0.1));
    background: var(--color-card, #fff);
    color: var(--color-text, #1a1208);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    resize: vertical;
    min-height: 100px;
    box-sizing: border-box;
}
.quiz-essay-input:focus {
    outline: none;
    border-color: var(--color-primary, #FF9600);
}
.quiz-essay-input:disabled {
    opacity: 0.6;
    background: var(--color-input-bg, rgba(0,0,0,0.04));
}

/* === Feedback correct label === */
.quiz-feedback-label {
    font-size: 14px;
    color: var(--color-text-muted, #5C4A1A);
    margin: 8px 0 12px;
    text-align: center;
}

/* === Multi-select hint === */
.quiz-question-hint {
    font-size: 13px;
    color: var(--color-primary, #FF9600);
    margin-top: 8px;
    font-weight: 500;
}
.quiz-question-hint i { margin-right: 4px; }

/* === DIY_PROJECT === */
.quiz-diy {
    padding: 0 20px;
    margin-bottom: 24px;
}
.quiz-diy-btn {
    width: 100%;
    padding: 32px 16px;
    border-radius: 16px;
    border: 2px dashed var(--color-primary, #FF9600);
    background: var(--color-primary-light, #FFF3B0);
    color: var(--color-primary-dark, #C49B00);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.quiz-diy-btn:active { transform: scale(0.97); }
.quiz-diy-btn i { margin-right: 8px; font-size: 24px; }
.quiz-diy-preview {
    position: relative;
    margin-bottom: 12px;
}
.quiz-diy-preview img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 14px;
    border: 2px solid var(--color-card-border, rgba(0,0,0,0.1));
}
.quiz-diy-retake {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
}
.quiz-diy-retake i { margin-right: 4px; }

/* Version footer */
.version-footer {
    text-align: center;
    font-size: 11px;
    color: rgba(255,255,255,0.2);
    padding: 16px 0 calc(env(safe-area-inset-bottom, 0px) + 8px);
    letter-spacing: 0.5px;
}

/* ═══ STICKY MODULE BOX (Duolingo — scroll-based) ═══ */
.duo-sticky-module {
    position: sticky;
    top: 68px; /* fallback — overridden by JS with actual header offsetHeight */
    z-index: 40;
    display: flex;
    align-items: center;
    padding: 12px 18px;
    margin: 4px 12px 8px;
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
    transition: background-color 0.3s ease;
}

.duo-sticky-module-info { flex: 1; }

.duo-sticky-module-section {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
    margin-bottom: 2px;
}

.duo-sticky-module-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}

.duo-sticky-module-icon {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    margin-left: 12px;
}

/* Module Divider (text separator in trail flow) */
.duo-module-divider {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-faint);
    letter-spacing: 0.5px;
    padding: 20px 0 8px;
    margin-bottom: 4px;
    user-select: none;
}

/* ═══ GALERIA DE SABERES ═══ */
.gallery-view {
    background: var(--color-bg);
    min-height: 100vh;
    padding-bottom: 80px;
}

/* Header */
.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-card-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.gallery-header h2 {
    font-size: 19px;
    font-weight: 800;
    color: var(--color-primary);
    margin: 0;
}

.gallery-header-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gallery-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
}

.gallery-stat .fa-trophy { color: #FFC800; }
.gallery-stat .fa-bolt   { color: #1CB0F6; }

/* Top Users bar */
.gallery-top-users {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-card-border);
    padding: 12px 0 10px;
}

.gallery-top-users-scroll {
    display: flex;
    gap: 18px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.gallery-top-users-scroll::-webkit-scrollbar { display: none; }

.gallery-top-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    cursor: pointer;
}

.gallery-top-user-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    border: 3px solid var(--color-primary);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-card);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.gallery-top-user-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.gallery-top-user-initial {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-primary);
}

.gallery-top-user-name {
    font-size: 11px;
    color: var(--color-text-muted);
    max-width: 64px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Feed */
.gallery-feed {
    max-width: 600px;
    margin: 0 auto;
}

.gallery-post {
    border-bottom: 8px solid var(--color-bg);
    background: var(--color-surface);
    margin-bottom: 0;
}

.gallery-post-official {
    border-left: 4px solid var(--color-accent);
}

/* Post header */
.gallery-post-header {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    gap: 10px;
}

.gallery-post-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--color-card);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid var(--color-primary);
}

.gallery-post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gallery-post-avatar-initial { font-size: 16px; font-weight: 700; color: var(--color-primary); }

.gallery-post-meta { flex: 1; min-width: 0; }

.gallery-post-author {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 4px;
}

.gallery-verified-badge {
    font-size: 12px;
    color: var(--color-accent);
}

.gallery-post-sub {
    font-size: 12px;
    color: var(--color-text-faint);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-post-menu {
    background: none;
    border: none;
    color: var(--color-text-faint);
    font-size: 18px;
    padding: 4px 8px;
    cursor: pointer;
}

/* Media */
.gallery-post-media {
    position: relative;
    width: 100%;
    background: var(--color-card);
}

.gallery-post-media img {
    width: 100%;
    display: block;
    max-height: 480px;
    object-fit: cover;
}

.gallery-top-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(255,255,255,0.2);
}

.gallery-top-badge .fa-star { color: #FFC800; }

/* Actions row */
.gallery-post-actions {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    gap: 0;
}

.gallery-action {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s, transform 0.1s;
    flex: 1;
    justify-content: center;
}

.gallery-action i { font-size: 18px; }
.gallery-action:active { transform: scale(0.92); }

.gallery-action-liked { color: #E53935; }
.gallery-action-liked i { color: #E53935; }

/* Like count */
.gallery-post-likes {
    padding: 2px 14px 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 5px;
}

.gallery-likes-heart {
    color: #E53935;
    font-size: 13px;
}

/* Caption */
.gallery-post-caption {
    padding: 2px 14px 4px;
    font-size: 14px;
    color: var(--color-text);
    line-height: 1.5;
}

.gallery-post-caption strong {
    margin-right: 5px;
}

.gallery-hashtag {
    color: var(--color-primary);
    font-weight: 600;
}

/* Comments link */
.gallery-post-comments-link {
    padding: 0 14px 4px;
    font-size: 13px;
    color: var(--color-text-faint);
    cursor: pointer;
}

/* Timestamp */
.gallery-post-time {
    padding: 0 14px 12px;
    font-size: 11px;
    color: var(--color-text-faint);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Empty state */
.gallery-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
}

.gallery-empty-icon {
    font-size: 52px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.gallery-empty h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text);
}

.gallery-empty p {
    font-size: 14px;
    color: var(--color-text-faint);
    line-height: 1.5;
}

/* FAB */
.gallery-fab {
    position: fixed;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    right: 20px;
    width: 52px; height: 52px;
    border-radius: 50%;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    z-index: 80;
    transition: transform 0.15s;
}

.gallery-fab:active { transform: scale(0.92); }

/* ─── Nova Publicação — Bottom Sheet ─────────────────────────────────────── */
.np-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 110;
    animation: np-fade-in 0.2s ease;
}

@keyframes np-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.np-sheet {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--color-surface);
    border-radius: 20px 20px 0 0;
    z-index: 120;
    max-height: 90vh;
    overflow-y: auto;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    animation: np-slide-up 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes np-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.np-handle {
    width: 36px; height: 4px;
    background: var(--color-card-border);
    border-radius: 2px;
    margin: 10px auto 0;
}

.np-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--color-card-border);
}

.np-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

.np-cancel {
    background: none;
    border: none;
    font-size: 14px;
    color: var(--color-text-faint);
    cursor: pointer;
    padding: 4px 0;
}

.np-submit {
    background: var(--color-primary);
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    transition: opacity 0.15s;
}

/* Mídia: zona de seleção */
.np-media-zone {
    margin: 16px;
    border: 2px dashed var(--color-card-border);
    border-radius: 14px;
    overflow: hidden;
}

.np-media-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px 16px;
    color: var(--color-text-faint);
}

.np-media-placeholder i {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.4;
}

.np-media-placeholder p {
    font-size: 14px;
    margin: 0;
}

.np-media-buttons {
    display: flex;
    gap: 0;
    border-top: 1px solid var(--color-card-border);
}

.np-media-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
}

.np-media-btn:first-child {
    border-right: 1px solid var(--color-card-border);
}

.np-media-btn i { font-size: 18px; }

/* Preview */
.np-preview-wrap {
    position: relative;
    margin: 16px;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
}

.np-preview-img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    display: block;
}

.np-preview-remove {
    position: absolute;
    top: 8px; right: 8px;
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    width: 30px; height: 30px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Caption */
.np-caption-wrap {
    margin: 0 16px 12px;
    position: relative;
}

.np-caption {
    width: 100%;
    background: var(--color-card);
    border: 1px solid var(--color-card-border);
    border-radius: 10px;
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.5;
    padding: 12px;
    resize: none;
    box-sizing: border-box;
    font-family: inherit;
}

.np-caption::placeholder { color: var(--color-text-faint); }
.np-caption:focus { outline: none; border-color: var(--color-primary); }

.np-char-count {
    text-align: right;
    font-size: 12px;
    color: var(--color-text-faint);
    margin-top: 4px;
}

.np-char-warn { color: #E53935; }

/* ─── Vídeo no feed ──────────────────────────────────────────────────────── */
.gallery-video {
    width: 100%;
    max-height: 480px;
    display: block;
    background: #000;
}

/* ─── Menu de 3 pontos — dropdown ────────────────────────────────────────── */
.gallery-post-menu-wrap {
    position: relative;
    flex-shrink: 0;
}

.gallery-post-menu {
    background: none;
    border: none;
    color: var(--color-text-faint);
    font-size: 18px;
    padding: 4px 8px;
    cursor: pointer;
}

.gallery-post-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-card-border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    z-index: 100;
    min-width: 200px;
    overflow: hidden;
    animation: np-fade-in 0.15s ease;
}

.gallery-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--color-card-border);
    color: var(--color-text);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.gallery-dropdown-item:last-child { border-bottom: none; }
.gallery-dropdown-item i { width: 16px; text-align: center; }
.gallery-dropdown-danger { color: #E53935; }

/* ─── Nota de vídeo no new post ──────────────────────────────────────────── */
.np-video-note {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.6);
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ─── Comentários — Bottom Sheet ─────────────────────────────────────────── */
.comments-sheet {
    max-height: 75vh;
    display: flex;
    flex-direction: column;
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    min-height: 80px;
}

.comments-loading {
    display: flex;
    justify-content: center;
    padding: 24px;
}

.comments-empty {
    text-align: center;
    padding: 24px;
    color: var(--color-text-faint);
    font-size: 14px;
}

.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
}

.comment-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--color-card);
    border: 2px solid var(--color-primary);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary);
}

.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }

.comment-body { flex: 1; min-width: 0; }

.comment-author {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text);
    margin-right: 6px;
}

.comment-text {
    font-size: 14px;
    color: var(--color-text);
    line-height: 1.4;
    word-break: break-word;
}

.comment-time {
    font-size: 11px;
    color: var(--color-text-faint);
    margin-top: 3px;
}

.comment-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-top: 1px solid var(--color-card-border);
    background: var(--color-surface);
}

.comment-input-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--color-card);
    border: 2px solid var(--color-primary);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary);
}

.comment-input-avatar img { width: 100%; height: 100%; object-fit: cover; }

.comment-input {
    flex: 1;
    background: var(--color-card);
    border: 1px solid var(--color-card-border);
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 14px;
    color: var(--color-text);
    font-family: inherit;
}

.comment-input:focus { outline: none; border-color: var(--color-primary); }
.comment-input::placeholder { color: var(--color-text-faint); }

.comment-send {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    transition: opacity 0.15s;
}

.comment-send:disabled { opacity: 0.3; }

/* ─── PERFIL ──────────────────────────────────────────────────────────────── */
.profile-view {
    background: var(--color-bg);
    min-height: 100vh;
    padding-bottom: 80px;
}

.profile-header {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-card-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.profile-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-primary);
    margin: 0;
}

.profile-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 20px 24px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-card-border);
}

.profile-avatar-wrap { cursor: pointer; }

.profile-avatar {
    position: relative;
    width: 96px; height: 96px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--color-card);
    border: 3px solid var(--color-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-avatar-initial {
    font-size: 36px;
    font-weight: 800;
    color: var(--color-primary);
}

.profile-avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    opacity: 0;
    transition: opacity 0.2s;
}

.profile-avatar-wrap:hover .profile-avatar-overlay,
.profile-avatar-loading { opacity: 1 !important; }

.profile-name-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 6px;
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
}

.profile-edit-icon {
    font-size: 14px;
    color: var(--color-text-faint);
}

.profile-name-edit {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.profile-name-input {
    background: var(--color-card);
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 16px;
    color: var(--color-text);
    font-family: inherit;
    width: 200px;
}

.profile-name-input:focus { outline: none; }

.profile-name-save {
    border: none;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
}

.profile-name-cancel {
    background: none;
    border: none;
    color: var(--color-text-faint);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

.profile-route {
    font-size: 14px;
    color: var(--color-text-muted);
}

.profile-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    background: var(--color-surface);
    margin-top: 12px;
    gap: 0;
}

.profile-stat-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.profile-stat-divider {
    width: 1px;
    height: 48px;
    background: var(--color-card-border);
}

.profile-stat-icon { font-size: 20px; }

.profile-stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--color-text);
}

.profile-stat-label {
    font-size: 12px;
    color: var(--color-text-faint);
}

.profile-actions {
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-card-border);
    border-radius: 12px;
    font-size: 15px;
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
}

.profile-action-btn i { font-size: 18px; width: 20px; text-align: center; }
.profile-action-logout { color: #E53935; }

/* =====================================================================
   DASHBOARD v1.4 — "Central do dia"
   ===================================================================== */

.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-card-border);
}

.dash-greeting {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.dash-greeting-time {
    font: var(--font-caption);
    color: var(--color-text-muted);
}

.dash-greeting-name {
    font: var(--font-h3);
    color: var(--color-text);
}

.dash-header-stats {
    display: flex;
    gap: 10px;
}

.dash-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font: var(--font-label);
    font-weight: 600;
    color: var(--color-text);
    background: var(--color-card);
    border: 1px solid var(--color-card-border);
    border-radius: 20px;
    padding: 5px 10px;
}

.dash-stat i { font-size: 13px; }
.dash-stat-streak i { color: #FF6400; }
.dash-stat-xp i { color: #FFC800; }

.dash-streak-risk .dash-stat-streak,
.dash-stat-streak.dash-streak-risk {
    background: rgba(255, 100, 0, 0.15);
    border-color: #FF6400;
    color: #FF6400;
    animation: pulse-streak 1.5s ease-in-out infinite;
}

@keyframes pulse-streak {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

.dash-body {
    padding: 16px 20px calc(80px + env(safe-area-inset-bottom, 0px));
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

/* Streak at-risk warning banner */
.dash-streak-risk-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 100, 0, 0.12);
    border: 1px solid #FF6400;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font: var(--font-label);
    color: #FF6400;
}

.dash-streak-risk-card i { font-size: 18px; flex-shrink: 0; }

/* CTA loader */
.dash-cta-loading {
    display: flex;
    justify-content: center;
    padding: 32px 0;
}

.loading-spinner-sm {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255,255,255,0.15);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Primary CTA card */
.dash-cta-card {
    background: var(--color-primary);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, opacity 0.12s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.dash-cta-card:active { transform: scale(0.97); opacity: 0.9; }

.dash-cta-start { background: var(--color-accent, #FF9600); }
.dash-cta-done  { background: #00C97A; }

.dash-cta-eyebrow {
    font: var(--font-caption);
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.dash-cta-module {
    font: var(--font-label);
    color: rgba(255,255,255,0.85);
    margin-bottom: 2px;
}

.dash-cta-lesson {
    font: var(--font-h3);
    color: #fff;
    margin-bottom: 16px;
}

.dash-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font: var(--font-label);
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 10px 20px;
    border-radius: 24px;
    border: none;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

/* Level bar (compact) */
.dash-level-bar {
    background: var(--color-card);
    border: 1px solid var(--color-card-border);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.dash-level-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.dash-level-name {
    font: var(--font-label);
    font-weight: 600;
    color: var(--color-text);
}

.dash-level-next {
    font: var(--font-caption);
    color: var(--color-text-muted);
}

/* Community preview */
.dash-community {
    background: var(--color-card);
    border: 1px solid var(--color-card-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.dash-community-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px 10px;
}

.dash-community-title {
    font: var(--font-label);
    font-weight: 600;
    color: var(--color-text);
}

.dash-community-more {
    font: var(--font-caption);
    color: var(--color-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dash-community-photos {
    display: flex;
    gap: 2px;
    padding: 0 2px 2px;
}

.dash-community-photo {
    flex: 1;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    background: var(--color-surface);
    border-radius: 4px;
}

.dash-community-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}

.dash-community-photo:active img { transform: scale(0.96); }

/* =====================================================================
   PROFILE v1.4 — menu iOS + conquistas
   ===================================================================== */

.profile-section {
    margin: 0 16px 20px;
}

.profile-section-title {
    font: var(--font-caption);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin-bottom: 8px;
    padding-left: 4px;
}

/* Badges grid */
.profile-badges {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 4px 0;
}

.profile-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.profile-badge-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-card);
    border: 2px solid var(--color-card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 24px;
    color: var(--color-accent);
}

.profile-badge-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-badge-locked .profile-badge-icon {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    color: var(--color-text-faint);
    filter: grayscale(1);
    opacity: 0.45;
}

.profile-badge-name {
    font: var(--font-caption);
    color: var(--color-text-muted);
    text-align: center;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-badge-locked .profile-badge-name {
    color: var(--color-text-faint);
}

.profile-badges-empty {
    text-align: center;
    padding: 24px;
    color: var(--color-text-muted);
    font: var(--font-label);
}

.profile-badges-empty i {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
    color: var(--color-text-faint);
}

/* Menu estilo iOS Settings */
.profile-menu {
    background: var(--color-card);
    border: 1px solid var(--color-card-border);
    border-radius: 14px;
    overflow: hidden;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 15px;
    cursor: pointer;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.1s;
}

.profile-menu-item:active { background: rgba(255,255,255,0.06); }

.profile-menu-icon {
    width: 22px;
    font-size: 16px;
    text-align: center;
    color: var(--color-primary);
    flex-shrink: 0;
}

.profile-menu-label {
    flex: 1;
    font: var(--font-label);
    color: var(--color-text);
}

.profile-menu-chevron {
    font-size: 12px;
    color: var(--color-text-faint);
}

.profile-menu-divider {
    height: 1px;
    background: var(--color-card-border);
    margin: 0 16px;
}

.profile-menu-danger .profile-menu-icon,
.profile-menu-danger .profile-menu-label {
    color: #E53935;
}

/* Modal inline */
.profile-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 300;
    display: flex;
    align-items: flex-end;
    padding: 0;
}

.profile-modal {
    background: var(--color-surface);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-height: 70vh;
    overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom, 16px);
}

.profile-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-card-border);
    font: var(--font-h3);
    color: var(--color-text);
}

.profile-modal-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

.profile-modal-body {
    padding: 20px;
    font: var(--font-label);
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Profile: botões do modal de exclusão */
.profile-delete-confirm-btn {
    width: 100%;
    background: #E53935;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
}

.profile-delete-confirm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.profile-delete-cancel-btn {
    width: 100%;
    background: var(--color-card);
    color: var(--color-text);
    border: 1px solid var(--color-card-border);
    border-radius: 12px;
    padding: 14px;
    font-size: 15px;
    cursor: pointer;
}

/* =====================================================================
   SPRINT 2 — Feedback sensorial e celebração
   ===================================================================== */

/* XP Toast flutuante */
@keyframes xp-float {
    0%   { opacity: 0; transform: translateX(-50%) translateY(0) scale(0.8); }
    15%  { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.1); }
    70%  { opacity: 1; transform: translateX(-50%) translateY(-70px) scale(1); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-100px) scale(0.9); }
}

.xp-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    font-size: 20px;
    padding: 10px 28px;
    border-radius: 40px;
    z-index: 600;
    pointer-events: none;
    animation: xp-float 1.8s ease-out forwards;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    white-space: nowrap;
}

/* Confetti container (canvas-confetti cria seu próprio canvas) */
.confetti-container {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 500;
}

/* ─── Quiz Finish Screen ─────────────────────────────────────────────── */

@keyframes quiz-finish-pop {
    0%   { opacity: 0; transform: scale(0.7); }
    70%  { transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes quiz-finish-slide {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.quiz-finish {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    min-height: calc(100vh - 60px);
    text-align: center;
}

.quiz-finish-celebration {
    animation: quiz-finish-slide 0.5s ease-out;
}

.quiz-finish-neutral {
    animation: quiz-finish-slide 0.4s ease-out;
}

.quiz-finish-emoji {
    font-size: 64px;
    margin-bottom: 12px;
    display: block;
    animation: quiz-finish-pop 0.5s ease-out;
}

.quiz-finish-emoji-win {
    animation: quiz-finish-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quiz-finish-title-win {
    font: var(--font-h1, 700 28px/1.2 'Baloo 2', sans-serif);
    color: var(--color-text);
    margin-bottom: 8px;
}

.quiz-finish-xp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 150, 0, 0.15);
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    font-weight: 700;
    font-size: 20px;
    padding: 8px 20px;
    border-radius: 40px;
    margin-bottom: 24px;
    animation: quiz-finish-slide 0.5s ease-out 0.2s both;
}

.quiz-finish-xp i { color: #FFC800; }

.quiz-finish-score {
    font: var(--font-label);
    color: var(--color-text-muted);
    margin-bottom: 12px;
    animation: quiz-finish-slide 0.4s ease-out 0.3s both;
}

.quiz-finish-bar {
    width: 100%;
    max-width: 280px;
    height: 12px;
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
    animation: quiz-finish-slide 0.4s ease-out 0.35s both;
}

.quiz-finish-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.8s ease-out;
    min-width: 4px;
}

.quiz-finish-msg {
    font: var(--font-label);
    color: var(--color-text-muted);
    margin-bottom: 24px;
    animation: quiz-finish-slide 0.4s ease-out 0.4s both;
}

.quiz-finish-btn {
    animation: quiz-finish-slide 0.4s ease-out 0.5s both;
    min-width: 200px;
}

/* ─── Trail: Personagens com CSS animation ───────────────────────────── */

@keyframes char-idle {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

@keyframes char-appear {
    from { opacity: 0; transform: translateY(20px) scale(0.85); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.trail-character-img {
    animation: char-appear 0.5s ease-out, char-idle 3s ease-in-out 0.5s infinite;
    will-change: transform;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

/* ─── Quiz: Feedback de resposta com animação ────────────────────────── */

@keyframes feedback-pop {
    0%   { transform: scale(0.8); opacity: 0; }
    60%  { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}

.quiz-feedback-icon {
    animation: feedback-pop 0.3s ease-out;
}

@keyframes option-correct-glow {
    0%   { box-shadow: 0 0 0 0 rgba(0, 201, 122, 0.6); }
    70%  { box-shadow: 0 0 0 8px rgba(0, 201, 122, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 201, 122, 0); }
}

@keyframes option-wrong-shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.quiz-option.correct {
    animation: option-correct-glow 0.6s ease-out;
}

.quiz-option.wrong {
    animation: option-wrong-shake 0.4s ease-out;
}

/* Profile: badge count + progress bar */
.profile-section-count {
    font: var(--font-caption);
    color: var(--color-text-faint);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.profile-badge-icon {
    position: relative;
}

.profile-badge-count {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: var(--color-primary);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 8px;
    line-height: 1.4;
}

.profile-badge-progress {
    width: 48px;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    margin: 3px auto 0;
    overflow: hidden;
}

.profile-badge-progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 2px;
    min-width: 2px;
}
