:root {
    --primary: #2477f2;
    --primary-dark: #1858d6;
    --cyan: #13c8df;
    --purple: #b752f4;
    --danger: #e73f54;
    --ink: #182235;
    --muted: #7b8798;
    --line: #e9eef7;
    --background: #f3f8ff;
    --shadow: 0 18px 45px rgba(24, 57, 108, 0.14);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, rgba(36, 119, 242, 0.16), transparent 34rem), linear-gradient(180deg, #edf6ff 0%, #f9fbff 52%, #f4f8ff 100%);
}
button, input, select { font: inherit; }
a { color: inherit; }

.app-shell, .auth-shell {
    width: 100%;
    max-width: 390px;
    margin: 0 auto;
    overflow-x: hidden;
}
.app-shell { padding: 18px 16px 132px; }
.auth-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 22px 16px;
}

.top-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.icon-button {
    position: relative; display: grid; width: 46px; height: 46px; place-items: center;
    border: 0; border-radius: 15px; color: #5f7188; background: rgba(255,255,255,.92);
    box-shadow: 0 10px 25px rgba(31,70,126,.1); font-size: 1.5rem; text-decoration: none;
}
.icon-lines, .icon-lines::before, .icon-lines::after { display: block; width: 18px; height: 2px; border-radius: 99px; background: #5f7188; }
.icon-lines::before, .icon-lines::after { content: ""; position: absolute; left: 14px; }
.icon-lines::before { top: 15px; } .icon-lines::after { bottom: 15px; }
.icon-bell { width: 17px; height: 20px; border: 2px solid #5f7188; border-radius: 12px 12px 8px 8px; color: transparent; }
.icon-bell::after { content: ""; position: absolute; right: 14px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 3px #fff; }
.logout-icon { color: var(--danger); font-size: 1.8rem; font-weight: 800; line-height: 1; }

.brand, .auth-logo { display: grid; place-items: center; text-align: center; }
.brand { display: inline-flex; gap: 10px; font-weight: 800; letter-spacing: -.04em; }
.brand-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(135deg,#4f8df6,#1d5be0); box-shadow: 0 12px 24px rgba(36,119,242,.34); font-weight: 800; }
.brand-icon.large { width: 66px; height: 66px; border-radius: 22px; font-size: 2rem; margin-bottom: 12px; }
.brand-name { font-size: 1.35rem; }
.auth-logo h1 { margin: 0; font-size: 2rem; letter-spacing: -.06em; }
.auth-logo p, .section-heading p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }

.auth-card, .feature-card, .ranking-card, .recommendation-card {
    border: 1px solid rgba(231,237,247,.9); background: rgba(255,255,255,.94);
    box-shadow: 0 14px 35px rgba(25,62,116,.11); border-radius: 22px;
}
.auth-card { width: 100%; padding: 24px 18px; }
.register-screen { align-self: start; margin-top: 10px; }
.auth-form { display: grid; gap: 13px; margin-top: 24px; }
.auth-form label { display: grid; gap: 7px; color: #4e5d72; font-size: .8rem; font-weight: 700; }
.auth-form input, .auth-form select {
    width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 14px; outline: 0;
    padding: 0 13px; color: var(--ink); background: #f8fbff;
}
.auth-form input:focus, .auth-form select:focus { border-color: rgba(36,119,242,.7); box-shadow: 0 0 0 4px rgba(36,119,242,.12); }
.primary-button { min-height: 50px; margin-top: 4px; border: 0; border-radius: 15px; color: #fff; background: linear-gradient(135deg,var(--danger),#c9263b); box-shadow: 0 14px 26px rgba(231,63,84,.28); font-weight: 800; }
.auth-link { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: .88rem; }
.auth-link a { color: var(--primary-dark); font-weight: 800; text-decoration: none; }

.news-card { overflow: hidden; position: relative; padding: 20px; border-radius: 18px; color: #fff; background: linear-gradient(135deg,#2477f2 0%,#15c7db 100%); box-shadow: var(--shadow); }
.news-card::after { content: "R"; position: absolute; right: -8px; bottom: -34px; color: rgba(255,255,255,.16); font-size: 9rem; font-weight: 800; }
.news-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: .76rem; font-weight: 700; }
.news-meta span { padding: 6px 11px; border-radius: 999px; background: rgba(255,255,255,.18); }
.news-card h1 { position: relative; z-index: 1; margin: 0 0 8px; font-size: 1.05rem; line-height: 1.25; }
.news-card p { position: relative; z-index: 1; margin: 0; max-width: 34ch; font-size: .88rem; line-height: 1.45; opacity: .94; }

.primary-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; margin: 18px 0; }
.feature-card { min-height: 130px; padding: 18px 14px; border-radius: 16px; }
.feature-icon { display: grid; width: 46px; height: 46px; margin-bottom: 14px; place-items: center; border-radius: 50%; font-weight: 800; }
.feature-card-purple .feature-icon { color: #9b32d3; background: #f5ddff; }
.feature-card-blue .feature-icon { color: #146de7; background: #dcecff; }
.feature-card h2 { margin: 0 0 6px; font-size: .96rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.35; }

.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-heading.compact { margin: 0; }
.section-heading h1, .section-heading h2, .ranking-card h2, .recommendation-card h2 { margin: 0; font-size: 1.03rem; }
.section-heading h1 { font-size: 1.45rem; letter-spacing: -.04em; }
.section-heading span { padding: 6px 10px; border-radius: 999px; color: var(--primary-dark); background: #e6f0ff; font-size: .72rem; font-weight: 800; }

.recommendation-card { display: flex; gap: 12px; align-items: center; padding: 16px; margin-bottom: 16px; }
.recommendation-icon { display: grid; flex: 0 0 44px; width: 44px; height: 44px; place-items: center; border-radius: 15px; color: #fff; background: linear-gradient(135deg,#f6b84f,#e87823); font-weight: 800; }
.recommendation-card p { margin: 5px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.4; }

.ranking-card { padding: 18px; }
.ranking-list { display: grid; margin-top: 12px; }
.ranking-item { display: grid; grid-template-columns: 38px 42px 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid #edf1f7; }
.ranking-item:last-child { border-bottom: 0; }
.rank-number { color: #a1aabc; font-weight: 800; font-size: .8rem; }
.avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg,#295d9f,#13c8df); font-size: .76rem; font-weight: 800; }
.ranking-item strong, .ranking-item b { font-size: .86rem; }
.ranking-item b { color: var(--primary-dark); }

.bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    width: 100%;
    max-width: 390px;
    min-height: 82px;
    margin: 0 auto;
    padding: 10px 8px 12px;
    border: 1px solid rgba(231, 237, 247, 0.95);
    border-bottom: 0;
    border-radius: 28px 28px 0 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -16px 38px rgba(22, 48, 88, 0.14);
    backdrop-filter: blur(18px);
}

.bottom-nav-item {
    position: relative;
    display: grid;
    gap: 5px;
    min-width: 0;
    place-items: center;
    color: #9aa5b6;
    text-decoration: none;
    font-size: 0.66rem;
    font-weight: 800;
}

.bottom-nav-item em {
    max-width: 100%;
    overflow: hidden;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 14px;
    font-size: 1.08rem;
    line-height: 1;
    transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.bottom-nav-item.active {
    color: var(--primary-dark);
}

.bottom-nav-item.active .nav-icon {
    color: #fff;
    background: linear-gradient(135deg, #438cf7, #1f6be7);
    box-shadow: 0 10px 20px rgba(36, 119, 242, 0.25);
}

.nav-item-featured {
    color: var(--danger);
    transform: translateY(-14px);
}

.nav-item-featured .nav-icon {
    width: 54px;
    height: 54px;
    border: 5px solid #fff;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(135deg, #e73f54, #c9263b);
    box-shadow: 0 14px 26px rgba(231, 63, 84, 0.34);
    font-size: 1.16rem;
    font-weight: 900;
}

.nav-item-featured em {
    margin-top: -2px;
    color: var(--danger);
}

@media (max-width: 380px) { .primary-actions { grid-template-columns: 1fr; } }

/* Auth improvements */
.login-shell {
    align-content: center;
    gap: 0;
    padding-top: 28px;
}

.auth-hero {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 24px 18px 54px;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(145deg, #164cbd 0%, #2477f2 48%, #13c8df 100%);
    box-shadow: var(--shadow);
}

.auth-hero::after {
    content: "R";
    position: absolute;
    right: -20px;
    bottom: -58px;
    color: rgba(255, 255, 255, 0.13);
    font-size: 12rem;
    font-weight: 800;
}

.auth-hero .auth-logo {
    position: relative;
    z-index: 1;
    margin-top: 18px;
}

.auth-hero .auth-logo p {
    max-width: 25ch;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.45;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 11px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.auth-badge.small {
    margin-bottom: 8px;
    color: var(--primary-dark);
    background: #e6f0ff;
}

.auth-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 22px;
}

.auth-stats span {
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 0.74rem;
    line-height: 1.3;
}

.auth-stats b {
    display: block;
    font-size: 0.92rem;
}

.floating-card {
    margin-top: -34px;
    position: relative;
    z-index: 2;
}

.auth-card-heading h2 {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: -0.04em;
}

.auth-card-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.back-link {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--primary-dark);
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
}

.form-grid-two {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
}

.form-message {
    margin-top: 16px;
    padding: 12px 13px;
    border-radius: 14px;
    font-size: 0.83rem;
    font-weight: 700;
    line-height: 1.35;
}

.form-message.is-error {
    color: #9f1f30;
    background: #ffe8ec;
    border: 1px solid #ffc7d0;
}

.form-message.is-success {
    color: #12663d;
    background: #e8fff3;
    border: 1px solid #b8f0d2;
}

.primary-button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.auth-note {
    margin: 16px 0 0;
    padding: 12px;
    border-radius: 14px;
    color: #68758a;
    background: #f7faff;
    font-size: 0.78rem;
    line-height: 1.4;
}

@media (max-width: 380px) {
    .form-grid-two {
        grid-template-columns: 1fr;
    }
}

/* Login reference style */
.login-reference-body {
    background: #f4f7fd;
}

.login-reference-shell {
    width: 100%;
    max-width: 390px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 30px 28px 34px;
}

.login-reference-header {
    display: grid;
    justify-items: center;
    text-align: center;
}

.login-reference-logo {
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(145deg, #4c8cff, #1762e8);
    box-shadow: 0 16px 28px rgba(36, 119, 242, 0.24);
    font-size: 2.15rem;
    font-weight: 900;
    transform: rotate(-7deg);
}

.login-reference-header h1 {
    margin: 18px 0 0;
    color: #192033;
    font-size: 2.05rem;
    font-weight: 900;
    letter-spacing: -0.07em;
    line-height: 1;
}

.login-reference-header h1 span {
    color: #2f7bf1;
}

.login-reference-header p {
    margin: 13px 0 0;
    color: #a6afbf;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 42px 0 42px;
    padding: 4px;
    border-radius: 20px;
    background: #eef2f8;
    box-shadow: inset 0 1px 3px rgba(25, 42, 74, 0.04);
}

.auth-tab {
    display: grid;
    min-height: 48px;
    place-items: center;
    border-radius: 17px;
    color: #9aa4b5;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-decoration: none;
    text-transform: uppercase;
}

.auth-tab.active {
    color: #2d6dcc;
    background: #fff;
    box-shadow: 0 10px 25px rgba(22, 48, 88, 0.08);
}

.login-reference-card {
    display: grid;
}

.login-title {
    text-align: center;
}

.login-title h2 {
    margin: 0;
    color: #182033;
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.login-title p {
    margin: 11px 0 0;
    color: #a7b0bf;
    font-size: 0.9rem;
    font-weight: 700;
}

.reference-form {
    gap: 22px;
    margin-top: 42px;
}

.reference-form label {
    gap: 12px;
    color: #9aa4b5;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.input-with-icon {
    position: relative;
    display: block;
}

.field-icon {
    position: absolute;
    top: 50%;
    left: 18px;
    z-index: 1;
    color: #d2d8e4;
    font-size: 1.05rem;
    transform: translateY(-50%);
}

.reference-form input {
    min-height: 58px;
    padding-left: 52px;
    border: 1px solid #edf1f7;
    border-radius: 17px;
    color: #192033;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 26px rgba(22, 48, 88, 0.035);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: none;
}

.reference-form input::placeholder {
    color: #c8ced8;
}

.reference-button {
    min-height: 60px;
    margin-top: 10px;
    border-radius: 14px;
    background: linear-gradient(180deg, #2f73ef, #2162df);
    box-shadow: 0 14px 24px rgba(36, 119, 242, 0.28), inset 0 -3px 0 rgba(0, 0, 0, 0.11);
    font-size: 0.9rem;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.reference-button span {
    margin-left: 8px;
    font-size: 1.25rem;
    line-height: 0;
}

.forgot-link {
    margin: 31px 0 0;
    color: #a6afbf;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.forgot-link a {
    color: #527da8;
    text-underline-offset: 4px;
}

.login-reference-card .form-message {
    margin-top: 24px;
}

/* Register reference style */
.register-reference-shell {
    padding-top: 22px;
    padding-bottom: 28px;
}

.register-reference-shell .login-reference-logo {
    width: 66px;
    height: 66px;
    border-radius: 21px;
    font-size: 1.9rem;
}

.register-reference-shell .login-reference-header h1 {
    margin-top: 14px;
    font-size: 1.85rem;
}

.register-reference-shell .login-reference-header p {
    margin-top: 10px;
    font-size: 0.62rem;
}

.register-reference-shell .auth-tabs {
    margin: 28px 0 30px;
}

.register-reference-shell .reference-form {
    gap: 16px;
    margin-top: 28px;
}

.register-reference-shell .reference-form label {
    gap: 9px;
}

.register-reference-shell .reference-form input,
.register-reference-shell .reference-form select {
    min-height: 54px;
    padding-left: 52px;
    border: 1px solid #edf1f7;
    border-radius: 17px;
    color: #192033;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 26px rgba(22, 48, 88, 0.035);
    font-size: 0.92rem;
    font-weight: 700;
    text-transform: none;
}

.register-reference-shell .reference-button {
    margin-top: 8px;
}

.register-reference-shell .forgot-link {
    margin-top: 22px;
}

/* Library */
.library-hero {
    padding: 20px;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg, #1f6be7, #13c8df);
    box-shadow: var(--shadow);
}

.library-hero span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.library-hero h1 {
    margin: 13px 0 7px;
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.library-hero p {
    margin: 0;
    max-width: 30ch;
    font-size: 0.86rem;
    line-height: 1.45;
    opacity: 0.9;
}

.library-toolbar {
    margin: 16px 0;
}

.library-toolbar label {
    display: grid;
    gap: 8px;
    color: #8792a5;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.library-toolbar input {
    min-height: 46px;
    border: 1px solid #edf1f7;
    border-radius: 16px;
    outline: 0;
    padding: 0 14px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 26px rgba(22, 48, 88, 0.04);
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.book-card {
    min-width: 0;
}

.book-cover {
    position: relative;
    display: grid;
    min-height: 165px;
    padding: 12px;
    align-content: end;
    overflow: hidden;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(22, 48, 88, 0.1);
}

.student-book-cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.book-cover::before {
    content: "";
    position: absolute;
    inset: 10px auto 10px 9px;
    width: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.35);
}

.book-cover::after {
    content: "";
    position: absolute;
    right: -18px;
    top: -18px;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}

.book-mark {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 0.72rem;
    font-weight: 900;
}

.book-cover strong {
    position: relative;
    z-index: 1;
    font-size: 0.8rem;
    font-weight: 900;
}

.book-cover-blue { background: linear-gradient(145deg, #2d7cf4, #1858d6); }
.book-cover-red { background: linear-gradient(145deg, #e73f54, #b82336); }
.book-cover-purple { background: linear-gradient(145deg, #b752f4, #7530c7); }
.book-cover-cyan { background: linear-gradient(145deg, #13c8df, #1487c9); }
.book-cover-gold { background: linear-gradient(145deg, #f1b83e, #c48110); }
.book-cover-green { background: linear-gradient(145deg, #25bf7a, #13875a); }
.book-cover-navy { background: linear-gradient(145deg, #253b67, #14233f); }
.book-cover-orange { background: linear-gradient(145deg, #ff8b3d, #dc5622); }
.book-cover-slate { background: linear-gradient(145deg, #718096, #3f4a5f); }

.book-card h2 {
    position: relative;
    z-index: 1;
    min-height: 32px;
    margin: 8px 0 6px;
    background-color: #1b4332;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 1.18;
    text-align: center;
}

.book-download {
    display: inline-flex;
    color: var(--primary-dark);
    font-size: 0.68rem;
    font-weight: 900;
    text-decoration: none;
}

/* Visual unification pass */
.app-shell {
    background: #f4f7fd;
}

.top-bar {
    margin-bottom: 22px;
}

.app-hero {
    position: relative;
    overflow: hidden;
    padding: 22px 20px;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(145deg, #164cbd 0%, #2477f2 52%, #13c8df 100%);
    box-shadow: 0 18px 35px rgba(36, 119, 242, 0.22);
}

.app-hero::after {
    content: "R";
    position: absolute;
    right: -12px;
    bottom: -48px;
    color: rgba(255, 255, 255, 0.13);
    font-size: 10rem;
    font-weight: 900;
    line-height: 1;
}

.app-kicker {
    position: relative;
    z-index: 1;
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.11em;
}

.app-hero h1 {
    position: relative;
    z-index: 1;
    margin: 15px 0 8px;
    font-size: 1.42rem;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.app-hero p {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 31ch;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.48;
    opacity: 0.9;
}

.soft-card,
.feature-card,
.book-cover,
.library-toolbar input {
    border: 1px solid #edf1f7;
    background-color: rgba(255, 255, 255, 0.84);
    box-shadow: 0 12px 26px rgba(22, 48, 88, 0.055);
}

.primary-actions {
    margin: 18px 0 16px;
}

.feature-card {
    border-radius: 20px;
}

.feature-card h2,
.recommendation-card h2,
.ranking-card h2,
.book-card h2 {
    letter-spacing: -0.035em;
}

.library-toolbar {
    margin: 18px 0 18px;
}

.book-grid {
    gap: 14px 12px;
}

.book-cover {
    min-height: 145px;
    border-radius: 20px;
}

.book-card h2 {
    background-color: #1b4332;
    color: #fff;
    font-size: 0.62rem;
}

.book-download {
    color: #2f73ef;
    letter-spacing: -0.02em;
}

.bottom-nav {
    background: rgba(255, 255, 255, 0.985);
}

/* Home compact adjustments */
.home-hero-compact {
    padding: 15px 17px;
    border-radius: 22px;
}

.home-hero-compact::after {
    right: -6px;
    bottom: -34px;
    font-size: 7rem;
}

.home-hero-compact .app-kicker {
    padding: 5px 9px;
    font-size: 0.62rem;
}

.home-hero-compact h1 {
    margin: 10px 0 4px;
    font-size: 1.14rem;
}

.home-hero-compact p {
    font-size: 0.78rem;
    line-height: 1.25;
}

.compact-actions {
    gap: 12px;
    margin: 14px 0;
}

.compact-feature {
    display: grid;
    min-height: 88px;
    padding: 13px 10px;
    place-items: center;
    text-align: center;
}

.compact-feature .feature-icon {
    width: 42px;
    height: 42px;
    margin-bottom: 8px;
}

.compact-feature h2 {
    margin: 0;
    font-size: 0.86rem;
}

.ranking-card {
    padding: 15px 16px;
}

.ranking-list {
    margin-top: 8px;
}

.ranking-item {
    grid-template-columns: 34px 36px 1fr auto;
    gap: 9px;
    padding: 8px 0;
}

.ranking-item .avatar {
    width: 34px;
    height: 34px;
    font-size: 0.68rem;
}

/* User question stats */
.question-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 14px;
}

.question-stat-card {
    display: grid;
    min-width: 0;
    min-height: 86px;
    place-items: center;
    padding: 10px 6px;
    border: 1px solid #edf1f7;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 24px rgba(22, 48, 88, 0.055);
    text-align: center;
}

.question-stat-card span {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
}

.question-stat-card strong {
    margin-top: 5px;
    color: #192033;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1;
}

.question-stat-card p {
    margin: 4px 0 0;
    color: #7f8a9c;
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 1.15;
}

.stat-error span { background: linear-gradient(135deg, #e73f54, #bb2639); }
.stat-success span { background: linear-gradient(135deg, #25bf7a, #13875a); }
.stat-pending span { background: linear-gradient(135deg, #f1b83e, #c48110); }

/* Question stats horizontal metric layout */
.question-stat-card {
    align-content: center;
    justify-items: center;
    min-height: 78px;
    padding: 9px 5px;
}

.question-stat-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.question-stat-main span {
    width: 27px;
    height: 27px;
    border-radius: 11px;
    font-size: 0.92rem;
}

.question-stat-main strong {
    margin: 0;
    font-size: 1.18rem;
}

.question-stat-card > span,
.question-stat-card > strong {
    display: none;
}

.question-stat-card p {
    margin-top: 7px;
    font-size: 0.58rem;
    line-height: 1.05;
}

/* Footer icon refinement */
.bottom-nav-item .nav-icon {
    font-size: 1rem;
}

.nav-item-featured {
    transform: translateY(-7px);
}

.nav-item-featured .nav-icon {
    width: 50px;
    height: 50px;
    border-radius: 18px;
}

/* Footer background height adjustment */
.bottom-nav {
    min-height: 70px;
    padding-top: 7px;
    padding-bottom: 8px;
    border-radius: 22px 22px 0 0;
}

.app-shell {
    padding-bottom: 112px;
}

/* Compact auth screens */
.login-reference-shell {
    padding-top: 18px;
    padding-bottom: 22px;
}

.login-reference-logo {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    font-size: 1.85rem;
}

.login-reference-header h1 {
    margin-top: 13px;
    font-size: 1.78rem;
}

.login-reference-header p {
    margin-top: 8px;
    font-size: 0.58rem;
    letter-spacing: 0.2em;
}

.auth-tabs {
    margin: 26px 0 24px;
}

.auth-tab {
    min-height: 42px;
    border-radius: 15px;
    font-size: 0.68rem;
}

.login-title h2 {
    font-size: 1.32rem;
}

.login-title p {
    margin-top: 7px;
    font-size: 0.78rem;
}

.reference-form {
    gap: 15px;
    margin-top: 24px;
}

.reference-form label {
    gap: 8px;
    font-size: 0.62rem;
}

.reference-form input,
.register-reference-shell .reference-form input,
.register-reference-shell .reference-form select {
    min-height: 49px;
    border-radius: 15px;
    font-size: 0.86rem;
}

.reference-button {
    min-height: 51px;
    margin-top: 4px;
    border-radius: 13px;
    font-size: 0.8rem;
}

.forgot-link {
    margin-top: 20px;
    font-size: 0.65rem;
}

.register-reference-shell {
    padding-top: 16px;
}

.register-reference-shell .login-reference-logo {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 1.65rem;
}

.register-reference-shell .login-reference-header h1 {
    margin-top: 10px;
    font-size: 1.62rem;
}

.register-reference-shell .auth-tabs {
    margin: 20px 0 20px;
}

.register-reference-shell .reference-form {
    gap: 12px;
    margin-top: 20px;
}

.register-reference-shell .forgot-link {
    margin-top: 16px;
}

/* Removed auth section title spacing */
.login-reference-card .form-message[hidden] + .reference-form {
    margin-top: 0;
}

.login-reference-card .form-message:not([hidden]) + .reference-form {
    margin-top: 16px;
}

/* Classic gray auth icons */
.field-icon {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
}

.icon-mail::before {
    content: "";
    width: 18px;
    height: 13px;
    border: 2px solid #cfd6e2;
    border-radius: 5px;
    background: linear-gradient(135deg, transparent 47%, #cfd6e2 48%, #cfd6e2 52%, transparent 53%),
        linear-gradient(45deg, transparent 47%, #cfd6e2 48%, #cfd6e2 52%, transparent 53%);
}

.icon-lock::before {
    content: "";
    width: 17px;
    height: 13px;
    margin-top: 5px;
    border: 2px solid #cfd6e2;
    border-radius: 5px;
}

.icon-lock::after {
    content: "";
    position: absolute;
    top: -1px;
    left: 3px;
    width: 10px;
    height: 10px;
    border: 2px solid #cfd6e2;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
}

.icon-user::before {
    content: "";
    width: 9px;
    height: 9px;
    border: 2px solid #cfd6e2;
    border-radius: 50%;
    transform: translateY(-3px);
}

.icon-user::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 17px;
    height: 9px;
    border: 2px solid #cfd6e2;
    border-radius: 12px 12px 5px 5px;
}

.icon-grade::before {
    content: "";
    width: 18px;
    height: 18px;
    border: 2px solid #cfd6e2;
    border-radius: 50%;
}

.icon-grade::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 7px;
    border-right: 2px solid #cfd6e2;
    border-bottom: 2px solid #cfd6e2;
    transform: rotate(45deg) translate(-1px, -1px);
}

/* Enterprise auth line icons */
.field-icon {
    color: #c4ccd8;
}

.icon-mail::before,
.icon-lock::before,
.icon-user::before,
.icon-grade::before,
.icon-mail::after,
.icon-lock::after,
.icon-user::after,
.icon-grade::after {
    box-sizing: border-box;
}

.icon-mail::before {
    content: "";
    width: 19px;
    height: 14px;
    border: 1.8px solid currentColor;
    border-radius: 4px;
    background: none;
}

.icon-mail::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 2px;
    width: 15px;
    height: 9px;
    border-top: 1.8px solid currentColor;
    border-right: 1.8px solid currentColor;
    transform: rotate(135deg) skew(-8deg, -8deg);
    transform-origin: center;
    opacity: 0.75;
}

.icon-lock::before {
    content: "";
    width: 18px;
    height: 13px;
    margin-top: 6px;
    border: 1.8px solid currentColor;
    border-radius: 4px;
    background: none;
}

.icon-lock::after {
    content: "";
    position: absolute;
    top: 0;
    left: 4px;
    width: 10px;
    height: 10px;
    border: 1.8px solid currentColor;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.icon-user::before {
    content: "";
    width: 8px;
    height: 8px;
    border: 1.8px solid currentColor;
    border-radius: 50%;
    transform: translateY(-4px);
}

.icon-user::after {
    content: "";
    position: absolute;
    bottom: 1px;
    width: 18px;
    height: 9px;
    border: 1.8px solid currentColor;
    border-radius: 10px 10px 4px 4px;
    background: none;
}

.icon-grade::before {
    content: "";
    width: 18px;
    height: 18px;
    border: 1.8px solid currentColor;
    border-radius: 5px;
    background: none;
}

.icon-grade::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 6px;
    width: 7px;
    height: 4px;
    border-left: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    transform: rotate(-45deg);
}

/* Library simplified covers */
.library-toolbar-compact {
    margin-top: 0;
}

.book-card {
    display: grid;
    gap: 7px;
}

.book-cover {
    min-height: 220px;
    align-content: end;
    padding: 12px 10px;
}

.book-cover h2 {
    position: relative;
    z-index: 1;
    min-height: auto;
    margin: 8px 0 6px;
    background-color: #1b4332;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 1.12;
    text-shadow: 0 2px 7px rgba(0, 0, 0, 0.16);
}

.book-mark {
    width: auto;
    min-width: 31px;
    padding: 0 6px;
    font-size: 0.58rem;
    letter-spacing: 0.05em;
}

.book-download-button {
    display: grid;
    min-height: 29px;
    place-items: center;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(180deg, #2f73ef, #2162df);
    box-shadow: 0 8px 14px rgba(36, 119, 242, 0.18);
    font-size: 0.62rem;
    font-weight: 900;
    text-decoration: none;
}

/* Spotify-style audios */
.audio-page-shell {
    padding-bottom: 190px;
}

.audio-header {
    padding: 16px 18px;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(145deg, #122a55, #2162df 62%, #13c8df);
    box-shadow: 0 18px 35px rgba(36, 119, 242, 0.2);
}

.audio-header h1 {
    margin: 11px 0 5px;
    font-size: 1.18rem;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.audio-header p {
    margin: 0;
    max-width: 31ch;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    opacity: 0.88;
}

.audio-list {
    display: grid;
    gap: 10px;
    margin-top: 15px;
}

.playlist-list {
    background: #ffffff !important;
    border-radius: 14px !important; /* Menos redondeado */
    border: 1px solid #edf1f7 !important;
    box-shadow: 0 10px 25px rgba(31, 70, 126, 0.05) !important;
    overflow: hidden !important;
    margin-bottom: 20px !important;
}

.audio-track {
    position: relative !important;
    display: grid; /* Quitamos !important para que el filtro JS funcione */
    grid-template-columns: 36px 1fr !important; /* Solo dos columnas: botón e info */
    gap: 12px !important;
    align-items: center !important;
    padding: 8px 14px !important;
    margin-bottom: 0 !important;
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    background: #fff !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
}

.track-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    width: 100% !important;
}

.track-title-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    gap: 10px !important;
}

.track-title-row h2 {
    margin: 0 !important;
    flex: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Duración pequeña al fondo derecha */
.track-duration {
    display: block !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    color: #000 !important; 
    opacity: 0.8 !important;
    white-space: nowrap !important;
    min-width: 80px !important;
    text-align: right !important;
    font-family: monospace !important;
}

.track-meta {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important; /* Ancho completo bajo el título */
}

.track-subject-label {
    font-size: 0.7rem !important;
    color: #94a3b8 !important;
    max-width: 140px !important; /* Aumentado para ~25 caracteres */
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    cursor: pointer !important; /* Indicamos que es clickable */
}

.track-subject-label:hover {
    color: #2477f2 !important;
    text-decoration: underline !important;
}

.track-progress-container {
    position: relative !important;
    flex-grow: 1 !important;
    height: 4px !important;
    background: #e2e8f0 !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    margin: 0 !important;
    z-index: 5 !important;
}

.track-seeker {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    outline: none !important;
    cursor: pointer !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

.track-seeker::-webkit-slider-runnable-track {
    height: 4px !important;
    background: transparent !important;
}

.track-seeker::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 0 !important;
    height: 0 !important;
}

.audio-track.is-active .track-seeker::-webkit-slider-thumb {
    width: 8px !important;
    height: 8px !important;
    background: #000 !important;
    border-radius: 50% !important;
    margin-top: -2px !important;
}

.audio-track:last-child {
    border-bottom: none !important;
}

.audio-track.is-active {
    background: #f8fbff !important;
}

.audio-track:hover:not(.is-active) {
    background: #fafbfc !important;
}

/* Sincronización visual del progreso en NEGRO */
.audio-track.is-active .track-progress-container {
    background: linear-gradient(to right, #000 var(--p, 0%), #e2e8f0 var(--p, 0%)) !important;
}

.track-play-button {
    display: grid !important;
    width: 36px !important;
    height: 36px !important;
    place-items: center !important;
    border: 0 !important;
    border-radius: 50% !important;
    color: #fff !important;
    background: linear-gradient(135deg, #2f73ef, #2162df) !important;
    box-shadow: 0 4px 10px rgba(36, 119, 242, 0.2) !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    z-index: 2 !important;
}

.track-play-button:active {
    transform: scale(0.92);
}

.track-cover,
.player-cover {
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, #2d7cf4, #1858d6);
    font-weight: 900;
}

.track-cover {
    width: 48px;
    height: 48px;
    border-radius: 16px;
}

.track-cover-blue, .player-cover.track-cover-blue { background: linear-gradient(145deg, #2d7cf4, #1858d6); }
.track-cover-red, .player-cover.track-cover-red { background: linear-gradient(145deg, #e73f54, #b82336); }
.track-cover-purple, .player-cover.track-cover-purple { background: linear-gradient(145deg, #b752f4, #7530c7); }
.track-cover-green, .player-cover.track-cover-green { background: linear-gradient(145deg, #25bf7a, #13875a); }
.track-cover-orange, .player-cover.track-cover-orange { background: linear-gradient(145deg, #ff8b3d, #dc5622); }

.track-info {
    min-width: 0;
}

.track-info h2 {
    margin: 0;
    overflow: hidden;
    color: #192033;
    font-size: 0.86rem;
    font-weight: 900;
    letter-spacing: -0.035em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.track-info p {
    margin: 4px 0 0;
    overflow: hidden;
    color: #8b95a7;
    font-size: 0.68rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.track-duration {
    color: #9aa4b5;
    font-size: 0.68rem;
    font-weight: 900;
}

.audio-player {
    position: fixed;
    right: 0;
    bottom: 69px;
    left: 0;
    z-index: 11;
    width: 100%;
    max-width: 390px;
    margin: 0 auto;
    padding: 10px 12px 9px;
    border: 1px solid rgba(231, 237, 247, 0.95);
    border-radius: 22px 22px 0 0;
    background: rgba(255, 255, 255, 0.985);
    box-shadow: 0 -14px 30px rgba(22, 48, 88, 0.13);
    backdrop-filter: blur(18px);
}

.audio-player-now {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    align-items: center;
}

.player-cover {
    width: 42px;
    height: 42px;
    border-radius: 15px;
}

.audio-player-now h2 {
    margin: 0;
    overflow: hidden;
    color: #192033;
    font-size: 0.78rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audio-player-now p {
    margin: 3px 0 0;
    color: #8b95a7;
    font-size: 0.64rem;
    font-weight: 800;
}

.player-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 7px 0 6px;
}

.player-controls button {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #2f73ef;
    background: #eef4ff;
    font-size: 0.86rem;
    font-weight: 900;
}

.player-controls .player-main-button {
    width: 42px;
    height: 42px;
    color: #fff;
    background: linear-gradient(180deg, #2f73ef, #2162df);
    box-shadow: 0 10px 18px rgba(36, 119, 242, 0.25);
}

.player-progress-row {
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    gap: 7px;
    align-items: center;
    color: #8b95a7;
    font-size: 0.62rem;
    font-weight: 900;
}

.player-progress-row input {
    width: 100%;
    accent-color: #2f73ef;
}

/* Compact audio playlist */
.audio-page-shell {
    padding-bottom: 178px;
}

.audio-filters {
    display: grid;
    grid-template-columns: 0.7fr 1fr; /* Buscador más pequeño, Materia más grande */
    gap: 12px;
    margin-bottom: 14px;
}

.audio-filters label {
    display: grid;
    gap: 7px;
    color: #8b95a7;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.audio-filters input,
.audio-filters select {
    width: 100%;
    min-height: 38px; /* Más compacto */
    border: 1px solid #edf1f7;
    border-radius: 12px;
    outline: 0;
    padding: 0 14px;
    color: #192033;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 10px rgba(22, 48, 88, 0.03);
    font-size: 0.8rem;
    font-weight: 700;
}

.playlist-list {
    gap: 8px;
    margin-top: 0;
}

.playlist-track {
    grid-template-columns: 38px 1fr 42px;
    padding: 8px 10px;
    border-radius: 15px;
}

.playlist-track .track-play-button {
    width: 32px;
    height: 32px;
    font-size: 0.76rem;
}

.playlist-track .track-info h2 {
    font-size: 0.82rem;
}

.playlist-track .track-info p {
    margin-top: 2px;
    font-size: 0.64rem;
}

.playlist-track .track-duration {
    text-align: right;
}

/* Background audio option */
.background-audio-option {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid #edf1f7;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 22px rgba(22, 48, 88, 0.045);
}

.background-audio-option label {
    display: flex;
    gap: 8px;
    align-items: center;
    color: #192033;
    font-size: 0.74rem;
    font-weight: 900;
}

.background-audio-option input {
    accent-color: #2f73ef;
}

.background-audio-option small {
    display: block;
    margin-top: 5px;
    color: #8b95a7;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.25;
}

/* Student mini-app SPA */
.spa-shell {
    padding-bottom: 112px;
}

.app-section {
    display: none;
}

.app-section.is-active {
    display: block;
}

.bottom-nav button.bottom-nav-item {
    border: 0;
    background: transparent;
    font: inherit;
}

.app-audio-player.is-hidden {
    display: none;
}

.audio-bubble {
    position: fixed;
    right: calc(50% - 180px);
    bottom: 82px;
    z-index: 12;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 5px solid #fff;
    border-radius: 19px;
    color: #fff;
    background: linear-gradient(180deg, #2f73ef, #2162df);
    box-shadow: 0 16px 28px rgba(36, 119, 242, 0.32);
    font-size: 1rem;
    font-weight: 900;
}

.audio-bubble[hidden] {
    display: none;
}

.placeholder-section {
    padding: 22px;
    border: 1px solid #edf1f7;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 24px rgba(22, 48, 88, 0.055);
}

.placeholder-section h1 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.placeholder-section p {
    margin: 0;
    color: #8b95a7;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.4;
}

@media (max-width: 390px) {
    .audio-bubble {
        right: 14px;
    }
}

/* Footer label size restore */
.bottom-nav-item em {
    font-size: 0.66rem;
    line-height: 1;
}

.bottom-nav button.bottom-nav-item {
    font-size: 0.66rem;
}

.empty-audio-results {
    margin: 14px 0 0;
    padding: 14px;
    border: 1px solid #edf1f7;
    border-radius: 15px;
    color: #8b95a7;
    background: rgba(255, 255, 255, 0.88);
    text-align: center;
    font-size: 0.78rem;
    font-weight: 800;
}

/* Profile */
.profile-card,
.profile-section-card {
    border: 1px solid #edf1f7;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 24px rgba(22, 48, 88, 0.055);
}

.profile-card {
    display: grid;
    gap: 14px;
    justify-items: center;
    padding: 20px 16px;
    text-align: center;
}

.profile-photo-wrap {
    display: grid;
    gap: 10px;
    justify-items: center;
}

.profile-photo {
    display: grid;
    width: 104px;
    height: 104px;
    place-items: center;
    overflow: hidden;
    border: 5px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, #2f73ef, #13c8df);
    box-shadow: 0 16px 28px rgba(36, 119, 242, 0.24);
    font-size: 2rem;
    font-weight: 900;
}

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

.profile-photo-button {
    min-height: 34px;
    border: 0;
    border-radius: 999px;
    padding: 0 14px;
    color: #2f73ef;
    background: #eef4ff;
    font-size: 0.72rem;
    font-weight: 900;
}

.profile-main-info h1 {
    margin: 0;
    color: #192033;
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.profile-main-info p {
    margin: 6px 0 0;
    color: #8b95a7;
    font-size: 0.78rem;
    font-weight: 700;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

.profile-tags span {
    padding: 7px 10px;
    border-radius: 999px;
    color: #2f73ef;
    background: #eef4ff;
    font-size: 0.7rem;
    font-weight: 900;
}

.profile-section-card {
    margin-top: 14px;
    padding: 15px;
}

.profile-section-card h2 {
    margin: 0 0 12px;
    color: #192033;
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: -0.035em;
}

.device-card {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 10px;
    align-items: center;
}

.device-card > span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    background: #eef4ff;
}

.device-card strong {
    color: #192033;
    font-size: 0.82rem;
    font-weight: 900;
}

.device-card p {
    margin: 3px 0 0;
    color: #8b95a7;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.25;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.profile-stats-grid article {
    min-height: 74px;
    padding: 10px 6px;
    border-radius: 16px;
    background: #f7faff;
    text-align: center;
}

.profile-stats-grid strong {
    color: #192033;
    font-size: 1rem;
    font-weight: 900;
}

.profile-stats-grid p {
    margin: 5px 0 0;
    color: #7f8a9c;
    font-size: 0.6rem;
    font-weight: 900;
    line-height: 1.1;
}

/* Profile layout refinement */
.profile-card-horizontal {
    grid-template-columns: 106px 1fr;
    align-items: center;
    justify-items: stretch;
    gap: 14px;
    text-align: left;
}

.profile-card-horizontal .profile-photo-wrap {
    gap: 8px;
}

.profile-card-horizontal .profile-photo {
    width: 92px;
    height: 92px;
    font-size: 1.65rem;
}

.profile-card-horizontal .profile-photo-button {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.66rem;
}

.profile-detail-list {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.profile-detail-list p {
    margin: 0;
    overflow-wrap: anywhere;
    color: #6f7b8f;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.25;
}

.profile-detail-list strong {
    color: #192033;
    font-weight: 900;
}

.profile-plan-badge {
    width: fit-content;
    margin-top: 4px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #2f73ef;
    background: #eef4ff;
    font-size: 0.68rem;
    font-weight: 900;
}

.company-credit {
    margin-top: 14px;
    padding: 15px;
    border: 1px solid #edf1f7;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 24px rgba(22, 48, 88, 0.055);
    text-align: center;
}

.company-credit p {
    margin: 0;
    color: #7f8a9c;
    font-size: 0.76rem;
    font-weight: 800;
}

.company-credit strong {
    color: #192033;
    font-weight: 900;
}

.company-credit a {
    display: inline-flex;
    margin-top: 8px;
    color: #2f73ef;
    font-size: 0.72rem;
    font-weight: 900;
    text-decoration: none;
}

.social-links-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 4px;
}

.social-links-row a {
    margin-top: 0;
    padding: 5px 8px;
    background: #f1f5f9;
    border-radius: 8px;
    transition: background 0.2s;
}

.social-links-row a:active {
    background: #e2e8f0;
}

.social-web {
    color: #ef4444 !important; /* Rojo */
}

.social-tiktok {
    color: #000000 !important; /* Negro */
}

.social-facebook {
    color: #1877f2 !important; /* Azul Facebook oficial */
}

/* Profile expiration, premium CTA and fixed credit */
.profile-plan-badge {
    text-decoration: none;
}

.profile-plan-badge.free-upgrade {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    background: linear-gradient(135deg, #ff8b3d, #e73f54);
    box-shadow: 0 10px 18px rgba(231, 63, 84, 0.24);
}

.profile-plan-badge.premium {
    color: #8a5a00;
    background: linear-gradient(135deg, #ffe8a3, #ffc947);
}

.blink-dot {
    display: inline-grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    animation: redpolBlink 1s infinite;
}

@keyframes redpolBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(1.18); }
}

.company-credit {
    position: fixed;
    right: 0;
    bottom: 70px;
    left: 0;
    z-index: 9;
    width: 100%;
    max-width: 390px;
    margin: 0 auto;
    padding: 0 12px 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: auto;
}

.company-credit p {
    font-size: 0.68rem;
}

.company-credit a {
    margin-top: 2px;
    font-size: 0.66rem;
}

.spa-shell {
    padding-bottom: 136px;
}

/* Profile menu photo and credit position */
.company-credit {
    bottom: 86px;
}

.nav-profile-photo {
    overflow: hidden;
    color: #fff !important;
    background: linear-gradient(145deg, #2f73ef, #13c8df) !important;
    font-size: 0.64rem !important;
    font-weight: 900;
}

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

.student-book-cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}
.student-audio-embed {
    margin-top: 8px;
    border: 0;
    border-radius: 10px;
    background: #f3f4f6;
}

/* Menú inferior: salida */
.bottom-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1px;
    padding-left: 6px;
    padding-right: 6px;
}
.bottom-nav .nav-icon {
    width: 31px;
    height: 31px;
    border-radius: 12px;
    font-size: 1rem;
}
.bottom-nav-item em {
    font-size: .6rem;
}
.bottom-nav-logout {
    color: #dc2626;
}
.bottom-nav-logout .nav-icon {
    color: #dc2626;
    background: #fee2e2;
}
.nav-item-featured .nav-icon {
    width: 49px;
    height: 49px;
    border-radius: 18px;
}

/* Menú inferior cliente vuelve a 5 opciones; salida queda arriba en X */
.bottom-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    padding-left: 8px;
    padding-right: 8px;
}
.bottom-nav .nav-icon {
    width: 34px;
    height: 34px;
    border-radius: 14px;
    font-size: 1.08rem;
}
.bottom-nav-item em {
    font-size: .66rem;
}
.nav-item-featured .nav-icon {
    width: 54px;
    height: 54px;
    border-radius: 20px;
}

/* Ajuste visual menú inferior cliente */
.bottom-nav {
    min-height: 70px;
    padding-top: 6px;
    padding-bottom: 8px;
}
.bottom-nav .nav-icon {
    width: 38px;
    height: 38px;
    font-size: 1.22rem;
}
.bottom-nav .nav-profile-photo,
.bottom-nav .nav-profile-photo span {
    font-size: .9rem;
    font-weight: 900;
}
.nav-item-featured .nav-icon {
    width: 54px;
    height: 54px;
    font-size: 1.16rem;
}

/* Ajuste visual menú inferior cliente - refuerzo */
.bottom-nav {
    min-height: 62px;
    padding-top: 4px;
    padding-bottom: 6px;
}
.bottom-nav .nav-icon {
    width: 41px;
    height: 41px;
    font-size: 1.34rem;
}
.bottom-nav .nav-profile-photo,
.bottom-nav .nav-profile-photo span {
    font-size: 1rem;
    font-weight: 950;
}
.nav-item-featured .nav-icon {
    width: 54px;
    height: 54px;
    font-size: 1.16rem;
}
.bottom-nav-item em {
    font-size: .64rem;
}

/* Solo achicar fondo del menú inferior */
.bottom-nav {
    min-height: 54px;
    padding-top: 2px;
    padding-bottom: 3px;
}

/* Logo REDPOL PNG */
.brand-logo-image,
.login-logo-image {
    padding: 0;
    overflow: hidden;
    background: transparent !important;
    box-shadow: none !important;
}
.brand-logo-image img,
.login-logo-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.brand-logo-image {
    width: 42px;
    height: 42px;
    border-radius: 0;
}
.login-logo-image {
    width: 78px;
    height: 78px;
    border-radius: 0;
}
.login-reference-logo.login-logo-image {
    display: grid;
    width: 82px;
    height: 82px;
    margin: 0 auto;
    place-items: center;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
}
.login-reference-logo.login-logo-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Texto REDPOL vivo: máquina + color */
.brand-name {
    display: inline-block;
    overflow: hidden;
    max-width: 6ch;
    white-space: nowrap;
    border-right: 2px solid currentColor;
    animation: redpol-type-color 4.8s steps(6, end) infinite;
}
@keyframes redpol-type-color {
    0% { max-width: 0; color: #92400e; border-color: #92400e; }
    34% { max-width: 6ch; color: #b45309; border-color: #b45309; }
    52% { max-width: 6ch; color: #16a34a; border-color: #16a34a; }
    78% { max-width: 6ch; color: #16a34a; border-color: transparent; }
    88% { max-width: 6ch; color: #16a34a; border-color: #16a34a; }
    100% { max-width: 0; color: #92400e; border-color: #92400e; }
}

/* Card de noticias */
.news-hero-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 197, 94, .35);
    background:
        radial-gradient(circle at 92% 12%, rgba(34, 197, 94, .32), transparent 34%),
        linear-gradient(135deg, #020403 0%, #050706 55%, #06150c 100%) !important;
    box-shadow: 0 18px 38px rgba(0,0,0,.20), 0 0 0 1px rgba(34,197,94,.08);
}
.news-hero-card::after {
    content: '';
    position: absolute;
    right: -36px;
    bottom: -42px;
    width: 126px;
    height: 126px;
    border-radius: 50%;
    background: rgba(34,197,94,.12);
    filter: blur(1px);
}
.news-hero-card .app-kicker {
    position: relative;
    z-index: 1;
    color: #22c55e;
    letter-spacing: .12em;
}
.news-hero-card h1 {
    position: relative;
    z-index: 1;
    color: #fff;
    text-shadow: 0 0 18px rgba(34,197,94,.22);
}
.news-hero-card p {
    position: relative;
    z-index: 1;
    color: #bbf7d0;
}

/* Card de noticias: verde fosforescente */
.news-hero-card {
    border-color: rgba(57, 255, 20, .62) !important;
    background:
        radial-gradient(circle at 88% 14%, rgba(57, 255, 20, .42), transparent 34%),
        linear-gradient(135deg, #010301 0%, #040704 52%, #071f0a 100%) !important;
    box-shadow: 0 18px 42px rgba(0,0,0,.24), 0 0 28px rgba(57,255,20,.18);
}
.news-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}
.news-card-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    color: #071f0a;
    background: #39ff14;
    box-shadow: 0 0 18px rgba(57,255,20,.42);
    font-size: 1.08rem;
}
.news-hero-card .app-kicker {
    color: #39ff14;
    text-shadow: 0 0 14px rgba(57,255,20,.34);
}
.news-card-example {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 3px;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(57,255,20,.26);
    border-radius: 16px;
    background: rgba(57,255,20,.08);
}
.news-card-example strong {
    color: #ecffe9;
    font-size: .86rem;
    font-weight: 900;
}
.news-card-example small {
    color: #b9ffad;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.25;
}

/* Card de noticias compacto sin saludo */
.news-hero-card {
    padding-top: 13px !important;
    padding-bottom: 13px !important;
}
.news-card-example {
    margin-top: 8px;
}
.news-hero-card h1,
.news-hero-card > p {
    display: none !important;
}

/* Card Noticias: icono negro + contorno verde */
.news-card-icon {
    color: #39ff14;
    background: #020403;
    border: 1.5px solid #39ff14;
    box-shadow: 0 0 16px rgba(57,255,20,.34), inset 0 0 12px rgba(57,255,20,.08);
}
.news-hero-card .app-kicker {
    color: #39ff14 !important;
    font-weight: 950;
    letter-spacing: .16em;
}

/* Card Noticias: gris oscuro + verde chillón */
.news-hero-card {
    background:
        radial-gradient(circle at 88% 14%, rgba(57, 255, 20, .28), transparent 34%),
        linear-gradient(135deg, #202323 0%, #2b2f2f 54%, #1f2f24 100%) !important;
    box-shadow: 0 16px 34px rgba(15,23,42,.18), 0 0 18px rgba(57,255,20,.12);
}
.news-card-icon {
    background: #252929;
}
.news-card-example {
    background: rgba(57,255,20,.065);
}

/* Card Noticias: gris claro + verde clásico */
.news-hero-card {
    border-color: rgba(22, 163, 74, .22) !important;
    background:
        radial-gradient(circle at 88% 14%, rgba(22, 163, 74, .14), transparent 34%),
        linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 56%, #eef7f0 100%) !important;
    box-shadow: 0 14px 30px rgba(15,23,42,.08);
}
.news-card-icon {
    color: #16a34a;
    background: #f9fafb;
    border-color: #16a34a;
    box-shadow: 0 8px 18px rgba(22,163,74,.14), inset 0 0 0 1px rgba(255,255,255,.7);
}
.news-hero-card .app-kicker {
    color: #16a34a !important;
    text-shadow: none;
}
.news-card-example {
    border-color: rgba(22,163,74,.18);
    background: rgba(255,255,255,.72);
}
.news-card-example strong {
    color: #1f2937;
}
.news-card-example small {
    color: #4b5563;
}

/* Card Noticias: verde oscuro + verde clásico */
.news-hero-card {
    border-color: rgba(34, 197, 94, .30) !important;
    background:
        radial-gradient(circle at 88% 14%, rgba(34, 197, 94, .20), transparent 34%),
        linear-gradient(135deg, #052e16 0%, #064e3b 56%, #0f3d24 100%) !important;
    box-shadow: 0 14px 30px rgba(5,46,22,.20);
}
.news-card-icon {
    color: #22c55e;
    background: #052e16;
    border-color: #22c55e;
}
.news-hero-card .app-kicker {
    color: #22c55e !important;
}
.news-card-example {
    border-color: rgba(34,197,94,.22);
    background: rgba(255,255,255,.08);
}
.news-card-example strong {
    color: #f0fdf4;
}
.news-card-example small {
    color: #bbf7d0;
}

/* Autoevaluación y Simulacro: siempre en dos columnas en celular */
.primary-actions.compact-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.primary-actions.compact-actions .compact-feature {
    min-width: 0;
}
@media (max-width: 380px) {
    .primary-actions.compact-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px;
    }
    .compact-feature {
        min-height: 78px;
        padding: 10px 6px;
    }
    .compact-feature .feature-icon {
        width: 36px;
        height: 36px;
        margin-bottom: 6px;
    }
    .compact-feature h2 {
        font-size: .74rem;
    }
}

/* Cards clicables Autoevaluación / Simulacro */
button.feature-card {
    border: 1px solid #edf1f7;
    font: inherit;
    cursor: pointer;
}
button.feature-card:active {
    transform: scale(.98);
}
.practice-placeholder {
    display: none;
}
.practice-placeholder.is-active {
    display: block;
}
.practice-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #047857;
    background: #dcfce7;
    font-size: .64rem;
    font-weight: 900;
    letter-spacing: .08em;
}
.practice-placeholder button {
    margin-top: 14px;
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    color: #fff;
    background: #16a34a;
    font-weight: 900;
}

/* Top estudiantes: ranking compacto */
.ranking-item {
    grid-template-columns: 20px 38px 1fr auto;
    gap: 7px;
}
.rank-number {
    text-align: center;
}

/* Topbar: estadísticas y salir */
.stats-top-icon {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    color: #16a34a;
    font-size: 1.24rem;
    font-weight: 900;
    line-height: 1;
}
.logout-icon {
    color: #dc2626;
    font-size: 1.25rem;
    font-weight: 900;
}

/* Topbar iconos representativos */
.stats-top-icon {
    font-size: 1.18rem;
}
.logout-icon {
    color: #ef4444;
    font-size: 1.18rem;
}

/* Topbar: torta estadísticas + cerrar sesión */
.stats-top-icon {
    color: #16a34a;
    font-size: 1.55rem;
    transform: rotate(-25deg);
}
.logout-icon {
    color: #dc2626;
    font-size: 1.45rem;
}

/* Audios enlazados: solo título + reproductor */
.student-audio-embed {
    display: none !important;
}
.external-audio-track {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 7px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.external-audio-title {
    margin: 0 2px;
    overflow: hidden;
    color: #192033;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: -0.035em;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.external-embed-shell {
    height: 26px;
    padding: 0 6px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
}
.external-embed-shell .student-audio-embed {
    display: block !important;
    width: 125%;
    height: 32px;
    border: 0;
    transform: scale(.8) translateY(-4px);
    transform-origin: left top;
    filter: grayscale(.08) saturate(.9);
}

/* @audios: reproductor compacto y menú siempre al frente */
.bottom-nav {
    z-index: 40;
}
.audio-player {
    bottom: 47px;
    z-index: 30;
    max-width: 390px;
    padding: 6px 10px 5px;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 18px rgba(22, 48, 88, 0.11);
}
.audio-player-now {
    grid-template-columns: 30px 1fr;
    gap: 7px;
}
.player-cover {
    width: 30px;
    height: 30px;
    border-radius: 11px;
    font-size: 0.82rem;
}
.audio-player-now h2 {
    font-size: 0.68rem;
}
.audio-player-now p {
    margin-top: 1px;
    font-size: 0.55rem;
}
.player-controls {
    gap: 8px;
    margin: 3px 0 3px;
}
.player-controls button {
    width: 26px;
    height: 26px;
    font-size: 0.68rem;
}
.player-controls .player-main-button {
    width: 32px;
    height: 32px;
    box-shadow: 0 6px 12px rgba(36, 119, 242, 0.2);
}
.player-progress-row {
    grid-template-columns: 28px 1fr 28px;
    gap: 5px;
    font-size: 0.52rem;
}
.audio-page-shell,
.spa-shell {
    padding-bottom: 128px;
}

/* @audios: reproductor ordenado v6 */
.audio-player {
    bottom: 47px;
    z-index: 30;
    display: grid;
    gap: 4px;
    padding: 7px 11px 6px;
    border-radius: 17px 17px 0 0;
}
.audio-player-now {
    display: block !important;
    order: 2 !important;
    margin-top: -10px !important; /* Subir un poco más */
}
.audio-player-now .player-cover {
    display: none !important;
}
.audio-player-now > div {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 10px !important;
}
.audio-player-now p {
    order: 1 !important;
    margin: 0 !important;
    overflow: hidden !important;
    color: #2f73ef !important; /* Azul como en la imagen */
    font-size: 0.65rem !important;
    font-weight: 800 !important;
    text-align: left !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}
.audio-player-now h2 {
    order: 2;
    margin: 0;
    overflow: hidden;
    color: #192033;
    font-size: 0.74rem;
    font-weight: 900;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.player-controls {
    order: 1;
    gap: 10px;
    margin: 0;
}
.player-controls button {
    width: 29px;
    height: 29px;
    font-size: 0.74rem;
}
.player-controls .player-main-button {
    width: 35px;
    height: 35px;
}
.player-progress-row {
    order: 3;
    grid-template-columns: 30px 1fr 30px;
    gap: 5px;
    font-size: 0.55rem;
}

/* @user: menú inferior verde armonizado */
.bottom-nav-item.active {
    color: #047857;
}
.bottom-nav-item.active .nav-icon {
    color: #ecfdf5;
    background: linear-gradient(135deg, #052e16 0%, #064e3b 56%, #16a34a 100%);
    box-shadow: 0 10px 20px rgba(22, 163, 74, 0.24);
}
.nav-item-featured {
    color: #047857;
}
.nav-item-featured .nav-icon {
    width: 58px;
    height: 58px;
    border-color: #fff;
    color: #ecfdf5;
    background:
        radial-gradient(circle at 78% 14%, rgba(34, 197, 94, .24), transparent 32%),
        linear-gradient(135deg, #052e16 0%, #064e3b 56%, #16a34a 100%);
    box-shadow: 0 15px 28px rgba(5, 46, 22, .24), 0 0 18px rgba(34, 197, 94, .18);
    font-size: 1.48rem;
    font-weight: 950;
    letter-spacing: -0.05em;
}
.nav-item-featured em {
    color: #047857;
    font-weight: 900;
}

/* @user v8: activos simples y topbar ajustado */
.bottom-nav-item.active .nav-icon {
    color: #ecfdf5;
    background: #047857;
    box-shadow: 0 8px 16px rgba(4, 120, 87, 0.18);
}
.bottom-nav-item.nav-item-featured.active .nav-icon,
.nav-item-featured .nav-icon {
    color: #ecfdf5;
    background:
        radial-gradient(circle at 78% 14%, rgba(34, 197, 94, .24), transparent 32%),
        linear-gradient(135deg, #052e16 0%, #064e3b 56%, #16a34a 100%);
    box-shadow: 0 15px 28px rgba(5, 46, 22, .24), 0 0 18px rgba(34, 197, 94, .18);
}
.stats-top-icon {
    font-size: 3.1rem;
    transform: rotate(-25deg);
    line-height: .55;
}
.logout-icon {
    color: #dc2626;
    font-size: 1.65rem;
    font-weight: 950;
    line-height: 1;
}

/* @user v9: topbar iconos refinados */
.stats-top-icon {
    font-size: 1.55rem;
    transform: none;
    line-height: 1;
}
.logout-icon {
    color: #dc2626;
    font-size: 1.82rem;
    font-weight: 950;
    line-height: 1;
}

/* @user v10: iconos superiores oficiales en imagen */
.stats-top-icon,
.logout-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    transform: none;
    line-height: 1;
}
.stats-top-icon img,
.logout-icon img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}
.stats-top-icon img {
    width: 28px;
    height: 28px;
}
.logout-icon img {
    width: 31px;
    height: 31px;
}

/* @user v11: Banqueo XPRESS simulacro */
.xpress-section {
    padding-bottom: 18px;
}
.xpress-shell {
    display: grid;
    gap: 12px;
}
.xpress-top {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 58px;
    align-items: center;
    gap: 8px;
    min-height: 66px;
    padding: 10px 10px 10px 12px;
    border: 1px solid rgba(4, 120, 87, .18);
    border-radius: 22px;
    background: linear-gradient(135deg, #f8fafc 0%, #ecfdf5 100%);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .07);
}
.xpress-subject {
    min-width: 0;
    overflow: hidden;
    padding: 8px 10px;
    border-radius: 999px;
    color: #047857;
    background: rgba(4, 120, 87, .09);
    font-size: .66rem;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.xpress-brand {
    display: grid;
    justify-items: center;
    gap: 3px;
    color: #111827;
    font-size: .64rem;
    font-weight: 950;
    text-transform: uppercase;
}
.xpress-brand b { color: #047857; }
.xpress-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    color: #ecfdf5;
    background: linear-gradient(135deg, #052e16, #047857 60%, #22c55e);
    box-shadow: 0 10px 18px rgba(4, 120, 87, .22);
    font-size: 1.12rem;
    font-weight: 950;
}
.xpress-timer {
    position: relative;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    color: #047857;
    font-size: .9rem;
    font-weight: 950;
}
.xpress-timer svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.xpress-timer circle {
    fill: none;
    stroke: rgba(4, 120, 87, .12);
    stroke-width: 5;
}
.xpress-timer circle:last-child {
    stroke: #16a34a;
    stroke-linecap: round;
    transition: stroke-dashoffset .3s linear, stroke .2s ease;
}
.xpress-shell.is-urgent .xpress-timer { color: #dc2626; }
.xpress-shell.is-urgent .xpress-timer circle:last-child { stroke: #dc2626; }
.xpress-card {
    display: grid;
    gap: 12px;
    padding: 15px;
    border: 2px solid rgba(15, 23, 42, .06);
    border-radius: 24px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.xpress-card.is-good {
    border-color: #22c55e;
    box-shadow: 0 16px 34px rgba(34, 197, 94, .16);
}
.xpress-card.is-bad {
    border-color: #ef4444;
    box-shadow: 0 16px 34px rgba(239, 68, 68, .14);
}
.xpress-card.is-empty {
    border-color: #f59e0b;
    box-shadow: 0 16px 34px rgba(245, 158, 11, .14);
}
.xpress-status {
    color: #6b7280;
    font-size: .66rem;
    font-weight: 850;
}
.xpress-card.is-good .xpress-status { color: #16a34a; }
.xpress-card.is-bad .xpress-status { color: #dc2626; }
.xpress-card.is-empty .xpress-status { color: #d97706; }
.xpress-card h1 {
    margin: 0;
    color: #111827;
    font-size: 1.04rem;
    font-weight: 950;
    line-height: 1.25;
    letter-spacing: -.04em;
}
.xpress-counter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #047857;
    font-size: .72rem;
    font-weight: 950;
}
.xpress-dots {
    display: flex;
    gap: 5px;
}
.xpress-dots i {
    width: 18px;
    height: 5px;
    border-radius: 999px;
    background: #d1d5db;
}
.xpress-dots i.active { background: #047857; }
.xpress-options {
    display: grid;
    gap: 9px;
}
.xpress-options button {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 9px;
    align-items: center;
    min-height: 48px;
    padding: 8px 10px;
    border: 1.5px solid #e5e7eb;
    border-radius: 16px;
    color: #111827;
    background: #fff;
    text-align: left;
    font: inherit;
    box-shadow: 0 8px 16px rgba(15, 23, 42, .04);
}
.xpress-options span {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 12px;
    color: #047857;
    background: #ecfdf5;
    font-size: .78rem;
    font-weight: 950;
}
.xpress-options b {
    font-size: .8rem;
    font-weight: 850;
    line-height: 1.2;
}
.xpress-options button.is-correct {
    border-color: #22c55e;
    background: #f0fdf4;
}
.xpress-options button.is-selected-bad {
    border-color: #ef4444;
    background: #fef2f2;
}
.xpress-options button.is-selected-good span,
.xpress-options button.is-correct span {
    color: #fff;
    background: #16a34a;
}
.xpress-options button.is-selected-bad span {
    color: #fff;
    background: #dc2626;
}
.xpress-summary {
    padding: 17px;
    border-radius: 24px;
    background: linear-gradient(135deg, #052e16, #064e3b);
    color: #ecfdf5;
    box-shadow: 0 16px 34px rgba(5, 46, 22, .2);
}
.xpress-summary h2 {
    margin: 0 0 12px;
    font-size: 1.08rem;
    font-weight: 950;
}
.xpress-summary div {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.xpress-summary article {
    padding: 10px 6px;
    border-radius: 16px;
    background: rgba(255,255,255,.1);
    text-align: center;
}
.xpress-summary strong {
    display: block;
    font-size: 1.2rem;
}
.xpress-summary span {
    font-size: .62rem;
    font-weight: 800;
}
.xpress-summary button {
    width: 100%;
    margin-top: 12px;
    min-height: 42px;
    border: 0;
    border-radius: 15px;
    color: #052e16;
    background: #bbf7d0;
    font-weight: 950;
}

/* @user v12: simulacro con header imagen y pregunta integrada */
.xpress-image-header {
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    background: #dff4d8;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .06);
}
.xpress-image-header img {
    display: block;
    width: 100%;
    height: auto;
}
.xpress-top {
    margin-top: -1px;
    border-radius: 0;
    border-top: 0;
    background: linear-gradient(180deg, #dff4d8 0%, #edf9e9 100%);
    box-shadow: none;
}
.xpress-card {
    gap: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.xpress-question-panel {
    padding: 15px 14px 14px;
    border: 1px solid rgba(34, 197, 94, .22);
    border-top: 0;
    border-radius: 0 0 22px 22px;
    background: linear-gradient(180deg, #edf9e9 0%, #f7fff5 100%);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .06);
}
.xpress-card.is-good .xpress-question-panel {
    border-color: #22c55e;
    box-shadow: 0 14px 28px rgba(34, 197, 94, .14);
}
.xpress-card.is-bad .xpress-question-panel {
    border-color: #ef4444;
    box-shadow: 0 14px 28px rgba(239, 68, 68, .12);
}
.xpress-card.is-empty .xpress-question-panel {
    border-color: #f59e0b;
}
.xpress-card h1 {
    margin-top: 7px;
    font-size: .98rem;
    line-height: 1.32;
}
.xpress-counter {
    margin: 10px 2px 11px;
}
.xpress-options button {
    align-items: flex-start;
    min-height: 58px;
    padding: 10px;
    border-radius: 17px;
}
.xpress-options b {
    font-size: .76rem;
    line-height: 1.28;
}
.xpress-justification {
    margin-top: 10px;
    padding: 10px 11px;
    border-radius: 15px;
    color: #374151;
    background: rgba(255,255,255,.72);
    font-size: .72rem;
    font-weight: 750;
    line-height: 1.34;
}

/* @user v13: XPRESS replicado en CSS, sin imagen */
.xpress-image-header {
    display: none !important;
}
.xpress-top {
    grid-template-columns: minmax(0, 1fr) auto 54px;
    min-height: 74px;
    margin-top: 0;
    padding: 12px 11px;
    border: 1px solid rgba(34, 197, 94, .22);
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    background:
        radial-gradient(circle at 78% 8%, rgba(34,197,94,.20), transparent 30%),
        linear-gradient(180deg, #dff4d8 0%, #edf9e9 100%);
    box-shadow: 0 12px 24px rgba(15, 23, 42, .06);
}
.xpress-subject {
    align-self: center;
    padding: 8px 10px;
    border: 1px solid rgba(4, 120, 87, .13);
    color: #065f46;
    background: rgba(255,255,255,.52);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}
.xpress-brand {
    min-width: 84px;
    gap: 2px;
    line-height: 1;
}
.xpress-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    font-size: 1.32rem;
}
.xpress-brand strong {
    display: grid;
    gap: 1px;
    justify-items: center;
    color: #111827;
    font-size: .62rem;
    line-height: .95;
}
.xpress-brand b {
    display: block;
    color: #047857;
    font-size: .74rem;
    letter-spacing: .06em;
}
.xpress-timer {
    width: 48px;
    height: 48px;
    font-size: .82rem;
}
.xpress-question-panel {
    border-top: 0;
    border-radius: 0 0 22px 22px;
    background: linear-gradient(180deg, #edf9e9 0%, #f7fff5 100%);
}

/* @user v14: header XPRESS más limpio y unido a pregunta */
.xpress-top {
    grid-template-columns: minmax(0, 1fr) auto 42px;
    min-height: 58px;
    gap: 8px;
    padding: 10px 12px 7px;
    border: 1px solid rgba(34, 197, 94, .18);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    background: linear-gradient(180deg, #dff4d8 0%, #edf9e9 100%);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .055);
}
.xpress-subject {
    padding: 0;
    border: 0;
    border-radius: 0;
    color: #064e3b;
    background: transparent;
    box-shadow: none;
    font-size: .68rem;
    font-weight: 950;
    letter-spacing: -.02em;
}
.xpress-brand {
    display: grid;
    grid-template-columns: 34px auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 7px;
    min-width: 94px;
}
.xpress-mark {
    grid-row: 1 / 3;
    width: 34px;
    height: 34px;
    border-radius: 13px;
    font-size: 1.16rem;
}
.xpress-brand strong {
    display: contents;
}
.xpress-brand strong::before {
    content: 'Banqueo';
    color: #111827;
    font-size: .68rem;
    font-weight: 950;
    line-height: .95;
    text-transform: none;
}
.xpress-brand strong > b {
    color: #047857;
    font-size: .72rem;
    font-weight: 950;
    line-height: .95;
    letter-spacing: .08em;
}
.xpress-brand strong {
    font-size: 0;
}
.xpress-timer {
    width: 40px;
    height: 40px;
    font-size: .72rem;
}
.xpress-timer circle {
    stroke-width: 4;
}
.xpress-question-panel {
    margin-top: 0;
    padding-top: 11px;
    border-color: rgba(34, 197, 94, .18);
    border-radius: 0 0 22px 22px;
    background: linear-gradient(180deg, #edf9e9 0%, #f7fff5 100%);
}

/* @user v15: Simulacro sin header REDPOL y header XPRESS limpio */
.top-bar[hidden] {
    display: none !important;
}
.xpress-top {
    position: sticky;
    top: 0;
    z-index: 8;
    grid-template-columns: minmax(0, 15ch) auto 42px;
    min-height: 54px;
    padding: 8px 10px 7px;
}
.xpress-subject {
    max-width: 15ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.xpress-brand {
    grid-template-columns: auto auto;
    min-width: 92px;
    column-gap: 6px;
}
.xpress-mark {
    width: auto;
    height: auto;
    border-radius: 0;
    color: #052e16;
    background: transparent;
    box-shadow: none;
    font-size: 1.55rem;
    font-weight: 950;
    line-height: .9;
}
.xpress-brand strong::before {
    font-size: .68rem;
}
.xpress-brand strong > b {
    font-size: .74rem;
}

/* @user v16: composición fina header XPRESS */
.xpress-top {
    grid-template-columns: minmax(0, 15ch) 32px 72px 34px;
    column-gap: 8px;
    min-height: 50px;
}
.xpress-brand {
    display: contents;
}
.xpress-mark {
    grid-column: 2;
    justify-self: center;
    align-self: center;
    color: #facc15;
    text-shadow: 0 2px 6px rgba(250, 204, 21, .24);
    font-size: 1.7rem;
}
.xpress-brand strong {
    grid-column: 3;
    display: grid;
    justify-items: start;
    align-self: center;
    margin-left: 14px;
    line-height: .94;
}
.xpress-brand strong::before {
    font-size: .68rem;
}
.xpress-brand strong > b {
    font-size: .72rem;
}
.xpress-timer {
    grid-column: 4;
    width: 34px;
    height: 34px;
    font-size: .66rem;
}
.xpress-timer circle {
    stroke-width: 3.6;
}

/* @user v17: X independiente para ajuste por coordenadas */
.xpress-top {
    position: relative;
    grid-template-columns: minmax(0, 15ch) minmax(0, 1fr) 34px;
    column-gap: 8px;
    overflow: visible;
}
.xpress-brand {
    display: grid;
    grid-column: 2;
    justify-self: center;
    min-width: 86px;
}
.xpress-mark {
    position: absolute;
    z-index: 2;
    left: 46%;
    top: -10px;
    grid-column: auto;
    justify-self: auto;
    font-size: 2.15rem;
    line-height: 1;
    pointer-events: none;
}
.xpress-brand strong {
    grid-column: auto;
    margin-left: 28px;
    justify-items: start;
}
.xpress-timer {
    grid-column: 3;
}

/* @user v18: header simulacro con color Resultado XPRESS */
.xpress-section {
    padding-top: 10px;
}
.xpress-top {
    margin-top: 10px;
    border-color: rgba(187, 247, 208, .18);
    background: linear-gradient(135deg, #052e16 0%, #064e3b 58%, #0f3d24 100%);
    box-shadow: 0 14px 28px rgba(5, 46, 22, .22);
}
.xpress-subject {
    color: #bbf7d0;
}
.xpress-mark {
    color: #facc15;
    text-shadow: 0 2px 10px rgba(250, 204, 21, .35);
}
.xpress-brand strong::before {
    color: #f0fdf4;
}
.xpress-brand strong > b {
    color: #bbf7d0;
}
.xpress-timer {
    color: #bbf7d0;
}
.xpress-timer circle {
    stroke: rgba(187, 247, 208, .2);
}
.xpress-timer circle:last-child {
    stroke: #bbf7d0;
}
.xpress-question-panel {
    border-color: rgba(6, 78, 59, .16);
    background: linear-gradient(180deg, #edf9e9 0%, #f8fff6 100%);
}

/* @user v19: card superior completo con degradado visible */
.xpress-top {
    overflow: hidden;
    padding: 12px 12px 12px;
    border: 0;
    border-radius: 24px 24px 0 0;
    background:
        radial-gradient(circle at 18% 8%, rgba(187, 247, 208, .16), transparent 32%),
        radial-gradient(circle at 86% 18%, rgba(34, 197, 94, .22), transparent 34%),
        linear-gradient(135deg, #052e16 0%, #064e3b 52%, #0f3d24 100%) !important;
    box-shadow: 0 16px 32px rgba(5, 46, 22, .24);
}
.xpress-question-panel {
    border-top: 0;
    border-radius: 0 0 22px 22px;
}

/* @user v20: fondo detrás del header simulacro con degradado */
.xpress-section.is-active {
    margin: -14px -16px 0;
    padding: 16px 16px 18px;
    border-radius: 0 0 26px 26px;
    background:
        radial-gradient(circle at 16% 4%, rgba(187, 247, 208, .18), transparent 30%),
        radial-gradient(circle at 88% 2%, rgba(34, 197, 94, .18), transparent 34%),
        linear-gradient(180deg, #052e16 0%, #064e3b 94px, transparent 95px);
}
.xpress-section.is-active .xpress-shell {
    position: relative;
    z-index: 1;
}

/* @user v21: header XPRESS sin card, sobre fondo general */
.xpress-top {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin-top: 6px;
}
.xpress-mark {
    left: 36%;
}
.xpress-question-panel {
    border-top: 1px solid rgba(34, 197, 94, .12);
    border-radius: 22px;
}

/* @user v22: ajuste fino X y nombre centrado */
.xpress-top {
    grid-template-columns: minmax(0, 15ch) 1fr 34px;
}
.xpress-mark {
    left: 41%;
    top: -12px;
    font-size: 2.35rem;
}
.xpress-brand {
    grid-column: 1 / -1;
    justify-self: center;
    align-self: center;
    pointer-events: none;
}
.xpress-brand strong {
    margin-left: 0;
    justify-items: center;
    text-align: center;
}
.xpress-subject,
.xpress-timer {
    position: relative;
    z-index: 1;
}

/* @user v23: header más abajo y X sobre el nombre */
.xpress-section.is-active {
    padding-top: 24px;
}
.xpress-top {
    margin-top: 18px;
    min-height: 62px;
    align-items: center;
}
.xpress-brand {
    grid-column: 1 / -1;
    justify-self: center;
    align-self: center;
    z-index: 1;
}
.xpress-mark {
    left: 41%;
    top: 8px;
    z-index: 3;
    font-size: 2.35rem;
}
.xpress-brand strong {
    transform: translateY(4px);
}
.xpress-timer {
    align-self: center;
}
.xpress-question-panel {
    margin-top: 4px;
}

/* @user v24: header más abajo y elementos en una misma línea */
.xpress-section.is-active {
    padding-top: 44px;
}
.xpress-top {
    margin-top: 30px;
    min-height: 54px;
    align-items: center;
}
.xpress-subject {
    align-self: center;
    transform: translateY(2px);
}
.xpress-brand {
    align-self: center;
}
.xpress-brand strong {
    transform: translateY(2px);
}
.xpress-mark {
    top: 12px;
}
.xpress-timer {
    align-self: center;
    transform: translateY(2px);
}

/* @user v25: volver al punto estable del header Simulacro */
.xpress-section.is-active {
    margin: -14px -16px 0;
    padding: 16px 16px 18px;
    border-radius: 0 0 26px 26px;
    background:
        radial-gradient(circle at 16% 4%, rgba(187, 247, 208, .18), transparent 30%),
        radial-gradient(circle at 88% 2%, rgba(34, 197, 94, .18), transparent 34%),
        linear-gradient(180deg, #052e16 0%, #064e3b 94px, transparent 95px);
}
.xpress-top {
    position: relative;
    top: auto;
    z-index: 8;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 54px;
    align-items: center;
    gap: 8px;
    min-height: 74px;
    margin-top: 10px;
    padding: 12px 11px;
    overflow: hidden;
    border: 0 !important;
    border-radius: 24px 24px 0 0 !important;
    background:
        radial-gradient(circle at 18% 8%, rgba(187, 247, 208, .16), transparent 32%),
        radial-gradient(circle at 86% 18%, rgba(34, 197, 94, .22), transparent 34%),
        linear-gradient(135deg, #052e16 0%, #064e3b 52%, #0f3d24 100%) !important;
    box-shadow: 0 16px 32px rgba(5, 46, 22, .24) !important;
}
.xpress-subject {
    position: static;
    max-width: 15ch;
    padding: 0;
    border: 0;
    color: #bbf7d0;
    background: transparent;
    box-shadow: none;
    font-size: .68rem;
    font-weight: 950;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: none;
}
.xpress-brand {
    display: grid;
    grid-template-columns: 34px auto;
    grid-template-rows: auto auto;
    align-items: center;
    justify-self: center;
    align-self: center;
    column-gap: 7px;
    min-width: 94px;
    pointer-events: auto;
    z-index: 1;
}
.xpress-mark {
    position: static;
    grid-row: 1 / 3;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #facc15;
    background: transparent;
    box-shadow: none;
    font-size: 1.55rem;
    font-weight: 950;
    line-height: .9;
    text-shadow: 0 2px 10px rgba(250, 204, 21, .35);
    pointer-events: none;
}
.xpress-brand strong {
    display: grid;
    justify-items: start;
    align-self: center;
    margin-left: 0;
    color: transparent;
    font-size: 0;
    line-height: .95;
    transform: none;
    text-align: left;
}
.xpress-brand strong::before {
    content: 'Banqueo';
    color: #f0fdf4;
    font-size: .68rem;
    font-weight: 950;
    line-height: .95;
    text-transform: none;
}
.xpress-brand strong > b {
    display: block;
    color: #bbf7d0;
    font-size: .74rem;
    font-weight: 950;
    line-height: .95;
    letter-spacing: .08em;
}
.xpress-timer {
    position: relative;
    grid-column: auto;
    align-self: center;
    width: 48px;
    height: 48px;
    color: #bbf7d0;
    font-size: .82rem;
    transform: none;
}
.xpress-timer circle {
    stroke: rgba(187, 247, 208, .2);
    stroke-width: 4;
}
.xpress-timer circle:last-child {
    stroke: #bbf7d0;
}
.xpress-question-panel {
    margin-top: 0;
    padding: 15px 14px 14px;
    border: 1px solid rgba(6, 78, 59, .16);
    border-top: 0;
    border-radius: 0 0 22px 22px;
    background: linear-gradient(180deg, #edf9e9 0%, #f8fff6 100%);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .06);
}

/* @user v26: orden header materia | nombre | cronómetro */
.xpress-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, auto) 48px;
    align-items: center;
}
.xpress-subject {
    justify-self: start;
    text-align: left;
}
.xpress-brand {
    justify-self: center;
    align-self: center;
}
.xpress-timer {
    justify-self: end;
    align-self: center;
}

/* @user v27: header en una sola línea sin saltos */
.xpress-top {
    grid-template-columns: minmax(0, 1fr) auto 48px;
    white-space: nowrap;
}
.xpress-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
}
.xpress-mark {
    position: static;
    flex: 0 0 auto;
    width: auto;
    height: auto;
    font-size: 1.45rem;
}
.xpress-brand strong {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    margin: 0;
    white-space: nowrap;
}
.xpress-brand strong::before {
    content: 'Banqueo';
    display: inline;
}
.xpress-brand strong > b {
    display: inline;
    letter-spacing: .04em;
}
.xpress-subject {
    white-space: nowrap;
}
.xpress-timer {
    flex: 0 0 auto;
}

/* @user v28: header simple en 3 bloques horizontales */
.xpress-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    min-height: 62px !important;
    white-space: nowrap !important;
}
.xpress-subject {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.xpress-brand {
    flex: 0 0 auto !important;
    display: grid !important;
    justify-items: center !important;
    align-items: center !important;
    gap: 1px !important;
    min-width: 72px !important;
    white-space: nowrap !important;
}
.xpress-mark {
    display: none !important;
}
.xpress-brand strong {
    display: grid !important;
    justify-items: center !important;
    gap: 1px !important;
    margin: 0 !important;
    text-align: center !important;
    line-height: .9 !important;
    white-space: nowrap !important;
}
.xpress-brand strong::before {
    content: 'Banqueo' !important;
    display: block !important;
    color: #f0fdf4 !important;
    font-size: .74rem !important;
    font-weight: 950 !important;
}
.xpress-brand strong > b {
    display: block !important;
    color: #bbf7d0 !important;
    font-size: .72rem !important;
    font-weight: 950 !important;
    letter-spacing: .06em !important;
}
.xpress-timer {
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    margin-left: auto !important;
}

/* @user v29: bajar ligeramente header XPRESS */
.xpress-section.is-active {
    padding-top: 28px !important;
}
.xpress-top {
    margin-top: 12px !important;
}

/* @user v30: bajar un poco más header XPRESS */
.xpress-section.is-active {
    padding-top: 40px !important;
}
.xpress-top {
    margin-top: 18px !important;
}

/* @user v31: tipografía pregunta/opciones simulacro */
.xpress-card h1 {
    font-size: calc(.98rem - 1px) !important;
}
.xpress-options b {
    font-weight: 500 !important;
}

/* @user v32: sin estado arriba y justificación abajo */
.xpress-status {
    display: none !important;
}
.xpress-justification {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 14px;
    color: #374151;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
    font-size: .74rem;
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.is-good .xpress-justification {
    background: #f0fdf4 !important;
    border-color: rgba(34, 197, 94, 0.2) !important;
}

.is-bad .xpress-justification {
    background: #fef2f2 !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
}

.is-empty .xpress-justification {
    background: #f8fafc !important;
    border-color: rgba(100, 116, 139, 0.2) !important;
}

/* @user v33: respuesta sin sombra ni fondo extra */
.xpress-options button,
.xpress-options button.is-correct,
.xpress-options button.is-selected-good,
.xpress-options button.is-selected-bad {
    box-shadow: none !important;
    background: #fff !important;
}
.xpress-options button.is-correct,
.xpress-options button.is-selected-good {
    border-color: #22c55e !important;
}
.xpress-options button.is-selected-bad {
    border-color: #ef4444 !important;
}
.xpress-options button.is-selected-good span,
.xpress-options button.is-correct span {
    color: #16a34a !important;
    background: #ecfdf5 !important;
}
.xpress-options button.is-selected-bad span {
    color: #dc2626 !important;
    background: #fef2f2 !important;
}

/* @user v34: responder sin gris/sombras; solo opción elegida verde/roja */
.xpress-card,
.xpress-card.is-good,
.xpress-card.is-bad,
.xpress-card.is-empty,
.xpress-card.is-good .xpress-question-panel,
.xpress-card.is-bad .xpress-question-panel,
.xpress-card.is-empty .xpress-question-panel {
    box-shadow: none !important;
}
.xpress-card.is-good .xpress-question-panel,
.xpress-card.is-bad .xpress-question-panel,
.xpress-card.is-empty .xpress-question-panel {
    border-color: rgba(6, 78, 59, .16) !important;
    background: linear-gradient(180deg, #edf9e9 0%, #f8fff6 100%) !important;
}
.xpress-options button,
.xpress-options button:disabled,
.xpress-options button[disabled] {
    opacity: 1 !important;
    filter: none !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
}
.xpress-options button:disabled span,
.xpress-options button[disabled] span {
    opacity: 1 !important;
}
.xpress-options button.is-selected-good,
.xpress-options button.is-selected-good:disabled {
    border-color: #16a34a !important;
    background: #dcfce7 !important;
}
.xpress-options button.is-selected-bad,
.xpress-options button.is-selected-bad:disabled {
    border-color: #dc2626 !important;
    background: #fee2e2 !important;
}
.xpress-options button.is-selected-good span,
.xpress-options button.is-selected-good:disabled span {
    color: #fff !important;
    background: #16a34a !important;
}
.xpress-options button.is-selected-bad span,
.xpress-options button.is-selected-bad:disabled span {
    color: #fff !important;
    background: #dc2626 !important;
}

/* @user v35: justificación con título y popup resultado */
.xpress-justification strong {
    display: block;
    margin-bottom: 4px;
    color: #047857;
    font-weight: 950;
}
.xpress-result-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, .45);
    backdrop-filter: blur(5px);
}
.xpress-result-modal[hidden] {
    display: none !important;
}
.xpress-result-card {
    position: relative;
    width: min(100%, 340px);
    padding: 22px 16px 16px;
    border-radius: 26px;
    color: #ecfdf5;
    background: linear-gradient(135deg, #052e16 0%, #064e3b 58%, #0f3d24 100%);
    box-shadow: 0 24px 55px rgba(5, 46, 22, .34);
    text-align: center;
}
.xpress-result-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    color: #bbf7d0;
    background: rgba(255,255,255,.12);
    font-size: 1.25rem;
    font-weight: 900;
}
.xpress-result-emoji {
    font-size: 3rem;
    line-height: 1;
}
.xpress-result-card h2 {
    margin: 10px 0 4px;
    font-size: 1.05rem;
    font-weight: 950;
}
.xpress-result-percent {
    display: block;
    font-size: 2rem;
    font-weight: 950;
    color: #bbf7d0;
}
.xpress-result-card p {
    margin: 6px 0 14px;
    color: #dcfce7;
    font-size: .82rem;
    font-weight: 800;
}
.xpress-result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.xpress-result-grid article {
    padding: 10px 6px;
    border-radius: 16px;
    background: rgba(255,255,255,.10);
}
.xpress-result-grid strong {
    display: block;
    font-size: 1.18rem;
}
.xpress-result-grid span {
    font-size: .62rem;
    font-weight: 800;
}
.xpress-result-repeat {
    width: 100%;
    min-height: 44px;
    margin-top: 12px;
    border: 0;
    border-radius: 16px;
    color: #052e16;
    background: #bbf7d0;
    font-weight: 950;
}
.xpress-result-change-title {
    margin: 9px 0 0 !important;
    color: #dcfce7 !important;
    font-size: .76rem !important;
    font-weight: 400 !important;
}
.xpress-result-actions {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 10px;
    margin-top: 10px;
}
.xpress-result-home,
.xpress-result-change {
    min-height: 46px;
    border: 0;
    border-radius: 16px;
    font-weight: 950;
}
.xpress-result-home {
    display: grid;
    place-items: center;
    color: #052e16;
    background: linear-gradient(135deg, #fef3c7, #f59e0b);
    box-shadow: 0 10px 22px rgba(245, 158, 11, .24);
}
.xpress-result-home span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 10px;
    background: rgba(255,255,255,.34);
    font-size: 1.25rem;
    line-height: 1;
}
.xpress-result-change {
    display: grid;
    align-items: center;
    padding: 0 10px;
    color: #052e16;
    background: #bbf7d0;
}
.xpress-result-change select {
    min-width: 0;
    width: 100%;
    border: 0;
    border-radius: 11px;
    padding: 8px 10px;
    color: #064e3b;
    background: rgba(255,255,255,.7);
    font: inherit;
    font-size: .74rem;
    font-weight: 850;
    outline: none;
}

/* @user v36: tema + valoración en justificación */
.xpress-topic-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    padding: 8px 14px;
    margin-left: -14px;
    margin-right: -14px;
    margin-bottom: -12px;
    background: rgba(0, 0, 0, 0.03);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0 0 14px 14px;
    color: #4b5563;
    font-size: .7rem;
}
.xpress-topic-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.xpress-topic-row b {
    color: #047857;
    font-weight: 950;
}
.xpress-topic-row em {
    flex: 0 0 auto;
    font-style: normal;
    letter-spacing: 2px;
}

/* @user v37: like/dislike gris hasta seleccionar */
.xpress-topic-row em {
    display: inline-flex;
    gap: 6px;
    letter-spacing: 0;
}
.xpress-topic-row button {
    border: 0;
    padding: 0;
    background: transparent;
    filter: grayscale(1);
    opacity: .48;
    font-size: calc(1rem + 1px);
    line-height: 1;
}
.xpress-topic-row button.is-active {
    filter: none;
    opacity: 1;
}

/* @user v38: Banqueo XPRESS centrado absoluto en header */
.xpress-top {
    position: relative !important;
}
.xpress-brand {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 2 !important;
}
.xpress-subject {
    padding-right: 78px !important;
}
.xpress-timer {
    position: relative !important;
    z-index: 3 !important;
}

/* @user v39: materia 13 chars, cronómetro menor y pregunta conectada */
.xpress-subject {
    max-width: 13ch !important;
}
.xpress-timer {
    flex-basis: 38px !important;
    width: 38px !important;
    height: 38px !important;
    font-size: .66rem !important;
}
.xpress-timer circle {
    stroke-width: 3.4 !important;
}
.xpress-card {
    margin-top: -1px !important;
}
.xpress-question-panel {
    margin-top: 0 !important;
    border-top: 0 !important;
    border-radius: 0 0 22px 22px !important;
    transform: translateY(-1px);
}
.xpress-counter {
    margin-top: 8px !important;
}

/* @user v40: unir header con pregunta y mostrar 13 caracteres materia */
.xpress-shell {
    gap: 0 !important;
}
.xpress-top {
    margin-bottom: 0 !important;
    border-radius: 24px 24px 0 0 !important;
}
.xpress-card {
    margin-top: 0 !important;
}
.xpress-question-panel {
    margin-top: 0 !important;
    transform: none !important;
    border-top: 0 !important;
    border-radius: 0 0 22px 22px !important;
}
.xpress-subject {
    flex: 0 0 13ch !important;
    width: 13ch !important;
    max-width: 13ch !important;
    padding-right: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* @user v41: header bloqueado + X independiente */
.xpress-floating-x {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 6;
    transform: translate(-50%, -50%);
    color: #facc15;
    font-size: 1.95rem;
    font-weight: 950;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(250, 204, 21, .35);
    pointer-events: none;
}

/* @user v42: mover X independiente */
.xpress-floating-x {
    left: 40%;
    font-size: 2.24rem;
}

/* @user v43: ajuste X independiente */
.xpress-floating-x {
    left: 35%;
    font-size: 2.46rem;
}

/* @user v44: ajuste X independiente */
.xpress-floating-x {
    left: 38%;
    font-size: 2.83rem;
}

/* @user v45: pregunta centrada y aire si es corta */
.xpress-card h1 {
    text-align: center !important;
}
.xpress-card h1.is-short-question {
    padding-top: 12px;
    padding-bottom: 12px;
}

/* @user v46: opciones centradas verticalmente */
.xpress-options button {
    align-items: center !important;
}
.xpress-options b {
    align-self: center !important;
}
.xpress-options span {
    align-self: center !important;
}

/* @user v47: pausa al tocar y siguiente manual */
.xpress-shell.is-paused .xpress-timer {
    opacity: .72;
}
.xpress-nav-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}
.xpress-nav-actions button {
    min-height: 36px;
    border: 0;
    border-radius: 999px;
    padding: 0 14px;
    color: #ecfdf5;
    background: #047857;
    font-size: .72rem;
    font-weight: 900;
}

/* @user v48: modo examen sin selección de texto */
.xpress-section,
.app-section[data-section="autoevaluacion"] {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* @user v49: ajuste fino header XPRESS */
.xpress-brand {
    left: 60% !important;
}
.xpress-floating-x {
    left: 43% !important;
}

/* @user v50: ajuste X independiente */
.xpress-floating-x {
    left: 48% !important;
    font-size: 3.11rem !important;
}

/* @user v51: ajuste final X independiente */
.xpress-floating-x {
    left: 45% !important;
}

/* @user v52: configuración inicial Simulacro XPRESS */
.xpress-config {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 8px;
    width: 95%;
    margin: 1px auto 0 0;
    padding: 16px 14px;
    border-radius: 24px;
    color: #ecfdf5;
    background:
        radial-gradient(circle at 18% 10%, rgba(250, 204, 21, .2), transparent 28%),
        linear-gradient(145deg, #064e3b 0%, #047857 54%, #022c22 100%);
    box-shadow: 0 18px 42px rgba(6, 78, 59, .22);
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
.xpress-config-kicker {
    justify-self: center;
    width: max-content;
    border-radius: 999px;
    padding: 5px 10px;
    color: #14532d;
    background: #fde68a;
    font-size: .67rem;
    font-weight: 1000;
    letter-spacing: .08em;
    text-align: center;
}
.xpress-config h1 {
    margin: 0;
    font-size: 1.28rem;
    line-height: 1.08;
    letter-spacing: -.04em;
}
.xpress-config p {
    margin: -5px 0 2px;
    color: rgba(236, 253, 245, .78);
    font-size: .78rem;
    font-weight: 700;
}
.xpress-range-card,
.xpress-field,
.xpress-config-summary {
    border: 1px solid rgba(236, 253, 245, .18);
    border-radius: 20px;
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(8px);
}
.xpress-range-card {
    display: grid;
    gap: 8px;
    padding: 13px;
}
.xpress-range-card > span,
.xpress-field span {
    color: rgba(236, 253, 245, .82);
    font-size: .74rem;
    font-weight: 900;
}
.xpress-range-card > strong {
    font-size: 1.2rem;
    color: #fef3c7;
}
.xpress-range-card input {
    width: 100%;
    accent-color: #facc15;
}
.xpress-range-card em {
    display: flex;
    justify-content: space-between;
    color: rgba(236, 253, 245, .78);
    font-size: .68rem;
    font-style: normal;
}
.xpress-field {
    display: grid;
    gap: 7px;
    padding: 12px;
}
.xpress-field select {
    min-height: 42px;
    border: 0;
    border-radius: 15px;
    padding: 0 12px;
    color: #064e3b;
    background: #ecfdf5;
    font-weight: 900;
    outline: none;
}
.xpress-config-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 12px;
}
.xpress-config-summary article {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: rgba(236, 253, 245, .82);
    font-size: .76rem;
    font-weight: 400;
}
.xpress-config-summary article > span:last-child {
    color: #fef3c7;
    text-align: right;
    font-weight: 400;
}
.xpress-start-button {
    min-height: 48px;
    border: 0;
    border-radius: 18px;
    color: #064e3b;
    background: linear-gradient(135deg, #fde68a, #facc15);
    font-size: .92rem;
    font-weight: 1000;
    box-shadow: 0 12px 24px rgba(250, 204, 21, .2);
}
.xpress-starting {
    display: grid;
    place-items: center;
    min-height: 280px;
    margin-top: 36px;
    color: #ecfdf5;
    text-align: center;
    animation: xpress-start-pulse .95s ease-in-out infinite alternate;
}
.xpress-starting strong {
    color: #fde68a;
    font-size: 2rem;
    font-weight: 1000;
    letter-spacing: -.05em;
}
.xpress-starting span {
    margin-top: -90px;
    color: rgba(236, 253, 245, .82);
    font-size: .78rem;
    font-weight: 800;
}
@keyframes xpress-start-pulse {
    from { transform: scale(.98); opacity: .82; }
    to { transform: scale(1.02); opacity: 1; }
}

/* @user v53: respetar estados ocultos en flujo XPRESS */
.xpress-config[hidden],
.xpress-starting[hidden],
.xpress-top[hidden],
.xpress-card[hidden] {
    display: none !important;
}

/* @user v54: flujo limpio Simulacro config -> quiz -> resultado */
.xpress-shell.is-config .xpress-top,
.xpress-shell.is-config .xpress-card,
.xpress-shell.is-config .xpress-starting,
.xpress-shell.is-config .xpress-result-modal,
.xpress-shell.is-starting .xpress-config,
.xpress-shell.is-starting .xpress-top,
.xpress-shell.is-starting .xpress-card,
.xpress-shell.is-starting .xpress-result-modal,
.xpress-shell.is-running .xpress-config,
.xpress-shell.is-running .xpress-starting,
.xpress-shell.is-running .xpress-result-modal,
.xpress-shell.is-result .xpress-config,
.xpress-shell.is-result .xpress-starting,
.xpress-shell.is-result .xpress-top,
.xpress-shell.is-result .xpress-card {
    display: none !important;
}
.xpress-shell.is-config .xpress-config {
    display: grid !important;
}
.xpress-shell.is-starting .xpress-starting {
    display: grid !important;
}
.xpress-shell.is-running .xpress-top {
    display: flex !important;
}
.xpress-shell.is-running .xpress-card {
    display: block !important;
}
.xpress-shell.is-result .xpress-result-modal {
    display: grid !important;
}

/* @user v55: subir configuración Simulacro y reducir espacio superior a la mitad */
.xpress-section.is-active {
    padding-top: 20px !important;
}


/* @user v56: Autoevaluación XPRESS sin cronómetro */
.autoeval-shell .xpress-no-timer {
    width: auto !important;
    min-width: 74px !important;
    height: 34px !important;
    padding: 0 10px !important;
    border-radius: 0 !important;
    color: #fef3c7 !important;
    background: transparent !important;
    font-size: .7rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}
.autoeval-shell .xpress-no-timer span {
    white-space: nowrap;
}

/* @user v57: Autoevaluación con verde sutil diferenciado */
.autoeval-shell .xpress-config {
    color: #ecfdf5 !important;
    background:
        radial-gradient(circle at 18% 10%, rgba(240, 253, 244, .18), transparent 30%),
        radial-gradient(circle at 88% 12%, rgba(20, 184, 166, .18), transparent 32%),
        linear-gradient(145deg, #14532d 0%, #15803d 52%, #052e16 100%) !important;
    box-shadow: 0 18px 42px rgba(21, 128, 61, .22) !important;
}
.autoeval-shell .xpress-result-card {
    background:
        radial-gradient(circle at 16% 8%, rgba(240, 253, 244, .16), transparent 30%),
        radial-gradient(circle at 88% 12%, rgba(20, 184, 166, .18), transparent 34%),
        linear-gradient(135deg, #052e16 0%, #15803d 58%, #14532d 100%) !important;
    box-shadow: 0 24px 55px rgba(21, 128, 61, .32) !important;
}

/* @user v58: recorte de foto de perfil */
.profile-crop-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, .52);
    backdrop-filter: blur(5px);
}
.profile-crop-card {
    width: min(100%, 350px);
    padding: 18px 16px 16px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 24px 55px rgba(15, 23, 42, .24);
    text-align: center;
}
.profile-crop-card h2 {
    margin: 0 0 4px;
    color: #102033;
    font-size: 1.08rem;
    font-weight: 950;
}
.profile-crop-card p {
    margin: 0 0 14px;
    color: #6b7280;
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.32;
}
.profile-crop-stage {
    display: grid;
    place-items: center;
    touch-action: none;
}
.profile-crop-stage canvas {
    width: 280px;
    max-width: 100%;
    height: auto;
    border-radius: 50%;
    background: #e5e7eb;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .12);
    touch-action: none;
}
.profile-crop-zoom {
    display: grid;
    gap: 7px;
    margin-top: 14px;
    color: #374151;
    text-align: left;
    font-size: .74rem;
    font-weight: 850;
}
.profile-crop-zoom input {
    width: 100%;
    accent-color: #16a34a;
}
.profile-crop-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}
.profile-crop-actions button {
    min-height: 42px;
    border: 0;
    border-radius: 15px;
    font-weight: 950;
}
.profile-crop-actions [data-crop-cancel] {
    color: #374151;
    background: #f3f4f6;
}
.profile-crop-actions [data-crop-save] {
    color: #ecfdf5;
    background: linear-gradient(135deg, #047857, #16a34a);
}

/* @user v59: foto de perfil circular en menú inferior */
.bottom-nav .nav-profile-photo {
    border-radius: 50% !important;
}
.bottom-nav .nav-profile-photo img {
    border-radius: 50% !important;
}

/* @user: popup bloqueo por dispositivo */
.device-limit-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(5px);
}
.device-limit-card {
    position: relative;
    width: min(100%, 340px);
    padding: 24px 18px 18px;
    border-radius: 28px;
    color: #ecfdf5;
    background:
        radial-gradient(circle at 18% 10%, rgba(187, 247, 208, .18), transparent 30%),
        linear-gradient(145deg, #052e16 0%, #064e3b 58%, #0f3d24 100%);
    box-shadow: 0 24px 55px rgba(5, 46, 22, .34);
    text-align: center;
}
.device-limit-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #bbf7d0;
    background: rgba(255,255,255,.12);
    font-size: 1.25rem;
    font-weight: 900;
}
.device-limit-icon {
    display: grid;
    width: 62px;
    height: 62px;
    margin: 0 auto 12px;
    place-items: center;
    border-radius: 22px;
    background: linear-gradient(135deg, #fde68a, #facc15);
    box-shadow: 0 14px 28px rgba(250, 204, 21, .2);
    font-size: 2rem;
}
.device-limit-card h2 {
    margin: 0 0 8px;
    font-size: 1.08rem;
    font-weight: 950;
    letter-spacing: -.03em;
}
.device-limit-card p {
    margin: 0;
    color: #dcfce7;
    font-size: .82rem;
    font-weight: 750;
    line-height: 1.38;
}
.device-limit-primary {
    width: 100%;
    min-height: 44px;
    margin-top: 16px;
    border: 0;
    border-radius: 16px;
    color: #052e16;
    background: #bbf7d0;
    font-weight: 950;
}

/* @user: Top 7 de usuarios */
.ranking-user-info {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.ranking-user-info small {
    color: #64748b;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1.2;
}

/* @user: foto Top 7 de usuarios */
.ranking-avatar {
    overflow: hidden;
}
.ranking-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

/* @user: estadísticas completas desde header */
body.stats-modal-open {
    overflow: hidden;
}
.user-stats-modal[hidden] {
    display: none;
}
.user-stats-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: end center;
    padding: 18px 12px 0;
}
.user-stats-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(7px);
}
.user-stats-card {
    position: relative;
    z-index: 1;
    width: min(100%, 430px);
    max-height: 88vh;
    overflow: auto;
    padding: 18px;
    border-radius: 28px 28px 0 0;
    background: #fff;
    box-shadow: 0 -24px 60px rgba(15, 23, 42, .24);
}
.user-stats-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: #64748b;
    background: #f1f5f9;
    font-size: 1.2rem;
    font-weight: 900;
}
.user-stats-head {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-right: 36px;
}
.user-stats-head > span {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #16235f, #2f73ef);
    font-weight: 900;
}
.user-stats-head h2,
.user-stats-head p,
.user-stats-breakdown h3,
.user-stats-recent h3 {
    margin: 0;
}
.user-stats-head h2 {
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 900;
}
.user-stats-head p {
    margin-top: 3px;
    color: #64748b;
    font-size: .74rem;
    font-weight: 800;
}
.user-stats-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0;
}
.user-stats-summary article {
    padding: 13px;
    border-radius: 18px;
    background: #f8fafc;
}
.user-stats-summary strong {
    display: block;
    color: #0f172a;
    font-size: 1.32rem;
    font-weight: 900;
}
.user-stats-summary span,
.user-stats-breakdown span,
.user-stats-recent small {
    color: #64748b;
    font-size: .7rem;
    font-weight: 800;
}
.user-stats-breakdown,
.user-stats-recent {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}
.user-stats-breakdown h3,
.user-stats-recent h3 {
    color: #0f172a;
    font-size: .88rem;
    font-weight: 900;
}
.user-stats-breakdown > div,
.user-stats-recent article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #eef2f7;
    border-radius: 15px;
}
.user-stats-breakdown strong,
.user-stats-recent span {
    color: #0f172a;
    font-size: .78rem;
    font-weight: 900;
    white-space: nowrap;
}
.user-stats-recent article div {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.user-stats-recent article strong {
    color: #0f172a;
    font-size: .78rem;
    font-weight: 900;
}
.user-stats-recent p {
    margin: 0;
    color: #64748b;
    font-size: .76rem;
    font-weight: 800;
    line-height: 1.35;
}

/* @user: estadísticas compactas */
.compact-stats-card {
    padding: 14px;
}
.compact-stats-card .user-stats-head {
    gap: 10px;
}
.user-stats-avatar {
    overflow: hidden;
}
.user-stats-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}
.compact-stats-card .user-stats-head h2 {
    font-size: .98rem;
}
.compact-stats-card .user-stats-head p {
    font-size: .68rem;
}
.stats-main-grid,
.stats-answer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin: 12px 0 0;
}
.stats-main-grid article,
.stats-answer-grid article {
    padding: 10px 7px;
    border: 1px solid #edf2f7;
    text-align: center;
}
.stats-main-grid strong,
.stats-answer-grid strong {
    font-size: 1.08rem;
}
.stats-main-grid span,
.stats-answer-grid span {
    font-size: .62rem;
}
.stats-good {
    background: #ecfdf5 !important;
    border-color: #bbf7d0 !important;
}
.stats-good strong { color: #15803d; }
.stats-bad {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
}
.stats-bad strong { color: #dc2626; }
.stats-empty {
    background: #fffbeb !important;
    border-color: #fde68a !important;
}
.stats-empty strong { color: #d97706; }
.user-stats-last {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    padding: 9px 11px;
    border-radius: 15px;
    background: #f8fafc;
    color: #64748b;
    font-size: .7rem;
    font-weight: 850;
}
.user-stats-last strong {
    color: #0f172a;
    font-size: .74rem;
}
.user-stats-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.user-stats-list-head small {
    color: #94a3b8;
    font-size: .62rem;
    font-weight: 900;
}
.user-stats-recent article[hidden] {
    display: none;
}
.user-stats-recent article {
    padding: 9px 10px;
}
.user-stats-recent article strong {
    display: flex;
    gap: 6px;
    align-items: baseline;
}
.user-stats-recent article strong em {
    color: #64748b;
    font-style: normal;
    font-size: .64rem;
    font-weight: 900;
}
.user-stats-recent article span {
    min-width: 42px;
    text-align: right;
    color: #2563eb;
}
.user-stats-pager {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
}
.user-stats-pager[hidden] {
    display: none;
}
.user-stats-pager button {
    border: 1px solid #dbeafe;
    border-radius: 999px;
    padding: 7px 10px;
    color: #1d4ed8;
    background: #f8fafc;
    font-size: .68rem;
    font-weight: 900;
}
.user-stats-pager button:disabled {
    opacity: .45;
}

/* @user: estadísticas más compactas */
.compact-stats-card {
    padding: 12px 12px 14px;
    border-radius: 24px 24px 0 0;
}
.compact-stats-card .user-stats-head {
    gap: 9px;
    padding-right: 32px;
}
.compact-stats-card .user-stats-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
}
.compact-stats-card .user-stats-head h2 {
    font-size: .94rem;
}
.compact-stats-card .user-stats-head p {
    margin-top: 1px;
    font-size: .64rem;
}
.compact-stats-card .user-stats-close {
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: #f8fafc;
    font-size: 1.05rem;
}
.compact-stats-card .stats-main-grid,
.compact-stats-card .stats-answer-grid {
    gap: 6px;
    margin-top: 9px;
}
.compact-stats-card .stats-main-grid article,
.compact-stats-card .stats-answer-grid article {
    min-height: 58px;
    padding: 8px 5px;
    border-radius: 14px;
    box-shadow: none;
}
.compact-stats-card .stats-main-grid article {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.compact-stats-card .stats-main-grid strong,
.compact-stats-card .stats-answer-grid strong {
    font-size: .98rem;
    line-height: 1;
}
.compact-stats-card .stats-main-grid span,
.compact-stats-card .stats-answer-grid span {
    display: block;
    margin-top: 4px;
    font-size: .58rem;
    line-height: 1.05;
}
.compact-stats-card .user-stats-recent {
    gap: 6px;
    margin-top: 11px;
}
.compact-stats-card .user-stats-list-head h3 {
    font-size: .82rem;
}
.compact-stats-card .user-stats-recent article {
    min-height: 48px;
    padding: 8px 9px;
    border-radius: 13px;
    background: #fff;
}
.compact-stats-card .user-stats-recent article strong {
    font-size: .73rem;
}
.compact-stats-card .user-stats-recent small {
    font-size: .61rem;
}
.compact-stats-card .user-stats-recent article span {
    min-width: 38px;
    font-size: .76rem;
}
.compact-stats-card .user-stats-pager button {
    padding: 6px 9px;
    font-size: .62rem;
}

/* @user: bajar configuración XPRESS */
.xpress-section .xpress-config {
    margin-top: 28px;
}
@media (max-width: 430px) {
    .xpress-section .xpress-config {
        margin-top: 36px;
    }
}

/* @user: ajuste fino configuración XPRESS celular */
.xpress-section .xpress-config {
    margin-top: 18px;
}
@media (max-width: 430px) {
    .xpress-section .xpress-config {
        margin-top: 22px;
    }
}

/* @user: compactar XPRESS después de responder */
.xpress-shell.is-running .xpress-card.is-good,
.xpress-shell.is-running .xpress-card.is-bad,
.xpress-shell.is-running .xpress-card.is-empty {
    max-height: calc(100vh - 128px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: 6px;
}
.xpress-shell.is-running .xpress-card.is-good .xpress-question-panel,
.xpress-shell.is-running .xpress-card.is-bad .xpress-question-panel,
.xpress-shell.is-running .xpress-card.is-empty .xpress-question-panel {
    padding: 10px 11px 9px !important;
    border-radius: 0 0 16px 16px !important;
    box-shadow: none !important;
}
.xpress-shell.is-running .xpress-card.is-good h1,
.xpress-shell.is-running .xpress-card.is-bad h1,
.xpress-shell.is-running .xpress-card.is-empty h1 {
    margin-top: 3px !important;
    font-size: .86rem !important;
    line-height: 1.18 !important;
    letter-spacing: -.02em !important;
}
.xpress-shell.is-running .xpress-card.is-good .xpress-counter,
.xpress-shell.is-running .xpress-card.is-bad .xpress-counter,
.xpress-shell.is-running .xpress-card.is-empty .xpress-counter {
    margin: 6px 2px 7px !important;
    font-size: .64rem !important;
}
.xpress-shell.is-running .xpress-card.is-good .xpress-dots i,
.xpress-shell.is-running .xpress-card.is-bad .xpress-dots i,
.xpress-shell.is-running .xpress-card.is-empty .xpress-dots i {
    width: 13px;
    height: 4px;
}
.xpress-shell.is-running .xpress-card.is-good .xpress-options,
.xpress-shell.is-running .xpress-card.is-bad .xpress-options,
.xpress-shell.is-running .xpress-card.is-empty .xpress-options {
    gap: 6px !important;
}
.xpress-shell.is-running .xpress-card.is-good .xpress-options button,
.xpress-shell.is-running .xpress-card.is-bad .xpress-options button,
.xpress-shell.is-running .xpress-card.is-empty .xpress-options button {
    grid-template-columns: 26px 1fr !important;
    gap: 7px !important;
    min-height: 40px !important;
    padding: 7px 8px !important;
    border-radius: 13px !important;
}
.xpress-shell.is-running .xpress-card.is-good .xpress-options span,
.xpress-shell.is-running .xpress-card.is-bad .xpress-options span,
.xpress-shell.is-running .xpress-card.is-empty .xpress-options span {
    width: 26px !important;
    height: 26px !important;
    border-radius: 10px !important;
    font-size: .68rem !important;
}
.xpress-shell.is-running .xpress-card.is-good .xpress-options b,
.xpress-shell.is-running .xpress-card.is-bad .xpress-options b,
.xpress-shell.is-running .xpress-card.is-empty .xpress-options b {
    font-size: .68rem !important;
    line-height: 1.14 !important;
}
.xpress-shell.is-running .xpress-card.is-good .xpress-justification,
.xpress-shell.is-running .xpress-card.is-bad .xpress-justification,
.xpress-shell.is-running .xpress-card.is-empty .xpress-justification {
    max-height: 118px;
    overflow-y: auto;
    margin-top: 7px !important;
    padding: 8px 9px !important;
    border-radius: 12px !important;
    font-size: .64rem !important;
    line-height: 1.22 !important;
    box-shadow: none !important;
}
.xpress-shell.is-running .xpress-card.is-good .xpress-justification strong,
.xpress-shell.is-running .xpress-card.is-bad .xpress-justification strong,
.xpress-shell.is-running .xpress-card.is-empty .xpress-justification strong {
    margin-bottom: 2px !important;
    font-size: .66rem !important;
}
.xpress-shell.is-running .xpress-card.is-good .xpress-topic-row,
.xpress-shell.is-running .xpress-card.is-bad .xpress-topic-row,
.xpress-shell.is-running .xpress-card.is-empty .xpress-topic-row {
    margin-top: 5px !important;
    gap: 5px !important;
}
.xpress-shell.is-running .xpress-card.is-good .xpress-nav-actions button,
.xpress-shell.is-running .xpress-card.is-bad .xpress-nav-actions button,
.xpress-shell.is-running .xpress-card.is-empty .xpress-nav-actions button {
    min-height: 34px !important;
    border-radius: 12px !important;
    font-size: .74rem !important;
}
@media (max-width: 430px) {
    .xpress-shell.is-running .xpress-card.is-good,
    .xpress-shell.is-running .xpress-card.is-bad,
    .xpress-shell.is-running .xpress-card.is-empty {
        max-height: calc(100vh - 112px);
    }
    .xpress-shell.is-running .xpress-card.is-good .xpress-justification,
    .xpress-shell.is-running .xpress-card.is-bad .xpress-justification,
    .xpress-shell.is-running .xpress-card.is-empty .xpress-justification {
        max-height: 96px;
    }
}

/* @user: XPRESS uniforme antes y después de responder */
.xpress-shell.is-running .xpress-card {
    max-height: calc(100vh - 128px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: 6px;
}
.xpress-shell.is-running .xpress-question-panel {
    padding: 10px 11px 9px !important;
    border-radius: 0 0 16px 16px !important;
    box-shadow: none !important;
}
.xpress-shell.is-running .xpress-card h1 {
    margin-top: 3px !important;
    font-size: .86rem !important;
    line-height: 1.18 !important;
    letter-spacing: -.02em !important;
}
.xpress-shell.is-running .xpress-counter {
    margin: 6px 2px 7px !important;
    font-size: .64rem !important;
}
.xpress-shell.is-running .xpress-dots i {
    width: 13px;
    height: 4px;
}
.xpress-shell.is-running .xpress-options {
    gap: 6px !important;
}
.xpress-shell.is-running .xpress-options button {
    grid-template-columns: 26px 1fr !important;
    gap: 7px !important;
    min-height: 40px !important;
    padding: 7px 8px !important;
    border-radius: 13px !important;
}
.xpress-shell.is-running .xpress-options span {
    width: 26px !important;
    height: 26px !important;
    border-radius: 10px !important;
    font-size: .68rem !important;
}
.xpress-shell.is-running .xpress-options b {
    font-size: .68rem !important;
    line-height: 1.14 !important;
}
.xpress-shell.is-running .xpress-justification {
    max-height: 118px;
    overflow-y: auto;
    margin-top: 7px !important;
    padding: 8px 9px !important;
    border-radius: 12px !important;
    font-size: .64rem !important;
    line-height: 1.22 !important;
    box-shadow: none !important;
}
.xpress-shell.is-running .xpress-justification strong {
    margin-bottom: 2px !important;
    font-size: .66rem !important;
}
.xpress-shell.is-running .xpress-topic-row {
    margin-top: 5px !important;
    gap: 5px !important;
}
.xpress-shell.is-running .xpress-nav-actions button {
    min-height: 34px !important;
    border-radius: 12px !important;
    font-size: .74rem !important;
}
@media (max-width: 430px) {
    .xpress-shell.is-running .xpress-card {
        max-height: calc(100vh - 112px);
    }
    .xpress-shell.is-running .xpress-justification {
        max-height: 96px;
    }
}

/* @user: XPRESS legibilidad mejorada */
.xpress-shell.is-running .xpress-card h1 {
    font-size: .94rem !important;
    line-height: 1.24 !important;
}
.xpress-shell.is-running .xpress-options b {
    font-size: .76rem !important;
    line-height: 1.22 !important;
    font-weight: 650 !important;
}
.xpress-shell.is-running .xpress-options span {
    font-size: .74rem !important;
}
.xpress-shell.is-running .xpress-counter {
    font-size: .7rem !important;
}
.xpress-shell.is-running .xpress-justification {
    font-size: .7rem !important;
    line-height: 1.3 !important;
    max-height: 132px;
}
.xpress-shell.is-running .xpress-justification strong {
    font-size: .72rem !important;
}
.xpress-shell.is-running .xpress-nav-actions button {
    font-size: .8rem !important;
}
@media (max-width: 430px) {
    .xpress-shell.is-running .xpress-justification {
        max-height: 112px;
    }
}

/* @user: XPRESS legibilidad + */
.xpress-shell.is-running .xpress-card h1 {
    font-size: 1rem !important;
    line-height: 1.27 !important;
}
.xpress-shell.is-running .xpress-options b {
    font-size: .82rem !important;
    line-height: 1.26 !important;
}
.xpress-shell.is-running .xpress-options span {
    font-size: .78rem !important;
}
.xpress-shell.is-running .xpress-counter {
    font-size: .74rem !important;
}
.xpress-shell.is-running .xpress-justification {
    font-size: .74rem !important;
    line-height: 1.34 !important;
    max-height: 142px;
}
.xpress-shell.is-running .xpress-justification strong {
    font-size: .76rem !important;
}
.xpress-shell.is-running .xpress-nav-actions button {
    font-size: .84rem !important;
}
@media (max-width: 430px) {
    .xpress-shell.is-running .xpress-justification {
        max-height: 120px;
    }
}

/* @user: XPRESS mismo tamaño al responder */
.xpress-shell.is-running .xpress-card.is-good h1,
.xpress-shell.is-running .xpress-card.is-bad h1,
.xpress-shell.is-running .xpress-card.is-empty h1 {
    font-size: 1rem !important;
    line-height: 1.27 !important;
}
.xpress-shell.is-running .xpress-card.is-good .xpress-options b,
.xpress-shell.is-running .xpress-card.is-bad .xpress-options b,
.xpress-shell.is-running .xpress-card.is-empty .xpress-options b {
    font-size: .82rem !important;
    line-height: 1.26 !important;
}
.xpress-shell.is-running .xpress-card.is-good .xpress-options span,
.xpress-shell.is-running .xpress-card.is-bad .xpress-options span,
.xpress-shell.is-running .xpress-card.is-empty .xpress-options span {
    font-size: .78rem !important;
}
.xpress-shell.is-running .xpress-card.is-good .xpress-counter,
.xpress-shell.is-running .xpress-card.is-bad .xpress-counter,
.xpress-shell.is-running .xpress-card.is-empty .xpress-counter {
    font-size: .74rem !important;
}
.xpress-shell.is-running .xpress-card.is-good .xpress-justification,
.xpress-shell.is-running .xpress-card.is-bad .xpress-justification,
.xpress-shell.is-running .xpress-card.is-empty .xpress-justification {
    font-size: .74rem !important;
    line-height: 1.34 !important;
    max-height: 142px;
}
.xpress-shell.is-running .xpress-card.is-good .xpress-justification strong,
.xpress-shell.is-running .xpress-card.is-bad .xpress-justification strong,
.xpress-shell.is-running .xpress-card.is-empty .xpress-justification strong {
    font-size: .76rem !important;
}
.xpress-shell.is-running .xpress-card.is-good .xpress-nav-actions button,
.xpress-shell.is-running .xpress-card.is-bad .xpress-nav-actions button,
.xpress-shell.is-running .xpress-card.is-empty .xpress-nav-actions button {
    font-size: .84rem !important;
}
@media (max-width: 430px) {
    .xpress-shell.is-running .xpress-card.is-good .xpress-justification,
    .xpress-shell.is-running .xpress-card.is-bad .xpress-justification,
    .xpress-shell.is-running .xpress-card.is-empty .xpress-justification {
        max-height: 120px;
    }
}

/* @user: cards home Autoevaluación/Simulacro destacados */
.compact-actions .feature-card-purple {
    border: 1rem solid rgba(168, 85, 247, .28) !important;
    box-shadow: 0 16px 34px rgba(168, 85, 247, .16) !important;
}
.compact-actions .feature-card-blue {
    border: 1rem solid rgba(37, 99, 235, .26) !important;
    box-shadow: 0 16px 34px rgba(37, 99, 235, .16) !important;
}
.compact-actions .feature-card .feature-icon {
    animation: redpol-slow-jump 2.4s ease-in-out infinite;
    will-change: transform;
}
.compact-actions .feature-card-blue .feature-icon {
    animation-delay: .35s;
}
@keyframes redpol-slow-jump {
    0%, 72%, 100% { transform: translateY(0) scale(1); }
    82% { transform: translateY(-7px) scale(1.04); }
    91% { transform: translateY(0) scale(.98); }
}
@media (prefers-reduced-motion: reduce) {
    .compact-actions .feature-card .feature-icon {
        animation: none;
    }
}

/* @user: contorno home más fino */
.compact-actions .feature-card-purple {
    border-width: 5px !important;
}
.compact-actions .feature-card-blue {
    border-width: 5px !important;
}

/* @user: últimos simulacros más compactos */
.compact-stats-card .user-stats-recent {
    gap: 4px;
    margin-top: 9px;
}
.compact-stats-card .user-stats-recent article {
    min-height: 40px;
    padding: 6px 8px;
    border-radius: 11px;
}
.compact-stats-card .user-stats-recent article div {
    gap: 0;
}
.compact-stats-card .user-stats-recent article strong {
    font-size: .7rem;
    line-height: 1.05;
}
.compact-stats-card .user-stats-recent article strong em {
    font-size: .58rem;
}
.compact-stats-card .user-stats-recent small {
    font-size: .58rem;
    line-height: 1.05;
}
.compact-stats-card .user-stats-recent article span {
    min-width: 36px;
    font-size: .7rem;
}

/* @user: logo REDPOL verde con barrido café */
.brand-name {
    position: relative;
    display: inline-block;
    color: #16a34a !important;
    font-weight: 950;
}
.brand-name::after {
    content: 'REDPOL';
    position: absolute;
    inset: 0;
    overflow: hidden;
    width: 0;
    color: #8b5e34;
    white-space: nowrap;
    animation: redpol-type-brown 10s steps(6, end) infinite;
}
@keyframes redpol-type-brown {
    0% { width: 0; }
    18% { width: 100%; }
    30% { width: 100%; }
    31% { width: 0; }
    100% { width: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .brand-name::after {
        animation: none;
        width: 0;
    }
}

/* @user: REDPOL siempre visible, solo cambia color al pasar */
.brand-name::after {
    width: 100% !important;
    pointer-events: none;
    clip-path: inset(0 100% 0 0);
    animation: redpol-sweep-brown 10s ease-in-out infinite;
}
@keyframes redpol-sweep-brown {
    0%, 68%, 100% { clip-path: inset(0 100% 0 0); }
    4% { clip-path: inset(0 78% 0 0); }
    16% { clip-path: inset(0 38% 0 38%); }
    28% { clip-path: inset(0 0 0 78%); }
    32% { clip-path: inset(0 0 0 100%); }
}
@media (prefers-reduced-motion: reduce) {
    .brand-name::after {
        animation: none !important;
        clip-path: inset(0 100% 0 0);
    }
}

/* @user: REDPOL letra por letra */
.brand-name.redpol-letter-logo {
    display: inline-flex;
    gap: 0;
    color: #16a34a !important;
}
.brand-name.redpol-letter-logo::after {
    content: none !important;
}
.redpol-letter-logo span {
    color: #16a34a;
    animation: redpol-letter-brown 10s ease-in-out infinite;
}
.redpol-letter-logo span:nth-child(1) { animation-delay: 0s; }
.redpol-letter-logo span:nth-child(2) { animation-delay: .22s; }
.redpol-letter-logo span:nth-child(3) { animation-delay: .44s; }
.redpol-letter-logo span:nth-child(4) { animation-delay: .66s; }
.redpol-letter-logo span:nth-child(5) { animation-delay: .88s; }
.redpol-letter-logo span:nth-child(6) { animation-delay: 1.1s; }
@keyframes redpol-letter-brown {
    0%, 9%, 100% { color: #16a34a; }
    3%, 6% { color: #8b5e34; }
}
@media (prefers-reduced-motion: reduce) {
    .redpol-letter-logo span {
        animation: none !important;
    }
}

/* @user: REDPOL acumulativo, nunca desaparece */
.brand-name.redpol-letter-logo,
.brand-name.redpol-letter-logo span {
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    overflow: visible !important;
    clip-path: none !important;
    -webkit-text-fill-color: currentColor !important;
}
.brand-name.redpol-letter-logo {
    display: inline-flex !important;
    color: #16a34a !important;
}
.brand-name.redpol-letter-logo::before,
.brand-name.redpol-letter-logo::after {
    content: none !important;
    display: none !important;
}
.brand-name.redpol-letter-logo span {
    color: #16a34a !important;
    animation: redpol-letter-cumulative 10s linear infinite !important;
}
.brand-name.redpol-letter-logo span:nth-child(1) { animation-delay: 0s !important; }
.brand-name.redpol-letter-logo span:nth-child(2) { animation-delay: 0s !important; }
.brand-name.redpol-letter-logo span:nth-child(3) { animation-delay: 0s !important; }
.brand-name.redpol-letter-logo span:nth-child(4) { animation-delay: 0s !important; }
.brand-name.redpol-letter-logo span:nth-child(5) { animation-delay: 0s !important; }
.brand-name.redpol-letter-logo span:nth-child(6) { animation-delay: 0s !important; }
.brand-name.redpol-letter-logo span:nth-child(1) { --turn: 5%; }
.brand-name.redpol-letter-logo span:nth-child(2) { --turn: 9%; }
.brand-name.redpol-letter-logo span:nth-child(3) { --turn: 13%; }
.brand-name.redpol-letter-logo span:nth-child(4) { --turn: 17%; }
.brand-name.redpol-letter-logo span:nth-child(5) { --turn: 21%; }
.brand-name.redpol-letter-logo span:nth-child(6) { --turn: 25%; }
@keyframes redpol-letter-cumulative {
    0%, 4% { color: #16a34a; }
    var(--turn), 32% { color: #8b5e34; }
    36%, 100% { color: #16a34a; }
}
@media (prefers-reduced-motion: reduce) {
    .brand-name.redpol-letter-logo span {
        animation: none !important;
        color: #16a34a !important;
    }
}

/* @user: REDPOL rayita cambia color real */
.brand-name.redpol-letter-logo span {
    color: #16a34a !important;
    animation-name: redpol-letter-hit !important;
    animation-duration: 10s !important;
    animation-timing-function: linear !important;
    animation-iteration-count: infinite !important;
}
.brand-name.redpol-letter-logo span:nth-child(1) { animation-delay: 0s !important; }
.brand-name.redpol-letter-logo span:nth-child(2) { animation-delay: .22s !important; }
.brand-name.redpol-letter-logo span:nth-child(3) { animation-delay: .44s !important; }
.brand-name.redpol-letter-logo span:nth-child(4) { animation-delay: .66s !important; }
.brand-name.redpol-letter-logo span:nth-child(5) { animation-delay: .88s !important; }
.brand-name.redpol-letter-logo span:nth-child(6) { animation-delay: 1.1s !important; }
@keyframes redpol-letter-hit {
    0%, 2.5%, 100% { color: #16a34a !important; }
    3%, 18% { color: #8b5e34 !important; }
    22% { color: #16a34a !important; }
}

/* @user: REDPOL estático + giro acumulativo cada 4s */
.brand-name.redpol-letter-logo {
    display: inline-flex !important;
    color: #16a34a !important;
    perspective: 500px;
}
.brand-name.redpol-letter-logo::before,
.brand-name.redpol-letter-logo::after {
    content: none !important;
    display: none !important;
}
.brand-name.redpol-letter-logo span {
    display: inline-block;
    color: #16a34a !important;
    transform: rotateY(0deg);
    transform-origin: center;
    animation-duration: 32s !important;
    animation-timing-function: ease-in-out !important;
    animation-iteration-count: infinite !important;
    animation-delay: 0s !important;
    backface-visibility: visible;
}
.brand-name.redpol-letter-logo span:nth-child(1) { animation-name: redpol-flip-1 !important; }
.brand-name.redpol-letter-logo span:nth-child(2) { animation-name: redpol-flip-2 !important; }
.brand-name.redpol-letter-logo span:nth-child(3) { animation-name: redpol-flip-3 !important; }
.brand-name.redpol-letter-logo span:nth-child(4) { animation-name: redpol-flip-4 !important; }
.brand-name.redpol-letter-logo span:nth-child(5) { animation-name: redpol-flip-5 !important; }
.brand-name.redpol-letter-logo span:nth-child(6) { animation-name: redpol-flip-6 !important; }
@keyframes redpol-flip-1 {
    0%, 11.5% { color: #16a34a; transform: rotateY(0deg); }
    14.5% { color: #8b5e34; transform: rotateY(360deg); }
    15%, 88% { color: #8b5e34; transform: rotateY(360deg); }
    92%, 100% { color: #16a34a; transform: rotateY(0deg); }
}
@keyframes redpol-flip-2 {
    0%, 24% { color: #16a34a; transform: rotateY(0deg); }
    27% { color: #8b5e34; transform: rotateY(360deg); }
    27.5%, 88% { color: #8b5e34; transform: rotateY(360deg); }
    92%, 100% { color: #16a34a; transform: rotateY(0deg); }
}
@keyframes redpol-flip-3 {
    0%, 36.5% { color: #16a34a; transform: rotateY(0deg); }
    39.5% { color: #8b5e34; transform: rotateY(360deg); }
    40%, 88% { color: #8b5e34; transform: rotateY(360deg); }
    92%, 100% { color: #16a34a; transform: rotateY(0deg); }
}
@keyframes redpol-flip-4 {
    0%, 49% { color: #16a34a; transform: rotateY(0deg); }
    52% { color: #8b5e34; transform: rotateY(360deg); }
    52.5%, 88% { color: #8b5e34; transform: rotateY(360deg); }
    92%, 100% { color: #16a34a; transform: rotateY(0deg); }
}
@keyframes redpol-flip-5 {
    0%, 61.5% { color: #16a34a; transform: rotateY(0deg); }
    64.5% { color: #8b5e34; transform: rotateY(360deg); }
    65%, 88% { color: #8b5e34; transform: rotateY(360deg); }
    92%, 100% { color: #16a34a; transform: rotateY(0deg); }
}
@keyframes redpol-flip-6 {
    0%, 74% { color: #16a34a; transform: rotateY(0deg); }
    77% { color: #8b5e34; transform: rotateY(360deg); }
    77.5%, 88% { color: #8b5e34; transform: rotateY(360deg); }
    92%, 100% { color: #16a34a; transform: rotateY(0deg); }
}
@media (prefers-reduced-motion: reduce) {
    .brand-name.redpol-letter-logo span {
        animation: none !important;
        color: #16a34a !important;
        transform: none !important;
    }
}

/* @user: limpiar máquina de escribir, dejar giro estático */
.brand-name.redpol-letter-logo {
    display: inline-flex !important;
    overflow: visible !important;
    color: #16a34a !important;
    perspective: 520px;
}
.brand-name.redpol-letter-logo::before,
.brand-name.redpol-letter-logo::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    animation: none !important;
    clip-path: none !important;
}
.brand-name.redpol-letter-logo span {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    color: #16a34a !important;
    transform: rotateY(0deg);
    transform-origin: center;
    animation-duration: 32s !important;
    animation-timing-function: ease-in-out !important;
    animation-iteration-count: infinite !important;
    animation-delay: 0s !important;
}
.brand-name.redpol-letter-logo span:nth-child(1) { animation-name: redpol-static-flip-1 !important; }
.brand-name.redpol-letter-logo span:nth-child(2) { animation-name: redpol-static-flip-2 !important; }
.brand-name.redpol-letter-logo span:nth-child(3) { animation-name: redpol-static-flip-3 !important; }
.brand-name.redpol-letter-logo span:nth-child(4) { animation-name: redpol-static-flip-4 !important; }
.brand-name.redpol-letter-logo span:nth-child(5) { animation-name: redpol-static-flip-5 !important; }
.brand-name.redpol-letter-logo span:nth-child(6) { animation-name: redpol-static-flip-6 !important; }
@keyframes redpol-static-flip-1 {
    0%, 11.5% { color: #16a34a; transform: rotateY(0deg); }
    14.5%, 88% { color: #8b5e34; transform: rotateY(360deg); }
    92%, 100% { color: #16a34a; transform: rotateY(0deg); }
}
@keyframes redpol-static-flip-2 {
    0%, 24% { color: #16a34a; transform: rotateY(0deg); }
    27%, 88% { color: #8b5e34; transform: rotateY(360deg); }
    92%, 100% { color: #16a34a; transform: rotateY(0deg); }
}
@keyframes redpol-static-flip-3 {
    0%, 36.5% { color: #16a34a; transform: rotateY(0deg); }
    39.5%, 88% { color: #8b5e34; transform: rotateY(360deg); }
    92%, 100% { color: #16a34a; transform: rotateY(0deg); }
}
@keyframes redpol-static-flip-4 {
    0%, 49% { color: #16a34a; transform: rotateY(0deg); }
    52%, 88% { color: #8b5e34; transform: rotateY(360deg); }
    92%, 100% { color: #16a34a; transform: rotateY(0deg); }
}
@keyframes redpol-static-flip-5 {
    0%, 61.5% { color: #16a34a; transform: rotateY(0deg); }
    64.5%, 88% { color: #8b5e34; transform: rotateY(360deg); }
    92%, 100% { color: #16a34a; transform: rotateY(0deg); }
}
@keyframes redpol-static-flip-6 {
    0%, 74% { color: #16a34a; transform: rotateY(0deg); }
    77%, 88% { color: #8b5e34; transform: rotateY(360deg); }
    92%, 100% { color: #16a34a; transform: rotateY(0deg); }
}

/* @user: logo REDPOL estático sin efectos */
.brand-name,
.brand-name span {
    color: #16a34a !important;
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
    clip-path: none !important;
    -webkit-text-fill-color: #16a34a !important;
}
.brand-name::before,
.brand-name::after {
    content: none !important;
    display: none !important;
    animation: none !important;
}

/* DEFINITIVE OVERRIDE FOR LIBRARY UI - ULTRA COMPACT 2x2 */
.book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    padding: 0 24px !important; /* Tarjetas más estrechas */
}

.book-card {
    background: transparent !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    transition: transform 0.2s ease;
}

.book-card:active {
    transform: scale(0.97);
}

.book-cover {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    min-height: 145px !important; /* 10% más pequeño */
    border-radius: 14px 14px 0 0 !important;
    padding: 6px !important;
    background: #fff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-bottom: none !important; /* Conexión directa */
    box-shadow: 0 4px 10px rgba(0,0,0,0.02) !important;
    overflow: hidden !important;
}

.book-card h2, .book-cover h2 {
    background-color: rgba(30, 41, 59, 0.65) !important; /* Otro color oscuro traslúcido */
    color: #fff !important;
    padding: 4px 6px !important;
    border-radius: 6px !important;
    font-size: 0.58rem !important;
    font-weight: 800 !important;
    text-align: center !important;
    line-height: 1.1 !important;
    margin: 0 0 2px 0 !important; /* Un poco más abajo */
    backdrop-filter: blur(4px) !important;
}

.book-download-button {
    margin-top: -1px !important; /* Subir para conectar */
    min-height: 32px !important;
    font-size: 0.56rem !important;
    font-weight: 900 !important;
    border-radius: 0 0 14px 14px !important;
    background: #192033 !important;
    color: #fff !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.library-filters {
    margin-bottom: 15px !important;
}

.student-book-cover-img {
    border-radius: 8px !important;
}

/* Premium Limits Display */
.xpress-free-limit-info {
    margin-top: -10px;
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 0.82rem;
    line-height: 1.4;
    text-align: center;
    backdrop-filter: blur(4px);
}
.xpress-free-limit-info span {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 800;
    opacity: 0.9;
    margin-bottom: 2px;
}
.xpress-free-limit-info strong {
    color: #fff;
    background: rgba(255,255,255,0.2);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 900;
}


/* FREE Limits Counter Grid */
.xpress-free-counter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 8px;
    margin-top: -6px;
}
.counter-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 6px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    color: #fff;
    text-align: center;
}
.counter-item strong {
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 2px;
    color: #ffd700;
}
.counter-item span {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    opacity: 0.9;
}
    opacity: 0.9;
    letter-spacing: 0.02em;
}


/* Premium Upgrade Modal - Compact */
.premium-modal.is-hidden {
    display: none !important;
}
.premium-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 16px;
}
.premium-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}
.premium-modal-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 290px;
    padding: 22px 20px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: premium-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes premium-pop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.premium-modal-header {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}
.premium-modal-icon {
    font-size: 2.8rem;
}
.premium-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 0;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 50%;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}
.premium-modal-close:hover { background: #e2e8f0; }
.premium-modal-content h2 {
    margin: 0 0 8px;
    font-size: 1.3rem;
    font-weight: 900;
    color: #0f172a;
}
.premium-modal-content p {
    margin: 0 0 18px;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.4;
}
.premium-modal-actions {
    display: grid;
    gap: 8px;
}
.premium-wa-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 8px 16px rgba(37, 211, 102, 0.2);
}
.premium-close-btn {
    min-height: 40px;
    border: 0;
    background: none;
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.84rem;
    cursor: pointer;
}

